spec-kit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Spec Kit Skill Router

Spec Kit 技能路由器

Route requests to the smallest set of installed
spec-kit-*
skills. Treat routes as defaults; if repository constraints require a different sequence, state the deviation and risk.
将请求路由到最小范围的已安装
spec-kit-*
技能。 将路由视为默认规则;如果仓库约束要求不同的序列,请说明偏差和风险。

Invocation Notice

调用说明

  • Inform the user when this skill is invoked by name:
    spec-kit
    .
  • 当通过名称
    spec-kit
    调用此技能时,告知用户。

Trigger Tests

触发测试

  • Should trigger:
    • "Which spec-kit skill should I run next?"
    • "Route this feature request through Spec Kit."
    • "I have
      tasks.md
      ; can we implement now?"
  • Should not trigger:
    • "Write a Conventional Commit message."
    • "Debug Python concurrency bugs unrelated to Spec Kit."
  • 应触发的场景:
    • "我接下来应该运行哪个spec-kit技能?"
    • "通过Spec Kit路由这个功能需求。"
    • "我有
      tasks.md
      ;现在可以开始实现了吗?"
  • 不应触发的场景:
    • "编写符合约定的提交信息。"
    • "调试与Spec Kit无关的Python并发bug。"

Route by Intent

按意图路由

User IntentRouteRequired artifacts
Create or update governance/principles
spec-kit-constitution
none
Draft or revise feature requirements
spec-kit-specify
constitution recommended
Resolve high-impact ambiguity before planning
spec-kit-clarify
spec.md
Produce technical design artifacts
spec-kit-plan
spec.md
+ constitution
Generate dependency-ordered implementation tasks
spec-kit-tasks
plan.md
(+
spec.md
)
Audit cross-artifact consistency (read-only)
spec-kit-analyze
spec.md
+
plan.md
+
tasks.md
Reconcile specification drift at any stage
spec-kit-reconcile
gap report + existing feature artifacts
Generate requirements-quality checklist
spec-kit-checklist
spec.md
Execute implementation from tasks
spec-kit-implement
tasks.md
用户意图目标路由所需工件
创建或更新治理/原则
spec-kit-constitution
起草或修订功能需求
spec-kit-specify
建议提供constitution
规划前解决高影响歧义
spec-kit-clarify
spec.md
生成技术设计工件
spec-kit-plan
spec.md
+ constitution
生成按依赖排序的实现任务
spec-kit-tasks
plan.md
(+
spec.md
)
审核跨工件一致性(只读)
spec-kit-analyze
spec.md
+
plan.md
+
tasks.md
协调任何阶段的规范漂移
spec-kit-reconcile
差距报告 + 现有功能工件
生成需求质量检查清单
spec-kit-checklist
spec.md
根据任务执行实现
spec-kit-implement
tasks.md

Routing Flowchart

路由流程图

Use this for feature-work sequencing. Gate checks are mandatory.
dot
digraph feature_route {
    rankdir=TB;
    node [fontname="Helvetica", fontsize=10];
    edge [fontname="Helvetica", fontsize=9];

    start [label="Feature request", shape=oval];
    reconcile_gate [label="Need reconcile now\n(drift detected)?", shape=diamond];
    has_const [label="constitution exists?", shape=diamond];
    constitution [label="spec-kit-constitution", shape=box];
    has_spec [label="spec.md exists?", shape=diamond];
    specify [label="spec-kit-specify", shape=box];
    clarify_gate [label="Spec ambiguity blocks planning?", shape=diamond];
    clarify [label="spec-kit-clarify", shape=box];
    plan [label="spec-kit-plan", shape=box];
    tasks [label="spec-kit-tasks", shape=box];
    analyze_gate [label="Run spec-kit-analyze?", shape=diamond];
    analyze [label="spec-kit-analyze", shape=box];
    analyze_blocking [label="Blocking findings?", shape=diamond];
    reconcile [label="spec-kit-reconcile", shape=box];
    has_tasks [label="tasks.md exists?", shape=diamond];
    stop_tasks [label="STOP:\nrun spec-kit-tasks first", shape=octagon, style=filled, fillcolor=red, fontcolor=white];
    implement [label="spec-kit-implement", shape=box];
    post_impl_gaps [label="Post-implementation\ngaps found?", shape=diamond];
    done [label="Feature complete", shape=doublecircle];

    start -> reconcile_gate;
    reconcile_gate -> reconcile [label="yes"];
    reconcile_gate -> has_const [label="no"];
    reconcile -> has_const [label="continue"];
    has_const -> constitution [label="no"];
    has_const -> has_spec [label="yes"];
    constitution -> has_spec;
    has_spec -> specify [label="no"];
    has_spec -> clarify_gate [label="yes"];
    specify -> clarify_gate;
    clarify_gate -> clarify [label="yes"];
    clarify_gate -> plan [label="no"];
    clarify -> plan;
    plan -> tasks;
    tasks -> has_tasks;
    has_tasks -> analyze_gate [label="yes"];
    has_tasks -> stop_tasks [label="no"];
    analyze_gate -> analyze [label="recommended"];
    analyze_gate -> implement [label="skip"];
    analyze -> analyze_blocking;
    analyze_blocking -> reconcile [label="yes"];
    analyze_blocking -> implement [label="no"];
    reconcile -> implement;
    implement -> post_impl_gaps;
    post_impl_gaps -> done [label="no"];
    post_impl_gaps -> reconcile [label="yes"];
}
用于功能工作的排序。 门控检查是强制性的。
dot
digraph feature_route {
    rankdir=TB;
    node [fontname="Helvetica", fontsize=10];
    edge [fontname="Helvetica", fontsize=9];

    start [label="Feature request", shape=oval];
    reconcile_gate [label="Need reconcile now\n(drift detected)?", shape=diamond];
    has_const [label="constitution exists?", shape=diamond];
    constitution [label="spec-kit-constitution", shape=box];
    has_spec [label="spec.md exists?", shape=diamond];
    specify [label="spec-kit-specify", shape=box];
    clarify_gate [label="Spec ambiguity blocks planning?", shape=diamond];
    clarify [label="spec-kit-clarify", shape=box];
    plan [label="spec-kit-plan", shape=box];
    tasks [label="spec-kit-tasks", shape=box];
    analyze_gate [label="Run spec-kit-analyze?", shape=diamond];
    analyze [label="spec-kit-analyze", shape=box];
    analyze_blocking [label="Blocking findings?", shape=diamond];
    reconcile [label="spec-kit-reconcile", shape=box];
    has_tasks [label="tasks.md exists?", shape=diamond];
    stop_tasks [label="STOP:\nrun spec-kit-tasks first", shape=octagon, style=filled, fillcolor=red, fontcolor=white];
    implement [label="spec-kit-implement", shape=box];
    post_impl_gaps [label="Post-implementation\ngaps found?", shape=diamond];
    done [label="Feature complete", shape=doublecircle];

    start -> reconcile_gate;
    reconcile_gate -> reconcile [label="yes"];
    reconcile_gate -> has_const [label="no"];
    reconcile -> has_const [label="continue"];
    has_const -> constitution [label="no"];
    has_const -> has_spec [label="yes"];
    constitution -> has_spec;
    has_spec -> specify [label="no"];
    has_spec -> clarify_gate [label="yes"];
    specify -> clarify_gate;
    clarify_gate -> clarify [label="yes"];
    clarify_gate -> plan [label="no"];
    clarify -> plan;
    plan -> tasks;
    tasks -> has_tasks;
    has_tasks -> analyze_gate [label="yes"];
    has_tasks -> stop_tasks [label="no"];
    analyze_gate -> analyze [label="recommended"];
    analyze_gate -> implement [label="skip"];
    analyze -> analyze_blocking;
    analyze_blocking -> reconcile [label="yes"];
    analyze_blocking -> implement [label="no"];
    reconcile -> implement;
    implement -> post_impl_gaps;
    post_impl_gaps -> done [label="no"];
    post_impl_gaps -> reconcile [label="yes"];
}

