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,141 @@
1
+ ---
2
+ name: 'step-02-write-config'
3
+ description: 'Write forge-tier.yaml, create preferences.yaml defaults, ensure forge-data/ exists'
4
+
5
+ nextStepFile: './step-03-auto-index.md'
6
+ ---
7
+
8
+ # Step 2: Write Configuration
9
+
10
+ ## STEP GOAL:
11
+
12
+ Write the detected tool availability and calculated tier to forge-tier.yaml, create preferences.yaml with defaults if it does not exist, and ensure the forge-data/ directory is present.
13
+
14
+ ## MANDATORY EXECUTION RULES (READ FIRST):
15
+
16
+ ### Universal Rules:
17
+
18
+ - 📖 CRITICAL: Read the complete step file before taking any action
19
+ - 🔄 CRITICAL: When loading next step, ensure entire file is read
20
+ - 🎯 Execute all operations autonomously — no user interaction
21
+
22
+ ### Role Reinforcement:
23
+
24
+ - ✅ You are a system executor writing configuration files
25
+ - ✅ File operations must be precise — correct paths, correct YAML structure
26
+ - ✅ Preserve user data (preferences.yaml) — never overwrite existing
27
+
28
+ ### Step-Specific Rules:
29
+
30
+ - 🎯 Focus only on writing configuration files and creating directories
31
+ - 🚫 FORBIDDEN to re-detect tools — use results from step-01
32
+ - 🚫 FORBIDDEN to overwrite existing preferences.yaml
33
+ - 💬 File write failures ARE errors — report clearly if they occur
34
+
35
+ ## EXECUTION PROTOCOLS:
36
+
37
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
38
+ - 💾 Write files to the forger-sidecar directory
39
+ - 📖 Use context from step-01 (detected_tools, calculated_tier)
40
+ - 🚫 FORBIDDEN to proceed if forge-tier.yaml write fails
41
+
42
+ ## CONTEXT BOUNDARIES:
43
+
44
+ - Available: {detected_tools}, {calculated_tier}, {previous_tier} from step-01
45
+ - Focus: file I/O operations only
46
+ - Limits: do not modify preferences.yaml if it exists
47
+ - Dependencies: step-01 must have completed with tool detection results
48
+
49
+ ## MANDATORY SEQUENCE
50
+
51
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
+
53
+ ### 1. Write forge-tier.yaml
54
+
55
+ Write to `{project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml`:
56
+
57
+ ```yaml
58
+ # Ferris Sidecar: Forge Tier State
59
+ # Written by setup-forge workflow
60
+
61
+ # Tool availability (detected during [SF] Setup Forge)
62
+ tools:
63
+ ast_grep: {true/false from detection}
64
+ gh_cli: {true/false from detection}
65
+ qmd: {true/false from detection}
66
+
67
+ # Capability tier (derived from tool availability)
68
+ # Quick = no tools | Forge = ast-grep | Deep = ast-grep + gh + qmd
69
+ tier: {calculated_tier}
70
+ tier_detected_at: {current ISO timestamp}
71
+ ```
72
+
73
+ **This file is ALWAYS overwritten** on every run — it reflects current tool state.
74
+
75
+ If the write fails, report the error and halt the workflow.
76
+
77
+ ### 2. Handle preferences.yaml
78
+
79
+ Check if `{project-root}/_bmad/_memory/forger-sidecar/preferences.yaml` exists:
80
+
81
+ **If it does NOT exist (first run):** Create with defaults:
82
+
83
+ ```yaml
84
+ # Ferris Sidecar: User Preferences
85
+ # Created by setup-forge workflow on first run
86
+ # Edit this file to customize Ferris behavior
87
+
88
+ # Override detected tier (set to Quick, Forge, or Deep to force a tier)
89
+ tier_override: ~
90
+
91
+ # Skill generation defaults
92
+ default_source_authority: community
93
+ default_confidence_threshold: 0.7
94
+ ```
95
+
96
+ **If it DOES exist:** Do not modify. Preserve entirely.
97
+
98
+ ### 3. Ensure forge-data/ Directory
99
+
100
+ Check if `{project-root}/forge-data/` directory exists:
101
+
102
+ - If missing: create it
103
+ - If exists: skip silently
104
+
105
+ ### 4. Auto-Proceed
106
+
107
+ "**Proceeding to auto-index check...**"
108
+
109
+ #### Menu Handling Logic:
110
+
111
+ - After all file operations complete successfully, immediately load, read entire file, then execute {nextStepFile}
112
+
113
+ #### EXECUTION RULES:
114
+
115
+ - This is an auto-proceed step with no user choices
116
+ - Proceed directly to next step after configuration is written
117
+
118
+ ## CRITICAL STEP COMPLETION NOTE
119
+
120
+ ONLY WHEN forge-tier.yaml has been written successfully and preferences.yaml exists (created or pre-existing) will you load and read fully `{nextStepFile}` to execute the auto-index step.
121
+
122
+ ---
123
+
124
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
125
+
126
+ ### ✅ SUCCESS:
127
+
128
+ - forge-tier.yaml written with accurate tool booleans, tier, and timestamp
129
+ - preferences.yaml exists (created with defaults on first run, preserved on re-run)
130
+ - forge-data/ directory exists (created or pre-existing)
131
+ - Auto-proceeded to step-03
132
+
133
+ ### ❌ SYSTEM FAILURE:
134
+
135
+ - forge-tier.yaml write fails and workflow continues
136
+ - preferences.yaml overwritten when it already existed
137
+ - Incorrect tool values written (not matching step-01 detection)
138
+ - Missing tier_detected_at timestamp
139
+ - Re-detecting tools instead of using step-01 results
140
+
141
+ **Master Rule:** forge-tier.yaml must be written accurately. preferences.yaml must never be overwritten. These are the foundation for all downstream workflows.
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: 'step-03-auto-index'
3
+ description: 'Index current project as QMD collection (Deep tier only)'
4
+
5
+ nextStepFile: './step-04-report.md'
6
+ ---
7
+
8
+ # Step 3: Auto-Index Project
9
+
10
+ ## STEP GOAL:
11
+
12
+ If the detected tier is Deep, index the current project as a QMD collection for knowledge search. For Quick and Forge tiers, skip silently and proceed.
13
+
14
+ ## MANDATORY EXECUTION RULES (READ FIRST):
15
+
16
+ ### Universal Rules:
17
+
18
+ - 📖 CRITICAL: Read the complete step file before taking any action
19
+ - 🔄 CRITICAL: When loading next step, ensure entire file is read
20
+ - 🎯 Execute all operations autonomously — no user interaction
21
+
22
+ ### Role Reinforcement:
23
+
24
+ - ✅ You are a system executor performing conditional indexing
25
+ - ✅ Graceful degradation is paramount — never fail the workflow over indexing
26
+ - ✅ No negative messaging — do not mention what non-Deep tiers are missing
27
+
28
+ ### Step-Specific Rules:
29
+
30
+ - 🎯 Focus only on QMD indexing (Deep tier) or graceful skip (other tiers)
31
+ - 🚫 FORBIDDEN to display "missing" or "skipped" messages for non-Deep tiers
32
+ - 🚫 FORBIDDEN to fail the workflow if QMD indexing encounters errors
33
+ - 💬 If indexing fails: log the issue, note that index can be retried, continue
34
+
35
+ ## EXECUTION PROTOCOLS:
36
+
37
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
38
+ - 💾 QMD indexing operates on the project root directory
39
+ - 📖 Use {calculated_tier} from step-01 context
40
+ - 🚫 FORBIDDEN to attempt indexing for Quick or Forge tiers
41
+
42
+ ## CONTEXT BOUNDARIES:
43
+
44
+ - Available: {calculated_tier} from step-01, forge-tier.yaml written in step-02
45
+ - Focus: conditional QMD indexing only
46
+ - Limits: only index if Deep tier
47
+ - Dependencies: step-02 must have completed (forge-tier.yaml exists)
48
+
49
+ ## MANDATORY SEQUENCE
50
+
51
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
+
53
+ ### 1. Check Tier
54
+
55
+ Read `{calculated_tier}` from context.
56
+
57
+ **If tier is NOT Deep:** Proceed directly to step 4 — auto-proceed with no output, no messaging.
58
+
59
+ **If tier IS Deep:** Continue to section 2.
60
+
61
+ ### 2. Index Project with QMD (Deep Tier Only)
62
+
63
+ Index the current project directory as a QMD collection for knowledge search.
64
+
65
+ Use the QMD MCP server to create or update a collection for the current project:
66
+ - Collection name: derive from project directory name
67
+ - Source: project root directory
68
+ - Scope: markdown files, source code, documentation
69
+
70
+ **Timeout handling:** If indexing takes excessively long on a large project:
71
+ - Log that indexing is in progress but may need more time
72
+ - Note in context that index may be incomplete
73
+ - Do NOT halt or fail the workflow
74
+
75
+ **Error handling:** If QMD indexing fails:
76
+ - Log the specific error
77
+ - Note that indexing can be retried by re-running setup-forge
78
+ - The forge-tier.yaml already records `qmd: true` — the tool is available even if indexing failed
79
+ - Continue to step 4
80
+
81
+ ### 3. Auto-Proceed
82
+
83
+ "**Proceeding to forge status report...**"
84
+
85
+ #### Menu Handling Logic:
86
+
87
+ - After indexing completes (or is skipped for non-Deep tiers), immediately load, read entire file, then execute {nextStepFile}
88
+
89
+ #### EXECUTION RULES:
90
+
91
+ - This is an auto-proceed step with no user choices
92
+ - Proceed directly to next step after indexing or skip
93
+
94
+ ## CRITICAL STEP COMPLETION NOTE
95
+
96
+ ONLY WHEN the tier check has been performed (and indexing completed or skipped accordingly) will you load and read fully `{nextStepFile}` to execute the report step.
97
+
98
+ ---
99
+
100
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
101
+
102
+ ### ✅ SUCCESS:
103
+
104
+ - Deep tier: QMD indexing attempted, succeeded or degraded gracefully
105
+ - Quick/Forge tier: skipped silently with no negative messaging
106
+ - Workflow continues regardless of indexing outcome
107
+ - Auto-proceeded to step-04
108
+
109
+ ### ❌ SYSTEM FAILURE:
110
+
111
+ - Attempting QMD indexing for Quick or Forge tiers
112
+ - Displaying "skipped" or "missing" messages for non-Deep tiers
113
+ - Halting the workflow due to QMD indexing failure
114
+ - Not proceeding to step-04 after this step
115
+
116
+ **Master Rule:** This step must NEVER fail the workflow. Deep tier indexing is best-effort. Non-Deep tiers skip silently.
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: 'step-04-report'
3
+ description: 'Display forge status report with positive capability framing'
4
+
5
+ tierRulesData: '../data/tier-rules.md'
6
+ ---
7
+
8
+ # Step 4: Forge Status Report
9
+
10
+ ## STEP GOAL:
11
+
12
+ Display the forge status report with positive capability framing, report tier changes on re-run, and optionally fetch the latest agentskills.io spec if flagged.
13
+
14
+ ## MANDATORY EXECUTION RULES (READ FIRST):
15
+
16
+ ### Universal Rules:
17
+
18
+ - 📖 CRITICAL: Read the complete step file before taking any action
19
+ - 🎯 Execute all operations autonomously — display report and complete
20
+
21
+ ### Role Reinforcement:
22
+
23
+ - ✅ You are Ferris reporting forge readiness
24
+ - ✅ Frame ALL capabilities positively — describe what the tier GIVES
25
+ - ✅ On re-run: explicitly report what changed (upgrade/downgrade/same)
26
+ - ✅ Brief forge metaphor appropriate here — this is the completion moment
27
+
28
+ ### Step-Specific Rules:
29
+
30
+ - 🎯 Focus only on displaying the status report
31
+ - 🚫 FORBIDDEN to use negative framing ("missing", "lacking", "unavailable")
32
+ - 🚫 FORBIDDEN to list tools that are NOT available
33
+ - 💬 Use tier capability descriptions from tier-rules.md
34
+
35
+ ## EXECUTION PROTOCOLS:
36
+
37
+ - 🎯 Follow the MANDATORY SEQUENCE exactly
38
+ - 💾 Load tier-rules.md for capability descriptions and re-run messages
39
+ - 📖 Use context from step-01 (detected_tools, calculated_tier, previous_tier)
40
+ - 🚫 This is the final step — no next step to load
41
+
42
+ ## CONTEXT BOUNDARIES:
43
+
44
+ - Available: {detected_tools}, {calculated_tier}, {previous_tier}, {tier_override} from step-01
45
+ - Available: tool version strings from step-01
46
+ - Focus: report display only — no file modifications
47
+ - Dependencies: steps 01-03 must have completed
48
+
49
+ ## MANDATORY SEQUENCE
50
+
51
+ **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
52
+
53
+ ### 1. Load Capability Descriptions
54
+
55
+ Load and read {tierRulesData} for the tier capability descriptions and re-run messages.
56
+
57
+ ### 2. Display Forge Status Report
58
+
59
+ **Format the report as follows:**
60
+
61
+ ```
62
+ ═══════════════════════════════════════
63
+ FORGE STATUS
64
+ ═══════════════════════════════════════
65
+
66
+ Tier: {calculated_tier}
67
+ {tier capability description from tier-rules.md}
68
+
69
+ Tools Detected:
70
+ {for each tool that is available, show: tool name — version}
71
+
72
+ {if tier_override is active:}
73
+ Note: Tier override active (set in preferences.yaml)
74
+
75
+ {if re-run with tier change:}
76
+ {appropriate upgrade/downgrade message from tier-rules.md}
77
+
78
+ {if re-run with same tier:}
79
+ {same-tier message from tier-rules.md}
80
+
81
+ ═══════════════════════════════════════
82
+ Forge ready. {calculated_tier} tier active.
83
+ ═══════════════════════════════════════
84
+ ```
85
+
86
+ **Tool display rules:**
87
+ - Only show tools that ARE available with their version strings
88
+ - Do NOT list unavailable tools
89
+ - Do NOT show a "missing" column or section
90
+
91
+ ### 3. Handle --update-spec Flag (Optional)
92
+
93
+ **If `--update-spec` was passed:**
94
+ - Attempt to fetch the latest agentskills.io specification schema
95
+ - Use `gh` or `curl` to retrieve the spec
96
+ - Store in `{project-root}/forge-data/agentskills-spec.json` (or appropriate format)
97
+ - If fetch succeeds: display "agentskills.io spec updated."
98
+ - If fetch fails: display "Could not fetch agentskills.io spec. Existing spec (if any) unchanged."
99
+ - Do NOT fail the workflow over this — it is purely optional
100
+
101
+ **If `--update-spec` was NOT passed:**
102
+ - Skip silently
103
+
104
+ ### 4. Workflow Complete
105
+
106
+ This is the final step. The setup-forge workflow is now complete.
107
+
108
+ No next step to load. The workflow ends here.
109
+
110
+ ---
111
+
112
+ ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
113
+
114
+ ### ✅ SUCCESS:
115
+
116
+ - Forge status report displayed with positive capability framing
117
+ - Only available tools shown (no "missing" lists)
118
+ - Tier capability description matches calculated tier
119
+ - Re-run: tier change correctly reported (or same-tier confirmed)
120
+ - --update-spec handled if flagged (success or graceful failure)
121
+ - Workflow completes cleanly
122
+
123
+ ### ❌ SYSTEM FAILURE:
124
+
125
+ - Negative framing in report ("missing", "unavailable", "lacking")
126
+ - Listing tools that are NOT available
127
+ - Not using tier capability descriptions from tier-rules.md
128
+ - Not reporting tier change on re-run
129
+ - Attempting to load a next step (this is the final step)
130
+
131
+ **Master Rule:** The report must leave users feeling confident about their forge capabilities, not anxious about what they're missing. Positive framing only.