bmad-module-skill-forge 0.8.4 → 0.10.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 +5 -3
- package/docs/bmad-synergy.md +183 -0
- package/docs/concepts.md +30 -2
- package/docs/examples.md +57 -17
- package/docs/getting-started.md +17 -0
- package/docs/how-it-works.md +143 -29
- package/docs/index.md +1 -1
- package/docs/workflows.md +43 -5
- package/package.json +1 -1
- package/src/README.md +47 -0
- package/src/agents/forger.agent.yaml +8 -0
- package/src/knowledge/agentskills-spec.md +3 -0
- package/src/knowledge/overview.md +1 -0
- package/src/knowledge/provenance-tracking.md +3 -0
- package/src/knowledge/skf-knowledge-index.csv +1 -0
- package/src/knowledge/skill-lifecycle.md +19 -7
- package/src/knowledge/version-paths.md +243 -0
- package/src/module-help.csv +2 -0
- package/src/module.yaml +4 -0
- package/src/workflows/README.md +9 -1
- package/src/workflows/analyze-source/data/skill-brief-schema.md +4 -0
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +5 -0
- package/src/workflows/audit-skill/steps-c/step-01-init.md +10 -6
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-06-report.md +7 -2
- package/src/workflows/brief-skill/data/skill-brief-schema.md +11 -0
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +24 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +10 -0
- package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +9 -0
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +18 -4
- package/src/workflows/create-skill/data/skill-sections.md +2 -0
- package/src/workflows/create-skill/data/source-resolution-protocols.md +40 -4
- package/src/workflows/create-skill/steps-c/step-03-extract.md +1 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +1 -0
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +48 -32
- package/src/workflows/create-skill/steps-c/step-08-report.md +16 -12
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +12 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +4 -1
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +11 -5
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +40 -23
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +6 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +11 -4
- package/src/workflows/drop-skill/steps-c/step-01-select.md +298 -0
- package/src/workflows/drop-skill/steps-c/step-02-execute.md +290 -0
- package/src/workflows/drop-skill/steps-c/step-03-report.md +136 -0
- package/src/workflows/drop-skill/workflow.md +63 -0
- package/src/workflows/export-skill/data/managed-section-format.md +33 -8
- package/src/workflows/export-skill/data/snippet-format.md +16 -4
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +46 -7
- package/src/workflows/export-skill/steps-c/step-02-package.md +2 -2
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +39 -7
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +185 -13
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +2 -2
- package/src/workflows/export-skill/steps-c/step-06-summary.md +35 -8
- package/src/workflows/quick-skill/steps-c/step-01-resolve-target.md +10 -0
- package/src/workflows/quick-skill/steps-c/step-03-quick-extract.md +2 -0
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +36 -21
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +8 -3
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +7 -4
- package/src/workflows/rename-skill/steps-c/step-01-select.md +281 -0
- package/src/workflows/rename-skill/steps-c/step-02-execute.md +391 -0
- package/src/workflows/rename-skill/steps-c/step-03-report.md +133 -0
- package/src/workflows/rename-skill/workflow.md +64 -0
- package/src/workflows/setup-forge/steps-c/step-04-report.md +8 -5
- package/src/workflows/shared/health-check.md +231 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +14 -6
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +1 -1
- package/src/workflows/test-skill/steps-c/step-06-report.md +4 -3
- package/src/workflows/update-skill/data/remote-source-resolution.md +18 -4
- package/src/workflows/update-skill/steps-c/step-01-init.md +15 -8
- package/src/workflows/update-skill/steps-c/step-06-write.md +43 -13
- package/src/workflows/update-skill/steps-c/step-07-report.md +13 -8
- package/src/workflows/verify-stack/steps-c/step-01-init.md +8 -3
- package/src/workflows/verify-stack/steps-c/step-06-report.md +6 -3
- package/tools/cli/lib/compiler.js +1 -1
- package/tools/cli/lib/ui.js +24 -2
|
@@ -3,6 +3,7 @@ name: 'step-05-write-brief'
|
|
|
3
3
|
description: 'Generate and write skill-brief.yaml to the forge data folder'
|
|
4
4
|
|
|
5
5
|
briefSchemaFile: '../data/skill-brief-schema.md'
|
|
6
|
+
nextStepFile: '../../shared/health-check.md'
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Step 5: Write Brief
|
|
@@ -67,12 +68,19 @@ If `{forge_data_folder}` is not set or doesn't exist:
|
|
|
67
68
|
|
|
68
69
|
### 3. Generate skill-brief.yaml
|
|
69
70
|
|
|
71
|
+
**Resolve the `version` field before generating the YAML:**
|
|
72
|
+
|
|
73
|
+
- If `target_version` was set in step 01 (the user explicitly asked for a specific version), use `target_version` as the value of the `version` field. This is the authoritative version for create-skill.
|
|
74
|
+
- Otherwise, use the auto-detected source version from step 02, or `1.0.0` if none was detected.
|
|
75
|
+
|
|
76
|
+
`target_version` and `version` must never carry different values in the written brief. When the user provided a `target_version`, also include it as a separate `target_version` field so downstream tooling can distinguish "user-requested" from "auto-detected" without re-deriving the provenance — but its value must be identical to `version`.
|
|
77
|
+
|
|
70
78
|
Generate the YAML file using the approved field values and the schema template:
|
|
71
79
|
|
|
72
80
|
```yaml
|
|
73
81
|
---
|
|
74
82
|
name: "{approved skill name}"
|
|
75
|
-
version: "{detected source version
|
|
83
|
+
version: "{resolved version — target_version if set, else detected source version, else 1.0.0}"
|
|
76
84
|
source_type: "{source or docs-only}"
|
|
77
85
|
source_repo: "{approved source repo or doc site URL}"
|
|
78
86
|
language: "{approved language}"
|
|
@@ -92,6 +100,12 @@ scope:
|
|
|
92
100
|
|
|
93
101
|
**Conditional optional field inclusion:**
|
|
94
102
|
|
|
103
|
+
**If `target_version` was set in step 01:**
|
|
104
|
+
Include the `target_version` field in the generated YAML — its value MUST be identical to the `version` field above:
|
|
105
|
+
```yaml
|
|
106
|
+
target_version: "{target_version — same value as version}"
|
|
107
|
+
```
|
|
108
|
+
|
|
95
109
|
**If `source_type: "docs-only"` OR supplemental `doc_urls` were collected:**
|
|
96
110
|
Include the `doc_urls` array (uncommented) in the generated YAML:
|
|
97
111
|
```yaml
|
|
@@ -203,13 +217,13 @@ After compilation, you can:
|
|
|
203
217
|
|
|
204
218
|
**Brief-skill workflow complete.**"
|
|
205
219
|
|
|
206
|
-
### 7.
|
|
220
|
+
### 7. Workflow Health Check
|
|
207
221
|
|
|
208
|
-
|
|
222
|
+
Load and execute `{nextStepFile}` for workflow self-improvement check.
|
|
209
223
|
|
|
210
224
|
## CRITICAL STEP COMPLETION NOTE
|
|
211
225
|
|
|
212
|
-
This
|
|
226
|
+
This step chains to the shared health check. After the health check completes, the brief-skill workflow is fully done.
|
|
213
227
|
|
|
214
228
|
---
|
|
215
229
|
|
|
@@ -196,6 +196,7 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
|
|
|
196
196
|
"source_repo": "{github-url}",
|
|
197
197
|
"source_root": "{resolved-source-path}",
|
|
198
198
|
"source_commit": "{commit-hash}",
|
|
199
|
+
"source_ref": "{source_ref or null}",
|
|
199
200
|
"confidence_tier": "{Quick|Forge|Forge+|Deep}",
|
|
200
201
|
"spec_version": "1.3",
|
|
201
202
|
"generation_date": "{ISO-8601}",
|
|
@@ -264,6 +265,7 @@ Each reference file includes:
|
|
|
264
265
|
"skill_name": "{name}",
|
|
265
266
|
"source_repo": "{url}",
|
|
266
267
|
"source_commit": "{hash}",
|
|
268
|
+
"source_ref": "v0.5.0",
|
|
267
269
|
"generated_at": "{ISO-8601}",
|
|
268
270
|
"entries": [
|
|
269
271
|
{
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Source Resolution Protocols
|
|
2
2
|
|
|
3
|
+
## Tag Resolution (when target_version is set)
|
|
4
|
+
|
|
5
|
+
When `brief.target_version` is present AND `source_repo` is a remote URL, resolve the target version to a git tag before cloning:
|
|
6
|
+
|
|
7
|
+
1. **List available tags:**
|
|
8
|
+
- `gh api repos/{owner}/{repo}/tags --paginate --jq '.[].name'`
|
|
9
|
+
- Fallback: `git ls-remote --tags {source_repo} | sed 's|.*refs/tags/||'`
|
|
10
|
+
|
|
11
|
+
2. **Match `target_version` against tags** in priority order:
|
|
12
|
+
- **Exact match:** `{target_version}` (e.g., `0.5.0`)
|
|
13
|
+
- **With `v` prefix:** `v{target_version}` (e.g., `v0.5.0`)
|
|
14
|
+
- **With package scope (monorepos):** `{brief.name}@{target_version}` or `@{scope}/{brief.name}@{target_version}`
|
|
15
|
+
|
|
16
|
+
3. **Resolution outcomes:**
|
|
17
|
+
- **Single match:** Store the matched tag as `source_ref`. Use it as `{branch}` in all subsequent clone/API commands.
|
|
18
|
+
- **Multiple matches:** Present the matching tags to the user — "Multiple tags match version {target_version}: {list}. Which one should I use?" Wait for selection.
|
|
19
|
+
- **Zero matches:** ⚠️ Warn: "No git tag found matching version {target_version}. Closest available tags: {list 5 nearest by semver sort}. Falling back to default branch — **extracted code may not match target version.**" Set `source_ref` to `HEAD` and proceed with default branch.
|
|
20
|
+
|
|
21
|
+
4. **Store `source_ref`** in context. This value is written to metadata.json and provenance-map.json for downstream workflows (update-skill, audit-skill) to re-clone from the same ref.
|
|
22
|
+
|
|
23
|
+
When `brief.target_version` is NOT set: skip tag resolution. Set `source_ref` to `HEAD` (default branch behavior, unchanged from before).
|
|
24
|
+
|
|
25
|
+
### Local Source Warning
|
|
26
|
+
|
|
27
|
+
When `brief.target_version` is set AND `source_repo` is a local path:
|
|
28
|
+
|
|
29
|
+
⚠️ "**Local source may not match target version {target_version}.** Ensure you've checked out the correct version locally, or use a remote GitHub URL so SKF can clone from the git tag automatically."
|
|
30
|
+
|
|
31
|
+
Proceed with local files as-is. Set `source_ref` to `"local"`.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
3
35
|
## Remote Source Resolution (Forge/Deep only)
|
|
4
36
|
|
|
5
37
|
If `source_repo` is a local path: proceed with the tier-appropriate strategy as normal.
|
|
@@ -8,17 +40,17 @@ If `source_repo` is a remote URL (GitHub URL or owner/repo format) AND tier is F
|
|
|
8
40
|
|
|
9
41
|
1. **Check `git` availability:** Verify `git` is functional (`git --version`). If `git` is not available, skip to the fallback warning below.
|
|
10
42
|
|
|
11
|
-
2. **Ephemeral shallow clone:** Clone the repository to a system temp path for AST access:
|
|
43
|
+
2. **Ephemeral shallow clone:** Clone the repository to a system temp path for AST access. Use `source_ref` from tag resolution (or `{branch}` for the default branch if no tag was resolved):
|
|
12
44
|
|
|
13
45
|
```
|
|
14
46
|
temp_path = {system_temp}/skf-ephemeral-{skill-name}-{timestamp}/
|
|
15
|
-
git clone --depth 1 --branch {
|
|
47
|
+
git clone --depth 1 --branch {source_ref} --single-branch --filter=blob:none {source_repo} {temp_path}
|
|
16
48
|
```
|
|
17
49
|
|
|
18
50
|
**If `include_patterns` are NOT specified:**
|
|
19
51
|
|
|
20
52
|
```
|
|
21
|
-
git clone --depth 1 --branch {
|
|
53
|
+
git clone --depth 1 --branch {source_ref} --single-branch --filter=blob:none {source_repo} {temp_path}
|
|
22
54
|
```
|
|
23
55
|
|
|
24
56
|
**If `include_patterns` ARE specified**, use sparse-checkout to limit the clone scope:
|
|
@@ -132,14 +164,18 @@ After the source path is accessible, capture the current commit hash for provena
|
|
|
132
164
|
|
|
133
165
|
- **Local path:** `git -C {source_root} rev-parse HEAD` — if the path is a git repo
|
|
134
166
|
- **Ephemeral clone (Forge/Deep):** already captured during clone (step 3 above)
|
|
135
|
-
- **Quick tier (remote, no clone):** `gh api repos/{owner}/{repo}/commits/{
|
|
167
|
+
- **Quick tier (remote, no clone):** `gh api repos/{owner}/{repo}/commits/{source_ref} --jq '.sha'`
|
|
136
168
|
|
|
137
169
|
Store the result as `source_commit` in context. If capture fails (not a git repo, API unavailable), set `source_commit: null` — this is not an error.
|
|
138
170
|
|
|
171
|
+
Also store `source_ref` in context (from tag resolution above, or `HEAD` if no tag was resolved, or `"local"` for local sources). This value is persisted to metadata.json and provenance-map.json so downstream workflows (update-skill, audit-skill) can re-access the same source ref.
|
|
172
|
+
|
|
139
173
|
---
|
|
140
174
|
|
|
141
175
|
## Version Reconciliation (all tiers, source mode only)
|
|
142
176
|
|
|
177
|
+
**Target version override:** If `brief.target_version` is present, use it as the authoritative version for the skill. Do NOT warn about a brief-vs-source version mismatch — the user intentionally specified this version. Set the working version to `brief.target_version` and skip the rest of this reconciliation section. The `target_version` field indicates deliberate user intent (e.g., targeting an older version, or providing the version for a docs-only skill).
|
|
178
|
+
|
|
143
179
|
**If `source_type: "docs-only"`:** skip this section — no source files exist to reconcile.
|
|
144
180
|
|
|
145
181
|
After the source path is accessible (local path from step-01, or ephemeral clone from above), check whether the source contains a version identifier and reconcile it with `brief.version`. Look for the first matching version file in the resolved source path:
|
|
@@ -47,7 +47,7 @@ To extract all public exports, function signatures, type definitions, and co-imp
|
|
|
47
47
|
|
|
48
48
|
## CONTEXT BOUNDARIES:
|
|
49
49
|
|
|
50
|
-
- Available: brief_data, tier, source_root, file_tree from step-01; ecosystem check outcome from step-02
|
|
50
|
+
- Available: brief_data, tier, source_root, file_tree from step-01; ecosystem check outcome from step-02; source_ref and source_commit from source resolution (see source-resolution-protocols.md)
|
|
51
51
|
- Focus: Source code extraction and inventory building
|
|
52
52
|
- Limits: Do NOT compile, assemble, or write any output
|
|
53
53
|
- Dependencies: Source code must be accessible (local repos resolved in step-01; remote repos cloned in section 2a)
|
|
@@ -101,6 +101,7 @@ Following the structure from the skill-sections data file:
|
|
|
101
101
|
- Populate all fields from brief_data, extraction inventory, and tier
|
|
102
102
|
- Set `generation_date` to current ISO-8601 timestamp
|
|
103
103
|
- Set `source_commit` from resolved source (if available)
|
|
104
|
+
- Set `source_ref` from resolved source ref (tag name, branch, or `HEAD`; null if unavailable)
|
|
104
105
|
- Set `stats` from extraction aggregate counts:
|
|
105
106
|
- `exports_documented`: count of exports with documentation in the assembled SKILL.md
|
|
106
107
|
- `exports_public_api`: count of exports from public entry points (`__init__.py`, `index.ts`, `lib.rs`, or equivalent) — derive this from step-03's entry-point validation (section 4b), NOT from the provenance-map entry count (which may be incomplete if extraction patterns missed some export types)
|
|
@@ -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 `{skill_package}` and 3 workspace artifacts to `{forge_version}`, creating directories as needed. Then create or update the `active` symlink.
|
|
13
13
|
|
|
14
14
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
15
|
|
|
@@ -47,6 +47,7 @@ To write all compiled content to disk — 4 deliverable files to `{skills_output
|
|
|
47
47
|
- Focus: File system operations — create directories, write files
|
|
48
48
|
- Limits: Do NOT modify content during writing
|
|
49
49
|
- Dependencies: All content must be compiled and validated in context
|
|
50
|
+
- Path resolution: See `knowledge/version-paths.md` for canonical path templates (`{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}`)
|
|
50
51
|
|
|
51
52
|
## MANDATORY SEQUENCE
|
|
52
53
|
|
|
@@ -54,65 +55,77 @@ To write all compiled content to disk — 4 deliverable files to `{skills_output
|
|
|
54
55
|
|
|
55
56
|
### 1. Create Directory Structure
|
|
56
57
|
|
|
57
|
-
Create the following directories:
|
|
58
|
+
Resolve `{version}` from the skill brief's `version` field. Create the following directories:
|
|
58
59
|
|
|
59
60
|
```
|
|
60
|
-
{skills_output_folder}/{name}/
|
|
61
|
-
{skills_output_folder}/{name}/
|
|
62
|
-
{
|
|
61
|
+
{skill_group} # {skills_output_folder}/{name}/
|
|
62
|
+
{skill_package} # {skills_output_folder}/{name}/{version}/{name}/
|
|
63
|
+
{skill_package}/references/
|
|
64
|
+
{forge_version} # {forge_data_folder}/{name}/{version}/
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
If `scripts_inventory` is non-empty, also create: `{
|
|
66
|
-
If `assets_inventory` is non-empty, also create: `{
|
|
67
|
+
If `scripts_inventory` is non-empty, also create: `{skill_package}/scripts/`
|
|
68
|
+
If `assets_inventory` is non-empty, also create: `{skill_package}/assets/`
|
|
67
69
|
|
|
68
|
-
Where `{name}` is the skill name from the brief (kebab-case).
|
|
70
|
+
Where `{name}` is the skill name from the brief (kebab-case) and `{version}` is the semver version from the brief (with build metadata stripped per `knowledge/version-paths.md`).
|
|
69
71
|
|
|
70
72
|
If directories already exist, do not error — proceed with file writing (overwrites existing files).
|
|
71
73
|
|
|
72
|
-
### 2. Write Deliverables to {
|
|
74
|
+
### 2. Write Deliverables to {skill_package}
|
|
73
75
|
|
|
74
76
|
Write these 4 files from the compiled content:
|
|
75
77
|
|
|
76
|
-
**File 1:** `{
|
|
78
|
+
**File 1:** `{skill_package}/SKILL.md`
|
|
77
79
|
- The complete compiled skill document
|
|
78
80
|
- agentskills.io-compliant format with all sections
|
|
79
81
|
- [MANUAL] markers seeded
|
|
80
82
|
|
|
81
|
-
**File 2:** `{
|
|
83
|
+
**File 2:** `{skill_package}/context-snippet.md`
|
|
82
84
|
- Compressed 2-line format for CLAUDE.md integration
|
|
83
85
|
|
|
84
|
-
**File 3:** `{
|
|
86
|
+
**File 3:** `{skill_package}/metadata.json`
|
|
85
87
|
- Machine-readable birth certificate with stats and provenance
|
|
86
88
|
|
|
87
|
-
**File 4:** `{
|
|
89
|
+
**File 4:** `{skill_package}/references/*.md`
|
|
88
90
|
- One file per function group or type
|
|
89
91
|
- Progressive disclosure detail files
|
|
90
92
|
|
|
91
|
-
**Files 4b (conditional):** `{
|
|
93
|
+
**Files 4b (conditional):** `{skill_package}/scripts/*`
|
|
92
94
|
- One file per detected script, copied from source with content preserved
|
|
93
95
|
- Only created when `scripts_inventory` is non-empty
|
|
94
96
|
|
|
95
|
-
**Files 4c (conditional):** `{
|
|
97
|
+
**Files 4c (conditional):** `{skill_package}/assets/*`
|
|
96
98
|
- One file per detected asset, copied from source with content preserved
|
|
97
99
|
- Only created when `assets_inventory` is non-empty
|
|
98
100
|
|
|
99
|
-
### 3. Write Workspace Artifacts to {
|
|
101
|
+
### 3. Write Workspace Artifacts to {forge_version}
|
|
100
102
|
|
|
101
103
|
Write these 3 files from the compiled content:
|
|
102
104
|
|
|
103
|
-
**File 5:** `{
|
|
105
|
+
**File 5:** `{forge_version}/provenance-map.json`
|
|
104
106
|
- Per-claim source map with AST bindings and confidence tiers
|
|
105
107
|
|
|
106
|
-
**File 6:** `{
|
|
108
|
+
**File 6:** `{forge_version}/evidence-report.md`
|
|
107
109
|
- Build artifact with extraction summary, validation results, warnings
|
|
108
110
|
|
|
109
|
-
**File 7:** `{
|
|
111
|
+
**File 7:** `{forge_version}/extraction-rules.yaml`
|
|
110
112
|
- Language and ast-grep schema used for this extraction (for reproducibility)
|
|
111
113
|
|
|
112
|
-
### 4.
|
|
114
|
+
### 4. Create Active Symlink
|
|
115
|
+
|
|
116
|
+
Create or update the `active` symlink at `{skill_group}/active` pointing to `{version}`:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
{skill_group}/active -> {version}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
If the symlink already exists, remove it first and recreate. This ensures `{skill_group}/active/{name}/` resolves to the just-written skill package.
|
|
123
|
+
|
|
124
|
+
### 5. Verify Write Completion
|
|
113
125
|
|
|
114
126
|
After all files are written, verify:
|
|
115
127
|
- 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
|
|
128
|
+
- The `active` symlink at `{skill_group}/active` resolves to `{version}`
|
|
116
129
|
- Store `ref_count` = count of files written to `references/` for use in step-08 report
|
|
117
130
|
- List each file with its path and size
|
|
118
131
|
|
|
@@ -124,7 +137,7 @@ Display brief confirmation:
|
|
|
124
137
|
|
|
125
138
|
"**Artifacts generated.**
|
|
126
139
|
|
|
127
|
-
**Deliverables ({
|
|
140
|
+
**Deliverables ({skill_package}):**
|
|
128
141
|
- SKILL.md
|
|
129
142
|
- context-snippet.md
|
|
130
143
|
- metadata.json
|
|
@@ -132,14 +145,16 @@ Display brief confirmation:
|
|
|
132
145
|
{if assets: - assets/ ({assets_count} files)}
|
|
133
146
|
- references/ ({reference_count} files)
|
|
134
147
|
|
|
135
|
-
**Workspace ({
|
|
148
|
+
**Workspace ({forge_version}):**
|
|
136
149
|
- provenance-map.json
|
|
137
150
|
- evidence-report.md
|
|
138
151
|
- extraction-rules.yaml
|
|
139
152
|
|
|
153
|
+
**Symlink:** {skill_group}/active -> {version}
|
|
154
|
+
|
|
140
155
|
Proceeding to compilation report..."
|
|
141
156
|
|
|
142
|
-
###
|
|
157
|
+
### 6. QMD Collection Registration (Deep Tier Only)
|
|
143
158
|
|
|
144
159
|
**IF forge tier is Deep AND QMD tool is available:**
|
|
145
160
|
|
|
@@ -148,7 +163,7 @@ Index the generated skill artifacts into a QMD collection so that audit-skill an
|
|
|
148
163
|
**Collection creation:** Create (or replace) a QMD collection from the skill artifacts:
|
|
149
164
|
```bash
|
|
150
165
|
qmd collection remove {name}-extraction 2>/dev/null # no-op if new
|
|
151
|
-
qmd collection add {
|
|
166
|
+
qmd collection add {skill_package} --name {name}-extraction --mask "**/*"
|
|
152
167
|
qmd embed # generates vector embeddings for vector_search/deep_search
|
|
153
168
|
```
|
|
154
169
|
|
|
@@ -174,7 +189,7 @@ Write the updated forge-tier.yaml.
|
|
|
174
189
|
|
|
175
190
|
**IF forge tier is NOT Deep:** Skip this section silently. No messaging.
|
|
176
191
|
|
|
177
|
-
###
|
|
192
|
+
### 6b. CCC Index Registry Registration (Forge+ and Deep with ccc)
|
|
178
193
|
|
|
179
194
|
**IF `tools.ccc` is true in forge-tier.yaml (Forge+ or Deep with ccc available):**
|
|
180
195
|
|
|
@@ -204,7 +219,7 @@ Write the updated forge-tier.yaml.
|
|
|
204
219
|
|
|
205
220
|
**IF `tools.ccc` is false:** Skip this section silently.
|
|
206
221
|
|
|
207
|
-
###
|
|
222
|
+
### 7. Menu Handling Logic
|
|
208
223
|
|
|
209
224
|
**Auto-proceed step — no user interaction.**
|
|
210
225
|
|
|
@@ -220,7 +235,7 @@ After all artifacts are written, verified, and optionally indexed into QMD, imme
|
|
|
220
235
|
|
|
221
236
|
## CRITICAL STEP COMPLETION NOTE
|
|
222
237
|
|
|
223
|
-
ONLY WHEN all 7 artifact files are written and
|
|
238
|
+
ONLY WHEN all 7 artifact files are written, the active symlink is created, and verification is complete will you proceed to load `{nextStepFile}` for the compilation report.
|
|
224
239
|
|
|
225
240
|
---
|
|
226
241
|
|
|
@@ -228,10 +243,11 @@ ONLY WHEN all 7 artifact files are written and verified will you proceed to load
|
|
|
228
243
|
|
|
229
244
|
### ✅ SUCCESS:
|
|
230
245
|
|
|
231
|
-
- Directory structure created ({
|
|
232
|
-
- All 4 deliverable files written to {
|
|
233
|
-
- All 3 workspace artifact files written to {
|
|
234
|
-
-
|
|
246
|
+
- Directory structure created ({skill_group}, {skill_package}, {forge_version})
|
|
247
|
+
- All 4 deliverable files written to {skill_package}
|
|
248
|
+
- All 3 workspace artifact files written to {forge_version}
|
|
249
|
+
- Active symlink created at {skill_group}/active -> {version}
|
|
250
|
+
- Write completion verified — all 7 files exist and symlink resolves
|
|
235
251
|
- Deep tier: QMD collection `{name}-extraction` created/updated and registered in forge-tier.yaml
|
|
236
252
|
- Non-Deep tier: QMD indexing skipped silently
|
|
237
253
|
- Brief confirmation displayed with file list
|
|
@@ -246,4 +262,4 @@ ONLY WHEN all 7 artifact files are written and verified will you proceed to load
|
|
|
246
262
|
- Not verifying all files were written
|
|
247
263
|
- Failing the workflow due to QMD indexing errors (should degrade gracefully)
|
|
248
264
|
|
|
249
|
-
**Master Rule:** This step writes artifacts and registers QMD collections. All content was compiled and validated in previous steps. Write faithfully, verify completely. QMD indexing failures never block the workflow.
|
|
265
|
+
**Master Rule:** This step writes artifacts, creates the active symlink, and registers QMD collections. All content was compiled and validated in previous steps. Write faithfully, verify completely. QMD indexing failures never block the workflow.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-08-report'
|
|
3
3
|
description: 'Display compilation summary with confidence tiers, suggest next steps'
|
|
4
|
+
nextStepFile: '../../shared/health-check.md'
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Step 8: Report
|
|
@@ -77,13 +78,14 @@ Where `{primary_confidence}` is the predominant confidence tier (T1 if Forge/Dee
|
|
|
77
78
|
| T3 (External) | {t3_count} | Sourced from external documentation URLs |
|
|
78
79
|
|
|
79
80
|
**Output Files:**
|
|
80
|
-
- `{
|
|
81
|
-
- `{
|
|
82
|
-
- `{
|
|
83
|
-
- `{
|
|
84
|
-
- `{
|
|
85
|
-
- `{
|
|
86
|
-
- `{
|
|
81
|
+
- `{skill_package}/SKILL.md` — Active skill with trigger-based usage
|
|
82
|
+
- `{skill_package}/context-snippet.md` — Passive context snippet (used by export-skill)
|
|
83
|
+
- `{skill_package}/metadata.json` — Machine-readable birth certificate
|
|
84
|
+
- `{skill_package}/references/` — Progressive disclosure ({ref_count} files)
|
|
85
|
+
- `{forge_version}/provenance-map.json` — Source map with AST bindings
|
|
86
|
+
- `{forge_version}/evidence-report.md` — Build audit trail
|
|
87
|
+
- `{forge_version}/extraction-rules.yaml` — Reproducible extraction schema
|
|
88
|
+
- `{skill_group}/active` -> `{version}` — Symlink to current version"
|
|
87
89
|
|
|
88
90
|
### 3. Display Warnings (If Any)
|
|
89
91
|
|
|
@@ -136,17 +138,19 @@ Set `batch_active: false` in `{sidecar_path}/batch-state.yaml` to prevent stale
|
|
|
136
138
|
|
|
137
139
|
End workflow. No further steps.
|
|
138
140
|
|
|
139
|
-
### 6. Workflow
|
|
141
|
+
### 6. Workflow Health Check
|
|
140
142
|
|
|
141
|
-
|
|
143
|
+
**If not batch mode (or all batch briefs complete):**
|
|
142
144
|
|
|
143
|
-
|
|
145
|
+
Load and execute `{nextStepFile}` for workflow self-improvement check.
|
|
146
|
+
|
|
147
|
+
**If batch mode with remaining briefs:** Skip health check — loop back to step-01 for the next brief. Health check runs after the final brief in the batch.
|
|
144
148
|
|
|
145
149
|
## CRITICAL STEP COMPLETION NOTE
|
|
146
150
|
|
|
147
|
-
This
|
|
151
|
+
This step chains to the shared health check (unless batch mode loops back to step-01). After the health check completes, the create-skill workflow is fully done.
|
|
148
152
|
|
|
149
|
-
For batch mode: loop back to step-01 for remaining briefs via sidecar checkpoint.
|
|
153
|
+
For batch mode: loop back to step-01 for remaining briefs via sidecar checkpoint. Health check runs only after the last brief.
|
|
150
154
|
|
|
151
155
|
---
|
|
152
156
|
|
|
@@ -4,12 +4,18 @@ Rules for synthesizing a stack skill from pre-generated individual skills and an
|
|
|
4
4
|
|
|
5
5
|
## Skill Loading
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
Skills use version-nested directories — see [knowledge/version-paths.md](../../../knowledge/version-paths.md) for the full path templates and resolution rules.
|
|
8
|
+
|
|
9
|
+
**Version-aware skill enumeration:**
|
|
10
|
+
|
|
11
|
+
1. **Primary: Export manifest** — Read `{skills_output_folder}/.export-manifest.json`. For each entry in `exports`, resolve the active version path: `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/` — this directory must contain both `SKILL.md` and `metadata.json`.
|
|
12
|
+
2. **Fallback: `active` symlinks** — If the manifest does not exist, is empty, or a manifest entry lacks an `active_version`, scan for `{skills_output_folder}/*/active/*/SKILL.md`. Each match resolves to a skill package at `{skills_output_folder}/{skill-name}/active/{skill-name}/` (the `{active_skill}` template).
|
|
13
|
+
3. **Filter:** Skip any skill named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops
|
|
14
|
+
4. Skip any resolved skill package missing either `SKILL.md` or `metadata.json` — log a warning and skip
|
|
15
|
+
5. Load each `metadata.json` from the resolved version-aware path and extract: `name`, `language`, `confidence_tier`, `source_repo`, `exports` (count), `version`
|
|
16
|
+
6. Store the skill group directory name as `skill_dir` (the top-level name under `{skills_output_folder}`, distinct from `name` — the directory may differ from the metadata name)
|
|
17
|
+
7. Store the resolved package path as `skill_package_path` for use in later steps (extraction, integration detection)
|
|
18
|
+
8. Store loaded skills as `raw_dependencies` with `source: "existing_skill"`
|
|
13
19
|
|
|
14
20
|
## Architecture Integration Mapping
|
|
15
21
|
|
|
@@ -106,8 +106,11 @@ Check if the user provided:
|
|
|
106
106
|
|
|
107
107
|
Set `compose_mode: false` as the default.
|
|
108
108
|
|
|
109
|
+
Skills use version-nested directories — see [knowledge/version-paths.md](../../../knowledge/version-paths.md) for the full path templates and resolution rules.
|
|
110
|
+
|
|
109
111
|
- If user provides an architecture document path for composition or explicitly requests compose mode → set `compose_mode: true` and store `architecture_doc_path`
|
|
110
|
-
- If no manifest files exist in project root AND at least one
|
|
112
|
+
- If no manifest files exist in project root AND at least one skill is discoverable in `{skills_output_folder}` → suggest compose mode to the user and ask for optional architecture document path
|
|
113
|
+
- **Skill discovery (version-aware):** First, read `{skills_output_folder}/.export-manifest.json` — each entry in `exports` names a skill with an `active_version`, which resolves to `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/` containing `SKILL.md` and `metadata.json`. If the export manifest does not exist or is empty, fall back to scanning for `active` symlinks: check `{skills_output_folder}/*/active/*/SKILL.md` — each match indicates a skill whose package lives at `{skills_output_folder}/{skill-name}/active/{skill-name}/` (the `{active_skill}` template).
|
|
111
114
|
- If user accepts → set `compose_mode: true` and store `architecture_doc_path` (may be `null` if user chose not to provide one)
|
|
112
115
|
- If user declines → `compose_mode` remains `false`, continue with code-mode
|
|
113
116
|
|
|
@@ -58,17 +58,23 @@ Use the explicit dependency list directly. Store the explicit list as `raw_depen
|
|
|
58
58
|
|
|
59
59
|
**If `compose_mode` is true AND `explicit_deps` was NOT provided:**
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Discover skills in `{skills_output_folder}` using version-aware resolution — see [knowledge/version-paths.md](../../../knowledge/version-paths.md) for path templates.
|
|
62
62
|
|
|
63
|
-
**
|
|
63
|
+
**Version-aware skill enumeration:**
|
|
64
|
+
|
|
65
|
+
1. **Primary: Export manifest** — Read `{skills_output_folder}/.export-manifest.json`. For each entry in `exports`, resolve the active version path: `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/` — this directory must contain both `SKILL.md` and `metadata.json`.
|
|
66
|
+
2. **Fallback: `active` symlinks** — If the manifest does not exist, is empty, or a manifest entry lacks an `active_version`, scan for `{skills_output_folder}/*/active/*/SKILL.md`. Each match resolves to a skill package at `{skills_output_folder}/{skill-name}/active/{skill-name}/` (the `{active_skill}` template).
|
|
67
|
+
|
|
68
|
+
**Filter:** Skip any skill named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops.
|
|
64
69
|
|
|
65
70
|
**If zero skills remain after filtering:** HALT with: "**Cannot proceed in compose-mode.** No individual skills found in `{skills_output_folder}` (after filtering stack skills). Run [CS] Create Skill or [QS] Quick Skill to generate individual skills first, then re-run [SS]."
|
|
66
71
|
|
|
67
72
|
For each skill found:
|
|
68
|
-
1. Read metadata.json
|
|
73
|
+
1. Read `metadata.json` from the resolved version-aware path (`{skill_package}` or `{active_skill}`)
|
|
69
74
|
2. Extract: name, language, confidence_tier, source_repo, exports count, version
|
|
70
|
-
3. Store the
|
|
71
|
-
4. Store as `
|
|
75
|
+
3. Store the skill group directory name as `skill_dir` (the top-level name under `{skills_output_folder}`, distinct from `name` — the directory may differ from the metadata name)
|
|
76
|
+
4. Store the resolved package path as `skill_package_path` for use in later steps
|
|
77
|
+
5. Store as `raw_dependencies` with source: "existing_skill"
|
|
72
78
|
|
|
73
79
|
Display:
|
|
74
80
|
"**Loaded {N} existing skills as dependencies.**
|
|
@@ -56,7 +56,7 @@ For each confirmed dependency, extract key exports, usage patterns, and API surf
|
|
|
56
56
|
|
|
57
57
|
"**Extraction data already available from individual skills. Skipping extraction phase.**"
|
|
58
58
|
|
|
59
|
-
For each confirmed skill, load
|
|
59
|
+
For each confirmed skill, load SKILL.md from the version-aware path resolved in step-02. Use `skill_package_path` (stored in step-02) directly — this already points to the resolved `{skill_package}` or `{active_skill}` directory containing the skill's artifacts. If `skill_package_path` is not available, resolve via the `{active_skill}` template: `{skills_output_folder}/{skill_dir}/active/{skill_dir}/SKILL.md` (see [knowledge/version-paths.md](../../../knowledge/version-paths.md)). Build a `per_library_extractions[]` entry for each skill with the following fields:
|
|
60
60
|
- `library`: skill name from metadata.json
|
|
61
61
|
- `exports`: exports list extracted from the SKILL.md exports section
|
|
62
62
|
- `usage_patterns`: usage patterns from the SKILL.md usage section
|
|
@@ -81,7 +81,7 @@ All integration evidence inherits confidence tiers from the source skills. Load
|
|
|
81
81
|
**VS verdict parsing (if feasibility report exists):** Read the `overall_verdict` from the report's YAML frontmatter. Parse the `## Integration Verdicts` markdown table for per-pair verdicts. For each architecture-detected pair, include `VS overall: {verdict}` and `VS pair: {verdict}` in the integration evidence per the format in `{composeModeRules}`. VS verdicts do not apply to inferred integrations since the VS report operates on architecture-described interactions only. Additionally, flag any pairs where VS reported `Risky` or `Blocked` by appending a `[VS: Risky]` or `[VS: Blocked]` warning annotation to the integration entry.
|
|
82
82
|
|
|
83
83
|
If no architecture document available:
|
|
84
|
-
- Infer potential integrations from skills sharing the same `language` field or sharing domain keywords in their SKILL.md descriptions (use the `usage_patterns` and `exports` fields from `per_library_extractions[]` built in step-04, or reload `{skills_output_folder}/{skill_dir}/SKILL.md`
|
|
84
|
+
- Infer potential integrations from skills sharing the same `language` field or sharing domain keywords in their SKILL.md descriptions (use the `usage_patterns` and `exports` fields from `per_library_extractions[]` built in step-04, or reload SKILL.md from the version-aware path: use `skill_package_path` from step-02, or resolve via `{skills_output_folder}/{skill_dir}/active/{skill_dir}/SKILL.md` — see [knowledge/version-paths.md](../../../knowledge/version-paths.md))
|
|
85
85
|
- Mark inferred integrations: `[inferred from shared domain]` — use this suffix instead of `[composed]` for inferred integrations
|
|
86
86
|
- Inferred integrations qualify automatically — no file-count threshold applies
|
|
87
87
|
|