Sequence Rules

序列规则

  1. Never run
    spec-kit-plan
    without
    spec.md
    .
  2. Never run
    spec-kit-implement
    without
    tasks.md
    .
  3. Run
    spec-kit-clarify
    before planning when ambiguity can change architecture, data model, testing, UX, operations, or compliance.
  4. Run
    spec-kit-reconcile
    whenever drift is detected at any stage before continuing.
  1. 绝不要在没有
    spec.md
    的情况下运行
    spec-kit-plan
  2. 绝不要在没有
    tasks.md
    的情况下运行
    spec-kit-implement
  3. 当歧义可能改变架构、数据模型、测试、用户体验、运维或合规性时,在规划前运行
    spec-kit-clarify
  4. 只要在任何阶段检测到漂移,就运行
    spec-kit-reconcile
    ,然后再继续。

Router Behavior

路由器行为

  1. Classify user intent first, then select one or more child skills from the route table.
  2. Enforce artifact gates before invoking downstream skills.
  3. Prefer the minimal next step; do not run the full pipeline unless requested.
  4. If the requested step violates a gate, route to the missing prerequisite and explain the dependency.
  5. Route developer-reported drift directly to
    spec-kit-reconcile
    , even if raised outside analyze/implement.
  1. 首先对用户意图进行分类,然后从路由表中选择一个或多个子技能。
  2. 在调用下游技能之前,强制执行工件门控。
  3. 优先选择最小的下一步;除非被要求,否则不要运行完整的流水线。
  4. 如果请求的步骤违反了门控规则,路由到缺失的前置条件并解释依赖关系。
  5. 将开发者报告的漂移直接路由到
    spec-kit-reconcile
    ,即使是在分析/实现之外提出的。

Shared Resource Ownership (Parent Skill)

共享资源所有权(父技能)

  • skills/spec-kit/scripts/*
    is the source of truth for shared shell helpers.
  • Child skills may symlink these scripts; preserve script names and argument contracts unless all dependent children are updated together.
  • skills/spec-kit/references/spec-kit-workflow.dot
    is shared by symlink in multiple child skills and must stay router-accurate.
  • skills/spec-kit/scripts/*
    是共享shell助手的事实来源。
  • 子技能可以符号链接这些脚本;除非所有依赖的子技能一起更新,否则请保留脚本名称和参数约定。
  • skills/spec-kit/references/spec-kit-workflow.dot
    通过符号链接在多个子技能中共享,必须保持与路由器一致。

Unsupported in This Repo

本仓库不支持的功能

  • spec-kit-taskstoissues
    is not supported.
  • If the user asks for GitHub issue export from
    tasks.md
    , state that no
    spec-kit-*
    exporter skill is available and continue with manual guidance or available skills.
  • spec-kit-taskstoissues
    不受支持。
  • 如果用户要求从
    tasks.md
    导出GitHub问题,请说明没有可用的
    spec-kit-*
    导出器技能,并继续提供手动指导或使用可用技能。

References

参考资料

  • references/spec-kit-workflow.dot
  • Upstream baseline:
    https://github.com/github/spec-kit
    (snapshot:
    9111699cd27879e3e6301651a03e502ecb6dd65d
    )
  • references/spec-kit-workflow.dot
  • 上游基线:
    https://github.com/github/spec-kit
    (快照:
    9111699cd27879e3e6301651a03e502ecb6dd65d