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
|
@@ -47,6 +47,7 @@ Write all deliverable and workspace artifact files to their target directories.
|
|
|
47
47
|
- From step 05: integration_graph for integration pair references
|
|
48
48
|
- From step 01: forge_tier, project info for metadata
|
|
49
49
|
- This step produces: written_files[] (all output artifacts)
|
|
50
|
+
- Path resolution: See `knowledge/version-paths.md` for canonical path templates. Stack skills use `{project_name}-stack` as the skill name
|
|
50
51
|
|
|
51
52
|
## MANDATORY SEQUENCE
|
|
52
53
|
|
|
@@ -54,27 +55,30 @@ Write all deliverable and workspace artifact files to their target directories.
|
|
|
54
55
|
|
|
55
56
|
### 1. Create Output Directories
|
|
56
57
|
|
|
57
|
-
Create the directory structure:
|
|
58
|
+
Resolve `{version}` from the primary library version or default to `1.0.0`. Create the directory structure:
|
|
58
59
|
|
|
59
60
|
```
|
|
60
|
-
{skills_output_folder}/{project_name}-stack/
|
|
61
|
+
{skill_group} # {skills_output_folder}/{project_name}-stack/
|
|
62
|
+
{skill_package} # {skills_output_folder}/{project_name}-stack/{version}/{project_name}-stack/
|
|
61
63
|
├── references/
|
|
62
64
|
│ └── integrations/
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
```
|
|
66
|
-
{forge_data_folder}/{project_name}-stack/
|
|
68
|
+
{forge_version} # {forge_data_folder}/{project_name}-stack/{version}/
|
|
67
69
|
```
|
|
68
70
|
|
|
71
|
+
Where the skill name is `{project_name}-stack` and `{version}` is the semver version (with build metadata stripped per `knowledge/version-paths.md`).
|
|
72
|
+
|
|
69
73
|
If directories already exist, proceed (overwrite previous output).
|
|
70
74
|
|
|
71
75
|
### 2. Write SKILL.md
|
|
72
76
|
|
|
73
|
-
Write `{
|
|
77
|
+
Write `{skill_package}/SKILL.md` with the approved skill_content from step 06.
|
|
74
78
|
|
|
75
79
|
### 3. Write Per-Library Reference Files
|
|
76
80
|
|
|
77
|
-
For each confirmed library, write `{
|
|
81
|
+
For each confirmed library, write `{skill_package}/references/{library_name}.md`:
|
|
78
82
|
|
|
79
83
|
Load structure from `{stackSkillTemplate}` references section:
|
|
80
84
|
- Library name, version from manifest (**in compose-mode**: version from source skill `metadata.json`)
|
|
@@ -85,7 +89,7 @@ Load structure from `{stackSkillTemplate}` references section:
|
|
|
85
89
|
|
|
86
90
|
### 4. Write Integration Pair Reference Files
|
|
87
91
|
|
|
88
|
-
For each detected integration pair, write `{
|
|
92
|
+
For each detected integration pair, write `{skill_package}/references/integrations/{libraryA}-{libraryB}.md`:
|
|
89
93
|
|
|
90
94
|
Load structure from `{stackSkillTemplate}` integrations section:
|
|
91
95
|
- Library pair and integration type
|
|
@@ -98,7 +102,7 @@ Load structure from `{stackSkillTemplate}` integrations section:
|
|
|
98
102
|
|
|
99
103
|
### 5. Write context-snippet.md
|
|
100
104
|
|
|
101
|
-
Write `{
|
|
105
|
+
Write `{skill_package}/context-snippet.md`:
|
|
102
106
|
|
|
103
107
|
Use the Vercel-aligned indexed format targeting ~80-120 tokens:
|
|
104
108
|
```
|
|
@@ -111,7 +115,7 @@ Use the Vercel-aligned indexed format targeting ~80-120 tokens:
|
|
|
111
115
|
|
|
112
116
|
### 6. Write metadata.json
|
|
113
117
|
|
|
114
|
-
Write `{
|
|
118
|
+
Write `{skill_package}/metadata.json`:
|
|
115
119
|
|
|
116
120
|
Populate all fields from the metadata.json schema defined in `{stackSkillTemplate}`:
|
|
117
121
|
|
|
@@ -155,7 +159,7 @@ Populate all fields from the metadata.json schema defined in `{stackSkillTemplat
|
|
|
155
159
|
|
|
156
160
|
### 7. Write Forge Data Artifacts
|
|
157
161
|
|
|
158
|
-
Write workspace artifacts to `{
|
|
162
|
+
Write workspace artifacts to `{forge_version}`:
|
|
159
163
|
|
|
160
164
|
**provenance-map.json:**
|
|
161
165
|
|
|
@@ -208,26 +212,38 @@ Write workspace artifacts to `{forge_data_folder}/{project_name}-stack/`:
|
|
|
208
212
|
- Warnings and failures encountered
|
|
209
213
|
- Confidence tier distribution
|
|
210
214
|
|
|
211
|
-
### 8.
|
|
215
|
+
### 8. Create Active Symlink
|
|
216
|
+
|
|
217
|
+
Create or update the `active` symlink at `{skill_group}/active` pointing to `{version}`:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
{skill_group}/active -> {version}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
If the symlink already exists, remove it first and recreate. This ensures `{skill_group}/active/{project_name}-stack/` resolves to the just-written skill package.
|
|
224
|
+
|
|
225
|
+
### 9. Display Write Summary
|
|
212
226
|
|
|
213
227
|
"**Output files written.**
|
|
214
228
|
|
|
215
|
-
**Deliverables** ({
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
229
|
+
**Deliverables** ({skill_package}):
|
|
230
|
+
- SKILL.md ({line_count} lines)
|
|
231
|
+
- context-snippet.md ({token_estimate} tokens)
|
|
232
|
+
- metadata.json
|
|
233
|
+
- references/ -- {lib_count} library files
|
|
234
|
+
- references/integrations/ -- {pair_count} integration files
|
|
235
|
+
|
|
236
|
+
**Workspace** ({forge_version}):
|
|
237
|
+
- provenance-map.json
|
|
238
|
+
- evidence-report.md
|
|
221
239
|
|
|
222
|
-
**
|
|
223
|
-
- ✓ provenance-map.json
|
|
224
|
-
- ✓ evidence-report.md
|
|
240
|
+
**Symlink:** {skill_group}/active -> {version}
|
|
225
241
|
|
|
226
242
|
**Total files written:** {total_count}
|
|
227
243
|
|
|
228
244
|
**Proceeding to validation...**"
|
|
229
245
|
|
|
230
|
-
###
|
|
246
|
+
### 10. Auto-Proceed to Next Step
|
|
231
247
|
|
|
232
248
|
Load, read the full file and then execute `{nextStepFile}`.
|
|
233
249
|
|
|
@@ -237,9 +253,10 @@ Load, read the full file and then execute `{nextStepFile}`.
|
|
|
237
253
|
|
|
238
254
|
### ✅ SUCCESS:
|
|
239
255
|
|
|
240
|
-
- All deliverable files written to
|
|
241
|
-
- All workspace artifacts written to
|
|
242
|
-
- Directory structure created correctly
|
|
256
|
+
- All deliverable files written to {skill_package}
|
|
257
|
+
- All workspace artifacts written to {forge_version}
|
|
258
|
+
- Directory structure created correctly with version nesting
|
|
259
|
+
- Active symlink created at {skill_group}/active -> {version}
|
|
243
260
|
- Each file matches its template structure
|
|
244
261
|
- Write summary displayed with accurate counts
|
|
245
262
|
|
|
@@ -55,17 +55,20 @@ Validate all written output files against their expected structure and verify co
|
|
|
55
55
|
|
|
56
56
|
Check that all expected files exist from written_files[]:
|
|
57
57
|
|
|
58
|
-
**Deliverables** (`{
|
|
58
|
+
**Deliverables** (`{skill_package}`):
|
|
59
59
|
- [ ] SKILL.md
|
|
60
60
|
- [ ] context-snippet.md
|
|
61
61
|
- [ ] metadata.json
|
|
62
62
|
- [ ] references/ directory with per-library files
|
|
63
63
|
- [ ] references/integrations/ directory with pair files (if integrations detected)
|
|
64
64
|
|
|
65
|
-
**Workspace** (`{
|
|
65
|
+
**Workspace** (`{forge_version}`):
|
|
66
66
|
- [ ] provenance-map.json
|
|
67
67
|
- [ ] evidence-report.md
|
|
68
68
|
|
|
69
|
+
**Symlink:**
|
|
70
|
+
- [ ] `{skill_group}/active` exists and resolves to `{version}`
|
|
71
|
+
|
|
69
72
|
Record any missing files as **ERROR** findings.
|
|
70
73
|
|
|
71
74
|
### 2. Check Tool Availability
|
|
@@ -140,7 +143,7 @@ Record missing tier labels as **WARNING** findings.
|
|
|
140
143
|
### 8. Validate context-snippet.md
|
|
141
144
|
|
|
142
145
|
Verify context-snippet.md follows Vercel-aligned indexed format:
|
|
143
|
-
- [ ] First line matches: `[{project}-stack v{version}]|root:
|
|
146
|
+
- [ ] First line matches: `[{project}-stack v{version}]|root: {prefix}{project}-stack/` where prefix is `skills/` or a platform root (`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`)
|
|
144
147
|
- [ ] Second line starts with `|IMPORTANT:`
|
|
145
148
|
- [ ] Stack and integrations lines present
|
|
146
149
|
- [ ] Approximate token count is ~80-120 tokens
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-09-report'
|
|
3
3
|
description: 'Display final stack skill summary with confidence distribution and next workflow recommendations'
|
|
4
|
+
nextStepFile: '../../shared/health-check.md'
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Step 9: Stack Skill Report
|
|
@@ -25,7 +26,7 @@ Display the final summary of the forged stack skill with confidence distribution
|
|
|
25
26
|
|
|
26
27
|
### Step-Specific Rules:
|
|
27
28
|
|
|
28
|
-
- 🎯
|
|
29
|
+
- 🎯 Chains to shared health check via `{nextStepFile}` — no further steps after that
|
|
29
30
|
- 🚫 FORBIDDEN to write or modify any files — report is console output only
|
|
30
31
|
- 💬 Lead with the positive summary, then details, then warnings if any
|
|
31
32
|
- 🎯 Recommend next workflows based on what was produced
|
|
@@ -74,16 +75,18 @@ Forge tier: **{tier}**"
|
|
|
74
75
|
|
|
75
76
|
"**Output files:**
|
|
76
77
|
|
|
77
|
-
**Deliverables** (`{
|
|
78
|
+
**Deliverables** (`{skill_package}`):
|
|
78
79
|
- SKILL.md — Integration patterns, library summaries, conventions
|
|
79
80
|
- context-snippet.md — Compressed stack index ({token_estimate} tokens)
|
|
80
81
|
- metadata.json — Skill metadata and library registry
|
|
81
82
|
- references/ — {lib_count} per-library reference files
|
|
82
83
|
{If integrations:} - references/integrations/ — {pair_count} integration pair files
|
|
83
84
|
|
|
84
|
-
**Workspace** (`{
|
|
85
|
+
**Workspace** (`{forge_version}`):
|
|
85
86
|
- provenance-map.json — Extraction source tracking
|
|
86
|
-
- evidence-report.md — Evidence and confidence breakdown
|
|
87
|
+
- evidence-report.md — Evidence and confidence breakdown
|
|
88
|
+
|
|
89
|
+
**Symlink:** `{skill_group}/active` -> `{version}`"
|
|
87
90
|
|
|
88
91
|
### 4. Display Validation Summary
|
|
89
92
|
|
|
@@ -117,6 +120,10 @@ Forge tier: **{tier}**"
|
|
|
117
120
|
|
|
118
121
|
**Workflow complete.**"
|
|
119
122
|
|
|
123
|
+
### 7. Workflow Health Check
|
|
124
|
+
|
|
125
|
+
Load and execute `{nextStepFile}` for workflow self-improvement check.
|
|
126
|
+
|
|
120
127
|
---
|
|
121
128
|
|
|
122
129
|
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-01-select'
|
|
3
|
+
description: 'Select skill, version(s), and drop mode (deprecate/purge)'
|
|
4
|
+
nextStepFile: './step-02-execute.md'
|
|
5
|
+
versionPathsKnowledge: '../../../knowledge/version-paths.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 1: Select Drop Target
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
Identify exactly what the user wants to drop — which skill, which version(s), and whether the drop is a soft deprecation (manifest-only) or a hard purge (files deleted). Enforce the active version guard, gather the list of affected directories, and obtain explicit user confirmation before any write or delete operation is scheduled.
|
|
13
|
+
|
|
14
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
|
+
|
|
16
|
+
### Universal Rules:
|
|
17
|
+
|
|
18
|
+
- 🛑 NEVER schedule a destructive operation without explicit user confirmation
|
|
19
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
21
|
+
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
22
|
+
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or 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 Ferris in Management mode — a destructive operation specialist
|
|
28
|
+
- ✅ Safety first, confirmation required
|
|
29
|
+
- ✅ You protect the active version and enforce the active version guard
|
|
30
|
+
- ✅ You treat every drop as potentially irreversible — soft drops are recoverable, hard drops are not
|
|
31
|
+
|
|
32
|
+
### Step-Specific Rules:
|
|
33
|
+
|
|
34
|
+
- 🎯 Focus only on selection, validation, and confirmation
|
|
35
|
+
- 🚫 FORBIDDEN to proceed without explicit user confirmation at the final gate
|
|
36
|
+
- 🚫 FORBIDDEN to modify the manifest or delete any files in this step — execution happens in step-02
|
|
37
|
+
- 🚫 FORBIDDEN to drop an active version when other non-deprecated versions exist
|
|
38
|
+
- 💬 Present selections clearly so the user can verify scope, mode, and blast radius before committing
|
|
39
|
+
|
|
40
|
+
## EXECUTION PROTOCOLS:
|
|
41
|
+
|
|
42
|
+
- 🎯 Load version-paths knowledge and the export manifest (if present) alongside an on-disk skill scan
|
|
43
|
+
- 💾 Gather all selection decisions into context for step-02
|
|
44
|
+
- 📖 Show version lists, statuses, and directory paths clearly so the user understands what will be affected
|
|
45
|
+
- 🚫 Halt only if neither the manifest nor an on-disk scan yields any skill — a missing manifest is not fatal for purge mode because draft skills (created but never exported) can still be legitimately hard-dropped from disk
|
|
46
|
+
|
|
47
|
+
## CONTEXT BOUNDARIES:
|
|
48
|
+
|
|
49
|
+
- Available: Export manifest v2, SKF module config variables, on-disk skill directory listing
|
|
50
|
+
- Focus: Selection, validation, and user confirmation
|
|
51
|
+
- Limits: Do not write to the manifest, do not delete any files — execution is deferred to step-02
|
|
52
|
+
- Dependencies: At least one skill must exist in either the export manifest or on disk under `{skills_output_folder}/`; otherwise the workflow halts. Draft skills (on disk but not in the manifest) are eligible for purge mode only
|
|
53
|
+
|
|
54
|
+
## MANDATORY SEQUENCE
|
|
55
|
+
|
|
56
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
57
|
+
|
|
58
|
+
### 1. Load Knowledge
|
|
59
|
+
|
|
60
|
+
Read `{versionPathsKnowledge}` completely and extract:
|
|
61
|
+
|
|
62
|
+
- Path templates: `{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}`
|
|
63
|
+
- Export manifest v2 schema (`schema_version`, `exports`, `active_version`, `versions` map, `status` field values)
|
|
64
|
+
- Skill management operations (Drop section — soft vs hard, active version guard, skill-level drop)
|
|
65
|
+
|
|
66
|
+
You will use these templates and rules to build directory paths and enforce safety guards in the following sections.
|
|
67
|
+
|
|
68
|
+
### 2. Read Export Manifest
|
|
69
|
+
|
|
70
|
+
Load `{skills_output_folder}/.export-manifest.json` if it exists.
|
|
71
|
+
|
|
72
|
+
**If the file is missing, empty, or contains no `exports` entries:** Treat as an empty manifest — proceed to section 3 and rely on the on-disk directory scan. Draft skills (created by `[CS]`/`[QS]`/`[SS]` but never exported) can still be hard-dropped in purge mode. Store `manifest_exists = false` so section 8 (Ask Mode) can restrict the options to purge only. Soft-deprecate is meaningless without a manifest to record the deprecation against.
|
|
73
|
+
|
|
74
|
+
**If the file exists with entries:** Parse JSON and verify `schema_version` is `"2"`. If the manifest is v1 (no `schema_version` field), note this but continue — treat every entry as having a single active version derived from its current state. Store `manifest_exists = true`.
|
|
75
|
+
|
|
76
|
+
**Hard halt condition:** If the file exists but is malformed (not valid JSON), halt with: "**Export manifest is corrupt** at `{skills_output_folder}/.export-manifest.json` — fix or remove the file before dropping."
|
|
77
|
+
|
|
78
|
+
### 3. List Available Skills
|
|
79
|
+
|
|
80
|
+
Build and display a summary of every skill available to drop. Start with the manifest (if any), then augment with an on-disk scan.
|
|
81
|
+
|
|
82
|
+
For each skill in the manifest's `exports` (only if `manifest_exists = true` and entries exist):
|
|
83
|
+
|
|
84
|
+
1. Read `active_version` from the manifest entry
|
|
85
|
+
2. List every entry in the skill's `versions` map with its `status` field
|
|
86
|
+
3. Mark the active version with a trailing `*`
|
|
87
|
+
4. Sort versions in descending order (newest first) where possible
|
|
88
|
+
|
|
89
|
+
Also scan `{skills_output_folder}/` for any top-level directories that are NOT present in the manifest's `exports` object. Record these as "(not in manifest)" — they represent draft or orphaned skills eligible for purge mode only. When the manifest is missing or empty, every on-disk skill appears in this category.
|
|
90
|
+
|
|
91
|
+
**If the combined list is empty** (no manifest entries AND no on-disk skill directories): halt with "**Drop Skill — nothing to drop.** No skills found in `{skills_output_folder}/` and no entries in `.export-manifest.json`. Run `[CS] Create Skill` first."
|
|
92
|
+
|
|
93
|
+
Display the combined list:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
**Drop Skill — select target**
|
|
97
|
+
|
|
98
|
+
Available skills:
|
|
99
|
+
1. cognee
|
|
100
|
+
- 0.1.0 (deprecated)
|
|
101
|
+
- 0.5.0 (archived)
|
|
102
|
+
- 0.6.0 (active) *
|
|
103
|
+
2. express
|
|
104
|
+
- 4.18.0 (active) *
|
|
105
|
+
3. legacy-helper (not in manifest — purge only)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 4. Ask Which Skill
|
|
109
|
+
|
|
110
|
+
"**Which skill would you like to drop?**
|
|
111
|
+
Enter the skill name or its number from the list above."
|
|
112
|
+
|
|
113
|
+
Wait for user input. Accept either the numeric index or the skill name (exact match).
|
|
114
|
+
|
|
115
|
+
**If the user's input does not match any listed skill:** Re-display the list and ask again.
|
|
116
|
+
|
|
117
|
+
Store the selection as `target_skill`. Also store `target_in_manifest = true` if the selected skill has an entry in the manifest, `false` otherwise — subsequent sections use this flag to restrict the available drop options.
|
|
118
|
+
|
|
119
|
+
### 5. Display Version Details
|
|
120
|
+
|
|
121
|
+
**If `target_in_manifest = true`**, display every version with its full metadata from the manifest:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
**{target_skill} — versions:**
|
|
125
|
+
|
|
126
|
+
| Version | Status | Last Exported | Platforms |
|
|
127
|
+
|---------|------------|---------------|------------------------|
|
|
128
|
+
| 0.1.0 | deprecated | 2026-01-15 | claude |
|
|
129
|
+
| 0.5.0 | archived | 2026-03-15 | claude |
|
|
130
|
+
| 0.6.0 | active * | 2026-04-04 | claude, copilot |
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**If `target_in_manifest = false`** (draft skill discovered only by on-disk scan), display the on-disk version directories instead and note the constraint:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
**{target_skill} — on-disk versions (not in manifest):**
|
|
137
|
+
|
|
138
|
+
{list version subdirectories found under {skills_output_folder}/{target_skill}/, or "(flat layout)" if no version nesting is present}
|
|
139
|
+
|
|
140
|
+
**Note:** This skill has no manifest entry, so soft-deprecate is not available. Only a skill-level hard purge can be performed — the drop will delete the entire on-disk skill group and forge group.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 6. Ask Scope
|
|
144
|
+
|
|
145
|
+
**If `target_in_manifest = false`:** Skip this prompt — draft skills can only be dropped as a whole. Set `target_versions = "all"` and `is_skill_level = true`, then proceed to section 7.
|
|
146
|
+
|
|
147
|
+
**If `target_in_manifest = true`:**
|
|
148
|
+
|
|
149
|
+
"**Drop which version(s)?**
|
|
150
|
+
|
|
151
|
+
- **[N]** Specific version — soft deprecate or hard purge a single version
|
|
152
|
+
- **[A]** All versions — drops the entire skill (skill-level operation)"
|
|
153
|
+
|
|
154
|
+
Wait for user selection.
|
|
155
|
+
|
|
156
|
+
**If [N] Specific version:**
|
|
157
|
+
|
|
158
|
+
"**Which version?** Enter the version string (e.g. `0.5.0`)."
|
|
159
|
+
|
|
160
|
+
Wait for user input. Validate that the version exists in the manifest's `versions` map for `target_skill`. If not, repeat the prompt.
|
|
161
|
+
|
|
162
|
+
Set `target_versions = [<selected version>]` and `is_skill_level = false`.
|
|
163
|
+
|
|
164
|
+
**If [A] All versions:**
|
|
165
|
+
|
|
166
|
+
Set `target_versions = "all"` and `is_skill_level = true`.
|
|
167
|
+
|
|
168
|
+
### 7. Active Version Guard
|
|
169
|
+
|
|
170
|
+
**Does not apply when `target_in_manifest = false`:** A draft skill has no manifest-recorded active version, so the guard is a no-op. Proceed to section 8.
|
|
171
|
+
|
|
172
|
+
**Applies only when `target_in_manifest = true` AND `is_skill_level = false` (specific version selected):**
|
|
173
|
+
|
|
174
|
+
1. Read the selected version's `status` field from the manifest
|
|
175
|
+
2. If `status != "active"` → skip this guard, the version is safe to drop
|
|
176
|
+
3. If `status == "active"`:
|
|
177
|
+
a. Count the number of OTHER versions in the `versions` map with `status != "deprecated"` (i.e., `active`, `archived`, or `draft`)
|
|
178
|
+
b. If that count is `> 0` → REFUSE the drop:
|
|
179
|
+
|
|
180
|
+
"**Cannot drop the active version `{version}`.**
|
|
181
|
+
Other non-deprecated versions of `{target_skill}` still exist. To proceed, either:
|
|
182
|
+
|
|
183
|
+
**(a)** Switch the active version to another version first by re-running `[EX] Export Skill` with a different version selected, then return here to drop `{version}`, OR
|
|
184
|
+
|
|
185
|
+
**(b)** Use the `[A] All versions` option to drop every version of `{target_skill}` at once."
|
|
186
|
+
|
|
187
|
+
HALT the workflow. Do not proceed.
|
|
188
|
+
|
|
189
|
+
c. If the count is `0` → the active version is the ONLY version; allow the drop to continue (it is functionally equivalent to a skill-level drop on a single-version skill)
|
|
190
|
+
|
|
191
|
+
### 8. Ask Mode
|
|
192
|
+
|
|
193
|
+
**If `target_in_manifest = false`:** Skip this prompt — soft-deprecate is meaningless without a manifest entry to mark. Force `drop_mode = "purge"` and inform the user: "**Mode forced to purge** — `{target_skill}` has no manifest entry, so there is nothing to deprecate. The skill's on-disk directories will be deleted."
|
|
194
|
+
|
|
195
|
+
**If `target_in_manifest = true`:**
|
|
196
|
+
|
|
197
|
+
"**How should this be dropped?**
|
|
198
|
+
|
|
199
|
+
- **[D]** Deprecate (soft) — Mark the version as `deprecated` in the manifest. Files remain on disk. Export-skill will exclude it from all platform context files. Reversible by editing the manifest.
|
|
200
|
+
- **[P]** Purge (hard) — Deprecate AND delete files from disk (`{skill_package}` and `{forge_version}`, or full `{skill_group}` and `{forge_group}` for a skill-level drop). **Irreversible.**"
|
|
201
|
+
|
|
202
|
+
Wait for user selection.
|
|
203
|
+
|
|
204
|
+
Set `drop_mode` to `"deprecate"` (on D) or `"purge"` (on P).
|
|
205
|
+
|
|
206
|
+
### 9. Compute Affected Directories
|
|
207
|
+
|
|
208
|
+
Using the templates from `{versionPathsKnowledge}`, resolve the list of directories that would be affected:
|
|
209
|
+
|
|
210
|
+
**If `is_skill_level = false` (version-level drop):**
|
|
211
|
+
|
|
212
|
+
- `{skill_package}` = `{skills_output_folder}/{target_skill}/{version}/{target_skill}/`
|
|
213
|
+
- The enclosing version directory = `{skills_output_folder}/{target_skill}/{version}/`
|
|
214
|
+
- `{forge_version}` = `{forge_data_folder}/{target_skill}/{version}/`
|
|
215
|
+
|
|
216
|
+
**If `is_skill_level = true` (skill-level drop):**
|
|
217
|
+
|
|
218
|
+
- `{skill_group}` = `{skills_output_folder}/{target_skill}/`
|
|
219
|
+
- `{forge_group}` = `{forge_data_folder}/{target_skill}/`
|
|
220
|
+
|
|
221
|
+
Store the list as `affected_directories`.
|
|
222
|
+
|
|
223
|
+
If `drop_mode == "deprecate"`, record the list but present it as "retained" in the confirmation output — no deletion will occur.
|
|
224
|
+
|
|
225
|
+
### 10. Confirmation Gate
|
|
226
|
+
|
|
227
|
+
Display the full operation summary:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
**About to drop:**
|
|
231
|
+
|
|
232
|
+
Skill: {target_skill}
|
|
233
|
+
Version: {version or "ALL versions"}
|
|
234
|
+
Mode: {Deprecate (soft) | Purge (hard)}
|
|
235
|
+
Files:
|
|
236
|
+
{for each path in affected_directories, list one per line}
|
|
237
|
+
{or "(retained on disk — soft drop)" if drop_mode == "deprecate"}
|
|
238
|
+
|
|
239
|
+
{if drop_mode == "purge":}
|
|
240
|
+
⚠️ This operation cannot be undone. Files will be permanently deleted.
|
|
241
|
+
{else:}
|
|
242
|
+
Files remain on disk. Reversible by manually editing the manifest.
|
|
243
|
+
|
|
244
|
+
Proceed? [Y/N]
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Wait for explicit user response.
|
|
248
|
+
|
|
249
|
+
- **If `Y`** → proceed to section 11
|
|
250
|
+
- **If `N`** → "**Cancelled.** No changes were made." HALT the workflow
|
|
251
|
+
- **Any other input** → re-display the confirmation and ask again
|
|
252
|
+
|
|
253
|
+
### 11. Store Decisions in Context
|
|
254
|
+
|
|
255
|
+
Store the following decisions in workflow context for step-02:
|
|
256
|
+
|
|
257
|
+
- `target_skill` — the skill name
|
|
258
|
+
- `target_in_manifest` — boolean (true if the skill has a manifest entry, false if it was discovered only by on-disk scan)
|
|
259
|
+
- `target_versions` — list of version strings (`[<version>]`) or the literal string `"all"`
|
|
260
|
+
- `drop_mode` — `"deprecate"` or `"purge"` (always `"purge"` when `target_in_manifest = false`)
|
|
261
|
+
- `is_skill_level` — boolean (true if all versions; always true when `target_in_manifest = false`)
|
|
262
|
+
- `affected_directories` — list of absolute directory paths that step-02 will delete in purge mode (or retain in deprecate mode)
|
|
263
|
+
|
|
264
|
+
### 12. Load Next Step
|
|
265
|
+
|
|
266
|
+
Load, read the full file, and then execute `{nextStepFile}`.
|
|
267
|
+
|
|
268
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
269
|
+
|
|
270
|
+
ONLY WHEN the user has confirmed with `Y` at the confirmation gate AND all selection decisions have been stored in context, will you then load and read fully `{nextStepFile}` to execute the drop.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
275
|
+
|
|
276
|
+
### ✅ SUCCESS:
|
|
277
|
+
|
|
278
|
+
- Version-paths knowledge loaded and applied via templates (no hardcoded paths)
|
|
279
|
+
- Export manifest read if present; on-disk scan augments the list; halt only if both are empty
|
|
280
|
+
- Complete skill and version list displayed with statuses, active marker, and on-disk-only entries flagged "(not in manifest — purge only)"
|
|
281
|
+
- Skill, version(s), and mode selected by explicit user input; mode forced to purge for not-in-manifest skills
|
|
282
|
+
- Active version guard enforced for manifest-tracked skills — refused to drop an active version with surviving non-deprecated peers
|
|
283
|
+
- Affected directories computed from templates
|
|
284
|
+
- Explicit user confirmation (`Y`) received at the confirmation gate
|
|
285
|
+
- All selection decisions stored in context for step-02 (including `target_in_manifest`)
|
|
286
|
+
|
|
287
|
+
### ❌ SYSTEM FAILURE:
|
|
288
|
+
|
|
289
|
+
- Proceeding without reading version-paths knowledge
|
|
290
|
+
- Halting when the manifest is missing but on-disk skills exist — the fallback scan MUST be attempted before any "nothing to drop" halt
|
|
291
|
+
- Offering soft-deprecate for a skill that has no manifest entry
|
|
292
|
+
- Hardcoding directory paths instead of using `{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}` templates
|
|
293
|
+
- Allowing a drop of the active version when other non-deprecated versions exist
|
|
294
|
+
- Modifying the manifest or deleting files in this step (execution belongs to step-02)
|
|
295
|
+
- Skipping the confirmation gate or proceeding on any response other than `Y`
|
|
296
|
+
- Not storing decisions in context for step-02
|
|
297
|
+
|
|
298
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. No destructive action proceeds without explicit user confirmation.
|