bmad-module-skill-forge 0.6.0 → 0.7.0

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 (136) hide show
  1. package/README.md +2 -2
  2. package/docs/agents.md +9 -5
  3. package/docs/concepts.md +17 -13
  4. package/docs/examples.md +19 -4
  5. package/docs/getting-started.md +34 -19
  6. package/docs/how-it-works.md +85 -84
  7. package/docs/index.md +1 -1
  8. package/docs/workflows.md +88 -40
  9. package/package.json +1 -1
  10. package/src/agents/forger.agent.yaml +17 -5
  11. package/src/forger/README.md +1 -1
  12. package/src/forger/forge-tier.yaml +2 -1
  13. package/src/forger/preferences.yaml +5 -7
  14. package/src/knowledge/agentskills-spec.md +1 -1
  15. package/src/knowledge/architecture-verification.md +102 -0
  16. package/src/knowledge/ccc-bridge.md +1 -1
  17. package/src/knowledge/confidence-tiers.md +12 -1
  18. package/src/knowledge/doc-fetcher.md +1 -1
  19. package/src/knowledge/manual-section-integrity.md +2 -2
  20. package/src/knowledge/overview.md +10 -7
  21. package/src/knowledge/progressive-capability.md +3 -2
  22. package/src/knowledge/qmd-registry.md +4 -1
  23. package/src/knowledge/skf-knowledge-index.csv +1 -0
  24. package/src/knowledge/skill-lifecycle.md +26 -2
  25. package/src/knowledge/split-body-strategy.md +16 -2
  26. package/src/knowledge/zero-hallucination.md +11 -8
  27. package/src/module-help.csv +9 -6
  28. package/src/module.yaml +3 -0
  29. package/src/workflows/README.md +35 -17
  30. package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
  31. package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
  32. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
  33. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
  34. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
  35. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +1 -1
  36. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
  37. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
  38. package/src/workflows/analyze-source/workflow.md +2 -2
  39. package/src/workflows/audit-skill/data/severity-rules.md +1 -1
  40. package/src/workflows/audit-skill/steps-c/step-01-init.md +1 -0
  41. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +5 -0
  42. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
  43. package/src/workflows/audit-skill/workflow.md +2 -1
  44. package/src/workflows/brief-skill/data/scope-templates.md +10 -0
  45. package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
  46. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
  47. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
  48. package/src/workflows/create-skill/data/skill-sections.md +12 -11
  49. package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
  50. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +13 -9
  51. package/src/workflows/create-skill/steps-c/step-03-extract.md +15 -19
  52. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
  53. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
  54. package/src/workflows/create-skill/steps-c/step-04-enrich.md +1 -1
  55. package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
  56. package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
  57. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
  58. package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
  59. package/src/workflows/create-skill/workflow.md +2 -2
  60. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
  61. package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
  62. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +23 -7
  63. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
  64. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
  65. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
  66. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +30 -2
  67. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
  68. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
  69. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
  70. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
  71. package/src/workflows/create-stack-skill/workflow.md +2 -2
  72. package/src/workflows/export-skill/data/managed-section-format.md +8 -1
  73. package/src/workflows/export-skill/data/snippet-format.md +1 -1
  74. package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
  75. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  76. package/src/workflows/export-skill/workflow.md +3 -1
  77. package/src/workflows/quick-skill/data/skill-template.md +18 -6
  78. package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
  79. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  80. package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
  81. package/src/workflows/quick-skill/workflow.md +1 -1
  82. package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
  83. package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
  84. package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
  85. package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
  86. package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
  87. package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
  88. package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
  89. package/src/workflows/refine-architecture/workflow.md +61 -0
  90. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
  91. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +1 -1
  92. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
  93. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
  94. package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
  95. package/src/workflows/setup-forge/workflow.md +3 -2
  96. package/src/workflows/test-skill/data/scoring-rules.md +3 -0
  97. package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
  98. package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
  99. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
  100. package/src/workflows/test-skill/workflow.md +2 -2
  101. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
  102. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +5 -2
  103. package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
  104. package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
  105. package/src/workflows/update-skill/workflow.md +1 -1
  106. package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
  107. package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
  108. package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
  109. package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
  110. package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
  111. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
  112. package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
  113. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
  114. package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
  115. package/src/workflows/verify-stack/workflow.md +61 -0
  116. package/src/workflows/analyze-source/validation-report.md +0 -657
  117. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
  118. package/src/workflows/audit-skill/validation-report.md +0 -545
  119. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
  120. package/src/workflows/brief-skill/validation-report.md +0 -630
  121. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
  122. package/src/workflows/create-skill/validation-report.md +0 -189
  123. package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
  124. package/src/workflows/create-stack-skill/validation-report.md +0 -401
  125. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
  126. package/src/workflows/export-skill/validation-report.md +0 -263
  127. package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
  128. package/src/workflows/quick-skill/validation-report.md +0 -543
  129. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
  130. package/src/workflows/setup-forge/validation-report.md +0 -504
  131. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
  132. package/src/workflows/test-skill/validation-report.md +0 -390
  133. package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
  134. package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
  135. package/src/workflows/update-skill/validation-report.md +0 -559
  136. package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
