--- description: Turn a ticket or idea into a validated plan, a spec and agent-ready tickets, with me in the loop argument-hint: "[#N | idea as free text] (empty: the issue picked by /next in this conversation)" disable-model-invocation: true --- Input (raw, verbatim): $ARGUMENTS You are the orchestrator. Delegate the reading to subagents and keep only their conclusions. Speak to me only to ask, to present, or to report. Every command you ask me to run goes in a code block I can copy. ## 0. Entry - `#N`: read the issue and its comments with `gitea-issues`. - Free text: that is the idea. - Empty: use the issue picked by `/next` earlier in this conversation. None → ask me for one. ## 1. Gate Dispatch `plan-gate`. `verdict: stop` → tell me why and stop. ## 2–6. Discovery loop Repeat until I agree. Count loops per point; after two loops on the same point, ask me whether to park the idea instead. 2. **Grill** with `grilling`, only if the intent is unclear, and load `domain-modeling` to challenge terms. Override: make no `GLOSSARY.md` or ADR edits during grilling; collect candidate terms and ADRs for step 7 instead. This equals `grill-with-docs` minus the writing during grilling. Then recommend a track with `plan-track`. `track: wayfinder` → ask me with AskUserQuestion to confirm. On yes, give me this, filled in, and stop: ``` /wayfinder — ``` On no, ask me which of the other two tracks to take, then continue to step 3. 3. **Research**: dispatch `plan-researcher` twice in parallel, scope `repo` and scope `web`. Ask each to flag when lasting reference docs for an external tool or library are needed. Nothing is written. 4. **Validate**: dispatch `plan-validator` with the findings. `regrill` → back to 2. `stop` → tell me why and stop. 5. **Offer a plan**: options, considerations, recommendation, impact, expected results, and the track. Use `codebase-design` only when the options change module or interface shape. List the repo docs downstream agents need: `write-docs` targets and `research-docs` topics. 6. **Agreement**: ask me with AskUserQuestion to agree and confirm the track, or send it back to grilling or research. Say in the question that agreeing also approves step 7's docs branch, push and PR. ## 7. Record decisions Dispatch `plan-recorder` with the agreed plan, its decisions, and the candidate terms and ADRs from step 2. My agreement in step 6 authorizes its branch, commit, push and docs PR. Keep the PR link. If step 5 listed docs: if it listed `research-docs` topics, ask me for the `research-docs` output path. Then tell me the docs branch name (from the PR) and to run these on it, only the lines that apply, and push to the same PR: ``` /write-docs /research-docs ``` Wait for me. ## 8. Spec (spec and tickets track only) `to-spec` is hand-invoked, so you cannot call it. Tell me to run: ``` /to-spec — link the docs PR ``` My running it is my approval of the spec. Wait for it. `to-spec` sets `Status/Ready for Agent` on the spec issue; if present, resolve its label ID with `gitea-labels-milestones` and remove it with `gitea-issues`. ## 9–10. Tickets `to-tickets` is hand-invoked, so you cannot call it. Tell me to run it on the spec (or on this conversation, on the tickets-only track): ``` /to-tickets — docs PR ``` It proposes the breakdown, and my approval inside it covers the whole batch. It files the tickets and sets `Status/Ready for Agent`; a ticket without acceptance criteria must not carry it. If the breakdown shows a gap in the spec, tell me to rerun step 8's `/to-spec` block first. After it files them, read each filed ticket with `gitea-issues`. Resolve the label IDs with `gitea-labels-milestones`, remove `Status/Ready for Agent` from any ticket with no acceptance criteria, and list those tickets for me. Spec track: create one milestone `Spec: ` with `gitea-labels-milestones`, and assign every filed ticket to it with `gitea-issues`. ## Report Links to the docs PR, the spec, the milestone and the tickets.