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
@@ -1,523 +0,0 @@
1
- ---
2
- conversionFrom: 'src/workflows/create-skill/create-skill.spec.md'
3
- originalFormat: 'Workflow Specification (placeholder)'
4
- stepsCompleted: ['step-00-conversion', 'step-02-classification', 'step-03-requirements', 'step-04-tools', 'step-05-plan-review', 'step-06-design', 'step-07-foundation', 'step-08-build-step-01', 'step-09-build-all-steps', 'step-10-confirmation', 'step-11-completion']
5
- created: 2026-02-26
6
- completionDate: 2026-02-26
7
- status: COMPLETE
8
- approvedDate: 2026-02-26
9
- confirmationDate: 2026-02-26
10
- confirmationType: conversion
11
- coverageStatus: complete
12
- ---
13
-
14
- # Workflow Creation Plan
15
-
16
- ## Conversion Source
17
-
18
- **Original Path:** src/workflows/create-skill/create-skill.spec.md
19
- **Original Format:** Workflow Specification / Placeholder (pre-implementation spec from module build step-05)
20
- **Detected Structure:** Single spec file with 8 planned steps, input/output contracts, agent integration notes. No workflow.md, no step files, no templates, no data files.
21
-
22
- ---
23
-
24
- ## Original Workflow Analysis
25
-
26
- ### Goal (from source)
27
-
28
- Compile a skill from a brief — the core compilation engine. Takes a skill-brief.yaml and source code, extracts function signatures and type definitions via AST analysis, enriches with QMD knowledge (Deep tier), validates against agentskills.io spec, and produces a complete SKILL.md with provenance map and evidence report. Supports `--batch` for multiple briefs.
29
-
30
- ### Original Steps (Complete List)
31
-
32
- **Step 1:** load-brief — Load and validate skill-brief.yaml, resolve source code location
33
- **Step 2:** ecosystem-check — Search if official skill already exists (advisory, not blocking)
34
- **Step 3:** extract — AST extraction of exports, signatures, types (tier-dependent: Quick=source reading, Forge=AST, Deep=AST)
35
- **Step 4:** enrich — QMD knowledge search for temporal context (Deep tier only, skip for Quick/Forge)
36
- **Step 5:** compile — Assemble SKILL.md sections from extracted data with confidence tiers
37
- **Step 6:** validate — Validate against agentskills.io spec via skill-check tool
38
- **Step 7:** generate-artifacts — Write SKILL.md, provenance-map.json, evidence-report.md, metadata.json, context-snippet.md, extraction-rules.yaml
39
- **Step 8:** report — Display compilation summary with confidence tiers, suggest next steps
40
-
41
- ### Output / Deliverable
42
-
43
- 7 output files across two directory trees:
44
-
45
- **skills/{name}/ (deliverables):**
46
- - SKILL.md — Active skill (trigger-based)
47
- - context-snippet.md — Passive context source template
48
- - metadata.json — Machine-readable birth certificate
49
- - references/ — Progressive disclosure files per function
50
-
51
- **forge-data/{name}/ (workspace artifacts):**
52
- - provenance-map.json — Source map, AST bindings
53
- - evidence-report.md — Build artifact, audit trail
54
- - extraction-rules.yaml — Language + ast-grep schema
55
-
56
- ### Input Requirements
57
-
58
- **Required:**
59
- - `{forge_data_folder}/{skill-name}/skill-brief.yaml` — Compilation config from brief-skill workflow
60
- - Source code (local path or GitHub repo URL)
61
-
62
- **Optional:**
63
- - `--batch` flag with list of briefs or directory path
64
- - `--continue` flag for resuming interrupted batch operations
65
-
66
- ### Key Instructions to LLM
67
-
68
- - Ferris operates in **Architect mode** — exploratory, structural, assembling
69
- - Structured reports with inline AST citations during work, no metaphor
70
- - Zero hallucination tolerance — every instruction traces to code
71
- - Confidence tier labeling: T1 (AST extraction), T2 (QMD evidence), T3 (external docs)
72
- - Positive capability framing — describe what the tier enables, not what's missing
73
- - Tool invisibility — tools are backstage, results are center stage
74
-
75
- ---
76
-
77
- ## Conversion Notes
78
-
79
- **What works well in original:**
80
- - Clean 8-step decomposition with single-responsibility boundaries
81
- - Tier-dependent behavior design at steps 03/04
82
- - Dual-output architecture (skills/ for deliverables, forge-data/ for workspace)
83
- - agentskills.io spec compliance as first-class concern
84
- - Confidence tier system (T1/T2/T3) well-defined in module brief
85
- - Progressive disclosure via references/ directory
86
-
87
- **What needs improvement:**
88
- - Spec incorrectly marks as "document-producing" — this is a multi-file action workflow
89
- - Quick tier fallback for step-03 needs explicit design (source reading via gh_bridge)
90
- - No detail on how --batch works (loop wrapper? sub-process per brief?)
91
- - Ecosystem check nuances missing (5-second timeout, 24-hour cache, advisory not blocking)
92
- - No error handling patterns defined
93
- - No sidecar checkpointing design for --continue recovery
94
-
95
- **Compliance gaps identified:**
96
- - No workflow.md entry point
97
- - No step files in steps-c/ directory
98
- - No BMAD frontmatter with stepsCompleted tracking
99
- - No menu/auto-proceed patterns defined
100
- - No data files or templates
101
- - No tier-dependent conditional logic architecture
102
- - Missing [MANUAL] section marker seeding for future update-skill compatibility
103
-
104
- **Deduced interaction model:**
105
- - Mostly autonomous with 2 strategic confirmation gates
106
- - Gate 1: After ecosystem check — if official skill found, user decides (proceed/abort/install existing)
107
- - Gate 2: After extraction — show findings (export count, confidence breakdown) before compilation
108
- - All other steps auto-proceed
109
- - Matches module brief use case stories (47s Quick, 8min batch)
110
-
111
- ---
112
-
113
- ## Classification Decisions
114
-
115
- **Workflow Name:** create-skill
116
- **Target Path:** _bmad-output/bmb-creations/workflows/create-skill/ (build location)
117
- **Installed Path:** {project-root}/_bmad/skf/workflows/skillforge/create-skill/ (per Ferris agent menu)
118
-
119
- **4 Key Decisions:**
120
- 1. **Document Output:** false — action-based workflow producing multiple files as side effects, not a progressively-built document. Steps accumulate data in context, step-07 writes all files at once.
121
- 2. **Module Affiliation:** SKF — part of the Skill Forge module, invoked through Ferris agent [CS] trigger, has access to SKF config variables (forge tier, tool availability, sidecar paths).
122
- 3. **Session Type:** single-session — primary use case is fast (47s Quick, minutes for Forge/Deep). Batch mode (`--batch`) is a loop wrapper repeating single-session runs, not a reason for continuable architecture. `--continue` resumes the batch loop via sidecar checkpointing.
123
- 4. **Lifecycle Support:** create-only — SKF splits lifecycle across specialized workflows: update-skill (edits/Surgeon mode), test-skill (validation/Audit mode), audit-skill (drift detection). No tri-modal needed.
124
-
125
- **Structure Implications:**
126
- - Only `steps-c/` directory needed
127
- - No `step-01b-continue.md` (single-session)
128
- - No `stepsCompleted` tracking in output (non-document)
129
- - No templates directory (non-document)
130
- - Data directory needed for shared reference files (extraction patterns, spec schema references)
131
- - Standard `step-01-init.md` with no continuation logic
132
-
133
- ---
134
-
135
- ## Requirements
136
-
137
- **Flow Structure:**
138
- - Pattern: Linear with conditional branches within steps (tier-dependent)
139
- - Phases: Load → Check → Extract → Enrich → Compile → Validate → Generate → Report
140
- - Estimated steps: 8
141
- - Conditional logic: Steps 03/04 branch internally by forge tier (Quick/Forge/Deep)
142
- - No branching steps — conditions stay within each step
143
-
144
- **User Interaction:**
145
- - Style: Mostly autonomous with 2 strategic confirmation gates
146
- - Gate 1 (step-02): If ecosystem check finds official skill — user decides: proceed / abort / install existing. No match = auto-proceed silently.
147
- - Gate 2 (step-03): After extraction — display export count, confidence breakdown, tier used. User confirms before compilation.
148
- - All other steps: Auto-proceed with no user interaction
149
- - Checkpoint frequency: Only at the 2 gates above
150
-
151
- **Inputs Required:**
152
- - Required: `forge-data/{skill-name}/skill-brief.yaml` (from brief-skill workflow)
153
- - Required: Source code location (local path or GitHub owner/repo)
154
- - Prerequisite: `setup-forge` must have run — `forge-tier.yaml` must exist in sidecar
155
- - Optional: `--batch` flag (list of briefs or directory for batch compilation)
156
- - Optional: `--continue` flag (resume interrupted batch from sidecar checkpoint)
157
-
158
- **Output Specifications:**
159
- - Type: Multi-file action — 7 files written to 2 directory trees
160
- - skills/{name}/: SKILL.md, context-snippet.md, metadata.json, references/
161
- - forge-data/{name}/: provenance-map.json, evidence-report.md, extraction-rules.yaml
162
- - Frequency: Single skill per run; batch mode loops the workflow per brief
163
- - [MANUAL] markers: Seed empty `<!-- [MANUAL] -->` sections in SKILL.md for future update-skill compatibility
164
-
165
- **Success Criteria:**
166
- - All 7 output files generated without errors
167
- - SKILL.md validates against agentskills.io spec (via skill-check)
168
- - Every instruction has provenance citation with confidence tier (T1/T2/T3)
169
- - Zero hallucinated content — uncitable claims excluded, not guessed
170
- - Confidence tier distribution reported (e.g., "20 T1, 3 T2, 0 T3")
171
- - Forge completion message: "Skill forged: {name} v{version} — {count} functions, T1 confidence."
172
-
173
- **Instruction Style:**
174
- - Overall: Prescriptive — compilation pipeline with exact operations
175
- - Tool commands specific (ast-grep scan, QMD search, gh read)
176
- - File operations exact with defined paths and formats
177
- - Matches setup-forge prescriptive pattern: deterministic operations, specific commands, conditional logic
178
- - Notes: Ferris Architect mode communication style during execution (structured reports, AST citations, no metaphor except at transitions)
179
-
180
- ---
181
-
182
- ## Tools Configuration
183
-
184
- **Core BMAD Tools:**
185
- - **Party Mode:** Excluded — prescriptive compilation pipeline, no creative exploration phases
186
- - **Advanced Elicitation:** Excluded — no facilitative deep-dive phases in a compilation workflow
187
- - **Brainstorming:** Excluded — no ideation phases, all steps are deterministic operations
188
-
189
- **LLM Features:**
190
- - **Web-Browsing:** Excluded — source access via gh_bridge, ecosystem check via skill-check. No raw web needed.
191
- - **File I/O:** Included — essential. Reads skill-brief.yaml, forge-tier.yaml, source files. Writes 7 output files across 2 directory trees (skills/{name}/, forge-data/{name}/).
192
- - **Sub-Agents:** Excluded — linear pipeline with step dependencies, no parallelizable specialized tasks for single skill compilation
193
- - **Sub-Processes:** Excluded — sequential dependency chain. Batch mode is a loop wrapper, not parallel processes.
194
-
195
- **Memory:**
196
- - Type: Single-session
197
- - Reads forge-tier.yaml from sidecar at init (existing state from setup-forge)
198
- - Batch --continue: checkpoint progress in sidecar (batch-progress.yaml)
199
- - No stepsCompleted tracking (non-document workflow)
200
-
201
- **External Integrations (SKF MCP Tools — all pre-detected by setup-forge):**
202
- - **gh_bridge:** Required all tiers — source reading, file trees, issues, releases, changelog
203
- - **skill-check:** Required all tiers — `npx skill-check check --fix --format json` for validation + auto-fix + quality scoring (0-100), `--no-security-scan` for fast validation, security scan for prompt injection detection, `split-body` for oversized body remediation
204
- - **ast_bridge:** Required Forge/Deep tiers — AST scan_definitions, run_rule, detect_co_imports
205
- - **qmd_bridge:** Required Deep tier only — search, vector_search, deep_search for temporal context
206
-
207
- **Installation Requirements:**
208
- - All tools pre-detected by setup-forge workflow
209
- - No new installations needed — workflow reads forge-tier.yaml to know what's available
210
- - Graceful degradation: if tier is Quick, AST and QMD steps skip automatically
211
-
212
- ---
213
-
214
- ## Workflow Design
215
-
216
- ### File Structure
217
-
218
- ```
219
- create-skill/
220
- ├── workflow.md (entry point, ~50 lines)
221
- ├── workflow-plan-create-skill.md (this plan file)
222
- ├── data/
223
- │ ├── skill-sections.md (SKILL.md section structure + agentskills.io format)
224
- │ └── extraction-patterns.md (tier-specific extraction instructions)
225
- └── steps-c/
226
- ├── step-01-load-brief.md (~150 lines, Init with Input Discovery)
227
- ├── step-02-ecosystem-check.md (~120 lines, conditional gate)
228
- ├── step-03-extract.md (~200 lines, complex middle)
229
- ├── step-03b-fetch-temporal.md (~240 lines, conditional auto-proceed)
230
- ├── step-03c-fetch-docs.md (~215 lines, conditional auto-proceed)
231
- ├── step-04-enrich.md (~130 lines, conditional middle)
232
- ├── step-05-compile.md (~200 lines, complex middle)
233
- ├── step-06-validate.md (~120 lines, simple middle)
234
- ├── step-07-generate-artifacts.md (~180 lines, simple middle)
235
- └── step-08-report.md (~120 lines, final)
236
- ```
237
-
238
- ### Step Sequence Table
239
-
240
- | Step | Name | Type | Menu Pattern | Goal |
241
- |------|------|------|-------------|------|
242
- | 01 | load-brief | Init (Input Discovery) | Auto-proceed (P3) | Load brief, resolve source, load forge tier |
243
- | 02 | ecosystem-check | Middle (Simple) | Conditional: auto if no match, user choice if match | Check ecosystem |
244
- | 03 | extract | Middle (Standard) | C only (P2) — Gate 2 | Tier-dependent extraction |
245
- | 03b | fetch-temporal | Middle (Simple) | Auto-proceed (P3) — Deep only | Fetch temporal context (issues, PRs, changelogs) and index into QMD |
246
- | 03c | fetch-docs | Middle (Simple) | Auto-proceed (P3) — when doc_urls present | Fetch remote documentation from brief-specified URLs for T3-confidence content |
247
- | 04 | enrich | Middle (Simple) | Auto-proceed (P3) — Deep only | QMD enrichment |
248
- | 05 | compile | Middle (Simple) | Auto-proceed (P3) | Assemble SKILL.md |
249
- | 06 | validate | Middle (Simple) | Auto-proceed (P3) | Validate spec |
250
- | 07 | generate-artifacts | Middle (Simple) | Auto-proceed (P3) | Write output files |
251
- | 08 | report | Final | None | Summary + next step |
252
-
253
- ### Step Action Plans
254
-
255
- **step-01-load-brief** (Init with Input Discovery)
256
- - Search forge-data/ for skill-brief.yaml matching user's request
257
- - If --batch: discover all briefs in specified directory
258
- - Load and validate brief structure (required fields: name, version, source_repo, language, scope)
259
- - Resolve source code location (local path or GitHub owner/repo)
260
- - Load forge-tier.yaml from sidecar — determine tier (Quick/Forge/Deep)
261
- - If forge-tier.yaml missing: halt with "Run [SF] Setup Forge first"
262
- - Auto-proceed to step-02
263
-
264
- **step-02-ecosystem-check** (Conditional Gate)
265
- - Query agentskills.io registry API for brief.name — 5-second timeout, 24-hour cache
266
- - If match found: present to user with [P] Proceed / [I] Install existing / [A] Abort
267
- - If no match OR timeout: auto-proceed silently
268
- - If registry API unavailable: skip silently (API unavailability is not an error)
269
- - Note: ecosystem lookup requires registry API, not `skill-check` CLI (which validates local skills only)
270
-
271
- **step-03-extract** (Standard Middle — Gate 2)
272
- - Load extraction-patterns.md data file
273
- - Quick tier: source reading via gh_bridge (list_tree + read_file), infer exports. T1-low confidence.
274
- - Forge/Deep tier: ast_bridge.scan_definitions() + detect_co_imports(). T1 confidence.
275
- - Build extraction inventory: export count, signatures, types, confidence breakdown
276
- - Present summary, user confirms [C] Continue
277
-
278
- **step-03b-fetch-temporal** (Simple Middle — Conditional Auto-proceed)
279
- - Deep tier only — Quick/Forge skip silently
280
- - GitHub repos only — non-GitHub sources skip silently
281
- - Fetch temporal context (issues, PRs, releases, changelog) via `gh` CLI
282
- - Targeted function searches using top_exports from extraction inventory
283
- - Index fetched content into QMD collection (`{skill-name}-temporal`)
284
- - Register collection in forge-tier.yaml; clean up staging directory
285
- - Cache-aware: skip re-fetch if collection < 7 days old
286
- - All failures degrade gracefully — never blocks the workflow
287
-
288
- **step-03c-fetch-docs** (Simple Middle — Conditional Auto-proceed)
289
- - Runs at any tier when `doc_urls` are present in the brief
290
- - Tool-agnostic: uses whatever web fetching capability is available (Firecrawl, WebFetch, web-reader, curl, etc.)
291
- - Fetches remote documentation from brief-specified URLs for T3-confidence content
292
- - Root URL detection: discovers and fetches relevant subpages for documentation sites
293
- - All extracted items cited as T3 with `[EXT:{url}]` provenance
294
- - T3 items never override existing T1/T1-low/T2 extractions
295
- - Supports docs-only briefs (T3 inventory replaces empty extraction inventory)
296
- - Deep tier: indexes fetched docs into QMD collection (`{skill-name}-docs`)
297
- - All failures degrade gracefully — never blocks the workflow
298
-
299
- **step-04-enrich** (Simple Middle — Conditional)
300
- - Deep tier: QMD searches per extracted function — issues, PRs, changelogs. T2 annotations.
301
- - Not Deep: skip silently, auto-proceed
302
- - QMD failure: degrade gracefully, continue without enrichment
303
-
304
- **step-05-compile** (Simple Middle)
305
- - Load skill-sections.md data file
306
- - Assemble SKILL.md: frontmatter, overview, quick start, API sections, [MANUAL] markers
307
- - Generate references/ content per function/type
308
- - Generate context-snippet.md (compressed 2-line format)
309
- - Auto-proceed
310
-
311
- **step-06-validate** (Simple Middle)
312
- - `npx skill-check check --fix --format json` (schema + frontmatter + auto-fix + quality score)
313
- - Pass: auto-proceed. Fail: attempt auto-fix, re-validate, halt if still failing.
314
- - skill-check unavailable: skip automated validation, add warning to evidence report
315
-
316
- **step-07-generate-artifacts** (Simple Middle)
317
- - Create directories: skills/{name}/, skills/{name}/references/, forge-data/{name}/
318
- - Write 4 deliverables to skills/{name}/
319
- - Write 3 workspace artifacts to forge-data/{name}/
320
- - Auto-proceed
321
-
322
- **step-08-report** (Final)
323
- - Display: skill name, version, source, export count, confidence distribution, tier, file list, warnings
324
- - Forge completion: "Skill forged: {name} v{version} — {count} functions, T1 confidence."
325
- - Suggest next: "[TS] Test Skill — verify completeness before export"
326
- - No nextStepFile (final)
327
-
328
- ### Data Flow
329
-
330
- ```
331
- step-01 READS: forge-tier.yaml, skill-brief.yaml
332
- SETS: tier, brief_data, source_location
333
-
334
- step-02 READS: agentskills.io registry API (ecosystem check — not skill-check CLI)
335
- SETS: ecosystem_status
336
-
337
- step-03 READS: source code via gh_bridge/ast_bridge
338
- SETS: extraction_inventory
339
-
340
- step-03b READS: source_repo via gh CLI, top_exports from extraction_inventory (Deep only)
341
- CREATES: QMD temporal collection ({skill-name}-temporal)
342
-
343
- step-03c READS: doc_urls from brief_data (when present, any tier)
344
- SETS: T3 items merged into extraction_inventory
345
-
346
- step-04 READS: QMD collections (Deep only)
347
- SETS: enrichment_annotations
348
-
349
- step-05 READS: extraction_inventory + enrichment_annotations
350
- BUILDS: skill_content
351
-
352
- step-06 READS: skill_content
353
- VALIDATES: agentskills.io spec
354
-
355
- step-07 READS: skill_content + validation_result
356
- WRITES: 7 output files
357
-
358
- step-08 DISPLAYS: compilation summary
359
- ```
360
-
361
- ### Error Handling
362
-
363
- | Error Type | Response | Pattern |
364
- |-----------|----------|---------|
365
- | Missing forge-tier.yaml | Halt: "Run [SF] Setup Forge first" | Hard prerequisite |
366
- | Missing skill-brief.yaml | Halt: "Run [BS] Brief Skill first, or [QS] Quick Skill" | Hard prerequisite |
367
- | Tool unavailable | Degrade to lower tier silently | Graceful degradation |
368
- | Ecosystem check timeout | Skip silently, proceed | Advisory, not blocking |
369
- | AST extraction file failure | Log warning, skip file, continue | Partial success |
370
- | Spec validation failure | Report, auto-fix, re-validate | Retry once |
371
- | File write failure | Halt with specific error | Real error |
372
-
373
- ### Workflow Chaining
374
-
375
- - Previous: brief-skill (produces skill-brief.yaml) — required
376
- - Prerequisite: setup-forge (produces forge-tier.yaml) — required
377
- - Alternative entry: quick-skill bypasses brief, invokes create-skill internally
378
- - Next recommended: test-skill → export-skill
379
-
380
- ### Subprocess Optimization
381
-
382
- No high-priority opportunities. Linear pipeline with tool-delegated heavy lifting.
383
- Low-priority: Pattern 4 could parallelize batch --batch per-brief, not primary use case.
384
-
385
- ---
386
-
387
- ## Step 01 Build Complete
388
-
389
- **Created:**
390
- - steps-c/step-01-load-brief.md (~175 lines)
391
-
392
- **Step Configuration:**
393
- - Type: Init with Input Discovery (non-continuable)
394
- - Menu: Auto-proceed (P3) — no user interaction
395
- - Next Step: step-02-ecosystem-check.md
396
-
397
- **Key Design Decisions:**
398
- - Frontmatter references forgeTierFile and extractionPatternsData
399
- - 6-section mandatory sequence: Load Forge Tier → Discover Skill Brief → Validate Brief Structure → Resolve Source Code Location → Report Initialization → Auto-proceed
400
- - Handles --batch flag for batch brief discovery
401
- - Positive capability framing for tier descriptions
402
- - Required brief fields: name, version, source_repo, language, scope
403
- - Halt with actionable errors if prerequisites missing
404
-
405
- ## Step 02 Build Complete
406
-
407
- **Created:**
408
- - steps-c/step-02-ecosystem-check.md (~110 lines)
409
-
410
- **Step Configuration:**
411
- - Type: Middle (Simple) — Conditional Gate
412
- - Menu: Conditional — auto-proceed if no match, custom [P]/[I]/[A] if match found
413
- - Next Step: step-03-extract.md
414
-
415
- **Key Design Decisions:**
416
- - Advisory, never blocking — tool failures and timeouts are silent skips
417
- - 5-second timeout on ecosystem queries, 24-hour cache
418
- - Custom menu only appears when a match is found (not standard A/P/C)
419
- - Three user options on match: Proceed / Install existing / Abort
420
-
421
- ## Step 03 Build Complete
422
-
423
- **Created:**
424
- - steps-c/step-03-extract.md (~170 lines)
425
-
426
- **Step Configuration:**
427
- - Type: Middle (Standard) — Gate 2 confirmation
428
- - Menu: C only after extraction summary presentation
429
- - Next Step: step-04-enrich.md
430
-
431
- **Key Design Decisions:**
432
- - Tier-dependent extraction: Quick (source reading, T1-low) vs Forge/Deep (AST, T1)
433
- - Graceful degradation if AST tools unavailable at Forge tier
434
- - Per-file failure handling: skip and continue
435
- - Extraction inventory with aggregate counts and confidence breakdown
436
- - Gate 2: user must confirm extraction findings before compilation
437
- - Zero hallucination — every export must have provenance citation
438
-
439
- ## Step 04 Build Complete
440
-
441
- **Created:**
442
- - steps-c/step-04-enrich.md (~115 lines)
443
-
444
- **Step Configuration:**
445
- - Type: Middle (Simple) — Conditional auto-proceed
446
- - Menu: Auto-proceed (P3) — no user interaction
447
- - Next Step: step-05-compile.md
448
-
449
- **Key Design Decisions:**
450
- - Deep tier only — Quick/Forge skip silently with no output
451
- - QMD searches per function: issues/PRs, changelog, migration/deprecation
452
- - T2 annotations with temporal classification (T2-past, T2-future)
453
- - Additive only — never modifies T1 extraction data
454
- - QMD failures degrade gracefully
455
-
456
- ## Step 05 Build Complete
457
-
458
- **Created:**
459
- - steps-c/step-05-compile.md (~175 lines)
460
-
461
- **Step Configuration:**
462
- - Type: Middle (Simple) — auto-proceed
463
- - Menu: Auto-proceed (P3)
464
- - Next Step: step-06-validate.md
465
-
466
- **Key Design Decisions:**
467
- - Loads skill-sections.md data file for agentskills.io format
468
- - Assembles all 7 content artifacts in context (no file writes)
469
- - [MANUAL] markers seeded for update-skill compatibility
470
- - Zero hallucination enforcement — no fabricated examples
471
- - References grouped by module/file/functional area
472
-
473
- ## Step 06 Build Complete
474
-
475
- **Created:**
476
- - steps-c/step-06-validate.md (~120 lines)
477
-
478
- **Step Configuration:**
479
- - Type: Middle (Simple) — auto-proceed
480
- - Menu: Auto-proceed (P3)
481
- - Next Step: step-07-generate-artifacts.md
482
-
483
- **Key Design Decisions:**
484
- - skill-check validation: `check --fix --format json` (schema + frontmatter + quality score + auto-fix + security scan)
485
- - Auto-fix pattern: validate → fix → re-validate (once per failure)
486
- - Tool unavailability: skip with warning, not halt
487
- - Validation failures are warnings — proceed to generation
488
- - Results recorded in evidence-report content
489
-
490
- ## Step 07 Build Complete
491
-
492
- **Created:**
493
- - steps-c/step-07-generate-artifacts.md (~130 lines)
494
-
495
- **Step Configuration:**
496
- - Type: Middle (Simple) — auto-proceed
497
- - Menu: Auto-proceed (P3)
498
- - Next Step: step-08-report.md
499
-
500
- **Key Design Decisions:**
501
- - Creates directory structure: skills/{name}/, forge-data/{name}/
502
- - Writes all 7 files from compiled content in context
503
- - Write-only step — no content modification
504
- - File write failures are real errors (halt, not degrade)
505
- - Verification step confirms all files exist
506
-
507
- ## Step 08 Build Complete
508
-
509
- **Created:**
510
- - steps-c/step-08-report.md (~140 lines)
511
-
512
- **Step Configuration:**
513
- - Type: Final — no next step
514
- - Menu: None (final step)
515
- - Next Step: N/A
516
-
517
- **Key Design Decisions:**
518
- - Forge completion banner: "Skill forged: {name} v{version}"
519
- - Full compilation summary with confidence distribution table
520
- - All output file paths listed
521
- - Next steps: test-skill, export-skill, update-skill
522
- - Context snippet provided for immediate CLAUDE.md use
523
- - Batch mode: loop back to step-01 for remaining briefs