bmad-module-skill-forge 0.10.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/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 +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 -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,278 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-07-report.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step 6: Write Updated Files
|
|
6
|
+
|
|
7
|
+
## STEP GOAL:
|
|
8
|
+
|
|
9
|
+
Verify the merged SKILL.md and stack reference files that step-04 section 6b wrote to disk, then write the derived artifacts (metadata.json, provenance-map.json, evidence-report.md, context-snippet.md, and the active symlink).
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Focus only on verifying merged files and writing derived artifacts — merge content was already written in step-04
|
|
14
|
+
- Do not modify merged SKILL.md content — any mismatch detected during verification triggers HALT, not repair
|
|
15
|
+
- Do not skip provenance map update — critical for future audits
|
|
16
|
+
- HALT immediately on verification failure before writing any derived artifact — a partial-write skill package is worse than an unchanged one
|
|
17
|
+
|
|
18
|
+
## MANDATORY SEQUENCE
|
|
19
|
+
|
|
20
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
21
|
+
|
|
22
|
+
### 0. Description Guard Protocol
|
|
23
|
+
|
|
24
|
+
**Used by:** §7 (`skill-check check --fix` and `skill-check split-body --write`), and any future tool invocation that may modify SKILL.md's frontmatter on disk.
|
|
25
|
+
|
|
26
|
+
External validators occasionally rewrite the frontmatter `description` field — `skill-check --fix` may replace it with a generic or truncated version, and `split-body` may touch it during mechanical restructuring. The merged description written to disk in step-04 is **authoritative**: it reflects the final merge of the prior skill's description (with any author edits preserved) and fresh re-extraction results. Losing it to a tool's well-meaning rewrite breaks discovery quality and — if the prior skill was compiled from a sanitized description (step-05 §2a) — can re-introduce angle-bracket tokens that then fail tessl on the next run.
|
|
27
|
+
|
|
28
|
+
To prevent this, any tool invocation in §7 that may touch SKILL.md must run inside the following four-phase guard:
|
|
29
|
+
|
|
30
|
+
1. **Capture.** Before invoking the tool, read `{skill_package}/SKILL.md` frontmatter and snapshot the exact `description` value into a local variable (e.g., `guarded_description`). Capture the in-context copy as well.
|
|
31
|
+
2. **Execute.** Run the tool as specified in its section.
|
|
32
|
+
3. **Verify.** After the tool completes, re-read the on-disk SKILL.md and compare its frontmatter `description` against `guarded_description`. Normalize whitespace for comparison (trim leading/trailing whitespace, collapse internal runs) but do not ignore content differences.
|
|
33
|
+
4. **Restore on divergence.** If the post-tool description differs from `guarded_description` in any way other than whitespace normalization, write `guarded_description` back to the on-disk SKILL.md frontmatter and update the in-context copy to match. Record `description_guard_restored: true` with the tool name in context for the evidence report.
|
|
34
|
+
|
|
35
|
+
**What counts as divergence:**
|
|
36
|
+
|
|
37
|
+
- The description was replaced (different content).
|
|
38
|
+
- The description was truncated (suffix missing).
|
|
39
|
+
- Angle-bracket tokens were re-introduced (should never happen if the prior skill was correctly sanitized, but protect anyway).
|
|
40
|
+
- The field was deleted entirely (extreme tool behavior).
|
|
41
|
+
|
|
42
|
+
**What does NOT count as divergence:** whitespace-only differences (trailing newline, trimmed spaces) — treat as equivalent.
|
|
43
|
+
|
|
44
|
+
**Why this lives in update-skill too:** the guard protocol was first introduced in `skf-create-skill/step-06-validate.md §0` to defend the freshly-compiled description. Update-skill runs the identical `skill-check check --fix` command against the merged skill package in §7, so it faces the same risk and needs the same defense. Keep the two §0 protocols functionally identical — if external tool behavior changes, update both workflows.
|
|
45
|
+
|
|
46
|
+
### 1. Verify SKILL.md Write
|
|
47
|
+
|
|
48
|
+
SKILL.md was written in step-04 section 6b. Verify the write landed intact before proceeding to any derived-artifact writes.
|
|
49
|
+
|
|
50
|
+
- Read `{skill_package}/SKILL.md` from disk
|
|
51
|
+
- Count `<!-- [MANUAL:*] -->` opening markers and compare against the [MANUAL] inventory captured in step-01
|
|
52
|
+
- Verify the resolved `{skill_package}` path matches the version directory step-04 wrote to (if the version changed, step-04 updated `{skill_package}` in context to point at the new path)
|
|
53
|
+
- If [MANUAL] count matches and path resolves: proceed to section 2
|
|
54
|
+
- **If [MANUAL] count does not match: HALT immediately.** Do not write `metadata.json`, `provenance-map.json`, or any other artifact — further writes would compound the inconsistency. Alert the user:
|
|
55
|
+
|
|
56
|
+
"**[MANUAL] section count mismatch after write.** Expected {N} from step-01 inventory, found {M} on disk at `{skill_package}/SKILL.md`. The skill package is in an inconsistent state. Manual recovery required — restore the previous version from `{skill_group}/{previous_version}/` or fix the file in place, then re-run update-skill."
|
|
57
|
+
|
|
58
|
+
### 2. Write Updated metadata.json
|
|
59
|
+
|
|
60
|
+
Update `{skill_package}/metadata.json`:
|
|
61
|
+
- Update `version`: **if `update_mode == "gap-driven"`, do not bump — the skill is being repaired against the same source commit, so leave `version` unchanged and update only `generation_date` / `last_update` below.** This keeps metadata `version` consistent with the on-disk `{skill_package}` path, which step-04 §6b also leaves unchanged in gap-driven mode (see step-04 §6b's "If the source version detected during step-03 differs..." carve-out — in gap-driven mode no source version is detected, so step-04 writes into the existing version directory). Otherwise, if a source version was detected during re-extraction and differs from the current metadata version, use the source version; otherwise increment patch version
|
|
62
|
+
- Update `generation_date` timestamp to current ISO-8601 date
|
|
63
|
+
- Update `exports` array to reflect current export list
|
|
64
|
+
- Update `stats` from re-extraction results:
|
|
65
|
+
- `exports_documented`: count of exports with documentation in the merged skill
|
|
66
|
+
- `exports_public_api`: count of exports from public entry points (`__init__.py`, `index.ts`, `lib.rs`, or equivalent)
|
|
67
|
+
- `exports_internal`: count of all other non-underscore-prefixed exports
|
|
68
|
+
- `exports_total`: `exports_public_api` + `exports_internal`
|
|
69
|
+
- `public_api_coverage`: `exports_documented / exports_public_api` (`null` if `exports_public_api` is 0)
|
|
70
|
+
- `total_coverage`: `exports_documented / exports_total` (`null` if `exports_total` is 0)
|
|
71
|
+
- Update `confidence_distribution` from re-extraction results:
|
|
72
|
+
- `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3`: update counts from re-extraction results
|
|
73
|
+
- `scripts_count`, `assets_count`: update from re-extraction results if scripts/assets changed
|
|
74
|
+
- For stack skills: update `library_count`, `integration_count` if changed
|
|
75
|
+
|
|
76
|
+
### 3. Write Updated provenance-map.json
|
|
77
|
+
|
|
78
|
+
Write to `{forge_version}/provenance-map.json`:
|
|
79
|
+
|
|
80
|
+
**If `no_reextraction == true` (gap-driven mode from step-03 section 0):**
|
|
81
|
+
Dispatch per-entry on the verification outcome recorded by step-03 — gap-driven runs produce a mix of `verified`, `moved`, `re-extracted`, and `unknown` outcomes, and each requires a different provenance-map write strategy:
|
|
82
|
+
|
|
83
|
+
- **`verified` exports**: no fresh extraction data exists — do NOT overwrite `confidence`, `extraction_method`, `ast_node_type`, `params[]`, `return_type`, `source_file`, or `source_line`. The provenance entry stays byte-identical.
|
|
84
|
+
- **`moved` exports**: update `source_line` (and `source_file` if different) to the new location recorded by the spot-check. Do not touch other fields.
|
|
85
|
+
- **`re-extracted` exports** (resolved via step-03 §0a's Targeted Re-Extraction Branch from `remediation_paths[]`): write a full entry — `source_file`, `source_line`, `confidence`, `extraction_method`, `ast_node_type`, `params[]`, `return_type` — from §0a's fresh AST extraction record. This is the only gap-driven outcome that produces normal-mode-quality provenance; do NOT fall through to the byte-identical preservation above.
|
|
86
|
+
- **`unknown` exports** (not in provenance map; no `source_citation`; `severity` is `Medium`, `Low`, or `Info`, OR `remediation_paths[]` was empty and §0a did not halt): add new entries with fields populated from step-04 merge output. `source_file`/`source_line` may be `null` here — leave these fields unset rather than writing stale values. **This path is only acceptable for `severity` in `Medium`, `Low`, or `Info`.** A Critical/High `unknown` reaching this branch indicates step-03 §0a was skipped or bypassed and is a workflow bug — step-03 §0a should have halted with status `halted-for-remediation-path` before step-06 ran. If you encounter one, halt with a pointer to §0a rather than writing null citations for a blocking gap.
|
|
87
|
+
- Skip the "For each export in the updated skill" bullets below — they apply only to normal re-extraction mode.
|
|
88
|
+
|
|
89
|
+
**For each export in the updated skill (normal mode only):**
|
|
90
|
+
- Update `export_name` if renamed
|
|
91
|
+
- Update `params[]` array if parameters changed (add, remove, or modify individual entries)
|
|
92
|
+
- Update `return_type` if changed
|
|
93
|
+
- Update `source_file` if moved
|
|
94
|
+
- Update `source_line` from fresh extraction
|
|
95
|
+
- Update `confidence` from extraction results
|
|
96
|
+
- Update `extraction_method` and `ast_node_type` if re-extracted with different tools
|
|
97
|
+
|
|
98
|
+
**For deleted exports:**
|
|
99
|
+
- Remove entry from provenance map
|
|
100
|
+
|
|
101
|
+
**For new exports:**
|
|
102
|
+
- Add new entry with full structured fields: `export_name`, `export_type`, `params[]`, `return_type`, `source_file`, `source_line`, `confidence`, `extraction_method`, `ast_node_type`
|
|
103
|
+
|
|
104
|
+
**For script/asset file changes (if `file_entries` exists):**
|
|
105
|
+
- MODIFIED_FILE: copy updated file to `scripts/` or `assets/`, update `content_hash` in `file_entries`
|
|
106
|
+
- DELETED_FILE: remove file from `scripts/` or `assets/`, remove entry from `file_entries`
|
|
107
|
+
- NEW_FILE: copy file to `scripts/` or `assets/`, add entry to `file_entries` with `file_name`, `file_type`, `source_file`, `confidence: "T1-low"`, `extraction_method: "file-copy"`, `content_hash`
|
|
108
|
+
|
|
109
|
+
**Add update operation metadata:**
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"last_update": "{current_date}",
|
|
113
|
+
"update_type": "{incremental if normal mode | full if degraded_mode}",
|
|
114
|
+
"files_changed": {count},
|
|
115
|
+
"exports_affected": {count},
|
|
116
|
+
"confidence_tier": "{tier}",
|
|
117
|
+
"manual_sections_preserved": {count}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 4. Write Updated evidence-report.md
|
|
122
|
+
|
|
123
|
+
Append update operation section to `{forge_version}/evidence-report.md` (create the file with a standard header if it does not yet exist):
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
## Update Operation — {current_date}
|
|
127
|
+
|
|
128
|
+
**Trigger:** {manual / audit-skill chain}
|
|
129
|
+
**Forge Tier:** {tier}
|
|
130
|
+
**Mode:** {normal / degraded}
|
|
131
|
+
|
|
132
|
+
### Changes Detected
|
|
133
|
+
- Files modified: {count}
|
|
134
|
+
- Files added: {count}
|
|
135
|
+
- Files deleted: {count}
|
|
136
|
+
- Exports affected: {total}
|
|
137
|
+
|
|
138
|
+
### Merge Results
|
|
139
|
+
- Exports updated: {count}
|
|
140
|
+
- Exports added: {count}
|
|
141
|
+
- Exports removed: {count}
|
|
142
|
+
- [MANUAL] sections preserved: {count}
|
|
143
|
+
- Conflicts resolved: {count}
|
|
144
|
+
|
|
145
|
+
### Validation Summary
|
|
146
|
+
- Spec compliance: {PASS/WARN/FAIL}
|
|
147
|
+
- [MANUAL] integrity: {PASS/WARN/FAIL}
|
|
148
|
+
- Confidence tiers: {PASS/WARN/FAIL}
|
|
149
|
+
- Provenance: {PASS/WARN/FAIL}
|
|
150
|
+
|
|
151
|
+
### Description Guard
|
|
152
|
+
- Restored: {true/false}
|
|
153
|
+
- Triggering tool: {tool_name or —}
|
|
154
|
+
- Original description preserved: {true/false}
|
|
155
|
+
- Notes: {one-sentence detail or —}
|
|
156
|
+
|
|
157
|
+
### Context Snippet
|
|
158
|
+
- Regenerated: {true/false}
|
|
159
|
+
- Triggers fired: {list or —}
|
|
160
|
+
- Notes: {one-sentence detail or —}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Description Guard population** (used by §7 Post-Write Validation when the §0 protocol fires): fill all four fields from context when `description_guard_restored == true` (triggering tool, whether restore succeeded, what changed). When `Restored: false`, the other three fields are `—` — this is the clean-run expected state. Same field semantics and populator logic as create-skill step-06 §8.
|
|
164
|
+
|
|
165
|
+
**Context Snippet population** (used by §5 after the staleness check runs): §4 writes the sub-block with placeholders; §5 updates the on-disk evidence report in place after deciding whether to regenerate. Set `Regenerated: true` and populate `Triggers fired` with any combination of `headline-exports`, `version`, `gotchas` when at least one trigger fired. Set `Regenerated: false` and `Triggers fired: —` when none fired (the gap-driven / internals-only outcome). Always fill `Notes` with a one-sentence reason (e.g., `"Gap-driven repair — no snippet surface changed"`, `"Version bumped 0.1.0 → 0.2.0; headline exports re-ranked"`).
|
|
166
|
+
|
|
167
|
+
### 5. Verify Stack Skill Reference File Writes (Conditional) and Regenerate context-snippet.md
|
|
168
|
+
|
|
169
|
+
**ONLY if skill_type == "stack":**
|
|
170
|
+
|
|
171
|
+
Stack reference files were written in step-04 section 6b. Verify each affected reference file that the merge produced:
|
|
172
|
+
|
|
173
|
+
- Read each `references/{library}.md` back from disk
|
|
174
|
+
- Read each `references/integrations/{pair}.md` back from disk
|
|
175
|
+
- Verify per-file [MANUAL] section counts match the per-file inventory captured in step-01
|
|
176
|
+
- **If any verification fails: HALT** using the same recovery protocol as section 1 — do not regenerate `context-snippet.md` or write any further derived artifact
|
|
177
|
+
|
|
178
|
+
**For all skills (both single and stack) — regenerate `context-snippet.md` if stale:**
|
|
179
|
+
|
|
180
|
+
`context-snippet.md` is a `{skill_package}` deliverable that goes stale whenever **headline exports**, **version**, or **gotchas** change in this run. Regenerate it only when at least one of these triggers fired; otherwise skip — a skip is the correct outcome for gap-driven repairs and other runs that touch internals below the snippet's surface, where regenerating would produce byte-identical content.
|
|
181
|
+
|
|
182
|
+
**Staleness triggers:**
|
|
183
|
+
|
|
184
|
+
- **Headline exports changed** — the top-K exports surfaced in the snippet differ from the prior snippet (a `NEW_EXPORT` was promoted into a headline slot, or a `MODIFIED_EXPORT` changed the signature/shape of a surfaced export).
|
|
185
|
+
- **Version changed** — §2 bumped `version` (normal mode with detected source drift; never fires in gap-driven mode per §2's carve-out).
|
|
186
|
+
- **Gotchas changed** — new gotchas surfaced from this run's evidence that were not in the prior snippet, or a prior gotcha was invalidated and removed.
|
|
187
|
+
|
|
188
|
+
**Record the decision on the on-disk evidence report:** open `{forge_version}/evidence-report.md` (written by §4 with placeholder values in the `### Context Snippet` sub-block) and update that sub-block under the Update Operation section just written. Set `Regenerated: true|false`, fill `Triggers fired:` with the list of triggers that fired (or `—` when none), and write a one-sentence `Notes:` entry. See §4's "Context Snippet population" note for field semantics.
|
|
189
|
+
|
|
190
|
+
**If no trigger fired:** skip regeneration — do not touch `context-snippet.md` on disk. The snippet remains valid against the prior run's surface. Continue to §5b.
|
|
191
|
+
|
|
192
|
+
**If at least one trigger fired:** regenerate the snippet using the format from the matching template file:
|
|
193
|
+
|
|
194
|
+
- For single skills: `skf-create-skill/assets/skill-sections.md` (pipe-delimited indexed format)
|
|
195
|
+
- For stack skills: `skf-create-stack-skill/assets/stack-skill-template.md`
|
|
196
|
+
|
|
197
|
+
Use the **flat draft form** for the `root:` path in the draft snippet: `root: skills/{skill-name}/`. The per-IDE skill root (e.g., `.claude/skills/`, `.windsurf/skills/`, `.github/skills/` — see `skf-export-skill/assets/managed-section-format.md`) is applied later by `export-skill` step-03 when the skill is exported. Do not choose an IDE-specific prefix in update-skill — that is an export-time decision that depends on config.yaml.
|
|
198
|
+
|
|
199
|
+
Pull values for the regenerated snippet from the updated metadata.json (version, top exports), the merged SKILL.md (section anchors, inline summaries), and the evidence report (new gotchas). If gotchas cannot be derived from the updated evidence but the prior snippet has a `|gotchas:` line, carry forward the prior line with the `[CARRIED]` marker — see `skf-export-skill/steps-c/step-03-generate-snippet.md` for the carry-forward protocol (one-cycle limit).
|
|
200
|
+
|
|
201
|
+
Write the regenerated snippet to `{skill_package}/context-snippet.md`, preserving file permissions.
|
|
202
|
+
|
|
203
|
+
**If skill_type == "stack"**, also verify that the reference file updates from the first half of this section have been applied before writing the snippet so the stack snippet reflects the newest integration list.
|
|
204
|
+
|
|
205
|
+
### 5b. Update Active Symlink (If Version Changed)
|
|
206
|
+
|
|
207
|
+
If the version was incremented or changed in section 2 (metadata.json update):
|
|
208
|
+
- Create or update the `active` symlink at `{skill_group}/active` pointing to the new `{version}`
|
|
209
|
+
- If the symlink already exists, remove it first and recreate
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
{skill_group}/active -> {version}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
If the version did not change, the existing symlink already points to the correct version -- no action needed.
|
|
216
|
+
|
|
217
|
+
### 6. Verify Derived Artifact Writes
|
|
218
|
+
|
|
219
|
+
SKILL.md was verified in section 1 and stack reference files in section 5 (both written by step-04 section 6b). This section verifies the artifacts this step wrote: `metadata.json`, `provenance-map.json`, `evidence-report.md`, `context-snippet.md`, and the `active` symlink from §5b.
|
|
220
|
+
|
|
221
|
+
For each derived artifact:
|
|
222
|
+
- Read back the file
|
|
223
|
+
- Confirm content matches expected output
|
|
224
|
+
- Report verification status
|
|
225
|
+
|
|
226
|
+
**Active symlink verification:** resolve `readlink({skill_group}/active)` and assert it equals the `version` just written to `metadata.json` in §2. This closes the §5b gap where a silent skip would otherwise leave the manifest and symlink divergent — the symlink is the fallback resolver for consumers that don't read the manifest (see `knowledge/version-paths.md` §Reading Workflows step 5), so a mismatch must fail the step, not warn. Applies in every mode — gap-driven runs do not bump `version`, but the symlink must still point to the current `version`, otherwise a prior partial run left it pointing elsewhere.
|
|
227
|
+
|
|
228
|
+
"**Write Verification:**
|
|
229
|
+
|
|
230
|
+
| File | Status |
|
|
231
|
+
|------|--------|
|
|
232
|
+
| SKILL.md | {VERIFIED in section 1} |
|
|
233
|
+
| metadata.json | {VERIFIED/FAILED} |
|
|
234
|
+
| provenance-map.json | {VERIFIED/FAILED} |
|
|
235
|
+
| evidence-report.md | {VERIFIED/FAILED} |
|
|
236
|
+
| context-snippet.md | {VERIFIED/FAILED} |
|
|
237
|
+
| {skill_group}/active symlink | {VERIFIED/FAILED} (readlink → {resolved_version}, expected {version}) |
|
|
238
|
+
| {stack reference files...} | {VERIFIED in section 5} |
|
|
239
|
+
|
|
240
|
+
**On symlink FAILED:** HALT. Do not proceed to §7 post-write validation or §8 menu. Alert the user: "**Active symlink divergence.** `{skill_group}/active` resolves to `{resolved_version}` but `metadata.json` reports `version: {version}`. §5b did not apply. Re-point the symlink manually (`ln -sfn {version} {skill_group}/active`) or re-run update-skill, then re-verify." This matches the severity of the other four artifact checks — silent divergence here mis-routes any downstream consumer that uses the symlink fallback.
|
|
241
|
+
|
|
242
|
+
**All files written and verified.**"
|
|
243
|
+
|
|
244
|
+
### 7. Run Post-Write Validation (Deferred from Step 05)
|
|
245
|
+
|
|
246
|
+
External tool checks deferred from step-05 now run against the written files.
|
|
247
|
+
|
|
248
|
+
**Description Guard Protocol:** every invocation below that may modify SKILL.md (`skill-check check --fix` and any `split-body` write) must run inside the four-phase guard defined in §0. Capture `guarded_description` before each call, execute, verify against the post-tool description, and restore on divergence. Do not rely on per-call ad-hoc preservation logic — use the §0 protocol.
|
|
249
|
+
|
|
250
|
+
**If skill-check available:**
|
|
251
|
+
|
|
252
|
+
- Run: `npx skill-check check {skill_package} --fix --format json --no-security-scan` **inside the §0 guard**.
|
|
253
|
+
- **Context sync after --fix:** If `fixed[]` is non-empty (i.e., `--fix` modified files on disk), re-read the modified SKILL.md to update the in-context copy. This prevents silent divergence between the in-context SKILL.md and the on-disk version that step-07-report will reference. The §0 guard has already restored `description` if divergent; the re-read picks up any other fix-corrected content.
|
|
254
|
+
- If `body.max_lines` reported, prefer selective split — extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 inline (inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval). **If falling back to `npx skill-check split-body {skill_package} --write`, run it inside the §0 guard** — split-body can also touch frontmatter. Verify anchors resolve after split.
|
|
255
|
+
- Run: `npx skill-check diff` if original version was preserved.
|
|
256
|
+
- Run: `npx skill-check check {skill_package} --format json` for security scan. (Read-only; guard not required.)
|
|
257
|
+
|
|
258
|
+
Record findings in the evidence report (section 4), including any `description_guard_restored` events recorded by the §0 protocol. These are advisory — do not block on warnings.
|
|
259
|
+
|
|
260
|
+
**If skill-check unavailable:** Skip with note — structural checks from step-05 are sufficient.
|
|
261
|
+
|
|
262
|
+
### 8. Present MENU OPTIONS
|
|
263
|
+
|
|
264
|
+
Display: "**Proceeding to report...**"
|
|
265
|
+
|
|
266
|
+
#### Menu Handling Logic:
|
|
267
|
+
|
|
268
|
+
- After all writes verified and post-write validation complete, immediately load, read entire file, then execute {nextStepFile}
|
|
269
|
+
|
|
270
|
+
#### EXECUTION RULES:
|
|
271
|
+
|
|
272
|
+
- This is an auto-proceed step with no user choices
|
|
273
|
+
- Proceed directly to report after verification
|
|
274
|
+
|
|
275
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
276
|
+
|
|
277
|
+
ONLY WHEN all files have been written and verified will you load {nextStepFile} to display the change report.
|
|
278
|
+
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: 'Display comprehensive change summary with diff visualization and workflow chaining recommendations'
|
|
4
|
-
nextStepFile: '../../shared/health-check.md'
|
|
2
|
+
nextStepFile: './step-08-health-check.md'
|
|
5
3
|
---
|
|
6
4
|
|
|
7
5
|
# Step 7: Report
|
|
@@ -10,41 +8,11 @@ nextStepFile: '../../shared/health-check.md'
|
|
|
10
8
|
|
|
11
9
|
Present a comprehensive change summary showing what was updated, [MANUAL] sections preserved, confidence tier breakdown, and recommend next workflow actions in the SKF chain.
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Rules
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
19
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
20
|
-
- ⚙️ 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
|
|
21
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
22
|
-
|
|
23
|
-
### Role Reinforcement:
|
|
24
|
-
|
|
25
|
-
- ✅ You are a precision code analyst operating in Surgeon mode
|
|
26
|
-
- ✅ Report factually — no embellishment, no speculation
|
|
27
|
-
- ✅ Every reported metric must trace to actual operations performed
|
|
28
|
-
- ✅ Recommendations based on validation results and workflow chaining contracts
|
|
29
|
-
|
|
30
|
-
### Step-Specific Rules:
|
|
31
|
-
|
|
32
|
-
- 🎯 Focus ONLY on reporting — all operations are complete
|
|
33
|
-
- 🚫 FORBIDDEN to modify any files — report is read-only display
|
|
34
|
-
- 💬 Present clear, actionable summary with next step recommendations
|
|
35
|
-
|
|
36
|
-
## EXECUTION PROTOCOLS:
|
|
37
|
-
|
|
38
|
-
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
39
|
-
- 💾 No file writes — display only
|
|
40
|
-
- 📖 Chains to shared health check via `{nextStepFile}` — no further steps after that
|
|
41
|
-
|
|
42
|
-
## CONTEXT BOUNDARIES:
|
|
43
|
-
|
|
44
|
-
- Available: all results from steps 01-06 (baseline, change manifest, extraction results, merge results, validation results, write verification)
|
|
45
|
-
- Focus: summary and recommendations
|
|
46
|
-
- Limits: display only — no modifications
|
|
47
|
-
- Dependencies: all previous steps must be complete (or no-change shortcut from step 02)
|
|
13
|
+
- Focus only on reporting — all operations are complete; do not modify any files
|
|
14
|
+
- Present clear, actionable summary with next step recommendations
|
|
15
|
+
- Chains to the local health-check step via `{nextStepFile}` after completion — the user-facing summary is NOT the terminal step
|
|
48
16
|
|
|
49
17
|
## MANDATORY SEQUENCE
|
|
50
18
|
|
|
@@ -65,7 +33,7 @@ Source code matches provenance map exactly. The skill `{skill_name}` is current
|
|
|
65
33
|
|
|
66
34
|
**Recommendation:** No action required. Run audit-skill periodically to monitor for drift."
|
|
67
35
|
|
|
68
|
-
→ Load and execute `{nextStepFile}`
|
|
36
|
+
→ Load, read the full file, and execute `{nextStepFile}` — the health-check step is the true terminal step of this workflow.
|
|
69
37
|
|
|
70
38
|
### 2. Present Change Summary
|
|
71
39
|
|
|
@@ -149,7 +117,7 @@ Source code matches provenance map exactly. The skill `{skill_name}` is current
|
|
|
149
117
|
| `{forge_version}/evidence-report.md` | Appended |
|
|
150
118
|
| {stack reference files if applicable} | Updated |
|
|
151
119
|
|
|
152
|
-
Where `{resolved_skill_package}` = `{skills_output_folder}/{skill_name}/{version}/{skill_name}/` and `{forge_version}` = `{forge_data_folder}/{skill_name}/{version}/` — see
|
|
120
|
+
Where `{resolved_skill_package}` = `{skills_output_folder}/{skill_name}/{version}/{skill_name}/` and `{forge_version}` = `{forge_data_folder}/{skill_name}/{version}/` — see `knowledge/version-paths.md`."
|
|
153
121
|
|
|
154
122
|
### 5. Workflow Chaining Recommendations
|
|
155
123
|
|
|
@@ -170,37 +138,11 @@ Based on the update results:"
|
|
|
170
138
|
"- **audit-skill** — Re-run to verify CRITICAL/HIGH drift resolved
|
|
171
139
|
- **export-skill** — Package once audit confirms clean state"
|
|
172
140
|
|
|
173
|
-
###
|
|
174
|
-
|
|
175
|
-
"---
|
|
176
|
-
|
|
177
|
-
**Update-skill workflow complete for `{skill_name}`.**"
|
|
178
|
-
|
|
179
|
-
### 7. Workflow Health Check
|
|
180
|
-
|
|
181
|
-
Load and execute `{nextStepFile}` for workflow self-improvement check.
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
186
|
-
|
|
187
|
-
### ✅ SUCCESS:
|
|
141
|
+
### 5b. Result Contract
|
|
188
142
|
|
|
189
|
-
-
|
|
190
|
-
- Change categories broken down clearly
|
|
191
|
-
- Confidence tier breakdown reported
|
|
192
|
-
- [MANUAL] preservation status confirmed
|
|
193
|
-
- Validation findings presented if any
|
|
194
|
-
- Files written listed with paths
|
|
195
|
-
- Workflow chaining recommendations provided
|
|
196
|
-
- No-change shortcut handled correctly
|
|
143
|
+
Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{forge_version}/update-skill-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{forge_version}/update-skill-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include all modified file paths in `outputs`; include `exports_affected`, `files_modified`, and `validation_status` (passed/warnings/failures) in `summary`.
|
|
197
144
|
|
|
198
|
-
###
|
|
145
|
+
### 6. Chain to Health Check
|
|
199
146
|
|
|
200
|
-
-
|
|
201
|
-
- Not reporting [MANUAL] preservation status
|
|
202
|
-
- Not providing workflow chaining recommendations
|
|
203
|
-
- Modifying any files during reporting
|
|
204
|
-
- Not handling the no-change shortcut from step 02
|
|
147
|
+
ONLY WHEN the change summary has been presented, files-written list displayed, and 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.
|
|
205
148
|
|
|
206
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -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 8: 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 update-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-07
|
|
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,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skf-verify-stack
|
|
3
|
+
description: Pre-code stack feasibility verification against architecture and PRD documents. Use when the user requests to "verify a tech stack" or "verify stack."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify Stack
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Cross-references generated skills against architecture and PRD documents to produce a feasibility report with evidence-backed integration verdicts, coverage analysis, and requirements mapping. This is a read-only workflow — it never modifies skills or input documents, only reads and produces a feasibility report. Every verdict must cite specific APIs, types, or function signatures from the generated skills.
|
|
11
|
+
|
|
12
|
+
**Schema contract:** This skill is the PRODUCER of the feasibility report schema defined in `src/shared/references/feasibility-report-schema.md`. All report outputs emit `schemaVersion: "1.0"` in frontmatter, use only the defined verdict tokens (`Verified|Plausible|Risky|Blocked` per pair; `FEASIBLE|CONDITIONALLY_FEASIBLE|NOT_FEASIBLE` overall), follow the fixed section-heading order, and are written through `src/shared/scripts/skf-atomic-write.py write` to both the timestamped file and the stable `-latest.md` copy.
|
|
13
|
+
|
|
14
|
+
## Role
|
|
15
|
+
|
|
16
|
+
You are a stack feasibility analyst and integration verifier operating in Ferris Audit mode. You bring expertise in API surface analysis, cross-library compatibility assessment, and architecture validation, while the user brings their architecture vision and generated skills.
|
|
17
|
+
|
|
18
|
+
## Workflow Rules
|
|
19
|
+
|
|
20
|
+
These rules apply to every step in this workflow:
|
|
21
|
+
|
|
22
|
+
- Read-only — never modify skills, architecture docs, or PRD files
|
|
23
|
+
- Every verdict must cite evidence from the generated skills
|
|
24
|
+
- Read each step file completely before taking any action
|
|
25
|
+
- Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
|
|
26
|
+
- Only load one step file at a time — never preload future steps
|
|
27
|
+
- If any instruction references a subprocess or tool you lack, achieve the outcome in your main context thread
|
|
28
|
+
- Always communicate in `{communication_language}`
|
|
29
|
+
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
|
|
30
|
+
|
|
31
|
+
## Stages
|
|
32
|
+
|
|
33
|
+
| # | Step | File | Auto-proceed |
|
|
34
|
+
|---|------|------|--------------|
|
|
35
|
+
| 1 | Initialize & Load Inputs | steps-c/step-01-init.md | No (confirm) |
|
|
36
|
+
| 2 | Coverage Analysis | steps-c/step-02-coverage.md | Yes |
|
|
37
|
+
| 3 | Integration Verification | steps-c/step-03-integrations.md | Yes |
|
|
38
|
+
| 4 | Requirements Mapping | steps-c/step-04-requirements.md | Yes |
|
|
39
|
+
| 5 | Synthesize Verdict | steps-c/step-05-synthesize.md | Yes |
|
|
40
|
+
| 6 | Report | steps-c/step-06-report.md | No (confirm) |
|
|
41
|
+
| 7 | Workflow Health Check | steps-c/step-07-health-check.md | Yes |
|
|
42
|
+
|
|
43
|
+
## Invocation Contract
|
|
44
|
+
|
|
45
|
+
| Aspect | Detail |
|
|
46
|
+
|--------|--------|
|
|
47
|
+
| **Inputs** | architecture_doc_path [required], prd_path [optional] |
|
|
48
|
+
| **Gates** | step-01: Input Gate [use args] | step-06: Confirm Gate [C] |
|
|
49
|
+
| **Outputs** | `feasibility-report-{projectSlug}-{timestamp}.md` and `feasibility-report-{projectSlug}-latest.md` (copy, not symlink) per `src/shared/references/feasibility-report-schema.md` — with integration verdicts, coverage analysis, recommendations, and evidence sources |
|
|
50
|
+
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
51
|
+
|
|
52
|
+
## On Activation
|
|
53
|
+
|
|
54
|
+
1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
|
|
55
|
+
- `project_name`, `user_name`, `communication_language`
|
|
56
|
+
- `skills_output_folder`, `forge_data_folder`, `document_output_language`
|
|
57
|
+
|
|
58
|
+
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
|
|
59
|
+
|
|
60
|
+
3. Load, read the full file, and then execute `./steps-c/step-01-init.md` to begin the workflow.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
schemaVersion: "1.0"
|
|
3
|
+
reportType: feasibility
|
|
4
|
+
projectName: ""
|
|
5
|
+
projectSlug: ""
|
|
6
|
+
generatedAt: ""
|
|
7
|
+
generatedBy: skf-verify-stack
|
|
8
|
+
overallVerdict: "CONDITIONALLY_FEASIBLE"
|
|
9
|
+
coveragePercentage: 0
|
|
10
|
+
pairsVerified: 0
|
|
11
|
+
pairsPlausible: 0
|
|
12
|
+
pairsRisky: 0
|
|
13
|
+
pairsBlocked: 0
|
|
14
|
+
recommendationCount: 0
|
|
15
|
+
prdAvailable: false
|
|
16
|
+
# Producer-local bookkeeping (not part of the shared consumer contract):
|
|
17
|
+
workflowType: 'verify-stack'
|
|
18
|
+
architectureDoc: ''
|
|
19
|
+
prdDoc: ''
|
|
20
|
+
previousReport: ''
|
|
21
|
+
skillsAnalyzed: 0
|
|
22
|
+
stepsCompleted: []
|
|
23
|
+
requirementsPass: ''
|
|
24
|
+
requirementsFulfilled: null
|
|
25
|
+
requirementsPartial: null
|
|
26
|
+
requirementsNotAddressed: null
|
|
27
|
+
deltaImproved: null
|
|
28
|
+
deltaRegressed: null
|
|
29
|
+
deltaNew: null
|
|
30
|
+
deltaUnchanged: null
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Stack Feasibility Report: {projectName}
|
|
34
|
+
|
|
35
|
+
**Verification Date:** {generatedAt}
|
|
36
|
+
**Architecture Document:** {architectureDoc}
|
|
37
|
+
**PRD Document:** {prdDoc}
|
|
38
|
+
**Skills Analyzed:** {skillsAnalyzed}
|
|
39
|
+
|
|
40
|
+
> Schema contract: `src/shared/references/feasibility-report-schema.md` (schemaVersion `1.0`). Consumers MUST halt on `schemaVersion` mismatch.
|
|
41
|
+
|
|
42
|
+
## Executive Summary
|
|
43
|
+
|
|
44
|
+
**Overall Verdict:** {FEASIBLE | CONDITIONALLY_FEASIBLE | NOT_FEASIBLE}
|
|
45
|
+
|
|
46
|
+
{1-2 sentence summary}
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Coverage Analysis
|
|
51
|
+
|
|
52
|
+
<!-- Appended by step-02-coverage -->
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Integration Verdicts
|
|
57
|
+
|
|
58
|
+
<!-- Appended by step-03-integrations.
|
|
59
|
+
Consumers grep for the `## Integration Verdicts` heading to locate the pair table.
|
|
60
|
+
The table header is fixed and MUST be emitted exactly as shown below: -->
|
|
61
|
+
|
|
62
|
+
| lib_a | lib_b | verdict | rationale |
|
|
63
|
+
|-------|-------|---------|-----------|
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Recommendations
|
|
68
|
+
|
|
69
|
+
<!-- Appended by step-05-synthesize -->
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Evidence Sources
|
|
74
|
+
|
|
75
|
+
<!-- Appended by step-05-synthesize — cite each skill's SKILL.md path, metadata_schema_version,
|
|
76
|
+
confidence_tier, stack manifest (if any), and architecture/PRD doc paths -->
|
package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md
RENAMED
|
@@ -26,11 +26,19 @@ Parse document section headers for technology groupings:
|
|
|
26
26
|
|
|
27
27
|
### Coverage Verdict
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
29
|
+
The coverage matrix renders two verdict tokens per referenced technology: **Covered** and **Missing**. Extra skills (skills present in the inventory but NOT referenced by the architecture document) are tracked in a separate informational subdivision — they are not coverage verdicts and do not appear in the primary `Technology → Skill Match → Verdict` column. See step-02 §4 for the Extra-skill subdivision output.
|
|
30
|
+
|
|
31
|
+
| Verdict | Meaning |
|
|
32
|
+
|-------------|------------------------------------------------------------------|
|
|
33
|
+
| **Covered** | A generated skill exists in `skills/` for this technology |
|
|
32
34
|
| **Missing** | Technology is referenced in architecture doc but no skill exists |
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
**Informational — Extra skills subdivision (not a verdict; rendered in a separate section per step-02 §4):**
|
|
37
|
+
|
|
38
|
+
| Label | Meaning |
|
|
39
|
+
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
|
|
40
|
+
| **Extra (unreferenced)** | Skill exists with a resolvable `source_repo` / `source_root`, but no architecture tech token matches it |
|
|
41
|
+
| **Orphan (source_repo unresolvable)** | Skill's `source_repo` is empty, malformed, or its basename cannot be extracted — cross-reference against architecture impossible |
|
|
34
42
|
|
|
35
43
|
## Output Format
|
|
36
44
|
|