bmad-module-skill-forge 2.1.0 → 3.0.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 +1 -1
- package/README.md +51 -49
- package/docs/404.md +10 -8
- package/docs/_data/pinned.yaml +22 -13
- package/docs/_internal/STABILITY.md +58 -35
- package/docs/agents.md +39 -53
- package/docs/architecture.md +65 -51
- package/docs/bmad-synergy.md +53 -51
- package/docs/campaign.md +127 -75
- package/docs/concepts.md +34 -28
- package/docs/examples.md +70 -68
- package/docs/forge-auto.md +34 -31
- package/docs/getting-started.md +118 -57
- package/docs/how-it-works.md +25 -21
- package/docs/index.md +15 -15
- package/docs/skill-model.md +70 -59
- package/docs/troubleshooting.md +135 -18
- package/docs/verifying-a-skill.md +83 -57
- package/docs/why-skf.md +24 -22
- package/docs/workflows.md +274 -110
- package/package.json +18 -10
- package/src/forger/preferences.yaml +8 -1
- package/src/knowledge/agentskills-spec.md +2 -0
- package/src/knowledge/ccc-bridge.md +40 -24
- package/src/knowledge/confidence-tiers.md +9 -5
- package/src/knowledge/overview.md +3 -3
- package/src/knowledge/progressive-capability.md +8 -8
- package/src/knowledge/provenance-tracking.md +9 -5
- package/src/knowledge/qmd-registry.md +2 -2
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +18 -11
- package/src/knowledge/split-body-strategy.md +0 -3
- package/src/knowledge/tool-resolution.md +4 -2
- package/src/knowledge/version-paths.md +101 -15
- package/src/module-help.csv +3 -3
- package/src/module.yaml +10 -0
- package/src/shared/data/ast-grep-recipes.yaml +608 -0
- package/src/shared/data/ide-context-files.json +30 -0
- package/src/shared/health-check.md +32 -12
- package/src/shared/references/description-guard-protocol.md +14 -9
- package/src/shared/references/feasibility-report-schema.md +19 -13
- package/src/shared/references/headless-gate-convention.md +55 -3
- package/src/shared/references/output-contract-schema.md +19 -8
- package/src/shared/references/pipeline-contracts.md +94 -29
- package/src/shared/references/tessl-review.md +77 -0
- package/src/shared/scripts/schemas/skf-analyze-result-envelope.v1.json +194 -0
- package/src/shared/scripts/schemas/skf-audit-result-envelope.v1.json +192 -0
- package/src/shared/scripts/schemas/skf-brief-result-envelope.v1.json +32 -4
- package/src/shared/scripts/schemas/skf-campaign-result-envelope.v1.json +174 -0
- package/src/shared/scripts/schemas/skf-create-skill-result-envelope.v1.json +284 -0
- package/src/shared/scripts/schemas/skf-drop-skill-result-envelope.v1.json +164 -0
- package/src/shared/scripts/schemas/skf-export-result-envelope.v1.json +160 -0
- package/src/shared/scripts/schemas/skf-quick-skill-result-envelope.v1.json +261 -0
- package/src/shared/scripts/schemas/skf-refine-architecture-result-envelope.v1.json +192 -0
- package/src/shared/scripts/schemas/skf-rename-skill-result-envelope.v1.json +179 -0
- package/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json +27 -11
- package/src/shared/scripts/schemas/skf-stack-result-envelope.v1.json +176 -0
- package/src/shared/scripts/schemas/skf-test-result-envelope.v1.json +173 -0
- package/src/shared/scripts/schemas/skf-update-result-envelope.v1.json +19 -5
- package/src/shared/scripts/schemas/skf-verify-stack-result-envelope.v1.json +180 -0
- package/src/shared/scripts/schemas/skill-brief.v1.json +34 -0
- package/src/shared/scripts/schemas/workspace-detection.v1.json +1 -1
- package/src/shared/scripts/skf-atomic-write.py +30 -14
- package/src/shared/scripts/skf-build-change-manifest.py +2203 -24
- package/src/shared/scripts/skf-ccc-git-hygiene.py +532 -0
- package/src/shared/scripts/skf-check-unit-records.py +184 -0
- package/src/shared/scripts/skf-check-workspace-drift.py +538 -9
- package/src/shared/scripts/skf-classify-changed-files.py +694 -0
- package/src/shared/scripts/skf-comention-pairs.py +1333 -123
- package/src/shared/scripts/skf-compare-file-hashes.py +1 -1
- package/src/shared/scripts/skf-count-imports.py +1867 -0
- package/src/shared/scripts/skf-count-tokens.py +1 -1
- package/src/shared/scripts/skf-derive-assembly-shape.py +3 -2
- package/src/shared/scripts/skf-description-guard.py +117 -9
- package/src/shared/scripts/skf-detect-docs.py +892 -4
- package/src/shared/scripts/skf-detect-language.py +486 -107
- package/src/shared/scripts/skf-detect-registry.py +887 -0
- package/src/shared/scripts/skf-detect-scripts-assets.py +1 -1
- package/src/shared/scripts/skf-detect-tools.py +215 -27
- package/src/shared/scripts/skf-detect-workspaces.py +506 -30
- package/src/shared/scripts/skf-disqualify-candidates.py +821 -182
- package/src/shared/scripts/skf-emit-brief-result-envelope.py +69 -191
- package/src/shared/scripts/skf-emit-result-envelope.py +1604 -106
- package/src/shared/scripts/skf-enumerate-stack-skills.py +986 -117
- package/src/shared/scripts/skf-extract-public-api.py +4084 -85
- package/src/shared/scripts/skf-extraction-inventory.py +746 -0
- package/src/shared/scripts/skf-extraction-snapshot.py +539 -0
- package/src/shared/scripts/skf-fetch-temporal.py +674 -0
- package/src/shared/scripts/skf-find-cycles.py +97 -29
- package/src/shared/scripts/skf-find-test-report.py +476 -0
- package/src/shared/scripts/skf-forge-tier-rw.py +444 -203
- package/src/shared/scripts/skf-github-fetch.py +365 -0
- package/src/shared/scripts/skf-github-probe.py +661 -0
- package/src/shared/scripts/skf-hash-content.py +166 -12
- package/src/shared/scripts/skf-language-corpora.py +1 -1
- package/src/shared/scripts/skf-load-provenance.py +159 -27
- package/src/shared/scripts/skf-manifest-ops.py +1 -1
- package/src/shared/scripts/skf-merge-ccc-exclusions.py +2307 -223
- package/src/shared/scripts/skf-merge-doc-urls.py +1 -1
- package/src/shared/scripts/skf-names-present.py +221 -0
- package/src/shared/scripts/skf-pair-intersect.py +119 -28
- package/src/shared/scripts/skf-parse-gaps.py +1384 -0
- package/src/shared/scripts/skf-preapply.py +1 -1
- package/src/shared/scripts/skf-preflight.py +161 -27
- package/src/shared/scripts/skf-promote-staged.py +430 -0
- package/src/shared/scripts/skf-provenance-gap-dispatch.py +39 -7
- package/src/shared/scripts/skf-qmd-classify-collections.py +229 -45
- package/src/shared/scripts/skf-quick-batch.py +774 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +972 -88
- package/src/shared/scripts/skf-recommend-scope-type.py +323 -156
- package/src/shared/scripts/skf-render-metadata-stats.py +156 -12
- package/src/shared/scripts/skf-render-quick-metadata.py +132 -28
- package/src/shared/scripts/skf-render-stack-metadata.py +976 -0
- package/src/shared/scripts/skf-resolve-authoritative-files.py +128 -13
- package/src/shared/scripts/skf-resolve-package.py +523 -106
- package/src/shared/scripts/skf-rewrite-skill-name.py +433 -47
- package/src/shared/scripts/skf-run-lock.py +577 -0
- package/src/shared/scripts/skf-scan-manifests.py +998 -57
- package/src/shared/scripts/skf-scan-skill-md-structure.py +1341 -37
- package/src/shared/scripts/skf-severity-classify.py +712 -108
- package/src/shared/scripts/skf-shape-detect.py +298 -204
- package/src/shared/scripts/skf-shard-body.py +9 -8
- package/src/shared/scripts/skf-skill-inventory.py +2412 -89
- package/src/shared/scripts/skf-skills-module.py +472 -0
- package/src/shared/scripts/skf-source-tree.py +1796 -0
- package/src/shared/scripts/skf-structural-diff.py +670 -119
- package/src/shared/scripts/skf-tessl-review.py +706 -0
- package/src/shared/scripts/skf-update-active-symlink.py +5 -5
- package/src/shared/scripts/skf-update-run-state.py +624 -0
- package/src/shared/scripts/skf-validate-brief-inputs.py +92 -29
- package/src/shared/scripts/skf-validate-brief-schema.py +4 -1
- package/src/shared/scripts/skf-validate-feasibility-report.py +577 -66
- package/src/shared/scripts/skf-validate-frontmatter.py +103 -26
- package/src/shared/scripts/skf-validate-output.py +712 -64
- package/src/shared/scripts/skf-validate-pins.py +1 -1
- package/src/shared/scripts/skf-verify-no-trace.py +116 -10
- package/src/shared/scripts/skf-verify-provenance-completeness.py +2919 -54
- package/src/shared/scripts/skf-write-skill-brief.py +367 -19
- package/src/shared/tool-requirements.yaml +201 -0
- package/src/skf-analyze-source/SKILL.md +41 -36
- package/src/skf-analyze-source/assets/skill-brief-schema.md +7 -8
- package/src/skf-analyze-source/customize.toml +36 -24
- package/src/skf-analyze-source/references/auto-docs-only.md +58 -20
- package/src/skf-analyze-source/references/continue.md +2 -13
- package/src/skf-analyze-source/references/discover-additional-source.md +147 -0
- package/src/skf-analyze-source/references/generate-briefs.md +121 -55
- package/src/skf-analyze-source/references/headless-contract.md +42 -15
- package/src/skf-analyze-source/references/identify-units.md +96 -110
- package/src/skf-analyze-source/references/init.md +73 -71
- package/src/skf-analyze-source/references/map-and-detect.md +123 -105
- package/src/skf-analyze-source/references/map-unit-exports.md +68 -0
- package/src/skf-analyze-source/references/recommend.md +51 -70
- package/src/skf-analyze-source/references/scan-project.md +60 -84
- package/src/skf-analyze-source/references/scan-root.md +39 -0
- package/src/skf-analyze-source/references/step-auto-scope-coexistence.md +47 -0
- package/src/skf-analyze-source/references/step-auto-scope-corpora.md +53 -0
- package/src/skf-analyze-source/references/step-auto-scope-split.md +91 -0
- package/src/skf-analyze-source/references/step-auto-scope.md +208 -293
- package/src/skf-analyze-source/references/step-shape-detect.md +14 -12
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +37 -42
- package/src/skf-audit-skill/SKILL.md +43 -51
- package/src/skf-audit-skill/assets/drift-report-template.md +27 -3
- package/src/skf-audit-skill/customize.toml +41 -20
- package/src/skf-audit-skill/references/constituent-freshness.md +91 -0
- package/src/skf-audit-skill/references/doc-drift.md +141 -0
- package/src/skf-audit-skill/references/headless-contract.md +29 -0
- package/src/skf-audit-skill/references/init.md +148 -210
- package/src/skf-audit-skill/references/re-index.md +96 -108
- package/src/skf-audit-skill/references/report.md +96 -33
- package/src/skf-audit-skill/references/semantic-diff.md +27 -18
- package/src/skf-audit-skill/references/severity-classify.md +79 -65
- package/src/skf-audit-skill/references/severity-rules.md +15 -6
- package/src/skf-audit-skill/references/structural-diff.md +75 -90
- package/src/skf-audit-skill/references/upstream-checkout.md +77 -0
- package/src/skf-audit-skill/scripts/render-drift-tables.py +685 -0
- package/src/skf-brief-skill/SKILL.md +36 -25
- package/src/skf-brief-skill/assets/description-voice-examples.md +1 -1
- package/src/skf-brief-skill/assets/scope-templates.md +17 -24
- package/src/skf-brief-skill/assets/skill-brief-schema.md +29 -15
- package/src/skf-brief-skill/customize.toml +48 -20
- package/src/skf-brief-skill/references/analyze-target.md +142 -125
- package/src/skf-brief-skill/references/confirm-brief.md +10 -8
- package/src/skf-brief-skill/references/draft-checkpoint.md +36 -17
- package/src/skf-brief-skill/references/gather-intent-ratify.md +68 -0
- package/src/skf-brief-skill/references/gather-intent.md +87 -182
- package/src/skf-brief-skill/references/headless-args.md +84 -16
- package/src/skf-brief-skill/references/health-check.md +1 -1
- package/src/skf-brief-skill/references/invocation-contract.md +18 -13
- package/src/skf-brief-skill/references/portfolio-similarity-check.md +1 -1
- package/src/skf-brief-skill/references/qmd-collection-registration.md +7 -10
- package/src/skf-brief-skill/references/scope-definition.md +123 -47
- package/src/skf-brief-skill/references/step-auto-brief.md +24 -80
- package/src/skf-brief-skill/references/step-auto-validate.md +20 -121
- package/src/skf-brief-skill/references/version-resolution.md +3 -2
- package/src/skf-brief-skill/references/write-brief.md +66 -57
- package/src/skf-campaign/SKILL.md +31 -34
- package/src/skf-campaign/assets/campaign-state-schema.json +25 -4
- package/src/skf-campaign/customize.toml +47 -16
- package/src/skf-campaign/references/campaign-contracts.md +39 -29
- package/src/skf-campaign/references/campaign-directive-spec.md +4 -2
- package/src/skf-campaign/references/health-check.md +7 -16
- package/src/skf-campaign/references/step-01-setup.md +46 -84
- package/src/skf-campaign/references/step-02-strategy.md +31 -30
- package/src/skf-campaign/references/step-03-pins.md +26 -18
- package/src/skf-campaign/references/step-04-provenance.md +24 -23
- package/src/skf-campaign/references/step-05-skill-loop.md +67 -48
- package/src/skf-campaign/references/step-06-batch.md +41 -34
- package/src/skf-campaign/references/step-07-capstone.md +40 -25
- package/src/skf-campaign/references/step-08-verify.md +28 -29
- package/src/skf-campaign/references/step-09-refine.md +29 -30
- package/src/skf-campaign/references/step-10-export.md +48 -36
- package/src/skf-campaign/references/step-11-maintenance.md +31 -34
- package/src/skf-campaign/references/step-resume.md +37 -68
- package/src/skf-campaign/scripts/campaign-deps.py +57 -18
- package/src/skf-campaign/scripts/campaign-parse-manifest.py +361 -54
- package/src/skf-campaign/scripts/campaign-provenance.py +96 -53
- package/src/skf-campaign/scripts/campaign-quality-gate.py +592 -0
- package/src/skf-campaign/scripts/campaign-render-batch.py +257 -49
- package/src/skf-campaign/scripts/campaign-render-kickoff.py +343 -50
- package/src/skf-campaign/scripts/campaign-report.py +204 -37
- package/src/skf-campaign/scripts/campaign-state.py +1128 -0
- package/src/skf-campaign/scripts/campaign-status.py +10 -74
- package/src/skf-campaign/scripts/campaign-validate-pins.py +30 -3
- package/src/skf-campaign/scripts/campaign-validate-state.py +34 -4
- package/src/skf-campaign/templates/campaign-brief-template.yaml +4 -5
- package/src/skf-campaign/templates/campaign-report-template.md +5 -1
- package/src/skf-campaign/templates/kickoff-template.md +0 -14
- package/src/skf-create-skill/SKILL.md +27 -20
- package/src/skf-create-skill/assets/compile-assembly-rules.md +6 -5
- package/src/skf-create-skill/assets/skill-sections.md +17 -6
- package/src/skf-create-skill/customize.toml +20 -8
- package/src/skf-create-skill/references/authoritative-files-protocol.md +41 -42
- package/src/skf-create-skill/references/batch-mode.md +81 -0
- package/src/skf-create-skill/references/ccc-index-check.md +27 -0
- package/src/skf-create-skill/references/compile.md +107 -29
- package/src/skf-create-skill/references/component-extraction.md +113 -91
- package/src/skf-create-skill/references/enrich.md +41 -23
- package/src/skf-create-skill/references/entry-points-by-hand.md +20 -0
- package/src/skf-create-skill/references/extract.md +200 -161
- package/src/skf-create-skill/references/extraction-patterns-by-hand.md +141 -0
- package/src/skf-create-skill/references/extraction-patterns-tracing.md +2 -2
- package/src/skf-create-skill/references/extraction-patterns.md +584 -196
- package/src/skf-create-skill/references/generate-artifacts.md +145 -93
- package/src/skf-create-skill/references/health-check.md +1 -1
- package/src/skf-create-skill/references/load-brief.md +53 -36
- package/src/skf-create-skill/references/relabel-rule.md +12 -0
- package/src/skf-create-skill/references/report.md +28 -59
- package/src/skf-create-skill/references/source-resolution-protocols.md +49 -155
- package/src/skf-create-skill/references/step-auto-shard.md +20 -93
- package/src/skf-create-skill/references/step-doc-rot.md +44 -60
- package/src/skf-create-skill/references/step-doc-sources.md +55 -18
- package/src/skf-create-skill/references/sub/ccc-discover.md +18 -7
- package/src/skf-create-skill/references/sub/fetch-docs.md +106 -57
- package/src/skf-create-skill/references/sub/fetch-temporal.md +53 -166
- package/src/skf-create-skill/references/tier-degradation-rules.md +18 -9
- package/src/skf-create-skill/references/validate.md +173 -99
- package/src/skf-create-skill/scripts/scan-doc-rot.py +232 -99
- package/src/skf-create-stack-skill/SKILL.md +29 -56
- package/src/skf-create-stack-skill/assets/metadata-contract.md +51 -0
- package/src/skf-create-stack-skill/assets/provenance-map-schema.md +15 -15
- package/src/skf-create-stack-skill/assets/stack-skill-template.md +23 -57
- package/src/skf-create-stack-skill/customize.toml +23 -12
- package/src/skf-create-stack-skill/references/compile-stack.md +57 -66
- package/src/skf-create-stack-skill/references/compose-mode-rules.md +24 -44
- package/src/skf-create-stack-skill/references/detect-integrations.md +92 -95
- package/src/skf-create-stack-skill/references/detect-manifests.md +46 -71
- package/src/skf-create-stack-skill/references/generate-output.md +138 -128
- package/src/skf-create-stack-skill/references/init.md +90 -32
- package/src/skf-create-stack-skill/references/integration-patterns.md +1 -17
- package/src/skf-create-stack-skill/references/invocation-contract.md +34 -0
- package/src/skf-create-stack-skill/references/manifest-patterns.md +32 -20
- package/src/skf-create-stack-skill/references/parallel-extract.md +112 -38
- package/src/skf-create-stack-skill/references/rank-and-confirm.md +57 -75
- package/src/skf-create-stack-skill/references/report.md +39 -33
- package/src/skf-create-stack-skill/references/validate.md +20 -39
- package/src/skf-drop-skill/SKILL.md +28 -51
- package/src/skf-drop-skill/customize.toml +44 -30
- package/src/skf-drop-skill/references/execute.md +79 -146
- package/src/skf-drop-skill/references/invocation-contract.md +64 -0
- package/src/skf-drop-skill/references/report.md +46 -30
- package/src/skf-drop-skill/references/select.md +118 -124
- package/src/skf-drop-skill/scripts/dir-sizes.py +54 -26
- package/src/skf-drop-skill/scripts/drop-roster.py +322 -0
- package/src/skf-export-skill/SKILL.md +40 -62
- package/src/skf-export-skill/assets/managed-section-format.md +14 -50
- package/src/skf-export-skill/assets/snippet-format.md +3 -1
- package/src/skf-export-skill/customize.toml +42 -13
- package/src/skf-export-skill/references/generate-snippet.md +54 -46
- package/src/skf-export-skill/references/health-check.md +2 -0
- package/src/skf-export-skill/references/invocation-contract.md +15 -0
- package/src/skf-export-skill/references/load-skill.md +88 -62
- package/src/skf-export-skill/references/manifest-rebuild.md +9 -10
- package/src/skf-export-skill/references/multi-skill-mode.md +4 -4
- package/src/skf-export-skill/references/orphan-context-detection.md +13 -5
- package/src/skf-export-skill/references/orphan-row-detection.md +31 -22
- package/src/skf-export-skill/references/package.md +15 -73
- package/src/skf-export-skill/references/preflight-snippet-root-probe.md +51 -70
- package/src/skf-export-skill/references/result-envelope.md +31 -16
- package/src/skf-export-skill/references/summary.md +41 -17
- package/src/skf-export-skill/references/token-report.md +4 -12
- package/src/skf-export-skill/references/update-context.md +118 -237
- package/src/skf-forger/SKILL.md +61 -37
- package/src/skf-forger/bmad-skill-manifest.yaml +4 -1
- package/src/skf-forger/customize.toml +43 -0
- package/src/skf-forger/references/pipeline-mode.md +73 -18
- package/src/skf-forger/scripts/forge-status.py +299 -0
- package/src/skf-forger/scripts/parse-pipeline.py +322 -54
- package/src/skf-forger/scripts/pipeline-gate.py +428 -0
- package/src/skf-forger/scripts/pipeline-journal.py +1052 -0
- package/src/skf-quick-skill/SKILL.md +54 -53
- package/src/skf-quick-skill/assets/skill-template.md +4 -2
- package/src/skf-quick-skill/customize.toml +51 -20
- package/src/skf-quick-skill/references/batch-mode.md +74 -21
- package/src/skf-quick-skill/references/compile.md +30 -31
- package/src/skf-quick-skill/references/ecosystem-check.md +7 -57
- package/src/skf-quick-skill/references/finalize.md +69 -18
- package/src/skf-quick-skill/references/halt-contract.md +41 -29
- package/src/skf-quick-skill/references/health-check.md +5 -3
- package/src/skf-quick-skill/references/quick-extract.md +114 -45
- package/src/skf-quick-skill/references/registry-resolution.md +9 -64
- package/src/skf-quick-skill/references/resolve-target.md +116 -66
- package/src/skf-quick-skill/references/write-and-validate.md +79 -40
- package/src/skf-refine-architecture/SKILL.md +43 -53
- package/src/skf-refine-architecture/customize.toml +49 -20
- package/src/skf-refine-architecture/references/compile.md +97 -54
- package/src/skf-refine-architecture/references/exit-codes.md +30 -0
- package/src/skf-refine-architecture/references/finding-storage.md +21 -0
- package/src/skf-refine-architecture/references/gap-analysis.md +101 -38
- package/src/skf-refine-architecture/references/improvements.md +14 -20
- package/src/skf-refine-architecture/references/init.md +98 -57
- package/src/skf-refine-architecture/references/issue-detection.md +32 -39
- package/src/skf-refine-architecture/references/refinement-rules.md +37 -48
- package/src/skf-refine-architecture/references/report.md +65 -54
- package/src/skf-refine-architecture/scripts/skf-check-preservation.py +1619 -0
- package/src/skf-rename-skill/SKILL.md +19 -54
- package/src/skf-rename-skill/customize.toml +32 -26
- package/src/skf-rename-skill/references/execute.md +230 -184
- package/src/skf-rename-skill/references/exit-codes.md +7 -7
- package/src/skf-rename-skill/references/health-check.md +1 -7
- package/src/skf-rename-skill/references/invocation-contract.md +25 -0
- package/src/skf-rename-skill/references/report.md +63 -52
- package/src/skf-rename-skill/references/select.md +197 -115
- package/src/skf-rename-skill/scripts/skf-validate-rename-name.py +161 -21
- package/src/skf-setup/SKILL.md +26 -26
- package/src/skf-setup/customize.toml +14 -10
- package/src/skf-setup/references/auto-index.md +50 -63
- package/src/skf-setup/references/ccc-index.md +29 -89
- package/src/skf-setup/references/detect-and-tier.md +58 -66
- package/src/skf-setup/references/health-check.md +2 -0
- package/src/skf-setup/references/invocation-contract.md +14 -0
- package/src/skf-setup/references/report.md +43 -166
- package/src/skf-setup/references/tier-rules.md +5 -5
- package/src/skf-setup/references/write-config.md +34 -57
- package/src/skf-test-skill/SKILL.md +17 -57
- package/src/skf-test-skill/assets/output-section-formats.md +33 -34
- package/src/skf-test-skill/customize.toml +27 -13
- package/src/skf-test-skill/references/coherence-check.md +134 -62
- package/src/skf-test-skill/references/coverage-check-tiers.md +35 -0
- package/src/skf-test-skill/references/coverage-check.md +217 -254
- package/src/skf-test-skill/references/detect-mode.md +5 -5
- package/src/skf-test-skill/references/external-validators.md +94 -82
- package/src/skf-test-skill/references/health-check.md +6 -7
- package/src/skf-test-skill/references/init.md +163 -88
- package/src/skf-test-skill/references/invocation-contract.md +66 -0
- package/src/skf-test-skill/references/migration-section-rules.md +5 -2
- package/src/skf-test-skill/references/report.md +162 -142
- package/src/skf-test-skill/references/score.md +80 -107
- package/src/skf-test-skill/references/scoring-rules.md +41 -155
- package/src/skf-test-skill/references/source-access-protocol.md +19 -92
- package/src/skf-test-skill/references/step-hard-gate.md +51 -33
- package/src/skf-test-skill/scripts/aggregate-coherence.py +218 -30
- package/src/skf-test-skill/scripts/build-result-context.py +287 -0
- package/src/skf-test-skill/scripts/check-metadata-coherence.py +37 -4
- package/src/skf-test-skill/scripts/combine-external-scores.py +23 -6
- package/src/skf-test-skill/scripts/compute-score.py +223 -45
- package/src/skf-test-skill/scripts/gap-ledger.py +1381 -0
- package/src/skf-test-skill/scripts/hard-gate.py +203 -0
- package/src/skf-test-skill/scripts/load-coverage-inputs.py +760 -0
- package/src/skf-test-skill/scripts/locate-export-segments.py +835 -0
- package/src/skf-test-skill/scripts/reconcile-coverage.py +273 -79
- package/src/skf-test-skill/scripts/score-signatures.py +459 -0
- package/src/skf-test-skill/scripts/stage-helper-payload.py +148 -0
- package/src/skf-test-skill/scripts/validate-inventory.py +311 -16
- package/src/skf-test-skill/scripts/verify-declared-numerator.py +127 -52
- package/src/skf-test-skill/templates/test-report-template.md +21 -15
- package/src/skf-update-skill/SKILL.md +38 -25
- package/src/skf-update-skill/customize.toml +27 -12
- package/src/skf-update-skill/references/detect-changes.md +233 -222
- package/src/skf-update-skill/references/gap-driven.md +336 -0
- package/src/skf-update-skill/references/health-check.md +31 -5
- package/src/skf-update-skill/references/init.md +250 -84
- package/src/skf-update-skill/references/invocation-contract.md +12 -0
- package/src/skf-update-skill/references/manual-section-rules.md +6 -23
- package/src/skf-update-skill/references/merge.md +180 -47
- package/src/skf-update-skill/references/re-extract.md +53 -262
- package/src/skf-update-skill/references/report.md +100 -35
- package/src/skf-update-skill/references/write.md +331 -149
- package/src/skf-update-skill/scripts/skf-new-file-diff.py +29 -7
- package/src/skf-verify-stack/SKILL.md +23 -42
- package/src/skf-verify-stack/assets/feasibility-report-template.md +11 -5
- package/src/skf-verify-stack/customize.toml +55 -22
- package/src/skf-verify-stack/references/coverage-patterns.md +17 -8
- package/src/skf-verify-stack/references/coverage.md +67 -64
- package/src/skf-verify-stack/references/exit-codes.md +21 -8
- package/src/skf-verify-stack/references/init.md +107 -62
- package/src/skf-verify-stack/references/integration-verification-rules.md +12 -13
- package/src/skf-verify-stack/references/integrations.md +106 -65
- package/src/skf-verify-stack/references/report.md +59 -42
- package/src/skf-verify-stack/references/requirements.md +32 -9
- package/src/skf-verify-stack/references/synthesize.md +53 -39
- package/src/skf-verify-stack/scripts/skf-coverage-tally.py +398 -52
- package/src/skf-verify-stack/scripts/skf-previous-report.py +330 -0
- package/src/skf-verify-stack/scripts/skf-report-delta.py +453 -49
- package/src/skf-verify-stack/scripts/skf-verdict-rollup.py +240 -27
- package/tools/cli/commands/install.js +11 -4
- package/tools/cli/commands/status.js +15 -3
- package/tools/cli/commands/update.js +11 -4
- package/tools/cli/lib/tool-check.js +320 -0
- package/tools/cli/lib/version-check.js +22 -9
- package/tools/cli/skf-cli.js +4 -1
- package/.gitattributes +0 -16
- package/.nvmrc +0 -1
- package/docs/_internal/RELEASING.md +0 -645
- package/release-audits/v1.0.0-launch-audit.md +0 -728
- package/src/skf-audit-skill/references/step-doc-drift.md +0 -177
- package/src/skf-brief-skill/references/headless-source-authority-detection.md +0 -26
- package/src/skf-campaign/manifest.yaml +0 -15
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +0 -106
- package/src/skf-create-skill/references/ecosystem-check.md +0 -74
- package/src/skf-drop-skill/references/headless-contract.md +0 -18
- package/src/skf-update-skill/references/merge-conflict-rules.md +0 -15
- package/src/skf-update-skill/references/remote-source-resolution.md +0 -98
- package/src/skf-update-skill/references/validate.md +0 -124
- package/tools/validate-docs-drift.js +0 -233
- package/tools/validate-docs-links.js +0 -665
|
@@ -11,11 +11,10 @@ The fastest path to a skill — accept a GitHub URL or package name, resolve to
|
|
|
11
11
|
|
|
12
12
|
## Conventions
|
|
13
13
|
|
|
14
|
-
- Bare paths (e.g. `references/<name>.md`) resolve from the skill root.
|
|
15
|
-
- `references/` holds prompt content carved out of SKILL.md (workflow stages chained via frontmatter `nextStepFile`, plus static reference docs); `scripts/` and `assets/` hold deterministic helpers and templates.
|
|
16
|
-
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives, if present).
|
|
14
|
+
- Bare paths (e.g. `references/<name>.md`) resolve from the skill root, `{skill-root}`: this skill's installed directory, where `customize.toml` lives.
|
|
17
15
|
- `{project-root}`-prefixed paths resolve from the project working directory.
|
|
18
|
-
- `{
|
|
16
|
+
- **Module-level path exception:** bare paths beginning with `knowledge/` or `shared/` resolve from the SKF module root (`{project-root}/_bmad/skf/` installed, `src/` in dev), not the skill root; e.g. `shared/health-check.md`, which the terminal step chains to.
|
|
17
|
+
- **Sibling skills:** a path that names another SKF skill's folder (`skf-<name>/...`) resolves from the SKF module root, and that skill must be installed with this one.
|
|
19
18
|
|
|
20
19
|
## Role
|
|
21
20
|
|
|
@@ -26,26 +25,22 @@ You are a rapid skill compiler collaborating with a developer. You bring source
|
|
|
26
25
|
These rules apply to every step in this workflow:
|
|
27
26
|
|
|
28
27
|
- Never fabricate content — all data must come from source extraction or user input
|
|
28
|
+
- Never write into a skill folder SKF did not generate
|
|
29
29
|
- Only load one step file at a time — never preload future steps
|
|
30
30
|
- Always communicate in `{communication_language}`
|
|
31
|
-
- **Universal cancel-line affordance
|
|
32
|
-
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and
|
|
33
|
-
- If `{headless_mode}` is true,
|
|
34
|
-
- entry: `{"step":N,"name":"<slug>","status":"start"}`
|
|
35
|
-
- exit (just before chaining to nextStepFile): `{"step":N,"name":"<slug>","status":"done"}`
|
|
36
|
-
- on HARD HALT: `{"step":N,"name":"<slug>","status":"halt","exit":<code>}` instead of "done"
|
|
37
|
-
|
|
38
|
-
`N` is the step number and `<slug>` is the kebab portion of the filename (see the Stages table below for the canonical list). One line per event; do not pretty-print.
|
|
31
|
+
- **Universal cancel-line affordance**: at any interactive prompt the user may type `cancel`, `exit`, `:q`, or select the `[X] Cancel and exit` menu option (where surfaced) to leave cleanly. HARD HALT with **exit code 6 (user-cancelled)**: stage `{"phase": "<the step's slug>", "halt_reason": "user-cancelled", "reason": "Cancelled. No files were written.", "skill_package": null}` as `{run_dir}/halt.json` and run `uv run {emitEnvelopeHelper} emit-halt --workflow skf-quick-skill --run-dir "{run_dir}" --target stderr < "{run_dir}/halt.json"` (`references/halt-contract.md`). In step 4 §6 the equivalent affordance is `[Q] Quit without writing`, with the same exit code and envelope.
|
|
32
|
+
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action, and record each auto-decision in the run folder the moment its gate decides, so the envelope's `headless_decisions` carries it: stage `{"gate": "<the gate's name>", "default_action": "<X>", "taken_action": "<X>", "reason": "headless: <why>"}` as `{run_dir}/decision.json` and run `uv run {emitEnvelopeHelper} record --workflow skf-quick-skill --run-dir "{run_dir}" --decision < "{run_dir}/decision.json"`. Each gate names its gate and default where it decides.
|
|
33
|
+
- If `{headless_mode}` is true, print the one-line JSON progress events on stderr that `references/halt-contract.md` (Headless Events) defines: when each step starts, just before it chains on, and at a HARD HALT.
|
|
39
34
|
|
|
40
35
|
## Stages
|
|
41
36
|
|
|
42
37
|
| # | Step | File | Auto-proceed |
|
|
43
38
|
|---|------|------|--------------|
|
|
44
|
-
| 1 | Resolve Target | references/resolve-target.md |
|
|
45
|
-
| 2 | Ecosystem Check | references/ecosystem-check.md |
|
|
46
|
-
| 3 | Quick Extract | references/quick-extract.md |
|
|
39
|
+
| 1 | Resolve Target | references/resolve-target.md | Conditional (no target, or an ambiguous one) |
|
|
40
|
+
| 2 | Ecosystem Check | references/ecosystem-check.md | Conditional (an official skill matches) |
|
|
41
|
+
| 3 | Quick Extract | references/quick-extract.md | Conditional (an unusual repo shape, zero exports) |
|
|
47
42
|
| 4 | Compile | references/compile.md | No (review) |
|
|
48
|
-
| 5 | Write & Validate | references/write-and-validate.md |
|
|
43
|
+
| 5 | Write & Validate | references/write-and-validate.md | Conditional (the skill folder exists) |
|
|
49
44
|
| 6 | Finalize | references/finalize.md | Yes |
|
|
50
45
|
| 7 | Workflow Health Check | references/health-check.md | Yes |
|
|
51
46
|
|
|
@@ -53,62 +48,68 @@ These rules apply to every step in this workflow:
|
|
|
53
48
|
|
|
54
49
|
| Aspect | Detail |
|
|
55
50
|
|--------|--------|
|
|
56
|
-
| **Inputs** | target (GitHub URL or
|
|
57
|
-
| **Overrides** | `--description`, `--exports`, `--skip-snippet`, `--no-active-pointer`, `--batch <file>`, `--fail-fast
|
|
58
|
-
| **Gates** | step 1: target input, multi-language disambiguation [C/A]; step 2: ecosystem match [P/I/A] (
|
|
59
|
-
| **Outputs** | SKILL.md, context-snippet.md, metadata.json, active pointer, result contract (timestamped + `-latest` copy). Snippet and active pointer can be skipped per overrides. |
|
|
60
|
-
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
61
|
-
| **Exit codes** | See `references/halt-contract.md` |
|
|
51
|
+
| **Inputs** | target (GitHub URL, package name or npm, PyPI or crates.io page URL) [required for single-target mode], language_hint [optional, `--language-hint`], scope_hint [optional, `--scope-hint`] |
|
|
52
|
+
| **Overrides** | `--language-hint`, `--scope-hint`, `--description`, `--exports`, `--skip-snippet`, `--no-active-pointer`, `--batch <file>`, `--fail-fast`: see On Activation step 4 |
|
|
53
|
+
| **Gates** | step 1: target input, ambiguous package name [C/n/U/X] (if another registry also holds the name; headless keeps the first registry's pick), multi-language disambiguation [C/n/A] (pick any detected language); step 2: ecosystem match [P/I/A] (none until agentskills.io has a registry API); step 3: repo-shape [C/A] + zero-exports rescue [R/P/A]; step 4: review [C/E/S/Q]; step 5: overwrite [Y/N] |
|
|
54
|
+
| **Outputs** | SKILL.md, context-snippet.md, metadata.json, active pointer, result contract (timestamped + `-latest` copy), one `SKF_QUICK_SKILL_RESULT_JSON` line (stdout when the run finishes, stderr at a HARD HALT), and under `--batch` the batch summary. Snippet and active pointer can be skipped per overrides. |
|
|
55
|
+
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true; each auto-decision is recorded in the envelope's `headless_decisions` |
|
|
56
|
+
| **Exit codes** | See `references/halt-contract.md`: the exit-code map and the envelope every HARD HALT emits, except On Activation step 1's check for `python3` and `uv`, which prints none |
|
|
62
57
|
|
|
63
|
-
##
|
|
58
|
+
## On Activation
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
1. Read `{project-root}/_bmad/skf/config.yaml` and resolve `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `skills_output_folder`, `forge_data_folder` and `sidecar_path`.
|
|
66
61
|
|
|
67
|
-
|
|
62
|
+
Then check the runtime: every helper this workflow runs, the envelope emitter included, runs through `uv run`, so confirm that `python3` and `uv` are both on `$PATH` (`command -v python3` and `command -v uv`). If either is missing, HARD HALT with **exit code 3 (resolution-failure)**: display "**Quick Skill needs `{the missing tool}`, which is not on your PATH.** Install it (`uv` from <https://docs.astral.sh/uv/getting-started/installation/>, `python3` from <https://www.python.org/downloads/>), then re-run." No envelope is printed: the emitter needs `uv` too.
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
- From config: `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
71
|
-
- From preferences: `headless_mode` (default false)
|
|
64
|
+
Then resolve `{emitEnvelopeHelper}` ← the first existing path of `{project-root}/_bmad/skf/shared/scripts/skf-emit-result-envelope.py` and `{project-root}/src/shared/scripts/skf-emit-result-envelope.py`, the shared emitter every envelope and auto-decision goes through, and create the run folder:
|
|
72
65
|
|
|
73
|
-
|
|
66
|
+
```bash
|
|
67
|
+
mkdir -p "{project-root}/_bmad-output/.skf-run" && mktemp -d "{project-root}/_bmad-output/.skf-run/skf-quick-skill-XXXXXXXX"
|
|
68
|
+
```
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
Bind `{run_dir}` ← the path it prints (a finished run deletes it; a halted one keeps it). If it cannot be created, HARD HALT with **exit code 4 (write-failure)**: display "**Quick Skill cannot start: the run folder could not be created.** {the first stderr line}" and emit with nothing to stage in:
|
|
76
71
|
|
|
77
72
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
uv run {emitEnvelopeHelper} emit-halt --workflow skf-quick-skill --target stderr <<'SKF_JSON'
|
|
74
|
+
{"phase": "on-activation", "halt_reason": "write-failure", "reason": "<that message, one line>", "skill_package": null}
|
|
75
|
+
SKF_JSON
|
|
80
76
|
```
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
With no emitter path (an incomplete install), each halt displays its message alone and step 6 §3 writes no result contract.
|
|
83
79
|
|
|
84
|
-
|
|
85
|
-
- `_bmad/custom/<skill-name>.toml` under `{project-root}` — team overrides (committed)
|
|
86
|
-
- `_bmad/custom/<skill-name>.user.toml` under `{project-root}` — personal overrides (gitignored)
|
|
80
|
+
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `{sidecar_path}/preferences.yaml` sets `headless_mode: true`. Default: false.
|
|
87
81
|
|
|
88
|
-
|
|
82
|
+
3. **Resolve workflow customization.** Run:
|
|
89
83
|
|
|
90
|
-
|
|
84
|
+
```bash
|
|
85
|
+
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow
|
|
86
|
+
```
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
- `{registryResolutionPath}` ← `workflow.registry_resolution_path` if non-empty, else `references/registry-resolution.md`
|
|
94
|
-
- `{batchOutputPath}` ← `workflow.batch_output_path` if non-empty, else `{skills_output_folder}/_batch/`
|
|
95
|
-
- `{onCompleteCommand}` ← `workflow.on_complete` if non-empty, else empty (no-op — step 6 §3 skips the hook invocation entirely)
|
|
88
|
+
It merges the bundled `{skill-root}/customize.toml` with `{project-root}/_bmad/custom/skf-quick-skill.toml` (team overrides, committed) and `.user.toml` (personal overrides, gitignored). When it exits non-zero, prints no JSON or is missing, print one line, `[activation/warn] customization_resolver_unavailable: <reason>` (`<reason>`: its first stderr line, `not found` when the script is missing, `no JSON` when it printed none). If the resolver cannot run, read `{skill-root}/customize.toml` alone and use its bundled defaults: the `{project-root}/_bmad/custom/` overrides do not apply to this run. In that case keep the reason as `{customization_resolver_unavailable}` (unset when the resolver ran) and, when `{emitEnvelopeHelper}` has a path, record it in the run sink: write `customization_resolver_unavailable: {customization_resolver_unavailable}` to `{run_dir}/resolver-warning.txt` with a file write, never `echo` (the reason can hold quotes or `$( )`), then run `uv run {emitEnvelopeHelper} record --run-dir "{run_dir}" --warning "$(cat "{run_dir}/resolver-warning.txt")"`. Under `--batch`, `references/batch-mode.md` §2 records that file in each target's run folder.
|
|
96
89
|
|
|
97
|
-
|
|
90
|
+
Bind these three as workflow-context variables, taking the default when the merged value is empty or absent:
|
|
98
91
|
|
|
99
|
-
|
|
92
|
+
- `{skillTemplatePath}` ← `workflow.skill_template_path`, else `assets/skill-template.md`
|
|
93
|
+
- `{batchOutputPath}` ← `workflow.batch_output_path`, else `{skills_output_folder}/_batch/`
|
|
94
|
+
- `{onCompleteCommand}` ← `workflow.on_complete`, else empty (step 6 §3 then runs no hook)
|
|
100
95
|
|
|
101
|
-
|
|
96
|
+
Run each `workflow.activation_steps_prepend` entry now, in order. Hold every `workflow.persistent_facts` entry as standing context for the whole run; a `file:` entry loads the contents of the paths or globs it names: the bundled default loads every `project-context.md` under `{project-root}`; an entry prefixed `!` drops each earlier entry it names and loads nothing itself, so an override's `"!file:{project-root}/**/project-context.md"` turns that default off. Once step 4 has parsed the flags, before step 5 or 6 starts the run, run each `workflow.activation_steps_append` entry in order.
|
|
97
|
+
|
|
98
|
+
4. **Parse CLI overrides** into the workflow context as `{overrides}`:
|
|
102
99
|
|
|
103
100
|
| Flag | Effect |
|
|
104
101
|
| --- | --- |
|
|
105
|
-
| `--
|
|
106
|
-
| `--
|
|
107
|
-
| `--
|
|
108
|
-
| `--
|
|
109
|
-
| `--
|
|
110
|
-
| `--
|
|
102
|
+
| `--language-hint <lang>` | Sets `language_hint`: step 1 §4 takes it as the language, with no detection and no multi-language gate, and step 1 §3 asks only that language's registry. |
|
|
103
|
+
| `--scope-hint <path>` | Sets `scope_hint`: the folder step 3 reads the entry points and skill folders from. |
|
|
104
|
+
| `--description "<string>"` | Replaces the extracted description in step 4 §2, which checks its length and voice as it checks an extracted one. |
|
|
105
|
+
| `--exports "<name1,name2,...>"` | Replaces the extracted export list in step 4 §2: comma-separated, each name trimmed, empty items skipped. |
|
|
106
|
+
| `--skip-snippet` | No context-snippet.md: step 4 §3 and step 5 §2 skip it. |
|
|
107
|
+
| `--no-active-pointer` | Step 6 §1 leaves `{skill_group}/active` as it is. |
|
|
108
|
+
| `--batch <file>` | Compiles every target the file lists, headless (On Activation step 5); `--skip-snippet` and `--no-active-pointer` apply to every target in the batch. |
|
|
109
|
+
| `--fail-fast` | With `--batch`: the batch stops at the first failed target. |
|
|
110
|
+
|
|
111
|
+
`--language-hint`, `--scope-hint`, `--description` and `--exports` are single-target flags: batch mode refuses them.
|
|
111
112
|
|
|
112
|
-
5. **If `--batch` is set**,
|
|
113
|
+
5. **If `--batch` is set**, load and read `references/batch-mode.md` in full before anything else and follow it.
|
|
113
114
|
|
|
114
|
-
6. Load, read the full file, and then execute `references/resolve-target.md` to begin the workflow
|
|
115
|
+
6. Load, read the full file, and then execute `references/resolve-target.md` to begin the workflow; when `{headless_mode}` is true, print step 1's `start` event first (`references/halt-contract.md`). In batch mode, `references/batch-mode.md` loads it for each target instead.
|
|
@@ -28,10 +28,10 @@ description: >
|
|
|
28
28
|
{README-derived description of what the package does}
|
|
29
29
|
|
|
30
30
|
## Key Exports
|
|
31
|
-
{List of public exports with brief descriptions}
|
|
31
|
+
{List of public exports with brief descriptions. For a skills module: each skill with its description, then each menu code with its description, display name and the skill it runs}
|
|
32
32
|
|
|
33
33
|
## Usage Patterns
|
|
34
|
-
{Common usage patterns extracted from README examples}
|
|
34
|
+
{Common usage patterns extracted from README examples. For a skills module with module-help.csv: one entry per row, giving the menu code, display name and description, the skill and action it runs, its args, and the skills it follows or precedes}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Optional Sections (include when data available)
|
|
@@ -108,3 +108,5 @@ Indexed format targeting ~80-120 tokens per skill:
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
```
|
|
111
|
+
|
|
112
|
+
For a skills module (`repo_shape: skills-module`), `exports` lists the skill names, then the menu codes, and the export counts in `stats` and `confidence_distribution.t1_low` count both.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# DO NOT EDIT -- overwritten on every update.
|
|
2
2
|
#
|
|
3
3
|
# Workflow customization surface for skf-quick-skill.
|
|
4
|
-
# Team overrides: _bmad/custom/skf-quick-skill.toml
|
|
5
|
-
# Personal overrides: _bmad/custom/skf-quick-skill.user.toml
|
|
4
|
+
# Team overrides: {project-root}/_bmad/custom/skf-quick-skill.toml
|
|
5
|
+
# Personal overrides: {project-root}/_bmad/custom/skf-quick-skill.user.toml
|
|
6
6
|
|
|
7
7
|
[workflow]
|
|
8
8
|
|
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
|
|
11
11
|
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
|
|
12
12
|
|
|
13
|
-
# Steps to run
|
|
14
|
-
#
|
|
15
|
-
#
|
|
13
|
+
# Steps to run in SKILL.md On Activation step 3: after config.yaml is read,
|
|
14
|
+
# the run folder created and headless mode resolved, before the CLI flags are
|
|
15
|
+
# parsed and before any stage runs. Overrides append. Use for org-wide
|
|
16
|
+
# pre-flight checks (auth, network, compliance) that must precede any
|
|
17
|
+
# compilation work.
|
|
16
18
|
|
|
17
19
|
activation_steps_prepend = []
|
|
18
20
|
|
|
19
|
-
# Steps to run
|
|
20
|
-
#
|
|
21
|
-
#
|
|
21
|
+
# Steps to run once activation completes (step 4 has parsed the CLI flags),
|
|
22
|
+
# before step 1 or a --batch run starts; a batch runs them once, not per
|
|
23
|
+
# target. Overrides append. Use for context loads or banner customization.
|
|
22
24
|
|
|
23
25
|
activation_steps_append = []
|
|
24
26
|
|
|
@@ -26,28 +28,57 @@ activation_steps_append = []
|
|
|
26
28
|
# (house style, naming conventions, compilation guardrails).
|
|
27
29
|
# Overrides append.
|
|
28
30
|
#
|
|
29
|
-
# Each entry is
|
|
31
|
+
# Each entry is one of:
|
|
30
32
|
# - a literal sentence, e.g. "All skills must cite their upstream source."
|
|
31
33
|
# - a file reference prefixed with `file:`, e.g.
|
|
32
34
|
# "file:{project-root}/docs/skill-style.md" (globs supported; file
|
|
33
35
|
# contents are loaded and treated as facts).
|
|
36
|
+
# - an entry prefixed with `!`, which loads nothing and drops each earlier
|
|
37
|
+
# entry it names.
|
|
38
|
+
#
|
|
39
|
+
# The default below loads every project-context.md under {project-root}.
|
|
40
|
+
# Overrides append, so they cannot delete it; to stop loading those files,
|
|
41
|
+
# set in {project-root}/_bmad/custom/skf-quick-skill.toml:
|
|
42
|
+
# persistent_facts = ["!file:{project-root}/**/project-context.md"]
|
|
34
43
|
|
|
35
44
|
persistent_facts = [
|
|
36
45
|
"file:{project-root}/**/project-context.md",
|
|
37
46
|
]
|
|
38
47
|
|
|
39
|
-
# --- Optional
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
#
|
|
48
|
+
# --- Optional overrides. An empty string means the default named below. ---
|
|
49
|
+
|
|
50
|
+
# The template step 4 assembles SKILL.md and context-snippet.md from, a path
|
|
51
|
+
# from the skill root. Default: assets/skill-template.md. A house-style copy
|
|
52
|
+
# may reword it and add optional sections, and must keep:
|
|
53
|
+
# - its `## SKILL.md Section Structure` and `## context-snippet.md Format`
|
|
54
|
+
# headings, which step 4 reads;
|
|
55
|
+
# - the `## Overview`, `## Description`, `## Key Exports` and
|
|
56
|
+
# `## Usage Patterns` headings: step 5's output validator requires all
|
|
57
|
+
# four, and the snippet's `#key-exports` and `#usage-patterns` anchors
|
|
58
|
+
# point at the last two.
|
|
59
|
+
# metadata.json is read from a copy only when skf-render-quick-metadata.py
|
|
60
|
+
# is missing or fails twice, so leave the copy's `## metadata.json Format`
|
|
61
|
+
# section as bundled.
|
|
62
|
+
|
|
63
|
+
skill_template_path = "assets/skill-template.md"
|
|
64
|
+
|
|
65
|
+
# The folder a --batch run writes its summary to
|
|
66
|
+
# (quick-skill-batch-<timestamp>.json and quick-skill-batch-latest.json),
|
|
67
|
+
# ending in a slash. Default: {skills_output_folder}/_batch/.
|
|
43
68
|
|
|
44
|
-
|
|
45
|
-
registry_resolution_path = ""
|
|
46
|
-
batch_output_path = ""
|
|
69
|
+
batch_output_path = "{skills_output_folder}/_batch/"
|
|
47
70
|
|
|
48
|
-
# Optional post-completion hook
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# skill-
|
|
71
|
+
# Optional post-completion hook: a shell command, not an instruction. Step 6
|
|
72
|
+
# runs it once the success envelope is printed and the result contract
|
|
73
|
+
# written, as:
|
|
74
|
+
# <on_complete> --result-path=<skill package>/quick-skill-result-latest.json
|
|
75
|
+
# The result file sits in the skill package, which then holds SKILL.md,
|
|
76
|
+
# metadata.json and context-snippet.md (unless --skip-snippet); its
|
|
77
|
+
# `outputs` list those paths. It is skipped when the emitter wrote no result
|
|
78
|
+
# file, or not that -latest copy. Under --batch it runs once per target
|
|
79
|
+
# that finishes; a HARD HALT never runs it. A failure is logged and never
|
|
80
|
+
# fails the workflow, and the envelope, already printed, does not carry it.
|
|
81
|
+
# Use for git-add, skill-registry registration, or a notifier on the
|
|
82
|
+
# freshly compiled skill. Empty string = no hook (default).
|
|
52
83
|
|
|
53
84
|
on_complete = ""
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
nextStepFile: 'resolve-target.md'
|
|
3
|
+
healthCheckStepFile: 'health-check.md'
|
|
4
|
+
quickBatchProbeOrder:
|
|
5
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-quick-batch.py'
|
|
6
|
+
- '{project-root}/src/shared/scripts/skf-quick-batch.py'
|
|
3
7
|
---
|
|
4
8
|
|
|
5
9
|
<!-- Config: communicate in {communication_language}. -->
|
|
6
10
|
|
|
7
11
|
# Batch Mode
|
|
8
12
|
|
|
9
|
-
When `--batch <file>` is supplied, quick-skill processes a list of targets from a text file in sequence rather than a single target from arguments. Designed for unattended bulk runs
|
|
13
|
+
When `--batch <file>` is supplied, quick-skill processes a list of targets from a text file in sequence rather than a single target from arguments. Designed for unattended bulk runs: CI pipelines, mass-rebuilds, and batch meta-workflows. The batch's place in the file and every target's outcome live in the batch run folder, kept by `skf-quick-batch.py`, never only in context, so a context compaction mid-batch loses neither, and the helper computes the counts, the status and the exit code.
|
|
14
|
+
|
|
15
|
+
## Before the Batch Starts
|
|
16
|
+
|
|
17
|
+
SKILL.md On Activation step 5 loads this file before anything else. `--skip-snippet` and `--no-active-pointer` apply to every target. `--description` and `--exports` are single-target overrides: one description or export list cannot fit every target. `--language-hint` and `--scope-hint` are single-target flags too: a batch line gives its own target a hint with `language=` and `scope=` (Input format below). When any of the four was passed, HARD HALT with **exit code 2 (input-invalid)** before any target runs: "**`{the flags passed}` do not combine with `--batch`.** They would apply the same description, export list or hint to every skill in the batch. Run each target that needs its own description or export list on its own, give a batch line its own `language=` or `scope=`, or drop the flag and let each target's extraction supply it." Stage `{"phase": "on-activation", "halt_reason": "input-invalid", "reason": "<the message's first sentence>", "skill_package": null, "details": {"flags": [<the flags passed>], "batch_file": "<file>"}}` as `{run_dir}/halt.json` and run `uv run {emitEnvelopeHelper} emit-halt --workflow skf-quick-skill --run-dir "{run_dir}" --target stderr < "{run_dir}/halt.json"`; no batch summary is written.
|
|
18
|
+
|
|
19
|
+
Otherwise `--batch` implies `--headless`: set `{headless_mode}` to true (log "headless: coerced by --batch" if it was false) and go on to Execution.
|
|
10
20
|
|
|
11
21
|
## Input format
|
|
12
22
|
|
|
@@ -20,7 +30,7 @@ cognee@0.5.0
|
|
|
20
30
|
https://github.com/foo/bar
|
|
21
31
|
https://github.com/foo/bar@2.1.0-beta
|
|
22
32
|
|
|
23
|
-
# Per-line modifiers
|
|
33
|
+
# Per-line modifiers: overrides for THIS target only
|
|
24
34
|
lodash language=javascript scope=src/
|
|
25
35
|
cognee@0.5.0 language=python scope=cognee/api/
|
|
26
36
|
```
|
|
@@ -29,32 +39,70 @@ Recognised per-line modifiers:
|
|
|
29
39
|
|
|
30
40
|
| Modifier | Effect (this target only) |
|
|
31
41
|
| --- | --- |
|
|
32
|
-
| `language=<lang>` | Sets `language_hint` for this target
|
|
33
|
-
| `scope=<path>` | Sets `scope_hint` for this target
|
|
42
|
+
| `language=<lang>` | Sets `language_hint` for this target: the same effect as `--language-hint` on a single-target run. |
|
|
43
|
+
| `scope=<path>` | Sets `scope_hint` for this target: the same effect as `--scope-hint` on a single-target run. |
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
The target stays whole, its version included (`cognee@0.5.0`, `requests==2.31.0`): step 1 §1b reads the version as it reads a single target's. A modifier key may be in any letter case; its value must not be empty, and each modifier may appear once. A line with any other word after its target is taken whole as the target, so step 1 cannot parse it and that target fails while the rest of the batch runs.
|
|
36
46
|
|
|
37
47
|
## Execution
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
Resolve `{quickBatchHelper}` from `{quickBatchProbeOrder}`; first existing path wins. `{batch_dir}` is the run folder SKILL.md On Activation step 1 created (`{run_dir}` until the first target), and `{batch_file}` the file given to `--batch`. After a compaction, `{batch_dir}` is the parent folder of the target's `{run_dir}`: the `{project-root}/_bmad-output/.skf-run/skf-quick-skill-*` folder that holds `batch.jsonl`.
|
|
50
|
+
|
|
51
|
+
### 1. Start the Batch
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
uv run {quickBatchHelper} start "{batch_file}" --run-dir "{batch_dir}" [--fail-fast]
|
|
55
|
+
```
|
|
40
56
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
Pass `--fail-fast` when it was given. The helper parses the file and writes the batch file `{batch_dir}/batch.jsonl`, status running and every target pending; run again on the same file, after a compaction for example, it changes nothing. If it exits non-zero, the `halt_reason` of its stderr JSON names the halt; no target runs and no batch summary is written (`references/halt-contract.md`):
|
|
58
|
+
|
|
59
|
+
- **`input-invalid`** (a batch file it cannot read, or a run folder that holds another batch), or no path in `{quickBatchProbeOrder}` exists (an incomplete install): HARD HALT with **exit code 2 (input-invalid)**: display "**The batch cannot start:** {its `message`, or: skf-quick-batch.py is missing, re-install SKF}", stage `{"phase": "batch-mode", "halt_reason": "input-invalid", "reason": "The batch cannot start: <that message>", "skill_package": null, "details": {"batch_file": "{batch_file}"}}` as `{batch_dir}/halt.json` and run `uv run {emitEnvelopeHelper} emit-halt --workflow skf-quick-skill --run-dir "{batch_dir}" --target stderr < "{batch_dir}/halt.json"`.
|
|
60
|
+
- **`write-failure`** (the batch run folder cannot be written, so it cannot hold `halt.json` either): HARD HALT with **exit code 4 (write-failure)**: display "**The batch cannot start:** {its `message`}" and emit with nothing to stage in:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv run {emitEnvelopeHelper} emit-halt --workflow skf-quick-skill --target stderr <<'SKF_JSON'
|
|
64
|
+
{"phase": "batch-mode", "halt_reason": "write-failure", "reason": "The batch cannot start: <its message, one line>", "skill_package": null}
|
|
65
|
+
SKF_JSON
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 2. Take the Next Target
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv run {quickBatchHelper} next --run-dir "{batch_dir}"
|
|
72
|
+
```
|
|
45
73
|
|
|
46
|
-
|
|
74
|
+
- **`"status": "next"`**: the helper printed the target's `start` event on stderr: display it verbatim, then print step 1's `start` event (Headless events below). Bind `{run_dir}` ← its `run_dir` (the target's own run folder, created empty), and set `target`, `language_hint` and `scope_hint` from it. When `{batch_dir}/resolver-warning.txt` exists (SKILL.md On Activation step 3 wrote it, so the customization resolver could not run), record it in the target's sink: `uv run {emitEnvelopeHelper} record --run-dir "{run_dir}" --warning "$(cat "{batch_dir}/resolver-warning.txt")"`. Nothing else carries over from the previous target: its version, repository, extraction, compiled output, `{skill_package}` and summary values all start empty. Then load, read in full and execute `{nextStepFile}`: steps 1 to 6 run for this target.
|
|
75
|
+
- **`"status": "record"`**: target `batch` ended, its payload staged, before §3 recorded it (a compaction came between its envelope and §3): go to §3 with that `batch`, never running it again.
|
|
76
|
+
- **`"status": "done"`**: no target is pending, or `--fail-fast` ended the batch after a failed target. Go to §4.
|
|
77
|
+
|
|
78
|
+
### 3. Record the Target
|
|
79
|
+
|
|
80
|
+
Every target ends here: step 6 §4 returns here when the target finishes, and every HARD HALT of steps 1 to 6 returns here after its envelope (`references/halt-contract.md`, In `--batch`), the step 5 ownership halt included. Control returns here even when the step that ended the target reads as the end of the run. Record it:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv run {quickBatchHelper} record --run-dir "{batch_dir}" --batch {batch} --target stderr
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`{batch}` is the number §2's `next` printed. The helper reads how the target ended from what its run folder staged for the emitter (`halt.json`, or step 6's `result-context.json`), appends the outcome to the batch file, removes the run folder of a target that succeeded, and prints the target's `done` or `fail` event on stderr: display it verbatim. Then go back to §2. If it exits non-zero, its `message` names what is missing: stage the payload the target ended with, record again, then go back to §2.
|
|
87
|
+
|
|
88
|
+
### 4. Batch Summary
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
uv run {quickBatchHelper} summarize --run-dir "{batch_dir}" --output-dir "{batchOutputPath}" --target stderr
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The helper counts the targets, sets the batch status and exit code, writes the summary files below, appends the final status to the batch file (and removes the batch run folder when no target failed), and prints the `batch_summary` event on stderr: display it verbatim. Then print step 7's `start` event and load, read in full and execute `{healthCheckStepFile}`: the health check runs once per batch, here. The batch ends with the event's `exit_code`.
|
|
47
95
|
|
|
48
96
|
## Batch summary contract
|
|
49
97
|
|
|
50
|
-
|
|
98
|
+
`summarize` writes the batch summary at:
|
|
51
99
|
|
|
52
100
|
```
|
|
53
101
|
{batchOutputPath}quick-skill-batch-{YYYYMMDD-HHmmss}.json
|
|
54
102
|
{batchOutputPath}quick-skill-batch-latest.json (copy, not symlink)
|
|
55
103
|
```
|
|
56
104
|
|
|
57
|
-
`{batchOutputPath}` is resolved at SKILL.md On Activation §3 from `workflow.batch_output_path` (bundled default `{skills_output_folder}/_batch/`, trailing slash included).
|
|
105
|
+
`{batchOutputPath}` is resolved at SKILL.md On Activation §3 from `workflow.batch_output_path` (bundled default `{skills_output_folder}/_batch/`, trailing slash included). The per-batch name gains `-2`, `-3` and so on when another batch ended in the same second.
|
|
58
106
|
|
|
59
107
|
Schema:
|
|
60
108
|
|
|
@@ -64,41 +112,46 @@ Schema:
|
|
|
64
112
|
"mode": "batch",
|
|
65
113
|
"status": "success | partial | failed",
|
|
66
114
|
"timestamp": "<ISO 8601 UTC>",
|
|
67
|
-
"input_file": "<path passed to --batch>",
|
|
115
|
+
"input_file": "<absolute path of the file passed to --batch>",
|
|
68
116
|
"targets_total": 0,
|
|
69
117
|
"succeeded": 0,
|
|
70
118
|
"failed": 0,
|
|
71
119
|
"fail_fast_triggered": false,
|
|
120
|
+
"exit_code": 0,
|
|
72
121
|
"results": [
|
|
73
122
|
{
|
|
123
|
+
"batch": 1,
|
|
74
124
|
"target": "<line from batch file>",
|
|
75
125
|
"status": "success | error",
|
|
76
126
|
"exit_code": 0,
|
|
77
127
|
"skill_package": "<absolute path or null>",
|
|
78
|
-
"error_code": null
|
|
128
|
+
"error_code": null,
|
|
129
|
+
"quality_score": null
|
|
79
130
|
}
|
|
80
131
|
]
|
|
81
132
|
}
|
|
82
133
|
```
|
|
83
134
|
|
|
84
|
-
`status` resolves as: `"success"` when `failed == 0
|
|
135
|
+
`status` resolves as: `"success"` when `failed == 0`, a batch file with no target included (it ends at once, `targets_total` 0 and exit code `0`); `"partial"` when `failed > 0 && succeeded > 0`; `"failed"` when `failed > 0 && succeeded == 0`. `fail_fast_triggered` is `true` only when `--fail-fast` aborted the loop early; `targets_total` then reflects the count actually attempted, not the file's line count. Each `results[]` entry is one target in file order: its `batch` number, its `exit_code` and `error_code` (the `halt_reason` of its halt envelope, null on success), and its `quality_score`, the skill-check score of its success envelope (null when it failed or skill-check did not run).
|
|
85
136
|
|
|
86
137
|
## Headless events
|
|
87
138
|
|
|
88
|
-
Batch mode emits per-target boundary events on stderr in addition to the per-step events
|
|
139
|
+
Batch mode emits per-target boundary events on stderr in addition to the per-step events of `references/halt-contract.md` (Headless Events):
|
|
89
140
|
|
|
90
141
|
```
|
|
91
142
|
{"batch":<n>,"target":"<target>","status":"start"}
|
|
92
|
-
{"batch":<n>,"target":"<target>","status":"done","exit"
|
|
143
|
+
{"batch":<n>,"target":"<target>","status":"done","exit":0}
|
|
93
144
|
{"batch":<n>,"target":"<target>","status":"fail","exit":<code>,"error_code":"<class>"}
|
|
94
145
|
```
|
|
95
146
|
|
|
96
|
-
`<n>` is the 1-based index of the target in the parsed list. After the loop ends,
|
|
147
|
+
`<n>` is the 1-based index of the target in the parsed list. `next` prints the `start` event; `record` prints `done` or `fail`. After the loop ends, `summarize` prints one final batch-summary event:
|
|
97
148
|
|
|
98
149
|
```
|
|
99
|
-
{"batch_summary":true,"targets_total":N,"succeeded":K,"failed":M,"status":"<...>","fail_fast_triggered":<bool>}
|
|
150
|
+
{"batch_summary":true,"targets_total":N,"succeeded":K,"failed":M,"status":"<...>","fail_fast_triggered":<bool>,"exit_code":<code>,"summary_path":"<path>"}
|
|
100
151
|
```
|
|
101
152
|
|
|
102
153
|
## Exit code
|
|
103
154
|
|
|
104
|
-
|
|
155
|
+
Without `--fail-fast`, the batch runs every target, whatever an earlier target's outcome, and exits with the batch summary's `exit_code`: `0` when `failed == 0`, otherwise the highest exit code among the failed targets. Automators that branch on the single-target exit-code map read each target's own code in `results[]`. With `--fail-fast`, the batch stops at the first failed target and exits with that target's code.
|
|
156
|
+
|
|
157
|
+
A batch refused before its first target writes no batch summary. It exits with code `2` when `--description` or `--exports` was passed with `--batch` (or `--language-hint` or `--scope-hint`), §1 cannot read the batch file or `skf-quick-batch.py` is missing, and with code `4` when §1 cannot write the batch run folder.
|