bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.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/.claude-plugin/marketplace.json +39 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +185 -0
- package/docs/STABILITY.md +123 -0
- package/docs/_data/pinned.yaml +98 -0
- package/docs/agents.md +16 -11
- package/docs/architecture.md +221 -0
- package/docs/bmad-synergy.md +11 -13
- package/docs/concepts.md +18 -108
- package/docs/examples.md +121 -80
- package/docs/getting-started.md +85 -147
- package/docs/how-it-works.md +25 -536
- package/docs/index.md +44 -27
- package/docs/skill-model.md +328 -0
- package/docs/troubleshooting.md +39 -0
- package/docs/verifying-a-skill.md +232 -0
- package/docs/why-skf.md +93 -0
- package/docs/workflows.md +119 -13
- package/package.json +25 -4
- package/src/README.md +23 -25
- package/src/forger/forge-tier.yaml +4 -2
- package/src/forger/preferences.yaml +7 -1
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +1 -1
- package/src/knowledge/ccc-bridge.md +16 -15
- package/src/knowledge/overview.md +11 -11
- package/src/knowledge/progressive-capability.md +3 -3
- package/src/knowledge/provenance-tracking.md +9 -3
- package/src/knowledge/qmd-registry.md +8 -8
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +16 -1
- package/src/knowledge/split-body-strategy.md +1 -1
- package/src/knowledge/version-paths.md +17 -12
- package/src/module-help.csv +18 -17
- package/src/module.yaml +4 -0
- package/src/shared/health-check.md +372 -0
- package/src/shared/references/feasibility-report-schema.md +86 -0
- package/src/shared/references/headless-gate-convention.md +62 -0
- package/src/shared/references/output-contract-schema.md +35 -0
- package/src/shared/references/pipeline-contracts.md +102 -0
- package/src/shared/scripts/skf-atomic-write.py +370 -0
- package/src/shared/scripts/skf-manifest-ops.py +236 -0
- package/src/shared/scripts/skf-preflight.py +164 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
- package/src/shared/scripts/skf-severity-classify.py +163 -0
- package/src/shared/scripts/skf-skill-inventory.py +210 -0
- package/src/shared/scripts/skf-structural-diff.py +257 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
- package/src/shared/scripts/skf-validate-output.py +247 -0
- package/src/skf-analyze-source/SKILL.md +57 -0
- package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
- package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
- package/src/skf-audit-skill/SKILL.md +59 -0
- package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
- package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
- package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-brief-skill/SKILL.md +53 -0
- package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
- package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
- package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
- package/src/skf-create-skill/SKILL.md +63 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
- package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
- package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
- package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
- package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
- package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
- package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
- package/src/skf-create-stack-skill/SKILL.md +64 -0
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
- package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
- package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
- package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
- package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
- package/src/skf-drop-skill/SKILL.md +57 -0
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
- package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-export-skill/SKILL.md +57 -0
- package/src/skf-export-skill/assets/managed-section-format.md +138 -0
- package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
- package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
- package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-forger/SKILL.md +110 -0
- package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
- package/src/skf-quick-skill/SKILL.md +56 -0
- package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
- package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-refine-architecture/SKILL.md +57 -0
- package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
- package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
- package/src/skf-rename-skill/SKILL.md +58 -0
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
- package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-setup/SKILL.md +55 -0
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
- package/src/skf-setup/steps-c/step-04-report.md +92 -0
- package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
- package/src/skf-test-skill/SKILL.md +59 -0
- package/src/skf-test-skill/references/migration-section-rules.md +114 -0
- package/src/skf-test-skill/references/scoring-rules.md +207 -0
- package/src/skf-test-skill/references/source-access-protocol.md +109 -0
- package/src/skf-test-skill/scripts/compute-score.py +310 -0
- package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
- package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
- package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
- package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
- package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
- package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
- package/src/skf-test-skill/templates/test-report-template.md +58 -0
- package/src/skf-update-skill/SKILL.md +58 -0
- package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
- package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
- package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
- package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
- package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
- package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
- package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
- package/src/skf-verify-stack/SKILL.md +60 -0
- package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
- package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
- package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
- package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
- package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
- package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
- package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
- package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ide-skills.js +216 -0
- package/tools/cli/lib/installer.js +29 -52
- package/tools/cli/lib/manifest.js +11 -5
- package/tools/cli/lib/platform-codes.yaml +223 -0
- package/tools/cli/lib/ui.js +76 -47
- package/tools/validate-docs-drift.js +193 -0
- package/src/agents/forger.agent.yaml +0 -114
- package/src/workflows/README.md +0 -174
- package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
- package/src/workflows/analyze-source/workflow.md +0 -61
- package/src/workflows/audit-skill/workflow.md +0 -64
- package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
- package/src/workflows/brief-skill/workflow.md +0 -58
- package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
- package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
- package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
- package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
- package/src/workflows/create-skill/workflow.md +0 -53
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
- package/src/workflows/drop-skill/workflow.md +0 -63
- package/src/workflows/export-skill/data/managed-section-format.md +0 -103
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
- package/src/workflows/export-skill/workflow.md +0 -58
- package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
- package/src/workflows/quick-skill/workflow.md +0 -58
- package/src/workflows/refine-architecture/workflow.md +0 -61
- package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/test-skill/data/scoring-rules.md +0 -123
- package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
- package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
- package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
- package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
- package/src/workflows/test-skill/templates/test-report-template.md +0 -28
- package/src/workflows/test-skill/workflow.md +0 -57
- package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
- package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
- package/src/workflows/update-skill/workflow.md +0 -56
- package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
- package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
- package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
- package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
- package/src/workflows/verify-stack/workflow.md +0 -61
- package/tools/cli/lib/compiler.js +0 -306
- package/tools/cli/lib/ide-commands.js +0 -244
- /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
- /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
- /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
- /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-10-health-check.md'
|
|
3
|
+
# Resolve `{atomicWriteHelper}` by probing `{atomicWriteProbeOrder}` in order
|
|
4
|
+
# (installed SKF module path first, src/ dev-checkout fallback); first existing
|
|
5
|
+
# path wins. HALT if neither resolves.
|
|
6
|
+
atomicWriteProbeOrder:
|
|
7
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
|
|
8
|
+
- '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Step 9: Stack Skill Report
|
|
12
|
+
|
|
13
|
+
## STEP GOAL:
|
|
14
|
+
|
|
15
|
+
Display the final summary of the forged stack skill with confidence distribution, output file listing, and next workflow recommendations.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Do not write or modify any files — report is console output only
|
|
20
|
+
- Lead with the positive summary, then details, then warnings
|
|
21
|
+
- Recommend next workflows based on what was produced
|
|
22
|
+
- Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing report is NOT the terminal step
|
|
23
|
+
|
|
24
|
+
## MANDATORY SEQUENCE
|
|
25
|
+
|
|
26
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
27
|
+
|
|
28
|
+
### 1. Display Stack Forged Banner
|
|
29
|
+
|
|
30
|
+
"**Stack forged: {project_name}-stack — {lib_count} libraries, {integration_count} integration patterns**
|
|
31
|
+
|
|
32
|
+
Forge tier: **{tier}**"
|
|
33
|
+
|
|
34
|
+
### 2. Display Confidence Distribution
|
|
35
|
+
|
|
36
|
+
"**Confidence distribution:**
|
|
37
|
+
|
|
38
|
+
| Tier | Count | Description |
|
|
39
|
+
|------|-------|-------------|
|
|
40
|
+
| T1 | {count} | AST-verified structural extraction |
|
|
41
|
+
| T1-low | {count} | Source reading inference |
|
|
42
|
+
| T2 | {count} | QMD-enriched temporal context |
|
|
43
|
+
|
|
44
|
+
{IF compose_mode:}
|
|
45
|
+
*Note: Confidence tiers above are inherited from source skills — they reflect the extraction method used when those skills were originally generated, not the current compose run.*
|
|
46
|
+
{END IF}"
|
|
47
|
+
|
|
48
|
+
### 3. Display Output File Summary
|
|
49
|
+
|
|
50
|
+
"**Output files:**
|
|
51
|
+
|
|
52
|
+
**Deliverables** (`{skill_package}`):
|
|
53
|
+
- SKILL.md — Integration patterns, library summaries, conventions
|
|
54
|
+
- context-snippet.md — Compressed stack index ({token_estimate} tokens)
|
|
55
|
+
- metadata.json — Skill metadata and library registry
|
|
56
|
+
- references/ — {lib_count} per-library reference files
|
|
57
|
+
{If integrations:} - references/integrations/ — {pair_count} integration pair files
|
|
58
|
+
|
|
59
|
+
**Workspace** (`{forge_version}`):
|
|
60
|
+
- provenance-map.json — Extraction source tracking
|
|
61
|
+
- evidence-report.md — Evidence and confidence breakdown
|
|
62
|
+
|
|
63
|
+
**Symlink:** `{skill_group}/active` -> `{version}`"
|
|
64
|
+
|
|
65
|
+
### 4. Display Validation Summary
|
|
66
|
+
|
|
67
|
+
**If validation passed with no findings:**
|
|
68
|
+
|
|
69
|
+
"**Validation:** All checks passed"
|
|
70
|
+
|
|
71
|
+
**If validation had findings:**
|
|
72
|
+
|
|
73
|
+
"**Validation:** {warning_count} warning(s) found
|
|
74
|
+
{For each finding:}
|
|
75
|
+
- ⚠ {description}"
|
|
76
|
+
|
|
77
|
+
### 5. Display Warnings (Conditional)
|
|
78
|
+
|
|
79
|
+
Read from the `workflow_warnings[]` accumulator defined in the Workflow Rules of `SKILL.md` (M4). Every step that emitted a warning during this run pushed a structured entry there — this section is the single sink that surfaces them.
|
|
80
|
+
|
|
81
|
+
**Only display if `workflow_warnings[]` is non-empty:**
|
|
82
|
+
|
|
83
|
+
"**Warnings:**
|
|
84
|
+
{For each entry in workflow_warnings[]:}
|
|
85
|
+
- [{step}/{severity}] {code}: {message}"
|
|
86
|
+
|
|
87
|
+
**If `workflow_warnings[]` is empty:** Skip this section entirely.
|
|
88
|
+
|
|
89
|
+
### 6. Recommend Next Workflows
|
|
90
|
+
|
|
91
|
+
"**Next steps:**
|
|
92
|
+
- **[TS] test-skill** — Validate the stack skill against its own assertions
|
|
93
|
+
- **[EX] export-skill** — Package for distribution or agent loading
|
|
94
|
+
|
|
95
|
+
- **[VS] verify-stack** — Validate the stack's integration feasibility against your architecture document{IF compose_mode:} (re-run to confirm feasibility after any architecture changes from **[RA] refine-architecture**){END IF}"
|
|
96
|
+
|
|
97
|
+
### 6b. Result Contract
|
|
98
|
+
|
|
99
|
+
Write the result contract per `shared/references/output-contract-schema.md` using the shared atomic writer. Two artifacts — both written via `skf-atomic-write.py write`:
|
|
100
|
+
|
|
101
|
+
**Per-run record (inside the version dir):**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
<json-content> | python3 {atomicWriteHelper} write \
|
|
105
|
+
--target {forge_version}/create-stack-skill-result-{YYYYMMDD-HHmmss}-{pid}-{rand}.json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- `{YYYYMMDD-HHmmss}` is a UTC timestamp with seconds resolution.
|
|
109
|
+
- Append `-{pid}-{rand}` (process id + short random suffix) to the filename to avoid same-second collisions when multiple runs land in the same second (S16).
|
|
110
|
+
|
|
111
|
+
**Stable latest pointer (ABOVE the version dir, at the stack group root):**
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
<json-content> | python3 {atomicWriteHelper} write \
|
|
115
|
+
--target {forge_data_folder}/{project_name}-stack/create-stack-skill-result-latest.json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- Note the path: the `-latest.json` lives at `{forge_data_folder}/{project_name}-stack/` (the stack group root), NOT inside `{forge_version}/`. Pipeline consumers read this stable path without knowing the current version.
|
|
119
|
+
- Write the same JSON body as the timestamped record (this is a copy, not a symlink, so pipeline consumers never chase a link across version boundaries).
|
|
120
|
+
|
|
121
|
+
Include `SKILL.md`, `context-snippet.md`, and `metadata.json` paths in `outputs`; include `lib_count`, `integration_count`, `forge_tier`, `confidence_tier`, and confidence distribution in `summary`.
|
|
122
|
+
|
|
123
|
+
If either atomic write fails, log the error, leave any prior `-latest.json` untouched, and continue — the report is advisory and should not block the health-check chain.
|
|
124
|
+
|
|
125
|
+
### 7. Chain to Health Check
|
|
126
|
+
|
|
127
|
+
ONLY WHEN the forge banner, confidence distribution, output file summary, validation summary, warnings (if any), next-workflow recommendations, and result contract have all been handled will you then load, read the full file, and execute `{nextStepFile}`. The health-check step is the true terminal step — do not stop here even though the report reads as final.
|
|
128
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
# `shared/health-check.md` resolves relative to the SKF module root
|
|
3
|
+
# (`_bmad/skf/` when installed, `src/` during development), NOT relative
|
|
4
|
+
# to this step file.
|
|
5
|
+
nextStepFile: 'shared/health-check.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 10: Workflow Health Check
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of create-stack-skill — after the shared health check completes, the workflow is fully done.
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- No user-facing reports, file writes, or result contracts in this step — those belong in step-09
|
|
17
|
+
- Delegate directly to `{nextStepFile}` with no additional commentary
|
|
18
|
+
- Do not attempt any other action between loading this step and executing `{nextStepFile}`
|
|
19
|
+
|
|
20
|
+
## MANDATORY SEQUENCE
|
|
21
|
+
|
|
22
|
+
Load `{nextStepFile}`, read it fully, then execute it.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skf-drop-skill
|
|
3
|
+
description: Drop a specific skill version or an entire skill — soft (deprecate) or hard (purge) with platform context rebuild. Use when the user requests to "drop" or "remove a skill."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Drop Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Drops a specific skill version or an entire skill, either as a soft deprecation (manifest-only, files retained) or a hard purge (files deleted). Ensures platform context files are rebuilt to exclude dropped versions. Every destructive action requires explicit user confirmation — nothing is deleted silently. The export manifest is the source of truth; the filesystem is updated to match.
|
|
11
|
+
|
|
12
|
+
## Role
|
|
13
|
+
|
|
14
|
+
You are Ferris in Management mode — a destructive operation specialist who enforces safety guards. You treat every drop as potentially irreversible and require explicit confirmation before touching the manifest or filesystem. You protect the active version, keep the export manifest consistent with on-disk state, and ensure downstream platform context files are rebuilt.
|
|
15
|
+
|
|
16
|
+
## Workflow Rules
|
|
17
|
+
|
|
18
|
+
These rules apply to every step in this workflow:
|
|
19
|
+
|
|
20
|
+
- Never delete files without explicit user confirmation in purge mode
|
|
21
|
+
- Never drop an active version when other non-deprecated versions exist — enforce the active version guard
|
|
22
|
+
- Read each step file completely before taking any action
|
|
23
|
+
- Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
|
|
24
|
+
- Only load one step file at a time — never preload future steps
|
|
25
|
+
- If any instruction references a subprocess or tool you lack, achieve the outcome in your main context thread
|
|
26
|
+
- Always communicate in `{communication_language}`
|
|
27
|
+
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
|
|
28
|
+
|
|
29
|
+
## Stages
|
|
30
|
+
|
|
31
|
+
| # | Step | File | Auto-proceed |
|
|
32
|
+
|---|------|------|--------------|
|
|
33
|
+
| 1 | Select Target | steps-c/step-01-select.md | No (confirm) |
|
|
34
|
+
| 2 | Execute Drop | steps-c/step-02-execute.md | Yes |
|
|
35
|
+
| 3 | Report | steps-c/step-03-report.md | Yes |
|
|
36
|
+
| 4 | Workflow Health Check | steps-c/step-04-health-check.md | Yes |
|
|
37
|
+
|
|
38
|
+
## Invocation Contract
|
|
39
|
+
|
|
40
|
+
| Aspect | Detail |
|
|
41
|
+
|--------|--------|
|
|
42
|
+
| **Inputs** | skill_name [required], mode (deprecate/purge) [required], version (all/specific) [required] |
|
|
43
|
+
| **Gates** | step-01: Input Gate [use args], Confirm Gate [Y] |
|
|
44
|
+
| **Outputs** | Updated manifest, rebuilt context files, (purge: deleted directories) |
|
|
45
|
+
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
46
|
+
|
|
47
|
+
## On Activation
|
|
48
|
+
|
|
49
|
+
1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
|
|
50
|
+
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
51
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
52
|
+
- `snippet_skill_root_override` (optional string) — when set, the context-file rebuild in step-02 preserves any snippet `root:` prefix that matches the override instead of rewriting it to the target IDE's skill root. See `skf-export-skill/assets/managed-section-format.md` for full semantics.
|
|
53
|
+
- Generate and store `timestamp` as `YYYYMMDD-HHmmss` format. This value is fixed for the entire workflow run.
|
|
54
|
+
|
|
55
|
+
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
|
|
56
|
+
|
|
57
|
+
3. Load, read the full file, and then execute `./steps-c/step-01-select.md` to begin the workflow.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-01-select'
|
|
3
|
-
description: 'Select skill, version(s), and drop mode (deprecate/purge)'
|
|
4
2
|
nextStepFile: './step-02-execute.md'
|
|
5
|
-
versionPathsKnowledge: '
|
|
3
|
+
versionPathsKnowledge: 'knowledge/version-paths.md'
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Step 1: Select Drop Target
|
|
@@ -11,45 +9,12 @@ versionPathsKnowledge: '../../../knowledge/version-paths.md'
|
|
|
11
9
|
|
|
12
10
|
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
11
|
|
|
14
|
-
##
|
|
12
|
+
## Rules
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
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
|
|
14
|
+
- Focus only on selection, validation, and confirmation — do not modify the manifest or delete files
|
|
15
|
+
- Do not proceed without explicit user confirmation at the final gate
|
|
16
|
+
- Do not drop an active version when other non-deprecated versions exist
|
|
17
|
+
- Present selections clearly so the user can verify scope, mode, and blast radius
|
|
53
18
|
|
|
54
19
|
## MANDATORY SEQUENCE
|
|
55
20
|
|
|
@@ -110,7 +75,7 @@ Available skills:
|
|
|
110
75
|
"**Which skill would you like to drop?**
|
|
111
76
|
Enter the skill name or its number from the list above."
|
|
112
77
|
|
|
113
|
-
Wait for user input. Accept either the numeric index or the skill name (exact match).
|
|
78
|
+
Wait for user input. Accept either the numeric index or the skill name (exact match). **GATE [default: use args]** — If `{headless_mode}` and skill name was provided as argument: select that skill and auto-proceed. If not provided, HALT: "headless mode requires skill name argument."
|
|
114
79
|
|
|
115
80
|
**If the user's input does not match any listed skill:** Re-display the list and ask again.
|
|
116
81
|
|
|
@@ -244,6 +209,8 @@ Display the full operation summary:
|
|
|
244
209
|
Proceed? [Y/N]
|
|
245
210
|
```
|
|
246
211
|
|
|
212
|
+
**GATE [default: Y]** — If `{headless_mode}`: auto-proceed with [Y], log: "headless: auto-confirmed drop of {target_skill}"
|
|
213
|
+
|
|
247
214
|
Wait for explicit user response.
|
|
248
215
|
|
|
249
216
|
- **If `Y`** → proceed to section 11
|
|
@@ -269,30 +236,3 @@ Load, read the full file, and then execute `{nextStepFile}`.
|
|
|
269
236
|
|
|
270
237
|
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
238
|
|
|
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.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-02-execute'
|
|
3
|
-
description: 'Execute the drop operation — update manifest, rebuild context files, delete files if purge'
|
|
4
2
|
nextStepFile: './step-03-report.md'
|
|
5
|
-
versionPathsKnowledge: '
|
|
6
|
-
managedSectionLogic: '
|
|
3
|
+
versionPathsKnowledge: 'knowledge/version-paths.md'
|
|
4
|
+
managedSectionLogic: 'skf-export-skill/assets/managed-section-format.md'
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
# Step 2: Execute Drop
|
|
@@ -12,45 +10,12 @@ managedSectionLogic: '../../export-skill/data/managed-section-format.md'
|
|
|
12
10
|
|
|
13
11
|
Execute the drop decisions recorded in step-01: update the export manifest, rebuild platform context files so dropped versions disappear from managed sections, and (in purge mode) delete the affected directories from disk. Record everything that was changed for the final report in step-03.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Rules
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
22
|
-
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
23
|
-
- ⚙️ 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
|
|
24
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
25
|
-
|
|
26
|
-
### Role Reinforcement:
|
|
27
|
-
|
|
28
|
-
- ✅ You are Ferris in Management mode — a destructive operation specialist
|
|
29
|
-
- ✅ Execute only the decisions confirmed in step-01 — no scope expansion, no "while I'm at it" extras
|
|
30
|
-
- ✅ Surgical precision: preserve all content outside `<!-- SKF:BEGIN/END -->` markers
|
|
31
|
-
- ✅ Manifest and filesystem must end in a consistent state
|
|
32
|
-
|
|
33
|
-
### Step-Specific Rules:
|
|
34
|
-
|
|
35
|
-
- 🎯 Focus only on manifest update, context rebuild, and (in purge mode) file deletion
|
|
36
|
-
- 🚫 FORBIDDEN to re-prompt the user — decisions were made in step-01
|
|
37
|
-
- 🚫 FORBIDDEN to delete files in deprecate mode
|
|
38
|
-
- 🚫 FORBIDDEN to widen the deletion scope beyond `affected_directories`
|
|
39
|
-
- 💬 Report each stage's outcome as it completes so the user sees progress
|
|
40
|
-
|
|
41
|
-
## EXECUTION PROTOCOLS:
|
|
42
|
-
|
|
43
|
-
- 🎯 Re-read version-paths knowledge to avoid drift between step files
|
|
44
|
-
- 💾 Persist the manifest update before touching platform context files
|
|
45
|
-
- 📖 Rebuild managed sections from the updated manifest, not from memory
|
|
46
|
-
- 🚫 If any stage fails, halt and report which stage failed with recovery guidance
|
|
47
|
-
|
|
48
|
-
## CONTEXT BOUNDARIES:
|
|
49
|
-
|
|
50
|
-
- Available: Decisions from step-01 (`target_skill`, `target_versions`, `drop_mode`, `is_skill_level`, `affected_directories`), SKF module config, version-paths knowledge, managed-section format
|
|
51
|
-
- Focus: Manifest mutation, context rebuild, filesystem deletion (purge only)
|
|
52
|
-
- Limits: Only modify content between `<!-- SKF:BEGIN/END -->` markers; only delete directories enumerated in `affected_directories`
|
|
53
|
-
- Dependencies: Step-01 must have completed and stored all decisions in context
|
|
15
|
+
- Focus only on manifest update, context rebuild, and (in purge mode) file deletion
|
|
16
|
+
- Do not re-prompt the user — decisions were made in step-01
|
|
17
|
+
- Do not delete files in deprecate mode; do not widen deletion scope beyond `affected_directories`
|
|
18
|
+
- Report each stage's outcome as it completes
|
|
54
19
|
|
|
55
20
|
## MANDATORY SEQUENCE
|
|
56
21
|
|
|
@@ -76,7 +41,7 @@ For each version in `target_versions`:
|
|
|
76
41
|
|
|
77
42
|
1. Navigate to `exports.{target_skill}.versions.{version}`
|
|
78
43
|
2. Set `status = "deprecated"`
|
|
79
|
-
3. Leave `
|
|
44
|
+
3. Leave `ides`, `last_exported`, and all other fields unchanged
|
|
80
45
|
|
|
81
46
|
Do NOT change `active_version` on the skill entry in this pass — if the dropped version was the active one (only reachable when it was the sole non-deprecated version per the step-01 guard), the active_version field will still point at it, but every consumer excludes deprecated versions from exports.
|
|
82
47
|
|
|
@@ -95,33 +60,27 @@ Set context flag `manifest_updated = true`.
|
|
|
95
60
|
- Report: "**Manifest update failed:** {error}. No files were deleted and platform context files were not rebuilt. The manifest is in its pre-drop state — rerun the workflow once the underlying issue is resolved."
|
|
96
61
|
- Store `manifest_updated = false` and jump to section 6
|
|
97
62
|
|
|
98
|
-
### 3. Rebuild
|
|
99
|
-
|
|
100
|
-
Load the `ides` list from `config.yaml`. The installer writes installer-specific IDE identifiers (e.g. `claude-code`, `github-copilot`, `codex`, `cline`, `roo`, `windsurf`, `cursor`, `other`), NOT platform values — these must be mapped to platforms before any target-file lookup.
|
|
63
|
+
### 3. Rebuild Context Files
|
|
101
64
|
|
|
102
|
-
|
|
65
|
+
Load the `ides` list from `config.yaml`. The installer writes IDE identifiers — these must be mapped to context files and skill roots using the "IDE → Context File Mapping" table in `{managedSectionLogic}`.
|
|
103
66
|
|
|
104
|
-
|
|
105
|
-
2. For any entry not found in the table, default to `copilot` and emit a warning: "Unknown IDE '{value}' in config.yaml — defaulting to copilot"
|
|
106
|
-
3. Deduplicate the resulting platform list (e.g. both `codex` and `cline` collapse to a single `copilot` entry)
|
|
107
|
-
4. If `config.yaml.ides` is absent or the mapping yields an empty list, fall back to `["copilot"]` and emit a note: "No IDEs configured in config.yaml — defaulting to copilot (AGENTS.md)"
|
|
67
|
+
**Resolve `target_context_files`** using the canonical mapping table in `{managedSectionLogic}`:
|
|
108
68
|
|
|
109
|
-
|
|
69
|
+
1. For each entry in `config.yaml.ides`, look up its `context_file` and `skill_root` from the mapping table
|
|
70
|
+
2. For any entry not found in the table, default to AGENTS.md / `.agents/skills/` and emit a warning: "Unknown IDE '{value}' in config.yaml — defaulting to AGENTS.md"
|
|
71
|
+
3. Deduplicate by `context_file` — when multiple IDEs map to the same context file, use the first configured IDE's `skill_root`
|
|
72
|
+
4. If `config.yaml.ides` is absent or the mapping yields an empty list, fall back to `[{context_file: "AGENTS.md", skill_root: ".agents/skills/"}]` and emit a note: "No IDEs configured in config.yaml — defaulting to AGENTS.md"
|
|
110
73
|
|
|
111
|
-
|
|
74
|
+
Store the result as `target_context_files` for this section.
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
For each entry in `target_context_files`:
|
|
114
77
|
|
|
115
|
-
|
|
116
|
-
|----------|-------------|
|
|
117
|
-
| `claude` | `{project-root}/CLAUDE.md` |
|
|
118
|
-
| `cursor` | `{project-root}/.cursorrules` |
|
|
119
|
-
| `copilot` | `{project-root}/AGENTS.md` |
|
|
78
|
+
1. **Resolve target file** at `{context_file}`.
|
|
120
79
|
|
|
121
80
|
2. **Read the current file.**
|
|
122
|
-
- If the file does not exist, skip this
|
|
123
|
-
- If the file exists but contains no `<!-- SKF:BEGIN -->` marker, skip this
|
|
124
|
-
- If the file contains `<!-- SKF:BEGIN -->` but no matching `<!-- SKF:END -->`, record the error against that
|
|
81
|
+
- If the file does not exist, skip this context file (nothing to rebuild — the file will be re-created next time export-skill runs)
|
|
82
|
+
- If the file exists but contains no `<!-- SKF:BEGIN -->` marker, skip this context file (no managed section to rewrite)
|
|
83
|
+
- If the file contains `<!-- SKF:BEGIN -->` but no matching `<!-- SKF:END -->`, record the error against that context file and continue to the next entry — do not halt the entire drop on a malformed context file. The manifest has already been updated in section 2 and is canonical state; the context file can be repaired manually and rebuilt on the next `[EX] Export Skill` run.
|
|
125
84
|
|
|
126
85
|
3. **Build the exported skill set (version-aware, deprecated-excluded)** using the same logic as export-skill step-04 section 4b:
|
|
127
86
|
- Read the manifest's `exports` object (already updated in section 2)
|
|
@@ -134,15 +93,9 @@ For each platform in `target_platforms`:
|
|
|
134
93
|
- If the file is missing, fall back to the `active` symlink path, then skip with a warning if still not found
|
|
135
94
|
- Collect successful snippets into the skill index
|
|
136
95
|
|
|
137
|
-
5. **Rewrite root paths for the current
|
|
96
|
+
5. **Rewrite root paths for the current context file** using the generic rewrite algorithm from export-skill step-04 section 4d:
|
|
138
97
|
|
|
139
|
-
|
|
140
|
-
|----------|-----------------|
|
|
141
|
-
| `claude` | `.claude/skills/` |
|
|
142
|
-
| `cursor` | `.cursor/skills/` |
|
|
143
|
-
| `copilot` | `.agents/skills/` |
|
|
144
|
-
|
|
145
|
-
For each snippet, detect its current `root:` prefix and rewrite it to the current platform's prefix if different.
|
|
98
|
+
For each snippet, parse the `root:` line (`root: {prefix}{skill-name}/`), strip the trailing `{skill-name}/` to extract the current prefix, and replace it with the current entry's `skill_root` if different. **Override guard:** If `snippet_skill_root_override` is set in config.yaml AND the extracted prefix equals the override value, skip the rewrite — leave the root path untouched. See `skf-export-skill/steps-c/step-04-update-context.md` §4d for full semantics.
|
|
146
99
|
|
|
147
100
|
6. **Sort skills alphabetically by name.** Count totals (skills, stack skills).
|
|
148
101
|
|
|
@@ -176,9 +129,9 @@ For each platform in `target_platforms`:
|
|
|
176
129
|
- Confirm `{target_skill}` (at the dropped version, or at all versions if skill-level) no longer appears between the markers
|
|
177
130
|
- Confirm content outside the markers is byte-identical to what was preserved
|
|
178
131
|
|
|
179
|
-
10. **On per-file failure:** record the error against that
|
|
132
|
+
10. **On per-file failure:** record the error against that context file and continue to the next entry. Do not halt — other context files should still be rebuilt.
|
|
180
133
|
|
|
181
|
-
**After the loop,** record `
|
|
134
|
+
**After the loop,** record `context_files_updated` as the list of files that were successfully rewritten, and `context_files_failed` as the list of any that failed.
|
|
182
135
|
|
|
183
136
|
Report: "**Rebuilt managed sections in:** {list of updated files}. {if any failed: 'Failed: {list}'}"
|
|
184
137
|
|
|
@@ -223,7 +176,7 @@ Run these verification checks:
|
|
|
223
176
|
- Version-level drop: `exports.{target_skill}.versions.{version}.status == "deprecated"`
|
|
224
177
|
- Skill-level drop: `exports.{target_skill}` is absent
|
|
225
178
|
|
|
226
|
-
2. **
|
|
179
|
+
2. **Context files check:** For each file in `context_files_updated`, spot-check that the dropped skill/version is no longer referenced between the markers.
|
|
227
180
|
|
|
228
181
|
3. **Purge check (purge mode only):** For each path in `files_deleted`, confirm it no longer exists on disk.
|
|
229
182
|
|
|
@@ -236,8 +189,8 @@ Store the following for step-03:
|
|
|
236
189
|
- `files_deleted` — list of directory paths actually deleted (purge mode) or `[]` (soft drop)
|
|
237
190
|
- `disk_freed` — human-readable size (purge mode) or `"N/A (soft drop)"`
|
|
238
191
|
- `manifest_updated` — boolean (true if section 2 succeeded)
|
|
239
|
-
- `
|
|
240
|
-
- `
|
|
192
|
+
- `context_files_updated` — list of successfully rebuilt files
|
|
193
|
+
- `context_files_failed` — list of files that failed to rebuild (empty if none)
|
|
241
194
|
- `verification_errors` — list of verification failures (empty if none)
|
|
242
195
|
|
|
243
196
|
### 7. Load Next Step
|
|
@@ -251,40 +204,11 @@ If any stage fails, record which stage failed and provide recovery guidance in t
|
|
|
251
204
|
| Failed Stage | Recovery Guidance |
|
|
252
205
|
|--------------|-------------------|
|
|
253
206
|
| Manifest update | "Manifest is in pre-drop state. Re-run the workflow once the underlying I/O issue is resolved. No files were deleted." |
|
|
254
|
-
|
|
|
255
|
-
| File deletion (purge) | "Manifest and
|
|
207
|
+
| Context file rebuild | "Manifest is already updated. Re-run `[EX] Export Skill` against any still-valid skill to regenerate the affected managed sections, or rerun the drop workflow." |
|
|
208
|
+
| File deletion (purge) | "Manifest and context files are consistent. Remaining directories listed in the report can be deleted manually: `rm -rf {path}`." |
|
|
256
209
|
| Verification | "Execution completed but post-write checks found drift. See the report for specific paths requiring manual review." |
|
|
257
210
|
|
|
258
211
|
## CRITICAL STEP COMPLETION NOTE
|
|
259
212
|
|
|
260
213
|
ONLY WHEN all execution stages have been attempted (manifest update, context rebuild, file deletion in purge mode, verification) and results have been stored in context, will you then load and read fully `{nextStepFile}` to generate the final report.
|
|
261
214
|
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
265
|
-
|
|
266
|
-
### ✅ SUCCESS:
|
|
267
|
-
|
|
268
|
-
- Version-paths knowledge and managed-section format re-read at the start of the step
|
|
269
|
-
- Export manifest updated correctly (deprecated status for version-level, skill removal for skill-level)
|
|
270
|
-
- Platform context files rebuilt for all configured IDEs using the same logic as export-skill step-04 (sections 4b–5), with surgical replacement preserving all content outside markers
|
|
271
|
-
- Deprecated versions no longer appear in any managed section
|
|
272
|
-
- Purge mode: all directories in `affected_directories` deleted with size accounting; `active` symlink updated or removed as appropriate
|
|
273
|
-
- Soft drop: no files deleted; `files_deleted` is empty and `disk_freed` is `"N/A (soft drop)"`
|
|
274
|
-
- Verification checks executed on manifest, platform files, and (if purge) deleted paths
|
|
275
|
-
- All results stored in context for step-03
|
|
276
|
-
- Errors at any stage are recorded with recovery guidance rather than silently swallowed
|
|
277
|
-
|
|
278
|
-
### ❌ SYSTEM FAILURE:
|
|
279
|
-
|
|
280
|
-
- Deleting files in soft drop mode
|
|
281
|
-
- Deleting directories outside the `affected_directories` list
|
|
282
|
-
- Modifying content outside `<!-- SKF:BEGIN/END -->` markers
|
|
283
|
-
- Rebuilding managed sections from memory instead of the updated manifest
|
|
284
|
-
- Including deprecated versions in the rebuilt skill index
|
|
285
|
-
- Not updating the `active` symlink after a version-level purge when the dropped version was the target
|
|
286
|
-
- Not verifying the final state
|
|
287
|
-
- Hardcoding paths instead of using `{skill_package}`, `{skill_group}`, `{forge_version}`, `{forge_group}` templates
|
|
288
|
-
- Halting the entire workflow on a recoverable per-platform error instead of continuing and reporting
|
|
289
|
-
|
|
290
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. The manifest and the filesystem must end in a consistent state, and every destructive action must trace back to a decision made in step-01.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-04-health-check.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step 3: Report Drop Results
|
|
6
|
+
|
|
7
|
+
## STEP GOAL:
|
|
8
|
+
|
|
9
|
+
Present a clear, final summary of what the drop workflow changed — manifest state, platform context files, deleted directories, disk freed, and remaining versions — so the user can verify the outcome and know whether any manual follow-up is required.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Focus only on reporting results stored in context by step-02 — do not re-execute any part of the drop
|
|
14
|
+
- Do not hide verification errors or failed context file rebuilds
|
|
15
|
+
- Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing report is NOT the terminal step
|
|
16
|
+
|
|
17
|
+
## MANDATORY SEQUENCE
|
|
18
|
+
|
|
19
|
+
**CRITICAL:** Follow this sequence exactly.
|
|
20
|
+
|
|
21
|
+
### 1. Determine Remaining Versions
|
|
22
|
+
|
|
23
|
+
**If `is_skill_level == true`:**
|
|
24
|
+
|
|
25
|
+
Set `remaining_versions_display = "(skill fully removed)"`.
|
|
26
|
+
|
|
27
|
+
**If `is_skill_level == false`:**
|
|
28
|
+
|
|
29
|
+
Read `{skills_output_folder}/.export-manifest.json` and look up `exports.{target_skill}.versions`. Build a human-readable list of every remaining version with its status, with the active one marked:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
- 0.1.0 (deprecated)
|
|
33
|
+
- 0.5.0 (archived)
|
|
34
|
+
- 0.6.0 (active) *
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Render the Report
|
|
38
|
+
|
|
39
|
+
Display the following block, filling in values from context:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
**Drop operation complete.**
|
|
43
|
+
|
|
44
|
+
Operation: {Deprecate | Purge}
|
|
45
|
+
Skill: {target_skill}
|
|
46
|
+
Version(s): {comma-separated target_versions or "ALL"}
|
|
47
|
+
|
|
48
|
+
Changes:
|
|
49
|
+
- Manifest updated: {yes | no}
|
|
50
|
+
- Context files rebuilt: {list from context_files_updated, or "(none)"}
|
|
51
|
+
{if context_files_failed is non-empty:}
|
|
52
|
+
- Context files FAILED: {list from context_files_failed}
|
|
53
|
+
{if drop_mode == "purge":}
|
|
54
|
+
- Files deleted: {list from files_deleted, or "(none — nothing on disk)"}
|
|
55
|
+
- Disk space freed: {disk_freed}
|
|
56
|
+
|
|
57
|
+
Remaining versions for {target_skill}:
|
|
58
|
+
{remaining_versions_display}
|
|
59
|
+
|
|
60
|
+
{if drop_mode == "deprecate":}
|
|
61
|
+
**Note:** Files remain on disk. This operation is reversible by manually editing
|
|
62
|
+
`{skills_output_folder}/.export-manifest.json` and changing the version's `status`
|
|
63
|
+
field back to `"active"` or `"archived"`, then re-running `[EX] Export Skill` to
|
|
64
|
+
restore the managed section entry.
|
|
65
|
+
|
|
66
|
+
{if verification_errors is non-empty:}
|
|
67
|
+
**Verification warnings:**
|
|
68
|
+
{list each verification error}
|
|
69
|
+
These require manual review — see the error-handling guidance in step-02.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Result Contract
|
|
73
|
+
|
|
74
|
+
Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{skills_output_folder}/drop-skill-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{skills_output_folder}/drop-skill-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include all purged file paths in `outputs`; include `target_skill`, `drop_mode`, and `versions_affected` in `summary`.
|
|
75
|
+
|
|
76
|
+
### 3. Chain to Health Check
|
|
77
|
+
|
|
78
|
+
ONLY WHEN the report has been rendered and the result contract saved will you then load, read the full file, and execute `{nextStepFile}`. The health-check step is the true terminal step — do not stop here even though the report reads as final.
|
|
79
|
+
|
|
80
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
81
|
+
|
|
82
|
+
This step chains to the local health-check step (`{nextStepFile}`), which in turn delegates to `shared/health-check.md`. After the health check completes, the drop-skill workflow is fully done. Do not re-run any earlier step automatically — if the user wants another drop, they should re-invoke the workflow from the top.
|
|
83
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
# `shared/health-check.md` resolves relative to the SKF module root
|
|
3
|
+
# (`_bmad/skf/` when installed, `src/` during development), NOT relative
|
|
4
|
+
# to this step file.
|
|
5
|
+
nextStepFile: 'shared/health-check.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 4: Workflow Health Check
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of drop-skill — after the shared health check completes, the workflow is fully done.
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- No user-facing reports, file writes, or result contracts in this step — those belong in step-03
|
|
17
|
+
- Delegate directly to `{nextStepFile}` with no additional commentary
|
|
18
|
+
- Do not attempt any other action between loading this step and executing `{nextStepFile}`
|
|
19
|
+
|
|
20
|
+
## MANDATORY SEQUENCE
|
|
21
|
+
|
|
22
|
+
Load `{nextStepFile}`, read it fully, then execute it.
|