Skill Tracer
Skills › Compound Engineering › ce-plan › plan-handoff.md

plan-handoff.md

118 lines · skills/ce-plan/references/plan-handoff.md at 3449230

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Plan Handoff
2
3This file contains post-plan-writing instructions for the Durable path: document review, post-generation options, and issue creation. Load it after the plan file has been written and the confidence check (5.3.1-5.3.7) is complete. Direct and Chat brief results never reach it.
4

Plan Handoff

This file contains post-plan-writing instructions for the Durable path: document review, post-generation options, and issue creation. Load it after the plan file has been written and the confidence check (5.3.1-5.3.7) is complete. Direct and Chat brief results never reach it.

Raw lines 1 to 4
5## 5.3.8 Document Review
6
7Invoke the `ce-doc-review` skill with arguments `mode:non-interactive <plan-path>` using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; those are delegation mechanisms, not skill invocation. This phase runs for both markdown and HTML; `ce-doc-review` applies fixes in the artifact's native format. It is mandatory — do not skip it because the confidence check already ran. The two workflows catch different classes of issues.
8
9While authoring or revising a draft within the user's planning request, carry that permission to edit into the review: "Apply corrections to this draft's implementation and verification sections needed to satisfy its established Product Contract. Preserve that contract, existing constraints, and user-reserved or session-settled decisions." Supply the document path and the actual contract; the skill name or non-interactive mode alone does not grant permission. If the request does not authorize revising the document, grant no permission to edit. `ce-doc-review` decides whether a fix is applied and enforces its restriction on fixes that only another model found; do not apply a returned proposal merely to bypass that restriction.
11`ce-doc-review` writes its structured result to a file and prints the path on a `Full result:` line; read that file before acting on the review. If it printed the result inline instead, use that.
13If `ce-doc-review` cannot be invoked, record a stand-in structured review result (the shape `ce-doc-review` would normally return) with these values and proceed to Final Checks:
14- `fixes_applied = 0`
15- `proposed_fixes_count = 0`, `decisions_count = 0`, `fyi_count = 0`
16- `skipped_reason: skill_unreachable`
17- `skipped_detail: <why the host's normal skill-invocation mechanism could not start ce-doc-review>`
19The review never started: say that `ce-doc-review` did not run. Report a review error or timeout only after the `ce-doc-review` workflow actually begins.
21Non-interactive is the default at this phase because most users want to start work after planning, not adjudicate every reviewer concern up front. Non-interactive returns structured findings without blocking prompts. Its applied list includes corrections covered by the permission to edit you supplied; proposals still needing approval and unresolved user decisions remain separate. The post-generation menu (see 5.4) offers `Decide on the review's open items` as a first-class option so users can opt into the full interactive walkthrough when they want it.
23The confidence check and ce-doc-review are complementary:
24- The confidence check strengthens rationale, sequencing, risk treatment, and grounding
25- Document-review checks coherence, feasibility, scope alignment, and surfaces role-specific issues
27**Take responsibility for the completed plan.** Before applying or presenting review results, save a resolved review alongside the original evidence. Each claim has a disposition and its reason. A retained claim needs project evidence of a practical consequence if the plan stays unchanged, plus an explanation of why the existing plan and settled decisions do not already address it. A retained claim that would add a mechanism must also pass `references/structure.md` 3.8; one that fails it goes to the considered-and-not-built list instead. Review can also claim that a committed mechanism fails 3.8, or that something on the considered-and-not-built list passes it. Retain such a claim when its reasoning holds under 3.8, and make the removal or restoration yourself, since the review does not apply those changes. A reviewer label, recommendation, or request for more detail does not satisfy that condition. Dismiss claims that do not meet it, including advisory observations.
29Your result is a plan the user can act on, with only worthwhile unresolved choices. Investigate factual uncertainty and choose technical corrections within the planning request. Leave an already adequate plan unchanged. A user decision remains only when progress requires essential information you cannot obtain or a consequential choice that the request and constraints do not settle. Record what remains for the user to decide and why you cannot settle it from that context.
31For a retained correction, invoke `ce-doc-review` with the resolved review, evidence, and the existing permission to edit. It applies the correction and reuses completed review results. Do not apply returned proposals yourself or treat your agreement as permission to bypass its application restrictions.
33Save actual edits and the reviewed document's identity with the resolved review. Only its remaining findings supply the handoff and menu counts; original counts stay in the saved evidence. Dismissed and completed items must not reappear as FYIs or deferred questions. The review records the items it leaves open under the plan's `Deferred / Open Questions` section; when you dismiss or complete one of them, remove its entry, then remove the review subsection and the section once they are empty. Proceed to Final Checks when the resolved review and any authorized corrections are complete.
35**Pipeline mode:** Invoke `ce-doc-review` with `mode:non-interactive` and the plan path — non-interactive mode is identical to the interactive default at this phase, except that the items it leaves open are recorded in the plan's `Deferred / Open Questions` section. No further routing is offered in pipeline mode; the caller decides what to do with the returned findings. Address any P0/P1 findings before returning control to the caller. If the review could not start and ce-plan recorded the `skill_unreachable` stand-in result, return that result explicitly so the caller does not treat review as complete.

