Feature Requirements: issue-94
Metadata
1. Problem Statement
1.1 Background
The /zerg:plan command captures requirements through multi-phase interactive discovery. After user approval, the command ends abruptly with no guidance on next steps, no documentation task in the plan output, and existing documentation across GitHub/wiki has gaps in command/flag coverage.
1.2 Problem
Three related gaps:
- No post-approval handoff — users must manually know to run
/z:design
- Documentation updates are never part of generated plans — docs drift from code
- Command/flag documentation is incomplete across surfaces (
docs/commands.md, wiki zerg-*.md pages)
1.3 Impact
- Users lose momentum after plan approval (no next-step guidance)
- Documentation falls behind with every feature shipped
- Users discover undocumented flags through trial and error
2. Users
2.1 Primary Users
ZERG users running /zerg:plan to start feature development
2.2 User Stories
- As a user, I want to be prompted with next steps after plan approval so I don't lose momentum
- As a user, I want every plan to include a documentation task so docs stay in sync
- As a user, I want all command flags documented so I can discover capabilities without reading source
3. Functional Requirements
3.1 Workstream A: Post-Approval Prompt
| ID |
Requirement |
Priority |
| FR-A01 |
After user replies "APPROVED", use AskUserQuestion to prompt next steps |
Must |
| FR-A02 |
Option 1: "Clear context and run /z:design" (Recommended) — instructs user to /compact or start new session, then run /z:design |
Must |
| FR-A03 |
Option 2: "Continue in current context with /z:design" — instructs user to run /z:design immediately |
Must |
| FR-A04 |
Option 3: "Stop here — I'll run /z:design later" — command completes normally |
Must |
| FR-A05 |
TaskUpdate to completed fires regardless of which option is chosen |
Must |
| FR-A06 |
The AskUserQuestion fires AFTER TaskUpdate marks the plan task completed |
Must |
3.2 Workstream B: Documentation Task in Requirements Template
| ID |
Requirement |
Priority |
| FR-B01 |
Add a "Documentation" section to the requirements.md template in plan.details.md |
Must |
| FR-B02 |
Section references /zerg:document as the execution command |
Must |
| FR-B03 |
Section specifies: ensure all commands and flags are accounted for in docs |
Must |
| FR-B04 |
Section specifies: wiki command pages must follow zerg-*.md naming convention (non-command pages unaffected) |
Must |
| FR-B05 |
Section specifies: run /zerg:design + /zerg:estimate before executing documentation updates |
Should |
3.3 Workstream C: Command/Flag Documentation Audit
| ID |
Requirement |
Priority |
| FR-C01 |
Audit all 26 commands in zerg/data/commands/*.md against docs/commands.md |
Must |
| FR-C02 |
Audit all 26 commands against wiki zerg-*.md pages |
Must |
| FR-C03 |
Check zerg-Reference.md wiki page for completeness |
Should |
| FR-C04 |
Verify cross-cutting capability flags (--quick, --think, --think-hard, --ultrathink, --no-compact, --mcp, --no-mcp, --tdd, --no-loop, --iterations) are documented |
Must |
| FR-C05 |
Verify /z:* shorthand aliases documented as equivalent to /zerg:* |
Must |
| FR-C06 |
For each command: all --action variants, all flags with types/defaults/aliases, usage examples |
Must |
| FR-C07 |
Fix all gaps found during audit |
Must |
4. Non-Functional Requirements
4.1 Consistency
- Wiki command pages use
zerg-*.md naming convention
- Flag tables use consistent format across all documentation surfaces
- No contradictions between
docs/commands.md, wiki pages, and command source files
4.2 Backward Compatibility
- No breaking changes to plan command behavior for users who don't interact with the prompt
- "Stop here" option preserves existing behavior exactly
5. Scope
5.1 In Scope
- Modify
plan.md and plan.core.md — add post-approval AskUserQuestion
- Modify
plan.details.md — add Documentation section to requirements template
- Audit and fix
docs/commands.md
- Audit and fix wiki
zerg-*.md command pages
- Audit
zerg-Reference.md, README.md, CLAUDE.md for flag coverage
5.2 Out of Scope
- Auto-invoking
/z:design (user will be instructed manually)
- Changing non-command wiki pages (e.g.,
Getting-Started.md, FAQ.md)
- Adding new commands or flags
- Modifying the plan command's discovery phases (1-4)
5.3 Assumptions
plan.md and plan.core.md are kept in sync (same content)
- Wiki is editable via git clone of
rocklambros/zerg.wiki.git
- All 26 commands have corresponding wiki pages
6. Dependencies
6.1 Internal Dependencies
| Dependency |
Type |
Status |
zerg/data/commands/plan.md |
File to modify |
Exists |
zerg/data/commands/plan.core.md |
File to modify |
Exists |
zerg/data/commands/plan.details.md |
File to modify |
Exists |
docs/commands.md |
File to modify |
Exists |
Wiki zerg-*.md pages |
Files to audit/modify |
Exist (26 pages) |
7. Acceptance Criteria
7.1 Definition of Done
7.2 Test Scenarios
| ID |
Scenario |
Given |
When |
Then |
| TC-001 |
Post-approval prompt appears |
Plan approved |
User says "APPROVED" |
AskUserQuestion with 3 options shown |
| TC-002 |
Clear context option |
Prompt shown |
User picks "Clear context" |
Instruction to /compact then /z:design |
| TC-003 |
Continue option |
Prompt shown |
User picks "Continue" |
Instruction to run /z:design now |
| TC-004 |
Stop option |
Prompt shown |
User picks "Stop here" |
Command completes, no further action |
| TC-005 |
Task tracking |
Any option picked |
After prompt |
Task status is "completed" |
| TC-006 |
Template has docs section |
New plan run |
requirements.md generated |
Contains Documentation section |
8. Open Questions
| ID |
Question |
Status |
| Q-001 |
Does zerg-Reference.md currently serve as a command index, or is it something else? |
Open |
9. Documentation
Execute /zerg:document after implementation to update all documentation surfaces based on changes made. Ensure:
- All ZERG commands and flags are accounted for
- Wiki command pages follow the
zerg-*.md naming convention (non-command pages unaffected)
- Before executing, plan via
/zerg:design and estimate via /zerg:estimate
1---2name: feature-requirements-issue-943description: The /zerg:plan command captures requirements through multi-phase interactive discovery.4---5# Feature Requirements: issue-9467## Metadata8- **Feature**: issue-949- **Status**: REVIEW10- **Created**: 2026-02-0211- **Author**: ZERG Plan Mode12- **Source**: https://github.com/rocklambros/zerg/issues/941314---1516## 1. Problem Statement1718### 1.1 Background19The `/zerg:plan` command captures requirements through multi-phase interactive discovery. After user approval, the command ends abruptly with no guidance on next steps, no documentation task in the plan output, and existing documentation across GitHub/wiki has gaps in command/flag coverage.2021### 1.2 Problem22Three related gaps:231. No post-approval handoff — users must manually know to run `/z:design`242. Documentation updates are never part of generated plans — docs drift from code253. Command/flag documentation is incomplete across surfaces (`docs/commands.md`, wiki `zerg-*.md` pages)2627### 1.3 Impact28- Users lose momentum after plan approval (no next-step guidance)29- Documentation falls behind with every feature shipped30- Users discover undocumented flags through trial and error3132---3334## 2. Users3536### 2.1 Primary Users37ZERG users running `/zerg:plan` to start feature development3839### 2.2 User Stories40- As a user, I want to be prompted with next steps after plan approval so I don't lose momentum41- As a user, I want every plan to include a documentation task so docs stay in sync42- As a user, I want all command flags documented so I can discover capabilities without reading source4344---4546## 3. Functional Requirements4748### 3.1 Workstream A: Post-Approval Prompt4950| ID | Requirement | Priority |51|----|-------------|----------|52| FR-A01 | After user replies "APPROVED", use `AskUserQuestion` to prompt next steps | Must |53| FR-A02 | Option 1: "Clear context and run /z:design" (Recommended) — instructs user to `/compact` or start new session, then run `/z:design` | Must |54| FR-A03 | Option 2: "Continue in current context with /z:design" — instructs user to run `/z:design` immediately | Must |55| FR-A04 | Option 3: "Stop here — I'll run /z:design later" — command completes normally | Must |56| FR-A05 | TaskUpdate to `completed` fires regardless of which option is chosen | Must |57| FR-A06 | The AskUserQuestion fires AFTER TaskUpdate marks the plan task completed | Must |5859### 3.2 Workstream B: Documentation Task in Requirements Template6061| ID | Requirement | Priority |62|----|-------------|----------|63| FR-B01 | Add a "Documentation" section to the `requirements.md` template in `plan.details.md` | Must |64| FR-B02 | Section references `/zerg:document` as the execution command | Must |65| FR-B03 | Section specifies: ensure all commands and flags are accounted for in docs | Must |66| FR-B04 | Section specifies: wiki command pages must follow `zerg-*.md` naming convention (non-command pages unaffected) | Must |67| FR-B05 | Section specifies: run `/zerg:design` + `/zerg:estimate` before executing documentation updates | Should |6869### 3.3 Workstream C: Command/Flag Documentation Audit7071| ID | Requirement | Priority |72|----|-------------|----------|73| FR-C01 | Audit all 26 commands in `zerg/data/commands/*.md` against `docs/commands.md` | Must |74| FR-C02 | Audit all 26 commands against wiki `zerg-*.md` pages | Must |75| FR-C03 | Check `zerg-Reference.md` wiki page for completeness | Should |76| FR-C04 | Verify cross-cutting capability flags (`--quick`, `--think`, `--think-hard`, `--ultrathink`, `--no-compact`, `--mcp`, `--no-mcp`, `--tdd`, `--no-loop`, `--iterations`) are documented | Must |77| FR-C05 | Verify `/z:*` shorthand aliases documented as equivalent to `/zerg:*` | Must |78| FR-C06 | For each command: all `--action` variants, all flags with types/defaults/aliases, usage examples | Must |79| FR-C07 | Fix all gaps found during audit | Must |8081---8283## 4. Non-Functional Requirements8485### 4.1 Consistency86- Wiki command pages use `zerg-*.md` naming convention87- Flag tables use consistent format across all documentation surfaces88- No contradictions between `docs/commands.md`, wiki pages, and command source files8990### 4.2 Backward Compatibility91- No breaking changes to plan command behavior for users who don't interact with the prompt92- "Stop here" option preserves existing behavior exactly9394---9596## 5. Scope9798### 5.1 In Scope99- Modify `plan.md` and `plan.core.md` — add post-approval AskUserQuestion100- Modify `plan.details.md` — add Documentation section to requirements template101- Audit and fix `docs/commands.md`102- Audit and fix wiki `zerg-*.md` command pages103- Audit `zerg-Reference.md`, `README.md`, `CLAUDE.md` for flag coverage104105### 5.2 Out of Scope106- Auto-invoking `/z:design` (user will be instructed manually)107- Changing non-command wiki pages (e.g., `Getting-Started.md`, `FAQ.md`)108- Adding new commands or flags109- Modifying the plan command's discovery phases (1-4)110111### 5.3 Assumptions112- `plan.md` and `plan.core.md` are kept in sync (same content)113- Wiki is editable via git clone of `rocklambros/zerg.wiki.git`114- All 26 commands have corresponding wiki pages115116---117118## 6. Dependencies119120### 6.1 Internal Dependencies121| Dependency | Type | Status |122|------------|------|--------|123| `zerg/data/commands/plan.md` | File to modify | Exists |124| `zerg/data/commands/plan.core.md` | File to modify | Exists |125| `zerg/data/commands/plan.details.md` | File to modify | Exists |126| `docs/commands.md` | File to modify | Exists |127| Wiki `zerg-*.md` pages | Files to audit/modify | Exist (26 pages) |128129---130131## 7. Acceptance Criteria132133### 7.1 Definition of Done134- [ ] Post-approval AskUserQuestion prompt works with all 3 options135- [ ] "Clear context" option instructs user to `/compact` then `/z:design`136- [ ] "Stop here" option completes normally (same as current behavior)137- [ ] TaskUpdate fires correctly regardless of user choice138- [ ] Requirements template includes Documentation section referencing `/zerg:document`139- [ ] Documentation section specifies `zerg-*.md` naming for command wiki pages140- [ ] All 26 commands audited against `docs/commands.md` — gaps fixed141- [ ] All 26 commands audited against wiki pages — gaps fixed142- [ ] Cross-cutting capability flags documented in appropriate locations143- [ ] `/z:*` shorthand aliases documented144145### 7.2 Test Scenarios146147| ID | Scenario | Given | When | Then |148|----|----------|-------|------|------|149| TC-001 | Post-approval prompt appears | Plan approved | User says "APPROVED" | AskUserQuestion with 3 options shown |150| TC-002 | Clear context option | Prompt shown | User picks "Clear context" | Instruction to /compact then /z:design |151| TC-003 | Continue option | Prompt shown | User picks "Continue" | Instruction to run /z:design now |152| TC-004 | Stop option | Prompt shown | User picks "Stop here" | Command completes, no further action |153| TC-005 | Task tracking | Any option picked | After prompt | Task status is "completed" |154| TC-006 | Template has docs section | New plan run | requirements.md generated | Contains Documentation section |155156---157158## 8. Open Questions159160| ID | Question | Status |161|----|----------|--------|162| Q-001 | Does `zerg-Reference.md` currently serve as a command index, or is it something else? | Open |163164---165166## 9. Documentation167168Execute `/zerg:document` after implementation to update all documentation surfaces based on changes made. Ensure:169- All ZERG commands and flags are accounted for170- Wiki command pages follow the `zerg-*.md` naming convention (non-command pages unaffected)171- Before executing, plan via `/zerg:design` and estimate via `/zerg:estimate`