bmad-method 6.0.0-alpha.5 → 6.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/.claude/agents/bmad-analysis/api-documenter.md +102 -0
  2. package/.claude/agents/bmad-analysis/codebase-analyzer.md +82 -0
  3. package/.claude/agents/bmad-analysis/data-analyst.md +101 -0
  4. package/.claude/agents/bmad-analysis/pattern-detector.md +84 -0
  5. package/.claude/agents/bmad-planning/dependency-mapper.md +83 -0
  6. package/.claude/agents/bmad-planning/epic-optimizer.md +81 -0
  7. package/.claude/agents/bmad-planning/requirements-analyst.md +61 -0
  8. package/.claude/agents/bmad-planning/technical-decisions-curator.md +168 -0
  9. package/.claude/agents/bmad-planning/trend-spotter.md +115 -0
  10. package/.claude/agents/bmad-planning/user-journey-mapper.md +123 -0
  11. package/.claude/agents/bmad-planning/user-researcher.md +72 -0
  12. package/.claude/agents/bmad-research/market-researcher.md +51 -0
  13. package/.claude/agents/bmad-research/tech-debt-auditor.md +106 -0
  14. package/.claude/agents/bmad-review/document-reviewer.md +102 -0
  15. package/.claude/agents/bmad-review/technical-evaluator.md +68 -0
  16. package/.claude/agents/bmad-review/test-coverage-analyzer.md +108 -0
  17. package/.claude/commands/bmad/bmm/workflows/README.md +2 -2
  18. package/.claude/commands/bmad/bmm/workflows/prd.md +1 -1
  19. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +3 -3
  20. package/.claude/commands/bmad/core/workflows/README.md +0 -10
  21. package/.claude/settings.local.json +3 -4
  22. package/CONTRIBUTING.md +1 -13
  23. package/bmad/_cfg/agent-manifest.csv +0 -6
  24. package/bmad/_cfg/files-manifest.csv +26 -78
  25. package/bmad/_cfg/ides/claude-code.yaml +4 -3
  26. package/bmad/_cfg/manifest.yaml +3 -5
  27. package/bmad/_cfg/task-manifest.csv +0 -4
  28. package/bmad/_cfg/tool-manifest.csv +0 -1
  29. package/bmad/_cfg/workflow-manifest.csv +2 -8
  30. package/bmad/bmb/config.yaml +2 -2
  31. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  32. package/bmad/bmm/config.yaml +4 -3
  33. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  34. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  35. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  36. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  37. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  38. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  39. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +1 -1
  40. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  41. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  42. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  43. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  44. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  45. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  46. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  47. package/bmad/bmm/workflows/techdoc/documentation-standards.md +24 -1
  48. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  49. package/bmad/core/config.yaml +2 -2
  50. package/package.json +1 -1
  51. package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
  52. package/src/modules/bmm/docs/README.md +10 -9
  53. package/src/modules/bmm/docs/agents-guide.md +1 -1
  54. package/src/modules/bmm/docs/brownfield-guide.md +5 -6
  55. package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
  56. package/src/modules/bmm/docs/faq.md +6 -6
  57. package/src/modules/bmm/docs/glossary.md +8 -8
  58. package/src/modules/bmm/docs/quick-spec-flow.md +3 -3
  59. package/src/modules/bmm/docs/quick-start.md +5 -5
  60. package/src/modules/bmm/docs/scale-adaptive-system.md +1 -1
  61. package/src/modules/bmm/docs/test-architecture.md +329 -0
  62. package/src/modules/bmm/docs/troubleshooting.md +6 -6
  63. package/src/modules/bmm/docs/workflows-analysis.md +64 -28
  64. package/src/modules/bmm/docs/workflows-implementation.md +196 -1670
  65. package/src/modules/bmm/docs/workflows-planning.md +74 -35
  66. package/src/modules/bmm/docs/workflows-solutioning.md +46 -16
  67. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +24 -1
  68. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  69. package/tools/cli/installers/lib/core/config-collector.js +39 -11
  70. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  71. package/tools/cli/installers/lib/core/installer.js +20 -9
  72. package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
  73. package/tools/cli/installers/lib/core/manifest.js +6 -2
  74. package/tools/cli/installers/lib/modules/manager.js +6 -0
  75. package/tools/cli/lib/config.js +3 -1
  76. package/tools/cli/lib/ui.js +5 -5
  77. package/tools/cli/lib/yaml-format.js +2 -1
  78. package/tools/schema/agent.js +2 -0
  79. package/.claude/commands/bmad/bmm/agents/paige.md +0 -82
  80. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
  81. package/bmad/_cfg/agents/bmm-paige.customize.yaml +0 -42
  82. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
  83. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
  84. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
  85. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
  86. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
  87. package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
  88. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
  89. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
  90. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  91. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
  92. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
  93. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
  94. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
  95. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
  96. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
  97. package/bmad/bmm/README.md.bak +0 -169
  98. package/bmad/bmm/agents/analyst.md.bak +0 -67
  99. package/bmad/bmm/agents/architect.md.bak +0 -73
  100. package/bmad/bmm/agents/dev.md.bak +0 -69
  101. package/bmad/bmm/agents/paige.md.bak +0 -82
  102. package/bmad/bmm/agents/pm.md.bak +0 -76
  103. package/bmad/bmm/agents/sm.md.bak +0 -85
  104. package/bmad/bmm/agents/tea.md.bak +0 -72
  105. package/bmad/bmm/agents/ux-designer.md.bak +0 -71
  106. package/bmad/bmm/docs/README.md +0 -235
  107. package/bmad/bmm/docs/agents-guide.md +0 -1057
  108. package/bmad/bmm/docs/brownfield-guide.md +0 -759
  109. package/bmad/bmm/docs/enterprise-agentic-development.md +0 -680
  110. package/bmad/bmm/docs/faq.md +0 -589
  111. package/bmad/bmm/docs/glossary.md +0 -321
  112. package/bmad/bmm/docs/party-mode.md +0 -224
  113. package/bmad/bmm/docs/quick-spec-flow.md +0 -652
  114. package/bmad/bmm/docs/quick-start.md +0 -366
  115. package/bmad/bmm/docs/scale-adaptive-system.md +0 -599
  116. package/bmad/bmm/docs/troubleshooting.md +0 -680
  117. package/bmad/bmm/docs/workflow-architecture-reference.md +0 -371
  118. package/bmad/bmm/docs/workflow-document-project-reference.md +0 -487
  119. package/bmad/bmm/docs/workflows-analysis.md +0 -670
  120. package/bmad/bmm/docs/workflows-implementation.md +0 -1758
  121. package/bmad/bmm/docs/workflows-planning.md +0 -1086
  122. package/bmad/bmm/docs/workflows-solutioning.md +0 -726
  123. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +0 -60
  124. package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +0 -238
  125. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +0 -27
  126. package/bmad/cis/README.md +0 -153
  127. package/bmad/cis/agents/README.md +0 -104
  128. package/bmad/cis/agents/brainstorming-coach.md +0 -62
  129. package/bmad/cis/agents/brainstorming-coach.md.bak +0 -62
  130. package/bmad/cis/agents/creative-problem-solver.md +0 -62
  131. package/bmad/cis/agents/creative-problem-solver.md.bak +0 -62
  132. package/bmad/cis/agents/design-thinking-coach.md +0 -62
  133. package/bmad/cis/agents/design-thinking-coach.md.bak +0 -62
  134. package/bmad/cis/agents/innovation-strategist.md +0 -62
  135. package/bmad/cis/agents/innovation-strategist.md.bak +0 -62
  136. package/bmad/cis/agents/storyteller.md +0 -59
  137. package/bmad/cis/agents/storyteller.md.bak +0 -59
  138. package/bmad/cis/config.yaml +0 -10
  139. package/bmad/cis/teams/creative-squad.yaml +0 -6
  140. package/bmad/cis/workflows/README.md +0 -139
  141. package/bmad/cis/workflows/design-thinking/README.md +0 -56
  142. package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
  143. package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
  144. package/bmad/cis/workflows/design-thinking/template.md +0 -111
  145. package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
  146. package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
  147. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
  148. package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
  149. package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
  150. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
  151. package/bmad/cis/workflows/problem-solving/README.md +0 -56
  152. package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
  153. package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
  154. package/bmad/cis/workflows/problem-solving/template.md +0 -165
  155. package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
  156. package/bmad/cis/workflows/storytelling/README.md +0 -58
  157. package/bmad/cis/workflows/storytelling/instructions.md +0 -291
  158. package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
  159. package/bmad/cis/workflows/storytelling/template.md +0 -113
  160. package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
  161. package/bmad/core/agents/bmad-master.md.bak +0 -71