@@ -1,385 +0,0 @@
1
- ---
2
- conversionFrom: 'src/workflows/analyze-source/analyze-source.spec.md'
3
- originalFormat: 'workflow-spec-placeholder'
4
- stepsCompleted: ['step-00-conversion', 'step-02-classification', 'step-03-requirements', 'step-04-tools', 'step-05-plan-review', 'step-06-design', 'step-07-foundation', 'step-08-build-step-01', 'step-09-build-remaining-steps']
5
- created: 2026-02-27
6
- status: BUILD_COMPLETE
7
- validationStatus: COMPLETE
8
- validationDate: 2026-02-27
9
- validationReport: './validation-report.md'
10
- approvedDate: 2026-02-27
11
- ---
12
-
13
- # Workflow Creation Plan
14
-
15
- ## Conversion Source
16
-
17
- **Original Path:** src/workflows/analyze-source/analyze-source.spec.md
18
- **Original Format:** Workflow specification (placeholder — not yet built)
19
- **Detected Structure:** Single spec document defining a create-only, 6-step workflow for brownfield source code analysis and skill decomposition
20
-
21
- ---
22
-
23
- ## Original Workflow Analysis
24
-
25
- ### Goal (from source)
26
-
27
- Decomposition engine — discover what to skill, recommend stack skill. Analyzes a large repo or multi-service project to identify discrete skillable units. Maps exports, service boundaries, and integration points. Produces N recommended skill-brief.yaml files and optionally recommends a stack skill. Primary entry point for brownfield onboarding.
28
-
29
- ### Original Steps (Complete List)
30
-
31
- **Step 1:** scan-project - Map project structure, detect service boundaries
32
- **Step 2:** identify-units - Identify discrete skillable units (services, libraries, modules)
33
- **Step 3:** map-exports - Count and categorize exports per unit
34
- **Step 4:** detect-integrations - Find cross-unit integration points
35
- **Step 5:** recommend - Present recommendations with rationale
36
- **Step 6:** generate-briefs - Create skill-brief.yaml per confirmed unit
37
-
38
- ### Output / Deliverable
39
-
40
- - N x `{forge_data_folder}/{unit-name}/skill-brief.yaml` — One per recommended unit
41
- - Analysis summary report
42
-
43
- ### Input Requirements
44
-
45
- **Required:**
46
- - Project root or repo path
47
-
48
- **Optional:**
49
- - Scope hints (monorepo packages, service directories)
50
-
51
- ### Key Instructions to LLM
52
-
53
- - Primary agent: Ferris (Architect mode)
54
- - Workflow type: Feature — discovery and planning
55
- - Create-only mode (steps-c/ only, no edit or validate modes)
56
- - Installed path: {project-root}/_bmad/skf/workflows/analyze-source
57
- - web_bundle: true
58
-
59
- ---
60
-
61
- ## Conversion Notes
62
-
63
- **What works well in original:**
64
- - Clear 6-step decomposition pipeline with logical progression (scan → identify → map → detect → recommend → generate)
65
- - Well-defined input/output contract (repo path in, skill-brief.yaml files out)
66
- - Spec identifies the right granularity for brownfield analysis
67
- - Correct positioning as brownfield entry point — gateway workflow before brief-skill → create-skill pipeline
68
-
69
- **What needs improvement:**
70
- - Spec is a placeholder with no implementation — steps need full instruction content
71
- - No collaborative interaction patterns defined (menus, user decision points)
72
- - No data files, templates, or supporting resources specified
73
- - Missing details on how "skillable units" are defined and bounded (what boundaries define a discrete unit?)
74
- - No tier awareness — all other SKF workflows use tier-dependent tooling (Quick=text patterns, Forge=AST, Deep=AST+QMD)
75
- - No forge_data_folder integration despite referencing it for output paths
76
- - No stack skill detection — should flag potential co-integrated library candidates for create-stack-skill
77
-
78
- **Compliance gaps identified:**
79
- - No workflow.md entry point file
80
- - No step files exist yet (steps-c/ folder needs creation)
81
- - No frontmatter with BMAD-required fields on steps
82
- - No menu handling or continuation patterns
83
- - No data/ or templates/ resources
84
- - No validation mode (spec marks as create-only, but validation could add value)
85
-
86
- ---
87
-
88
- ## Memory-Informed Discovery Notes
89
-
90
- ### Preserve
91
- - 6-step linear pipeline matching proven architecture across all SKF workflows (quick-skill, brief-skill, create-stack-skill)
92
- - Brownfield entry point positioning in the SKF lifecycle
93
-
94
- ### Address
95
- - Define "skillable unit" detection heuristics (service boundaries, package boundaries, independent entry points)
96
- - Add tier-aware scanning: Quick (file structure only), Forge (AST analysis), Deep (semantic analysis with QMD)
97
- - Connect to SKF config infrastructure (forge_data_folder, skills_output_folder)
98
- - SKF module config.yaml doesn't exist yet — workflow needs graceful handling or setup-forge prerequisite
99
-
100
- ### Add
101
- - Interactive recommendation gate at step 05 — user confirms/rejects each unit before brief generation (matches Gate pattern from create-stack-skill and brief-skill)
102
- - Output aligned to skill-brief.yaml schema (9 required fields: name, version, source_repo, language, scope, description, forge_tier, created, created_by)
103
- - Scope type detection per unit (full-library / specific-modules / public-api)
104
- - Existing skill detection — check forge_data_folder for already-created skills to avoid duplicates
105
- - Stack skill candidate flagging for units with strong co-integration patterns
106
-
107
- ### Audience
108
- - Ferris in Architect mode — prescriptive precision, zero-hallucination, file:line citation tracing
109
- - Developers onboarding existing multi-service projects needing automated decomposition
110
-
111
- ---
112
-
113
- ## Classification Decisions
114
-
115
- **Workflow Name:** analyze-source
116
- **Target Path:** {project-root}/_bmad/skf/workflows/analyze-source/
117
-
118
- **4 Key Decisions:**
119
- 1. **Document Output:** true — produces N x skill-brief.yaml files + analysis summary report
120
- 2. **Module Affiliation:** skf — core SKF workflow with access to forge_data_folder, skills_output_folder, forge_tier
121
- 3. **Session Type:** continuable — large repos will consume massive tokens during scanning/mapping; needs step-01b-continue.md and stepsCompleted tracking
122
- 4. **Lifecycle Support:** create-only — discovery workflow is one-shot per project; re-analysis creates fresh rather than editing stale results
123
-
124
- **Structure Implications:**
125
- - Needs steps-c/ directory only (no steps-e/ or steps-v/)
126
- - Needs step-01-init.md with continuation detection logic
127
- - Needs step-01b-continue.md for resuming interrupted analysis
128
- - Needs stepsCompleted tracking in output document frontmatter
129
- - Output uses free-form template with progressive append
130
- - Data folder for unit detection heuristics and skill-brief schema reference
131
-
132
- ---
133
-
134
- ## Requirements
135
-
136
- **Flow Structure:**
137
- - Pattern: Linear with strategic user gate
138
- - Phases: Discovery (steps 01-04), Decision (step 05), Generation (step 06)
139
- - Estimated steps: 6 create steps + 1 continuation step (step-01b) = 7 step files
140
- - Output pattern: Plan-then-Build — steps 01-05 build analysis report, step 06 consumes report to generate skill-brief.yaml files
141
-
142
- **User Interaction:**
143
- - Style: Mixed — mostly autonomous discovery with collaborative gates
144
- - Decision points:
145
- - Step 05: Confirm/reject each recommended skillable unit
146
- - Step 05: Flag stack skill candidates for create-stack-skill
147
- - Step 06: Final confirmation before writing files
148
- - Checkpoint frequency: Auto-proceed steps 01-04, full gate at step 05, summary at step 06
149
-
150
- **Inputs Required:**
151
- - Required: Project root or repo path
152
- - Required: SKF module config (forge_data_folder, skills_output_folder, forge_tier)
153
- - Required: forge-tier.yaml (determines Quick/Forge/Forge+/Deep analysis depth)
154
- - Optional: Scope hints (monorepo packages, service directories to focus on)
155
- - Optional: Exclusion patterns (vendor dirs, test dirs, generated code to skip)
156
- - Prerequisites: setup-forge workflow must have been run
157
- - Init check: Scan forge_data_folder for existing skills to avoid duplicate recommendations
158
-
159
- **Output Specifications:**
160
- - Type: Multi-file document output
161
- - Analysis summary report: Structured format (Project Overview, Units Found, Integration Map, Recommendations, Generation Results)
162
- - Skill-brief.yaml files: Strict format per schema (9 required fields: name, version, source_repo, language, scope, description, forge_tier, created, created_by)
163
- - Output locations: skill-brief.yaml → {forge_data_folder}/{unit-name}/skill-brief.yaml, summary → {output_folder}/analyze-source-report-{project_name}.md
164
- - Frequency: N briefs per run (one per confirmed unit)
165
-
166
- **Success Criteria:**
167
- - Complete project scan — all service boundaries, packages, and entry points mapped
168
- - Every identified unit classified with clear boundary definition (scope type: full-library / specific-modules / public-api)
169
- - Integration points documented — cross-unit dependencies and co-import patterns captured
170
- - Stack skill candidates flagged for create-stack-skill
171
- - Existing skills detected — units with skills in forge_data_folder flagged as skip/update
172
- - User confirmed all recommendations before generation
173
- - Generated skill-brief.yaml files validate — all 9 fields present, name uniqueness enforced, scope has >= 1 include pattern
174
- - Downstream ready — each brief consumable by brief-skill or create-skill pipeline
175
-
176
- **Instruction Style:**
177
- - Overall: Prescriptive with Ferris Architect mode
178
- - Zero-hallucination — only report what's found in codebase
179
- - File:line citation tracing — every claim backed by evidence
180
- - Step 05 uses prescriptive presentation with collaborative discussion (user can ask "why?", Ferris explains with evidence)
181
- - Positive capability framing throughout
182
-
183
- ---
184
-
185
- ## Workflow Design Preview
186
-
187
- **Step count:** 5 create steps + 1 continuation step (step-01b) = 6 step files
188
-
189
- **Phase 0 — Initialization (step-01-init / step-01b-continue)**
190
- - Load SKF config, forge-tier.yaml, check existing skills
191
- - Accept project root + optional scope hints
192
- - Continuation detection and resume logic
193
-
194
- **Phase 1 — Discovery (steps 02-04, autonomous)**
195
- - Step 02: scan-project — Map project structure, detect service boundaries, package manifests
196
- - Step 03: identify-units — Classify discrete skillable units, assign scope types
197
- - Step 04: map-and-detect — Count/categorize exports per unit AND find cross-unit integration points, flag stack skill candidates
198
-
199
- **Phase 2 — Decision (step 05, collaborative gate)**
200
- - Step 05: recommend — Present findings with rationale, show conflicts, user confirms/rejects each unit
201
-
202
- **Phase 3 — Generation (step 06, autonomous)**
203
- - Step 06: generate-briefs — Create skill-brief.yaml per confirmed unit, write analysis summary, present final results
204
-
205
- ---
206
-
207
- ## Tools Configuration
208
-
209
- **Core BMAD Tools:**
210
- - **Party Mode:** available at step-05 (recommend) — included as optional [P] menu for creative exploration during collaborative unit review
211
- - **Advanced Elicitation:** included as optional [A] menu at Step 05 only — quality gate for challenging unit boundary decisions
212
- - **Brainstorming:** excluded — no ideation needed in code analysis
213
-
214
- **LLM Features:**
215
- - **Web-Browsing:** excluded — workflow analyzes local source code, not external resources
216
- - **File I/O:** included — core to every step (reads project files, writes skill-brief.yaml + summary report)
217
- - **Sub-Agents:** excluded — sequential approach sufficient for v1
218
- - **Sub-Processes:** excluded — brief generation is lightweight, parallelization not needed
219
-
220
- **Memory:**
221
- - Type: continuable
222
- - Tracking: stepsCompleted array, lastStep, lastContinued in output frontmatter
223
- - State document: analysis summary report serves as persistent state (no sidecar needed)
224
- - Step state: discovered units list, integration map, existing skills, confirmed units — all accumulate in report sections
225
-
226
- **External Integrations:**
227
- - None — fully self-contained, local filesystem only
228
-
229
- **Installation Requirements:**
230
- - None — all tools are built-in
231
-
232
- ---
233
-
234
- ## Workflow Design
235
-
236
- ### Step Sequence
237
-
238
- | Step | Name | Type | Menu | Goal |
239
- |------|------|------|------|------|
240
- | 01 | init | Init (Continuable) | Auto-proceed | Load config, check continuation, accept project path, check existing skills, create report |
241
- | 01b | continue | Continuation | Auto-proceed | Read stepsCompleted from report, route to resume point |
242
- | 02 | scan-project | Middle (Simple) | C-only | Map project structure, detect service boundaries, package manifests |
243
- | 03 | identify-units | Middle (Simple) | C-only | Classify discrete skillable units with scope types |
244
- | 04 | map-and-detect | Middle (Simple) | C-only | Map exports per unit, detect cross-unit integrations, flag stack candidates |
245
- | 05 | recommend | Middle (Standard) | A/P/C | Present all findings with rationale, user confirms/rejects each unit |
246
- | 06 | generate-briefs | Final | None | Generate skill-brief.yaml per confirmed unit, write summary, recommend next workflow |
247
-
248
- ### Data Flow
249
-
250
- ```
251
- Step 01 → Creates analysis-report.md from template
252
- Step 02 → Appends "## Project Scan" section
253
- Step 03 → Appends "## Identified Units" section
254
- Step 04 → Appends "## Export Map" + "## Integration Points" sections
255
- Step 05 → Appends "## Recommendations" section (with user confirmations)
256
- Step 06 → Reads report → generates N skill-brief.yaml → appends "## Generation Results"
257
- ```
258
-
259
- ### File Structure
260
-
261
- ```
262
- analyze-source/
263
- ├── workflow.md
264
- ├── data/
265
- │ ├── unit-detection-heuristics.md # Rules for identifying skillable units
266
- │ └── skill-brief-schema.md # Schema for skill-brief.yaml (9 fields)
267
- ├── templates/
268
- │ └── analysis-report-template.md # Output document template
269
- └── steps-c/
270
- ├── step-01-init.md
271
- ├── step-01b-continue.md
272
- ├── step-02-scan-project.md
273
- ├── step-03-identify-units.md
274
- ├── step-04-map-and-detect.md
275
- ├── step-05-recommend.md
276
- └── step-06-generate-briefs.md
277
- ```
278
-
279
- ### Subprocess Optimization
280
-
281
- | Step | Pattern | What | Fallback |
282
- |------|---------|------|----------|
283
- | 02 | Pattern 1 (Grep/Regex) | Scan directory structure for manifests, entry points, service configs across entire project | Sequential file reads in main thread |
284
- | 04 | Pattern 2 (Per-file analysis) | Per-unit export mapping and integration detection | Analyze units sequentially in main thread |
285
-
286
- ### Workflow Chaining
287
-
288
- **Prerequisites:**
289
- - setup-forge (required) — produces forge-tier.yaml
290
-
291
- **Downstream recommendations (step 06):**
292
- - brief-skill — for units needing detailed scoping refinement
293
- - create-skill — for units where generated briefs are sufficient
294
- - create-stack-skill — for flagged stack skill candidates
295
-
296
- **Output contract:**
297
- - `{forge_data_folder}/{unit-name}/skill-brief.yaml` — per confirmed unit
298
- - `{output_folder}/analyze-source-report-{project_name}.md` — analysis summary
299
- - Frontmatter: workflowType: 'analyze-source', nextWorkflow, stepsCompleted
300
-
301
- ### Error Handling
302
-
303
- | Scenario | Response |
304
- |----------|----------|
305
- | Missing forge-tier.yaml | Hard halt — "Run setup-forge first" |
306
- | No skillable units found | Advisory exit — document empty scan results |
307
- | Unit analysis partially fails | Continue with warnings, document gaps |
308
- | Existing skill conflicts | Flag in recommendations, suggest update-skill |
309
- | Project path invalid | Hard halt — request valid path |
310
-
311
- ### Role and Persona
312
-
313
- - Ferris in Architect mode — prescriptive precision
314
- - Zero-hallucination — only report what's found in codebase
315
- - File:line citation tracing for all claims
316
- - Tier-aware analysis depth: Quick (file structure), Forge (AST), Deep (AST+QMD)
317
-
318
- ---
319
-
320
- ## Foundation Build Complete
321
-
322
- **Created:**
323
- - Folder structure at: `_bmad-output/bmb-creations/workflows/analyze-source/`
324
- - `workflow.md` — entry point with SKF config loading, subprocess fallback rule, tier-aware analysis principle
325
- - `templates/analysis-report-template.md` — structured output with frontmatter tracking (stepsCompleted, confirmed_units, stack_skill_candidates, existing_skills)
326
- - `data/skill-brief-schema.md` — 9-field schema with validation rules and YAML template
327
- - `data/unit-detection-heuristics.md` — detection signals (strong/moderate/weak), boundary classification, disqualification rules, stack skill candidate detection, tier-aware scanning depth
328
-
329
- **Configuration:**
330
- - Workflow name: analyze-source
331
- - Continuable: yes
332
- - Document output: yes — Structured report + Strict YAML
333
- - Mode: create-only
334
-
335
- **Next Steps:**
336
- - Step 8: Build step-01-init (and step-01b-continue) ✅
337
- - Step 9: Build remaining steps (02 through 06)
338
-
339
- ---
340
-
341
- ## Step 01 Build Complete
342
-
343
- **Created:**
344
- - steps-c/step-01-init.md — continuable init with forge-tier check, project path collection, existing skill scan, auto-proceed
345
- - steps-c/step-01b-continue.md — continuation handler with progress summary and step routing
346
-
347
- **Step Configuration:**
348
- - Type: Continuable init (auto-proceed)
349
- - Input Discovery: No (but checks forge-tier.yaml prerequisite and existing skills)
350
- - Next Step: step-02-scan-project
351
- - Menu: Auto-proceed (no A/P — init step)
352
-
353
- **Key Implementation Details:**
354
- - Hard halt if forge-tier.yaml missing (directs to setup-forge)
355
- - Scans forge_data_folder for existing skill-brief.yaml files
356
- - Populates report frontmatter with project_path, forge_tier, existing_skills
357
- - step-01b reads stepsCompleted to determine resume point and presents progress summary
358
-
359
- ---
360
-
361
- ## Steps 02-06 Build Complete
362
-
363
- **Created:**
364
- - steps-c/step-02-scan-project.md — Middle (Simple), C-only menu. Subprocess Pattern 1 for directory structure scanning. Maps directory tree, workspace configs, package manifests, entry points, service configs. Detects service boundaries with confidence levels. Presents scan results for user confirmation.
365
- - steps-c/step-03-identify-units.md — Middle (Simple), C-only menu. Applies detection heuristics to each boundary. Classifies boundary type (service/package/module/library) and scope type (full-library/specific-modules/public-api). Runs disqualification checks. Cross-references existing_skills. Detects primary language per unit.
366
- - steps-c/step-04-map-and-detect.md — Middle (Simple), C-only menu. Subprocess Pattern 2 (per-unit analysis). Maps export surfaces with tier-appropriate depth. Builds import graph cross-reference matrix. Detects integration points with coupling strength. Flags stack skill candidates using 4 indicators.
367
- - steps-c/step-05-recommend.md — Middle (Standard), A/P/C menu. Collaborative gate — the primary user decision point. Builds recommendation cards with evidence-based rationale and proposed brief fields. User confirms (Y), rejects (N), or modifies (M) each unit. Addresses stack skill candidates. Requires final confirmation before proceeding.
368
- - steps-c/step-06-generate-briefs.md — Final step, no menu. Generates skill-brief.yaml per confirmed unit using schema. Validates all 9 required fields. Presents generation preview for user confirmation before writing. Recommends next workflow per unit (create-skill, brief-skill, create-stack-skill, update-skill). Marks workflow complete.
369
-
370
- **Step Configuration Summary:**
371
-
372
- | Step | Type | Menu | Key Feature |
373
- |------|------|------|-------------|
374
- | 02 | Middle (Simple) | C-only | Subprocess Pattern 1 for broad scanning |
375
- | 03 | Middle (Simple) | C-only | Heuristic-based classification with disqualification |
376
- | 04 | Middle (Simple) | C-only | Subprocess Pattern 2 for per-unit deep analysis |
377
- | 05 | Middle (Standard) | A/P/C | Collaborative gate — user confirms each unit |
378
- | 06 | Final | None | Schema-validated YAML generation with next workflow recommendations |
379
-
380
- **Data Flow Verification:**
381
- - Step 02 appends "## Project Scan" → Step 03 reads boundaries from it
382
- - Step 03 appends "## Identified Units" → Step 04 reads qualifying units from it
383
- - Step 04 appends "## Export Map" + "## Integration Points" → Step 05 reads all analysis data
384
- - Step 05 appends "## Recommendations" + populates confirmed_units → Step 06 reads confirmed units
385
- - Step 06 appends "## Generation Results" + writes skill-brief.yaml files → Workflow complete