bmad-module-skill-forge 0.5.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 (149) hide show
  1. package/README.md +4 -3
  2. package/docs/agents.md +12 -5
  3. package/docs/concepts.md +37 -15
  4. package/docs/examples.md +49 -5
  5. package/docs/getting-started.md +43 -17
  6. package/docs/how-it-works.md +115 -90
  7. package/docs/index.md +2 -2
  8. package/docs/workflows.md +89 -41
  9. package/package.json +2 -2
  10. package/src/agents/forger.agent.yaml +18 -6
  11. package/src/forger/README.md +1 -1
  12. package/src/forger/forge-tier.yaml +18 -1
  13. package/src/forger/preferences.yaml +6 -8
  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 +110 -0
  17. package/src/knowledge/confidence-tiers.md +14 -3
  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 -6
  21. package/src/knowledge/progressive-capability.md +15 -6
  22. package/src/knowledge/qmd-registry.md +18 -1
  23. package/src/knowledge/skf-knowledge-index.csv +3 -1
  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 +4 -1
  29. package/src/workflows/README.md +36 -18
  30. package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
  31. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +1 -0
  32. package/src/workflows/analyze-source/steps-c/step-01-init.md +4 -4
  33. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
  34. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
  35. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
  36. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +8 -4
  37. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
  38. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
  39. package/src/workflows/analyze-source/workflow.md +2 -2
  40. package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
  41. package/src/workflows/audit-skill/data/severity-rules.md +1 -1
  42. package/src/workflows/audit-skill/steps-c/step-01-init.md +3 -2
  43. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +23 -1
  44. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +6 -6
  45. package/src/workflows/audit-skill/workflow.md +3 -2
  46. package/src/workflows/brief-skill/data/scope-templates.md +10 -0
  47. package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
  48. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +4 -4
  49. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
  50. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
  51. package/src/workflows/create-skill/data/extraction-patterns.md +37 -1
  52. package/src/workflows/create-skill/data/skill-sections.md +14 -13
  53. package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
  54. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +18 -12
  55. package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
  56. package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
  57. package/src/workflows/create-skill/steps-c/step-03-extract.md +25 -20
  58. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +8 -8
  59. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
  60. package/src/workflows/create-skill/steps-c/step-04-enrich.md +9 -9
  61. package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
  62. package/src/workflows/create-skill/steps-c/step-06-validate.md +3 -3
  63. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +60 -39
  64. package/src/workflows/create-skill/steps-c/step-08-report.md +26 -11
  65. package/src/workflows/create-skill/workflow.md +3 -3
  66. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
  67. package/src/workflows/create-stack-skill/data/stack-skill-template.md +29 -7
  68. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -8
  69. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
  70. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
  71. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
  72. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +40 -2
  73. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
  74. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
  75. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +4 -4
  76. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
  77. package/src/workflows/create-stack-skill/workflow.md +3 -3
  78. package/src/workflows/export-skill/data/managed-section-format.md +8 -1
  79. package/src/workflows/export-skill/data/snippet-format.md +1 -1
  80. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +1 -1
  81. package/src/workflows/export-skill/steps-c/step-02-package.md +1 -1
  82. package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
  83. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  84. package/src/workflows/export-skill/workflow.md +3 -1
  85. package/src/workflows/quick-skill/data/skill-template.md +24 -4
  86. package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
  87. package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
  88. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  89. package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
  90. package/src/workflows/quick-skill/workflow.md +1 -1
  91. package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
  92. package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
  93. package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
  94. package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
  95. package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
  96. package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
  97. package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
  98. package/src/workflows/refine-architecture/workflow.md +61 -0
  99. package/src/workflows/setup-forge/data/tier-rules.md +16 -6
  100. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +33 -15
  101. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
  102. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +29 -12
  103. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
  104. package/src/workflows/setup-forge/steps-c/step-04-report.md +16 -4
  105. package/src/workflows/setup-forge/workflow.md +4 -3
  106. package/src/workflows/test-skill/data/scoring-rules.md +8 -0
  107. package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
  108. package/src/workflows/test-skill/steps-c/step-01-init.md +3 -2
  109. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
  110. package/src/workflows/test-skill/templates/test-report-template.md +3 -0
  111. package/src/workflows/test-skill/workflow.md +2 -2
  112. package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
  113. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
  114. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +24 -4
  115. package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
  116. package/src/workflows/update-skill/steps-c/step-06-write.md +7 -4
  117. package/src/workflows/update-skill/workflow.md +1 -1
  118. package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
  119. package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
  120. package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
  121. package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
  122. package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
  123. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
  124. package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
  125. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
  126. package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
  127. package/src/workflows/verify-stack/workflow.md +61 -0
  128. package/tools/cli/commands/status.js +2 -1
  129. package/src/workflows/analyze-source/validation-report.md +0 -657
  130. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
  131. package/src/workflows/audit-skill/validation-report.md +0 -545
  132. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
  133. package/src/workflows/brief-skill/validation-report.md +0 -630
  134. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
  135. package/src/workflows/create-skill/validation-report.md +0 -189
  136. package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -523
  137. package/src/workflows/create-stack-skill/validation-report.md +0 -401
  138. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
  139. package/src/workflows/export-skill/validation-report.md +0 -263
  140. package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
  141. package/src/workflows/quick-skill/validation-report.md +0 -543
  142. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
  143. package/src/workflows/setup-forge/validation-report.md +0 -504
  144. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -428
  145. package/src/workflows/test-skill/validation-report.md +0 -390
  146. package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
  147. package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
  148. package/src/workflows/update-skill/validation-report.md +0 -559
  149. package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: 'step-03-integrations'