5.3.8 Document Review

Invoke the ce-doc-review skill with arguments mode:non-interactive <plan-path> using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; those are delegation mechanisms, not skill invocation. This phase runs for both markdown and HTML; ce-doc-review applies fixes in the artifact's native format. It is mandatory — do not skip it because the confidence check already ran. The two workflows catch different classes of issues.

While authoring or revising a draft within the user's planning request, carry that permission to edit into the review: "Apply corrections to this draft's implementation and verification sections needed to satisfy its established Product Contract. Preserve that contract, existing constraints, and user-reserved or session-settled decisions." Supply the document path and the actual contract; the skill name or non-interactive mode alone does not grant permission. If the request does not authorize revising the document, grant no permission to edit. ce-doc-review decides whether a fix is applied and enforces its restriction on fixes that only another model found; do not apply a returned proposal merely to bypass that restriction.

ce-doc-review writes its structured result to a file and prints the path on a Full result: line; read that file before acting on the review. If it printed the result inline instead, use that.

If ce-doc-review cannot be invoked, record a stand-in structured review result (the shape ce-doc-review would normally return) with these values and proceed to Final Checks:

  • fixes_applied = 0
  • proposed_fixes_count = 0, decisions_count = 0, fyi_count = 0
  • skipped_reason: skill_unreachable
  • skipped_detail: <why the host's normal skill-invocation mechanism could not start ce-doc-review>

The review never started: say that ce-doc-review did not run. Report a review error or timeout only after the ce-doc-review workflow actually begins.

Non-interactive is the default at this phase because most users want to start work after planning, not adjudicate every reviewer concern up front. Non-interactive returns structured findings without blocking prompts. Its applied list includes corrections covered by the permission to edit you supplied; proposals still needing approval and unresolved user decisions remain separate. The post-generation menu (see 5.4) offers Decide on the review's open items as a first-class option so users can opt into the full interactive walkthrough when they want it.

The confidence check and ce-doc-review are complementary:

  • The confidence check strengthens rationale, sequencing, risk treatment, and grounding
  • Document-review checks coherence, feasibility, scope alignment, and surfaces role-specific issues

Take responsibility for the completed plan. Before applying or presenting review results, save a resolved review alongside the original evidence. Each claim has a disposition and its reason. A retained claim needs project evidence of a practical consequence if the plan stays unchanged, plus an explanation of why the existing plan and settled decisions do not already address it. A retained claim that would add a mechanism must also pass references/structure.md 3.8; one that fails it goes to the considered-and-not-built list instead. Review can also claim that a committed mechanism fails 3.8, or that something on the considered-and-not-built list passes it. Retain such a claim when its reasoning holds under 3.8, and make the removal or restoration yourself, since the review does not apply those changes. A reviewer label, recommendation, or request for more detail does not satisfy that condition. Dismiss claims that do not meet it, including advisory observations.

Your result is a plan the user can act on, with only worthwhile unresolved choices. Investigate factual uncertainty and choose technical corrections within the planning request. Leave an already adequate plan unchanged. A user decision remains only when progress requires essential information you cannot obtain or a consequential choice that the request and constraints do not settle. Record what remains for the user to decide and why you cannot settle it from that context.

For a retained correction, invoke ce-doc-review with the resolved review, evidence, and the existing permission to edit. It applies the correction and reuses completed review results. Do not apply returned proposals yourself or treat your agreement as permission to bypass its application restrictions.

Save actual edits and the reviewed document's identity with the resolved review. Only its remaining findings supply the handoff and menu counts; original counts stay in the saved evidence. Dismissed and completed items must not reappear as FYIs or deferred questions. The review records the items it leaves open under the plan's Deferred / Open Questions section; when you dismiss or complete one of them, remove its entry, then remove the review subsection and the section once they are empty. Proceed to Final Checks when the resolved review and any authorized corrections are complete.

