bmad-module-skill-forge 0.10.0 → 1.0.0-rc.3
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 +56 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +616 -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 +30 -9
- package/release-audits/v1.0.0-launch-audit.md +207 -0
- 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/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 -71
- 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 -64
- 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 -70
- 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 +16 -68
- 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 +11 -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 -69
- 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 +4 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +6 -4
- 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 -179
- 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 -150
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -136
- 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 -178
- 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 -133
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -159
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/shared/health-check.md +0 -231
- 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 -208
- 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 -200
- 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,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-07-health-check.md'
|
|
3
|
+
|
|
4
|
+
outputFile: '{forge_version}/test-report-{skill_name}-{run_id}.md'
|
|
5
|
+
scoringRulesFile: 'references/scoring-rules.md'
|
|
6
|
+
outputFormatsFile: 'assets/output-section-formats.md'
|
|
7
|
+
# outputContractSchema and healthCheck resolve relative to the SKF module root
|
|
8
|
+
# (`_bmad/skf/` when installed, `src/` during development), NOT relative to
|
|
9
|
+
# this step file. Both paths are probed in order; HALT if neither exists.
|
|
10
|
+
outputContractSchema: 'shared/references/output-contract-schema.md'
|
|
11
|
+
healthCheckProbeOrder:
|
|
12
|
+
- '{project-root}/_bmad/skf/shared/health-check.md'
|
|
13
|
+
- '{project-root}/src/shared/health-check.md'
|
|
14
|
+
atomicWriteProbeOrder:
|
|
15
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
|
|
16
|
+
- '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Step 6: Gap Report
|
|
20
|
+
|
|
21
|
+
## STEP GOAL:
|
|
22
|
+
|
|
23
|
+
Generate a detailed gap report listing every issue found during coverage and coherence analysis, assign severity to each gap, provide specific actionable remediation suggestions, and finalize the test report document. This is the final step — no next step file.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- Focus on gap enumeration, severity classification, and remediation — do not recalculate scores
|
|
28
|
+
- Remediation suggestions reference specific files, exports, and line numbers
|
|
29
|
+
- Gaps are ordered by severity (Critical > High > Medium > Low > Info)
|
|
30
|
+
- Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing report is NOT the terminal step
|
|
31
|
+
|
|
32
|
+
## MANDATORY SEQUENCE
|
|
33
|
+
|
|
34
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
35
|
+
|
|
36
|
+
### 1. Collect All Issues
|
|
37
|
+
|
|
38
|
+
Read `{outputFile}` and extract every issue found across all analysis sections:
|
|
39
|
+
|
|
40
|
+
**From Coverage Analysis (step 03):**
|
|
41
|
+
- Missing documentation (exports in source but not in SKILL.md)
|
|
42
|
+
- Signature mismatches (documented signature differs from source)
|
|
43
|
+
- Stale documentation (documented but no longer in source)
|
|
44
|
+
- Type coverage gaps (undocumented types/interfaces)
|
|
45
|
+
|
|
46
|
+
**From Coherence Analysis (step 04):**
|
|
47
|
+
- Broken references (file paths, skill references, type imports that don't resolve)
|
|
48
|
+
- Incomplete integration patterns (contextual mode)
|
|
49
|
+
- Structural issues (naive mode — missing sections, broken examples)
|
|
50
|
+
|
|
51
|
+
**From External Validation (step 04b):**
|
|
52
|
+
- skill-check diagnostics (unresolved errors and warnings)
|
|
53
|
+
- tessl judge suggestions (content quality and actionability improvements)
|
|
54
|
+
|
|
55
|
+
### 2. Load Severity Rules
|
|
56
|
+
|
|
57
|
+
Load `{scoringRulesFile}` for gap severity classification:
|
|
58
|
+
|
|
59
|
+
| Severity | Criteria |
|
|
60
|
+
|----------|----------|
|
|
61
|
+
| **Critical** | Missing exported function/class documentation |
|
|
62
|
+
| **High** | Signature mismatch between source and SKILL.md |
|
|
63
|
+
| **Medium** | Missing type or interface documentation |
|
|
64
|
+
| **Medium** | Migration section present/absent mismatch with T2-future annotation data (Deep tier) |
|
|
65
|
+
| **Medium** | Script/asset directory exists but no Scripts & Assets section in SKILL.md |
|
|
66
|
+
| **Medium** | Scripts & Assets section references file not found in scripts/ or assets/ directory |
|
|
67
|
+
| **Low** | Script/asset file present without provenance entry in provenance-map.json file_entries |
|
|
68
|
+
| **Low** | Missing optional metadata or examples |
|
|
69
|
+
| **Low** | Description trigger optimization recommended (third-person voice, negative triggers, or keyword coverage gaps) |
|
|
70
|
+
| **Info** | Style suggestions, non-blocking observations |
|
|
71
|
+
| **Info** | Discovery testing not performed — realistic prompt testing recommended before export |
|
|
72
|
+
|
|
73
|
+
### 3. Classify and Order Gaps
|
|
74
|
+
|
|
75
|
+
Load `{outputFormatsFile}` for gap entry format and remediation quality rules.
|
|
76
|
+
|
|
77
|
+
For each issue, assign severity from `{scoringRulesFile}` and generate a specific remediation following the quality rules in `{outputFormatsFile}`. Order gaps by severity: Critical → High → Medium → Low → Info.
|
|
78
|
+
|
|
79
|
+
### 4. Generate Remediation Summary and Append Gap Report
|
|
80
|
+
|
|
81
|
+
Load the Gap Report section format from `{outputFormatsFile}`. Count gaps by severity, estimate effort per the guidelines in `{outputFormatsFile}`, and append the complete **Gap Report** section to `{outputFile}`.
|
|
82
|
+
|
|
83
|
+
If no gaps found, append a clean pass message recommending **export-skill** workflow.
|
|
84
|
+
|
|
85
|
+
### 4b. Discovery Testing (MANDATORY — H4)
|
|
86
|
+
|
|
87
|
+
After gap enumeration, perform minimum-viable discovery testing. This is a **Medium-weight** check contributing to the Discovery Quality subsection — no longer advisory boilerplate.
|
|
88
|
+
|
|
89
|
+
**4b.0 Precondition — catalog size check:**
|
|
90
|
+
|
|
91
|
+
Count the skills in `{skillsOutputFolder}`: `ls -1d {skillsOutputFolder}/*/ 2>/dev/null | wc -l` (directories only — each skill package lives at `{skillsOutputFolder}/<skill-name>/`).
|
|
92
|
+
|
|
93
|
+
- If `catalog_size < 2`: **skip §4b.1–§4b.3**. Record an Info-severity note in the Discovery Quality subsection: `discovery — skipped: catalog size N={catalog_size}, requires ≥2 candidates for meaningful routing`. The routing test is vacuous with one candidate (any prompt returns the sole skill); reporting `3/3 PASS` under those conditions inflates the Discovery score and masks genuinely bad description triggers. Proceed to §4b.4 (description optimization) if tessl/skill-check flagged description issues; otherwise skip to §4c.
|
|
94
|
+
- If `catalog_size >= 2`: continue with §4b.1 as written.
|
|
95
|
+
|
|
96
|
+
Optional escape hatch: the workflow accepts `--discovery-catalog=all` to broaden the candidate pool to `.claude/skills/` or `_bmad/agents/` for single-skill repos where the repo-local catalog is trivially too small. When the flag is set, rebuild `catalog_size` from the broader pool before the precondition check.
|
|
97
|
+
|
|
98
|
+
**4b.1 Extract realistic prompts from the skill under test:**
|
|
99
|
+
|
|
100
|
+
Parse SKILL.md for the three most "organic" prompts found in its `description`, `Triggers`, or example sections. Prefer prompts that:
|
|
101
|
+
- Use conversational phrasing (contractions, casual language, implicit context)
|
|
102
|
+
- Omit the skill name or explicit command invocation
|
|
103
|
+
- Reflect how a user would actually ask for this capability
|
|
104
|
+
|
|
105
|
+
If SKILL.md does not contain enough organic examples, synthesize 3 from the skill's exports/capability summary using the patterns from §4b.4 below.
|
|
106
|
+
|
|
107
|
+
**4b.2 Spawn a discovery subagent:**
|
|
108
|
+
|
|
109
|
+
For each of the 3 prompts, spawn an isolated subagent with NO prior context about which skill is under test. Provide only:
|
|
110
|
+
1. A compact list of ALL skills available in `{skillsOutputFolder}` (name + description line from each skill's SKILL.md frontmatter)
|
|
111
|
+
2. The prompt text
|
|
112
|
+
|
|
113
|
+
Instruction to the subagent:
|
|
114
|
+
|
|
115
|
+
> "You are an agent selecting the best skill to handle a user request. Here is the catalog: {catalog}. The user says: '{prompt}'. Return JSON: `{\"selected_skill\": \"<name>\", \"confidence\": \"<high|medium|low>\", \"reasoning\": \"<one sentence>\"}`. If no skill fits, return `{\"selected_skill\": null, ...}`. Return ONLY JSON."
|
|
116
|
+
|
|
117
|
+
**4b.3 Evaluate discovery results:**
|
|
118
|
+
|
|
119
|
+
Parse the 3 responses. Schema-validate (required: `selected_skill`, `confidence`, `reasoning`). On any parse/schema failure, record the prompt as `discovery_result: error` and continue.
|
|
120
|
+
|
|
121
|
+
For each prompt, PASS = `selected_skill == skill_name` (the skill under test), FAIL otherwise.
|
|
122
|
+
|
|
123
|
+
- **3 of 3 PASS** → discovery check PASS (Info severity note, no gap)
|
|
124
|
+
- **2 of 3 PASS** → discovery check WARN → **Medium**-severity gap: `discovery — 1/3 realistic prompts misrouted`
|
|
125
|
+
- **≤1 of 3 PASS** → discovery check FAIL → **High**-severity gap: `discovery — {N}/3 realistic prompts misrouted; description triggers are not pulling the skill`
|
|
126
|
+
|
|
127
|
+
Append the prompts, selected skills, and outcomes as a table in the Discovery Quality subsection.
|
|
128
|
+
|
|
129
|
+
**4b.4 Description optimization (secondary):** If tessl `description_score` (from step 04b) is below 90%, or skill-check flagged description issues, add remediation hints to the Discovery Quality subsection:
|
|
130
|
+
- Third-person voice check
|
|
131
|
+
- Explicit trigger keywords matching real user phrasing
|
|
132
|
+
- Negative triggers ("NOT for: ...") to prevent false positives
|
|
133
|
+
- Alternative skill references for excluded use cases
|
|
134
|
+
|
|
135
|
+
Realistic prompt patterns for synthesis (§4b.1 fallback):
|
|
136
|
+
- Vague: "can you help me with this {artifact} my boss sent"
|
|
137
|
+
- Implicit: "why did {metric} drop last {period}"
|
|
138
|
+
- Abbreviated: "run the {keyword} thing on this data"
|
|
139
|
+
|
|
140
|
+
### 4c. Result Contract (atomic write — B4)
|
|
141
|
+
|
|
142
|
+
**Resolve `{atomicWriteHelper}`:** probe `{atomicWriteProbeOrder}`. HALT if neither candidate exists — the contract is a downstream-consumer protocol and must never be written non-atomically.
|
|
143
|
+
|
|
144
|
+
Write the result contract per `{outputContractSchema}`:
|
|
145
|
+
- Per-run record: `{forge_version}/skf-test-skill-result-{run_id}.json` (the `{run_id}` set in step-01 §6a — already carries UTC timestamp + PID + random suffix, so no same-second collision).
|
|
146
|
+
- Latest copy: `{forge_version}/skf-test-skill-result-latest.json` (stable path for pipeline consumers — copy, not symlink).
|
|
147
|
+
|
|
148
|
+
Both writes MUST go through the atomic writer so partial writes are never observable:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Build the JSON payload in memory, then:
|
|
152
|
+
cat payload.json | python3 {atomicWriteHelper} write --target {forge_version}/skf-test-skill-result-{run_id}.json
|
|
153
|
+
cat payload.json | python3 {atomicWriteHelper} write --target {forge_version}/skf-test-skill-result-latest.json
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Payload contents:
|
|
157
|
+
- `outputs[]` — include the test report path at `{outputFile}` with its `{run_id}` suffix
|
|
158
|
+
- `summary` — `score`, `threshold`, `result` (`"PASS"`, `"PASS_WITH_DRIFT"`, `"FAIL"`, or **`"INCONCLUSIVE"`**), `testMode` (naive/contextual), `activeCategories[]`, `inconclusiveReasons[]` (when present). `PASS_WITH_DRIFT` is set when the workflow observed workspace drift and the user passed `--allow-workspace-drift` — see step-05 §5 (M5). Downstream consumers MUST treat `PASS_WITH_DRIFT` as a non-exportable result: re-run against the pinned commit before export.
|
|
159
|
+
- `runId` — the workflow's `{run_id}` for downstream correlation
|
|
160
|
+
- `healthCheckDispatched` — boolean, set by §7 after the dispatch decision
|
|
161
|
+
|
|
162
|
+
The `{forge_version}/.test-skill.lock` acquired in step-01 §6b remains held until the end of this step — it guards against concurrent latest-file overwrites.
|
|
163
|
+
|
|
164
|
+
### 5. Finalize Output Document — Enforce Step Completeness
|
|
165
|
+
|
|
166
|
+
**Per S6 (incremental step tracking):** read `stepsCompleted` from the output frontmatter. The expected set is the canonical chain:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
['step-01-init',
|
|
170
|
+
'step-02-detect-mode',
|
|
171
|
+
'step-03-coverage-check',
|
|
172
|
+
'step-04-coherence-check',
|
|
173
|
+
'step-04b-external-validators',
|
|
174
|
+
'step-05-score',
|
|
175
|
+
'step-06-report']
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
If any expected entry is missing, HALT with "step completeness violation — missing {list}; workflow state is inconsistent, do not finalize the report". Only append `'step-06-report'` and write back after the check passes.
|
|
179
|
+
|
|
180
|
+
**M4 — Section anchor presence check (companion to stepsCompleted).** The
|
|
181
|
+
report template ships six canonical H2 anchors — one per populating step. An
|
|
182
|
+
off-sequence run (e.g. a step wrote its section into the wrong anchor, or a
|
|
183
|
+
subagent truncated the file) can leave `stepsCompleted` intact while a section
|
|
184
|
+
is missing. `grep -n` each anchor below against `{outputFile}`; each MUST
|
|
185
|
+
return ≥1 match:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
^## Test Summary$
|
|
189
|
+
^## Coverage Analysis$
|
|
190
|
+
^## Coherence Analysis$
|
|
191
|
+
^## External Validation$
|
|
192
|
+
^## Completeness Score$
|
|
193
|
+
^## Gap Report$
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
On any miss, HALT with "report anchor missing: {anchor} — section was not
|
|
197
|
+
appended by its owning step". Do NOT append `'step-06-report'` and do NOT
|
|
198
|
+
write the result contract. The template in `templates/test-report-template.md`
|
|
199
|
+
declares these anchors as TBD placeholders; a miss means a step silently
|
|
200
|
+
skipped its append.
|
|
201
|
+
|
|
202
|
+
**INCONCLUSIVE as gate:** if `testResult == 'inconclusive'` (from step-05), the report final presentation (§6) and result contract (§4c) have already been written with that verdict. Do NOT auto-map INCONCLUSIVE to PASS or FAIL. Recommend `manual-review`. The step must still complete (health-check runs unconditionally) — INCONCLUSIVE is a report-time signal, not a workflow abort.
|
|
203
|
+
|
|
204
|
+
### 6. Present Final Report
|
|
205
|
+
|
|
206
|
+
"**Test complete for {skill_name}.**
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
**Result:** **{PASS|PASS_WITH_DRIFT|FAIL|INCONCLUSIVE}** — **{score}%** (threshold: {threshold}%)
|
|
211
|
+
|
|
212
|
+
**Gaps Found:** {total_gaps}
|
|
213
|
+
- Critical: {N}
|
|
214
|
+
- High: {N}
|
|
215
|
+
- Medium: {N}
|
|
216
|
+
- Low: {N}
|
|
217
|
+
- Info: {N}
|
|
218
|
+
|
|
219
|
+
**Report saved to:** `{outputFile}`
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
**Recommended next step:**
|
|
224
|
+
|
|
225
|
+
{IF PASS:}
|
|
226
|
+
**export-skill** — This skill is ready for export. Run the export-skill workflow to package it for distribution.
|
|
227
|
+
|
|
228
|
+
{IF PASS_WITH_DRIFT:}
|
|
229
|
+
**update-skill** — The skill scored above threshold, but `--allow-workspace-drift` was in effect: the test ran against workspace HEAD, not `metadata.source_commit`. A conditional PASS is not trustworthy enough to export. Re-sync the source tree to the pinned commit (or re-extract against current HEAD) and re-run test-skill without the drift override before exporting.
|
|
230
|
+
|
|
231
|
+
{IF FAIL:}
|
|
232
|
+
**update-skill** — This skill needs remediation. Review the gap report above and run the update-skill workflow to address the {N} blocking issues (Critical + High).
|
|
233
|
+
|
|
234
|
+
{IF INCONCLUSIVE:}
|
|
235
|
+
**manual-review** — The evidence base was too thin to grade automatically. See `inconclusiveReasons` in the Completeness Score section. Typical fixes: upgrade forge tier, enable external validators, or re-extract with a wider scope. Do NOT export.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
**See Discovery Quality section in the report for description optimization and realistic prompt testing recommendations.**
|
|
240
|
+
|
|
241
|
+
**Test report finalized.**"
|
|
242
|
+
|
|
243
|
+
### 6b. Headless Exit Status (S7)
|
|
244
|
+
|
|
245
|
+
If `{headless_mode}`:
|
|
246
|
+
- `testResult: 'pass'` → `exit 0`
|
|
247
|
+
- `testResult: 'pass-with-drift'` → `exit 4` (distinct from clean pass — orchestrators MUST route to re-test-against-pinned-commit queues and refuse export; never exit 0 under drift override)
|
|
248
|
+
- `testResult: 'fail'` → `exit 2` (after the result contract has been written in §4c — never before)
|
|
249
|
+
- `testResult: 'inconclusive'` → `exit 3` (distinct from fail so orchestrators can route to manual-review queues)
|
|
250
|
+
|
|
251
|
+
Non-headless mode always drops to the menu in §7.
|
|
252
|
+
|
|
253
|
+
### 7. Health-Check Dispatch + MENU OPTIONS
|
|
254
|
+
|
|
255
|
+
Resolve `{healthCheckFile}` per H2: probe `{healthCheckProbeOrder}` in order. **HALT** if neither candidate exists — the health-check is the true terminal step; without it the workflow cannot complete honestly:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
Error: cannot locate shared/health-check.md at either of:
|
|
259
|
+
- {project-root}/_bmad/skf/shared/health-check.md
|
|
260
|
+
- {project-root}/src/shared/health-check.md
|
|
261
|
+
|
|
262
|
+
test-skill delegates its terminal step to the shared health-check. Install
|
|
263
|
+
the SKF module or run from a development checkout with src/ present.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Before displaying the menu, write the dispatch decision into the output report frontmatter (so the artifact records whether the health-check ran):
|
|
267
|
+
|
|
268
|
+
- `health_check_dispatched: true` — when the C menu choice will be taken (headless, or user will select C)
|
|
269
|
+
- `health_check_dispatched: false` — should be rare (only if operator explicitly skips, e.g. future flag)
|
|
270
|
+
|
|
271
|
+
Also mirror the boolean into the `healthCheckDispatched` field of the result contract written in §4c (re-write atomically via `{atomicWriteHelper}` if the dispatch decision is made after the initial contract write).
|
|
272
|
+
|
|
273
|
+
Display: "**Test complete.** [C] Finish"
|
|
274
|
+
|
|
275
|
+
#### Menu Handling Logic:
|
|
276
|
+
|
|
277
|
+
- IF C: Load, read the full file, and execute `{nextStepFile}` — the health-check step is the true terminal step of this workflow.
|
|
278
|
+
- IF Any other: help user respond, then redisplay menu
|
|
279
|
+
|
|
280
|
+
#### EXECUTION RULES:
|
|
281
|
+
|
|
282
|
+
- ALWAYS halt and wait for user input after presenting menu
|
|
283
|
+
- **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-continue past report menu"; set `health_check_dispatched: true` in frontmatter before chaining
|
|
284
|
+
- C triggers the health check, which is the true workflow exit
|
|
285
|
+
- User may ask questions about the report before finishing
|
|
286
|
+
|
|
287
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
288
|
+
|
|
289
|
+
When the user selects C, 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 test-skill workflow is fully done. The test report document at `{outputFile}` contains the full analysis: Test Summary, Coverage Analysis, Coherence Analysis, Completeness Score, and Gap Report.
|
|
290
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
# `{nextStepFile}` is resolved by probing both candidate roots in order.
|
|
3
|
+
# HALT if neither exists — step-06 §7 should have caught this already, but
|
|
4
|
+
# this step re-asserts the invariant at dispatch time.
|
|
5
|
+
nextStepFileProbeOrder:
|
|
6
|
+
- '{project-root}/_bmad/skf/shared/health-check.md'
|
|
7
|
+
- '{project-root}/src/shared/health-check.md'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Step 7: Workflow Health Check
|
|
11
|
+
|
|
12
|
+
## STEP GOAL:
|
|
13
|
+
|
|
14
|
+
Chain to the shared workflow self-improvement health check. This is the terminal step of test-skill — after the shared health check completes, the workflow is fully done.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- No user-facing reports, file writes, or result contracts in this step — those belong in step-06
|
|
19
|
+
- Delegate directly to the resolved health-check path with no additional commentary
|
|
20
|
+
- Do not attempt any other action between loading this step and executing the resolved file
|
|
21
|
+
|
|
22
|
+
## MANDATORY SEQUENCE
|
|
23
|
+
|
|
24
|
+
1. Probe `{nextStepFileProbeOrder}` in order. Use the FIRST path that exists as `{nextStepFile}`. HALT with the diagnostic from step-06 §7 if neither exists.
|
|
25
|
+
2. Load `{nextStepFile}`, read it fully, then execute it.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
workflowType: 'test-skill'
|
|
3
|
+
skillName: ''
|
|
4
|
+
skillDir: ''
|
|
5
|
+
runId: ''
|
|
6
|
+
testMode: ''
|
|
7
|
+
forgeTier: ''
|
|
8
|
+
testResult: ''
|
|
9
|
+
score: ''
|
|
10
|
+
threshold: ''
|
|
11
|
+
analysisConfidence: ''
|
|
12
|
+
toolingStatus: ''
|
|
13
|
+
workspaceDrift: ''
|
|
14
|
+
health_check_dispatched: false
|
|
15
|
+
testDate: ''
|
|
16
|
+
stepsCompleted: []
|
|
17
|
+
nextWorkflow: ''
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Test Report: {{skillName}}
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
Section order is LOAD-BEARING: step-05 §5 enforces it, step-06 §5 verifies
|
|
24
|
+
stepsCompleted against the canonical chain. Do not reorder or delete anchors.
|
|
25
|
+
|
|
26
|
+
Anchor / Step mapping:
|
|
27
|
+
Test Summary → step-02-detect-mode
|
|
28
|
+
Coverage Analysis → step-03-coverage-check
|
|
29
|
+
Coherence Analysis → step-04-coherence-check
|
|
30
|
+
External Validation→ step-04b-external-validators
|
|
31
|
+
Completeness Score → step-05-score
|
|
32
|
+
Gap Report → step-06-report (includes Discovery Quality subsection)
|
|
33
|
+
-->
|
|
34
|
+
|
|
35
|
+
## Test Summary
|
|
36
|
+
|
|
37
|
+
<!-- Populated by step-02-detect-mode §3 -->
|
|
38
|
+
|
|
39
|
+
## Coverage Analysis
|
|
40
|
+
|
|
41
|
+
<!-- Populated by step-03-coverage-check §5 -->
|
|
42
|
+
|
|
43
|
+
## Coherence Analysis
|
|
44
|
+
|
|
45
|
+
<!-- Populated by step-04-coherence-check §6 (naive or contextual variant) -->
|
|
46
|
+
|
|
47
|
+
## External Validation
|
|
48
|
+
|
|
49
|
+
<!-- Populated by step-04b-external-validators §5 -->
|
|
50
|
+
|
|
51
|
+
## Completeness Score
|
|
52
|
+
|
|
53
|
+
<!-- Populated by step-05-score §6 -->
|
|
54
|
+
|
|
55
|
+
## Gap Report
|
|
56
|
+
|
|
57
|
+
<!-- Populated by step-06-report §3-§4b (includes Discovery Quality subsection) -->
|
|
58
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skf-update-skill
|
|
3
|
+
description: Smart regeneration preserving [MANUAL] sections after source changes. Use when the user requests to "update a skill" or "regenerate a skill."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Update Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Surgically updates existing skills when source code changes, preserving all [MANUAL] developer content while re-extracting only affected exports with full provenance tracking. Only changed exports are re-extracted — unchanged content is never touched. Every regenerated instruction must trace to code with file:line citations. Stack skills (`skill_type: "stack"` in metadata.json) are not supported by surgical update — use `skf-create-stack-skill` to re-compose from updated constituents. If a stack skill is provided, this workflow exits with a redirect message.
|
|
11
|
+
|
|
12
|
+
## Role
|
|
13
|
+
|
|
14
|
+
You are a precision code analyst operating in Ferris Surgeon mode. This is a surgical operation, not an exploratory session. You bring AST-backed structural analysis and provenance-driven change detection expertise, while the source code provides the ground truth.
|
|
15
|
+
|
|
16
|
+
## Workflow Rules
|
|
17
|
+
|
|
18
|
+
These rules apply to every step in this workflow:
|
|
19
|
+
|
|
20
|
+
- Never hallucinate — every statement must have AST provenance
|
|
21
|
+
- [MANUAL] sections survive regeneration with zero content loss
|
|
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
|
+
- Always communicate in `{communication_language}`
|
|
26
|
+
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
|
|
27
|
+
|
|
28
|
+
## Stages
|
|
29
|
+
|
|
30
|
+
| # | Step | File | Auto-proceed |
|
|
31
|
+
|---|------|------|--------------|
|
|
32
|
+
| 1 | Initialize & Load | steps-c/step-01-init.md | No (confirm) |
|
|
33
|
+
| 2 | Detect Changes | steps-c/step-02-detect-changes.md | Yes |
|
|
34
|
+
| 3 | Re-Extract | steps-c/step-03-re-extract.md | Yes |
|
|
35
|
+
| 4 | Merge | steps-c/step-04-merge.md | Yes |
|
|
36
|
+
| 5 | Validate | steps-c/step-05-validate.md | Yes |
|
|
37
|
+
| 6 | Write | steps-c/step-06-write.md | Yes |
|
|
38
|
+
| 7 | Report | steps-c/step-07-report.md | Yes |
|
|
39
|
+
| 8 | Workflow Health Check | steps-c/step-08-health-check.md | Yes |
|
|
40
|
+
|
|
41
|
+
## Invocation Contract
|
|
42
|
+
|
|
43
|
+
| Aspect | Detail |
|
|
44
|
+
|--------|--------|
|
|
45
|
+
| **Inputs** | skill_name [required] |
|
|
46
|
+
| **Gates** | step-01: Confirm Gate [C] | step-04: Confirm Gate [C if clean merge, HALT if conflicts] |
|
|
47
|
+
| **Outputs** | Updated SKILL.md, updated provenance-map.json, evidence-report.md |
|
|
48
|
+
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
49
|
+
|
|
50
|
+
## On Activation
|
|
51
|
+
|
|
52
|
+
1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
|
|
53
|
+
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
54
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
55
|
+
|
|
56
|
+
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
|
|
57
|
+
|
|
58
|
+
3. Load, read the full file, and then execute `./steps-c/step-01-init.md` to begin the workflow.
|
package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md
RENAMED
|
@@ -27,12 +27,12 @@ It must be preserved during any update operation.
|
|
|
27
27
|
|
|
28
28
|
### Conflict Types
|
|
29
29
|
|
|
30
|
-
| Conflict
|
|
31
|
-
|
|
32
|
-
| Regenerated content overlaps [MANUAL] position | HIGH
|
|
33
|
-
| Parent section deleted
|
|
34
|
-
| [MANUAL] references deleted export
|
|
35
|
-
| New export inserted adjacent to [MANUAL]
|
|
30
|
+
| Conflict | Severity | Resolution |
|
|
31
|
+
|------------------------------------------------|----------|-------------------------------------------------------|
|
|
32
|
+
| Regenerated content overlaps [MANUAL] position | HIGH | Present both versions, user chooses |
|
|
33
|
+
| Parent section deleted | WARNING | Flag orphaned [MANUAL], user decides keep/remove |
|
|
34
|
+
| [MANUAL] references deleted export | MEDIUM | Flag stale reference, suggest update |
|
|
35
|
+
| New export inserted adjacent to [MANUAL] | LOW | Auto-resolve: place new content before [MANUAL] block |
|
|
36
36
|
|
|
37
37
|
### Preservation Algorithm
|
|
38
38
|
|
package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md
RENAMED
|
@@ -55,8 +55,8 @@ For stack skills with multi-file outputs:
|
|
|
55
55
|
|
|
56
56
|
## Conflict Resolution Strategies
|
|
57
57
|
|
|
58
|
-
| Strategy
|
|
59
|
-
|
|
60
|
-
| Auto-resolve | No [MANUAL] conflicts, clean merge
|
|
61
|
-
| User-resolve | [MANUAL] conflicts detected
|
|
62
|
-
| Abort
|
|
58
|
+
| Strategy | When | Action |
|
|
59
|
+
|--------------|-------------------------------------|-------------------------------------------|
|
|
60
|
+
| Auto-resolve | No [MANUAL] conflicts, clean merge | Proceed without user input |
|
|
61
|
+
| User-resolve | [MANUAL] conflicts detected | Halt, present conflicts, require decision |
|
|
62
|
+
| Abort | Critical structural incompatibility | Stop workflow, recommend full re-creation |
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Remote Source Resolution (Forge/Deep Tier)
|
|
2
|
+
|
|
3
|
+
If `source_root` is a local path: proceed with the tier-appropriate strategy as normal.
|
|
4
|
+
|
|
5
|
+
If `source_root` (from metadata.json) is a remote URL (GitHub URL or owner/repo format) AND tier is Forge or Deep:
|
|
6
|
+
|
|
7
|
+
1. **Check `git` availability:** Verify `git` is functional (`git --version`). If `git` is not available, skip to the fallback warning below.
|
|
8
|
+
|
|
9
|
+
2. **Resolve source ref:** Read `source_ref` from the existing `metadata.json`. If the user provided a new `target_version`, resolve its tag first (using the Tag Resolution algorithm in `create-skill/references/source-resolution-protocols.md`).
|
|
10
|
+
|
|
11
|
+
**Note — implicit tag resolution is NOT re-run on update:** `create-skill`'s Implicit Tag Resolution path (which treats `brief.version` as an implicit `target_version` for remote sources) runs only at create time. On update, `skf-update-skill` faithfully re-uses the `source_ref` that was stored in `metadata.json` by the original create — even if that ref is `HEAD` and the brief now has a `version` that would resolve to a tag. This preserves the invariant that an update reflects source drift on the same ref the skill was originally built against, not a re-pinning to a different commit. If the intent is to re-pin an older HEAD-based skill to a tag derived from `brief.version`, re-run `skf-create-skill` (which applies implicit resolution) rather than `skf-update-skill`. Explicit re-pinning via a new `target_version` on update remains supported and takes priority over the stored `source_ref`.
|
|
12
|
+
|
|
13
|
+
3. **Workspace check:** Compute the workspace path using the same algorithm as `create-skill/references/source-resolution-protocols.md` (parse URL → `{workspace_root}/repos/{host}/{owner}/{repo}/`).
|
|
14
|
+
|
|
15
|
+
**If workspace repo exists (`{workspace_repo_path}/.git/` present):**
|
|
16
|
+
|
|
17
|
+
Fetch and checkout the requested ref. For update-skill, `changed_files_from_manifest` scoping happens at extraction time via file-level filtering — the workspace has a full checkout.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
git -C "{workspace_repo_path}" fetch origin {source_ref}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Check if checkout is needed — skip if the requested ref is already checked out:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
current_head = git -C "{workspace_repo_path}" rev-parse HEAD
|
|
27
|
+
fetched_head = git -C "{workspace_repo_path}" rev-parse FETCH_HEAD
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If `current_head != fetched_head`:
|
|
31
|
+
```
|
|
32
|
+
git -C "{workspace_repo_path}" -c advice.detachedHead=false checkout FETCH_HEAD
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Set `remote_clone_path = {workspace_repo_path}`, `remote_clone_type = "workspace"`.
|
|
36
|
+
|
|
37
|
+
**If workspace repo does NOT exist:**
|
|
38
|
+
|
|
39
|
+
Clone into workspace. Create the parent directory first:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
mkdir -p "{workspace_root}/repos/{host}/{owner}/"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Clone with the appropriate branch flag — `--branch` is only valid for real branch/tag names, not for `HEAD`:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
# If source_ref is a real branch or tag (not HEAD/null/"local"):
|
|
49
|
+
git clone --depth 1 --branch {source_ref} --single-branch "{source_repo}" "{workspace_repo_path}"
|
|
50
|
+
|
|
51
|
+
# If source_ref is HEAD or not set (default branch):
|
|
52
|
+
git clone --depth 1 --single-branch "{source_repo}" "{workspace_repo_path}"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Set `remote_clone_path = {workspace_repo_path}`, `remote_clone_type = "workspace"`.
|
|
56
|
+
|
|
57
|
+
**On any workspace failure:** Fall back to ephemeral clone:
|
|
58
|
+
```
|
|
59
|
+
temp_path = {system_temp}/skf-ephemeral-{skill-name}-{timestamp}/
|
|
60
|
+
|
|
61
|
+
# If source_ref is a real branch or tag (not HEAD/null/"local"):
|
|
62
|
+
git clone --depth 1 --branch {source_ref} --single-branch --filter=blob:none "{source_root}" "{temp_path}"
|
|
63
|
+
|
|
64
|
+
# If source_ref is HEAD or not set (default branch):
|
|
65
|
+
git clone --depth 1 --single-branch --filter=blob:none "{source_root}" "{temp_path}"
|
|
66
|
+
```
|
|
67
|
+
Set `remote_clone_path = {temp_path}`, `remote_clone_type = "ephemeral"`.
|
|
68
|
+
|
|
69
|
+
4. **If clone/fetch succeeds:** Set `source_root = {remote_clone_path}` — this updates the working source path for all subsequent operations. Apply `changed_files_from_manifest` as file-level filters at extraction time. Proceed with the **Forge tier** extraction strategy below.
|
|
70
|
+
|
|
71
|
+
5. **If all cloning fails (workspace AND ephemeral):**
|
|
72
|
+
|
|
73
|
+
Warning message: "Clone of `{source_root}` failed: {error}. Degrading to source reading (T1-low) for this run. For T1 (AST-verified) confidence, clone the repository locally and re-run [CS] Create Skill with the local path, then re-run this update."
|
|
74
|
+
|
|
75
|
+
Override the extraction strategy to Quick tier for this run. Note the degradation reason in context for the evidence report.
|
|
76
|
+
|
|
77
|
+
## Remote Clone Cleanup
|
|
78
|
+
|
|
79
|
+
After extraction is complete for all files in scope (whether successful or partially failed), before presenting the extraction summary:
|
|
80
|
+
|
|
81
|
+
- **If `remote_clone_type == "ephemeral"`:** Reset the working directory first (`cd "{project-root}"` using the absolute path captured at workflow start), then delete the `{temp_path}` directory (`rm -rf "{temp_path}"`). Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed.
|
|
82
|
+
- **If `remote_clone_type == "workspace"`:** No cleanup. The workspace checkout persists for future forges and updates.
|
|
83
|
+
|
|
84
|
+
## Version Reconciliation
|
|
85
|
+
|
|
86
|
+
After the source path is accessible, check whether the source version has changed since the original skill was created. Look for the version file matching the detected language (e.g., `pyproject.toml`, `package.json`, `Cargo.toml`). If the source version differs from the current `metadata.json` version, record `source_version_detected` in context for step-06 to use when updating `metadata.json`. No warning needed here — step-06 handles the version update.
|
|
87
|
+
|
|
88
|
+
## AST Tool Unavailability (Local Source)
|
|
89
|
+
|
|
90
|
+
If AST tool is unavailable at Forge/Deep tier with local source:
|
|
91
|
+
|
|
92
|
+
Warning message: "AST tools are unavailable — extraction will use source reading (T1-low). Run [SF] Setup Forge to detect and configure AST tools for T1 confidence."
|
|
93
|
+
|
|
94
|
+
Degrade to Quick tier extraction. Note the degradation reason in context for the evidence report.
|