3
+ description: 'Pass 2 — cross-reference API surfaces between library pairs based on integration claims in the architecture document'
4
+
5
+ nextStepFile: './step-04-requirements.md'
6
+ integrationRulesData: '../data/integration-verification-rules.md'
7
+ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
8
+ ---
9
+
10
+ # Step 3: Integration Verification
11
+
12
+ ## STEP GOAL:
13
+
14
+ Cross-reference API surfaces between library pairs that the architecture document claims work together. For each integration pair, verify language compatibility, protocol alignment, type compatibility, and documentation cross-references. Produce an evidence-backed verdict for each integration.
15
+
16
+ ## MANDATORY EXECUTION RULES (READ FIRST):
17
+
18
+ ### Universal Rules:
19
+
20
+ - 📖 CRITICAL: Read the complete step file before taking any action
21
+ - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
22
+ - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
23
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
24
+
25
+ ### Role Reinforcement:
26
+
27
+ - ✅ You are a stack verification analyst performing integration feasibility analysis
28
+ - ✅ Every verdict must cite evidence from the actual skill content — no speculation
29
+ - ✅ Apply the verification protocol strictly — do not skip compatibility checks
30
+
31
+ ### Step-Specific Rules:
32
+
33
+ - 🎯 Focus ONLY on integration pair verification using skill API surfaces
34
+ - 🚫 FORBIDDEN to evaluate requirements coverage — that is Step 04
35
+ - 🚫 FORBIDDEN to parse Mermaid diagrams — use prose-based co-mention analysis only
36
+ - 💬 Every verdict MUST include evidence citations from the skills
37
+
38
+ ## EXECUTION PROTOCOLS:
39
+
40
+ - 🎯 Extract integration claims from architecture document prose
41
+ - 💾 Load skill API surfaces and cross-reference each integration pair
42
+ - 📖 Append Integration Verdicts section to {outputFile}
43
+ - 🚫 Only integration analysis — no requirements checking, no synthesis
44
+
45
+ ## CONTEXT BOUNDARIES:
46
+
47
+ - Available: Architecture document content, skill SKILL.md and metadata.json files, integration verification rules
48
+ - Focus: Pairwise integration compatibility between skills
49
+ - Limits: Only verify pairs explicitly claimed in the architecture document — do not invent integration relationships
50
+ - Dependencies: Step 01 (skill inventory), Step 02 (coverage matrix — only verify skills that exist)
51
+
52
+ ## MANDATORY SEQUENCE
53
+
54
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
55
+
56
+ ### 1. Load Integration Verification Rules
57
+
58
+ Load `{integrationRulesData}` for the cross-reference verification protocol.
59
+
60
+ Extract: verification checks (language boundary, protocol compatibility, type compatibility, documentation cross-reference), verdict criteria, and evidence requirements.
61
+
62
+ ### 2. Extract Integration Claims
63
+
64
+ Parse the architecture document for statements describing two or more technologies working together.
65
+
66
+ **Detection method — prose-based co-mention analysis:**
67
+ - Identify sentences or paragraphs where two or more technology names appear together
68
+ - Look for integration verbs: "connects to", "communicates with", "wraps", "extends", "consumes", "produces", "bridges", "integrates with", "sits between"
69
+ - Look for data flow descriptions: "{A} sends data to {B}", "{A} results are consumed by {B}"
70
+ - Look for layer boundary descriptions: "{A} at the API layer connects to {B} at the data layer"
71
+
72
+ **CRITICAL:** Do NOT parse Mermaid diagram syntax. Use only prose text for co-mention detection.
73
+
74
+ **Build integration pairs list:**
75
+ - Each pair: `{library_a, library_b, architectural_context}`
76
+ - `architectural_context`: the quoted text or paraphrased description of their relationship
77
+
78
+ **Filter:** Only include pairs where BOTH libraries have a corresponding skill (Covered in Step 02). Skip pairs involving Missing skills — they cannot be verified.
79
+
80
+ ### 3. Load Skill API Surfaces
81
+
82
+ For each library in an integration pair, load the skill artifacts:
83
+
84
+ **From SKILL.md, extract:**
85
+ - Exported functions and their signatures
86
+ - Exported types, interfaces, and classes
87
+ - Protocol indicators (HTTP, gRPC, WebSocket, message queue, file I/O, IPC)
88
+ - Data format indicators (JSON, protobuf, CSV, binary, streaming)
89
+
90
+ **From metadata.json, extract:**
91
+ - `language` — primary programming language
92
+ - `exports` — export names array (populated for individual skills; empty for stack skills)
93
+ - `stats.exports_documented` — export count
94
+ - `confidence_tier` — extraction confidence level
95
+
96
+ Store loaded API surfaces for cross-referencing.
97
+
98
+ ### 4. Cross-Reference Each Integration Pair
99
+
100
+ For each integration pair `{library_a, library_b}`, apply the verification protocol from `{integrationRulesData}`:
101
+
102
+ **Check 1 — Language Boundary:**
103
+ - Same language → compatible
104
+ - Different languages → check for FFI, IPC, or network protocol bridge
105
+ - If no bridge mechanism documented → flag as risk
106
+
107
+ **Check 2 — Protocol Compatibility:**
108
+ - Both use same protocol (e.g., both HTTP) → compatible
109
+ - Complementary protocols (e.g., HTTP client + HTTP server) → compatible
110
+ - Incompatible protocols with no adapter → flag as risk
111
+
112
+ **Check 3 — Type Compatibility:**
113
+ - Shared types or compatible serialization formats → compatible
114
+ - Incompatible type systems with no conversion layer → flag as risk
115
+
116
+ **Check 4 — Documentation Cross-Reference:**
117
+ - Skill A mentions skill B's library (or vice versa) → strong evidence
118
+ - Neither skill mentions the other → weak evidence (plausible but unverified)
119
+
120
+ **Assign verdict per pair:**
121
+ - **Verified** — all checks pass with evidence from both skills
122
+ - **Plausible** — checks pass but evidence is indirect or incomplete
123
+ - **Risky** — one or more checks flag compatibility concerns
124
+ - **Blocked** — fundamental incompatibility detected (language barrier with no bridge, incompatible protocols)
125
+
126
+ **Each verdict MUST include:**
127
+ - Which checks passed and which flagged
128
+ - Evidence citations: specific exports, types, or protocol references from the skills
129
+
130
+ ### 5. Display Integration Results
131
+
132
+ "**Pass 2: Integration Verification**
133
+
134
+ | Library A | Library B | Context | Verdict | Evidence |
135
+ |-----------|-----------|---------|---------|----------|
136
+ | {lib_a} | {lib_b} | {brief context} | {Verified/Plausible/Risky/Blocked} | {key evidence} |
137
+
138
+ **Summary:** {verified_count} Verified, {plausible_count} Plausible, {risky_count} Risky, {blocked_count} Blocked
139
+
140
+ {IF zero integration pairs found:}
141
+ **No integration claims detected in the architecture document prose.** Ensure your architecture document describes relationships between technologies in text form (not exclusively in Mermaid diagrams). Coverage-only analysis was performed.
142
+
143
+ {IF any Risky:}
144
+ **Risky Integrations — Recommendations:**
145
+ {For each risky pair:}
146
+ - `{lib_a}` ↔ `{lib_b}`: {specific concern}. **Recommendation:** {prescriptive action}
147
+
148
+ {IF any Blocked:}
149
+ **Blocked Integrations — Action Required:**
150
+ {For each blocked pair:}
151
+ - `{lib_a}` ↔ `{lib_b}`: {fundamental incompatibility}. **Recommendation:** {prescriptive action}"
152
+
153
+ ### 6. Append to Report
154
+
155
+ Write the **Integration Verdicts** section to `{outputFile}`:
156
+ - Include the full integration verdicts table with evidence
157
+ - Include recommendations for Risky and Blocked pairs
158
+ - Update frontmatter: append `'step-03-integrations'` to `stepsCompleted`
159
+ - Set `integrations_verified`, `integrations_plausible`, `integrations_risky`, `integrations_blocked` counts
160
+
161
+ ### 7. Auto-Proceed to Next Step
162
+
163
+ **Early halt guard:** If ALL integration pairs are Blocked, present: "**All integrations are Blocked** — fundamental incompatibilities detected across all library pairs. Remaining analysis will produce limited value. **[X] Halt workflow (recommended)** | **[C] Continue anyway**" — wait for user input. If X: halt with: "**Workflow halted — all integrations blocked.** Integration Verdicts saved to `{outputFile}`. Run **[VS]** after applying architectural changes. **Blocked integrations:** {list each blocked pair with reason}." If C: continue.
164
+
165
+ {IF NOT halted (user selected C, or early halt guard did not trigger):}
166
+
167
+ "**Proceeding to requirements verification...**"
168
+
169
+ Load, read the full file and then execute `{nextStepFile}`.
170
+
171
+ ---
172
+
173
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
174
+
175
+ ### ✅ SUCCESS:
176
+
177
+ - Integration rules loaded from {integrationRulesData}
178
+ - Integration claims extracted from architecture document prose (not Mermaid diagrams)
179
+ - Skill API surfaces loaded for each library in integration pairs
180
+ - All four verification checks applied to each pair
181
+ - Every verdict includes evidence citations from actual skill content
182
+ - Recommendations provided for every Risky and Blocked integration
183
+ - Integration Verdicts section appended to {outputFile}
184
+ - Auto-proceeded to step 04
185
+
186
+ ### ❌ SYSTEM FAILURE:
187
+
188
+ - Parsing Mermaid diagrams instead of using prose-based co-mention analysis
189
+ - Verdicts without evidence citations from actual skills
190
+ - Inventing integration relationships not described in the architecture document
191
+ - Skipping any of the four verification checks
192
+ - Evaluating requirements coverage (that is Step 04)
193
+ - Hardcoded paths instead of frontmatter variables
194
+
195
+ **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: 'step-04-requirements'
3
+ description: 'Pass 3 (OPTIONAL) — if PRD/vision document provided, verify the stack covers stated requirements'
4
+
5
+ nextStepFile: './step-05-synthesize.md'
6
+ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
7
+ ---
8
+
9
+ # Step 4: Requirements Coverage
10
+
11
+ ## STEP GOAL:
12
+
13
+ If a PRD or vision document was provided in Step 01, verify that the combined capabilities of the generated skills address each stated requirement. If no PRD was provided, skip this pass and auto-proceed. Produce a requirements coverage table with Fulfilled, Partially Fulfilled, or Not Addressed verdicts.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+
19
+ - 📖 CRITICAL: Read the complete step file before taking any action
20
+ - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
21
+ - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
22
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
23
+
24
+ ### Role Reinforcement:
25
+
26
+ - ✅ You are a stack verification analyst assessing requirements coverage
27
+ - ✅ Every verdict must reason from actual skill capabilities, not assumptions
28
+ - ✅ "Not Addressed" is a valid and important finding — do not force-fit skills to requirements
29
+
30
+ ### Step-Specific Rules:
31
+
32
+ - 🎯 Focus ONLY on requirements-to-skills coverage assessment
33
+ - 🚫 FORBIDDEN to re-analyze integrations — that was Step 03
34
+ - 🚫 FORBIDDEN to synthesize or produce overall verdicts — that is Step 05
35
+ - 💬 If no PRD was provided, skip immediately with a clear message
36
+
37
+ ## EXECUTION PROTOCOLS:
38
+
39
+ - 🎯 Extract requirements from PRD/vision document and assess skill coverage
40
+ - 💾 Append Requirements Coverage section to {outputFile}
41
+ - 📖 Auto-proceed to next step after completion or skip
42
+ - 🚫 Only requirements coverage — no synthesis, no overall verdict
43
+
44
+ ## CONTEXT BOUNDARIES:
45
+
46
+ - Available: PRD/vision document (if provided), skill SKILL.md files, metadata.json files
47
+ - Focus: Mapping requirements to skill capabilities
48
+ - Limits: Do not evaluate skill quality — only whether capabilities match requirements
49
+ - Dependencies: Step 01 (PRD availability flag, skill inventory)
50
+
51
+ ## MANDATORY SEQUENCE
52
+
53
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
54
+
55
+ ### 1. Check PRD Availability
56
+
57
+ **Check `prd_available` from workflow state (set in Step 01). If `prd_available` is false (no PRD/vision document was provided):**
58
+
59
+ "**Pass 3: Requirements Coverage — Skipped**
60
+
61
+ No PRD or vision document was provided. Requirements coverage analysis requires a document describing project capabilities and constraints.
62
+
63
+ To include this pass, re-run **[VS]** with a PRD or vision document path.
64
+
65
+ **Proceeding to synthesis...**"
66
+
67
+ Update {outputFile} frontmatter: append `'step-04-requirements'` to `stepsCompleted`, set `requirements_pass: "skipped"`.
68
+
69
+ Load, read the full file and then execute `{nextStepFile}`. **STOP HERE — do not execute sections 2-6.**
70
+
71
+ **If PRD/vision document was provided:** Continue to section 2.
72
+
73
+ ### 2. Extract Requirements
74
+
75
+ Parse the PRD/vision document for capability requirements.
76
+
77
+ **Look for:**
78
+ - **Feature descriptions** — explicit capabilities the product must have
79
+ - **Technical requirements** — performance targets, scalability needs, platform support
80
+ - **Non-functional requirements** — offline-first, real-time sync, multi-language support, accessibility, security constraints
81
+ - **Integration requirements** — third-party service dependencies, API contracts
82
+ - **Infrastructure requirements** — deployment targets, CI/CD needs, monitoring
83
+
84
+ **Build a requirements list** with each entry containing:
85
+ - `requirement_id` — sequential identifier (R1, R2, R3...)
86
+ - `requirement_text` — the stated requirement
87
+ - `category` — feature, technical, non-functional, integration, or infrastructure
88
+ - `source_section` — the PRD section where it was found
89
+
90
+ ### 3. Assess Stack Coverage
91
+
92
+ For each requirement, evaluate whether the combined capabilities of the generated skills address it.
93
+
94
+ **Assessment method:**
95
+ - Read each skill's SKILL.md exports, description, and capabilities sections
96
+ - Check if skill exports provide functions, types, or patterns relevant to the requirement
97
+ - Consider combinations of multiple skills that together address a requirement
98
+ - For non-functional requirements, check if skills document relevant configuration or patterns
99
+
100
+ **Assign verdict per requirement:**
101
+ - **Fulfilled** — one or more skills clearly provide the needed capability, with specific exports or patterns identified
102
+ - **Partially Fulfilled** — skills provide related capability but gaps remain (specify what is covered and what is not)
103
+ - **Not Addressed** — no skill in the stack provides capability relevant to this requirement
104
+
105
+ **Each verdict MUST include:**
106
+ - Which skills contribute (if any)
107
+ - Specific exports or capabilities from those skills that are relevant
108
+ - For Partially Fulfilled: what gap remains
109
+
110
+ ### 4. Display Requirements Results
111
+
112
+ "**Pass 3: Requirements Coverage**
113
+
114
+ | ID | Requirement | Category | Verdict | Contributing Skills |
115
+ |----|-------------|----------|---------|-------------------|
116
+ | {id} | {requirement_text} | {category} | {Fulfilled/Partially Fulfilled/Not Addressed} | {skill_names or '—'} |
117
+
118
+ **Coverage: {fulfilled_count} Fulfilled, {partial_count} Partially Fulfilled, {not_addressed_count} Not Addressed**
119
+
120
+ {IF any Not Addressed:}
121
+ **Unaddressed Requirements — Recommendations:**
122
+ {For each not addressed requirement:}
123
+ - **{id}:** {requirement_text} → Evaluate `{category}` libraries that provide this capability, generate a skill with **[CS]** or **[QS]**, then re-run **[VS]**
124
+
125
+ {IF any Partially Fulfilled:}
126
+ **Partial Coverage — Details:**
127
+ {For each partially fulfilled requirement:}
128
+ - **{id}:** Covered by `{skill_names}` — **Gap:** {what remains unaddressed}"
129
+
130
+ ### 5. Append to Report
131
+
132
+ Write the **Requirements Coverage** section to `{outputFile}`:
133
+ - Include the full requirements coverage table
134
+ - Include recommendations for Not Addressed and Partially Fulfilled items
135
+ - Update frontmatter: append `'step-04-requirements'` to `stepsCompleted`
136
+ - Set `requirements_pass: "completed"`
137
+ - Set `requirements_fulfilled`, `requirements_partial`, `requirements_not_addressed` counts
138
+
139
+ ### 6. Auto-Proceed to Next Step
140
+
141
+ "**Proceeding to synthesis...**"
142
+
143
+ Load, read the full file and then execute `{nextStepFile}`.
144
+
145
+ ---
146
+
147
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
148
+
149
+ ### ✅ SUCCESS:
150
+
151
+ - PRD availability checked first — skipped cleanly if not provided
152
+ - All requirements extracted from PRD with source section citations
153
+ - Each requirement assessed against actual skill capabilities (exports, descriptions)
154
+ - Verdicts include contributing skill names and specific capabilities
155
+ - Not Addressed items have actionable recommendations
156
+ - Requirements Coverage section appended to {outputFile}
157
+ - Auto-proceeded to step 05
158
+
159
+ ### ❌ SYSTEM FAILURE:
160
+
161
+ - Fabricating requirements not stated in the PRD document
162
+ - Force-fitting skills to requirements they do not address
163
+ - Verdicts without evidence from actual skill content
164
+ - Not executing the skip path when no PRD was provided
165
+ - Producing synthesis or overall verdicts (that is Step 05)
166
+ - Hardcoded paths instead of frontmatter variables
167
+
168
+ **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: 'step-05-synthesize'
3
+ description: 'Produce overall feasibility verdict, prescriptive recommendations, and diff from previous run'
4
+
5
+ nextStepFile: './step-06-report.md'
6
+ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
7
+ ---
8
+
9
+ # Step 5: Synthesize Verdict
10
+
11
+ ## STEP GOAL:
12
+
13
+ Calculate the overall feasibility verdict based on all three analysis passes, generate prescriptive recommendations for every non-verified finding, check for a previous feasibility report to produce a delta, and compile the synthesis section of the report.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+
19
+ - 📖 CRITICAL: Read the complete step file before taking any action
20
+ - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
21
+ - ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
22
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
23
+
24
+ ### Role Reinforcement:
25
+
26
+ - ✅ You are a stack verification analyst delivering the final synthesis
27
+ - ✅ The overall verdict must follow the decision logic exactly — no subjectivity
28
+ - ✅ Every recommendation must be specific and actionable — not vague advice
29
+
30
+ ### Step-Specific Rules:
31
+
32
+ - 🎯 Focus ONLY on synthesizing findings from Steps 02-04 into a verdict
33
+ - 🚫 FORBIDDEN to discover new findings or re-analyze skills
34
+ - 🚫 FORBIDDEN to present the final report to the user — that is Step 06
35
+ - 💬 Recommendations must name specific tools, libraries, or actions
36
+
37
+ ## EXECUTION PROTOCOLS:
38
+
39
+ - 🎯 Apply verdict decision logic to produce FEASIBLE / CONDITIONALLY FEASIBLE / NOT FEASIBLE
40
+ - 💾 Append Synthesis & Recommendations section to {outputFile}
41
+ - 📖 Check for previous report and generate delta if found
42
+ - 🚫 Only synthesis — no new analysis, no final presentation
43
+
44
+ ## CONTEXT BOUNDARIES:
45
+
46
+ - Available: Coverage matrix (Step 02), integration verdicts (Step 03), requirements coverage (Step 04 if applicable)
47
+ - Focus: Verdict calculation, recommendation generation, delta comparison
48
+ - Limits: Do not present the full report — that is Step 06
49
+ - Dependencies: Steps 02-03 must be complete; Step 04 completed or skipped
50
+
51
+ ## MANDATORY SEQUENCE
52
+
53
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
54
+
55
+ ### 1. Calculate Overall Verdict
56
+
57
+ Apply the following decision logic using findings from all completed passes:
58
+
59
+ **Evaluate in order — the first matching condition wins. Do not continue once a verdict is determined.**
60
+
61
+ **NOT FEASIBLE (evaluate first):**
62
+ - Any integration is **Blocked** → overall verdict is NOT FEASIBLE
63
+ - Rationale: a blocked integration represents a fundamental architectural incompatibility. Also note in the rationale any co-occurring Missing skills or Risky integrations so the user understands the full set of problems
64
+
65
+ **CONDITIONALLY FEASIBLE (evaluate second):**
66
+ If ANY of the following apply, the verdict is CONDITIONALLY FEASIBLE. Include ALL matching conditions in the rationale:
67
+ - Any technology is **Missing** from coverage (no skill exists)
68
+ - Any integration is **Risky** (but none Blocked)
69
+ - Requirements have any **Not Addressed** items
70
+ - Requirements have any **Partially Fulfilled** items
71
+ - Rationale: the stack can work but has gaps, risks, or unverified assumptions that must be addressed
72
+
73
+ **FEASIBLE (evaluate last):**
74
+ - Coverage is 100% (no Missing skills) AND all integrations are Verified or Plausible AND requirements are all Fulfilled (or requirements pass was skipped) AND no Blocked or Risky integrations → overall verdict is FEASIBLE
75
+ - Rationale: {IF requirements pass completed:} the stack can support the architecture as described — all requirements fully fulfilled. {IF requirements pass was skipped:} the stack can support the architecture as described — requirements were not evaluated (no PRD provided)
76
+
77
+ **Post-verdict: Zero integration pairs guard (apply after ANY verdict):**
78
+ If zero integration pairs were extracted (all four integration counts are 0) AND the architecture document references 2+ technologies:
79
+ - If the verdict was FEASIBLE, override to CONDITIONALLY FEASIBLE
80
+ - Regardless of verdict, append this note to the rationale: "No integration claims were found in the architecture document prose. Manual review recommended to confirm that technology relationships are not documented exclusively in diagrams or implied without explicit co-mention."
81
+
82
+ Store the verdict for use in the report.
83
+
84
+ ### 2. Generate Prescriptive Recommendations
85
+
86
+ For each non-verified finding across all passes, generate an actionable next step:
87
+
88
+ **Missing skill (from Step 02):**
89
+ - "Run **[CS] Create Skill** or **[QS] Quick Skill** for `{library_name}`, then re-run **[VS]** to verify coverage."
90
+
91
+ **Risky integration (from Step 03):**
92
+ - If protocol mismatch → "Consider adding a bridge layer between `{lib_a}` and `{lib_b}` (e.g., HTTP adapter, message queue). Document the bridge in the architecture."
93
+ - If type incompatibility → "Add a serialization/conversion layer between `{lib_a}` and `{lib_b}` to resolve the type mismatch identified in their API surfaces."
94
+ - If weak evidence → "Add cross-references between `{lib_a}` and `{lib_b}` skills by re-running **[CS]** with integration context."
95
+
96
+ **Blocked integration (from Step 03):**
97
+ - If language barrier → "Replace `{lib_a}` with a `{lib_b_language}`-compatible alternative, or introduce an IPC/FFI bridge. Redesign the integration path in the architecture document."
98
+ - If fundamental incompatibility → "Replace `{blocked_lib}` with an alternative that is compatible with `{other_lib}` in the same domain, or redesign the integration path in the architecture document."
99
+
100
+ **Not Addressed requirement (from Step 04):**
101
+ - "No library in the stack covers `{requirement}`. Evaluate `{category}` libraries that provide this capability, generate a skill, then re-run **[VS]**."
102
+
103
+ **Partially Fulfilled requirement (from Step 04):**
104
+ - "Gap in `{requirement}`: {what_is_missing}. Consider extending `{contributing_skill}` or adding a dedicated library."
105
+
106
+ **Zero integration pairs (from Step 03):**
107
+ - If zero integration pairs were found AND the architecture references 2+ technologies: "No integration claims were found in the architecture document prose. Add explicit prose descriptions of how your technologies interact (not only in diagrams), then re-run **[VS]** to verify integrations."
108
+
109
+ ### 3. Check for Previous Report
110
+
111
+ Check if a `previous_report` path was recorded in the current report's frontmatter. Since the current workflow run overwrites the report starting in Step 01, the delta feature requires the user to have saved a copy before re-running [VS].
112
+
113
+ **Note:** The delta feature is only available when the user has manually backed up a prior report and provided the path. To enable delta comparisons, instruct the user to copy their feasibility report (e.g., `feasibility-report-{project_name}-v1.md`) before re-running [VS], then provide the backup path when prompted in Step 01.
114
+
115
+ **If a previous report is found:**
116
+ - Load its verdict, coverage percentage, and integration verdicts
117
+ - Generate a delta comparison:
118
+ - **Improved items:** findings that were Risky/Blocked/Missing and are now Verified/Covered
119
+ - **Regressed items:** findings that were Verified/Covered and are now Risky/Blocked/Missing
120
+ - **New items:** findings not present in the previous report
121
+ - **Unchanged items:** count of findings with the same verdict
122
+
123
+ **If no previous report found:**
124
+ - Note: "First verification run — no delta available."
125
+
126
+ ### 4. Compile Synthesis Section
127
+
128
+ Assemble the following for the report:
129
+
130
+ **Overall verdict** with rationale citing the decision logic.
131
+
132
+ **Recommendation list** ordered by priority (count total recommendations as `recommendation_count` — persist this count to `{outputFile}` frontmatter for use in step-06):
133
+ 1. Blocked integrations (if any)
134
+ 2. Missing skills
135
+ 3. Risky integrations
136
+ 4. Not Addressed requirements
137
+ 5. Partially Fulfilled requirements
138
+
139
+ **Delta from previous run** (if applicable):
140
+ - Improved, regressed, new, unchanged counts
141
+ - Specific items that changed
142
+
143
+ **Suggested next workflow:**
144
+ - FEASIBLE → "Proceed to **[RA] Refine Architecture** to produce an implementation-ready architecture, then **[SS]** to compose your stack skill, then **[TS]** to test and **[EX]** to export."
145
+ - CONDITIONALLY FEASIBLE → "Address the {recommendation_count} recommendations above, then re-run **[VS]**. Once all clear, proceed to **[RA]**."
146
+ - NOT FEASIBLE → "Critical blockers must be resolved before proceeding. Apply the recommendations above and re-run **[VS]**."
147
+
148
+ ### 5. Append to Report
149
+
150
+ Write the **Synthesis & Recommendations** section to `{outputFile}`:
151
+ - Include overall verdict with rationale
152
+ - Include prioritized recommendation list
153
+ - Include delta from previous run (if applicable)
154
+ - Include suggested next workflow
155
+ - **Replace the body placeholder** in the `## Overall Verdict` section: replace `{FEASIBLE / CONDITIONALLY FEASIBLE / NOT FEASIBLE}` and `{1-2 sentence summary}` with the actual calculated verdict and rationale text
156
+ - Update frontmatter: append `'step-05-synthesize'` to `stepsCompleted`
157
+ - Set `overall_verdict` to the calculated verdict
158
+ - Set `recommendation_count` to the total number of recommendations
159
+ - If delta was computed (section 3), set `delta_improved`, `delta_regressed`, `delta_new`, `delta_unchanged` in frontmatter to the respective counts
160
+ - Verify that `integrations_verified`, `integrations_plausible`, `integrations_risky`, `integrations_blocked` in frontmatter match the counts from Step 03 (these were set in Step 03). If a discrepancy is found, overwrite the frontmatter counts with the values from Step 03 — the report file is the system of record
161
+
162
+ ### 6. Auto-Proceed to Next Step
163
+
164
+ "**Proceeding to final report presentation...**"
165
+
166
+ Load, read the full file and then execute `{nextStepFile}`.
167
+
168
+ ---
169
+
170
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
171
+
172
+ ### ✅ SUCCESS:
173
+
174
+ - Overall verdict calculated using the exact decision logic (not subjective judgment)
175
+ - Every non-verified finding has a specific, actionable recommendation
176
+ - Recommendations name concrete tools ([CS], [QS], [VS], [RA]) and specific libraries
177
+ - Previous report delta generated if applicable
178
+ - Synthesis section appended to {outputFile} with verdict, recommendations, and next workflow
179
+ - Frontmatter updated with overall_verdict and metric counts
180
+ - Auto-proceeded to step 06
181
+
182
+ ### ❌ SYSTEM FAILURE:
183
+
184
+ - Subjective or vague overall verdict not following the decision logic
185
+ - Recommendations without specific actions ("improve the integration")
186
+ - Not checking for previous report
187
+ - Discovering new findings or re-analyzing skills
188
+ - Presenting the full report to the user (that is Step 06)
189
+ - Hardcoded paths instead of frontmatter variables
190
+
191
+ **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.