bmad-module-skill-forge 0.2.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 (154) hide show
  1. package/.nvmrc +1 -0
  2. package/LICENSE +26 -0
  3. package/README.md +213 -0
  4. package/docs/404.md +20 -0
  5. package/docs/agents.md +73 -0
  6. package/docs/architecture.md +301 -0
  7. package/docs/examples.md +144 -0
  8. package/docs/getting-started.md +198 -0
  9. package/docs/index.md +75 -0
  10. package/docs/workflows.md +190 -0
  11. package/package.json +109 -0
  12. package/src/agents/forger.agent.yaml +93 -0
  13. package/src/forger/README.md +17 -0
  14. package/src/forger/forge-tier.yaml +13 -0
  15. package/src/forger/preferences.yaml +10 -0
  16. package/src/knowledge/agentskills-spec.md +158 -0
  17. package/src/knowledge/confidence-tiers.md +153 -0
  18. package/src/knowledge/manual-section-integrity.md +156 -0
  19. package/src/knowledge/overview.md +56 -0
  20. package/src/knowledge/progressive-capability.md +120 -0
  21. package/src/knowledge/provenance-tracking.md +163 -0
  22. package/src/knowledge/skf-knowledge-index.csv +9 -0
  23. package/src/knowledge/skill-lifecycle.md +150 -0
  24. package/src/knowledge/zero-hallucination.md +101 -0
  25. package/src/module-help.csv +12 -0
  26. package/src/module.yaml +22 -0
  27. package/src/workflows/README.md +148 -0
  28. package/src/workflows/analyze-source/data/skill-brief-schema.md +75 -0
  29. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +88 -0
  30. package/src/workflows/analyze-source/steps-c/step-01-init.md +191 -0
  31. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +144 -0
  32. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +208 -0
  33. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +199 -0
  34. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +222 -0
  35. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +236 -0
  36. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +239 -0
  37. package/src/workflows/analyze-source/templates/analysis-report-template.md +41 -0
  38. package/src/workflows/analyze-source/validation-report.md +657 -0
  39. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +385 -0
  40. package/src/workflows/analyze-source/workflow.md +61 -0
  41. package/src/workflows/audit-skill/data/drift-report-template.md +62 -0
  42. package/src/workflows/audit-skill/data/severity-rules.md +52 -0
  43. package/src/workflows/audit-skill/steps-c/step-01-init.md +195 -0
  44. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +191 -0
  45. package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +194 -0
  46. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +199 -0
  47. package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +210 -0
  48. package/src/workflows/audit-skill/steps-c/step-06-report.md +217 -0
  49. package/src/workflows/audit-skill/validation-report.md +545 -0
  50. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +318 -0
  51. package/src/workflows/audit-skill/workflow.md +63 -0
  52. package/src/workflows/brief-skill/data/skill-brief-schema.md +82 -0
  53. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +184 -0
  54. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +203 -0
  55. package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +225 -0
  56. package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +185 -0
  57. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +156 -0
  58. package/src/workflows/brief-skill/validation-report.md +630 -0
  59. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +360 -0
  60. package/src/workflows/brief-skill/workflow.md +57 -0
  61. package/src/workflows/create-skill/data/extraction-patterns.md +63 -0
  62. package/src/workflows/create-skill/data/skill-sections.md +166 -0
  63. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +176 -0
  64. package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +143 -0
  65. package/src/workflows/create-skill/steps-c/step-03-extract.md +184 -0
  66. package/src/workflows/create-skill/steps-c/step-04-enrich.md +152 -0
  67. package/src/workflows/create-skill/steps-c/step-05-compile.md +198 -0
  68. package/src/workflows/create-skill/steps-c/step-06-validate.md +162 -0
  69. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +165 -0
  70. package/src/workflows/create-skill/steps-c/step-08-report.md +160 -0
  71. package/src/workflows/create-skill/validation-report.md +189 -0
  72. package/src/workflows/create-skill/workflow-plan-create-skill.md +491 -0
  73. package/src/workflows/create-skill/workflow.md +52 -0
  74. package/src/workflows/create-stack-skill/data/integration-patterns.md +61 -0
  75. package/src/workflows/create-stack-skill/data/manifest-patterns.md +35 -0
  76. package/src/workflows/create-stack-skill/data/stack-skill-template.md +110 -0
  77. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +142 -0
  78. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +145 -0
  79. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +161 -0
  80. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +155 -0
  81. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +154 -0
  82. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +160 -0
  83. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +202 -0
  84. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +193 -0
  85. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +137 -0
  86. package/src/workflows/create-stack-skill/validation-report.md +401 -0
  87. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +481 -0
  88. package/src/workflows/create-stack-skill/workflow.md +59 -0
  89. package/src/workflows/export-skill/data/managed-section-format.md +70 -0
  90. package/src/workflows/export-skill/data/snippet-format.md +32 -0
  91. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +184 -0
  92. package/src/workflows/export-skill/steps-c/step-02-package.md +153 -0
  93. package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +166 -0
  94. package/src/workflows/export-skill/steps-c/step-04-update-context.md +222 -0
  95. package/src/workflows/export-skill/steps-c/step-05-token-report.md +126 -0
  96. package/src/workflows/export-skill/steps-c/step-06-summary.md +167 -0
  97. package/src/workflows/export-skill/validation-report.md +263 -0
  98. package/src/workflows/export-skill/workflow-plan-export-skill.md +369 -0
  99. package/src/workflows/export-skill/workflow.md +56 -0
  100. package/src/workflows/quick-skill/data/registry-resolution.md +91 -0
  101. package/src/workflows/quick-skill/data/skill-template.md +66 -0
  102. package/src/workflows/quick-skill/steps-c/step-01-resolve-target.md +165 -0
  103. package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +143 -0
  104. package/src/workflows/quick-skill/steps-c/step-03-quick-extract.md +177 -0
  105. package/src/workflows/quick-skill/steps-c/step-04-compile.md +180 -0
  106. package/src/workflows/quick-skill/steps-c/step-05-validate.md +150 -0
  107. package/src/workflows/quick-skill/steps-c/step-06-write.md +160 -0
  108. package/src/workflows/quick-skill/validation-report.md +543 -0
  109. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +405 -0
  110. package/src/workflows/quick-skill/workflow.md +56 -0
  111. package/src/workflows/setup-forge/data/tier-rules.md +50 -0
  112. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +140 -0
  113. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +141 -0
  114. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +116 -0
  115. package/src/workflows/setup-forge/steps-c/step-04-report.md +131 -0
  116. package/src/workflows/setup-forge/validation-report.md +504 -0
  117. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +428 -0
  118. package/src/workflows/setup-forge/workflow.md +49 -0
  119. package/src/workflows/test-skill/data/output-section-formats.md +96 -0
  120. package/src/workflows/test-skill/data/scoring-rules.md +74 -0
  121. package/src/workflows/test-skill/steps-c/step-01-init.md +185 -0
  122. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +162 -0
  123. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +222 -0
  124. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +249 -0
  125. package/src/workflows/test-skill/steps-c/step-05-score.md +222 -0
  126. package/src/workflows/test-skill/steps-c/step-06-report.md +175 -0
  127. package/src/workflows/test-skill/templates/test-report-template.md +24 -0
  128. package/src/workflows/test-skill/validation-report.md +390 -0
  129. package/src/workflows/test-skill/workflow-plan-test-skill.md +288 -0
  130. package/src/workflows/test-skill/workflow.md +57 -0
  131. package/src/workflows/update-skill/data/manual-section-rules.md +44 -0
  132. package/src/workflows/update-skill/data/merge-conflict-rules.md +62 -0
  133. package/src/workflows/update-skill/steps-c/step-01-init.md +208 -0
  134. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +184 -0
  135. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +187 -0
  136. package/src/workflows/update-skill/steps-c/step-04-merge.md +230 -0
  137. package/src/workflows/update-skill/steps-c/step-05-validate.md +187 -0
  138. package/src/workflows/update-skill/steps-c/step-06-write.md +204 -0
  139. package/src/workflows/update-skill/steps-c/step-07-report.md +201 -0
  140. package/src/workflows/update-skill/validation-report.md +559 -0
  141. package/src/workflows/update-skill/workflow-plan-update-skill.md +441 -0
  142. package/src/workflows/update-skill/workflow.md +56 -0
  143. package/tools/cli/commands/install.js +33 -0
  144. package/tools/cli/commands/status.js +195 -0
  145. package/tools/cli/commands/uninstall.js +226 -0
  146. package/tools/cli/commands/update.js +63 -0
  147. package/tools/cli/lib/compiler.js +306 -0
  148. package/tools/cli/lib/ide-commands.js +244 -0
  149. package/tools/cli/lib/installer.js +307 -0
  150. package/tools/cli/lib/manifest.js +109 -0
  151. package/tools/cli/lib/ui.js +277 -0
  152. package/tools/cli/lib/version-check.js +86 -0
  153. package/tools/cli/skf-cli.js +45 -0
  154. package/tools/skf-npx-wrapper.js +36 -0
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: 'step-07-generate-output'
3
+ description: 'Write all output files — SKILL.md, references, metadata, context-snippet, and forge-data'
4
+
5
+ nextStepFile: './step-08-validate.md'
6
+ stackSkillTemplate: '../data/stack-skill-template.md'
7
+ ---
8
+
9
+ # Step 7: Generate Output Files
10
+
11
+ ## STEP GOAL:
12
+
13
+ Write all deliverable and workspace artifact files to their target directories.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+
19
+ - 📖 CRITICAL: Read the complete step file before taking any action
20
+ - ⚙️ 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
21
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
+
23
+ ### Role Reinforcement:
24
+
25
+ - ✅ You are a skill packager operating in Ferris Architect mode
26
+ - ✅ Precise file writing — every file matches its template structure
27
+ - ✅ Hard halt on any write failure — partial output is worse than no output
28
+
29
+ ### Step-Specific Rules:
30
+
31
+ - 🎯 Write ALL output files in correct directory structure
32
+ - 🚫 FORBIDDEN to modify compiled content — step 06 produced the approved version
33
+ - 💬 Report each file written with path and size
34
+ - 🎯 Create directory structure before writing files
35
+
36
+ ## EXECUTION PROTOCOLS:
37
+
38
+ - 🎯 Create output directories, write all files
39
+ - 💾 Store written_files list as workflow state
40
+ - 📖 Auto-proceed to validation after all files written
41
+ - 🚫 HARD HALT on any individual file write failure
42
+
43
+ ## CONTEXT BOUNDARIES:
44
+
45
+ - From step 06: skill_content (approved compiled SKILL.md)
46
+ - From step 04: per_library_extractions[] for reference files
47
+ - From step 05: integration_graph for integration pair references
48
+ - From step 01: forge_tier, project info for metadata
49
+ - This step produces: written_files[] (all output artifacts)
50
+
51
+ ## MANDATORY SEQUENCE
52
+
53
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
54
+
55
+ ### 1. Create Output Directories
56
+
57
+ Create the directory structure:
58
+
59
+ ```
60
+ {skills_output_folder}/{project_name}-stack/
61
+ ├── references/
62
+ │ └── integrations/
63
+ ```
64
+
65
+ ```
66
+ {forge_data_folder}/{project_name}-stack/
67
+ ```
68
+
69
+ If directories already exist, proceed (overwrite previous output).
70
+
71
+ ### 2. Write SKILL.md
72
+
73
+ Write `{skills_output_folder}/{project_name}-stack/SKILL.md` with the approved skill_content from step 06.
74
+
75
+ ### 3. Write Per-Library Reference Files
76
+
77
+ For each confirmed library, write `{skills_output_folder}/{project_name}-stack/references/{library_name}.md`:
78
+
79
+ Load structure from `{stackSkillTemplate}` references section:
80
+ - Library name, version from manifest
81
+ - Import count and file count
82
+ - Key exports with signatures
83
+ - Usage patterns with file:line citations
84
+ - Confidence tier label
85
+
86
+ ### 4. Write Integration Pair Reference Files
87
+
88
+ For each detected integration pair, write `{skills_output_folder}/{project_name}-stack/references/integrations/{libraryA}-{libraryB}.md`:
89
+
90
+ Load structure from `{stackSkillTemplate}` integrations section:
91
+ - Library pair and integration type
92
+ - Co-import file count
93
+ - Integration pattern description with file:line citations
94
+ - Usage convention
95
+ - Confidence tier label
96
+
97
+ **If no integrations detected:** Skip this section (no files to write).
98
+
99
+ ### 5. Write context-snippet.md
100
+
101
+ Write `{skills_output_folder}/{project_name}-stack/context-snippet.md`:
102
+
103
+ Use ADR-L two-line format targeting ~30 tokens per library entry:
104
+ ```
105
+ **{library}** ({import_count} imports): {top_3_exports}
106
+ → integrates with: {comma-separated integration partners}
107
+ ```
108
+
109
+ ### 6. Write metadata.json
110
+
111
+ Write `{skills_output_folder}/{project_name}-stack/metadata.json`:
112
+
113
+ ```json
114
+ {
115
+ "skill_type": "stack",
116
+ "skill_name": "{project_name}-stack",
117
+ "version": "1.0.0",
118
+ "created": "{current_date}",
119
+ "forge_tier": "{tier}",
120
+ "library_count": N,
121
+ "integration_count": N,
122
+ "libraries": ["lib1", "lib2"],
123
+ "integration_pairs": [["lib1", "lib2"]],
124
+ "confidence_distribution": {"T1": N, "T1-low": N, "T2": N}
125
+ }
126
+ ```
127
+
128
+ ### 7. Write Forge Data Artifacts
129
+
130
+ Write workspace artifacts to `{forge_data_folder}/{project_name}-stack/`:
131
+
132
+ **provenance-map.json:**
133
+ ```json
134
+ {
135
+ "libraries": {
136
+ "lib_name": {
137
+ "manifest_source": "package.json",
138
+ "extraction_method": "ast_bridge|source_reading|qmd_bridge",
139
+ "confidence": "T1|T1-low|T2",
140
+ "files_analyzed": N,
141
+ "exports_found": N
142
+ }
143
+ },
144
+ "integrations": {
145
+ "libA+libB": {
146
+ "detection_method": "co-import grep",
147
+ "co_import_files": N,
148
+ "type": "pattern_type"
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ **evidence-report.md:**
155
+ - Extraction summary per library
156
+ - Integration detection results per pair
157
+ - Warnings and failures encountered
158
+ - Confidence tier distribution
159
+
160
+ ### 8. Display Write Summary
161
+
162
+ "**Output files written.**
163
+
164
+ **Deliverables** ({skills_output_folder}/{project_name}-stack/):
165
+ - ✓ SKILL.md ({line_count} lines)
166
+ - ✓ context-snippet.md ({token_estimate} tokens)
167
+ - ✓ metadata.json
168
+ - ✓ references/ — {lib_count} library files
169
+ - ✓ references/integrations/ — {pair_count} integration files
170
+
171
+ **Workspace** ({forge_data_folder}/{project_name}-stack/):
172
+ - ✓ provenance-map.json
173
+ - ✓ evidence-report.md
174
+
175
+ **Total files written:** {total_count}
176
+
177
+ **Proceeding to validation...**"
178
+
179
+ ### 9. Auto-Proceed to Next Step
180
+
181
+ Load, read the full file and then execute `{nextStepFile}`.
182
+
183
+ ---
184
+
185
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
186
+
187
+ ### ✅ SUCCESS:
188
+
189
+ - All deliverable files written to skills_output_folder
190
+ - All workspace artifacts written to forge_data_folder
191
+ - Directory structure created correctly
192
+ - Each file matches its template structure
193
+ - Write summary displayed with accurate counts
194
+
195
+ ### ❌ SYSTEM FAILURE:
196
+
197
+ - Any file write failure not caught (hard halt required)
198
+ - Modifying approved skill_content during writing
199
+ - Missing files from the expected output set
200
+ - Wrong directory paths for output
201
+
202
+ **Master Rule:** Write everything, modify nothing. Hard halt on any write failure.
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: 'step-08-validate'
3
+ description: 'Validate all output files against structure requirements and confidence tier completeness'
4
+
5
+ nextStepFile: './step-09-report.md'
6
+ stackSkillTemplate: '../data/stack-skill-template.md'
7
+ ---
8
+
9
+ # Step 8: Validate Output
10
+
11
+ ## STEP GOAL:
12
+
13
+ Validate all written output files against their expected structure and verify confidence tier label completeness.
14
+
15
+ ## MANDATORY EXECUTION RULES (READ FIRST):
16
+
17
+ ### Universal Rules:
18
+
19
+ - 📖 CRITICAL: Read the complete step file before taking any action
20
+ - ⚙️ 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
21
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
22
+
23
+ ### Role Reinforcement:
24
+
25
+ - ✅ You are a quality gate operator in Ferris Architect mode
26
+ - ✅ Validation is advisory — findings are warnings, not blockers
27
+ - ✅ Report findings accurately — do not downplay or exaggerate
28
+
29
+ ### Step-Specific Rules:
30
+
31
+ - 🎯 Validate structure and completeness, not content quality
32
+ - 🚫 FORBIDDEN to modify any output files — validation is read-only
33
+ - 💬 Report findings with specific file paths and issue descriptions
34
+ - 🎯 Advisory mode: always proceed to report regardless of findings
35
+
36
+ ## EXECUTION PROTOCOLS:
37
+
38
+ - 🎯 Check each deliverable file against its expected structure
39
+ - 💾 Store validation_result as workflow state
40
+ - 📖 Auto-proceed to report after validation complete
41
+ - 🚫 FORBIDDEN to halt on validation warnings (advisory only)
42
+
43
+ ## CONTEXT BOUNDARIES:
44
+
45
+ - From step 07: written_files[] (all output artifacts with paths)
46
+ - From step 01: forge_tier, project_name, skills_output_folder, forge_data_folder
47
+ - This step produces: validation_result {status, findings[], warnings[]}
48
+ - This is a quality gate — findings inform the report but do not block it
49
+
50
+ ## MANDATORY SEQUENCE
51
+
52
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
53
+
54
+ ### 1. Verify File Existence
55
+
56
+ Check that all expected files exist from written_files[]:
57
+
58
+ **Deliverables** (`{skills_output_folder}/{project_name}-stack/`):
59
+ - [ ] SKILL.md
60
+ - [ ] context-snippet.md
61
+ - [ ] metadata.json
62
+ - [ ] references/ directory with per-library files
63
+ - [ ] references/integrations/ directory with pair files (if integrations detected)
64
+
65
+ **Workspace** (`{forge_data_folder}/{project_name}-stack/`):
66
+ - [ ] provenance-map.json
67
+ - [ ] evidence-report.md
68
+
69
+ Record any missing files as **ERROR** findings.
70
+
71
+ ### 2. Validate SKILL.md Structure
72
+
73
+ Load `{stackSkillTemplate}` and verify SKILL.md contains expected sections:
74
+
75
+ - [ ] Header with project name, library count, integration count, forge tier
76
+ - [ ] Integration Patterns section (should appear BEFORE per-library summaries)
77
+ - [ ] Library Reference Index table
78
+ - [ ] Per-Library Summaries section
79
+ - [ ] Conventions section
80
+
81
+ Record missing sections as **WARNING** findings.
82
+
83
+ ### 3. Validate metadata.json Fields
84
+
85
+ Parse metadata.json and verify required fields:
86
+
87
+ - [ ] `skill_type` equals "stack"
88
+ - [ ] `skill_name` matches `{project_name}-stack`
89
+ - [ ] `version` is present
90
+ - [ ] `created` is present
91
+ - [ ] `forge_tier` matches the tier from step 01
92
+ - [ ] `library_count` matches actual number of reference files
93
+ - [ ] `integration_count` matches actual integration pair files
94
+ - [ ] `libraries` array is present and non-empty
95
+ - [ ] `confidence_distribution` object is present with T1/T1-low/T2 keys
96
+
97
+ Record mismatches as **WARNING** findings.
98
+
99
+ ### 4. Validate Reference File Completeness
100
+
101
+ For each confirmed library, verify `references/{library}.md` exists and contains:
102
+ - [ ] Library name header
103
+ - [ ] Version from manifest
104
+ - [ ] Key Exports section
105
+ - [ ] Usage Patterns section
106
+
107
+ For each integration pair (if any), verify `references/integrations/{libraryA}-{libraryB}.md` exists and contains:
108
+ - [ ] Integration pair header
109
+ - [ ] Type classification
110
+ - [ ] Integration Pattern section
111
+ - [ ] Key Files section
112
+
113
+ Record missing or incomplete files as **WARNING** findings.
114
+
115
+ ### 5. Validate Confidence Tier Labels
116
+
117
+ Scan across all output files for confidence tier coverage:
118
+
119
+ - [ ] SKILL.md: Each per-library summary has a confidence label
120
+ - [ ] SKILL.md: Each integration pair entry has a confidence label
121
+ - [ ] Reference files: Each has a confidence label in its header
122
+ - [ ] metadata.json: confidence_distribution sums match library_count
123
+
124
+ Record missing tier labels as **WARNING** findings.
125
+
126
+ ### 6. Validate context-snippet.md
127
+
128
+ Verify context-snippet.md follows ADR-L two-line format:
129
+ - [ ] Each library has an entry with import count and top exports
130
+ - [ ] Integration partners listed on second line
131
+ - [ ] No library from confirmed list is missing
132
+
133
+ Record format violations as **WARNING** findings.
134
+
135
+ ### 7. Display Validation Results
136
+
137
+ **If all checks pass:**
138
+
139
+ "**Validation complete — all checks passed.**
140
+
141
+ - **Files:** {file_count}/{file_count} present
142
+ - **SKILL.md:** Structure valid
143
+ - **metadata.json:** All required fields present
144
+ - **References:** {lib_count} library + {pair_count} integration files verified
145
+ - **Confidence tiers:** Complete coverage
146
+
147
+ **Proceeding to summary report...**"
148
+
149
+ **If warnings found:**
150
+
151
+ "**Validation complete with {warning_count} finding(s).**
152
+
153
+ **Findings:**
154
+ {For each finding:}
155
+ - ⚠ {severity}: {description} — {file_path}
156
+
157
+ **Summary:**
158
+ - **Files:** {present_count}/{expected_count} present
159
+ - **Warnings:** {warning_count}
160
+ - **Errors:** {error_count}
161
+
162
+ {If errors (missing files):}
163
+ **Note:** Missing files may indicate a write failure in step 07. Review evidence-report.md for details.
164
+
165
+ **Proceeding to summary report...**"
166
+
167
+ ### 8. Auto-Proceed to Next Step
168
+
169
+ Load, read the full file and then execute `{nextStepFile}`.
170
+
171
+ ---
172
+
173
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
174
+
175
+ ### ✅ SUCCESS:
176
+
177
+ - All expected files checked for existence
178
+ - SKILL.md validated against template structure
179
+ - metadata.json fields verified
180
+ - Reference files checked for completeness
181
+ - Confidence tier coverage verified
182
+ - Validation results displayed with specific findings
183
+ - Advisory mode: always proceeded to report
184
+
185
+ ### ❌ SYSTEM FAILURE:
186
+
187
+ - Modifying any output files during validation
188
+ - Halting the workflow on validation warnings
189
+ - Not checking all expected files
190
+ - Reporting vague findings without file paths
191
+ - Skipping the confidence tier check
192
+
193
+ **Master Rule:** Validate everything, modify nothing. Advisory findings — always proceed to report.
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: 'step-09-report'
3
+ description: 'Display final stack skill summary with confidence distribution and next workflow recommendations'
4
+ ---
5
+
6
+ # Step 9: Stack Skill Report
7
+
8
+ ## STEP GOAL:
9
+
10
+ Display the final summary of the forged stack skill with confidence distribution, output file listing, and next workflow recommendations.
11
+
12
+ ## MANDATORY EXECUTION RULES (READ FIRST):
13
+
14
+ ### Universal Rules:
15
+
16
+ - 📖 CRITICAL: Read the complete step file before taking any action
17
+ - ⚙️ 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
18
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
19
+
20
+ ### Role Reinforcement:
21
+
22
+ - ✅ You are Ferris delivering the final forge report
23
+ - ✅ Positive capability framing — lead with what was accomplished
24
+ - ✅ Warnings are secondary — present them only if they exist
25
+
26
+ ### Step-Specific Rules:
27
+
28
+ - 🎯 This is the FINAL step — no nextStepFile
29
+ - 🚫 FORBIDDEN to write or modify any files — report is console output only
30
+ - 💬 Lead with the positive summary, then details, then warnings if any
31
+ - 🎯 Recommend next workflows based on what was produced
32
+
33
+ ## EXECUTION PROTOCOLS:
34
+
35
+ - 🎯 Compile summary from all previous step results
36
+ - 📖 Display report to user — workflow is complete after this
37
+ - 🚫 No file writes, no state updates — this is terminal output
38
+
39
+ ## CONTEXT BOUNDARIES:
40
+
41
+ - From step 01: project_name, forge_tier
42
+ - From step 03: confirmed_dependencies[] count
43
+ - From step 04: per_library_extractions[] with confidence tiers
44
+ - From step 05: integration_graph with pair count
45
+ - From step 07: written_files[] with paths
46
+ - From step 08: validation_result with findings
47
+ - This step produces: console report (no stored artifacts)
48
+
49
+ ## MANDATORY SEQUENCE
50
+
51
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
+
53
+ ### 1. Display Stack Forged Banner
54
+
55
+ "**Stack forged: {project_name}-stack — {lib_count} libraries, {integration_count} integration patterns**
56
+
57
+ Forge tier: **{tier}**"
58
+
59
+ ### 2. Display Confidence Distribution
60
+
61
+ "**Confidence distribution:**
62
+
63
+ | Tier | Count | Description |
64
+ |------|-------|-------------|
65
+ | T1 | {count} | AST-verified structural extraction |
66
+ | T1-low | {count} | Source reading inference |
67
+ | T2 | {count} | QMD-enriched temporal context |"
68
+
69
+ ### 3. Display Output File Summary
70
+
71
+ "**Output files:**
72
+
73
+ **Deliverables** (`{skills_output_folder}/{project_name}-stack/`):
74
+ - SKILL.md — Integration patterns, library summaries, conventions
75
+ - context-snippet.md — Compressed stack index ({token_estimate} tokens)
76
+ - metadata.json — Skill metadata and library registry
77
+ - references/ — {lib_count} per-library reference files
78
+ {If integrations:} - references/integrations/ — {pair_count} integration pair files
79
+
80
+ **Workspace** (`{forge_data_folder}/{project_name}-stack/`):
81
+ - provenance-map.json — Extraction source tracking
82
+ - evidence-report.md — Evidence and confidence breakdown"
83
+
84
+ ### 4. Display Validation Summary
85
+
86
+ **If validation passed with no findings:**
87
+
88
+ "**Validation:** All checks passed"
89
+
90
+ **If validation had findings:**
91
+
92
+ "**Validation:** {warning_count} warning(s) found
93
+ {For each finding:}
94
+ - ⚠ {description}"
95
+
96
+ ### 5. Display Warnings (Conditional)
97
+
98
+ **Only display if warnings exist from any step:**
99
+
100
+ "**Warnings:**
101
+ {For each warning from steps 04, 05, 07, 08:}
102
+ - {warning_description}"
103
+
104
+ **If no warnings:** Skip this section entirely.
105
+
106
+ ### 6. Recommend Next Workflows
107
+
108
+ "**Next steps:**
109
+ - **[TS] test-skill** — Validate the stack skill against its own assertions
110
+ - **[ES] export-skill** — Package for distribution or agent loading
111
+
112
+ **Workflow complete.**"
113
+
114
+ ---
115
+
116
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
117
+
118
+ ### ✅ SUCCESS:
119
+
120
+ - Banner displayed with accurate library and integration counts
121
+ - Confidence distribution table with correct tier counts
122
+ - All output files listed with descriptions
123
+ - Validation summary reflects actual step 08 findings
124
+ - Warnings displayed only when they exist
125
+ - Next workflow recommendations included
126
+ - Positive capability framing throughout
127
+
128
+ ### ❌ SYSTEM FAILURE:
129
+
130
+ - Inaccurate counts in banner or distribution table
131
+ - Missing output files from the listing
132
+ - Displaying warnings section when no warnings exist
133
+ - Writing or modifying files in this step
134
+ - Not recommending next workflows
135
+ - Negative framing or apologetic tone
136
+
137
+ **Master Rule:** Celebrate what was built. Report accurately. Recommend next steps. Workflow complete.