Role: single-step governance executor — the paired execution layer of plan-next WHAT: each invocation executes 1 plan-next routing recommendation, emits
continuation_signalfor/loopto drive iteration progress HOW: internally calls plan-next → takes the highest-priority card → human gate judgment → executes sub-skill → post-execution validation → outputs report Difference: different fromplan-next(read-only diagnosis, does not execute); different from/loop(only schedules, does not execute business logic); different fromorchestrate-repair-loop(fixes code defects, does not advance the governance layer)
Purpose
Convert plan-next's routing recommendations into one executable governance action, making fully automatic autopilot (/loop /orchestrate-governance-step) possible.
plan-next can only diagnose and recommend; the user must manually execute each recommendation. orchestrate-governance-step fills this execution gap, and together with /loop realizes three-layer orthogonal automation:
| Layer | Skill | Responsibility |
|---|---|---|
| Scheduling | /loop |
Triggered once every N minutes |
| Drive | orchestrate-governance-step | Read route → execute 1 step → report |
| Diagnosis | plan-next |
Inventory + identify gaps + routing recommendations (read-only) |
Core Objectives
Primary objective: each invocation executes exactly 1 governance action, and clearly communicates the execution result and whether to continue via IterationStepReport.
Success criteria(all must be satisfied):
- ✅ Single-step execution: each invocation executes and only executes 1 routing action
- ✅ Stuck detection: when the same routing card fingerprint appears 2 consecutive times within a session and the objective has not advanced, trigger the
stalledsignal - ✅ Post-execution validation: after executing the sub-skill, rerun plan-next to confirm whether the target card has disappeared
- ✅ Human gate: strategic creative skills (define-mission, design-strategic-goals, etc.) must pause and inform the user before execution
- ✅ Clear continuation signal: each invocation must output in IterationStepReport
continuation_signalone of five values
Acceptance test: after execution completes, does the IterationStepReport clearly state what was executed, what the result was, and whether the next step is to continue or requires human intervention?
Scope Boundaries
This skill is responsible for:
- Internally calling plan-next to obtain the route
- Selecting the highest-priority card from "what should be done now" (
紧急>重要>缓) - Stuck detection (fingerprint comparison within a session)
- Human gate judgment (by default skips blocked cards and tries the next one; only outputs blocked when all have been skipped)
- Drafting the execution plan + self-review loop (maximum 3 rounds)
- Executing 1 sub-skill (after the plan passes)
- Lightweight post-execution validation
- Outputting IterationStepReport
This skill is not responsible for:
- Governance diagnosis and route generation →
plan-next - Loop scheduling →
/loop(built into Claude Code) - Code defect fixing loop →
orchestrate-repair-loop - Strategic creative decision content (mission, vision, strategic objectives content) → requires human
Handoff point:
continuation_signal: done→ governance ready, notify user, stopcontinuation_signal: blocked | stalled | error→ requires human intervention, stop and explain the reason
Usage scenarios
- "Continue advancing governance until complete" →
/loop /orchestrate-governance-step - "Execute the next governance action" →
/orchestrate-governance-step - "Fully automatic autopilot, advance once every 30 minutes" →
/loop /orchestrate-governance-step 30m - "Only view what will be executed next (without executing)" → use
/plan-next
Behavior
Step 0: Pre-checks
Read the governance document path (defaults to the same as plan-next's docs_root, or explicitly provided by the caller).
Step 1: Call plan-next
Internally call /plan-next, capture the routing output. If the caller provided pre_run_output, use it directly and skip this step.
Recordtarget card fingerprint(used for stuck detection):
指纹 = 主题字段 + "||" + 治理上下文字段
Step 2: Parse routing
From "what to do now" in priority order (紧急 → 重要 → 缓 → 待执行),try one by oneuntil finding the first card that is not hit by the session skip-list and passes the step 4 human gate.
Skip-list mechanism: maintain a skip-list (set of fingerprints) within the session; when step 4 triggers a skip, add the current card fingerprint to it. During traversal in this step, skip cards hit by the skip-list.
Traversal end states:
- Found an executable card → proceed to step 5
- All cards are skipped (the skip-list covers all of "what to do now") →
continuation_signal: blocked, the report lists all skipped cards and their blocking reasons - "What to do now" itself is empty → proceed to the three-state determination below
Three-state determination(do not mistake "awaiting execution" for "completed"):
| plan-next output | continuation_signal | Meaning |
|---|---|---|
| Has routing cards (urgent/important/deferred) | Proceed to step 3 to continue | Governance has gaps, sub-skills can be executed |
| Contains only "pending execution" cards (tasks already split, awaiting development) | blocked |
Governance ready, awaiting external execution |
| Completely empty (all target status=done and L1 KPI achieved) | done |
Governance + acceptance both achieved |
Key constraints:
- "What to do now" being empty ≠ done. Must first confirm whether plan-next determines it after the L1 acceptance KPI check + L5 pending-execution branch
- If the plan-next output does not contain the L1 acceptance KPI status field → consider the plan-next call non-compliant, output
error+ prompt to upgrade plan-next - Strategic objective
status = approvedbut acceptance not achieved → plan-next will necessarily return routing (establish KPI or pending-execution card), it should not be empty
Step 3: Stuck detection
Compare this fingerprint with thefingerprint of the last executionwithin the session:
- Same →
continuation_signal: stalled, indicating "the target card did not advance after the last execution", stop - Different (or first call) → continue
Step 4: Human gate (skipped by default, does not abort)
In the following situations the current card is consideredblocked, add its fingerprint to the session skip-list,Return to step 2 and try the next one, instead of immediately terminating /loop:
- The recommended skill belongs to the creative/strategic category:
define-mission、design-strategic-goals、define-vision、define-north-star、define-strategic-pillars - The routing card's completion marker contains "when blocked, return to plan-next for re-evaluation" and it has currently been triggered
- The routing card label is
待执行: governance-ready, requires external development execution, no governance skill available to invoke - The first route is to establish the L1 acceptance KPI data sourceand the recommended skill belongs to the design/architecture category: the monitoring plan requires manual confirmation and is not executed automatically
Only when the skip-list covers all the "what should be done now" cards, output continuation_signal: blocked, and IterationStepReport lists all skipped items and their respective blocking reasons, prompting the user to intervene manually.
Why skip by default instead of stopping immediately: The value of /loop lies in automatically advancing all automatable parts; if a creative-type card stops immediately, it would cause the subsequent N non-creative-type cards to be blocked pointlessly. Skipping lets non-blocking work continue to flow, and the parts requiring manual work are reported together.
Step 5: Plan-first execution (draft → self-review loop → execute after passing)
After locating an executable card,you MUST NOT directly invoke the recommended skill. You must first draft an execution plan, pass self-review, and then exit plan mode to execute.
5.1 Draft the plan (EnterPlanMode)
Enter plan mode and produce an execution plan for that card, including:
- Objective: quote the routing card's topic + completion marker (verbatim)
- Sub-skill command to be invoked: complete
/skill-name [聚焦点] - Source of the focus point: which sentence in the routing card it was derived from (to prevent scope creep)
- Expected output: file paths and key fields to be created/modified
- Scope red lines: files/scopes that this step MUST NOT touch (to prevent incidental expansion)
- Rollback points: recovery path in case of execution failure (which are newly created and can be deleted directly, which are modifications requiring git restore)
5.2 Plan self-review loop (maximum 3 rounds)
In each round, check the plan against the following checklist; if any defect is hit, revise and re-review:
| Check item | Defect determination |
|---|---|
| Objective consistent with the routing card | The plan objective differs from or omits the card's topic/completion marker |
| Single-step semantics | The plan implicitly executes ≥ 2 sub-skills or ≥ 2 cards |
| Focus point traceable | The focus point cannot find support in the card's original text |
| Scope red lines clear | Missing the "MUST NOT touch" section or written too broadly ("do not break other files" does not count as clear) |
| Expected output verifiable | File paths/fields are not concretized, and step 6's re-run of plan-next has no anchor for comparison |
| Rollback points present | Modification-type operations do not declare a git restore anchor |
Pass determination:one round of self-review with 0 defects。
Limit triggered: still has defects after 3 consecutive rounds → continuation_signal: error, IterationStepReport lists the residual defects from the last round, stop;do notforce execution with known defects.
5.3 Execution (after ExitPlanMode)
After passing self-review, exit plan mode and call as planned /skill-name [聚焦点]。
- During execution, if the plan deviates from reality (e.g., file already exists, dependency missing) → do notexpand scope on the fly; abort execution, output
continuation_signal: error, and record the deviation point in the report - Execution fails and there is no recovery path →
continuation_signal: error, output the report, and stop
Step 6: Post-execution verification
Force re-run /plan-next(cannot be skipped), and check whether the target card has disappeared from "what to do now".
done The only legitimate source of the signal is the verification result of this step—it is forbidden to substitute the model's own inference.
| Result | Action |
|---|---|
| Card disappeared, "what to do now" still has entries | continuation_signal: advance |
| Card disappeared, "what to do now" is empty | continuation_signal: done |
| Card still exists | Update the stuck counter; if the count reaches 2 → continuation_signal: stalled |
Step 7: Output IterationStepReport
Interaction mode with /loop (important)
/loop has two modes, and the way continuation_signal is consumed is completely different:
| /loop mode | Trigger method | Signal consumption | Recommended usage |
|---|---|---|---|
| Dynamic | No interval (self-scheduled ScheduleWakeup) | Read continuation_signal: done/blocked/stalled/error will stop the loop |
✅ Recommended:/loop /orchestrate-governance-step(without interval) |
| Fixed-interval (cron) | Has interval (e.g., 5m) |
Does not read continuation_signal: cron keeps triggering, signals are ignored |
⚠️ Not recommended for auto-stop scenarios; the user must manually CronDelete |
Mandatory behavior:
- When fixed-interval cron mode is detected (via the presence of a CronCreate record in the session context with prompt=
/orchestrate-governance-step), the first IterationStepReport must warn the user: "Currently in cron mode, signals are ignored; if you do not want continuous triggering, switch to dynamic /loop or CronDelete after receiving stalled/blocked/done" stalledWhen the signal appears for the 2nd consecutive time, the IterationStepReport must explicitly state "Strongly recommend immediately CronDelete " and provide the job ID
Solution: When the user wants "auto-stop after governance is ready", they should use /loop /orchestrate-governance-step(no interval, dynamic mode), not /loop 1m /orchestrate-governance-step。
Input and output
Input
| Parameter | Required | Default | Description |
|---|---|---|---|
docs_root |
No | auto | Governance document root directory; auto uses the same default path as plan-next |
pre_run_output |
No | — | Pre-run plan-next output; when provided, skip the internal call |
Output: IterationStepReport
## 这次自动推进做了什么
- **做了什么**:[用文件名/功能名说明;禁用"路由卡片""治理层级"等词]
- **为什么要修**:[发现了什么具体问题;首次新建文件时省略]
- **改了什么**(有文件变更时):
- 修改前:...
- 修改后:...
- **结果**:成功 ✅ | 需要你来决定 ⚠️ | 出错了 ❌
- **下一步**:继续自动推进 | 全部完成,无需继续 | 需要你决定:[说明] | 卡住了:[说明]
- _(内部)继续信号:advance | done | blocked | stalled | error_
continuation_signal semantics
| Value | Meaning | /loop behavior |
|---|---|---|
advance |
Action completed, governance still has work | Continue triggering the next time |
done |
After Step 6 re-runs plan-next, "what to do now" is empty;it is forbidden to output this value based on the model's own inference | Stop the loop |
blocked |
"Now Doable" all cards trigger the human gate or are "Pending Execution" (no executable items remain even after attempting to skip each one) | Stop the loop and wait for user intervention |
stalled |
The same routing card shows no progress for 2 consecutive times | Stop the loop and report the reason for the deadlock |
error |
Sub-skill execution fails and there is no recovery path | Stop the loop and report the error |
Limitation
Hard Boundaries
Rule 1: each invocation MUST NOT execute more than 1 action
- Verification: in IterationStepReport the
调用技能field has only 1 entry - Consequence: REJECT (violates the single-step semantics of the three-layer model)
Rule 2: strategic creative skills MUST trigger the human gate and MUST NOT be executed directly
- Verification: when the recommended skill is define-mission, etc., that card is added to the session skip-list and the next one is attempted; if all cards are skipped, the report shows
blockedand lists all blocking items - Consequence: REJECT (strategic decisions should not be automated)
Rule 3: each invocation MUST output a valid continuation_signal
- Verification: IterationStepReport contains the
继续信号field and its value is within the five-value enum - Consequence: REJECT (/loop depends on this signal to decide whether to continue)
Rule 4:done signal MUST come from the step 6 plan-next rerun result and MUST NOT come from the model's own inference
- Verification: the IterationStepReport notes do not contain self-assessment language such as "the governance layer is fully ready" or "all currently executable ... have been created";
doneis output only after step 6 confirms that "Now Doable" is empty - Consequence: REJECT (the model replaces plan-next in making the routing decision, violating the responsibility boundary of the three-layer model)
Rule 5:done MUST satisfy all three simultaneously: "the plan-next output contains the statement that the L1 acceptance KPI has been achieved" AND "Now Doable is empty" AND "there are no pending-execution cards"
- Verification: when IterationStepReport outputs
done, it cites the KPI status field in the plan-next governance context (e.g. "citation visibility 85% ≥ 80% (achieved)"); as long as the KPI is not achieved, or the data is missing, or there are "Pending Execution" cards, it must not outputdone - Consequence: REJECT (mistaking "strategic objective status=approved" for acceptance achievement, causing /loop to stop when it should not)
Rule 6: upon detecting cards labeled "Pending Execution", MUST add them to the skip-list and attempt the next one; MUST NOT attempt to execute or directly mark done; only when all cards are skipped, output blocked
- Verification: in IterationStepReport, selected_skill is not filled in for "Pending Execution" cards; if ultimately blocked, next_step contains the wording "governance ready, awaiting external execution" and lists all skipped items
- Consequence: REJECT
Rule 7: MUST enter plan mode to draft a plan and pass the self-review loop before execution; MUST NOT directly invoke the recommended skill
- Verification: IterationStepReport contains the
plan_reviewed_rounds(≥1) field, and the final round has no residual defects; deviation points from execution failure must not be used as a reason for "plan scope expansion" - Consequence: REJECT (skipping the plan phase makes single-step semantics and the scope red line uncontrollable, and downstream auditing difficult)
Rule 8: plan self-review MUST NOT exceed 3 rounds; if exceeded, output error and must not force execution with defects
- Verification:
plan_reviewed_rounds ≤ 3; if exceeded, thencontinuation_signal: errorand next_step contains the list of residual defects - Consequence: REJECT (unbounded self-review will fall into an infinite loop or rationalize defects)
Skill Boundaries
Do not do the following(handled by other skills):
- Governance diagnosis and routing →
plan-next - Loop scheduling →
/loop - Code fix loop →
orchestrate-repair-loop - Documentation health check → AgentFabric runtime + linter / CI tooling (per
rules/doc-health-criteria.md)
Anti-pattern
✅ Correct: single-step execution + post-verification + continue signal
1. plan-next → 2 条路由:capture-work-items(缓)、prioritize-backlog(缓)
2. 取最高优先级:capture-work-items
3. 人工闸门:非创意类 → 继续
4. 执行 /capture-work-items
5. 重跑 plan-next → capture-work-items 卡片消失
6. 报告 continuation_signal: advance
Why it is correct: single-step execution preserves the orthogonality of the three-layer model; post-verification confirms real progress; /loop naturally drives the next step.
❌ Wrong: execute two routes at once
1. plan-next → 2 条路由
2. orchestrate-governance-step 执行 capture-work-items AND prioritize-backlog
Problem analysis: violates single-step semantics; if the second one fails, it is hard to determine the rollback scope; breaks /loop's granularity control.
❌ Wrong: bypass the human gate
1. plan-next 路由:/design-strategic-goals
2. orchestrate-governance-step 直接执行,不暂停
Problem analysis: strategic goal content requires human judgment; automatic execution produces low-quality strategy documents, and the user is unaware.
❌ Wrong: one blocking item immediately stops the entire /loop
1. plan-next → 3 条路由:design-strategic-goals(重要)+ capture-work-items(缓)+ prioritize-backlog(缓)
2. orchestrate-governance-step 在第 1 条触发人工闸门后直接 blocked,停止 /loop
3. 后续两条非阻塞卡片本可自动推进,但被白白挂起
Problem analysis: violates the default skip constraint. /loop should advance all automatable items, aggregate blocking items, and then hand them to the user together. Correct approach: add that card to the session skip-list, return to step 2 to try the next one; only when all cards are skipped should blocked。
❌ Wrong: skip plan mode and directly call the recommended skill
1. 步骤 2 找到 capture-work-items 卡片
2. 直接调用 /capture-work-items …
3. 技能顺手"补全"了 3 个看起来相关的字段,超出卡片范围
Problem analysis: violates Rule 7. Without a plan stage to write down the "focus point / scope red lines / rollback points," sub-skills can easily expand in scope during invocation; downstream auditing cannot locate "why X was changed." Correct approach: first EnterPlanMode to draft the plan, pass self-review, then ExitPlanMode to execute.
❌ Wrong: force execution of a plan with defects after 5 rounds of self-review
1. 起草计划 → 自审 1:聚焦点无溯源 → 修订
2. 自审 2:范围红线缺失 → 修订
3. 自审 3:仍未补齐回滚要点
4. 模型判断"剩下的是小问题",强行执行
Problem analysis: violates Rule 8. The self-review limit of 3 rounds is a hard constraint; exceeding it means the plan drafting itself has structural problems (unclear card / mismatched recommended skill), and an error should be output back to the human, rather than rationalizing "self-review failure" as a "minor issue."
❌ Wrong: skip post-execution verification and directly report advance
1. 执行 /capture-work-items 完成
2. 直接报告 continuation_signal: advance
3. 实际上文件未成功写入
Problem analysis: lack of post-verification leads to a false advance; the next plan-next still gives the same route, triggering stalled.
❌ Wrong: decide on one's own that "governance is complete" instead of rerunning plan-next in step 6
1. 执行子技能成功
2. 模型推断"当前可执行的治理文档均已创建,其余依赖开发者执行层"
3. 直接输出 continuation_signal: done,未重跑 plan-next
Problem analysis: the model has seized the judgment authority for "governance layer vs developer execution layer"—this is plan-next's responsibility, not orchestrate-governance-step's. Blocked nodes (such as T48/T52 depending on T47/T49) should be routed by plan-next and trigger the blocked signal, rather than the model declaring "governance complete" on its own.done There is only one legitimate source: after rerunning plan-next in step 6, "what should be done now" is empty.
❌ Wrong: treat 战略目标 status=approved as acceptance already achieved → output done
1. plan-next: G1 status=approved,验收 KPI「引用可见率」无监控数据
2. orchestrate-governance-step 取空"现在该做"(plan-next 实际应返回路由,但此例假定 plan-next 也漏判)
3. 输出 done,/loop 停止
4. 实际上 G1 远未达成;下次唤醒检查时陷入 stalled 死循环
Problem analysis: violates Rule 5—you must first confirm that the plan-next output contains the L1 acceptance KPI status field and that the KPI has been achieved; otherwise, even if "what should be done now" is empty, done should not be output.approved only represents decision approval; when acceptance has not been achieved, advancement should continue, and the output should be blocked (waiting for execution + waiting for KPI data).
❌ Wrong: infer done from the middle-layer (M5/task) status
1. plan-next 报:M5 任务全部 pending、设计 ADR 完备、需求文件完备
2. 模型推断"治理层无缺口" → 输出 done
3. 未回到战略目标 G1 验收检查
Problem analysis: Scanning from the middle layer loses the causal chain of "why this task is important." The decision starting point of orchestrate-governance-step must be "whether the L1 acceptance KPI is achieved," not "whether the middle-layer document is complete." This is consistent with the goal-tree traversal direction of plan-next—the root node is the acceptance criteria of the strategic goal.
❌ Error: In cron mode, continuously outputting done without alerting the user
1. /loop 1m /orchestrate-governance-step 注册 cron
2. 首次 plan-next 返回空 → 输出 done(错误)
3. cron 不读信号,继续每分钟触发,陷入 done 空转
4. 用户不知 cron 在空转
Problem analysis: Violates the constraint in the section "Interaction mode with /loop." In cron mode, signals are ignored; the skill must proactively alert the user to switch to dynamic /loop or suggest CronDelete.
Example
Example 1: Happy path—requirement registration succeeds
Scenario: plan-next routes a new backlog item registration; first invocation; sub-skill succeeds.
Execution process:
- Internal invocation of plan-next → Topic: "Register the 3 newly added backlog items in M5 phase", recommended skill:
/capture-work-items, priority: low - Stuck detection: first invocation, no historical fingerprint → continue
- Manual gate:
capture-work-itemsnon-creative type → pass - Enter plan mode to draft a plan:
- Goal: register the 3 backlog items in M5 phase (refer to the card topic)
- Sub-skill command:
/capture-work-items 把 M5 新发现的 3 项需求登记到 backlog - Focus tracing: card description "M5 inspection found 3 requirements scattered in discussions"
- Expected output:
backlog/3 new markdown files in the directory, including frontmatter - Scope red line: MUST NOT modify existing backlog items; MUST NOT touch
roadmap/、requirements/ - Rollback point: newly created files can be
git clean -f backlog/<new-files>
- Self-review loop: Round 1, all 6 checklist items pass →
plan_reviewed_rounds = 1, exit plan mode - Execute
/capture-work-items 把 M5 新发现的 3 项需求登记到 backlog - Post-execution verification: rerun plan-next → the card disappears, "what should be done now" still has 1 item → advance
IterationStepReport:
## 这次自动推进做了什么
- **做了什么**:把 M5 新发现的 3 项需求登记到 backlog
- **为什么要修**:M5 巡检发现 3 项需求散落在讨论中,未结构化登记
- **改了什么**:
- 修改前:backlog/ 目录下无对应条目
- 修改后:新增 3 个 backlog 条目文件,含 frontmatter 与摘要
- **结果**:成功 ✅
- **下一步**:继续自动推进(还有 1 条待处理项)
- _(内部)继续信号:advance;plan_reviewed_rounds: 1_
Example 2: Manual gate skipped → hits the next non-creative card
Scenario: plan-next routes two items:design-strategic-goals(important, strategic creative type) + capture-work-items(low, registration type).
Execution process:
- Internal invocation of plan-next → two routes
- Stuck detection: first invocation → continue
- Step 2: take the highest priority:
design-strategic-goals - Step 4 manual gate: belongs to strategic creative type → add to skip-list, return to Step 2
- Step 2: take the next item:
capture-work-itemsnot in skip-list - Step 4 manual gate: non-creative type → pass
- Step 5.1 Enter plan mode to draft a plan (same six-part structure as Example 1, omitted here)
- Step 5.2 self-review: 1 round passes →
plan_reviewed_rounds = 1 - Step 5.3 exit plan mode, execute
/capture-work-items … - Step 6 rerun plan-next:
capture-work-itemscard disappears →advance
IterationStepReport:
## 这次自动推进做了什么
- **做了什么**:登记 M5 阶段新增的 3 项 backlog 条目
- **为什么要修**:战略目标卡片需要人工判断,已跳过;同批次另有可自动执行卡片
- **结果**:成功 ✅
- **下一步**:继续自动推进(被跳过待人工:1 条 — `design-strategic-goals`)
- _(内部)继续信号:advance;plan_reviewed_rounds: 1;本次跳过:[design-strategic-goals]_
Example 2b: All routes are skipped → blocked
Scenario: plan-next routes two items, both strategic creative type or "pending execution".
Execution process:
- plan-next →
define-mission(important) + one待执行card - Step 2: take
define-mission→ Step 4 add to skip-list → return to Step 2 - Step 2: Take the "To Do" card → Step 4: Add to skip-list → Return to Step 2
- All "Do Now" items are already in the skip-list → Output
blocked
IterationStepReport:
## 这次自动推进做了什么
- **做了什么**:扫描了 2 条路由,全部需人工介入
- **为什么要修**:当前「现在该做」均为创意类或待外部执行,无可自动化项
- **结果**:需要你来决定 ⚠️
- **下一步**:需要你决定:
1. `define-mission`:战略类技能,需人工判断,建议手动运行
2. 「待执行」卡片:治理就绪,等外部开发执行
- _(内部)继续信号:blocked_
Example 3 (edge case): Stalled detection — sub-skill did not advance
Scenario: Last time /capture-work-items after execution, the requirements document was not successfully written; this time plan-next routes out the same card.
Execution process:
- Internal call to plan-next → fingerprint = "Analyze roadmap node N1's requirements||Strategic goal 'Goal A' → Roadmap 'N1' current: requirements layer"
- Stalled detection: same as last fingerprint → Trigger stalled
IterationStepReport:
## 这次自动推进做了什么
- **做了什么**:尝试分析路线图 N1 的需求,但检测到连续 2 次未推进
- **为什么要修**:requirements/N1-requirements.md 在上次 `/capture-work-items` 后未成功写入
- **结果**:出错了 ❌
- **下一步**:卡住了:同一任务连续 2 次无进展,可能原因:需求文件未写入、路径配置错误、或技能执行有误。建议手动运行 `/capture-work-items` 并检查输出文件是否存在,解决后重新运行 /orchestrate-governance-step
- _(内部)继续信号:stalled_
AI reconstruction instructions
Problem 1: Multiple routes were executed
- Identification sign: IterationStepReport contains multiple
调用技能entries - Correction steps:
- Identify the multiple routes that were executed
- Keep only the 1 with the highest priority (
紧急>重要>缓) - Re-output IterationStepReport, reporting only 1 action
Problem 2: Missing continuation_signal
- Identification sign: IterationStepReport is missing the internal continuation signal field, or the value is not within the five-value enum
- Correction steps:
- Check the execution result and fill it in according to the following logic:
- Sub-skill succeeded + routes still remain →
advance - Sub-skill succeeded + no routes remain →
done - Manual gate triggered →
blocked - Fingerprint repeated →
stalled - Sub-skill failed →
error
- Sub-skill succeeded + routes still remain →
- In the
下一步field, explain the reason
- Check the execution result and fill it in according to the following logic:
Problem 3: Reporting advance after skipping post-execution verification
- Identification sign: The report shows
advancebut plan-next was not rerun to confirm - Correction steps:
- Rerun
/plan-next, and check whether the target card has disappeared - If it has disappeared → Confirm
advanceis correct - If it still exists → Update the stalled count; if it appears for the 2nd time → Correct it to
stalled
- Rerun
Problem 4: Judging completion status on your own and skipping Step 6
- Identification sign:
下一步: The field contains self-assessment language such as "the governance layer is fully ready," "all currently executable ... have been created," "belongs to the developer execution layer," and there is no record of rerunning plan-next in Step 6 - Correction steps:
- Rerun
/plan-next - If "Do Now" is empty →
doneis correct, and the report does not need modification - If "Do Now" contains only blocked items → Correct it to internal continuation signal
blocked,下一步Explain the blocking reason - If "Do Now" still has executable items → Correct it to internal continuation signal
advance, and continue to the next step
- Rerun
Appendix: Output contract
YAML schema(formal)
type: object
# execution_trace 仅当 continuation_signal ∈ {advance, done} 时必填;
# blocked / stalled / error 路径未执行子技能,不要求该字段。
required:
- report_title
- action_taken
- result
- next_step
- continuation_signal
properties:
report_title:
type: string
const: "这次自动推进做了什么"
action_taken:
type: string
minLength: 1
description: 用文件名或功能名描述本次唯一执行动作
why_fix:
type: string
minLength: 1
description: 可选;首次创建文件可省略
changes:
type: object
required: [before, after]
properties:
before:
type: string
after:
type: string
result:
type: string
enum: ["成功 ✅", "需要你来决定 ⚠️", "出错了 ❌"]
next_step:
type: string
minLength: 1
continuation_signal:
type: string
enum: [advance, done, blocked, stalled, error]
execution_trace:
type: object
required: [selected_skill, plan_reviewed_rounds, post_check_plan_next_rerun]
properties:
selected_skill:
type: string
pattern: "^/[a-z0-9-]+"
plan_reviewed_rounds:
type: integer
minimum: 1
maximum: 3
post_check_plan_next_rerun:
type: boolean
const: true
additionalProperties: false
JSON schema(formal)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "IterationStepReport",
"type": "object",
"required": [
"report_title",
"action_taken",
"result",
"next_step",
"continuation_signal"
],
"allOf": [
{
"if": {
"properties": {
"continuation_signal": { "enum": ["advance", "done"] }
},
"required": ["continuation_signal"]
},
"then": { "required": ["execution_trace"] }
}
],
"properties": {
"report_title": {
"type": "string",
"const": "这次自动推进做了什么"
},
"action_taken": {
"type": "string",
"minLength": 1
},
"why_fix": {
"type": "string",
"minLength": 1
},
"changes": {
"type": "object",
"required": ["before", "after"],
"properties": {
"before": { "type": "string" },
"after": { "type": "string" }
},
"additionalProperties": false
},
"result": {
"type": "string",
"enum": ["成功 ✅", "需要你来决定 ⚠️", "出错了 ❌"]
},
"next_step": {
"type": "string",
"minLength": 1
},
"continuation_signal": {
"type": "string",
"enum": ["advance", "done", "blocked", "stalled", "error"]
},
"execution_trace": {
"type": "object",
"required": ["selected_skill", "plan_reviewed_rounds", "post_check_plan_next_rerun"],
"properties": {
"selected_skill": {
"type": "string",
"pattern": "^/[a-z0-9-]+"
},
"plan_reviewed_rounds": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "计划自审轮数;最后一轮 0 缺陷才允许执行"
},
"post_check_plan_next_rerun": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
Self-check
Required section completeness
- All 11 required sections are present (Purpose / Core objective / Scope boundaries / Usage scenarios / Behavior / Inputs and outputs / Limitations / Anti-patterns / Examples / AI reconstruction instructions / Self-check)
- The Semantic Role positioning block is present, explaining the difference from plan-next / loop / orchestrate-repair-loop
Core success criterion
- Each call executes exactly 1 action
- Stuck detection: session-internal fingerprint repeated twice triggers stalled
- Pre-execution plan: enter plan mode to draft a plan, self-review loop ≤ 3 rounds and only allowed to execute when the final round has 0 defects
- Post-execution verification: rerun plan-next to confirm the target card disappears
- Did step 6 actually run the rerun of plan-next? (Does not accept "inferring governance completion on one's own" as a substitute; no self-assessment language appears in the notes)
- Human gate: strategic/creative-type skills and "to be executed" cards are added to the skip-list by default and the next one is attempted; only when all "should do now" items are skipped is blocked output
- Each output is a valid continuation_signal (advance / done / blocked / stalled / error)
- The "governance context" output by plan-next contains the current status of L1 acceptance KPIs? If not, plan-next is deemed non-compliant, output error and prompt escalation
-
doneSignal simultaneously satisfies three conditions: plan-next output "should do now" is empty + KPI achieved + no "to be executed" cards - In cron mode (fixed-interval), the first report includes a recommendation to switch to dynamic /loop
-
stalledOn the 2nd consecutive occurrence, includes a prompt to "CronDelete immediately"
Quality gate check
- Hard Boundaries use MUST / MUST NOT and include verification methods
- Anti-Patterns ≥ 2 contrasting examples (actually 4)
- Examples ≥ 2, of which ≥ 1 is a boundary scenario (Example 3 covers stuck detection)
- AI refactoring instructions cover ≥ 2 error modes (actually 3)
Acceptance test
After execution is complete, does IterationStepReport clearly state what was executed, what the result was, and whether the next step is to continue or requires human intervention? If not → rewrite IterationStepReport.