Pipeline mode: Invoke ce-doc-review with mode:non-interactive and the plan path — non-interactive mode is identical to the interactive default at this phase, except that the items it leaves open are recorded in the plan's Deferred / Open Questions section. No further routing is offered in pipeline mode; the caller decides what to do with the returned findings. Address any P0/P1 findings before returning control to the caller. If the review could not start and ce-plan recorded the skill_unreachable stand-in result, return that result explicitly so the caller does not treat review as complete.

Raw lines 5 to 36
Names a skill ce-doc-review :7
Starts an agent subagent :7
37## 5.3.9 Final Checks and Cleanup
39Before proceeding to post-generation options:
40- Confirm the plan is stronger in specific ways, not merely longer
41- Confirm the planning boundary is intact
42- Confirm origin decisions were preserved when an origin document exists
44If artifact-backed mode was used:
45- Clean up the temporary scratch directory after the plan is safely updated
46- If cleanup is not practical on the current platform, note where the artifacts were left
48**Format-specific composition.** When `OUTPUT_FORMAT=html` (resolved in SKILL.md Phase 0.0), the plan is written as a single self-contained `.html` file — there is no markdown sibling. Read `references/html-rendering.md` for composition rules: invariants, agent-consumability rules, readability, styling, and the post-compose audit. The `.html` file is the artifact downstream consumers (`ce-doc-review`, `ce-work`, human readers) read and update directly.
50When `OUTPUT_FORMAT=md`, write the markdown directly per `references/markdown-rendering.md`. No HTML is composed.
52After all mutations in this run have settled (initial write, deepening synthesis, and `ce-doc-review` fixes in the artifact's native format), the artifact at its single path reflects the final state.

5.3.9 Final Checks and Cleanup

Before proceeding to post-generation options:

  • Confirm the plan is stronger in specific ways, not merely longer
  • Confirm the planning boundary is intact
  • Confirm origin decisions were preserved when an origin document exists

If artifact-backed mode was used:

  • Clean up the temporary scratch directory after the plan is safely updated
  • If cleanup is not practical on the current platform, note where the artifacts were left

Format-specific composition. When OUTPUT_FORMAT=html (resolved in SKILL.md Phase 0.0), the plan is written as a single self-contained .html file — there is no markdown sibling. Read references/html-rendering.md for composition rules: invariants, agent-consumability rules, readability, styling, and the post-compose audit. The .html file is the artifact downstream consumers (ce-doc-review, ce-work, human readers) read and update directly.

When OUTPUT_FORMAT=md, write the markdown directly per references/markdown-rendering.md. No HTML is composed.

After all mutations in this run have settled (initial write, deepening synthesis, and ce-doc-review fixes in the artifact's native format), the artifact at its single path reflects the final state.

Raw lines 37 to 53
Names a skill ce-doc-review :48
Names a skill ce-work :48
54## 5.4 Post-Generation Options
56**Already-authorized next action:** If the request already authorizes what happens after the plan (implement, create an issue, stop), fire that action. Do not present the menu to re-ask. Pipeline mode still returns to the caller.
58**Execution handoff:** After review and any corrections, assess the final plan against its implementation contract and repository evidence. Do not offer execution while a material prerequisite is unverified or a launch-blocking question or finding remains. Name the blocker in the plan and handoff; in pipeline mode return `status: blocked` with the artifact path, blocker, and recovery path. A skipped review is not a pass; establish the needed evidence within the planning request or report the gap. Deferred details and explicitly planned new files do not prevent handoff.
60**Pipeline mode:** No interactive menu. The result below is the last thing this skill writes. It ends this skill, not the turn. The caller runs in this same session, and its next step follows the result. If document review started but did not complete, return the skill's `status: blocked` result with `phase`, `blocker`, `recovery_path`, and the preserved `artifact_path`. Otherwise return the artifact path and the resolved review state: its counts, one line for each item still open after your judgment, and the `Full result:` path when `ce-doc-review` printed one. Do not paste the review's result block; the caller reads the file if it needs more. When the review never started, return the `skill_unreachable` stand-in.
62**Path format:** Use absolute paths for chat-output file references — relative paths are not auto-linked as clickable in most terminals.
64**Summary line above the menu (always):** Print a single concise line summarizing the resolved review state — e.g., `Doc review applied 3 fixes. 2 decisions, 1 proposed fix, 4 FYI observations remain (1 at P1).` When no fixes were applied and no findings remain, print `Doc review clean — no fixes needed.` When the structured review result carries `skipped_reason: skill_unreachable`, print `Doc review skipped — ce-doc-review could not be invoked (<skipped_detail>); it did not run.` If a review that actually began failed, print `Doc review failed after starting — <actual error>; the plan was not fully reviewed.` This line establishes what the autofix pass did (or didn't) so the user has the context to choose between the menu options below. Never describe a harness or delegation failure that kept the review from starting as a downstream skill timeout.
66**Render only the findings that still need the reader.** Preserve the decision-first structure (Recommendation / Consequence if unchanged / Change / Basis) for retained actionable findings. Do not re-narrate them into dense paragraphs or unexplained identifiers. Explain any changed disposition in the saved review evidence; do not copy dismissed findings into the handoff. The summary reports changes actually made and items still unresolved after your judgment.
68**Question:** "Plan ready at `<absolute path to plan>`. What would you like to do next?"
70**Options:**
711. **Start `ce-work`** - Build and ship the plan in this session, with verification, simplification, code review, and commits. Show only when the plan contents support implementation and no launch-blocking question or finding remains; universal-planning, answer-seeking, approach-plan, and requirements-only artifacts keep their own handoff/checkpoint behavior.
73**Recommended marker:** render option 1 as **Start `ce-work`** *(recommended)*. No other option carries the marker.
742. **Decide on the review's open items** - Confirm or skip the suggested edits, and settle the judgment calls the auto-pass left for you. (Authorized corrections were already applied; you can also defer items into Open Questions.) Hide this option when **Prototype a remaining feel-question** is shown.
752. **Prototype a remaining feel-question** - Invoke `ce-prototype` on a named remaining question that is expensive to unravel and that neither talk nor a cheap sketch can settle. A question turning on finish or motion is already past the sketch tier; a cheap-to-reverse decision does not qualify however visual it is. Shown only when such a question remains. A visual-probe question that already settled fails this predicate. The option description names the proposed slice. When this option is shown, omit **Decide on the review's open items** from the same menu.
763. **Create Issue** - Create a tracked issue from this plan in your configured issue tracker (e.g., GitHub Issues, Linear, Jira)
774. **Open in browser** - Open the HTML plan file locally for review. **Render only when `OUTPUT_FORMAT=html`**, unless `references/publishing.md` chooses a publisher (one the user named, or the host's artifact tool); then label this option with that destination, e.g. **Publish a copy to <destination>**, render it for any format the destination accepts, and publish a copy there instead of opening the file locally.
79There is no "done" / "pause" option — the blocking question already waits, and the user ends the turn by dismissing it (Esc) or just not picking anything. The plan file is already saved.
81**Open or publish option.** Only one output format is ever in effect, so the plan exists as exactly one artifact — `.md` or `.html`, never both. Render **Open in browser** only for HTML runs; a publisher chosen by `references/publishing.md` replaces that label. Implementation handoff (option 1) remains available in both modes only when the artifact is implementation-ready code; `ce-work` reads either format.
83**Menu rendering:** The menu has up to 4 options (option 1 renders only for implementation-ready code; option 2 is the exclusive review-or-prototype slot — see below; Open in browser is HTML-only unless a publisher replaces it). Account for each platform's blocking-question option cap rather than trimming choices: Claude Code `AskUserQuestion` supports up to 4 explicit options, and Codex `request_user_input` supports only 2-3 explicit options. When the visible menu exceeds the current platform's cap, render it as a numbered list in chat with the hint "Pick a number or describe what you want." When the visible menu fits the cap, use the platform's blocking tool and renumber the visible options 1-N. When no matching tool is in the current list or a real question call errors, fall back to the same numbered-list-in-chat rendering. Never silently skip the question.
85**Show `Decide on the review's open items` (option 2) only when the resolved review state has `proposed_fixes_count + decisions_count > 0` and no `skipped_reason: skill_unreachable`.** FYIs alone do not offer a decision to make. Keep their retained count in the summary even when this option is hidden. Renumber the visible menu options after applying this condition. `ce-doc-review` defines how a selected review resumes and returns.
87**Cross-skill invocation rule:** Invoke `ce-work`, `ce-doc-review`, and `ce-prototype` using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; the invoked skill may still dispatch its own subagents according to its protocol.
89Before acting on any selection received after a user turn, reload this file. Then act on the selection; rendering the menu or announcing the route is not the routed action:
90- **Start `ce-work`** -> Classify the artifact first. If the plan contents do not support code implementation or a launch blocker remains, do not execute it; route requirements-only artifacts back to `ce-plan` enrichment and non-code artifacts to their own workflow. If it is executable, invoke the `ce-work` skill under the cross-skill invocation rule, passing the plan path as the skill argument; `ce-work` then chooses how to execute and carries the implementation through verification and shipping. If `ce-work` cannot be invoked, print the existing `ce-work` fallback prompt for the user to run; in that prompt, tell the executor to read Goal Capsule, Verification Contract, Definition of Done, and active U-IDs (scanning headings to find them) rather than the whole document first. Do not merely tell the user to type an invocation when the host can invoke it directly.
91- **Decide on the review's open items** -> Invoke the `ce-doc-review` skill again under the cross-skill invocation rule, passing the plan path **without** `mode:non-interactive` so the interactive routing question and walkthrough run. The non-interactive pass already applied `safe_auto` fixes and recorded its findings in the session, so the interactive pass reuses that prior `safe_auto` / R29 decision state (its R29 suppression rule prevents prior-round Skipped/Deferred entries from re-raising) — "picks up where non-interactive stopped" means that state reuse, **not** skipping Phase 4 presentation or jumping straight to routing with a count. `ce-doc-review`'s walkthrough enforces the same-turn presentation-before-routing rule on this re-entry; a structured review result shown in an earlier turn beside this menu does not satisfy it. If the skill cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu with the refreshed counts so the user can pick what to do next.
92- **Create Issue** -> Follow the Issue Creation section below through an available connector, MCP, API, or documented CLI; no `linear` CLI is guaranteed, and one missing binary is not proof that the tracker is unavailable.
93- **Prototype a remaining feel-question** -> Invoke the `ce-prototype` skill under the cross-skill invocation rule, passing the plan path as the skill argument. Do not build a prototype in this skill. If it cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu from the artifact's current contents — a plan it wrote back to needs implementation planning again, so the execution options drop out on their own; when it returned decisions instead of writing them, say so, since the plan still describes the pre-prototype behavior.
94- **Open in browser** or **Publish a copy** -> Read `references/publishing.md` and follow it for the saved plan file; the plan file stays the record. Show the user the resulting URL or absolute path, then return to the post-generation options so the user can pick a follow-up action.
95- **Free-form prompts that target the findings** (e.g., the user types "review", "walk through", "deep review" instead of picking a numbered option) -> route as if they had picked `Decide on the review's open items`. Do not loop back to the menu without running the review. When the structured review result carries `skipped_reason: skill_unreachable`, say that `ce-doc-review` could not be invoked and loop back without misreporting a review failure.
96- **Other free-form input** -> Accept revisions to the plan and loop back to options.

5.4 Post-Generation Options

Already-authorized next action: If the request already authorizes what happens after the plan (implement, create an issue, stop), fire that action. Do not present the menu to re-ask. Pipeline mode still returns to the caller.

Execution handoff: After review and any corrections, assess the final plan against its implementation contract and repository evidence. Do not offer execution while a material prerequisite is unverified or a launch-blocking question or finding remains. Name the blocker in the plan and handoff; in pipeline mode return status: blocked with the artifact path, blocker, and recovery path. A skipped review is not a pass; establish the needed evidence within the planning request or report the gap. Deferred details and explicitly planned new files do not prevent handoff.

Pipeline mode: No interactive menu. The result below is the last thing this skill writes. It ends this skill, not the turn. The caller runs in this same session, and its next step follows the result. If document review started but did not complete, return the skill's status: blocked result with phase, blocker, recovery_path, and the preserved artifact_path. Otherwise return the artifact path and the resolved review state: its counts, one line for each item still open after your judgment, and the Full result: path when ce-doc-review printed one. Do not paste the review's result block; the caller reads the file if it needs more. When the review never started, return the skill_unreachable stand-in.

Path format: Use absolute paths for chat-output file references — relative paths are not auto-linked as clickable in most terminals.

Summary line above the menu (always): Print a single concise line summarizing the resolved review state — e.g., Doc review applied 3 fixes. 2 decisions, 1 proposed fix, 4 FYI observations remain (1 at P1). When no fixes were applied and no findings remain, print Doc review clean — no fixes needed. When the structured review result carries skipped_reason: skill_unreachable, print Doc review skipped — ce-doc-review could not be invoked (<skipped_detail>); it did not run. If a review that actually began failed, print Doc review failed after starting — <actual error>; the plan was not fully reviewed. This line establishes what the autofix pass did (or didn't) so the user has the context to choose between the menu options below. Never describe a harness or delegation failure that kept the review from starting as a downstream skill timeout.

Render only the findings that still need the reader. Preserve the decision-first structure (Recommendation / Consequence if unchanged / Change / Basis) for retained actionable findings. Do not re-narrate them into dense paragraphs or unexplained identifiers. Explain any changed disposition in the saved review evidence; do not copy dismissed findings into the handoff. The summary reports changes actually made and items still unresolved after your judgment.

Question: "Plan ready at <absolute path to plan>. What would you like to do next?"

Options:

  1. **Start ce-work** - Build and ship the plan in this session, with verification, simplification, code review, and commits. Show only when the plan contents support implementation and no launch-blocking question or finding remains; universal-planning, answer-seeking, approach-plan, and requirements-only artifacts keep their own handoff/checkpoint behavior.

Recommended marker: render option 1 as **Start ce-work** (recommended). No other option carries the marker.

  1. Decide on the review's open items - Confirm or skip the suggested edits, and settle the judgment calls the auto-pass left for you. (Authorized corrections were already applied; you can also defer items into Open Questions.) Hide this option when Prototype a remaining feel-question is shown.
  2. Prototype a remaining feel-question - Invoke ce-prototype on a named remaining question that is expensive to unravel and that neither talk nor a cheap sketch can settle. A question turning on finish or motion is already past the sketch tier; a cheap-to-reverse decision does not qualify however visual it is. Shown only when such a question remains. A visual-probe question that already settled fails this predicate. The option description names the proposed slice. When this option is shown, omit Decide on the review's open items from the same menu.
  3. Create Issue - Create a tracked issue from this plan in your configured issue tracker (e.g., GitHub Issues, Linear, Jira)
  4. Open in browser - Open the HTML plan file locally for review. **Render only when OUTPUT_FORMAT=html**, unless references/publishing.md chooses a publisher (one the user named, or the host's artifact tool); then label this option with that destination, e.g. Publish a copy to <destination>, render it for any format the destination accepts, and publish a copy there instead of opening the file locally.

There is no "done" / "pause" option — the blocking question already waits, and the user ends the turn by dismissing it (Esc) or just not picking anything. The plan file is already saved.

Open or publish option. Only one output format is ever in effect, so the plan exists as exactly one artifact — .md or .html, never both. Render Open in browser only for HTML runs; a publisher chosen by references/publishing.md replaces that label. Implementation handoff (option 1) remains available in both modes only when the artifact is implementation-ready code; ce-work reads either format.

Menu rendering: The menu has up to 4 options (option 1 renders only for implementation-ready code; option 2 is the exclusive review-or-prototype slot — see below; Open in browser is HTML-only unless a publisher replaces it). Account for each platform's blocking-question option cap rather than trimming choices: Claude Code AskUserQuestion supports up to 4 explicit options, and Codex request_user_input supports only 2-3 explicit options. When the visible menu exceeds the current platform's cap, render it as a numbered list in chat with the hint "Pick a number or describe what you want." When the visible menu fits the cap, use the platform's blocking tool and renumber the visible options 1-N. When no matching tool is in the current list or a real question call errors, fall back to the same numbered-list-in-chat rendering. Never silently skip the question.

**Show Decide on the review's open items (option 2) only when the resolved review state has proposed_fixes_count + decisions_count > 0 and no skipped_reason: skill_unreachable.** FYIs alone do not offer a decision to make. Keep their retained count in the summary even when this option is hidden. Renumber the visible menu options after applying this condition. ce-doc-review defines how a selected review resumes and returns.

Cross-skill invocation rule: Invoke ce-work, ce-doc-review, and ce-prototype using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; the invoked skill may still dispatch its own subagents according to its protocol.

Before acting on any selection received after a user turn, reload this file. Then act on the selection; rendering the menu or announcing the route is not the routed action:

  • **Start ce-work** -> Classify the artifact first. If the plan contents do not support code implementation or a launch blocker remains, do not execute it; route requirements-only artifacts back to ce-plan enrichment and non-code artifacts to their own workflow. If it is executable, invoke the ce-work skill under the cross-skill invocation rule, passing the plan path as the skill argument; ce-work then chooses how to execute and carries the implementation through verification and shipping. If ce-work cannot be invoked, print the existing ce-work fallback prompt for the user to run; in that prompt, tell the executor to read Goal Capsule, Verification Contract, Definition of Done, and active U-IDs (scanning headings to find them) rather than the whole document first. Do not merely tell the user to type an invocation when the host can invoke it directly.
  • Decide on the review's open items -> Invoke the ce-doc-review skill again under the cross-skill invocation rule, passing the plan path without mode:non-interactive so the interactive routing question and walkthrough run. The non-interactive pass already applied safe_auto fixes and recorded its findings in the session, so the interactive pass reuses that prior safe_auto / R29 decision state (its R29 suppression rule prevents prior-round Skipped/Deferred entries from re-raising) — "picks up where non-interactive stopped" means that state reuse, not skipping Phase 4 presentation or jumping straight to routing with a count. ce-doc-review's walkthrough enforces the same-turn presentation-before-routing rule on this re-entry; a structured review result shown in an earlier turn beside this menu does not satisfy it. If the skill cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu with the refreshed counts so the user can pick what to do next.
  • Create Issue -> Follow the Issue Creation section below through an available connector, MCP, API, or documented CLI; no linear CLI is guaranteed, and one missing binary is not proof that the tracker is unavailable.
  • Prototype a remaining feel-question -> Invoke the ce-prototype skill under the cross-skill invocation rule, passing the plan path as the skill argument. Do not build a prototype in this skill. If it cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu from the artifact's current contents — a plan it wrote back to needs implementation planning again, so the execution options drop out on their own; when it returned decisions instead of writing them, say so, since the plan still describes the pre-prototype behavior.
  • Open in browser or Publish a copy -> Read references/publishing.md and follow it for the saved plan file; the plan file stays the record. Show the user the resulting URL or absolute path, then return to the post-generation options so the user can pick a follow-up action.
  • Free-form prompts that target the findings (e.g., the user types "review", "walk through", "deep review" instead of picking a numbered option) -> route as if they had picked Decide on the review's open items. Do not loop back to the menu without running the review. When the structured review result carries skipped_reason: skill_unreachable, say that ce-doc-review could not be invoked and loop back without misreporting a review failure.
  • Other free-form input -> Accept revisions to the plan and loop back to options.
Raw lines 54 to 97
Names a skill ce-doc-review :60
Names a skill ce-work :71
Names a skill ce-prototype :75
Involves a person AskUserQuestion :83
Involves a person request_user_input :83
Starts an agent subagent :87
Starts an agent dispatch :87
Starts an agent subagents :87
Uses an outside tool MCP :92
98## Issue Creation
100When the user selects "Create Issue":
1021. **Identify the project's issue tracker from the active instructions and conventions already in your context** — the issue / project-management tool the project uses (e.g., GitHub Issues, Linear, Jira). Don't open or name specific instruction files to do this; the project's instructions are already available to you. Look for an explicit `project_tracker:` declaration (`github`, `linear`, …) or any documented tracker convention. Only if your context doesn't already carry the project's instructions (e.g., you're a fresh subagent) or they're silent, consult supplementary signals: `README.md`, `CONTRIBUTING.md`, PR templates under `.github/`, or visible tracker URLs.
1042. **Create the issue through whatever interface that tracker actually exposes in this environment** — a platform connector/MCP tool, documented API/GraphQL credentials, or a documented CLI. First actively discover what's available: use the platform's tool-discovery primitive (e.g., `ToolSearch` in Claude Code) to look for a tracker connector or MCP tool before assuming none exists — lazy-loaded connectors and credentials stored outside the shell won't surface in a passive check. Do not assume a tracker means a particular CLI, and do not treat a missing binary, env var, or unloaded MCP server as proof the tracker is unavailable — those are false negatives when access comes through a connector or a raw API with credentials stored outside the shell. When using a direct API, never print secret values; read the plan body from disk and send it as the issue's markdown/description per the API contract. Worked examples for the common cases:
105 - **GitHub** — `gh issue create --title "<type>: <title>" --body-file <plan_path>`
106 - **Linear** (no guaranteed first-party CLI) — prefer, in order: a Linear connector or MCP tool that can create issues → documented direct API/GraphQL credentials and endpoint → a documented local Linear CLI, only when the project or user explicitly states it is installed and authenticated.
1083. If no tracker is configured, ask the user which tracker they use with the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Fall back to asking on the host's user-visible chat surface only when no such tool is in the list or a real question call errors. Never silently skip. Offer three explicit options — `GitHub`, `Linear`, `Skip` — and let the user name a different tracker (Jira, etc.) through the tool's built-in free-form / "Other" input. Don't add an explicit fourth `Other` option — that's redundant where the tool already offers free-form and can exceed a 2–3 explicit-option cap. When the tool exposes no free-form path, capture the other-tracker name via the chat fallback. Then:
109 - Proceed with the chosen tracker's creation path above
110 - If the user names a different tracker through the free-form path, ask for its reachable interface if they didn't say, then create the issue via the capability path in step 2
111 - Offer to persist the choice by adding a `project_tracker: <value>` declaration to the project's root agent-instructions file (e.g., `AGENTS.md`; if it `@`-includes another file, write to the substantive one). Use the lowercase tracker key (`github`, `linear`, `jira`, …) — not the display label — so future runs match step 1 and skip this prompt
112 - If `Skip`, return to the options without creating an issue
1144. If the detected tracker has no reachable interface after actively discovering available connector/MCP tools and following its documented access method — no working connector, MCP tool, CLI, or API path — report a clear error (e.g., "`gh` CLI not found or not authenticated for GitHub Issues"; "Linear is documented for this project, but no connector, MCP tool, or API credentials were found") and return to the options. Do not silently fall back to a local issue-plan document unless the user explicitly asks for a local-only artifact.
116After issue creation:
117- Display the issue URL
118- Ask whether to proceed with `ce-work` using the host's blocking question tool already in the current tool list

Issue Creation

When the user selects "Create Issue":

  1. Identify the project's issue tracker from the active instructions and conventions already in your context — the issue / project-management tool the project uses (e.g., GitHub Issues, Linear, Jira). Don't open or name specific instruction files to do this; the project's instructions are already available to you. Look for an explicit project_tracker: declaration (github, linear, …) or any documented tracker convention. Only if your context doesn't already carry the project's instructions (e.g., you're a fresh subagent) or they're silent, consult supplementary signals: README.md, CONTRIBUTING.md, PR templates under .github/, or visible tracker URLs.
  1. Create the issue through whatever interface that tracker actually exposes in this environment — a platform connector/MCP tool, documented API/GraphQL credentials, or a documented CLI. First actively discover what's available: use the platform's tool-discovery primitive (e.g., ToolSearch in Claude Code) to look for a tracker connector or MCP tool before assuming none exists — lazy-loaded connectors and credentials stored outside the shell won't surface in a passive check. Do not assume a tracker means a particular CLI, and do not treat a missing binary, env var, or unloaded MCP server as proof the tracker is unavailable — those are false negatives when access comes through a connector or a raw API with credentials stored outside the shell. When using a direct API, never print secret values; read the plan body from disk and send it as the issue's markdown/description per the API contract. Worked examples for the common cases:
  2. GitHub — gh issue create --title "<type>: <title>" --body-file <plan_path>
  3. Linear (no guaranteed first-party CLI) — prefer, in order: a Linear connector or MCP tool that can create issues → documented direct API/GraphQL credentials and endpoint → a documented local Linear CLI, only when the project or user explicitly states it is installed and authenticated.
  1. If no tracker is configured, ask the user which tracker they use with the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Fall back to asking on the host's user-visible chat surface only when no such tool is in the list or a real question call errors. Never silently skip. Offer three explicit options — GitHub, Linear, Skip — and let the user name a different tracker (Jira, etc.) through the tool's built-in free-form / "Other" input. Don't add an explicit fourth Other option — that's redundant where the tool already offers free-form and can exceed a 2–3 explicit-option cap. When the tool exposes no free-form path, capture the other-tracker name via the chat fallback. Then:
  2. Proceed with the chosen tracker's creation path above
  3. If the user names a different tracker through the free-form path, ask for its reachable interface if they didn't say, then create the issue via the capability path in step 2
  4. Offer to persist the choice by adding a project_tracker: <value> declaration to the project's root agent-instructions file (e.g., AGENTS.md; if it @-includes another file, write to the substantive one). Use the lowercase tracker key (github, linear, jira, …) — not the display label — so future runs match step 1 and skip this prompt
  5. If Skip, return to the options without creating an issue
  1. If the detected tracker has no reachable interface after actively discovering available connector/MCP tools and following its documented access method — no working connector, MCP tool, CLI, or API path — report a clear error (e.g., "gh CLI not found or not authenticated for GitHub Issues"; "Linear is documented for this project, but no connector, MCP tool, or API credentials were found") and return to the options. Do not silently fall back to a local issue-plan document unless the user explicitly asks for a local-only artifact.

After issue creation:

  • Display the issue URL
  • Ask whether to proceed with ce-work using the host's blocking question tool already in the current tool list
Raw lines 98 to 118
Starts an agent subagent :102
Uses an outside tool MCP :104
Involves a person ask the user :108
Project instruction file AGENTS.md :111
Names a skill ce-work :118