WeirdSky924/project-change-router-skill ↗★ 2

project-change-router-skill

Project-level direction, boundary, and reuse governance for AI coding agents. 适合需要对AI编码智能体的写入路径和修改行为进行规范治理的团队。

Package
project-change-router-skill
Compatibility
Unverified
Version
0.5.0
License
MIT
Last updated
Sep 24, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:WeirdSky924/project-change-router-skill

两层使用模型

PCR 的输出分为两层,使用时不要混在一起理解。

必须执行层:

  • 必须先读 execution_gate.state:pass、conditional、blocked 是唯一权威写入状态。
  • 必须尊重 allowed_write_paths、forbidden_write_paths 和 must_read_before_edit。
  • 必须识别并保护已有 owner、public entry、canonical root 和依赖方向。
  • 不能在已有能力可能存在时新建第二套平行实现中心。
  • blocked 时禁止产品代码写入;conditional 时必须先执行 required_commands 并限制在给定 envelope;pass 也不能越过 envelope。
  • veto_reasons、unknown evidence、生命周期、高风险重叠和 provisional 边界必须追溯到 typed finding 与 policy rule,不能忽略或仅凭 action 覆盖。

参考建议层:

  • action 是当前证据下的处理倾向,不是最终工程命令。
  • recommended_next_steps、safe_next_steps、analysis_directions、why_not_actions 和 profile_repair_hints 是解阻方向和调查提示。
  • action=review 不等于永远不能做,也不自动等于 blocked;它表示应优先补证据、补 profile、读源码或协调确认,最终仍以 execution_gate 为准。
  • 最终实现方案仍必须来自真实源码分析、依赖追踪、测试和用户确认。

日常使用

Codex 中可以显式触发:

Use $project-change-router to resolve the correct capability entry for this change.

Claude Code 中可以显式触发:

/project-change-router resolve the correct capability entry for this change

DeepSeek Harness 中也使用 whitespace-bounded slash invocation;或者让模型根据 skill catalog 的描述主动加载:

/project-change-router resolve the correct capability entry for this change

推荐用统一 flow 解析并检查一次变更:

python scripts/run_change_flow.py --repo  --request "Add invoice refund support" --changed-path services/billing/refund.py --format compact-json

也可以从请求文件读取;需要单独排查路由时仍可使用兼容的 resolve_entry.py:

python scripts/run_change_flow.py --repo  --request-file request.md --changed-path services/billing/refund.py --format artifact-reference --output flow-report.json
python scripts/resolve_entry.py --repo  --request-file request.md --changed-path services/billing/refund.py --format json --output route-report.json

解析后执行规则:

  • 如果 execution_gate.state=blocked:禁止产品代码写入;按 decisive finding、unknown evidence 和 required commands 补证据或进入有来源的授权流程。
  • 如果 execution_gate.state=conditional:先执行全部 required commands,只在返回的 allowed paths 内写入;它只适用于已证明无关或不扩大的可信历史债务。
  • 如果 execution_gate.state=pass:完成精确 must-read 后在 envelope 内推进。
  • action=review 只表示优先调查、补 profile 或协调,不自行阻塞;下面所有 action 也都不能覆盖 gate。
  • 如果 action=reuse:把它当成复用倾向;优先读取 must_read_before_edit 和 required_reads,不要改核心实现。
  • 如果 action=extend:把它当成扩展倾向;只在 allowed_write_paths 内扩展,避免绕过 public entry。
  • 如果 action=extract:把它当成抽取倾向;先确认重复面、调用方和测试,再抽共享能力。
  • 如果 action=new:把它当成新边界倾向;先命名隔离边界,不要在已有 capability 旁边生成第二套平行中心。