Requirements: Documentation Overhaul
Status: APPROVED
Created: 2026-02-04
Feature: documentation-overhaul
Problem Statement
The GitHub wiki Command-Reference page returns 404 (never created). Documentation exists but is fragmented across README.md, docs/, and ARCHITECTURE.md. Users need:
- Comprehensive command reference with every flag and example
- Tutorial-focused README for new users
- Full wiki with 10+ pages
- Updated ARCHITECTURE.md reflecting current system
Current State
| Document |
Status |
Issue |
| README.md |
Exists (844 lines) |
Comprehensive but not tutorial-focused |
| docs/commands.md |
Exists (~1000 lines) |
Incomplete, not exhaustive |
| Wiki Command-Reference |
404 |
Never created |
| ARCHITECTURE.md |
Exists (36KB) |
Needs audit against current code |
| docs/*.md |
6 files exist |
May need updates |
Expected Outcome
- Wiki is primary documentation with 10+ pages
- README becomes tutorial-focused with step-by-step guide
- All 26 commands documented exhaustively with every flag and example
- ARCHITECTURE.md audited and updated
Functional Requirements
FR-1: Wiki Population (Primary Documentation)
Create comprehensive GitHub wiki with these pages:
| Page |
Content |
| Home |
Overview, quick start, links to other pages |
| Command-Reference |
All commands grouped by workflow phase, alphabetical within groups |
| Configuration |
.zerg/config.yaml, environment variables, tuning |
| Architecture |
System design, module reference, execution model |
| Tutorial |
Minerals-store walkthrough with all ZERG features |
| Plugins |
Quality gates, lifecycle hooks, custom launchers |
| Security |
Security rules integration, vulnerability reporting |
| Context-Engineering |
Token optimization, command splitting, task context |
| Troubleshooting |
Common issues, diagnostics, recovery |
| FAQ |
Frequently asked questions |
| Contributing |
Development setup, code style, PR process |
FR-2: Exhaustive Command Documentation
For each of the 26 commands, document:
- Synopsis: One-line description
- Usage: Full command syntax
- Description: Detailed explanation (2-3 paragraphs)
- Flags: Table with every flag, type, default, description
- Examples: 3-5 examples covering common use cases
- Related Commands: Links to related commands
- Notes: Edge cases, warnings, tips
Commands grouped by workflow phase, alphabetical within each group:
Core Workflow: /zerg:brainstorm, /zerg:design, /zerg:init, /zerg:plan, /zerg:rush
Monitoring & Control: /zerg:cleanup, /zerg:logs, /zerg:merge, /zerg:retry, /zerg:status, /zerg:stop
Quality & Analysis: /zerg:analyze, /zerg:build, /zerg:refactor, /zerg:review, /zerg:security, /zerg:test
Utilities: /zerg:create-command, /zerg:debug, /zerg:git, /zerg:plugins, /zerg:worker
Documentation & AI: /zerg:document, /zerg:estimate, /zerg:explain, /zerg:index, /zerg:select-tool
FR-3: Tutorial-Focused README
Restructure README.md as a tutorial:
- Quick Overview (what ZERG does, 1 paragraph)
- Installation (step-by-step with prerequisites)
- Tutorial: Your First ZERG Project (using minerals-store)
- Step 1:
/zerg:init — Initialize project
- Step 2:
/zerg:brainstorm — Discover requirements
- Step 3:
/zerg:plan — Capture requirements
- Step 4:
/zerg:design — Create architecture
- Step 5:
/zerg:rush — Execute in parallel
- Step 6:
/zerg:status, /zerg:logs — Monitor
- Step 7:
/zerg:review, /zerg:test — Quality checks
- Step 8:
/zerg:git --action ship — Ship it
- Command Quick Reference (table linking to wiki)
- Configuration (brief, links to wiki)
- Links to Full Documentation (wiki, ARCHITECTURE.md)
FR-4: ARCHITECTURE.md Audit
Audit and update ARCHITECTURE.md:
- Verify all module references exist
- Update diagrams for new features (worker intelligence, context engineering)
- Add sections for: cross-cutting capabilities, resilience, diagnostics engine
- Remove references to deprecated code
- Cross-reference with current source files
FR-5: Documentation Generation via /zerg:document --deep
Use /zerg:document --deep to generate initial documentation:
- Run on each major subsystem
- Review and enhance with examples
- Ensure all slash commands use
/zerg: format (never "Command-init")
- Verify flag descriptions match source files
Non-Functional Requirements
NFR-1: Consistency
- All commands referenced as
/zerg:command (with shortcut /z:command)
- Never use "Command-init" or "zerg-init" format
- Consistent flag formatting:
--flag VALUE with type and default
NFR-2: Completeness
- Every flag from every command file documented
- Every example is copy-pasteable and works
- No placeholder text ("TODO", "Coming soon")
NFR-3: Discoverability
- Table of contents on every wiki page
- Cross-links between related commands
- Search-friendly headings
NFR-4: Maintainability
- Wiki can be updated independently of releases
- docs/ mirrors wiki for offline access
- Source of truth is wiki, docs/ syncs from it
Scope
In Scope
- Create all wiki pages (10+)
- Restructure README.md as tutorial
- Exhaustive command reference
- ARCHITECTURE.md audit
- Use
/zerg:document --deep for generation
Out of Scope
- New features or commands
- Code changes (documentation only)
- Translations
- Video tutorials
Acceptance Criteria
- Wiki Complete: All 10+ wiki pages exist and are accessible
- Commands Documented: All 26 commands have exhaustive documentation with flags and examples
- Tutorial Works: New user can follow README tutorial end-to-end
- Architecture Current: ARCHITECTURE.md reflects current code (spot-checked against 5 key modules)
- Format Consistent: All command references use
/zerg: format
Implementation Approach
Phase 1: Audit (using /zerg:document --deep)
- Run
/zerg:document --deep on zerg/data/commands/
- Run
/zerg:document --deep on zerg/ (core modules)
- Compare generated docs against current docs/
- Identify gaps
Phase 2: Wiki Creation
- Create wiki Home page
- Create Command-Reference (exhaustive)
- Create remaining pages from generated content
- Add cross-links
Phase 3: README Restructure
- Extract tutorial from current README
- Restructure as step-by-step guide
- Link to wiki for details
Phase 4: Architecture Update
- Audit ARCHITECTURE.md against current modules
- Update diagrams
- Add new sections
Phase 5: Validation
- Walk through tutorial as new user
- Verify all wiki links work
- Spot-check 5 commands for flag accuracy
Open Questions
Wiki edit permissions: Can wiki be edited via GitHub API or must it be manual?
- Recommendation: Use
gh CLI if possible, manual if not
Sync strategy: How to keep docs/ in sync with wiki?
- Recommendation: Wiki is source of truth, periodic manual sync to docs/
Tutorial project location: Should minerals-store be a separate repo?
- Recommendation: Keep as tutorial in docs/, not a real repo
Files to Create/Modify
| File |
Operation |
| Wiki: Home |
Create |
| Wiki: Command-Reference |
Create |
| Wiki: Configuration |
Create |
| Wiki: Architecture |
Create |
| Wiki: Tutorial |
Create |
| Wiki: Plugins |
Create |
| Wiki: Security |
Create |
| Wiki: Context-Engineering |
Create |
| Wiki: Troubleshooting |
Create |
| Wiki: FAQ |
Create |
| Wiki: Contributing |
Create |
| README.md |
Modify (restructure) |
| ARCHITECTURE.md |
Modify (audit/update) |
| docs/commands.md |
Modify (sync from wiki) |
1---2name: 1545-requirements-503992033description: Requirements: Documentation Overhaul4---5# Requirements: Documentation Overhaul67**Status: APPROVED**8**Created**: 2026-02-049**Feature**: documentation-overhaul1011## Problem Statement1213The GitHub wiki Command-Reference page returns 404 (never created). Documentation exists but is fragmented across README.md, docs/, and ARCHITECTURE.md. Users need:141. Comprehensive command reference with every flag and example152. Tutorial-focused README for new users163. Full wiki with 10+ pages174. Updated ARCHITECTURE.md reflecting current system1819### Current State2021| Document | Status | Issue |22|----------|--------|-------|23| README.md | Exists (844 lines) | Comprehensive but not tutorial-focused |24| docs/commands.md | Exists (~1000 lines) | Incomplete, not exhaustive |25| Wiki Command-Reference | 404 | Never created |26| ARCHITECTURE.md | Exists (36KB) | Needs audit against current code |27| docs/*.md | 6 files exist | May need updates |2829### Expected Outcome3031- Wiki is primary documentation with 10+ pages32- README becomes tutorial-focused with step-by-step guide33- All 26 commands documented exhaustively with every flag and example34- ARCHITECTURE.md audited and updated3536## Functional Requirements3738### FR-1: Wiki Population (Primary Documentation)3940Create comprehensive GitHub wiki with these pages:4142| Page | Content |43|------|---------|44| Home | Overview, quick start, links to other pages |45| Command-Reference | All commands grouped by workflow phase, alphabetical within groups |46| Configuration | .zerg/config.yaml, environment variables, tuning |47| Architecture | System design, module reference, execution model |48| Tutorial | Minerals-store walkthrough with all ZERG features |49| Plugins | Quality gates, lifecycle hooks, custom launchers |50| Security | Security rules integration, vulnerability reporting |51| Context-Engineering | Token optimization, command splitting, task context |52| Troubleshooting | Common issues, diagnostics, recovery |53| FAQ | Frequently asked questions |54| Contributing | Development setup, code style, PR process |5556### FR-2: Exhaustive Command Documentation5758For each of the 26 commands, document:59601. **Synopsis**: One-line description612. **Usage**: Full command syntax623. **Description**: Detailed explanation (2-3 paragraphs)634. **Flags**: Table with every flag, type, default, description645. **Examples**: 3-5 examples covering common use cases656. **Related Commands**: Links to related commands667. **Notes**: Edge cases, warnings, tips6768Commands grouped by workflow phase, alphabetical within each group:6970**Core Workflow**: /zerg:brainstorm, /zerg:design, /zerg:init, /zerg:plan, /zerg:rush7172**Monitoring & Control**: /zerg:cleanup, /zerg:logs, /zerg:merge, /zerg:retry, /zerg:status, /zerg:stop7374**Quality & Analysis**: /zerg:analyze, /zerg:build, /zerg:refactor, /zerg:review, /zerg:security, /zerg:test7576**Utilities**: /zerg:create-command, /zerg:debug, /zerg:git, /zerg:plugins, /zerg:worker7778**Documentation & AI**: /zerg:document, /zerg:estimate, /zerg:explain, /zerg:index, /zerg:select-tool7980### FR-3: Tutorial-Focused README8182Restructure README.md as a tutorial:83841. **Quick Overview** (what ZERG does, 1 paragraph)852. **Installation** (step-by-step with prerequisites)863. **Tutorial: Your First ZERG Project** (using minerals-store)87 - Step 1: `/zerg:init` — Initialize project88 - Step 2: `/zerg:brainstorm` — Discover requirements89 - Step 3: `/zerg:plan` — Capture requirements90 - Step 4: `/zerg:design` — Create architecture91 - Step 5: `/zerg:rush` — Execute in parallel92 - Step 6: `/zerg:status`, `/zerg:logs` — Monitor93 - Step 7: `/zerg:review`, `/zerg:test` — Quality checks94 - Step 8: `/zerg:git --action ship` — Ship it954. **Command Quick Reference** (table linking to wiki)965. **Configuration** (brief, links to wiki)976. **Links to Full Documentation** (wiki, ARCHITECTURE.md)9899### FR-4: ARCHITECTURE.md Audit100101Audit and update ARCHITECTURE.md:1021031. Verify all module references exist1042. Update diagrams for new features (worker intelligence, context engineering)1053. Add sections for: cross-cutting capabilities, resilience, diagnostics engine1064. Remove references to deprecated code1075. Cross-reference with current source files108109### FR-5: Documentation Generation via /zerg:document --deep110111Use `/zerg:document --deep` to generate initial documentation:1121131. Run on each major subsystem1142. Review and enhance with examples1153. Ensure all slash commands use `/zerg:` format (never "Command-init")1164. Verify flag descriptions match source files117118## Non-Functional Requirements119120### NFR-1: Consistency121122- All commands referenced as `/zerg:command` (with shortcut `/z:command`)123- Never use "Command-init" or "zerg-init" format124- Consistent flag formatting: `--flag VALUE` with type and default125126### NFR-2: Completeness127128- Every flag from every command file documented129- Every example is copy-pasteable and works130- No placeholder text ("TODO", "Coming soon")131132### NFR-3: Discoverability133134- Table of contents on every wiki page135- Cross-links between related commands136- Search-friendly headings137138### NFR-4: Maintainability139140- Wiki can be updated independently of releases141- docs/ mirrors wiki for offline access142- Source of truth is wiki, docs/ syncs from it143144## Scope145146### In Scope1471481. Create all wiki pages (10+)1492. Restructure README.md as tutorial1503. Exhaustive command reference1514. ARCHITECTURE.md audit1525. Use `/zerg:document --deep` for generation153154### Out of Scope1551561. New features or commands1572. Code changes (documentation only)1583. Translations1594. Video tutorials160161## Acceptance Criteria1621631. **Wiki Complete**: All 10+ wiki pages exist and are accessible1642. **Commands Documented**: All 26 commands have exhaustive documentation with flags and examples1653. **Tutorial Works**: New user can follow README tutorial end-to-end1664. **Architecture Current**: ARCHITECTURE.md reflects current code (spot-checked against 5 key modules)1675. **Format Consistent**: All command references use `/zerg:` format168169## Implementation Approach170171### Phase 1: Audit (using /zerg:document --deep)1721731. Run `/zerg:document --deep` on zerg/data/commands/1742. Run `/zerg:document --deep` on zerg/ (core modules)1753. Compare generated docs against current docs/1764. Identify gaps177178### Phase 2: Wiki Creation1791801. Create wiki Home page1812. Create Command-Reference (exhaustive)1823. Create remaining pages from generated content1834. Add cross-links184185### Phase 3: README Restructure1861871. Extract tutorial from current README1882. Restructure as step-by-step guide1893. Link to wiki for details190191### Phase 4: Architecture Update1921931. Audit ARCHITECTURE.md against current modules1942. Update diagrams1953. Add new sections196197### Phase 5: Validation1981991. Walk through tutorial as new user2002. Verify all wiki links work2013. Spot-check 5 commands for flag accuracy202203## Open Questions2042051. **Wiki edit permissions**: Can wiki be edited via GitHub API or must it be manual?206 - Recommendation: Use `gh` CLI if possible, manual if not2072082. **Sync strategy**: How to keep docs/ in sync with wiki?209 - Recommendation: Wiki is source of truth, periodic manual sync to docs/2102113. **Tutorial project location**: Should minerals-store be a separate repo?212 - Recommendation: Keep as tutorial in docs/, not a real repo213214## Files to Create/Modify215216| File | Operation |217|------|-----------|218| Wiki: Home | Create |219| Wiki: Command-Reference | Create |220| Wiki: Configuration | Create |221| Wiki: Architecture | Create |222| Wiki: Tutorial | Create |223| Wiki: Plugins | Create |224| Wiki: Security | Create |225| Wiki: Context-Engineering | Create |226| Wiki: Troubleshooting | Create |227| Wiki: FAQ | Create |228| Wiki: Contributing | Create |229| README.md | Modify (restructure) |230| ARCHITECTURE.md | Modify (audit/update) |231| docs/commands.md | Modify (sync from wiki) |