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,360 @@
1
+ ---
2
+ conversionFrom: 'src/workflows/brief-skill/brief-skill.spec.md'
3
+ originalFormat: 'specification-document'
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']
5
+ created: 2026-02-27
6
+ status: CONFIRMED
7
+ approvedDate: 2026-02-27
8
+ confirmationDate: 2026-02-27
9
+ confirmationType: conversion
10
+ coverageStatus: complete
11
+ validationStatus: COMPLETE
12
+ validationDate: 2026-02-27
13
+ validationReport: './validation-report.md'
14
+ ---
15
+
16
+ # Workflow Creation Plan
17
+
18
+ ## Conversion Source
19
+
20
+ **Original Path:** src/workflows/brief-skill/brief-skill.spec.md
21
+ **Original Format:** Specification document (placeholder — not yet built)
22
+ **Detected Structure:** Single spec file defining a 5-step create-only workflow with entry point frontmatter, planned step table, input/output definitions, and agent integration notes
23
+
24
+ ---
25
+
26
+ ## Original Workflow Analysis
27
+
28
+ ### Goal (from source)
29
+
30
+ Scope and design a skill through guided discovery. Interactive workflow that helps the user define what to skill — target repo, scope (full library vs subset), language, inclusion/exclusion patterns. Produces a skill-brief.yaml that drives create-skill.
31
+
32
+ ### Original Steps (Complete List)
33
+
34
+ **Step 1:** gather-intent - Understand what the user wants to skill
35
+ **Step 2:** analyze-target - Examine source repo structure and exports
36
+ **Step 3:** scope-definition - Define inclusion/exclusion boundaries
37
+ **Step 4:** confirm-brief - Present brief summary for user confirmation
38
+ **Step 5:** write-brief - Generate skill-brief.yaml
39
+
40
+ ### Output / Deliverable
41
+
42
+ - `{forge_data_folder}/{skill-name}/skill-brief.yaml` — Compilation config that drives the create-skill workflow
43
+
44
+ ### Input Requirements
45
+
46
+ **Required:**
47
+ - Target repo (GitHub URL or local path)
48
+ - User intent (what to skill and why)
49
+
50
+ **Optional:**
51
+ - Scope hints (specific directories, files, or patterns)
52
+ - Language override
53
+
54
+ ### Key Instructions to LLM
55
+
56
+ - Spec designates Ferris (Architect mode) as the primary agent
57
+ - Create-only mode (steps-c/ only) — no edit or validate modes specified
58
+ - Document-producing workflow (outputs skill-brief.yaml)
59
+ - No explicit collaborative style defined yet — to be designed during conversion
60
+
61
+ ---
62
+
63
+ ## Conversion Notes
64
+
65
+ **What works well in original:**
66
+ - Clear 5-step progression from intent gathering through output generation
67
+ - Clean separation of concerns: gather → analyze → scope → confirm → write
68
+ - Well-defined input/output contract (repo path in, skill-brief.yaml out)
69
+ - Sensible agent assignment (Ferris in Architect mode)
70
+
71
+ **What needs improvement:**
72
+ - No step file content exists — only step names and one-line goals
73
+ - No menu handling, continuation logic, or user interaction patterns defined
74
+ - No frontmatter variable definitions for the step files
75
+ - No collaborative facilitation approach specified
76
+ - Output path uses `{forge_data_folder}` which needs resolution against module config
77
+ - No validation or error handling patterns
78
+
79
+ **Compliance gaps identified:**
80
+ - Missing: Complete step files with BMAD step-file architecture
81
+ - Missing: Frontmatter with proper variables (nextStepFile, etc.)
82
+ - Missing: Menu handling and continuation patterns
83
+ - Missing: Mandatory execution rules per step
84
+ - Missing: State tracking via stepsCompleted
85
+ - Missing: workflow.md entry point file
86
+ - Missing: Step processing rules and critical rules sections
87
+
88
+ ---
89
+
90
+ ## Memory-Informed Discovery Notes
91
+
92
+ ### Preserve
93
+ - 5-step interactive discovery pipeline (gather → analyze → scope → confirm → write)
94
+ - Input contract: GitHub URL or local path + user intent
95
+ - Confirm-before-write gate (step 04 → 05) as collaborative checkpoint
96
+ - Phase 1b Entry Point positioning feeding into create-skill pipeline
97
+
98
+ ### Address
99
+ - skill-brief.yaml must produce fields create-skill step-01-load-brief validates: name, version, source_repo, language, scope
100
+ - {forge_data_folder} path variable needs resolution against SKF sidecar/config
101
+ - No error handling patterns defined (inaccessible repo, failed analysis)
102
+ - No collaborative facilitation style specified
103
+
104
+ ### Add
105
+ - Forge tier awareness: detect available tier from forge-tier.yaml to scope appropriately
106
+ - Ecosystem check: verify if official skill already exists (pattern from create-skill/quick-skill step-02)
107
+ - Multi-language detection: auto-detect primary language during analyze-target
108
+ - Scope templates: common scoping patterns as selectable options (full library, specific modules, public API only)
109
+
110
+ ### Audience
111
+ - Developers using SKF module to create agent skills
112
+ - Ferris in Architect mode (exploratory, collaborative) — interactive discovery workflow
113
+ - Phase 1b Entry Points build priority
114
+
115
+ ---
116
+
117
+ ## Classification Decisions
118
+
119
+ **Workflow Name:** brief-skill
120
+ **Target Path:** {project-root}/_bmad/skf/workflows/brief-skill/
121
+
122
+ **4 Key Decisions:**
123
+ 1. **Document Output:** true — produces skill-brief.yaml as persistent compilation config
124
+ 2. **Module Affiliation:** SKF (Skill Forge module)
125
+ 3. **Session Type:** single-session — focused scoping conversation, ~10-15 minutes
126
+ 4. **Lifecycle Support:** create-only — steps-c/ only
127
+
128
+ **Structure Implications:**
129
+ - Single `steps-c/` directory for create steps
130
+ - No `step-01b-continue.md` needed (single-session)
131
+ - No `steps-e/` or `steps-v/` directories
132
+ - Document-producing: each step contributes progressively toward skill-brief.yaml
133
+ - SKF module variables available (forge_data_folder, forge tier config)
134
+ - Standard init step without continuation detection
135
+
136
+ ---
137
+
138
+ ## Requirements
139
+
140
+ **Flow Structure:**
141
+ - Pattern: Linear — 5 steps in sequence with confirmation gate at step 04
142
+ - Phases: Discovery (01) → Analysis (02) → Scoping (03) → Confirmation (04) → Output (05)
143
+ - Estimated steps: 5
144
+
145
+ **User Interaction:**
146
+ - Style: Guided session with collaborative discovery (Ferris Architect mode)
147
+ - Steps 01, 03: Highly collaborative — open-ended discovery facilitation
148
+ - Step 02: Mostly autonomous — Ferris reads repo, reports findings
149
+ - Step 04: Mandatory user checkpoint (P2 confirmation gate)
150
+ - Step 05: Autonomous — write YAML output
151
+ - Decision points: Target repo + intent (01), scope boundaries (03), approve brief (04)
152
+ - Checkpoint frequency: Menus at steps 01, 03, 04
153
+
154
+ **Inputs Required:**
155
+ - Required: Target repo (GitHub URL or local path), user intent (what to skill and why)
156
+ - Optional: Scope hints (directories, files, patterns), language override, forge tier preference
157
+ - Prerequisites: setup-forge completed (provides forge-tier.yaml with tier and tool availability)
158
+
159
+ **Output Specifications:**
160
+ - Type: Document (skill-brief.yaml)
161
+ - Format: Structured YAML with required fields
162
+ - Required fields: name, version, source_repo, language, scope (type, include, exclude), description, forge_tier, created, created_by
163
+ - Output path: {forge_data_folder}/{skill-name}/skill-brief.yaml
164
+ - Pattern: Direct-to-final — steps progressively gather data, step 05 writes complete YAML
165
+ - Frequency: Single output per run
166
+
167
+ **Success Criteria:**
168
+ - Valid skill-brief.yaml written to {forge_data_folder}/{skill-name}/
169
+ - All required fields present and valid (name, version, source_repo, language, scope)
170
+ - Source repo accessible (GitHub URL resolves or local path exists)
171
+ - Language correctly identified (auto-detected or user-specified)
172
+ - Scope boundaries clear and actionable for create-skill consumption
173
+ - User confirmed the brief before writing (step 04 gate passed)
174
+
175
+ **Instruction Style:**
176
+ - Overall: Mixed
177
+ - Intent-based: Steps 01, 03 — open-ended discovery ("What interests you about this library?", "Which parts are most relevant?")
178
+ - Prescriptive: Step 02 — exact analysis instructions (read repo structure, detect language, list exports)
179
+ - Prescriptive: Steps 04, 05 — exact presentation format and YAML generation rules
180
+ - Notes: Ferris Architect persona — exploratory, collaborative, zero-hallucination for analysis results
181
+
182
+ ---
183
+
184
+ ## Tools Configuration
185
+
186
+ **Core BMAD Tools:**
187
+ - **Party Mode:** excluded — focused discovery pipeline, not creative brainstorming
188
+ - **Advanced Elicitation:** included as menu option [A] — available at steps 01, 03 for deeper intent/scope exploration
189
+ - **Brainstorming:** excluded — scoping is analytical, not generative
190
+
191
+ **LLM Features:**
192
+ - **Web-Browsing:** included — Step 02 may resolve GitHub URLs, read READMEs, check package registries
193
+ - **File I/O:** included — Step 02 reads repo structure (local paths), Step 05 writes skill-brief.yaml, reads forge-tier.yaml
194
+ - **Sub-Agents:** excluded — linear 5-step pipeline with no parallelizable work
195
+ - **Sub-Processes:** excluded — no parallel workflows needed
196
+
197
+ **Memory:**
198
+ - Type: single-session
199
+ - Tracking: No sidecar-file needed; skill-brief.yaml is the persistent artifact
200
+ - State: Minimal — data accumulated across steps, written at step 05
201
+
202
+ **External Integrations:**
203
+ - gh CLI — reading GitHub repository structures (pre-detected by setup-forge)
204
+
205
+ **Installation Requirements:**
206
+ - None — all tools are built-in or pre-detected by setup-forge
207
+
208
+ ## Workflow Structure Preview
209
+
210
+ **Phase 1: Initialization (Step 01 - gather-intent)**
211
+ - Welcome user, explain brief-skill purpose
212
+ - Ask target repo URL/path and user intent
213
+ - Capture scope hints upfront
214
+ - Collaborative facilitation — open-ended discovery
215
+
216
+ **Phase 2: Analysis (Step 02 - analyze-target)**
217
+ - Load forge-tier.yaml for tier capabilities
218
+ - Read target repo structure (gh CLI or local filesystem)
219
+ - Auto-detect primary language
220
+ - List top-level modules, directories, exports
221
+ - Report findings to user (mostly autonomous)
222
+
223
+ **Phase 3: Scoping (Step 03 - scope-definition)**
224
+ - Present scope templates (full library / specific modules / public API only)
225
+ - Discuss inclusion/exclusion patterns
226
+ - Define boundaries collaboratively
227
+
228
+ **Phase 4: Confirmation (Step 04 - confirm-brief)**
229
+ - Present complete brief in human-readable format
230
+ - Show all fields for YAML output
231
+ - P2 confirmation gate — approve or revise
232
+
233
+ **Phase 5: Output (Step 05 - write-brief)**
234
+ - Generate skill-brief.yaml with all fields
235
+ - Write to {forge_data_folder}/{skill-name}/
236
+ - Report success, suggest create-skill as next step
237
+
238
+ ---
239
+
240
+ ## Workflow Design
241
+
242
+ ### File Structure
243
+
244
+ ```
245
+ brief-skill/
246
+ ├── workflow.md # Entry point
247
+ ├── data/
248
+ │ └── skill-brief-schema.md # Required fields, validation rules, YAML template
249
+ └── steps-c/
250
+ ├── step-01-gather-intent.md
251
+ ├── step-02-analyze-target.md
252
+ ├── step-03-scope-definition.md
253
+ ├── step-04-confirm-brief.md
254
+ └── step-05-write-brief.md
255
+ ```
256
+
257
+ ### Step Sequence Table
258
+
259
+ | # | Step Name | Type | Menu Pattern | Frontmatter Refs |
260
+ |---|-----------|------|-------------|-----------------|
261
+ | 01 | gather-intent | Init (with Input Discovery) | P2 (C only) | nextStepFile, forgeTierFile |
262
+ | 02 | analyze-target | Middle (Simple) | P3 (Auto-proceed) | nextStepFile |
263
+ | 03 | scope-definition | Middle (Standard) | P1 (A/P/C) | nextStepFile, advancedElicitationTask, partyModeWorkflow |
264
+ | 04 | confirm-brief | Middle (Standard) | Custom (R/A/P/C) | nextStepFile, reviseStepFile, briefSchemaFile, advancedElicitationTask, partyModeWorkflow |
265
+ | 05 | write-brief | Final | None | briefSchemaFile |
266
+
267
+ ### Step Action Plans
268
+
269
+ **Step 01 — gather-intent:**
270
+ 1. Load forge-tier.yaml from Ferris sidecar (input discovery pattern)
271
+ 2. If missing → warn, default to Quick tier
272
+ 3. Welcome user, explain brief-skill purpose and pipeline position
273
+ 4. Ask: "What do you want to skill?" — target repo URL or local path
274
+ 5. Ask: "What's your intent?" — why this skill, what use case
275
+ 6. Capture any upfront scope hints
276
+ 7. Derive skill name from target (user can override)
277
+ 8. Menu: [C] Continue
278
+
279
+ **Step 02 — analyze-target:**
280
+ 1. Resolve target: GitHub URL via gh api or validate local path
281
+ 2. If inaccessible → halt with actionable error
282
+ 3. Read repo structure (top-level files, directories)
283
+ 4. Detect primary language from file extensions and config files
284
+ 5. If language ambiguous → flag for user in step 03
285
+ 6. List top-level modules/directories and public exports
286
+ 7. Report findings summary to user
287
+ 8. Auto-proceed to step 03
288
+
289
+ **Step 03 — scope-definition:**
290
+ 1. Present analysis findings as context
291
+ 2. Offer scope templates: [F] Full library, [M] Specific modules, [P] Public API only
292
+ 3. Based on selection, guide inclusion/exclusion pattern definition
293
+ 4. For "Specific modules" → present directory list, let user select
294
+ 5. For "Public API only" → show detected exports, confirm boundaries
295
+ 6. Summarize scope decisions
296
+ 7. Menu: [A] Advanced Elicitation [P] Party Mode [C] Continue
297
+
298
+ **Step 04 — confirm-brief:**
299
+ 1. Load skill-brief-schema.md for field reference
300
+ 2. Present complete brief in human-readable format showing all YAML fields
301
+ 3. Highlight any fields with low confidence or defaults
302
+ 4. Menu: [R] Revise (→ reload step 03) [A] Advanced Elicitation [P] Party Mode [C] Continue
303
+
304
+ **Step 05 — write-brief:**
305
+ 1. Load skill-brief-schema.md for YAML template
306
+ 2. Generate complete skill-brief.yaml
307
+ 3. Create directory {forge_data_folder}/{skill-name}/
308
+ 4. Write skill-brief.yaml
309
+ 5. Display success summary
310
+ 6. Recommend next: "Run create-skill to compile your skill from this brief"
311
+ 7. Mark workflow complete
312
+
313
+ ### Data Flow
314
+
315
+ ```
316
+ Step 01: user_intent, target_repo, scope_hints, skill_name, forge_tier
317
+
318
+ Step 02: detected_language, repo_structure, export_list, module_list
319
+
320
+ Step 03: scope_type, include_patterns, exclude_patterns
321
+
322
+ Step 04: complete_brief_preview → user confirmation (or [R] revise → step 03)
323
+
324
+ Step 05: all accumulated state → skill-brief.yaml file
325
+ ```
326
+
327
+ ### Error Handling
328
+
329
+ | Error Scenario | Step | Response |
330
+ |---------------|------|----------|
331
+ | forge-tier.yaml missing | 01 | Warn, default to Quick tier, continue |
332
+ | Target repo inaccessible | 02 | Hard halt with actionable error |
333
+ | Language can't be detected | 02 | Flag for manual override in step 03 |
334
+ | No exports found | 02 | Warn, suggest full-library scope |
335
+ | User rejects brief | 04 | [R] loops back to step 03 |
336
+ | Write failure | 05 | Hard halt with error |
337
+
338
+ ### Workflow Chaining
339
+
340
+ **Prerequisites:**
341
+ - setup-forge → provides forge-tier.yaml (optional, defaults to Quick if missing)
342
+
343
+ **Next workflows:**
344
+ - create-skill → consumes skill-brief.yaml (recommended)
345
+ - test-skill → after create-skill completes
346
+
347
+ **Alternative entry:**
348
+ - quick-skill → brief-less path, skips entire brief-skill workflow
349
+
350
+ ### Subprocess Optimization
351
+
352
+ No high-priority subprocess opportunities. Linear interactive workflow against a single repo — main thread execution appropriate for all steps.
353
+
354
+ ### Role and Persona
355
+
356
+ - Ferris in Architect mode — exploratory, collaborative, warm
357
+ - Zero-hallucination for analysis results (step 02 reports only what's found)
358
+ - Guiding tone for discovery (steps 01, 03)
359
+ - Precise, structured presentation for confirmation (step 04)
360
+ - Efficient and clean for output (step 05)
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: brief-skill
3
+ description: Scope and design a skill through guided discovery
4
+ web_bundle: true
5
+ ---
6
+
7
+ # Brief Skill
8
+
9
+ **Goal:** Help the user define what to skill — target repo, scope, language, inclusion/exclusion patterns — and produce a skill-brief.yaml that drives create-skill.
10
+
11
+ **Your Role:** In addition to your name, communication_style, and persona, you are also a skill scoping architect collaborating with a developer who wants to create an agent skill. This is a partnership, not a client-vendor relationship. You bring expertise in source code analysis, API surface identification, and skill boundary design, while the user brings their domain knowledge and specific use case for the skill. Work together as equals.
12
+
13
+ **Meta-Context:** This workflow is the first step in the skill creation pipeline. The skill-brief.yaml you produce together becomes the input contract for create-skill, which performs the actual compilation. Your job is to ensure the brief is well-scoped, accurate, and actionable — not to build the skill itself.
14
+
15
+ ---
16
+
17
+ ## WORKFLOW ARCHITECTURE
18
+
19
+ ### Core Principles
20
+
21
+ - **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere to 1 file as directed at a time
22
+ - **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
23
+ - **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
24
+ - **State Tracking**: Data is accumulated conversationally across steps and written as skill-brief.yaml in the final step
25
+ - **Append-Only Building**: Each step builds on information gathered in previous steps
26
+
27
+ ### Step Processing Rules
28
+
29
+ 1. **READ COMPLETELY**: Always read the entire step file before taking any action
30
+ 2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
31
+ 3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
32
+ 4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
33
+ 5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
34
+
35
+ ### Critical Rules (NO EXCEPTIONS)
36
+
37
+ - 🛑 **NEVER** load multiple step files simultaneously
38
+ - 📖 **ALWAYS** read entire step file before execution
39
+ - 🚫 **NEVER** skip steps or optimize the sequence
40
+ - 🎯 **ALWAYS** follow the exact instructions in the step file
41
+ - ⏸️ **ALWAYS** halt at menus and wait for user input
42
+ - 📋 **NEVER** create mental todo lists from future steps
43
+ - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
44
+
45
+ ---
46
+
47
+ ## INITIALIZATION SEQUENCE
48
+
49
+ ### 1. Module Configuration Loading
50
+
51
+ Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
52
+
53
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `forge_data_folder`
54
+
55
+ ### 2. First Step Execution
56
+
57
+ Load, read the full file and then execute `./steps-c/step-01-gather-intent.md` to begin the workflow.
@@ -0,0 +1,63 @@
1
+ # Extraction Patterns by Tier
2
+
3
+ ## Quick Tier (No AST)
4
+
5
+ Source reading via gh_bridge — infer exports from file structure and content.
6
+
7
+ ### Strategy
8
+ 1. `gh_bridge.list_tree(owner, repo, branch)` — map source structure
9
+ 2. Identify entry points: index files, main exports, public modules
10
+ 3. `gh_bridge.read_file(owner, repo, path)` — read each entry point
11
+ 4. Extract: exported function names, parameter lists, return types (from signatures)
12
+ 5. Infer types from JSDoc, docstrings, type annotations in source
13
+
14
+ ### Confidence
15
+ - All results: T1-low (source reading without structural verification)
16
+ - No co-import detection available
17
+ - No AST-backed line numbers
18
+
19
+ ### Supported Patterns
20
+ - `export function name(...)` / `export const name = ...` (JS/TS)
21
+ - `pub fn name(...)` (Rust)
22
+ - `def name(...)` with `__all__` (Python)
23
+ - `func Name(...)` (Go, capitalized = exported)
24
+
25
+ ---
26
+
27
+ ## Forge Tier (AST Available)
28
+
29
+ Structural extraction via ast_bridge — verified exports with line-level citations.
30
+
31
+ ### Strategy
32
+ 1. Detect language from brief or file extensions
33
+ 2. `ast_bridge.scan_definitions(path, language)` — extract all exports
34
+ 3. For each export: function name, full signature, parameter types, return type, line number
35
+ 4. `ast_bridge.detect_co_imports(path, libraries[])` — find integration points
36
+ 5. Build extraction rules YAML for reproducibility
37
+
38
+ ### Confidence
39
+ - Exported functions with full signatures: T1 (AST-verified)
40
+ - Type definitions and interfaces: T1
41
+ - Co-import patterns: T1
42
+ - Internal/private functions: excluded (not part of public API)
43
+
44
+ ### ast-grep Patterns
45
+ - JS/TS: `export function $NAME($$$PARAMS): $RET` / `export const $NAME`
46
+ - Rust: `pub fn $NAME($$$PARAMS) -> $RET`
47
+ - Python: function definitions within `__all__` list
48
+ - Go: capitalized function definitions
49
+
50
+ ---
51
+
52
+ ## Deep Tier (AST + QMD)
53
+
54
+ Same extraction as Forge tier. Deep tier adds enrichment in step-04, not extraction.
55
+
56
+ ### Strategy
57
+ - Identical to Forge tier extraction
58
+ - QMD enrichment happens in the next step (step-04-enrich)
59
+ - Extraction results carry forward unchanged
60
+
61
+ ### Confidence
62
+ - Extraction: same as Forge (T1)
63
+ - Enrichment annotations added in step-04: T2
@@ -0,0 +1,166 @@
1
+ # SKILL.md Section Structure
2
+
3
+ ## agentskills.io Compliant Format
4
+
5
+ ### Frontmatter (Required)
6
+
7
+ ```yaml
8
+ ---
9
+ name: {skill-name}
10
+ version: {source-version}
11
+ description: {skill-name} — {export-count} verified functions
12
+ author: {source-author}
13
+ ---
14
+ ```
15
+
16
+ ### Section Order
17
+
18
+ 1. **Overview** — What this skill provides, source repo, version, tier used
19
+ 2. **Quick Start** — Most common 3-5 functions with minimal examples
20
+ 3. **API Reference** — Grouped by module/file, each function with:
21
+ - Signature with types
22
+ - Parameters table
23
+ - Return type
24
+ - Usage example (from source tests/docs if available)
25
+ - Provenance citation: `[AST:{file}:L{line}]` or `[SRC:{file}:L{line}]`
26
+ 4. **Type Definitions** — Exported types, interfaces, enums
27
+ 5. **Integration Patterns** — Co-import patterns detected by ast_bridge (Forge/Deep only)
28
+ 6. **Manual Sections** — Seeded with `<!-- [MANUAL] -->` markers for update-skill
29
+
30
+ ### Provenance Citation Format
31
+
32
+ | Tier | Format | Example |
33
+ |------|--------|---------|
34
+ | T1 (AST) | `[AST:{file}:L{line}]` | `[AST:src/auth/index.ts:L42]` |
35
+ | T1-low (Source) | `[SRC:{file}:L{line}]` | `[SRC:src/auth/index.ts:L42]` |
36
+ | T2 (QMD) | `[QMD:{collection}:{doc}]` | `[QMD:project:CHANGELOG.md]` |
37
+ | T3 (External) | `[EXT:{url}]` | `[EXT:docs.example.com/api]` |
38
+
39
+ ### [MANUAL] Section Markers
40
+
41
+ Seed empty manual sections for future update-skill compatibility:
42
+
43
+ ```markdown
44
+ <!-- [MANUAL:additional-notes] -->
45
+ <!-- Add custom notes here. This section is preserved during skill updates. -->
46
+ <!-- [/MANUAL:additional-notes] -->
47
+ ```
48
+
49
+ Place after Quick Start and after API Reference sections.
50
+
51
+ ---
52
+
53
+ ## context-snippet.md Format
54
+
55
+ Compressed 2-line-per-skill format for CLAUDE.md managed section:
56
+
57
+ ```markdown
58
+ {skill-name} -> skills/{skill-name}/
59
+ exports: {comma-separated top 10 function names}
60
+ ```
61
+
62
+ ---
63
+
64
+ ## metadata.json Structure
65
+
66
+ ```json
67
+ {
68
+ "name": "{skill-name}",
69
+ "version": "{source-version}",
70
+ "skill_type": "individual",
71
+ "source_authority": "{official|community|internal}",
72
+ "source_repo": "{github-url}",
73
+ "source_commit": "{commit-hash}",
74
+ "forge_tier": "{quick|forge|deep}",
75
+ "spec_version": "1.3",
76
+ "generated_at": "{ISO-8601}",
77
+ "tool_versions": {
78
+ "ast_grep": "{version-or-null}",
79
+ "qmd": "{version-or-null}",
80
+ "skf": "1.0.0"
81
+ },
82
+ "stats": {
83
+ "exports_documented": 0,
84
+ "exports_total": 0,
85
+ "coverage": 0.0,
86
+ "confidence_t1": 0,
87
+ "confidence_t2": 0,
88
+ "confidence_t3": 0
89
+ },
90
+ "dependencies": [],
91
+ "compatibility": "{semver-range}"
92
+ }
93
+ ```
94
+
95
+ ---
96
+
97
+ ## references/ Directory Structure
98
+
99
+ One file per major function group or type:
100
+
101
+ ```
102
+ references/
103
+ ├── {function-group-a}.md — Detailed reference with full examples
104
+ ├── {function-group-b}.md — Detailed reference with full examples
105
+ └── {type-name}.md — Type definition details
106
+ ```
107
+
108
+ Each reference file includes:
109
+ - Full function signatures
110
+ - Detailed parameter descriptions
111
+ - Return value details
112
+ - Complete usage examples
113
+ - Related functions cross-references
114
+ - Temporal annotations (Deep tier: T2-past, T2-future)
115
+
116
+ ---
117
+
118
+ ## provenance-map.json Structure
119
+
120
+ ```json
121
+ {
122
+ "skill_name": "{name}",
123
+ "source_repo": "{url}",
124
+ "source_commit": "{hash}",
125
+ "generated_at": "{ISO-8601}",
126
+ "entries": [
127
+ {
128
+ "claim": "getToken accepts userId and optional TokenOptions",
129
+ "source_file": "src/auth/index.ts",
130
+ "source_line": 42,
131
+ "confidence": "T1",
132
+ "extraction_method": "ast_bridge.scan_definitions",
133
+ "ast_node_type": "export_function_declaration"
134
+ }
135
+ ]
136
+ }
137
+ ```
138
+
139
+ ---
140
+
141
+ ## evidence-report.md Structure
142
+
143
+ ```markdown
144
+ # Evidence Report: {skill-name}
145
+
146
+ **Generated:** {date}
147
+ **Forge Tier:** {tier}
148
+ **Source:** {repo} @ {commit}
149
+
150
+ ## Tool Versions
151
+ - ast-grep: {version}
152
+ - QMD: {version}
153
+ - SKF: 1.0.0
154
+
155
+ ## Extraction Summary
156
+ - Files scanned: {count}
157
+ - Exports found: {count}
158
+ - Confidence: T1={n}, T2={n}, T3={n}
159
+
160
+ ## Validation Results
161
+ - Schema: {pass/fail}
162
+ - Frontmatter: {pass/fail}
163
+
164
+ ## Warnings
165
+ - {any warnings from extraction or validation}
166
+ ```