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
@@ -69,13 +69,9 @@ Run: `npx skill-check -h`
69
69
 
70
70
  Launch subprocesses in parallel for each validation category, aggregating results when complete:
71
71
 
72
- **Check A — Spec Compliance (via skill-check):**
72
+ **Check A — Spec Compliance (deferred to post-write):**
73
73
 
74
- **If available**, run: `npx skill-check check <skill-dir> --fix --format json --no-security-scan`
75
-
76
- Parse JSON output for quality score (0-100), auto-fixed issues, and remaining diagnostics. If `body.max_lines` reported, prefer selective split: extract only the largest Tier 2 section(s) to `references/`, keeping all Tier 1 content inline (see `knowledge/split-body-strategy.md`). Fall back to `npx skill-check split-body <skill-dir> --write` only if selective split is not feasible. After any split, verify `#quick-start` and `#key-types` anchors still resolve in SKILL.md.
77
-
78
- **If unavailable**, perform manual check: validate merged SKILL.md structure, verify required sections (exports, usage patterns, conventions), verify export entries have name/type/signature/file:line reference, flag missing sections.
74
+ Skill-check requires written files on disk. This check is deferred to step-06 section 7. Perform manual structural check only: verify merged SKILL.md has required sections (exports, usage patterns, conventions), verify export entries have name/type/signature/file:line reference, flag missing sections.
79
75
 
80
76
  **Check B — [MANUAL] Section Integrity:**
81
77
  - Compare [MANUAL] inventory from step 01 against merged content
@@ -84,7 +80,7 @@ Parse JSON output for quality score (0-100), auto-fixed issues, and remaining di
84
80
 
85
81
  **Check C — Confidence Tier Consistency:**
86
82
  - Verify all re-extracted exports have confidence labels (T1/T1-low/T2)
87
- - Verify tier labels match forge tier: Quick=T1-low only, Forge=T1 (T1-low for degraded), Deep=T1+T2
83
+ - Verify tier labels match forge tier: Quick=T1-low only, Forge=T1 (T1-low for degraded), Forge+=T1 (same as Forge, CCC improves coverage not confidence), Deep=T1+T2
88
84
  - Flag mismatched or missing tier labels
89
85
 
90
86
  **Check D — Provenance Completeness:**
@@ -166,9 +162,9 @@ ONLY WHEN all validation checks have completed and findings are displayed will y
166
162
 
167
163
  ### ✅ SUCCESS:
168
164
 
169
- - All six checks executed (spec, [MANUAL], confidence, provenance, diff, security)
170
- - `npx skill-check check --fix` and `diff` executed if available (or fallbacks used)
171
- - Quality score captured; auto-fix applied for deterministic issues
165
+ - All six checks executed (spec-manual, [MANUAL], confidence, provenance, diff, security)
166
+ - Checks A (spec compliance via skill-check), E (diff), and F (security scan) deferred to post-write in step-06
167
+ - Manual structural check performed for spec compliance in this step
172
168
  - Stack skill reference files validated if applicable
173
169
  - Findings reported with severity and specific locations; [MANUAL] integrity verified
174
170
  - Auto-proceeds regardless of findings (advisory mode)
@@ -177,7 +173,7 @@ ONLY WHEN all validation checks have completed and findings are displayed will y
177
173
 
178
174
  - Skipping any of the six checks; blocking on validation warnings
179
175
  - Not verifying [MANUAL] integrity; hallucinating findings not backed by comparison
180
- - Modifying merged content during validation (except via skill-check --fix)
176
+ - Modifying merged content during validation (validation is read-only in this step)
181
177
  - Not recording quality score when skill-check is available
182
178
 
183
179
  **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -74,7 +74,9 @@ Update `{skills_output_folder}/{skill_name}/metadata.json`:
74
74
  - `exports_total`: `exports_public_api` + `exports_internal`
75
75
  - `public_api_coverage`: `exports_documented / exports_public_api` (`null` if `exports_public_api` is 0)