@@ -1,487 +0,0 @@
1
- # Document Project Workflow - Technical Reference
2
-
3
- **Module:** BMM (BMAD Method Module)
4
- **Type:** Action Workflow (Documentation Generator)
5
-
6
- ---
7
-
8
- ## Purpose
9
-
10
- Analyzes and documents brownfield projects by scanning codebase, architecture, and patterns to create comprehensive reference documentation for AI-assisted development. Generates a master index and multiple documentation files tailored to project structure and type.
11
-
12
- **NEW in v1.2.0:** Context-safe architecture with scan levels, resumability, and write-as-you-go pattern to prevent context exhaustion.
13
-
14
- ---
15
-
16
- ## Key Features
17
-
18
- - **Multi-Project Type Support**: Handles web, backend, mobile, CLI, game, embedded, data, infra, library, desktop, and extension projects
19
- - **Multi-Part Detection**: Automatically detects and documents projects with separate client/server or multiple services
20
- - **Three Scan Levels** (NEW v1.2.0): Quick (2-5 min), Deep (10-30 min), Exhaustive (30-120 min)
21
- - **Resumability** (NEW v1.2.0): Interrupt and resume workflows without losing progress
22
- - **Write-as-you-go** (NEW v1.2.0): Documents written immediately to prevent context exhaustion
23
- - **Intelligent Batching** (NEW v1.2.0): Subfolder-based processing for deep/exhaustive scans
24
- - **Data-Driven Analysis**: Uses CSV-based project type detection and documentation requirements
25
- - **Comprehensive Scanning**: Analyzes APIs, data models, UI components, configuration, security patterns, and more
26
- - **Architecture Matching**: Matches projects to 170+ architecture templates from the solutioning registry
27
- - **Brownfield PRD Ready**: Generates documentation specifically designed for AI agents planning new features
28
-
29
- ---
30
-
31
- ## How to Invoke
32
-
33
- ```bash
34
- workflow document-project
35
- ```
36
-
37
- Or from BMAD CLI:
38
-
39
- ```bash
40
- /bmad:bmm:workflows:document-project
41
- ```
42
-
43
- ---
44
-
45
- ## Scan Levels (NEW in v1.2.0)
46
-
47
- Choose the right scan depth for your needs:
48
-
49
- ### 1. Quick Scan (Default)
50
-
51
- **Duration:** 2-5 minutes
52
- **What it does:** Pattern-based analysis without reading source files
53
- **Reads:** Config files, package manifests, directory structure, README
54
- **Use when:**
55
-
56
- - You need a fast project overview
57
- - Initial understanding of project structure
58
- - Planning next steps before deeper analysis
59
-
60
- **Does NOT read:** Source code files (_.js, _.ts, _.py, _.go, etc.)
61
-
62
- ### 2. Deep Scan
63
-
64
- **Duration:** 10-30 minutes
65
- **What it does:** Reads files in critical directories based on project type
66
- **Reads:** Files in critical paths defined by documentation requirements
67
- **Use when:**
68
-
69
- - Creating comprehensive documentation for brownfield PRD
70
- - Need detailed analysis of key areas
71
- - Want balance between depth and speed
72
-
73
- **Example:** For a web app, reads controllers/, models/, components/, but not every utility file
74
-
75
- ### 3. Exhaustive Scan
76
-
77
- **Duration:** 30-120 minutes
78
- **What it does:** Reads ALL source files in project
79
- **Reads:** Every source file (excludes node_modules, dist, build, .git)
80
- **Use when:**
81
-
82
- - Complete project analysis needed
83
- - Migration planning requires full understanding
84
- - Detailed audit of entire codebase
85
- - Deep technical debt assessment
86
-
87
- **Note:** Deep-dive mode ALWAYS uses exhaustive scan (no choice)
88
-
89
- ---
90
-
91
- ## Resumability (NEW in v1.2.0)
92
-
93
- The workflow can be interrupted and resumed without losing progress:
94
-
95
- - **State Tracking:** Progress saved in `project-scan-report.json`
96
- - **Auto-Detection:** Workflow detects incomplete runs (<24 hours old)
97
- - **Resume Prompt:** Choose to resume or start fresh
98
- - **Step-by-Step:** Resume from exact step where interrupted
99
- - **Archiving:** Old state files automatically archived
100
-
101
- **Example Resume Flow:**
102
-
103
- ```
104
- > workflow document-project
105
-
106
- I found an in-progress workflow state from 2025-10-11 14:32:15.
107
-
108
- Current Progress:
109
- - Mode: initial_scan
110
- - Scan Level: deep
111
- - Completed Steps: 5/12
112
- - Last Step: step_5
113
-
114
- Would you like to:
115
- 1. Resume from where we left off - Continue from step 6
116
- 2. Start fresh - Archive old state and begin new scan
117
- 3. Cancel - Exit without changes
118
-
119
- Your choice [1/2/3]:
120
- ```
121
-
122
- ---
123
-
124
- ## What It Does
125
-
126
- ### Step-by-Step Process
127
-
128
- 1. **Detects Project Structure** - Identifies if project is single-part or multi-part (client/server/etc.)
129
- 2. **Classifies Project Type** - Matches against 12 project types (web, backend, mobile, etc.)
130
- 3. **Discovers Documentation** - Finds existing README, CONTRIBUTING, ARCHITECTURE files
131
- 4. **Analyzes Tech Stack** - Parses package files, identifies frameworks, versions, dependencies
132
- 5. **Conditional Scanning** - Performs targeted analysis based on project type requirements:
133
- - API routes and endpoints
134
- - Database models and schemas
135
- - State management patterns
136
- - UI component libraries
137
- - Configuration and security
138
- - CI/CD and deployment configs
139
- 6. **Generates Source Tree** - Creates annotated directory structure with critical paths
140
- 7. **Extracts Dev Instructions** - Documents setup, build, run, and test commands
141
- 8. **Creates Architecture Docs** - Generates detailed architecture using matched templates
142
- 9. **Builds Master Index** - Creates comprehensive index.md as primary AI retrieval source
143
- 10. **Validates Output** - Runs 140+ point checklist to ensure completeness
144
-
145
- ### Output Files
146
-
147
- **Single-Part Projects:**
148
-
149
- - `index.md` - Master index
150
- - `project-overview.md` - Executive summary
151
- - `architecture.md` - Detailed architecture
152
- - `source-tree-analysis.md` - Annotated directory tree
153
- - `component-inventory.md` - Component catalog (if applicable)
154
- - `development-guide.md` - Local dev instructions
155
- - `api-contracts.md` - API documentation (if applicable)
156
- - `data-models.md` - Database schema (if applicable)
157
- - `deployment-guide.md` - Deployment process (optional)
158
- - `contribution-guide.md` - Contributing guidelines (optional)
159
- - `project-scan-report.json` - State file for resumability (NEW v1.2.0)
160
-
161
- **Multi-Part Projects (e.g., client + server):**
162
-
163
- - `index.md` - Master index with part navigation
164
- - `project-overview.md` - Multi-part summary
165
- - `architecture-{part_id}.md` - Per-part architecture docs
166
- - `source-tree-analysis.md` - Full tree with part annotations
167
- - `component-inventory-{part_id}.md` - Per-part components
168
- - `development-guide-{part_id}.md` - Per-part dev guides
169
- - `integration-architecture.md` - How parts communicate
170
- - `project-parts.json` - Machine-readable metadata
171
- - `project-scan-report.json` - State file for resumability (NEW v1.2.0)
172
- - Additional conditional files per part (API, data models, etc.)
173
-
174
- ---
175
-
176
- ## Data Files
177
-
178
- The workflow uses a single comprehensive CSV file:
179
-
180
- **documentation-requirements.csv** - Complete project analysis guide
181
-
182
- - Location: `/bmad/bmm/workflows/document-project/documentation-requirements.csv`
183
- - 12 project types (web, mobile, backend, cli, library, desktop, game, data, extension, infra, embedded)
184
- - 24 columns combining:
185
- - **Detection columns**: `project_type_id`, `key_file_patterns` (identifies project type from codebase)
186
- - **Requirement columns**: `requires_api_scan`, `requires_data_models`, `requires_ui_components`, etc.
187
- - **Pattern columns**: `critical_directories`, `test_file_patterns`, `config_patterns`, etc.
188
- - Self-contained: All project detection AND scanning requirements in one file
189
- - Architecture patterns inferred from tech stack (no external registry needed)
190
-
191
- ---
192
-
193
- ## Use Cases
194
-
195
- ### Primary Use Case: Brownfield PRD Creation
196
-
197
- After running this workflow, use the generated `index.md` as input to brownfield PRD workflows:
198
-
199
- ```
200
- User: "I want to add a new dashboard feature"
201
- PRD Workflow: Loads docs/index.md
202
- → Understands existing architecture
203
- → Identifies reusable components
204
- → Plans integration with existing APIs
205
- → Creates contextual PRD with epics and stories
206
- ```
207
-
208
- ### Other Use Cases
209
-
210
- - **Onboarding New Developers** - Comprehensive project documentation
211
- - **Architecture Review** - Structured analysis of existing system
212
- - **Technical Debt Assessment** - Identify patterns and anti-patterns
213
- - **Migration Planning** - Understand current state before refactoring
214
-
215
- ---
216
-
217
- ## Requirements
218
-
219
- ### Recommended Inputs (Optional)
220
-
221
- - Project root directory (defaults to current directory)
222
- - README.md or similar docs (auto-discovered if present)
223
- - User guidance on key areas to focus (workflow will ask)
224
-
225
- ### Tools Used
226
-
227
- - File system scanning (Glob, Read, Grep)
228
- - Code analysis
229
- - Git repository analysis (optional)
230
-
231
- ---
232
-
233
- ## Configuration
234
-
235
- ### Default Output Location
236
-
237
- Files are saved to: `{output_folder}` (from config.yaml)
238
-
239
- Default: `/docs/` folder in project root
240
-
241
- ### Customization
242
-
243
- - Modify `documentation-requirements.csv` to adjust scanning patterns for project types
244
- - Add new project types to `project-types.csv`
245
- - Add new architecture templates to `registry.csv`
246
-
247
- ---
248
-
249
- ## Example: Multi-Part Web App
250
-
251
- **Input:**
252
-
253
- ```
254
- my-app/
255
- ├── client/ # React frontend
256
- ├── server/ # Express backend
257
- └── README.md
258
- ```
259
-
260
- **Detection Result:**
261
-
262
- - Repository Type: Monorepo
263
- - Part 1: client (web/React)
264
- - Part 2: server (backend/Express)
265
-
266
- **Output (10+ files):**
267
-
268
- ```
269
- docs/
270
- ├── index.md
271
- ├── project-overview.md
272
- ├── architecture-client.md
273
- ├── architecture-server.md
274
- ├── source-tree-analysis.md
275
- ├── component-inventory-client.md
276
- ├── development-guide-client.md
277
- ├── development-guide-server.md
278
- ├── api-contracts-server.md
279
- ├── data-models-server.md
280
- ├── integration-architecture.md
281
- └── project-parts.json
282
- ```
283
-
284
- ---
285
-
286
- ## Example: Simple CLI Tool
287
-
288
- **Input:**
289
-
290
- ```
291
- hello-cli/
292
- ├── main.go
293
- ├── go.mod
294
- └── README.md
295
- ```
296
-
297
- **Detection Result:**
298
-
299
- - Repository Type: Monolith
300
- - Part 1: main (cli/Go)
301
-
302
- **Output (4 files):**
303
-
304
- ```
305
- docs/
306
- ├── index.md
307
- ├── project-overview.md
308
- ├── architecture.md
309
- └── source-tree-analysis.md
310
- ```
311
-
312
- ---
313
-
314
- ## Deep-Dive Mode
315
-
316
- ### What is Deep-Dive Mode?
317
-
318
- When you run the workflow on a project that already has documentation, you'll be offered a choice:
319
-
320
- 1. **Rescan entire project** - Update all documentation with latest changes
321
- 2. **Deep-dive into specific area** - Generate EXHAUSTIVE documentation for a particular feature/module/folder
322
- 3. **Cancel** - Keep existing documentation
323
-
324
- Deep-dive mode performs **comprehensive, file-by-file analysis** of a specific area, reading EVERY file completely and documenting:
325
-
326
- - All exports with complete signatures
327
- - All imports and dependencies
328
- - Dependency graphs and data flow
329
- - Code patterns and implementations
330
- - Testing coverage and strategies
331
- - Integration points
332
- - Reuse opportunities
333
-
334
- ### When to Use Deep-Dive Mode
335
-
336
- - **Before implementing a feature** - Deep-dive the area you'll be modifying
337
- - **During architecture review** - Deep-dive complex modules
338
- - **For code understanding** - Deep-dive unfamiliar parts of codebase
339
- - **When creating PRDs** - Deep-dive areas affected by new features
340
-
341
- ### Deep-Dive Process
342
-
343
- 1. Workflow detects existing `index.md`
344
- 2. Offers deep-dive option
345
- 3. Suggests areas based on project structure:
346
- - API route groups
347
- - Feature modules
348
- - UI component areas
349
- - Services/business logic
350
- 4. You select area or specify custom path
351
- 5. Workflow reads EVERY file in that area
352
- 6. Generates `deep-dive-{area-name}.md` with complete analysis
353
- 7. Updates `index.md` with link to deep-dive doc
354
- 8. Offers to deep-dive another area or finish
355
-
356
- ### Deep-Dive Output Example
357
-
358
- **docs/deep-dive-dashboard-feature.md:**
359
-
360
- - Complete file inventory (47 files analyzed)
361
- - Every export with signatures
362
- - Dependency graph
363
- - Data flow analysis
364
- - Integration points
365
- - Testing coverage
366
- - Related code references
367
- - Implementation guidance
368
- - ~3,000 LOC documented in detail
369
-
370
- ### Incremental Deep-Diving
371
-
372
- You can deep-dive multiple areas over time:
373
-
374
- - First run: Scan entire project → generates index.md
375
- - Second run: Deep-dive dashboard feature
376
- - Third run: Deep-dive API layer
377
- - Fourth run: Deep-dive authentication system
378
-
379
- All deep-dive docs are linked from the master index.
380
-
381
- ---
382
-
383
- ## Validation
384
-
385
- The workflow includes a comprehensive 160+ point checklist covering:
386
-
387
- - Project detection accuracy
388
- - Technology stack completeness
389
- - Codebase scanning thoroughness
390
- - Architecture documentation quality
391
- - Multi-part handling (if applicable)
392
- - Brownfield PRD readiness
393
- - Deep-dive completeness (if applicable)
394
-
395
- ---
396
-
397
- ## Next Steps After Completion
398
-
399
- 1. **Review** `docs/index.md` - Your master documentation index
400
- 2. **Validate** - Check generated docs for accuracy
401
- 3. **Use for PRD** - Point brownfield PRD workflow to index.md
402
- 4. **Maintain** - Re-run workflow when architecture changes significantly
403
-
404
- ---
405
-
406
- ## File Structure
407
-
408
- ```
409
- document-project/
410
- ├── workflow.yaml # Workflow configuration
411
- ├── instructions.md # Step-by-step workflow logic
412
- ├── checklist.md # Validation criteria
413
- ├── documentation-requirements.csv # Project type scanning patterns
414
- ├── templates/ # Output templates
415
- │ ├── index-template.md
416
- │ ├── project-overview-template.md
417
- │ └── source-tree-template.md
418
- └── README.md # This file
419
- ```
420
-
421
- ---
422
-
423
- ## Troubleshooting
424
-
425
- **Issue: Project type not detected correctly**
426
-
427
- - Solution: Workflow will ask for confirmation; manually select correct type
428
-
429
- **Issue: Missing critical information**
430
-
431
- - Solution: Provide additional context when prompted; re-run specific analysis steps
432
-
433
- **Issue: Multi-part detection missed a part**
434
-
435
- - Solution: When asked to confirm parts, specify the missing part and its path
436
-
437
- **Issue: Architecture template doesn't match well**
438
-
439
- - Solution: Check registry.csv; may need to add new template or adjust matching criteria
440
-
441
- ---
442
-
443
- ## Architecture Improvements in v1.2.0
444
-
445
- ### Context-Safe Design
446
-
447
- The workflow now uses a write-as-you-go architecture:
448
-
449
- - Documents written immediately to disk (not accumulated in memory)
450
- - Detailed findings purged after writing (only summaries kept)
451
- - State tracking enables resumption from any step
452
- - Batching strategy prevents context exhaustion on large projects
453
-
454
- ### Batching Strategy
455
-
456
- For deep/exhaustive scans:
457
-
458
- - Process ONE subfolder at a time
459
- - Read files → Extract info → Write output → Validate → Purge context
460
- - Primary concern is file SIZE (not count)
461
- - Track batches in state file for resumability
462
-
463
- ### State File Format
464
-
465
- Optimized JSON (no pretty-printing):
466
-
467
- ```json
468
- {
469
- "workflow_version": "1.2.0",
470
- "timestamps": {...},
471
- "mode": "initial_scan",
472
- "scan_level": "deep",
473
- "completed_steps": [...],
474
- "current_step": "step_6",
475
- "findings": {"summary": "only"},
476
- "outputs_generated": [...],
477
- "resume_instructions": "..."
478
- }
479
- ```
480
-
481
- ---
482
-
483
- **Related Documentation:**
484
-
485
- - [Brownfield Development Guide](./brownfield-guide.md)
486
- - [Implementation Workflows](./workflows-implementation.md)
487
- - [Scale Adaptive System](./scale-adaptive-system.md)