bmad-module-skill-forge 0.4.0 → 0.6.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.
- package/README.md +3 -2
- package/docs/agents.md +3 -0
- package/docs/concepts.md +24 -6
- package/docs/examples.md +31 -2
- package/docs/getting-started.md +11 -0
- package/docs/{architecture.md → how-it-works.md} +49 -25
- package/docs/index.md +2 -2
- package/docs/workflows.md +6 -6
- package/package.json +2 -2
- package/src/agents/forger.agent.yaml +1 -1
- package/src/forger/forge-tier.yaml +17 -1
- package/src/forger/preferences.yaml +1 -1
- package/src/knowledge/agentskills-spec.md +25 -0
- package/src/knowledge/ccc-bridge.md +110 -0
- package/src/knowledge/confidence-tiers.md +3 -3
- package/src/knowledge/manual-section-integrity.md +8 -0
- package/src/knowledge/overview.md +4 -2
- package/src/knowledge/progressive-capability.md +12 -4
- package/src/knowledge/provenance-tracking.md +13 -0
- package/src/knowledge/qmd-registry.md +14 -0
- package/src/knowledge/skf-knowledge-index.csv +5 -3
- package/src/knowledge/skill-lifecycle.md +2 -2
- package/src/knowledge/split-body-strategy.md +41 -0
- package/src/module-help.csv +1 -1
- package/src/module.yaml +1 -1
- package/src/workflows/README.md +1 -1
- package/src/workflows/analyze-source/data/skill-brief-schema.md +3 -1
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +27 -0
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +9 -4
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +1 -1
- package/src/workflows/analyze-source/validation-report.md +2 -2
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
- package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
- package/src/workflows/audit-skill/steps-c/step-01-init.md +4 -2
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +18 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +14 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +5 -5
- package/src/workflows/audit-skill/validation-report.md +3 -3
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +2 -2
- package/src/workflows/audit-skill/workflow.md +1 -1
- package/src/workflows/brief-skill/data/scope-templates.md +4 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +7 -3
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +3 -3
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +12 -0
- package/src/workflows/create-skill/data/compile-assembly-rules.md +43 -2
- package/src/workflows/create-skill/data/extraction-patterns-tracing.md +110 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +41 -39
- package/src/workflows/create-skill/data/skill-sections.md +31 -5
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +5 -3
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +32 -2
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +5 -5
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +8 -8
- package/src/workflows/create-skill/steps-c/step-05-compile.md +6 -2
- package/src/workflows/create-skill/steps-c/step-06-validate.md +8 -9
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +46 -1
- package/src/workflows/create-skill/steps-c/step-08-report.md +1 -0
- package/src/workflows/create-skill/validation-report.md +1 -1
- package/src/workflows/create-skill/workflow-plan-create-skill.md +4 -2
- package/src/workflows/create-skill/workflow.md +1 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +10 -0
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +2 -2
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +1 -1
- package/src/workflows/create-stack-skill/validation-report.md +1 -1
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +2 -2
- package/src/workflows/create-stack-skill/workflow.md +1 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +1 -1
- package/src/workflows/export-skill/steps-c/step-02-package.md +8 -4
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +3 -1
- package/src/workflows/export-skill/workflow-plan-export-skill.md +1 -1
- package/src/workflows/quick-skill/data/skill-template.md +8 -0
- package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +3 -2
- package/src/workflows/setup-forge/data/tier-rules.md +16 -6
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +32 -15
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +24 -6
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
- package/src/workflows/setup-forge/steps-c/step-04-report.md +14 -2
- package/src/workflows/setup-forge/validation-report.md +1 -1
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +11 -9
- package/src/workflows/setup-forge/workflow.md +1 -1
- package/src/workflows/test-skill/data/scoring-rules.md +14 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +2 -2
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +3 -1
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +4 -1
- package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +7 -3
- package/src/workflows/test-skill/steps-c/step-05-score.md +1 -1
- package/src/workflows/test-skill/steps-c/step-06-report.md +27 -0
- package/src/workflows/test-skill/templates/test-report-template.md +3 -0
- package/src/workflows/test-skill/validation-report.md +2 -2
- package/src/workflows/test-skill/workflow-plan-test-skill.md +2 -2
- package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +11 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +19 -2
- package/src/workflows/update-skill/steps-c/step-04-merge.md +8 -0
- package/src/workflows/update-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/update-skill/steps-c/step-06-write.md +7 -2
- package/src/workflows/update-skill/validation-report.md +1 -1
- package/src/workflows/update-skill/workflow-plan-update-skill.md +1 -1
- package/tools/cli/commands/status.js +2 -1
|
@@ -61,10 +61,11 @@ Halt with: "Forge halted: No forge configuration found. Run [SF] Setup Forge fir
|
|
|
61
61
|
|
|
62
62
|
**If file exists:**
|
|
63
63
|
Extract and report:
|
|
64
|
-
- `tier`: Quick, Forge, or Deep
|
|
65
|
-
- `tools`: which tools are available (gh, ast-grep, qmd)
|
|
64
|
+
- `tier`: Quick, Forge, Forge+, or Deep
|
|
65
|
+
- `tools`: which tools are available (gh, ast-grep, ccc, qmd)
|
|
66
|
+
- `ccc_index`: ccc index state (status, indexed_path, last_indexed) — needed by step-02b
|
|
66
67
|
|
|
67
|
-
**Apply tier override:** Read `{preferencesFile}`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
|
|
68
|
+
**Apply tier override:** Read `{preferencesFile}`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
|
|
68
69
|
|
|
69
70
|
### 2. Discover Skill Brief
|
|
70
71
|
|
|
@@ -138,6 +139,7 @@ Proceeding to ecosystem check..."
|
|
|
138
139
|
Where tier_description follows positive capability framing:
|
|
139
140
|
- Quick: "Source reading and spec validation"
|
|
140
141
|
- Forge: "AST-backed structural extraction"
|
|
142
|
+
- Forge+: "Semantic-guided precision — ccc pre-ranks files before AST extraction"
|
|
141
143
|
- Deep: "Full intelligence — structural + contextual + temporal"
|
|
142
144
|
|
|
143
145
|
### 6. Menu Handling Logic
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-02-ecosystem-check'
|
|
3
3
|
description: 'Check agentskills.io ecosystem for existing official skill before compilation'
|
|
4
|
-
nextStepFile: './step-
|
|
4
|
+
nextStepFile: './step-02b-ccc-discover.md'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Step 2: Ecosystem Check
|
|
@@ -131,7 +131,7 @@ If no match is found, this step auto-proceeds with no user interaction.
|
|
|
131
131
|
- Match presented factually with clear options if found
|
|
132
132
|
- No-match case auto-proceeds silently
|
|
133
133
|
- User decision respected (Proceed/Install/Abort)
|
|
134
|
-
- Auto-proceeded to step-
|
|
134
|
+
- Auto-proceeded to step-02b (when no match or user chose Proceed)
|
|
135
135
|
|
|
136
136
|
### ❌ SYSTEM FAILURE:
|
|
137
137
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-02b-ccc-discover'
|
|
3
|
+
description: 'CCC semantic discovery pass — Forge+ and Deep tiers when ccc is available, skip for Quick/Forge'
|
|
4
|
+
nextStepFile: './step-03-extract.md'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 2b: CCC Semantic Discovery
|
|
8
|
+
|
|
9
|
+
## STEP GOAL:
|
|
10
|
+
|
|
11
|
+
If tier is Forge+ or Deep AND ccc is available, perform a semantic discovery pass over the source code to identify the most relevant files for the skill being created. Store ranked discovery results in context to pre-rank the file extraction queue in step-03.
|
|
12
|
+
|
|
13
|
+
For Quick and Forge tiers, or when ccc is unavailable, skip silently and proceed.
|
|
14
|
+
|
|
15
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
|
+
|
|
17
|
+
### Universal Rules:
|
|
18
|
+
|
|
19
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- 🎯 ALWAYS follow the exact instructions in the step file
|
|
21
|
+
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
22
|
+
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
23
|
+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
24
|
+
|
|
25
|
+
### Role Reinforcement:
|
|
26
|
+
|
|
27
|
+
- ✅ You are a skill compilation engine performing semantic pre-discovery
|
|
28
|
+
- ✅ CCC discovery is a hint layer — it guides extraction, it does not replace it
|
|
29
|
+
- ✅ Discovery failure is graceful degradation, not an error
|
|
30
|
+
|
|
31
|
+
### Step-Specific Rules:
|
|
32
|
+
|
|
33
|
+
- 🎯 Focus ONLY on running ccc semantic search and storing results
|
|
34
|
+
- 🚫 FORBIDDEN to extract exports — that is step-03
|
|
35
|
+
- 🚫 FORBIDDEN to modify brief data or source resolution
|
|
36
|
+
- 🚫 FORBIDDEN to block the workflow if ccc fails
|
|
37
|
+
- ⏱️ Quick and Forge tiers: skip this step entirely and silently
|
|
38
|
+
|
|
39
|
+
## EXECUTION PROTOCOLS:
|
|
40
|
+
|
|
41
|
+
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
42
|
+
- 💾 Discovery results stored in context as `{ccc_discovery}`
|
|
43
|
+
- 📖 Results are consumed by step-03 to pre-rank the file extraction queue
|
|
44
|
+
- 🚫 Never treat ccc results as verified extractions
|
|
45
|
+
|
|
46
|
+
## CONTEXT BOUNDARIES:
|
|
47
|
+
|
|
48
|
+
- Available: tier, tools.ccc, ccc_index from forge-tier.yaml (loaded in step-01)
|
|
49
|
+
- Available: brief_data (name, scope, description) from step-01
|
|
50
|
+
- Available: source_root (resolved source path) from step-01
|
|
51
|
+
- Focus: Semantic discovery only — no extraction, no compilation
|
|
52
|
+
- Dependencies: step-02 must have completed
|
|
53
|
+
|
|
54
|
+
## MANDATORY SEQUENCE
|
|
55
|
+
|
|
56
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
57
|
+
|
|
58
|
+
### 1. Check Tier Eligibility
|
|
59
|
+
|
|
60
|
+
**If tier is Quick or Forge:**
|
|
61
|
+
|
|
62
|
+
Set `{ccc_discovery: []}` in context. Auto-proceed silently. Display no message. Immediately load, read entire file, then execute `{nextStepFile}`.
|
|
63
|
+
|
|
64
|
+
**If tier is Forge+ or Deep:**
|
|
65
|
+
|
|
66
|
+
Check `tools.ccc` from forge-tier.yaml. If `tools.ccc` is false, set `{ccc_discovery: []}` in context and auto-proceed to section 5.
|
|
67
|
+
|
|
68
|
+
If `tools.ccc` is true, continue to section 2.
|
|
69
|
+
|
|
70
|
+
### 2. Check CCC Index State
|
|
71
|
+
|
|
72
|
+
Read `ccc_index` from forge-tier.yaml:
|
|
73
|
+
|
|
74
|
+
- If `ccc_index.status` is `"fresh"`: continue to section 3.
|
|
75
|
+
- If `ccc_index.status` is `"stale"`: display brief note — "CCC index is stale — discovery results may miss recent changes." Continue to section 3.
|
|
76
|
+
- If `ccc_index.status` is `"none"` or `"failed"`: attempt lazy indexing via `ccc_bridge.ensure_index(source_root)`. If indexing succeeds, continue to section 3. If indexing fails, set `{ccc_discovery: []}` and auto-proceed to section 5.
|
|
77
|
+
|
|
78
|
+
### 3. Construct Semantic Query
|
|
79
|
+
|
|
80
|
+
Build the discovery query from the brief data:
|
|
81
|
+
|
|
82
|
+
**Primary query:** `"{brief.name} {brief.scope}"`
|
|
83
|
+
|
|
84
|
+
Where:
|
|
85
|
+
- `brief.name` is the skill name from the brief
|
|
86
|
+
- `brief.scope` is the scope field (e.g., "Full library", "Public API", or specific module names)
|
|
87
|
+
|
|
88
|
+
**Query length cap:** Truncate to 80 characters if longer — ccc semantic search is sensitive to overly long queries. When truncating, keep the full skill name and trim `brief.scope` from the end. If `brief.scope` is very short (< 10 chars), append terms from `brief.description` to fill the remaining space.
|
|
89
|
+
|
|
90
|
+
### 4. Execute CCC Semantic Search
|
|
91
|
+
|
|
92
|
+
Run `ccc_bridge.search(query, source_root, top_k=20)`:
|
|
93
|
+
|
|
94
|
+
**If search succeeds:**
|
|
95
|
+
|
|
96
|
+
Store results as `{ccc_discovery: [{file, score, snippet}]}` in context.
|
|
97
|
+
|
|
98
|
+
Display brief discovery summary:
|
|
99
|
+
|
|
100
|
+
"**CCC semantic discovery: {N} relevant regions identified across {M} unique files.**"
|
|
101
|
+
|
|
102
|
+
Where:
|
|
103
|
+
- `{N}` is the total result count
|
|
104
|
+
- `{M}` is the count of unique file paths in results
|
|
105
|
+
|
|
106
|
+
**If search fails (any error):**
|
|
107
|
+
|
|
108
|
+
Set `{ccc_discovery: []}` in context.
|
|
109
|
+
|
|
110
|
+
Display: "CCC discovery unavailable — proceeding with standard extraction."
|
|
111
|
+
|
|
112
|
+
Do NOT halt. This is not an error.
|
|
113
|
+
|
|
114
|
+
**If search returns empty results:**
|
|
115
|
+
|
|
116
|
+
Set `{ccc_discovery: []}` in context.
|
|
117
|
+
|
|
118
|
+
No message needed — empty results are normal for small or highly focused libraries.
|
|
119
|
+
|
|
120
|
+
### 5. Auto-Proceed
|
|
121
|
+
|
|
122
|
+
Immediately load, read entire file, then execute `{nextStepFile}`.
|
|
123
|
+
|
|
124
|
+
#### EXECUTION RULES:
|
|
125
|
+
|
|
126
|
+
- This is an auto-proceed step with no user choices
|
|
127
|
+
- Quick/Forge tiers skip directly with no output
|
|
128
|
+
- Forge+/Deep with ccc displays brief discovery summary then auto-proceeds
|
|
129
|
+
- CCC failures do not halt — degrade and proceed
|
|
130
|
+
|
|
131
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
132
|
+
|
|
133
|
+
ONLY WHEN discovery is complete (Forge+/Deep with ccc) or the step is skipped (Quick/Forge or ccc unavailable) will you proceed to load `{nextStepFile}` for AST extraction.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
138
|
+
|
|
139
|
+
### ✅ SUCCESS:
|
|
140
|
+
|
|
141
|
+
- Quick/Forge tiers: skipped silently with no output, auto-proceeded
|
|
142
|
+
- Forge+/Deep with ccc: semantic query constructed from brief data
|
|
143
|
+
- Forge+/Deep with ccc: ccc_bridge.search executed, results stored as `{ccc_discovery}` in context
|
|
144
|
+
- Discovery summary displayed (count of regions and unique files)
|
|
145
|
+
- CCC failures handled gracefully (empty discovery, continue)
|
|
146
|
+
- Auto-proceeded to step-03
|
|
147
|
+
|
|
148
|
+
### ❌ SYSTEM FAILURE:
|
|
149
|
+
|
|
150
|
+
- Halting on CCC unavailability or search failures
|
|
151
|
+
- Extracting exports or signatures (that is step-03)
|
|
152
|
+
- Displaying skip messages for Quick/Forge tiers
|
|
153
|
+
- Treating CCC discovery results as verified extractions
|
|
154
|
+
- Not storing `{ccc_discovery}` in context (even if empty)
|
|
155
|
+
- Beginning compilation or SKILL.md assembly in this step
|
|
156
|
+
|
|
157
|
+
**Master Rule:** CCC discovery is a hint layer. It improves extraction coverage but never replaces structural verification. Failures degrade gracefully.
|
|
@@ -3,6 +3,7 @@ name: 'step-03-extract'
|
|
|
3
3
|
description: 'Tier-dependent source code extraction — AST or source reading for exports, signatures, and types'
|
|
4
4
|
nextStepFile: './step-03b-fetch-temporal.md'
|
|
5
5
|
extractionPatternsData: '../data/extraction-patterns.md'
|
|
6
|
+
extractionPatternsTracingData: '../data/extraction-patterns-tracing.md'
|
|
6
7
|
tierDegradationRulesData: '../data/tier-degradation-rules.md'
|
|
7
8
|
sourceResolutionData: '../data/source-resolution-protocols.md'
|
|
8
9
|
---
|
|
@@ -91,7 +92,16 @@ Load `{sourceResolutionData}` completely. Follow the **Remote Source Resolution*
|
|
|
91
92
|
5. Infer types from JSDoc, docstrings, type annotations
|
|
92
93
|
6. Confidence: All results T1-low — `[SRC:{file}:L{line}]`
|
|
93
94
|
|
|
94
|
-
**Forge/Deep Tier (AST available):**
|
|
95
|
+
**Forge/Forge+/Deep Tier (AST available):**
|
|
96
|
+
|
|
97
|
+
**CCC Discovery Integration (Forge+ and Deep with ccc only):**
|
|
98
|
+
|
|
99
|
+
If `{ccc_discovery}` is in context and non-empty (populated by step-02b):
|
|
100
|
+
- Sort the filtered file list by CCC relevance score: files appearing in `{ccc_discovery}` results move to the front of the extraction queue, sorted by their relevance score descending
|
|
101
|
+
- Files NOT in CCC results remain in the queue after ranked files — they are not excluded, only deprioritized
|
|
102
|
+
- Display: "**CCC discovery: {N} files pre-ranked by semantic relevance** — extraction will prioritize these first."
|
|
103
|
+
|
|
104
|
+
If `{ccc_discovery}` is empty or not in context: proceed with existing file ordering (no change to current behavior).
|
|
95
105
|
|
|
96
106
|
⚠️ **CRITICAL:** Before executing AST extraction, load the **AST Extraction Protocol** section from `{extractionPatternsData}`. Follow the decision tree based on the file count from step-01's file tree. This determines whether to use the MCP tool, scoped YAML rules, or CLI streaming. Never use `ast-grep --json` (without `=stream`) — it loads the entire result set into memory and will fail on large codebases.
|
|
97
107
|
|
|
@@ -118,7 +128,7 @@ Degrade to Quick tier extraction. Note the degradation reason in context for the
|
|
|
118
128
|
|
|
119
129
|
**Re-export tracing (Forge/Deep only):**
|
|
120
130
|
|
|
121
|
-
After the initial AST scan, check for public exports from the entry point (`__init__.py`, `index.ts`, `lib.rs`) that were NOT found by AST extraction. These are likely module-level re-exports. Follow the **Re-Export Tracing** protocol in `{
|
|
131
|
+
After the initial AST scan, check for public exports from the entry point (`__init__.py`, `index.ts`, `lib.rs`) that were NOT found by AST extraction. These are likely module-level re-exports. Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their actual definition files. This ensures module re-export patterns (common in Python libraries with clean public APIs) do not create gaps in the extraction inventory.
|
|
122
132
|
|
|
123
133
|
### 4b. Validate Exports Against Package Entry Point
|
|
124
134
|
|
|
@@ -135,6 +145,20 @@ Use the entry point as the authoritative source for `metadata.json`'s `exports[]
|
|
|
135
145
|
|
|
136
146
|
**If entry point is missing or unreadable:** Skip validation with a warning. Use the AST-extracted list as-is.
|
|
137
147
|
|
|
148
|
+
### 4c. Detect and Inventory Scripts/Assets
|
|
149
|
+
|
|
150
|
+
**If `scripts_intent: "none"` AND `assets_intent: "none"` in brief:** Skip this section.
|
|
151
|
+
|
|
152
|
+
After export extraction, scan the source for scripts and assets using the detection patterns in `{extractionPatternsTracingData}`:
|
|
153
|
+
|
|
154
|
+
1. Scan source tree for directories/files matching detection heuristics (scripts/, bin/, tools/, cli/ for scripts; assets/, templates/, schemas/, configs/, examples/ for assets)
|
|
155
|
+
2. For each candidate: verify file exists, check size (flag if >500 lines for user confirmation), exclude binary files
|
|
156
|
+
3. Compute SHA-256 content hash for each included file
|
|
157
|
+
4. Extract purpose from file header comments, shebang, README references, or schema `title`/`description` fields. If no purpose found, use filename.
|
|
158
|
+
5. Record: file_path, purpose, source_path, language (for scripts), type (for assets), content_hash, confidence (T1-low)
|
|
159
|
+
|
|
160
|
+
Add results to `scripts_inventory[]` and `assets_inventory[]` alongside the existing export inventory.
|
|
161
|
+
|
|
138
162
|
### 5. Build Extraction Inventory
|
|
139
163
|
|
|
140
164
|
Compile all extracted data into a structured inventory:
|
|
@@ -155,6 +179,10 @@ Compile all extracted data into a structured inventory:
|
|
|
155
179
|
- Confidence breakdown (T1 count, T1-low count)
|
|
156
180
|
- `top_exports[]` — sorted list of the top 10-20 public API function names by prominence (import frequency or documentation position). This named field is consumed by step-03b for targeted temporal fetching and cache fingerprinting.
|
|
157
181
|
|
|
182
|
+
**Script/asset counts (when detected):**
|
|
183
|
+
- `scripts_found`: count of scripts detected
|
|
184
|
+
- `assets_found`: count of assets detected
|
|
185
|
+
|
|
158
186
|
**Co-import patterns (Forge/Deep only):**
|
|
159
187
|
- Libraries commonly imported alongside extracted exports
|
|
160
188
|
- Integration point suggestions
|
|
@@ -170,6 +198,8 @@ Display the extraction findings for user confirmation:
|
|
|
170
198
|
**Confidence:** {t1_count} T1 (AST-verified), {t1_low_count} T1-low (source reading)
|
|
171
199
|
**Tier used:** {tier}
|
|
172
200
|
**Co-import patterns:** {pattern_count} detected
|
|
201
|
+
{if scripts_found > 0: **Scripts detected:** {scripts_found}}
|
|
202
|
+
{if assets_found > 0: **Assets detected:** {assets_found}}
|
|
173
203
|
|
|
174
204
|
**Top exports:**
|
|
175
205
|
{list top 10 exports with signatures}
|
|
@@ -27,7 +27,7 @@ To fetch temporal context (issues, PRs, changelogs, release notes) from the sour
|
|
|
27
27
|
|
|
28
28
|
### Step-Specific Rules:
|
|
29
29
|
|
|
30
|
-
- 🎯 Deep tier only — Quick and Forge tiers skip this step entirely and silently
|
|
30
|
+
- 🎯 Deep tier only — Quick, Forge, and Forge+ tiers skip this step entirely and silently
|
|
31
31
|
- 🎯 GitHub repositories only — other source types degrade gracefully
|
|
32
32
|
- 🚫 FORBIDDEN to halt the workflow if fetching or indexing fails
|
|
33
33
|
- 🚫 FORBIDDEN to modify extraction data from step-03 — this step only creates QMD collections
|
|
@@ -56,7 +56,7 @@ To fetch temporal context (issues, PRs, changelogs, release notes) from the sour
|
|
|
56
56
|
|
|
57
57
|
Evaluate the following conditions sequentially. **If ANY condition fails, skip silently to section 5 (auto-proceed) with no output:**
|
|
58
58
|
|
|
59
|
-
1. **Tier is Deep:** If tier is Quick or Forge
|
|
59
|
+
1. **Tier is Deep:** If tier is Quick, Forge, or Forge+, skip silently.
|
|
60
60
|
2. **Source is GitHub:** Verify `source_repo` is a GitHub URL (`https://github.com/...`) or `owner/repo` format. If the source is a local path, a non-GitHub URL, or any other format, skip silently.
|
|
61
61
|
3. **`gh` CLI is available:** Run `gh auth status` to verify the CLI is installed and authenticated. If it fails, skip silently.
|
|
62
62
|
|
|
@@ -200,7 +200,7 @@ After temporal context is fetched and indexed (or skipped for any reason), immed
|
|
|
200
200
|
#### EXECUTION RULES:
|
|
201
201
|
|
|
202
202
|
- This is an auto-proceed step with no user choices
|
|
203
|
-
- Quick/Forge tiers skip directly to next step with no output
|
|
203
|
+
- Quick/Forge/Forge+ tiers skip directly to next step with no output
|
|
204
204
|
- Non-GitHub sources skip directly to next step with no output
|
|
205
205
|
- Cached collections (< 7 days old) skip with brief cache-hit message
|
|
206
206
|
- Deep tier with fresh fetch displays brief confirmation then auto-proceeds
|
|
@@ -216,7 +216,7 @@ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to el
|
|
|
216
216
|
|
|
217
217
|
### ✅ SUCCESS:
|
|
218
218
|
|
|
219
|
-
- Non-eligible scenarios (Quick/Forge tier, non-GitHub source, no `gh` CLI) skipped silently
|
|
219
|
+
- Non-eligible scenarios (Quick/Forge/Forge+ tier, non-GitHub source, no `gh` CLI) skipped silently
|
|
220
220
|
- Cached collections (< 7 days old) detected and re-fetch skipped
|
|
221
221
|
- Temporal data fetched via `gh` CLI into staging directory (generic + targeted)
|
|
222
222
|
- Targeted searches performed for up to 10 top_exports function names
|
|
@@ -231,7 +231,7 @@ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to el
|
|
|
231
231
|
- Halting the workflow due to a `gh` CLI, QMD, or network failure
|
|
232
232
|
- Leaving staging files on disk after indexing (must clean up)
|
|
233
233
|
- Overwriting or modifying extraction data from step-03
|
|
234
|
-
- Displaying skip messages for Quick/Forge tiers (should be silent)
|
|
234
|
+
- Displaying skip messages for Quick/Forge/Forge+ tiers (should be silent)
|
|
235
235
|
- Attempting to fetch temporal data from non-GitHub sources
|
|
236
236
|
- Not registering the collection in forge-tier.yaml after successful indexing
|
|
237
237
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-04-enrich'
|
|
3
|
-
description: 'QMD knowledge enrichment for extracted functions — Deep tier only, skip for Quick/Forge'
|
|
3
|
+
description: 'QMD knowledge enrichment for extracted functions — Deep tier only, skip for Quick/Forge/Forge+'
|
|
4
4
|
nextStepFile: './step-05-compile.md'
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ nextStepFile: './step-05-compile.md'
|
|
|
8
8
|
|
|
9
9
|
## STEP GOAL:
|
|
10
10
|
|
|
11
|
-
To enrich the extraction inventory with temporal context from QMD knowledge searches — issues, PRs, changelogs, and migration notes that add T2-confidence annotations to extracted functions. Deep tier only; Quick and Forge tiers skip this step entirely.
|
|
11
|
+
To enrich the extraction inventory with temporal context from QMD knowledge searches — issues, PRs, changelogs, and migration notes that add T2-confidence annotations to extracted functions. Deep tier only; Quick, Forge, and Forge+ tiers skip this step entirely.
|
|
12
12
|
|
|
13
13
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
14
14
|
|
|
@@ -31,7 +31,7 @@ To enrich the extraction inventory with temporal context from QMD knowledge sear
|
|
|
31
31
|
- 🚫 FORBIDDEN to modify extraction results — enrichment is additive only
|
|
32
32
|
- 🚫 FORBIDDEN to begin compilation — that's step-05
|
|
33
33
|
- 💬 QMD failures degrade gracefully — continue without enrichment
|
|
34
|
-
- ⏱️ Quick and Forge tiers: skip this step entirely, auto-proceed
|
|
34
|
+
- ⏱️ Quick, Forge, and Forge+ tiers: skip this step entirely, auto-proceed
|
|
35
35
|
|
|
36
36
|
## EXECUTION PROTOCOLS:
|
|
37
37
|
|
|
@@ -53,7 +53,7 @@ To enrich the extraction inventory with temporal context from QMD knowledge sear
|
|
|
53
53
|
|
|
54
54
|
### 1. Check Tier Eligibility
|
|
55
55
|
|
|
56
|
-
**If tier is Quick or Forge
|
|
56
|
+
**If tier is Quick, Forge, or Forge+:**
|
|
57
57
|
|
|
58
58
|
Auto-proceed silently. Display no message. Immediately load, read entire file, then execute `{nextStepFile}`.
|
|
59
59
|
|
|
@@ -145,13 +145,13 @@ After enrichment is complete (or skipped for non-Deep tiers), immediately load,
|
|
|
145
145
|
#### EXECUTION RULES:
|
|
146
146
|
|
|
147
147
|
- This is an auto-proceed step with no user choices
|
|
148
|
-
- Quick/Forge tiers skip directly to next step with no output
|
|
148
|
+
- Quick/Forge/Forge+ tiers skip directly to next step with no output
|
|
149
149
|
- Deep tier displays brief enrichment summary then auto-proceeds
|
|
150
150
|
- QMD failures do not halt — degrade and proceed
|
|
151
151
|
|
|
152
152
|
## CRITICAL STEP COMPLETION NOTE
|
|
153
153
|
|
|
154
|
-
ONLY WHEN enrichment is complete (Deep tier) or the step is skipped (Quick/Forge) will you proceed to load `{nextStepFile}` for SKILL.md compilation.
|
|
154
|
+
ONLY WHEN enrichment is complete (Deep tier) or the step is skipped (Quick/Forge/Forge+) will you proceed to load `{nextStepFile}` for SKILL.md compilation.
|
|
155
155
|
|
|
156
156
|
---
|
|
157
157
|
|
|
@@ -159,7 +159,7 @@ ONLY WHEN enrichment is complete (Deep tier) or the step is skipped (Quick/Forge
|
|
|
159
159
|
|
|
160
160
|
### ✅ SUCCESS:
|
|
161
161
|
|
|
162
|
-
- Quick/Forge tiers: skipped silently with no output, auto-proceeded
|
|
162
|
+
- Quick/Forge/Forge+ tiers: skipped silently with no output, auto-proceeded
|
|
163
163
|
- Deep tier: collection inventory checked before searching
|
|
164
164
|
- Deep tier: no temporal collections → reported and auto-proceeded (not silently skipped)
|
|
165
165
|
- Deep tier: temporal collections exist → QMD searches performed per public API function (10-20, not all exports) with module context derived from extraction inventory source paths
|
|
@@ -172,7 +172,7 @@ ONLY WHEN enrichment is complete (Deep tier) or the step is skipped (Quick/Forge
|
|
|
172
172
|
|
|
173
173
|
- Halting on QMD unavailability or search failures
|
|
174
174
|
- Modifying T1 extraction results with QMD data
|
|
175
|
-
- Displaying skip messages for Quick/Forge tiers (should be silent)
|
|
175
|
+
- Displaying skip messages for Quick/Forge/Forge+ tiers (should be silent)
|
|
176
176
|
- Pre-emptively skipping all searches without checking the collection inventory
|
|
177
177
|
- Searching all 800+ exports instead of scoping to public API surface (10-20)
|
|
178
178
|
- Using bare function names without module context when source path is available in extraction inventory
|
|
@@ -61,7 +61,7 @@ Load `{skillSectionsData}` and `{assemblyRulesData}` completely. These define th
|
|
|
61
61
|
|
|
62
62
|
### 2. Build SKILL.md Content
|
|
63
63
|
|
|
64
|
-
Assemble each section in order using the assembly rules data file (`{assemblyRulesData}`). The data file specifies frontmatter format, Tier 1 section details (Sections 1-8), Tier 2 section details (Sections 9-11), and assembly ordering rules. Follow it exactly.
|
|
64
|
+
Assemble each section in order using the assembly rules data file (`{assemblyRulesData}`). The data file specifies frontmatter format, Tier 1 section details (Sections 1-8, including conditional Section 7b for scripts/assets), Tier 2 section details (Sections 9-11), and assembly ordering rules. Follow it exactly. Assemble Section 7b (Scripts & Assets) only if `scripts_inventory` or `assets_inventory` is non-empty.
|
|
65
65
|
|
|
66
66
|
### 3. Build context-snippet.md Content
|
|
67
67
|
|
|
@@ -97,7 +97,11 @@ Following the structure from the skill-sections data file:
|
|
|
97
97
|
- `exports_total`: `exports_public_api` + `exports_internal`
|
|
98
98
|
- `public_api_coverage`: `exports_documented / exports_public_api` (1.0 when all public API exports are documented; `null` if `exports_public_api` is 0)
|
|
99
99
|
- `total_coverage`: `exports_documented / exports_total` (may be low for large codebases — this is expected; `null` if `exports_total` is 0)
|
|
100
|
+
- Set `description` from the SKILL.md frontmatter `description` field (already assembled in section 2)
|
|
101
|
+
- Set `language` from source analysis (e.g., `"typescript"`, `"python"`) — use the primary language of the entry point file
|
|
102
|
+
- Set `ast_node_count` from extraction stats if ast-grep was used (Forge/Deep tier), otherwise omit
|
|
100
103
|
- Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the SKF module's `package.json` `version` field (run `node -p "require('./node_modules/bmad-module-skill-forge/package.json').version"` or read the installed module's `package.json`). If unresolvable, fall back to `git describe --tags --abbrev=0` in the SKF module root. Never hardcode the version.
|
|
104
|
+
- If `scripts_inventory` is non-empty, populate `scripts[]` array and set `stats.scripts_count`. If `assets_inventory` is non-empty, populate `assets[]` array and set `stats.assets_count`. Omit these fields entirely when inventories are empty.
|
|
101
105
|
|
|
102
106
|
### 5. Build references/ Content
|
|
103
107
|
|
|
@@ -111,7 +115,7 @@ Group functions logically by module, file, or functional area.
|
|
|
111
115
|
|
|
112
116
|
### 6. Build provenance-map.json Content
|
|
113
117
|
|
|
114
|
-
One entry per extracted export: export_name, export_type, params[] (typed strings), return_type, source_file, source_line, confidence tier (T1/T1-low/T2), extraction_method, ast_node_type. See `{skillSectionsData}` for full schema.
|
|
118
|
+
One entry per extracted export: export_name, export_type, params[] (typed strings), return_type, source_file, source_line, confidence tier (T1/T1-low/T2), extraction_method, ast_node_type. If `scripts_inventory` or `assets_inventory` is non-empty, add `file_entries[]` with file_name, file_type, source_file, content_hash, confidence, extraction_method. See `{skillSectionsData}` for full schema.
|
|
115
119
|
|
|
116
120
|
### 7. Build evidence-report.md Content
|
|
117
121
|
|
|
@@ -101,10 +101,16 @@ If fails: auto-fix (deterministic), re-validate once, record result. If passes:
|
|
|
101
101
|
|
|
102
102
|
**If step 2 reported `body.max_lines` failure:**
|
|
103
103
|
|
|
104
|
+
**Preferred approach — selective split:** Rather than a full `split-body`, identify which Tier 2 section(s) are largest (usually `## Full API Reference`) and manually extract only those to `references/`. Keep all Tier 1 content and smaller Tier 2 sections inline. This preserves agent accuracy — inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval (per Vercel research). The rationale: inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval (per Vercel research).
|
|
105
|
+
|
|
106
|
+
**If manual selective split is not feasible**, fall back to the automated full split:
|
|
107
|
+
|
|
104
108
|
```bash
|
|
105
109
|
npx skill-check split-body <staging-skill-dir> --write
|
|
106
110
|
```
|
|
107
111
|
|
|
112
|
+
After any split (selective or full), verify that context snippet section anchors (`#quick-start`, `#key-types`) still resolve to headings in SKILL.md.
|
|
113
|
+
|
|
108
114
|
Then re-validate: `npx skill-check check <staging-skill-dir> --format json --no-security-scan`
|
|
109
115
|
|
|
110
116
|
**If skill-check unavailable or no body size issue:** Skip.
|
|
@@ -123,15 +129,7 @@ Record any security warnings in evidence-report. Security findings are advisory
|
|
|
123
129
|
|
|
124
130
|
**If security scan fails due to missing SNYK_TOKEN:**
|
|
125
131
|
|
|
126
|
-
Display
|
|
127
|
-
|
|
128
|
-
"Security scan requires a Snyk API token. **Important:** The Snyk API requires an Enterprise plan ([authentication docs](https://docs.snyk.io/snyk-api/authentication-for-api)). To enable:
|
|
129
|
-
1. Obtain a Snyk Enterprise account with API access
|
|
130
|
-
2. Get your API token from Account Settings → API Token
|
|
131
|
-
3. Set `SNYK_TOKEN=your-token` in your environment or `.env`
|
|
132
|
-
4. Re-run [SF] Setup Forge to update tool detection, then re-run [CS] Create Skill
|
|
133
|
-
|
|
134
|
-
If you don't have an Enterprise account, use `--no-security-scan` flag in skill-check to skip, or `--security-scan-runner pipx|uvx|local` to control the execution method. Security scanning is optional and does not affect tier level or block skill compilation."
|
|
132
|
+
Display: "Security scan requires a Snyk Enterprise API token ([docs](https://docs.snyk.io/snyk-api/authentication-for-api)). Set `SNYK_TOKEN=your-token` in environment or `.env`, then re-run [SF] Setup Forge. Without Enterprise, use `--no-security-scan` to skip. Security scanning is optional and does not block skill compilation."
|
|
135
133
|
|
|
136
134
|
Record: "Security scan skipped — SNYK_TOKEN not configured"
|
|
137
135
|
|
|
@@ -185,6 +183,7 @@ Cross-check metadata.json against extraction inventory:
|
|
|
185
183
|
- `stats.public_api_coverage` and `stats.total_coverage` are correctly computed (null when denominator is 0)
|
|
186
184
|
- `confidence_t1`, `confidence_t2`, `confidence_t3` match actual counts
|
|
187
185
|
- `spec_version` is "1.3"
|
|
186
|
+
- If `scripts[]` or `assets[]` arrays present: verify `stats.scripts_count`/`stats.assets_count` match array lengths; verify `file_entries` count in provenance-map.json matches
|
|
188
187
|
|
|
189
188
|
Auto-fix any discrepancies (these are computed values).
|
|
190
189
|
|
|
@@ -62,6 +62,9 @@ skills/{name}/references/
|
|
|
62
62
|
forge-data/{name}/
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
If `scripts_inventory` is non-empty, also create: `skills/{name}/scripts/`
|
|
66
|
+
If `assets_inventory` is non-empty, also create: `skills/{name}/assets/`
|
|
67
|
+
|
|
65
68
|
Where `{name}` is the skill name from the brief (kebab-case).
|
|
66
69
|
|
|
67
70
|
If directories already exist, do not error — proceed with file writing (overwrites existing files).
|
|
@@ -85,6 +88,14 @@ Write these 4 files from the compiled content:
|
|
|
85
88
|
- One file per function group or type
|
|
86
89
|
- Progressive disclosure detail files
|
|
87
90
|
|
|
91
|
+
**Files 4b (conditional):** `skills/{name}/scripts/*`
|
|
92
|
+
- One file per detected script, copied from source with content preserved
|
|
93
|
+
- Only created when `scripts_inventory` is non-empty
|
|
94
|
+
|
|
95
|
+
**Files 4c (conditional):** `skills/{name}/assets/*`
|
|
96
|
+
- One file per detected asset, copied from source with content preserved
|
|
97
|
+
- Only created when `assets_inventory` is non-empty
|
|
98
|
+
|
|
88
99
|
### 3. Write Workspace Artifacts to forge-data/{name}/
|
|
89
100
|
|
|
90
101
|
Write these 3 files from the compiled content:
|
|
@@ -101,7 +112,7 @@ Write these 3 files from the compiled content:
|
|
|
101
112
|
### 4. Verify Write Completion
|
|
102
113
|
|
|
103
114
|
After all files are written, verify:
|
|
104
|
-
- All 7 files exist at their expected paths
|
|
115
|
+
- All 7 base files exist at their expected paths, plus scripts/ and assets/ files when inventories are non-empty
|
|
105
116
|
- List each file with its path and size
|
|
106
117
|
|
|
107
118
|
**If any write failed:**
|
|
@@ -116,6 +127,8 @@ Display brief confirmation:
|
|
|
116
127
|
- SKILL.md
|
|
117
128
|
- context-snippet.md
|
|
118
129
|
- metadata.json
|
|
130
|
+
{if scripts: - scripts/ ({scripts_count} files)}
|
|
131
|
+
{if assets: - assets/ ({assets_count} files)}
|
|
119
132
|
- references/ ({reference_count} files)
|
|
120
133
|
|
|
121
134
|
**Workspace (forge-data/{name}/):**
|
|
@@ -170,6 +183,38 @@ Write the updated forge-tier.yaml.
|
|
|
170
183
|
|
|
171
184
|
**IF forge tier is NOT Deep:** Skip this section silently. No messaging.
|
|
172
185
|
|
|
186
|
+
### 5b. CCC Index Registry Registration (Forge+ and Deep with ccc)
|
|
187
|
+
|
|
188
|
+
**IF `tools.ccc` is true in forge-tier.yaml (Forge+ or Deep with ccc available):**
|
|
189
|
+
|
|
190
|
+
Ensure the source path used for extraction is indexed by ccc and registered in the `ccc_index_registry` array.
|
|
191
|
+
|
|
192
|
+
**Index verification:**
|
|
193
|
+
|
|
194
|
+
Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.ensure_index` is a conceptual interface, not a callable function. This is a no-op if the source was already indexed during setup-forge or step-02b.
|
|
195
|
+
|
|
196
|
+
**Registry update:**
|
|
197
|
+
|
|
198
|
+
Read `{forgeTierConfig}` and update the `ccc_index_registry` array.
|
|
199
|
+
|
|
200
|
+
Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combined with `skill_name` — NOT by local `path`, which may be an ephemeral clone path that changes on every run for remote repos. If an entry with matching `source_repo` + `skill_name` already exists, replace it. Otherwise, append:
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
- source_repo: "{brief.source_repo}"
|
|
204
|
+
path: "{source_root}"
|
|
205
|
+
skill_name: "{name}"
|
|
206
|
+
indexed_at: "{current ISO date}"
|
|
207
|
+
source_workflow: "create-skill"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Write the updated forge-tier.yaml.
|
|
211
|
+
|
|
212
|
+
**Error handling:**
|
|
213
|
+
- If ccc indexing fails: log the error, continue. Do NOT fail the workflow.
|
|
214
|
+
- If forge-tier.yaml update fails: log the error, continue.
|
|
215
|
+
|
|
216
|
+
**IF `tools.ccc` is false:** Skip this section silently. No messaging.
|
|
217
|
+
|
|
173
218
|
### 6. Menu Handling Logic
|
|
174
219
|
|
|
175
220
|
**Auto-proceed step — no user interaction.**
|
|
@@ -74,6 +74,7 @@ Where `{primary_confidence}` is the predominant confidence tier (T1 if Forge/Dee
|
|
|
74
74
|
| T1 (AST) | {t1_count} | Structurally verified via ast-grep |
|
|
75
75
|
| T1-low (Source) | {t1_low_count} | Inferred from source reading |
|
|
76
76
|
| T2 (QMD) | {t2_count} | Enriched with temporal context |
|
|
77
|
+
| T3 (External) | {t3_count} | Sourced from external documentation URLs |
|
|
77
78
|
|
|
78
79
|
**Output Files:**
|
|
79
80
|
- `skills/{name}/SKILL.md` — Active skill with trigger-based usage
|
|
@@ -146,7 +146,7 @@ Linear pipeline with tool-delegated heavy lifting. No high-priority subprocess o
|
|
|
146
146
|
|
|
147
147
|
- Data flows logically: brief → ecosystem → extraction → enrichment → compilation → validation → generation → report
|
|
148
148
|
- No contradictions between steps
|
|
149
|
-
- Tier-dependent behavior consistent across all 8 steps (Quick/Forge/Deep)
|
|
149
|
+
- Tier-dependent behavior consistent across all 8 steps (Quick/Forge/Forge+/Deep)
|
|
150
150
|
- Error handling consistent: graceful degradation everywhere except file write failures (which correctly halt)
|
|
151
151
|
- Provenance citation format consistent (`[AST:{file}:L{line}]`, `[SRC:{file}:L{line}]`, `[QMD:{collection}:{doc}]`)
|
|
152
152
|
- Overall narrative is a clear compilation pipeline
|
|
@@ -138,7 +138,7 @@ Compile a skill from a brief — the core compilation engine. Takes a skill-brie
|
|
|
138
138
|
- Pattern: Linear with conditional branches within steps (tier-dependent)
|
|
139
139
|
- Phases: Load → Check → Extract → Enrich → Compile → Validate → Generate → Report
|
|
140
140
|
- Estimated steps: 8
|
|
141
|
-
- Conditional logic: Steps 03/04 branch internally by forge tier (Quick/Forge/Deep)
|
|
141
|
+
- Conditional logic: Steps 03/04 branch internally by forge tier (Quick/Forge/Forge+/Deep)
|
|
142
142
|
- No branching steps — conditions stay within each step
|
|
143
143
|
|
|
144
144
|
**User Interaction:**
|
|
@@ -225,6 +225,7 @@ create-skill/
|
|
|
225
225
|
└── steps-c/
|
|
226
226
|
├── step-01-load-brief.md (~150 lines, Init with Input Discovery)
|
|
227
227
|
├── step-02-ecosystem-check.md (~120 lines, conditional gate)
|
|
228
|
+
├── step-02b-ccc-discover.md (~160 lines, conditional auto-proceed)
|
|
228
229
|
├── step-03-extract.md (~200 lines, complex middle)
|
|
229
230
|
├── step-03b-fetch-temporal.md (~240 lines, conditional auto-proceed)
|
|
230
231
|
├── step-03c-fetch-docs.md (~215 lines, conditional auto-proceed)
|
|
@@ -241,6 +242,7 @@ create-skill/
|
|
|
241
242
|
|------|------|------|-------------|------|
|
|
242
243
|
| 01 | load-brief | Init (Input Discovery) | Auto-proceed (P3) | Load brief, resolve source, load forge tier |
|
|
243
244
|
| 02 | ecosystem-check | Middle (Simple) | Conditional: auto if no match, user choice if match | Check ecosystem |
|
|
245
|
+
| 02b | ccc-discover | Middle (Simple) | Auto-proceed (P3) — Forge+/Deep only | CCC semantic discovery to pre-rank files for extraction |
|
|
244
246
|
| 03 | extract | Middle (Standard) | C only (P2) — Gate 2 | Tier-dependent extraction |
|
|
245
247
|
| 03b | fetch-temporal | Middle (Simple) | Auto-proceed (P3) — Deep only | Fetch temporal context (issues, PRs, changelogs) and index into QMD |
|
|
246
248
|
| 03c | fetch-docs | Middle (Simple) | Auto-proceed (P3) — when doc_urls present | Fetch remote documentation from brief-specified URLs for T3-confidence content |
|
|
@@ -257,7 +259,7 @@ create-skill/
|
|
|
257
259
|
- If --batch: discover all briefs in specified directory
|
|
258
260
|
- Load and validate brief structure (required fields: name, version, source_repo, language, scope)
|
|
259
261
|
- Resolve source code location (local path or GitHub owner/repo)
|
|
260
|
-
- Load forge-tier.yaml from sidecar — determine tier (Quick/Forge/Deep)
|
|
262
|
+
- Load forge-tier.yaml from sidecar — determine tier (Quick/Forge/Forge+/Deep)
|
|
261
263
|
- If forge-tier.yaml missing: halt with "Run [SF] Setup Forge first"
|
|
262
264
|
- Auto-proceed to step-02
|
|
263
265
|
|
|
@@ -18,7 +18,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/create-skill'
|
|
|
18
18
|
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
|
|
19
19
|
- **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
|
|
20
20
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
21
|
-
- **Tier-Aware Execution**: Steps adapt behavior based on forge tier (Quick/Forge/Deep) loaded from sidecar at init
|
|
21
|
+
- **Tier-Aware Execution**: Steps adapt behavior based on forge tier (Quick/Forge/Forge+/Deep) loaded from sidecar at init
|
|
22
22
|
- **Zero Hallucination**: Every claim requires a provenance citation — uncitable content is excluded, not guessed
|
|
23
23
|
|
|
24
24
|
### Step Processing Rules
|
|
@@ -69,7 +69,7 @@ Indexed format targeting ~80-120 tokens per stack:
|
|
|
69
69
|
"name": "{project}-stack",
|
|
70
70
|
"version": "1.0.0",
|
|
71
71
|
"generation_date": "{ISO-8601}",
|
|
72
|
-
"confidence_tier": "{Quick|Forge|Deep}",
|
|
72
|
+
"confidence_tier": "{Quick|Forge|Forge+|Deep}",
|
|
73
73
|
"source_authority": "{official|community|internal}",
|
|
74
74
|
"exports": [],
|
|
75
75
|
"library_count": 0,
|
|
@@ -67,11 +67,11 @@ STOP — do not proceed.
|
|
|
67
67
|
**If forge-tier.yaml exists:**
|
|
68
68
|
|
|
69
69
|
Extract:
|
|
70
|
-
- `forge_tier` — Quick, Forge, or Deep
|
|
70
|
+
- `forge_tier` — Quick, Forge, Forge+, or Deep
|
|
71
71
|
- `available_tools` — list of detected tools (gh_bridge, ast_bridge, qmd_bridge, skill-check)
|
|
72
72
|
- `project_root` — project root path
|
|
73
73
|
|
|
74
|
-
**Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
|
|
74
|
+
**Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
|
|
75
75
|
|
|
76
76
|
### 2. Validate Available Tools
|
|
77
77
|
|
|
@@ -109,6 +109,7 @@ If no optional inputs provided, auto-detection will be used.
|
|
|
109
109
|
**Forge Tier:** {tier_description}
|
|
110
110
|
- Quick: Source reading and import counting
|
|
111
111
|
- Forge: + AST-backed structural analysis
|
|
112
|
+
- Forge+: + CCC semantic co-import augmentation
|
|
112
113
|
- Deep: + Temporal integration evolution
|
|
113
114
|
|
|
114
115
|
**Available Tools:** {tool_list}
|