76
76
  - `total_coverage`: `exports_documented / exports_total` (`null` if `exports_total` is 0)
77
- - `confidence_t1`, `confidence_t2`, `confidence_t3`: update counts from re-extraction results
77
+ - Update `confidence_distribution` from re-extraction results:
78
+ - `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3`: update counts from re-extraction results
79
+ - `scripts_count`, `assets_count`: update from re-extraction results if scripts/assets changed
78
80
  - For stack skills: update `library_count`, `integration_count` if changed
79
81
 
80
82
  ### 3. Write Updated provenance-map.json
@@ -115,7 +117,7 @@ Write to `{forge_data_folder}/{skill_name}/provenance-map.json`:
115
117
 
116
118
  ### 4. Write Updated evidence-report.md
117
119
 
118
- Append update operation section to `{forge_data_folder}/{skill_name}/evidence-report.md`:
120
+ Append update operation section to `{forge_data_folder}/{skill_name}/evidence-report.md` (create the file with a standard header if it does not yet exist):
119
121
 
120
122
  ```markdown
121
123
  ## Update Operation — {current_date}
@@ -154,7 +156,7 @@ For each affected reference file from the merge:
154
156
  - Regenerate `context-snippet.md` with updated export summaries
155
157
  - Verify [MANUAL] sections preserved in each reference file
156
158
 
157
- **If skill_type != "stack":** Skip with notice.
159
+ **If skill_type != "stack":** Skip reference file updates. However, if exports changed (added, removed, or renamed), warn: "⚠️ `context-snippet.md` was NOT updated — exports have changed. Run **[EX] Export Skill** to regenerate the context snippet and update CLAUDE.md/AGENTS.md."
158
160
 
159
161
  ### 6. Verify All Writes
160
162
 
@@ -182,7 +184,8 @@ External tool checks deferred from step-05 now run against the written files:
182
184
 
183
185
  **If skill-check available:**
184
186
  - Run: `npx skill-check check {skills_output_folder}/{skill_name} --fix --format json --no-security-scan`
185
- - If `body.max_lines` reported, prefer selective split (see `knowledge/split-body-strategy.md`). Fall back to `npx skill-check split-body {skills_output_folder}/{skill_name} --write` if not feasible. Verify anchors resolve after split.
187
+ - **Context sync after --fix:** If `fixed[]` is non-empty (i.e., `--fix` modified files on disk), re-read the modified SKILL.md to update the in-context copy. This prevents silent divergence between the in-context SKILL.md and the on-disk version that step-07-report will reference.
188
+ - If `body.max_lines` reported, prefer selective split — extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 inline (inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval). Fall back to `npx skill-check split-body {skills_output_folder}/{skill_name} --write` if not feasible. Verify anchors resolve after split.
186
189
  - Run: `npx skill-check diff` if original version was preserved
187
190
  - Run: `npx skill-check check {skills_output_folder}/{skill_name} --format json` for security scan
188
191
 
@@ -2,7 +2,7 @@
2
2
  name: update-skill
3
3
  description: Smart regeneration preserving [MANUAL] sections. Detects individual vs stack internally.
4
4
  web_bundle: true
5
- installed_path: '{project-root}/_bmad/skf/workflows/update-skill'
5
+ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/update-skill'
6
6
  ---
7
7
 
8
8
  # Update Skill
@@ -0,0 +1,45 @@
1
+ # Coverage Patterns
2
+
3
+ ## Purpose
4
+
5
+ Rules for detecting technology/library references in architecture and PRD documents, and matching them against generated skills.
6
+
7
+ ---
8
+
9
+ ## Technology Detection in Documents
10
+
11
+ ### Direct Name Matching
12
+
13
+ Search the architecture document for exact mentions of:
14
+ 1. Library names from generated skills (case-insensitive)
15
+ 2. Common aliases (e.g., "React" also matches "ReactJS", "react.js")
16
+ 3. Framework names that encompass libraries (e.g., "Tauri" encompasses the Tauri ecosystem)
17
+
18
+ ### Section-Based Detection
19
+
20
+ Parse document section headers for technology groupings:
21
+ - `## Desktop App` → technologies listed under this section
22
+ - `## Backend Core` → technologies in backend layer
23
+ - `## AI Layer` → AI-related technologies
24
+
25
+ **Mermaid Diagram Handling:** Do NOT parse Mermaid diagram syntax (`graph`, `flowchart`, `sequenceDiagram`, etc.) for technology detection. Only use prose text (headings, paragraphs, lists, tables) for detection. If the architecture document appears to list technologies exclusively inside Mermaid diagrams, note this in the coverage results as a detection limitation and recommend the user add prose-based technology listings.
26
+
27
+ ### Coverage Verdict
28
+
29
+ | Verdict | Meaning |
30
+ |---------|---------|
31
+ | **Covered** | A generated skill exists in `skills/` for this technology |
32
+ | **Missing** | Technology is referenced in architecture doc but no skill exists |
33
+ | **Extra** | A skill exists but the technology is not referenced in the architecture doc (informational, not an error) |
34
+
35
+ ## Output Format
36
+
37
+ When presenting coverage results, use the following structure:
38
+
39
+ ```
40
+ | Technology | Source Section | Skill Match | Verdict |
41
+ |------------|---------------|-------------|---------|
42
+ | {tech_name} | {section_heading} | {skill_name or '—'} | Covered / Missing |
43
+ ```
44
+
45
+ Include a summary line: `Coverage: {covered_count}/{total_count} ({percentage}%)`
@@ -0,0 +1,63 @@
1
+ ---
2
+ workflowType: 'verify-stack'
3
+ project_name: ''
4
+ architecture_doc: ''
5
+ prd_doc: ''
6
+ date: ''
7
+ overall_verdict: ''
8
+ stepsCompleted: []
9
+ skills_analyzed: 0
10
+ coverage_percentage: 0
11
+ integrations_verified: 0
12
+ integrations_plausible: 0
13
+ integrations_risky: 0
14
+ integrations_blocked: 0
15
+ requirements_fulfilled: null
16
+ requirements_partial: null
17
+ requirements_not_addressed: null
18
+ requirements_pass: ''
19
+ recommendation_count: 0
20
+ prd_available: false
21
+ previous_report: ''
22
+ delta_improved: null
23
+ delta_regressed: null
24
+ delta_new: null
25
+ delta_unchanged: null
26
+ ---
27
+
28
+ # Stack Feasibility Report: {project_name}
29
+
30
+ **Verification Date:** {date}
31
+ **Architecture Document:** {architecture_doc}
32
+ **PRD Document:** {prd_doc}
33
+ **Skills Analyzed:** {skills_analyzed}
34
+
35
+ ## Overall Verdict
36
+
37
+ {FEASIBLE / CONDITIONALLY FEASIBLE / NOT FEASIBLE}
38
+
39
+ {1-2 sentence summary}
40
+
41
+ ---
42
+
43
+ ## Coverage Matrix
44
+
45
+ <!-- Appended by step-02-coverage -->
46
+
47
+ ---
48
+
49
+ ## Integration Verdicts
50
+
51
+ <!-- Appended by step-03-integrations -->
52
+
53
+ ---
54
+
55
+ ## Requirements Coverage
56
+
57
+ <!-- Appended by step-04-requirements (if PRD provided) -->
58
+
59
+ ---
60
+
61
+ ## Synthesis & Recommendations
62
+
63
+ <!-- Appended by step-05-synthesize -->
@@ -0,0 +1,73 @@
1
+ # Integration Verification Rules
2
+
3
+ ## Purpose
4
+
5
+ Rules for cross-referencing API surfaces between two skills to determine integration feasibility.
6
+
7
+ ---
8
+
9
+ ## Verdict Definitions
10
+
11
+ | Verdict | Meaning | Required Evidence |
12
+ |---------|---------|-------------------|
13
+ | **Verified** | APIs demonstrably connect — matching types, documented bridge, or shared protocol | At least one export from Skill A is consumable by an API in Skill B (or vice versa) with compatible types |
14
+ | **Plausible** | Compatible types or protocols but no documented integration path | Both libraries operate in compatible domains with compatible data formats, but no direct API bridge is evident |
15
+ | **Risky** | Type mismatch, protocol gap, or language boundary requiring a bridge | A clear gap exists (e.g., TypeScript↔Rust FFI needed) but a workaround is architecturally feasible |
16
+ | **Blocked** | Fundamental incompatibility — no feasible integration path even with a bridge or adapter layer | The two libraries cannot exchange data in any documented way; requires replacing one of the libraries |
17
+
18
+ ---
19
+
20
+ ## Cross-Reference Protocol
21
+
22
+ For each integration pair (Library A ↔ Library B):
23
+
24
+ ### 1. Language Boundary Check
25
+
26
+ | A Language | B Language | Assessment |
27
+ |-----------|-----------|------------|
28
+ | Same language | Same language | No boundary — direct API calls possible |
29
+ | TypeScript ↔ Rust | Requires FFI, IPC, or WebSocket bridge | Check if a bridge library exists in the stack (e.g., Tauri provides JS↔Rust IPC) |
30
+ | TypeScript ↔ Python | Requires REST/gRPC/WebSocket bridge | Typically not direct |
31
+ | Any ↔ C/C++ | FFI available in most languages | Check for bindings |
32
+
33
+ ### 2. Protocol Compatibility Check
34
+
35
+ | A Protocol | B Protocol | Assessment |
36
+ |-----------|-----------|------------|
37
+ | In-process (same runtime) | In-process | Direct — function calls |
38
+ | HTTP/REST | HTTP/REST | Network bridge — compatible if API endpoints match |
39
+ | WebSocket | WebSocket | Real-time bridge — check message format compatibility |
40
+ | Shared filesystem | Shared filesystem | Async — check format compatibility |
41
+ | Embedded database | Embedded database | May conflict on lock files — check for multi-writer support |
42
+
43
+ ### 3. Type Compatibility Check
44
+
45
+ - Extract the primary data types each library produces/consumes from the skill's export list
46
+ - Check: does Library A export a type that Library B accepts as input?
47
+ - Common patterns: JSON serialization (universal bridge), binary formats (check codec), shared schemas (strong compatibility)
48
+
49
+ ### 4. Documentation Cross-Reference
50
+
51
+ - Search Skill A's content for mentions of Library B's name
52
+ - Search Skill B's content for mentions of Library A's name
53
+ - If either mentions the other: strong evidence of documented integration
54
+ - Check if either library's README lists the other as a companion/integration
55
+
56
+ ---
57
+
58
+ ## Verdict Evidence Format
59
+
60
+ Each verdict MUST include:
61
+
62
+ ```
63
+ **{Library A} ↔ {Library B}: {VERDICT}**
64
+
65
+ Evidence:
66
+ - A exports: `{function_name}({params}) → {return_type}` [from skill: {skill_name}]
67
+ - B accepts: `{function_name}({params})` [from skill: {skill_name}]
68
+ - Compatibility: {explanation}
69
+ - Language boundary: {same | bridge required via {mechanism}}
70
+
71
+ {If RISKY or BLOCKED:}
72
+ Recommendation: {actionable next step}
73
+ ```
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: 'step-01-init'
3
+ description: 'Load generated skills from skills folder, accept architecture doc path and optional PRD path, validate all inputs exist'
4
+
5
+ nextStepFile: './step-02-coverage.md'
6
+ reportTemplate: '../data/feasibility-report-template.md'
7
+ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
8
+ ---
9
+
10
+ # Step 1: Initialize Verification
11
+
12
+ ## STEP GOAL:
13
+
14
+ Load all generated skills from the skills output folder, accept the architecture document path (required) and optional PRD/vision document path from the user, validate that all inputs exist and are readable, create the feasibility report document, and present an initialization summary before auto-proceeding.
15
+
16
+ ## MANDATORY EXECUTION RULES (READ FIRST):
17
+
18
+ ### Universal Rules:
19
+
20
+ - 📖 CRITICAL: Read the complete step file before taking any action
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 operating in Ferris Audit mode
27
+ - ✅ Execute with prescriptive precision — every loaded skill must be validated against actual files
28
+ - ✅ You enforce the zero-hallucination principle: only report skills that physically exist on disk
29
+
30
+ ### Step-Specific Rules:
31
+
32
+ - 🎯 Focus ONLY on loading inputs, scanning skills, and creating the report skeleton
33
+ - 🚫 FORBIDDEN to perform any coverage analysis or integration checking
34
+ - 🚫 Auto-proceed init step — no user confirmation needed. Halts only on validation errors
35
+ - 💬 Present a clear initialization summary so downstream steps have validated inputs
36
+
37
+ ## EXECUTION PROTOCOLS:
38
+
39
+ - 🎯 Collect and validate all input documents and skill artifacts
40
+ - 💾 Create feasibility report from {reportTemplate} with populated frontmatter
41
+ - 📖 Auto-proceed to next step after successful initialization
42
+ - 🚫 HALT with actionable error if minimum requirements not met
43
+
44
+ ## CONTEXT BOUNDARIES:
45
+
46
+ - This is the first step — no prior workflow state exists
47
+ - Requires skills to have been generated by create-skill or quick-skill workflows
48
+ - User provides architecture document path (required) and optional PRD/vision document path
49
+ - No dependency on setup-forge or forge-tier — this workflow operates on skill content only
50
+
51
+ ## MANDATORY SEQUENCE
52
+
53
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
54
+
55
+ ### 1. Accept Input Documents
56
+
57
+ "**Verify Stack — Feasibility Analysis**
58
+
59
+ Please provide the following:
60
+ 1. **Architecture document path** (REQUIRED) — your project's architecture doc
61
+ 2. **PRD or vision document path** (OPTIONAL) — for requirements coverage analysis
62
+ 3. **Previous feasibility report path** (OPTIONAL) — for delta comparison with a prior run (provide a backup copy)"
63
+
64
+ Wait for user input.
65
+
66
+ **Validate architecture document:**
67
+ - Confirm the file exists and is readable
68
+ - If missing or unreadable → "Architecture document not found at `{path}`. Provide a valid path."
69
+ - HALT until a valid architecture document is provided
70
+
71
+ **Validate PRD document (if provided):**
72
+ - Confirm the file exists and is readable
73
+ - If missing → "PRD document not found at `{path}`. Proceeding without PRD — requirements pass will be skipped."
74
+ - Store PRD availability as `prd_available: true|false`
75
+
76
+ **Validate previous report (if provided):**
77
+ - Confirm the file exists and is readable
78
+ - **Collision check:** Resolve both the provided path and `{outputFile}` to their absolute form before comparing (do not rely on string equality alone). If they resolve to the same location, warn: "The previous report path points to the same location as the new report. This file will be overwritten during this run. Provide a path to a backup copy, or leave empty to skip delta comparison." HALT until resolved.
79
+ - If missing → "Previous report not found at `{path}`. Proceeding without delta comparison."
80
+ - Store as `previous_report: {path}` (or empty string if not provided)
81
+
82
+ ### 2. Scan Skills Folder
83
+
84
+ Read the `{skills_output_folder}` directory.
85
+
86
+ For each subdirectory, check for the presence of `SKILL.md` and `metadata.json`.
87
+
88
+ **For each valid skill directory, extract from metadata.json:**
89
+ - `name` — skill name
90
+ - `language` — primary language
91
+ - `confidence_tier` — Quick, Forge, Forge+, or Deep
92
+ - `exports_documented` — read from `stats.exports_documented` in metadata.json (count of documented exports)
93
+ - `source_repo` or `source_root` — original source repository
94
+
95
+ **Build a skill inventory** as an internal list of all loaded skills with the fields above.
96
+
97
+ **If a subdirectory lacks SKILL.md or metadata.json:**
98
+ - Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
99
+ - Do not include in inventory
100
+
101
+ ### 3. Validate Minimum Requirements
102
+
103
+ **Check skill count:**
104
+ - At least 2 valid skills must exist (a stack requires multiple libraries)
105
+ - If fewer than 2 → "**Cannot proceed.** Only {count} skill(s) found in `{skills_output_folder}`. A stack requires at least 2 skills. Generate more skills with [CS] Create Skill or [QS] Quick Skill, then re-run [VS]."
106
+ - HALT workflow
107
+
108
+ **Check forge_data_folder:**
109
+ - Verify `forge_data_folder` was resolved from config.yaml and is non-empty
110
+ - If undefined or empty → "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Re-run [SF] Setup Forge to initialize."
111
+ - HALT workflow
112
+
113
+ **Check architecture document:**
114
+ - Confirm it was loaded successfully in section 1
115
+ - If not → HALT with error (should not reach here if section 1 validation passed)
116
+
117
+ ### 4. Create Feasibility Report
118
+
119
+ Load `{reportTemplate}` and create the output file at `{outputFile}`.
120
+
121
+ **Populate frontmatter:**
122
+ - `project_name`, `date`, `architecture_doc`, `prd_doc` (or "none")
123
+ - `prd_available: true|false` (from section 1 validation)
124
+ - `previous_report: {path}` (or empty string if not provided)
125
+ - `skills_analyzed: {count}`
126
+ - `overall_verdict: "pending"`
127
+ - `stepsCompleted: ['step-01-init']`
128
+
129
+ ### 5. Display Initialization Summary
130
+
131
+ "**Stack Verification Initialized**
132
+
133
+ | Field | Value |
134
+ |-------|-------|
135
+ | **Skills Loaded** | {count} |
136
+ | **Architecture Doc** | {architecture_doc} |
137
+ | **PRD Document** | {prd_doc or 'Not provided — requirements pass will be skipped'} |
138
+ | **Previous Report** | {previous_report or 'Not provided — no delta comparison'} |
139
+
140
+ **Skill Inventory:**
141
+
142
+ | Skill | Language | Tier | Exports |
143
+ |-------|----------|------|---------|
144
+ | {skill_name} | {language} | {confidence_tier} | {exports_documented} |
145
+
146
+ **Proceeding to coverage analysis...**"
147
+
148
+ ### 6. Auto-Proceed to Next Step
149
+
150
+ Load, read the full file and then execute `{nextStepFile}`.
151
+
152
+ ---
153
+
154
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
155
+
156
+ ### ✅ SUCCESS:
157
+
158
+ - Architecture document loaded and validated
159
+ - PRD document loaded or absence recorded
160
+ - Skills folder scanned with SKILL.md and metadata.json validation per skill
161
+ - At least 2 valid skills in inventory
162
+ - Feasibility report created from template with populated frontmatter
163
+ - Initialization summary displayed with skill inventory table
164
+ - Auto-proceeded to step 02
165
+
166
+ ### ❌ SYSTEM FAILURE:
167
+
168
+ - Proceeding with fewer than 2 skills
169
+ - Proceeding without a valid architecture document
170
+ - Not validating SKILL.md and metadata.json existence per skill directory
171
+ - Performing coverage or integration analysis in this step
172
+ - Hardcoded paths instead of frontmatter variables
173
+
174
+ **Master Rule:** This step validates inputs and initializes state. No analysis, no comparison, no verdicts.
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: 'step-02-coverage'
3
+ description: 'Pass 1 — check that a generated skill exists for every technology referenced in the architecture document'
4
+
5
+ nextStepFile: './step-03-integrations.md'
6
+ coveragePatternsData: '../data/coverage-patterns.md'
7
+ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
8
+ ---
9
+
10
+ # Step 2: Technology Coverage Analysis
11
+
12
+ ## STEP GOAL:
13
+
14
+ Verify that a generated skill exists for every technology, library, or framework referenced in the architecture document. Produce a coverage matrix showing which technologies are covered and which are missing. Detect extra skills not referenced in the architecture.
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 coverage analysis
28
+ - ✅ Every technology reference must trace to actual text in the architecture document
29
+ - ✅ Matching must be precise — do not guess or infer technologies not explicitly mentioned
30
+
31
+ ### Step-Specific Rules:
32
+
33
+ - 🎯 Focus ONLY on technology-to-skill coverage mapping
34
+ - 🚫 FORBIDDEN to analyze API surfaces or integration compatibility — that is Step 03
35
+ - 🚫 FORBIDDEN to evaluate requirements — that is Step 04
36
+ - 💬 Coverage verdicts must be binary: Covered or Missing — no ambiguity
37
+
38
+ ## EXECUTION PROTOCOLS:
39
+
40
+ - 🎯 Extract technology references from architecture document using {coveragePatternsData}
41
+ - 💾 Build and display coverage matrix with Covered/Missing verdicts
42
+ - 📖 Append Coverage Matrix section to {outputFile}
43
+ - 🚫 Only coverage mapping — no integration analysis, no requirements checking
44
+
45
+ ## CONTEXT BOUNDARIES:
46
+
47
+ - Available: Architecture document content, skill inventory from Step 01, coverage patterns data
48
+ - Focus: Technology-to-skill matching only
49
+ - Limits: Do not read SKILL.md in detail — use metadata.json for name and source_repo matching only
50
+ - Dependencies: Step 01 must have loaded skill inventory and validated architecture document
51
+
52
+ ## MANDATORY SEQUENCE
53
+
54
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
55
+
56
+ ### 1. Load Coverage Patterns
57
+
58
+ Load `{coveragePatternsData}` for detection rules.
59
+
60
+ Extract: technology name patterns, section heading indicators, common aliases, and framework-to-library mappings.
61
+
62
+ ### 2. Extract Technology References
63
+
64
+ Parse the architecture document for technology, library, and framework names.
65
+
66
+ **Detection methods (apply in order):**
67
+
68
+ **Section-based detection:**
69
+ - Identify section headings that indicate technology listings (e.g., "Tech Stack", "Dependencies", "Technologies", "Libraries", layer-specific headings)
70
+ - Extract technology names listed under these headings
71
+
72
+ **Direct name matching:**
73
+ - Scan the full document for names that match loaded skill names (case-insensitive)
74
+ - Apply alias resolution from {coveragePatternsData} (e.g., "React" matches "react", "PostgreSQL" matches "postgres")
75
+
76
+ **Contextual detection:**
77
+ - Identify technology names mentioned in prose alongside architectural descriptions
78
+ - Look for version-pinned references (e.g., "Express v4", "Tailwind CSS 3.x")
79
+
80
+ **Build a deduplicated list** of all referenced technologies with the document section where each was found.
81
+
82
+ ### 3. Cross-Reference Against Skills
83
+
84
+ For each referenced technology in the list:
85
+
86
+ **Check if a matching skill exists** in the skill inventory from Step 01.
87
+ - Match by skill name (case-insensitive)
88
+ - Match by alias from {coveragePatternsData}
89
+ - Match by `source_repo` or `source_root` field in metadata.json if skill name differs from technology name
90
+
91
+ **Assign verdict:**
92
+ - **Covered** — a matching skill exists in the inventory
93
+ - **Missing** — no matching skill found
94
+
95
+ Build the coverage matrix as a structured table.
96
+
97
+ ### 4. Detect Extra Skills
98
+
99
+ Check if any skills in the inventory are NOT referenced in the architecture document.
100
+
101
+ **For each extra skill:**
102
+ - Mark as **Extra** (informational — not an error)
103
+ - Note: "Skill `{skill_name}` exists but is not referenced in the architecture document"
104
+
105
+ Extra skills are informational only. They do not affect the coverage verdict.
106
+
107
+ ### 5. Display Coverage Results
108
+
109
+ "**Pass 1: Technology Coverage**
110
+
111
+ | Technology | Source Section | Skill Match | Verdict |
112
+ |------------|---------------|-------------|---------|
113
+ | {tech_name} | {section_heading} | {skill_name or '—'} | {Covered / Missing} |
114
+
115
+ **Coverage: {covered_count}/{total_count} ({percentage}%)**
116
+
117
+ {IF 100% coverage AND no Extra skills:}
118
+ **All referenced technologies have a matching skill. No extra skills detected.**
119
+
120
+ {IF any Missing:}
121
+ **Missing Skills — Action Required:**
122
+ {For each missing technology:}
123
+ - `{tech_name}` → Run **[CS] Create Skill** or **[QS] Quick Skill** for `{tech_name}`, then re-run **[VS]**
124
+
125
+ {IF any Extra:}
126
+ **Extra Skills (informational):**
127
+ {For each extra skill:}
128
+ - `{skill_name}` — not referenced in architecture document"
129
+
130
+ ### 6. Append to Report
131
+
132
+ Write the **Coverage Matrix** section to `{outputFile}`:
133
+ - Include the full coverage table
134
+ - Include coverage percentage
135
+ - Include missing skill recommendations
136
+ - Include extra skills list
137
+ - Update frontmatter: append `'step-02-coverage'` to `stepsCompleted`, set `coverage_percentage`
138
+
139
+ ### 7. Auto-Proceed to Next Step
140
+
141
+ {IF coverage_percentage is 0%:}
142
+ "**⚠️ 0% coverage — no matching skills found for any referenced technology.** All subsequent analysis (integration, requirements) will be vacuous and produce empty tables.
143
+
144
+ **Recommended:** Generate skills with [CS] or [QS] for your architecture technologies, then re-run [VS].
145
+
146
+ **Select:** [X] Halt workflow (recommended) | [C] Continue anyway"
147
+
148
+ - IF X: "**Workflow halted.** Generate skills and re-run [VS] when ready." — END workflow
149
+ - IF C: "**Continuing with 0% coverage — results will be limited.**"
150
+
151
+ Load, read the full file and then execute `{nextStepFile}`.
152
+
153
+ {IF coverage_percentage is NOT 0%:}
154
+ "**Proceeding to integration analysis...**"
155
+
156
+ Load, read the full file and then execute `{nextStepFile}`.
157
+
158
+ ---
159
+
160
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
161
+
162
+ ### ✅ SUCCESS:
163
+
164
+ - Coverage patterns loaded from {coveragePatternsData}
165
+ - All technology references extracted from architecture document with section citations
166
+ - Every referenced technology cross-referenced against skill inventory
167
+ - Coverage matrix displayed with binary Covered/Missing verdicts
168
+ - Extra skills detected and reported as informational
169
+ - Missing skills have actionable recommendations (run [CS] or [QS])
170
+ - Coverage Matrix section appended to {outputFile}
171
+ - Auto-proceeded to step 03
172
+
173
+ ### ❌ SYSTEM FAILURE:
174
+
175
+ - Inventing technologies not mentioned in the architecture document
176
+ - Ambiguous verdicts (anything other than Covered or Missing)
177
+ - Analyzing API surfaces or skill content in detail (that is Step 03)
178
+ - Not providing actionable recommendations for missing skills
179
+ - Hardcoded paths instead of frontmatter variables
180
+
181
+ **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.