bmad-module-skill-forge 0.6.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.
- package/README.md +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +85 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +1 -1
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +10 -7
- package/src/knowledge/progressive-capability.md +3 -2
- package/src/knowledge/qmd-registry.md +4 -1
- package/src/knowledge/skf-knowledge-index.csv +1 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- 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 +1 -1
- 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 +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +5 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +13 -9
- package/src/workflows/create-skill/steps-c/step-03-extract.md +15 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +1 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +23 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +30 -2
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- package/src/workflows/export-skill/data/managed-section-format.md +8 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +18 -6
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +5 -2
- package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
## Required Fields
|
|
4
4
|
|
|
5
|
-
| Field | Type |
|
|
6
|
-
|
|
7
|
-
| name | string |
|
|
8
|
-
| version | string | Semantic
|
|
9
|
-
| source_repo | string | GitHub URL or local path |
|
|
10
|
-
| language | string |
|
|
11
|
-
| scope | object |
|
|
12
|
-
| description | string | What
|
|
13
|
-
| forge_tier | string |
|
|
14
|
-
| created | string |
|
|
15
|
-
| created_by | string |
|
|
5
|
+
| Field | Type | Constraint | Description |
|
|
6
|
+
|-------|------|------------|-------------|
|
|
7
|
+
| name | string | kebab-case `[a-z0-9-]+` | Unique skill identifier |
|
|
8
|
+
| version | string | Semantic `X.Y.Z` | Auto-detect from source (see Version Detection below), fall back to `1.0.0` |
|
|
9
|
+
| source_repo | string | GitHub URL or local path | Repository or project root (optional when `source_type: "docs-only"`) |
|
|
10
|
+
| language | string | Recognized language | Primary programming language |
|
|
11
|
+
| scope | object | See Scope Object below | Boundary definition |
|
|
12
|
+
| description | string | 1-3 sentences | What the skill covers |
|
|
13
|
+
| forge_tier | string | `Quick` / `Forge` / `Forge+` / `Deep` | Inherited from forge-tier.yaml (Title Case) |
|
|
14
|
+
| created | string | ISO date `YYYY-MM-DD` | Generation date |
|
|
15
|
+
| created_by | string | user_name from config | Who generated the brief |
|
|
16
16
|
|
|
17
17
|
## Optional Fields
|
|
18
18
|
|
|
19
|
-
| Field | Type |
|
|
20
|
-
|
|
21
|
-
| source_type | string |
|
|
22
|
-
| doc_urls | array | Documentation URLs for T3 content
|
|
23
|
-
| `scripts_intent` | string | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
|
|
24
|
-
| `assets_intent` | string | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
|
|
19
|
+
| Field | Type | Constraint | Description |
|
|
20
|
+
|-------|------|------------|-------------|
|
|
21
|
+
| source_type | string | `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
|
|
22
|
+
| doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
|
|
23
|
+
| `scripts_intent` | string | `detect` / `none` / free-text | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
|
|
24
|
+
| `assets_intent` | string | `detect` / `none` / free-text | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
|
|
25
|
+
| `source_authority` | string | `official` / `community` / `internal` | Default `community`. Set to `official` only when the skill creator is the library maintainer. Forced to `community` when `source_type: "docs-only"`. |
|
|
25
26
|
|
|
26
27
|
When `source_type: "docs-only"`:
|
|
27
28
|
- `source_repo` becomes optional (set to doc site URL for reference)
|
|
@@ -48,7 +49,7 @@ The create-skill workflow (step-03-extract) also performs version reconciliation
|
|
|
48
49
|
|
|
49
50
|
```yaml
|
|
50
51
|
scope:
|
|
51
|
-
type: full-library | specific-modules | public-api
|
|
52
|
+
type: full-library | specific-modules | public-api | docs-only
|
|
52
53
|
include:
|
|
53
54
|
- "src/**/*.ts" # Glob patterns for included files/directories
|
|
54
55
|
exclude:
|
|
@@ -67,7 +68,7 @@ source_type: "source" # "source" (default) or "docs-only"
|
|
|
67
68
|
source_repo: "{github-url-or-local-path}"
|
|
68
69
|
language: "{detected-language}"
|
|
69
70
|
description: "{brief-description}"
|
|
70
|
-
forge_tier: "{
|
|
71
|
+
forge_tier: "{Quick|Forge|Forge+|Deep}"
|
|
71
72
|
created: "{date}"
|
|
72
73
|
created_by: "{user_name}"
|
|
73
74
|
scope:
|
|
@@ -83,12 +84,13 @@ scope:
|
|
|
83
84
|
# label: "API Reference"
|
|
84
85
|
# scripts_intent: detect # Optional: detect | none | description
|
|
85
86
|
# assets_intent: detect # Optional: detect | none | description
|
|
87
|
+
# source_authority: community # Optional: official | community | internal
|
|
86
88
|
---
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
## Human-Readable Presentation Format
|
|
90
92
|
|
|
91
|
-
When presenting the brief for confirmation (step 04), display as:
|
|
93
|
+
When presenting the brief for confirmation (brief-skill step 04 only — not applicable to analyze-source batch generation), display as:
|
|
92
94
|
|
|
93
95
|
```
|
|
94
96
|
Skill Brief: {name}
|
|
@@ -114,8 +116,8 @@ Created by: {created_by}
|
|
|
114
116
|
1. `name` must be unique within {forge_data_folder}
|
|
115
117
|
2. `source_repo` must be accessible (gh api for GitHub, path exists for local)
|
|
116
118
|
3. `language` must be a recognized programming language
|
|
117
|
-
4. `scope.type` must be one of the
|
|
118
|
-
5. `scope.include` must have at least one pattern
|
|
119
|
-
6. `forge_tier` must be one of:
|
|
119
|
+
4. `scope.type` must be one of the four defined types
|
|
120
|
+
5. `scope.include` must have at least one pattern (exception: `docs-only` scope, where include patterns are optional since no source code is available)
|
|
121
|
+
6. `forge_tier` must be one of: Quick, Forge, Forge+, Deep (Title Case, must match the tier from forge-tier.yaml, or default to Quick)
|
|
120
122
|
7. When `source_type: "docs-only"`: `doc_urls` must have >= 1 entry, `source_repo` becomes optional
|
|
121
123
|
8. Each `doc_urls` entry must have a valid `url` field
|
|
@@ -68,7 +68,7 @@ Attempt to load `{forgeTierFile}`:
|
|
|
68
68
|
|
|
69
69
|
**If not found:**
|
|
70
70
|
- Display: "**Note:** No forge tier configuration found. Defaulting to Quick tier. Run **setup-forge** first for full capabilities."
|
|
71
|
-
- Default to: `forge_tier:
|
|
71
|
+
- Default to: `forge_tier: Quick`
|
|
72
72
|
|
|
73
73
|
### 2. Welcome and Explain
|
|
74
74
|
|
|
@@ -91,6 +91,9 @@ scope:
|
|
|
91
91
|
# doc_urls:
|
|
92
92
|
# - url: "{documentation URL}"
|
|
93
93
|
# label: "{page label}"
|
|
94
|
+
# scripts_intent: detect # Optional: detect | none | description of expected scripts
|
|
95
|
+
# assets_intent: detect # Optional: detect | none | description of expected assets
|
|
96
|
+
# source_authority: community # Optional: official | community | internal
|
|
94
97
|
---
|
|
95
98
|
```
|
|
96
99
|
|
|
@@ -132,6 +132,12 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
|
|
|
132
132
|
"qmd": "{version-or-null}",
|
|
133
133
|
"skf": "{skf_version}"
|
|
134
134
|
},
|
|
135
|
+
"confidence_distribution": {
|
|
136
|
+
"t1": 0,
|
|
137
|
+
"t1_low": 0,
|
|
138
|
+
"t2": 0,
|
|
139
|
+
"t3": 0
|
|
140
|
+
},
|
|
135
141
|
"stats": {
|
|
136
142
|
"exports_documented": 0,
|
|
137
143
|
"exports_public_api": 0,
|
|
@@ -139,18 +145,13 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
|
|
|
139
145
|
"exports_total": 0,
|
|
140
146
|
"public_api_coverage": 0.0,
|
|
141
147
|
"total_coverage": 0.0,
|
|
142
|
-
"confidence_t1": 0,
|
|
143
|
-
"confidence_t2": 0,
|
|
144
|
-
"confidence_t3": 0,
|
|
145
148
|
"scripts_count": 0,
|
|
146
149
|
"assets_count": 0
|
|
147
150
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
],
|
|
151
|
-
"
|
|
152
|
-
{ "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }
|
|
153
|
-
],
|
|
151
|
+
// scripts[] and assets[] — include ONLY when inventories are non-empty; omit entirely otherwise
|
|
152
|
+
// "scripts": [{ "file": "scripts/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
|
|
153
|
+
// "assets": [{ "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
|
|
154
|
+
"generated_by": "{quick-skill|create-skill}",
|
|
154
155
|
"dependencies": [],
|
|
155
156
|
"compatibility": "{semver-range}"
|
|
156
157
|
}
|
|
@@ -197,7 +198,7 @@ Each reference file includes:
|
|
|
197
198
|
"source_file": "src/auth/index.ts",
|
|
198
199
|
"source_line": 42,
|
|
199
200
|
"confidence": "T1",
|
|
200
|
-
"extraction_method": "
|
|
201
|
+
"extraction_method": "ast-grep",
|
|
201
202
|
"ast_node_type": "export_function_declaration"
|
|
202
203
|
}
|
|
203
204
|
],
|
|
@@ -235,7 +236,7 @@ Each reference file includes:
|
|
|
235
236
|
## Extraction Summary
|
|
236
237
|
- Files scanned: {count}
|
|
237
238
|
- Exports found: {count}
|
|
238
|
-
- Confidence: T1={n}, T2={n}, T3={n}
|
|
239
|
+
- Confidence: T1={n}, T1-low={n}, T2={n}, T3={n}
|
|
239
240
|
|
|
240
241
|
## Validation Results
|
|
241
242
|
- Schema: {pass/fail}
|
|
@@ -112,7 +112,7 @@ If `source_repo` is a remote URL (GitHub URL or owner/repo format) AND tier is F
|
|
|
112
112
|
|
|
113
113
|
Proceed with Quick tier extraction strategy below. Note the degradation reason in context for the evidence report.
|
|
114
114
|
|
|
115
|
-
**Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing.
|
|
115
|
+
**Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing. **If any error halts the extraction step before Gate 2 is reached**, cleanup must still occur: attempt to delete `{temp_path}` before halting. Log the cleanup attempt regardless of success.
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: 'step-01-load-brief'
|
|
3
3
|
description: 'Load skill-brief.yaml, validate structure, resolve source code location, load forge tier'
|
|
4
4
|
nextStepFile: './step-02-ecosystem-check.md'
|
|
5
|
-
forgeTierFile: '{
|
|
6
|
-
preferencesFile: '{
|
|
5
|
+
forgeTierFile: '{sidecar_path}/forge-tier.yaml'
|
|
6
|
+
preferencesFile: '{sidecar_path}/preferences.yaml'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Step 1: Load Brief
|
|
@@ -70,14 +70,14 @@ Extract and report:
|
|
|
70
70
|
### 2. Discover Skill Brief
|
|
71
71
|
|
|
72
72
|
**If user provided a specific brief path or skill name:**
|
|
73
|
-
-
|
|
73
|
+
- If the value looks like a file path (starts with `/`, `./`, `~`, or contains path separators): treat it as a direct file path and load it
|
|
74
|
+
- Otherwise, treat it as a skill name and search `{forge_data_folder}/{skill-name}/skill-brief.yaml`
|
|
74
75
|
- If found, load it completely
|
|
75
76
|
|
|
76
77
|
**If user invoked with --batch flag:**
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- For this run, load the FIRST brief (batch loops back for remaining)
|
|
78
|
+
- Check `{sidecar_path}/batch-state.yaml` for an active batch checkpoint:
|
|
79
|
+
- If `batch_active: true` and `current_index` is valid: load the brief at `brief_list[current_index]` (resuming a batch loop from step-08)
|
|
80
|
+
- If no checkpoint exists or `batch_active` is false: search specified directory for all `skill-brief.yaml` files, list discovered briefs with skill names, store list for batch loop processing, and load the FIRST brief
|
|
81
81
|
|
|
82
82
|
**If no brief found:**
|
|
83
83
|
Halt with: "No skill brief found. Run [BS] Brief Skill to create one, or use [QS] Quick Skill for brief-less generation."
|
|
@@ -101,6 +101,8 @@ Check that the loaded skill-brief.yaml contains required fields:
|
|
|
101
101
|
- `include_patterns` — file glob patterns to include
|
|
102
102
|
- `exclude_patterns` — file glob patterns to exclude
|
|
103
103
|
- `description` — human description of the skill
|
|
104
|
+
- `scripts_intent` — `"none"` to skip scripts detection, omit for default auto-detection
|
|
105
|
+
- `assets_intent` — `"none"` to skip assets detection, omit for default auto-detection
|
|
104
106
|
|
|
105
107
|
**Docs-only validation:** When `source_type: "docs-only"`, `source_repo` is not required but `doc_urls` must have at least one entry. `source_authority` is forced to `community`.
|
|
106
108
|
|
|
@@ -109,6 +111,8 @@ Halt with specific error: "Brief validation failed: missing required field `{fie
|
|
|
109
111
|
|
|
110
112
|
### 4. Resolve Source Code Location
|
|
111
113
|
|
|
114
|
+
**If `source_type: "docs-only"`:** Skip source resolution. Set `source_location: null` in context. Proceed directly to section 5 (Report Initialization) — docs-only skills have no source to resolve.
|
|
115
|
+
|
|
112
116
|
**If source_repo is a GitHub URL or owner/repo format:**
|
|
113
117
|
- Verify repository exists via `gh_bridge.list_tree(owner, repo, branch)`
|
|
114
118
|
- If branch not specified, detect default branch
|
|
@@ -140,7 +144,7 @@ Where tier_description follows positive capability framing:
|
|
|
140
144
|
- Quick: "Source reading and spec validation"
|
|
141
145
|
- Forge: "AST-backed structural extraction"
|
|
142
146
|
- Forge+: "Semantic-guided precision — ccc pre-ranks files before AST extraction"
|
|
143
|
-
- Deep: "Full intelligence — structural + contextual +
|
|
147
|
+
- Deep: "Full intelligence — structural + contextual + QMD knowledge synthesis"
|
|
144
148
|
|
|
145
149
|
### 6. Menu Handling Logic
|
|
146
150
|
|
|
@@ -166,7 +170,7 @@ ONLY WHEN forge-tier.yaml is loaded, skill-brief.yaml is validated, and source c
|
|
|
166
170
|
|
|
167
171
|
- Forge tier loaded from sidecar with tool availability
|
|
168
172
|
- Skill brief loaded and all required fields validated
|
|
169
|
-
- Source code location resolved and accessible
|
|
173
|
+
- Source code location resolved and accessible (or `source_location: null` confirmed for docs-only skills)
|
|
170
174
|
- Initialization summary displayed with tier and capabilities
|
|
171
175
|
- Auto-proceeded to step-02
|
|
172
176
|
|
|
@@ -46,7 +46,7 @@ To extract all public exports, function signatures, type definitions, and co-imp
|
|
|
46
46
|
|
|
47
47
|
## CONTEXT BOUNDARIES:
|
|
48
48
|
|
|
49
|
-
- Available: brief_data, tier, source_location, file_tree from step-01;
|
|
49
|
+
- Available: brief_data, tier, source_location, file_tree from step-01; ecosystem check outcome from step-02 (proceed/halt decision — no named variable stored)
|
|
50
50
|
- Focus: Source code extraction and inventory building
|
|
51
51
|
- Limits: Do NOT compile, assemble, or write any output
|
|
52
52
|
- Dependencies: Source code must be accessible (resolved in step-01)
|
|
@@ -75,7 +75,7 @@ Build the filtered file list from the source tree resolved in step-01. Record th
|
|
|
75
75
|
|
|
76
76
|
"**Docs-only mode:** No source code to extract. Documentation content will be fetched from `doc_urls` in step-03c."
|
|
77
77
|
|
|
78
|
-
Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section
|
|
78
|
+
Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section 6) — display the empty inventory and note that T3 content will be produced by the doc-fetcher step.
|
|
79
79
|
|
|
80
80
|
**If `source_type: "source"` (default):** Continue with extraction below.
|
|
81
81
|
|
|
@@ -126,24 +126,21 @@ Degrade to Quick tier extraction. Note the degradation reason in context for the
|
|
|
126
126
|
- If a file cannot be read: log warning, skip file, continue with remaining files
|
|
127
127
|
- If AST parsing fails on a file: fall back to source reading for that file, continue
|
|
128
128
|
|
|
129
|
-
**Re-export tracing (Forge/Deep only):**
|
|
130
|
-
|
|
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.
|
|
129
|
+
**Re-export tracing (Forge/Deep only):** After the initial AST scan, check for unresolved public exports from entry points (`__init__.py`, `index.ts`, `lib.rs`). Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their definition files.
|
|
132
130
|
|
|
133
131
|
### 4b. Validate Exports Against Package Entry Point
|
|
134
132
|
|
|
135
133
|
After extraction, validate the collected exports against the package's actual public API surface:
|
|
136
134
|
|
|
137
|
-
- **Python:** Read `{source_root}/__init__.py` — extract
|
|
138
|
-
- In AST
|
|
139
|
-
- In
|
|
140
|
-
- **TypeScript/
|
|
141
|
-
- **Rust:** Read `lib.rs` — extract `pub use` items. Same
|
|
142
|
-
- **Go:** Scan package-level files for exported (capitalized) identifiers.
|
|
135
|
+
- **Python:** Read `{source_root}/__init__.py` — extract imports to build the public export list. Compare against AST results:
|
|
136
|
+
- In AST but not entry point → mark as internal (exclude from `metadata.json` exports)
|
|
137
|
+
- In entry point but not AST → flag as extraction gap (trace via re-export protocol)
|
|
138
|
+
- **TypeScript/JS:** Read `index.ts`/`index.js` — same comparison logic.
|
|
139
|
+
- **Rust:** Read `lib.rs` — extract `pub use` items. Same logic. **Go:** Scan for exported (capitalized) identifiers.
|
|
143
140
|
|
|
144
|
-
Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array.
|
|
141
|
+
Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array.
|
|
145
142
|
|
|
146
|
-
**If entry point is missing or unreadable:** Skip validation with a warning.
|
|
143
|
+
**If entry point is missing or unreadable:** Skip validation with a warning.
|
|
147
144
|
|
|
148
145
|
### 4c. Detect and Inventory Scripts/Assets
|
|
149
146
|
|
|
@@ -152,10 +149,8 @@ Use the entry point as the authoritative source for `metadata.json`'s `exports[]
|
|
|
152
149
|
After export extraction, scan the source for scripts and assets using the detection patterns in `{extractionPatternsTracingData}`:
|
|
153
150
|
|
|
154
151
|
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
|
|
156
|
-
3.
|
|
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)
|
|
152
|
+
2. For each candidate: verify existence, check size (flag >500 lines), exclude binaries, compute SHA-256 hash
|
|
153
|
+
3. Extract purpose from header comments, shebang, README references, or schema fields. Record: file_path, purpose, source_path, language/type, content_hash, confidence (T1-low)
|
|
159
154
|
|
|
160
155
|
Add results to `scripts_inventory[]` and `assets_inventory[]` alongside the existing export inventory.
|
|
161
156
|
|
|
@@ -214,8 +209,9 @@ Display: "**Extraction Summary — Select an Option:** [C] Continue to compilati
|
|
|
214
209
|
|
|
215
210
|
#### EXECUTION RULES:
|
|
216
211
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
212
|
+
- IF docs-only mode (`extraction_mode: "docs-only"`): Auto-proceed immediately to `{nextStepFile}` — no user interaction required
|
|
213
|
+
- OTHERWISE: ALWAYS halt and wait for user input after presenting the extraction summary
|
|
214
|
+
- This is Gate 2 — user must confirm before compilation proceeds (except docs-only mode)
|
|
219
215
|
- User may ask questions about the extraction results before continuing
|
|
220
216
|
|
|
221
217
|
#### Menu Handling Logic:
|
|
@@ -43,7 +43,7 @@ To fetch temporal context (issues, PRs, changelogs, release notes) from the sour
|
|
|
43
43
|
## CONTEXT BOUNDARIES:
|
|
44
44
|
|
|
45
45
|
- Available: brief_data, tier, source_location from step-01; extraction_inventory from step-03
|
|
46
|
-
- **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b).
|
|
46
|
+
- **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b). If `extraction_mode: "docs-only"` or `top_exports` is absent/empty, skip targeted searches silently.
|
|
47
47
|
- Focus: Creating a QMD temporal collection for the source repository
|
|
48
48
|
- Limits: Do NOT modify extraction data, begin enrichment, or compile content
|
|
49
49
|
- Dependencies: Extraction must be complete from step-03
|
|
@@ -208,7 +208,7 @@ After temporal context is fetched and indexed (or skipped for any reason), immed
|
|
|
208
208
|
|
|
209
209
|
## CRITICAL STEP COMPLETION NOTE
|
|
210
210
|
|
|
211
|
-
ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for
|
|
211
|
+
ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for documentation fetch.
|
|
212
212
|
|
|
213
213
|
---
|
|
214
214
|
|
|
@@ -224,7 +224,7 @@ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to el
|
|
|
224
224
|
- Collection `{skill-name}-temporal` indexed into QMD
|
|
225
225
|
- Registry entry added/updated in forge-tier.yaml with type `"temporal"`
|
|
226
226
|
- Staging directory cleaned up after indexing
|
|
227
|
-
- Auto-proceeded to step-
|
|
227
|
+
- Auto-proceeded to step-03c
|
|
228
228
|
|
|
229
229
|
### ❌ SYSTEM FAILURE:
|
|
230
230
|
|
|
@@ -85,7 +85,9 @@ Content fetched from external URLs is classified as **T3** (external, untrusted)
|
|
|
85
85
|
|
|
86
86
|
After fetching a URL, apply the following heuristic to detect documentation root pages that contain no useful API content. This is common with modern documentation sites (Mintlify, Docusaurus, ReadTheDocs, GitBook) that render API content on subpages.
|
|
87
87
|
|
|
88
|
-
**Root page detection heuristic —
|
|
88
|
+
**Root page detection heuristic — apply only when the URL path ends in `/`, `/index`, `/index.html`, has no path component (bare domain), or has 1 path segment (e.g., `/docs`). For deeper URL paths (2+ segments like `/api/reference`), skip this heuristic and keep the content as-is.**
|
|
89
|
+
|
|
90
|
+
**A page is classified as a root if BOTH conditions are true:**
|
|
89
91
|
|
|
90
92
|
1. **Zero API content indicators:** The fetched markdown contains none of: fenced code blocks (`` ``` ``), parameter tables (`|---|`), or function signature patterns (`def `, `function `, `fn `, `func `, `export `).
|
|
91
93
|
2. **High link density:** More than 70% of non-empty lines are markdown links (matching `[text](url)` with no other substantive content on the line).
|
|
@@ -70,7 +70,7 @@ Before searching, check which QMD collections are available:
|
|
|
70
70
|
3. **If no enrichment collections exist** (no `"temporal"` or `"docs"` type collections): report this and auto-proceed. Display:
|
|
71
71
|
|
|
72
72
|
"**Enrichment: no enrichment collections available.**
|
|
73
|
-
Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.
|
|
73
|
+
Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. {IF extraction_mode is 'docs-only' AND T3 items exist in extraction_inventory: 'T3 documentation content is available in extraction inventory — enrichment via QMD is skipped but T3 content will be compiled.'} {ELSE: 'Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.'}
|
|
74
74
|
|
|
75
75
|
Proceeding to compilation..."
|
|
76
76
|
|
|
@@ -39,7 +39,7 @@ To assemble the complete skill content from the extraction inventory and enrichm
|
|
|
39
39
|
## EXECUTION PROTOCOLS:
|
|
40
40
|
|
|
41
41
|
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
42
|
-
- 💾 Build all content in context
|
|
42
|
+
- 💾 Build all content in context AND write to the staging directory (`_bmad-output/{name}/`) — staging write is mandatory for step-06 validation
|
|
43
43
|
- 📖 Follow agentskills.io section structure from data file
|
|
44
44
|
- 🚫 Do not promote any output files to final `skills/` or `forge-data/` directories — that's step-07
|
|
45
45
|
|
|
@@ -100,7 +100,8 @@ Following the structure from the skill-sections data file:
|
|
|
100
100
|
- Set `description` from the SKILL.md frontmatter `description` field (already assembled in section 2)
|
|
101
101
|
- Set `language` from source analysis (e.g., `"typescript"`, `"python"`) — use the primary language of the entry point file
|
|
102
102
|
- Set `ast_node_count` from extraction stats if ast-grep was used (Forge/Deep tier), otherwise omit
|
|
103
|
-
- Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the
|
|
103
|
+
- Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the installed module's `package.json` at `{project-root}/_bmad/skf/package.json`. If unresolvable there, fall back to `node -p "require('./node_modules/bmad-module-skill-forge/package.json').version"`. If still unresolvable, use `"unknown"` and add a warning to the evidence report. Never hardcode the version.
|
|
104
|
+
- Store `commit_short` = first 8 characters of `source_commit` (or `"unknown"` if unavailable) for use in step-08 report.
|
|
104
105
|
- 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.
|
|
105
106
|
|
|
106
107
|
### 5. Build references/ Content
|
|
@@ -119,7 +120,7 @@ One entry per extracted export: export_name, export_type, params[] (typed string
|
|
|
119
120
|
|
|
120
121
|
### 7. Build evidence-report.md Content
|
|
121
122
|
|
|
122
|
-
Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), validation
|
|
123
|
+
Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), warnings. For validation-specific fields (Schema, Body, Security, Content Quality, tessl, Metadata), insert the placeholder text `[PENDING — populated by step-06]`. Step-06 will replace these placeholders with actual results. See `{skillSectionsData}` for full template. Use the same `{skf_version}` value resolved in section 4 when populating the Tool Versions block.
|
|
123
124
|
|
|
124
125
|
### 8. Menu Handling Logic
|
|
125
126
|
|
|
@@ -125,7 +125,7 @@ npx skill-check check <staging-skill-dir> --format json
|
|
|
125
125
|
|
|
126
126
|
(Security scan enabled by default when `--no-security-scan` omitted. The scan uses [Snyk Agent Scan](https://github.com/snyk/agent-scan) to check for prompt injection risks, sensitive data exposure, and unsafe tool permissions.)
|
|
127
127
|
|
|
128
|
-
Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation.
|
|
128
|
+
Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation. If the full validation re-run produces a different quality score than section 2, update the evidence-report with the newer score.
|
|
129
129
|
|
|
130
130
|
**If security scan fails due to missing SNYK_TOKEN:**
|
|
131
131
|
|
|
@@ -181,7 +181,7 @@ tessl suggestions:
|
|
|
181
181
|
Cross-check metadata.json against extraction inventory:
|
|
182
182
|
- `stats.exports_documented` / `stats.exports_public_api` / `stats.exports_internal` / `stats.exports_total` are accurate
|
|
183
183
|
- `stats.public_api_coverage` and `stats.total_coverage` are correctly computed (null when denominator is 0)
|
|
184
|
-
- `
|
|
184
|
+
- `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3` match actual counts
|
|
185
185
|
- `spec_version` is "1.3"
|
|
186
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
|
|
187
187
|
|
|
@@ -9,7 +9,7 @@ forgeTierConfig: '{sidecar_path}/forge-tier.yaml'
|
|
|
9
9
|
|
|
10
10
|
## STEP GOAL:
|
|
11
11
|
|
|
12
|
-
To write all compiled content to disk — 4 deliverable files to `
|
|
12
|
+
To write all compiled content to disk — 4 deliverable files to `{skills_output_folder}/{name}/` and 3 workspace artifacts to `{forge_data_folder}/{name}/`, creating directories as needed.
|
|
13
13
|
|
|
14
14
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
15
|
|
|
@@ -30,7 +30,7 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
|
|
|
30
30
|
|
|
31
31
|
- 🎯 Focus ONLY on writing files from the compiled content in context
|
|
32
32
|
- 🚫 FORBIDDEN to modify content during writing — write exactly what was compiled
|
|
33
|
-
- 🚫 FORBIDDEN to skip any artifact — all
|
|
33
|
+
- 🚫 FORBIDDEN to skip any artifact — all base artifact types must be written (4 deliverables + 3 workspace files + N reference files)
|
|
34
34
|
- 💬 Report each file written with its path
|
|
35
35
|
- 📁 Create directories before writing files
|
|
36
36
|
|
|
@@ -54,65 +54,66 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
|
|
|
54
54
|
|
|
55
55
|
### 1. Create Directory Structure
|
|
56
56
|
|
|
57
|
-
Create the following directories
|
|
57
|
+
Create the following directories:
|
|
58
58
|
|
|
59
59
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
{skills_output_folder}/{name}/
|
|
61
|
+
{skills_output_folder}/{name}/references/
|
|
62
|
+
{forge_data_folder}/{name}/
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
If `scripts_inventory` is non-empty, also create: `
|
|
66
|
-
If `assets_inventory` is non-empty, also create: `
|
|
65
|
+
If `scripts_inventory` is non-empty, also create: `{skills_output_folder}/{name}/scripts/`
|
|
66
|
+
If `assets_inventory` is non-empty, also create: `{skills_output_folder}/{name}/assets/`
|
|
67
67
|
|
|
68
68
|
Where `{name}` is the skill name from the brief (kebab-case).
|
|
69
69
|
|
|
70
70
|
If directories already exist, do not error — proceed with file writing (overwrites existing files).
|
|
71
71
|
|
|
72
|
-
### 2. Write Deliverables to
|
|
72
|
+
### 2. Write Deliverables to {skills_output_folder}/{name}/
|
|
73
73
|
|
|
74
74
|
Write these 4 files from the compiled content:
|
|
75
75
|
|
|
76
|
-
**File 1:** `
|
|
76
|
+
**File 1:** `{skills_output_folder}/{name}/SKILL.md`
|
|
77
77
|
- The complete compiled skill document
|
|
78
78
|
- agentskills.io-compliant format with all sections
|
|
79
79
|
- [MANUAL] markers seeded
|
|
80
80
|
|
|
81
|
-
**File 2:** `
|
|
81
|
+
**File 2:** `{skills_output_folder}/{name}/context-snippet.md`
|
|
82
82
|
- Compressed 2-line format for CLAUDE.md integration
|
|
83
83
|
|
|
84
|
-
**File 3:** `
|
|
84
|
+
**File 3:** `{skills_output_folder}/{name}/metadata.json`
|
|
85
85
|
- Machine-readable birth certificate with stats and provenance
|
|
86
86
|
|
|
87
|
-
**File 4:** `
|
|
87
|
+
**File 4:** `{skills_output_folder}/{name}/references/*.md`
|
|
88
88
|
- One file per function group or type
|
|
89
89
|
- Progressive disclosure detail files
|
|
90
90
|
|
|
91
|
-
**Files 4b (conditional):** `
|
|
91
|
+
**Files 4b (conditional):** `{skills_output_folder}/{name}/scripts/*`
|
|
92
92
|
- One file per detected script, copied from source with content preserved
|
|
93
93
|
- Only created when `scripts_inventory` is non-empty
|
|
94
94
|
|
|
95
|
-
**Files 4c (conditional):** `
|
|
95
|
+
**Files 4c (conditional):** `{skills_output_folder}/{name}/assets/*`
|
|
96
96
|
- One file per detected asset, copied from source with content preserved
|
|
97
97
|
- Only created when `assets_inventory` is non-empty
|
|
98
98
|
|
|
99
|
-
### 3. Write Workspace Artifacts to
|
|
99
|
+
### 3. Write Workspace Artifacts to {forge_data_folder}/{name}/
|
|
100
100
|
|
|
101
101
|
Write these 3 files from the compiled content:
|
|
102
102
|
|
|
103
|
-
**File 5:** `
|
|
103
|
+
**File 5:** `{forge_data_folder}/{name}/provenance-map.json`
|
|
104
104
|
- Per-claim source map with AST bindings and confidence tiers
|
|
105
105
|
|
|
106
|
-
**File 6:** `
|
|
106
|
+
**File 6:** `{forge_data_folder}/{name}/evidence-report.md`
|
|
107
107
|
- Build artifact with extraction summary, validation results, warnings
|
|
108
108
|
|
|
109
|
-
**File 7:** `
|
|
109
|
+
**File 7:** `{forge_data_folder}/{name}/extraction-rules.yaml`
|
|
110
110
|
- Language and ast-grep schema used for this extraction (for reproducibility)
|
|
111
111
|
|
|
112
112
|
### 4. Verify Write Completion
|
|
113
113
|
|
|
114
114
|
After all files are written, verify:
|
|
115
|
-
- All
|
|
115
|
+
- All 4 deliverable artifact types exist (SKILL.md, context-snippet.md, metadata.json, at least one file in references/), all 3 workspace artifacts exist (provenance-map.json, evidence-report.md, extraction-rules.yaml), plus scripts/ and assets/ files when inventories are non-empty
|
|
116
|
+
- Store `ref_count` = count of files written to `references/` for use in step-08 report
|
|
116
117
|
- List each file with its path and size
|
|
117
118
|
|
|
118
119
|
**If any write failed:**
|
|
@@ -123,7 +124,7 @@ Display brief confirmation:
|
|
|
123
124
|
|
|
124
125
|
"**Artifacts generated.**
|
|
125
126
|
|
|
126
|
-
**Deliverables (
|
|
127
|
+
**Deliverables ({skills_output_folder}/{name}/):**
|
|
127
128
|
- SKILL.md
|
|
128
129
|
- context-snippet.md
|
|
129
130
|
- metadata.json
|
|
@@ -131,7 +132,7 @@ Display brief confirmation:
|
|
|
131
132
|
{if assets: - assets/ ({assets_count} files)}
|
|
132
133
|
- references/ ({reference_count} files)
|
|
133
134
|
|
|
134
|
-
**Workspace (
|
|
135
|
+
**Workspace ({forge_data_folder}/{name}/):**
|
|
135
136
|
- provenance-map.json
|
|
136
137
|
- evidence-report.md
|
|
137
138
|
- extraction-rules.yaml
|
|
@@ -144,23 +145,13 @@ Proceeding to compilation report..."
|
|
|
144
145
|
|
|
145
146
|
Index the generated skill artifacts into a QMD collection so that audit-skill and update-skill can perform high-signal searches against curated extraction data instead of raw source files.
|
|
146
147
|
|
|
147
|
-
**Collection creation:**
|
|
148
|
-
|
|
149
|
-
Create a QMD collection from both artifact directories:
|
|
150
|
-
```bash
|
|
151
|
-
qmd collection add {project-root}/skills/{name} --name {name}-extraction --mask "**/*"
|
|
152
|
-
qmd embed
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
If collection already exists (re-run): remove and recreate for atomic replace:
|
|
148
|
+
**Collection creation:** Create (or replace) a QMD collection from the skill artifacts:
|
|
156
149
|
```bash
|
|
157
|
-
qmd collection remove {name}-extraction
|
|
158
|
-
qmd collection add {
|
|
159
|
-
qmd embed
|
|
150
|
+
qmd collection remove {name}-extraction 2>/dev/null # no-op if new
|
|
151
|
+
qmd collection add {skills_output_folder}/{name} --name {name}-extraction --mask "**/*"
|
|
152
|
+
qmd embed # generates vector embeddings for vector_search/deep_search
|
|
160
153
|
```
|
|
161
154
|
|
|
162
|
-
**Note:** `qmd embed` generates vector embeddings required for `vector_search` and `deep_search`. Without it, only BM25 keyword `search` works.
|
|
163
|
-
|
|
164
155
|
**Registry update:**
|
|
165
156
|
|
|
166
157
|
Read `{forgeTierConfig}` and update the `qmd_collections` array.
|
|
@@ -197,7 +188,7 @@ Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.
|
|
|
197
188
|
|
|
198
189
|
Read `{forgeTierConfig}` and update the `ccc_index_registry` array.
|
|
199
190
|
|
|
200
|
-
Deduplicate by `source_repo`
|
|
191
|
+
Deduplicate by `source_repo` + `skill_name` (NOT local `path`, which may be ephemeral). Replace existing match or append:
|
|
201
192
|
|
|
202
193
|
```yaml
|
|
203
194
|
- source_repo: "{brief.source_repo}"
|
|
@@ -209,11 +200,9 @@ Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combin
|
|
|
209
200
|
|
|
210
201
|
Write the updated forge-tier.yaml.
|
|
211
202
|
|
|
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.
|
|
203
|
+
**Error handling:** If ccc indexing or registry update fails, log and continue — do NOT fail the workflow.
|
|
215
204
|
|
|
216
|
-
**IF `tools.ccc` is false:** Skip this section silently.
|
|
205
|
+
**IF `tools.ccc` is false:** Skip this section silently.
|
|
217
206
|
|
|
218
207
|
### 6. Menu Handling Logic
|
|
219
208
|
|
|
@@ -239,9 +228,9 @@ ONLY WHEN all 7 artifact files are written and verified will you proceed to load
|
|
|
239
228
|
|
|
240
229
|
### ✅ SUCCESS:
|
|
241
230
|
|
|
242
|
-
- Directory structure created (
|
|
243
|
-
- All 4 deliverable files written to
|
|
244
|
-
- All 3 workspace artifact files written to
|
|
231
|
+
- Directory structure created ({skills_output_folder}/{name}/, {forge_data_folder}/{name}/)
|
|
232
|
+
- All 4 deliverable files written to {skills_output_folder}/{name}/
|
|
233
|
+
- All 3 workspace artifact files written to {forge_data_folder}/{name}/
|
|
245
234
|
- Write completion verified — all 7 files exist
|
|
246
235
|
- Deep tier: QMD collection `{name}-extraction` created/updated and registered in forge-tier.yaml
|
|
247
236
|
- Non-Deep tier: QMD indexing skipped silently
|