bmad-module-skill-forge 1.4.0 → 1.5.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 +0 -8
- package/docs/_data/pinned.yaml +1 -1
- package/docs/_internal/STABILITY.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/examples.md +1 -1
- package/docs/workflows.md +5 -5
- package/package.json +2 -2
- package/src/README.md +1 -1
- package/src/knowledge/ccc-bridge.md +12 -12
- package/src/knowledge/qmd-registry.md +5 -5
- package/src/shared/health-check.md +5 -5
- package/src/shared/references/description-guard-protocol.md +100 -0
- package/src/shared/references/output-contract-schema.md +1 -1
- package/src/shared/scripts/schemas/skf-brief-result-envelope.v1.json +6 -6
- package/src/shared/scripts/schemas/skf-setup-result-envelope.v1.json +9 -3
- package/src/shared/scripts/schemas/skf-update-result-envelope.v1.json +149 -0
- package/src/shared/scripts/schemas/skill-brief.v1.json +22 -2
- package/src/shared/scripts/skf-build-change-manifest.py +420 -0
- package/src/shared/scripts/skf-check-workspace-drift.py +321 -0
- package/src/shared/scripts/skf-compare-file-hashes.py +357 -0
- package/src/shared/scripts/skf-description-guard.py +359 -0
- package/src/shared/scripts/skf-detect-language.py +2 -2
- package/src/shared/scripts/skf-detect-scripts-assets.py +613 -0
- package/src/shared/scripts/skf-detect-tools.py +97 -8
- package/src/shared/scripts/skf-detect-workspaces.py +1 -1
- package/src/shared/scripts/skf-disqualify-candidates.py +576 -0
- package/src/shared/scripts/skf-emit-brief-result-envelope.py +3 -3
- package/src/shared/scripts/skf-emit-result-envelope.py +93 -9
- package/src/shared/scripts/skf-enumerate-stack-skills.py +514 -0
- package/src/shared/scripts/skf-forge-tier-rw.py +11 -11
- package/src/shared/scripts/skf-hash-content.py +284 -0
- package/src/shared/scripts/skf-load-provenance.py +295 -0
- package/src/shared/scripts/skf-merge-ccc-exclusions.py +45 -1
- package/src/shared/scripts/skf-pair-intersect.py +250 -0
- package/src/shared/scripts/skf-provenance-gap-dispatch.py +433 -0
- package/src/shared/scripts/skf-qmd-classify-collections.py +42 -8
- package/src/shared/scripts/skf-recommend-scope-type.py +2 -2
- package/src/shared/scripts/skf-render-quick-metadata.py +2 -2
- package/src/shared/scripts/skf-resolve-authoritative-files.py +504 -0
- package/src/shared/scripts/skf-scan-manifests.py +738 -0
- package/src/shared/scripts/skf-scan-skill-md-structure.py +375 -0
- package/src/shared/scripts/skf-update-active-symlink.py +315 -0
- package/src/shared/scripts/skf-validate-brief-inputs.py +5 -5
- package/src/shared/scripts/skf-validate-brief-schema.py +348 -0
- package/src/shared/scripts/skf-write-skill-brief.py +61 -5
- package/src/skf-analyze-source/SKILL.md +69 -16
- package/src/skf-analyze-source/assets/skill-brief-schema.md +1 -1
- package/src/skf-analyze-source/customize.toml +55 -0
- package/src/skf-analyze-source/{steps-c/step-01b-continue.md → references/continue.md} +12 -12
- package/src/skf-analyze-source/{steps-c/step-06-generate-briefs.md → references/generate-briefs.md} +29 -10
- package/src/skf-analyze-source/{steps-c/step-07-health-check.md → references/health-check.md} +5 -3
- package/src/skf-analyze-source/{steps-c/step-03-identify-units.md → references/identify-units.md} +44 -14
- package/src/skf-analyze-source/{steps-c/step-01-init.md → references/init.md} +27 -6
- package/src/skf-analyze-source/{steps-c/step-04-map-and-detect.md → references/map-and-detect.md} +52 -25
- package/src/skf-analyze-source/{steps-c/step-05-recommend.md → references/recommend.md} +15 -8
- package/src/skf-analyze-source/{steps-c/step-02-scan-project.md → references/scan-project.md} +12 -10
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +2 -0
- package/src/skf-analyze-source/templates/analysis-report-template.md +6 -6
- package/src/skf-audit-skill/SKILL.md +66 -15
- package/src/skf-audit-skill/assets/drift-report-template.md +6 -5
- package/src/skf-audit-skill/customize.toml +49 -0
- package/src/skf-audit-skill/{steps-c/step-07-health-check.md → references/health-check.md} +5 -3
- package/src/skf-audit-skill/references/init.md +305 -0
- package/src/skf-audit-skill/{steps-c/step-02-re-index.md → references/re-index.md} +11 -11
- package/src/skf-audit-skill/{steps-c/step-06-report.md → references/report.md} +25 -7
- package/src/skf-audit-skill/{steps-c/step-04-semantic-diff.md → references/semantic-diff.md} +6 -6
- package/src/skf-audit-skill/{steps-c/step-05-severity-classify.md → references/severity-classify.md} +5 -5
- package/src/skf-audit-skill/references/severity-rules.md +2 -0
- package/src/skf-audit-skill/{steps-c/step-03-structural-diff.md → references/structural-diff.md} +29 -16
- package/src/skf-brief-skill/SKILL.md +48 -18
- package/src/skf-brief-skill/assets/description-voice-examples.md +1 -1
- package/src/skf-brief-skill/assets/skill-brief-schema.md +32 -2
- package/src/skf-brief-skill/customize.toml +44 -0
- package/src/skf-brief-skill/{steps-c/step-02-analyze-target.md → references/analyze-target.md} +5 -5
- package/src/skf-brief-skill/{steps-c/step-04-confirm-brief.md → references/confirm-brief.md} +13 -10
- package/src/skf-brief-skill/references/draft-checkpoint.md +4 -4
- package/src/skf-brief-skill/{steps-c/step-01-gather-intent.md → references/gather-intent.md} +24 -24
- package/src/skf-brief-skill/references/headless-args.md +9 -9
- package/src/skf-brief-skill/references/headless-source-authority-detection.md +1 -1
- package/src/skf-brief-skill/{steps-c/step-06-health-check.md → references/health-check.md} +4 -2
- package/src/skf-brief-skill/references/portfolio-similarity-check.md +2 -2
- package/src/skf-brief-skill/references/qmd-collection-registration.md +1 -1
- package/src/skf-brief-skill/{steps-c/step-03-scope-definition.md → references/scope-definition.md} +19 -16
- package/src/skf-brief-skill/references/version-resolution.md +2 -2
- package/src/skf-brief-skill/{steps-c/step-05-write-brief.md → references/write-brief.md} +11 -10
- package/src/skf-create-skill/SKILL.md +25 -19
- package/src/skf-create-skill/assets/compile-assembly-rules.md +3 -3
- package/src/skf-create-skill/assets/skill-sections.md +5 -5
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +11 -11
- package/src/skf-create-skill/customize.toml +35 -0
- package/src/skf-create-skill/references/authoritative-files-protocol.md +142 -0
- package/src/skf-create-skill/{steps-c/step-05-compile.md → references/compile.md} +16 -16
- package/src/skf-create-skill/{steps-c/step-03d-component-extraction.md → references/component-extraction.md} +16 -16
- package/src/skf-create-skill/{steps-c/step-02-ecosystem-check.md → references/ecosystem-check.md} +4 -4
- package/src/skf-create-skill/{steps-c/step-04-enrich.md → references/enrich.md} +3 -3
- package/src/skf-create-skill/{steps-c/step-03-extract.md → references/extract.md} +52 -120
- package/src/skf-create-skill/references/extraction-patterns.md +8 -8
- package/src/skf-create-skill/{steps-c/step-07-generate-artifacts.md → references/generate-artifacts.md} +17 -9
- package/src/skf-create-skill/{steps-c/step-09-health-check.md → references/health-check.md} +4 -2
- package/src/skf-create-skill/{steps-c/step-01-load-brief.md → references/load-brief.md} +40 -32
- package/src/skf-create-skill/{steps-c/step-08-report.md → references/report.md} +8 -8
- package/src/skf-create-skill/references/source-resolution-protocols.md +6 -6
- package/src/skf-create-skill/{steps-c/sub/step-02b-ccc-discover.md → references/sub/ccc-discover.md} +5 -5
- package/src/skf-create-skill/{steps-c/sub/step-03c-fetch-docs.md → references/sub/fetch-docs.md} +28 -12
- package/src/skf-create-skill/{steps-c/sub/step-03b-fetch-temporal.md → references/sub/fetch-temporal.md} +81 -50
- package/src/skf-create-skill/{steps-c/step-06-validate.md → references/validate.md} +46 -26
- package/src/skf-create-stack-skill/SKILL.md +76 -17
- package/src/skf-create-stack-skill/assets/provenance-map-schema.md +102 -0
- package/src/skf-create-stack-skill/assets/stack-skill-template.md +1 -1
- package/src/skf-create-stack-skill/customize.toml +46 -0
- package/src/skf-create-stack-skill/{steps-c/step-06-compile-stack.md → references/compile-stack.md} +6 -5
- package/src/skf-create-stack-skill/references/compose-mode-rules.md +3 -1
- package/src/skf-create-stack-skill/{steps-c/step-05-detect-integrations.md → references/detect-integrations.md} +32 -11
- package/src/skf-create-stack-skill/{steps-c/step-02-detect-manifests.md → references/detect-manifests.md} +28 -28
- package/src/skf-create-stack-skill/{steps-c/step-07-generate-output.md → references/generate-output.md} +11 -85
- package/src/skf-create-stack-skill/{steps-c/step-10-health-check.md → references/health-check.md} +4 -2
- package/src/skf-create-stack-skill/{steps-c/step-01-init.md → references/init.md} +70 -4
- package/src/skf-create-stack-skill/references/integration-patterns.md +2 -0
- package/src/skf-create-stack-skill/references/manifest-patterns.md +2 -0
- package/src/skf-create-stack-skill/{steps-c/step-04-parallel-extract.md → references/parallel-extract.md} +40 -17
- package/src/skf-create-stack-skill/{steps-c/step-03-rank-and-confirm.md → references/rank-and-confirm.md} +5 -4
- package/src/skf-create-stack-skill/{steps-c/step-09-report.md → references/report.md} +3 -3
- package/src/skf-create-stack-skill/{steps-c/step-08-validate.md → references/validate.md} +6 -6
- package/src/skf-drop-skill/SKILL.md +84 -12
- package/src/skf-drop-skill/customize.toml +57 -0
- package/src/skf-drop-skill/{steps-c/step-02-execute.md → references/execute.md} +49 -34
- package/src/skf-drop-skill/{steps-c/step-04-health-check.md → references/health-check.md} +6 -4
- package/src/skf-drop-skill/{steps-c/step-03-report.md → references/report.md} +13 -5
- package/src/skf-drop-skill/{steps-c/step-01-select.md → references/select.md} +63 -15
- package/src/skf-export-skill/SKILL.md +85 -16
- package/src/skf-export-skill/assets/managed-section-format.md +3 -3
- package/src/skf-export-skill/assets/snippet-format.md +2 -2
- package/src/skf-export-skill/customize.toml +49 -0
- package/src/skf-export-skill/{steps-c/step-03-generate-snippet.md → references/generate-snippet.md} +18 -12
- package/src/skf-export-skill/{steps-c/step-07-health-check.md → references/health-check.md} +6 -4
- package/src/skf-export-skill/{steps-c/step-01-load-skill.md → references/load-skill.md} +21 -51
- package/src/skf-export-skill/references/manifest-rebuild.md +68 -0
- package/src/skf-export-skill/references/multi-skill-mode.md +38 -0
- package/src/skf-export-skill/references/orphan-context-detection.md +75 -0
- package/src/skf-export-skill/references/orphan-row-detection.md +102 -0
- package/src/skf-export-skill/{steps-c/step-02-package.md → references/package.md} +7 -7
- package/src/skf-export-skill/references/preflight-snippet-root-probe.md +74 -0
- package/src/skf-export-skill/{steps-c/step-06-summary.md → references/summary.md} +30 -6
- package/src/skf-export-skill/{steps-c/step-05-token-report.md → references/token-report.md} +5 -5
- package/src/skf-export-skill/{steps-c/step-04-update-context.md → references/update-context.md} +116 -91
- package/src/skf-quick-skill/SKILL.md +63 -123
- package/src/skf-quick-skill/customize.toml +44 -0
- package/src/skf-quick-skill/references/batch-mode.md +102 -0
- package/src/skf-quick-skill/{steps-c/step-04-compile.md → references/compile.md} +10 -10
- package/src/skf-quick-skill/{steps-c/step-02-ecosystem-check.md → references/ecosystem-check.md} +5 -5
- package/src/skf-quick-skill/{steps-c/step-06-finalize.md → references/finalize.md} +7 -7
- package/src/skf-quick-skill/{steps-c/step-07-health-check.md → references/health-check.md} +3 -3
- package/src/skf-quick-skill/{steps-c/step-03-quick-extract.md → references/quick-extract.md} +5 -5
- package/src/skf-quick-skill/references/registry-resolution.md +2 -0
- package/src/skf-quick-skill/{steps-c/step-01-resolve-target.md → references/resolve-target.md} +14 -10
- package/src/skf-quick-skill/{steps-c/step-05-write-and-validate.md → references/write-and-validate.md} +4 -4
- package/src/skf-refine-architecture/SKILL.md +86 -16
- package/src/skf-refine-architecture/customize.toml +49 -0
- package/src/skf-refine-architecture/{steps-c/step-05-compile.md → references/compile.md} +4 -4
- package/src/skf-refine-architecture/{steps-c/step-02-gap-analysis.md → references/gap-analysis.md} +5 -5
- package/src/skf-refine-architecture/{steps-c/step-07-health-check.md → references/health-check.md} +6 -4
- package/src/skf-refine-architecture/{steps-c/step-04-improvements.md → references/improvements.md} +5 -5
- package/src/skf-refine-architecture/references/init.md +144 -0
- package/src/skf-refine-architecture/{steps-c/step-03-issue-detection.md → references/issue-detection.md} +5 -5
- package/src/skf-refine-architecture/references/refinement-rules.md +2 -0
- package/src/skf-refine-architecture/{steps-c/step-06-report.md → references/report.md} +14 -5
- package/src/skf-rename-skill/SKILL.md +82 -12
- package/src/skf-rename-skill/customize.toml +52 -0
- package/src/skf-rename-skill/{steps-c/step-02-execute.md → references/execute.md} +94 -99
- package/src/skf-rename-skill/references/health-check.md +30 -0
- package/src/skf-rename-skill/references/rebuild-context.md +110 -0
- package/src/skf-rename-skill/{steps-c/step-03-report.md → references/report.md} +13 -5
- package/src/skf-rename-skill/{steps-c/step-01-select.md → references/select.md} +59 -20
- package/src/skf-setup/SKILL.md +35 -35
- package/src/skf-setup/customize.toml +33 -0
- package/src/skf-setup/{steps-c/step-03-auto-index.md → references/auto-index.md} +10 -18
- package/src/skf-setup/{steps-c/step-01b-ccc-index.md → references/ccc-index.md} +14 -22
- package/src/skf-setup/{steps-c/step-01-detect-and-tier.md → references/detect-and-tier.md} +23 -10
- package/src/skf-setup/{steps-c/step-05-health-check.md → references/health-check.md} +1 -1
- package/src/skf-setup/{steps-c/step-04-report.md → references/report.md} +21 -19
- package/src/skf-setup/references/tier-rules.md +1 -1
- package/src/skf-setup/{steps-c/step-02-write-config.md → references/write-config.md} +14 -13
- package/src/skf-test-skill/SKILL.md +77 -15
- package/src/skf-test-skill/customize.toml +54 -0
- package/src/skf-test-skill/{steps-c/step-04-coherence-check.md → references/coherence-check.md} +28 -71
- package/src/skf-test-skill/{steps-c/step-03-coverage-check.md → references/coverage-check.md} +16 -39
- package/src/skf-test-skill/{steps-c/step-02-detect-mode.md → references/detect-mode.md} +4 -26
- package/src/skf-test-skill/{steps-c/step-04b-external-validators.md → references/external-validators.md} +6 -28
- package/src/skf-test-skill/references/health-check.md +14 -0
- package/src/skf-test-skill/{steps-c/step-01-init.md → references/init.md} +21 -37
- package/src/skf-test-skill/references/migration-section-rules.md +4 -2
- package/src/skf-test-skill/{steps-c/step-06-report.md → references/report.md} +41 -51
- package/src/skf-test-skill/{steps-c/step-05-score.md → references/score.md} +26 -43
- package/src/skf-test-skill/references/scoring-rules.md +8 -6
- package/src/skf-test-skill/references/source-access-protocol.md +7 -5
- package/src/skf-test-skill/scripts/compute-score.py +88 -17
- package/src/skf-test-skill/templates/test-report-template.md +13 -13
- package/src/skf-update-skill/SKILL.md +23 -14
- package/src/skf-update-skill/customize.toml +44 -0
- package/src/skf-update-skill/{steps-c/step-02-detect-changes.md → references/detect-changes.md} +176 -68
- package/src/skf-update-skill/references/health-check.md +32 -0
- package/src/skf-update-skill/{steps-c/step-01-init.md → references/init.md} +56 -8
- package/src/skf-update-skill/references/manual-section-rules.md +4 -0
- package/src/skf-update-skill/references/merge-conflict-rules.md +4 -0
- package/src/skf-update-skill/{steps-c/step-04-merge.md → references/merge.md} +8 -8
- package/src/skf-update-skill/{steps-c/step-03-re-extract.md → references/re-extract.md} +53 -44
- package/src/skf-update-skill/references/remote-source-resolution.md +5 -1
- package/src/skf-update-skill/references/report.md +214 -0
- package/src/skf-update-skill/{steps-c/step-05-validate.md → references/validate.md} +5 -5
- package/src/skf-update-skill/{steps-c/step-06-write.md → references/write.md} +73 -51
- package/src/skf-verify-stack/SKILL.md +89 -17
- package/src/skf-verify-stack/assets/feasibility-report-template.md +4 -4
- package/src/skf-verify-stack/customize.toml +50 -0
- package/src/skf-verify-stack/references/coverage-patterns.md +2 -2
- package/src/skf-verify-stack/{steps-c/step-02-coverage.md → references/coverage.md} +7 -7
- package/src/skf-verify-stack/{steps-c/step-07-health-check.md → references/health-check.md} +7 -5
- package/src/skf-verify-stack/references/init.md +166 -0
- package/src/skf-verify-stack/references/integration-verification-rules.md +1 -1
- package/src/skf-verify-stack/{steps-c/step-03-integrations.md → references/integrations.md} +12 -12
- package/src/skf-verify-stack/{steps-c/step-06-report.md → references/report.md} +22 -41
- package/src/skf-verify-stack/{steps-c/step-04-requirements.md → references/requirements.md} +7 -7
- package/src/skf-verify-stack/{steps-c/step-05-synthesize.md → references/synthesize.md} +8 -8
- package/tools/validate-docs-drift.js +1 -1
- package/src/skf-audit-skill/steps-c/step-01-init.md +0 -221
- package/src/skf-refine-architecture/steps-c/step-01-init.md +0 -136
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +0 -22
- package/src/skf-test-skill/steps-c/step-07-health-check.md +0 -25
- package/src/skf-update-skill/steps-c/step-07-report.md +0 -148
- package/src/skf-update-skill/steps-c/step-08-health-check.md +0 -22
- package/src/skf-verify-stack/steps-c/step-01-init.md +0 -178
|
@@ -9,6 +9,14 @@ description: Fast skill from a package name or GitHub URL — no brief needed. U
|
|
|
9
9
|
|
|
10
10
|
The fastest path to a skill — accept a GitHub URL or package name, resolve to source, extract the public API surface, and produce a best-effort SKILL.md with context snippet and metadata. No brief needed. Quick Skill is tier-unaware by design — all output is produced at community-tier quality regardless of available tools.
|
|
11
11
|
|
|
12
|
+
## Conventions
|
|
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).
|
|
17
|
+
- `{project-root}`-prefixed paths resolve from the project working directory.
|
|
18
|
+
- `{skill-name}` resolves to the skill directory's basename.
|
|
19
|
+
|
|
12
20
|
## Role
|
|
13
21
|
|
|
14
22
|
You are a rapid skill compiler collaborating with a developer. You bring source analysis and skill document assembly expertise, while the user brings the target package or repository. Work together efficiently — speed is the priority.
|
|
@@ -18,37 +26,36 @@ You are a rapid skill compiler collaborating with a developer. You bring source
|
|
|
18
26
|
These rules apply to every step in this workflow:
|
|
19
27
|
|
|
20
28
|
- Never fabricate content — all data must come from source extraction or user input
|
|
21
|
-
- Read each step file completely before taking any action
|
|
22
|
-
- Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
|
|
23
29
|
- Only load one step file at a time — never preload future steps
|
|
24
30
|
- Always communicate in `{communication_language}`
|
|
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)** and emit the error result contract per "Result Contract on HARD HALT" with `error.code: "user-cancelled"`. In step 4 §6 the equivalent affordance is `[Q] Quit without writing` — same exit code, same envelope contract.
|
|
25
32
|
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
|
|
26
33
|
- If `{headless_mode}` is true, emit a single-line JSON progress event to **stderr** at each step's entry and exit so pipeline schedulers can stream live progress instead of post-mortem-parsing the result contract:
|
|
27
34
|
- entry: `{"step":N,"name":"<slug>","status":"start"}`
|
|
28
35
|
- exit (just before chaining to nextStepFile): `{"step":N,"name":"<slug>","status":"done"}`
|
|
29
36
|
- on HARD HALT: `{"step":N,"name":"<slug>","status":"halt","exit":<code>}` instead of "done"
|
|
30
37
|
|
|
31
|
-
`N` is the step number
|
|
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.
|
|
32
39
|
|
|
33
40
|
## Stages
|
|
34
41
|
|
|
35
42
|
| # | Step | File | Auto-proceed |
|
|
36
43
|
|---|------|------|--------------|
|
|
37
|
-
| 1 | Resolve Target |
|
|
38
|
-
| 2 | Ecosystem Check |
|
|
39
|
-
| 3 | Quick Extract |
|
|
40
|
-
| 4 | Compile |
|
|
41
|
-
| 5 | Write & Validate |
|
|
42
|
-
| 6 | Finalize |
|
|
43
|
-
| 7 | Workflow Health Check |
|
|
44
|
+
| 1 | Resolve Target | references/resolve-target.md | Yes |
|
|
45
|
+
| 2 | Ecosystem Check | references/ecosystem-check.md | Yes |
|
|
46
|
+
| 3 | Quick Extract | references/quick-extract.md | Yes |
|
|
47
|
+
| 4 | Compile | references/compile.md | No (review) |
|
|
48
|
+
| 5 | Write & Validate | references/write-and-validate.md | Yes |
|
|
49
|
+
| 6 | Finalize | references/finalize.md | Yes |
|
|
50
|
+
| 7 | Workflow Health Check | references/health-check.md | Yes |
|
|
44
51
|
|
|
45
52
|
## Invocation Contract
|
|
46
53
|
|
|
47
54
|
| Aspect | Detail |
|
|
48
55
|
|--------|--------|
|
|
49
56
|
| **Inputs** | target (GitHub URL or package name) [required for single-target mode], language_hint [optional], scope_hint [optional] |
|
|
50
|
-
| **Overrides** | `--description`, `--exports`, `--skip-snippet`, `--no-active-pointer`, `--batch <file>`, `--fail-fast` — see On Activation step
|
|
51
|
-
| **Gates** | step
|
|
57
|
+
| **Overrides** | `--description`, `--exports`, `--skip-snippet`, `--no-active-pointer`, `--batch <file>`, `--fail-fast` — see On Activation step 4 |
|
|
58
|
+
| **Gates** | step 1: Input Gate [use args]; step 2: Choice Gate [P] (if match); step 4: Review Gate [C/E/S/Q] |
|
|
52
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. |
|
|
53
60
|
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
54
61
|
| **Exit codes** | See "Exit Codes" below |
|
|
@@ -59,18 +66,19 @@ Every HARD HALT in this workflow exits with a stable, documented code so headles
|
|
|
59
66
|
|
|
60
67
|
| Code | Meaning | Raised by |
|
|
61
68
|
| ---- | ---------------------- | ----------------------------------------------------------- |
|
|
62
|
-
| 0 | success | step
|
|
63
|
-
| 3 | resolution-failure | step
|
|
64
|
-
| 4 | write-failure | step
|
|
65
|
-
| 5 | overwrite-cancelled | step
|
|
66
|
-
| 6 |
|
|
67
|
-
| 7 | finalize-blocked | step
|
|
69
|
+
| 0 | success | step 7 (terminal) |
|
|
70
|
+
| 3 | resolution-failure | step 1 §2c (prose input), step 1 §3 (registry chain failed) |
|
|
71
|
+
| 4 | write-failure | step 5 §2 (deliverable write failed) |
|
|
72
|
+
| 5 | overwrite-cancelled | step 5 §1 (user selected [N]) |
|
|
73
|
+
| 6 | user-cancelled | step 1 §1 ([X] Cancel and exit, or cancel-line affordance); step 2 §3 ([A] Abort at ecosystem-match gate); step 4 §6 (user selected [Q]) — originally `compile-cancelled`, generalised to cover any interactive gate |
|
|
74
|
+
| 7 | finalize-blocked | step 6 §1 (active-pointer flip refused — non-link in place) |
|
|
75
|
+
| 8 | ecosystem-redirect | step 2 §3 ([I] Install at ecosystem-match gate — user opted to install the existing official skill instead of compiling a custom community skill) |
|
|
68
76
|
|
|
69
|
-
Reserved: `validator-missing` may be promoted from advisory log to fatal exit code in a future revision
|
|
77
|
+
Reserved: `validator-missing` may be promoted from advisory log to fatal exit code in a future revision.
|
|
70
78
|
|
|
71
79
|
## Result Contract on HARD HALT
|
|
72
80
|
|
|
73
|
-
In addition to the success-variant result contract written by step
|
|
81
|
+
In addition to the success-variant result contract written by step 6 §3, every HARD HALT must surface an **error variant** so headless automators don't silently break when `quick-skill-result-latest.json` is missing on failed runs.
|
|
74
82
|
|
|
75
83
|
**Always (every HARD HALT, regardless of phase)** — emit a single line on **stderr**:
|
|
76
84
|
|
|
@@ -80,14 +88,14 @@ SKF_QUICK_SKILL_RESULT_JSON: {"status":"error","exit_code":<N>,"phase":"<slug>",
|
|
|
80
88
|
|
|
81
89
|
One line, no pretty-print. Matches the prefix-and-envelope convention used by `skf-emit-result-envelope.py`.
|
|
82
90
|
|
|
83
|
-
**Additionally, when `{skill_package}` is known** (HALT at step
|
|
91
|
+
**Additionally, when `{skill_package}` is known** (HALT at step 5 §1 onward) — write the same JSON object (without the `SKF_QUICK_SKILL_RESULT_JSON: ` prefix) to disk:
|
|
84
92
|
|
|
85
93
|
```
|
|
86
94
|
{skill_package}/quick-skill-result-{YYYYMMDD-HHmmss}.json
|
|
87
95
|
{skill_package}/quick-skill-result-latest.json (copy, not symlink)
|
|
88
96
|
```
|
|
89
97
|
|
|
90
|
-
so consumers that hardcode the `-latest.json` path see a deterministic file even on failed runs. HALTs at step
|
|
98
|
+
so consumers that hardcode the `-latest.json` path see a deterministic file even on failed runs. HALTs at step 1/02/03/04 cannot write to disk because `{skill_package}` is computed only in step 5 §1; for those, the stderr envelope plus exit code is the contract.
|
|
91
99
|
|
|
92
100
|
**Schema:**
|
|
93
101
|
|
|
@@ -96,129 +104,61 @@ so consumers that hardcode the `-latest.json` path see a deterministic file even
|
|
|
96
104
|
| `status` | string | always `"error"` for HARD HALTs |
|
|
97
105
|
| `exit_code` | integer | matches the Exit Codes table |
|
|
98
106
|
| `phase` | string | step slug where the HALT occurred (e.g. `resolve-target`, `compile`) |
|
|
99
|
-
| `error.code` | string | one of: `resolution-failure`, `write-failure`, `overwrite-cancelled`, `compile-cancelled
|
|
107
|
+
| `error.code` | string | one of: `resolution-failure`, `write-failure`, `overwrite-cancelled`, `user-cancelled` (formerly `compile-cancelled`), `finalize-blocked`, `ecosystem-redirect` |
|
|
100
108
|
| `error.message` | string | the user-facing message that was displayed |
|
|
101
109
|
| `error.details` | any | optional — phase-specific context (e.g. the failed file path) |
|
|
102
110
|
| `outputs` | object | empty `{}` on early HALTs; partial when files were already written |
|
|
103
111
|
| `summary` | object | empty `{}` on early HALTs |
|
|
104
|
-
| `skill_package` | string \| null | absolute path when known, `null` when HALT preceded step
|
|
112
|
+
| `skill_package` | string \| null | absolute path when known, `null` when HALT preceded step 5 §1 |
|
|
105
113
|
|
|
106
114
|
## On Activation
|
|
107
115
|
|
|
108
|
-
1. Read `{project-root}/_bmad/skf/config.yaml` and `{
|
|
109
|
-
- From config: `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `skills_output_folder`, `forge_data_folder`
|
|
116
|
+
1. Read `{project-root}/_bmad/skf/config.yaml` and `{sidecar_path}/preferences.yaml` in parallel (one batched tool-call message — they are independent files), then resolve:
|
|
117
|
+
- From config: `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
110
118
|
- From preferences: `headless_mode` (default false)
|
|
111
119
|
|
|
112
120
|
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in `preferences.yaml`. Default: false.
|
|
113
121
|
|
|
114
|
-
3. **
|
|
115
|
-
|
|
116
|
-
| Flag | Effect |
|
|
117
|
-
| --- | --- |
|
|
118
|
-
| `--description "<string>"` | Override the LLM-derived description in step-04 §2 (used in SKILL.md frontmatter and metadata.json). Subject to the same agentskills.io length (1–1024 chars) and voice (third-person) checks as extracted descriptions. |
|
|
119
|
-
| `--exports "<name1,name2,...>"` | Override the extracted export list. Parse as comma-separated; trim whitespace per item; skip empty items. Used in step-04 §2 Key Exports and the count-derived metadata stats. |
|
|
120
|
-
| `--skip-snippet` | Skip context-snippet.md generation in step-04 §3 and its write in step-05 §2. Artifact omitted from `outputs`; step-05 §5 advisory snippet validation reports a "skipped" entry. |
|
|
121
|
-
| `--no-active-pointer` | Skip the active-pointer flip in step-06 §1. Deliverables still land in `{skill_package}` but `{skill_group}/active` is not updated. Useful for batch automators that flip pointers in a separate stage. |
|
|
122
|
-
| `--batch <file>` | Run the workflow against a list of targets from a text file rather than a single argument. Implies `--headless` (gates cannot be human-driven across N targets). See "Batch Mode" below for input format and summary contract. Single-target overrides above apply globally to every target in the batch. |
|
|
123
|
-
| `--fail-fast` | Only meaningful with `--batch`. Abort the whole batch on the first per-target failure instead of recording the failure in the summary and proceeding to the next target. |
|
|
124
|
-
|
|
125
|
-
4. **If `--batch` is set**, force `{headless_mode} = true` (log "headless: coerced by --batch" if it was false), read the batch file, and parse the target list per "Batch Mode" below. Continue at step 5; the batch loop documented in "Batch Mode" wraps the step-01 → step-07 pipeline that follows.
|
|
126
|
-
|
|
127
|
-
5. Load, read the full file, and then execute `./steps-c/step-01-resolve-target.md` to begin the workflow. (In batch mode, control returns here for each subsequent target after step-07 completes; see "Batch Mode" below.)
|
|
128
|
-
|
|
129
|
-
## Batch Mode
|
|
130
|
-
|
|
131
|
-
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, the skf-batch-skills meta-workflow when it lands).
|
|
132
|
-
|
|
133
|
-
### Input format
|
|
134
|
-
|
|
135
|
-
One target per line. Empty lines and lines starting with `#` (after optional leading whitespace) are ignored. Each non-empty line has the same shape as the single-target `target` argument, with optional space-separated per-line modifiers:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
# A batch input file.
|
|
139
|
-
lodash
|
|
140
|
-
@vercel/og
|
|
141
|
-
cognee@0.5.0
|
|
142
|
-
https://github.com/foo/bar
|
|
143
|
-
https://github.com/foo/bar@2.1.0-beta
|
|
144
|
-
|
|
145
|
-
# Per-line modifiers — overrides for THIS target only:
|
|
146
|
-
lodash language=javascript scope=src/
|
|
147
|
-
cognee@0.5.0 language=python scope=cognee/api/
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Recognised per-line modifiers:
|
|
151
|
-
|
|
152
|
-
| Modifier | Effect (this target only) |
|
|
153
|
-
| --- | --- |
|
|
154
|
-
| `language=<lang>` | Sets `language_hint` for this target — same effect as the optional `language_hint` input on a single-target run. |
|
|
155
|
-
| `scope=<path>` | Sets `scope_hint` for this target — same effect as the optional `scope_hint` input on a single-target run. |
|
|
156
|
-
|
|
157
|
-
Per-line modifiers shadow the global `--description` / `--exports` / `--skip-snippet` / `--no-active-pointer` overrides only when those override fields are not set. Global overrides apply to every target unless a future modifier extends per-line override syntax.
|
|
158
|
-
|
|
159
|
-
### Execution
|
|
122
|
+
3. **Resolve workflow customization.** Run:
|
|
160
123
|
|
|
161
|
-
|
|
124
|
+
```bash
|
|
125
|
+
python3 {project-root}/_bmad/scripts/resolve_customization.py \
|
|
126
|
+
--skill {skill-root} --key workflow
|
|
127
|
+
```
|
|
162
128
|
|
|
163
|
-
|
|
164
|
-
2. Execute steps 1–7 per the normal pipeline.
|
|
165
|
-
3. After step-07 completes (success or HARD HALT), record the per-target outcome (target, status, exit_code, skill_package, error.code) into the batch result list.
|
|
166
|
-
4. If `--fail-fast` is set and the target failed, exit the batch loop immediately. Otherwise continue with the next target.
|
|
129
|
+
The script merges the three customization layers per `bmad-customize`'s structural merge rules (scalars override, arrays append):
|
|
167
130
|
|
|
168
|
-
|
|
131
|
+
- `{skill-root}/customize.toml` — bundled defaults
|
|
132
|
+
- `_bmad/custom/<skill-name>.toml` under `{project-root}` — team overrides (committed)
|
|
133
|
+
- `_bmad/custom/<skill-name>.user.toml` under `{project-root}` — personal overrides (gitignored)
|
|
169
134
|
|
|
170
|
-
|
|
135
|
+
If the script fails or is missing, fall back to reading `{skill-root}/customize.toml` directly — the bundled defaults are an empty string for each path scalar.
|
|
171
136
|
|
|
172
|
-
|
|
137
|
+
Apply the path-scalar fallback now so stage files don't have to repeat the conditional logic. For each of the three scalars, if the merged value is empty or absent, use the bundled default:
|
|
173
138
|
|
|
174
|
-
|
|
175
|
-
{
|
|
176
|
-
{
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Schema:
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{
|
|
183
|
-
"skill": "skf-quick-skill",
|
|
184
|
-
"mode": "batch",
|
|
185
|
-
"status": "success | partial | failed",
|
|
186
|
-
"timestamp": "<ISO 8601 UTC>",
|
|
187
|
-
"input_file": "<path passed to --batch>",
|
|
188
|
-
"targets_total": 0,
|
|
189
|
-
"succeeded": 0,
|
|
190
|
-
"failed": 0,
|
|
191
|
-
"fail_fast_triggered": false,
|
|
192
|
-
"results": [
|
|
193
|
-
{
|
|
194
|
-
"target": "<line from batch file>",
|
|
195
|
-
"status": "success | error",
|
|
196
|
-
"exit_code": 0,
|
|
197
|
-
"skill_package": "<absolute path or null>",
|
|
198
|
-
"error_code": null
|
|
199
|
-
}
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
```
|
|
139
|
+
- `{skillTemplatePath}` ← `workflow.skill_template_path` if non-empty, else `assets/skill-template.md`
|
|
140
|
+
- `{registryResolutionPath}` ← `workflow.registry_resolution_path` if non-empty, else `references/registry-resolution.md`
|
|
141
|
+
- `{batchOutputPath}` ← `workflow.batch_output_path` if non-empty, else `{skills_output_folder}/_batch/`
|
|
203
142
|
|
|
204
|
-
|
|
143
|
+
Stash all three as workflow-context variables. Stage files reference `{skillTemplatePath}` / `{registryResolutionPath}` / `{batchOutputPath}` directly — no conditional at the usage site. Empty-string overrides cleanly fall through to the bundled default; non-empty values let orgs swap in house-style copies without forking the skill.
|
|
205
144
|
|
|
206
|
-
|
|
145
|
+
4. **Parse CLI overrides** — capture optional override flags into the workflow context as `{overrides}`. Each override is opt-in; when omitted, the workflow runs as today.
|
|
207
146
|
|
|
208
|
-
|
|
147
|
+
| Flag | Effect |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `--description "<string>"` | Override the LLM-derived description in step 4 §2 (used in SKILL.md frontmatter and metadata.json). Subject to the same agentskills.io length (1–1024 chars) and voice (third-person) checks as extracted descriptions. |
|
|
150
|
+
| `--exports "<name1,name2,...>"` | Override the extracted export list. Parse as comma-separated; trim whitespace per item; skip empty items. Used in step 4 §2 Key Exports and the count-derived metadata stats. |
|
|
151
|
+
| `--skip-snippet` | Skip context-snippet.md generation in step 4 §3 and its write in step 5 §2. Artifact omitted from `outputs`; step 5 §5 advisory snippet validation reports a "skipped" entry. |
|
|
152
|
+
| `--no-active-pointer` | Skip the active-pointer flip in step 6 §1. Deliverables still land in `{skill_package}` but `{skill_group}/active` is not updated. Useful for batch automators that flip pointers in a separate stage. |
|
|
153
|
+
| `--batch <file>` | Run the workflow against a list of targets from a text file rather than a single argument. Implies `--headless` (gates cannot be human-driven across N targets). See `references/batch-mode.md` for input format and summary contract. Single-target overrides above apply globally to every target in the batch. |
|
|
154
|
+
| `--fail-fast` | Only meaningful with `--batch`. Abort the whole batch on the first per-target failure instead of recording the failure in the summary and proceeding to the next target. |
|
|
209
155
|
|
|
210
|
-
|
|
211
|
-
{"batch":<n>,"target":"<target>","status":"start"}
|
|
212
|
-
{"batch":<n>,"target":"<target>","status":"done","exit":<code>}
|
|
213
|
-
{"batch":<n>,"target":"<target>","status":"fail","exit":<code>,"error_code":"<class>"}
|
|
214
|
-
```
|
|
156
|
+
5. **If `--batch` is set**, force `{headless_mode} = true` (log "headless: coerced by --batch" if it was false), then load and read `references/batch-mode.md` in full before proceeding. Follow its protocol to read the batch file, parse the target list, and drive the batch loop that wraps the step 1 → step 7 pipeline that follows.
|
|
215
157
|
|
|
216
|
-
|
|
158
|
+
6. Load, read the full file, and then execute `references/resolve-target.md` to begin the workflow. (In batch mode, control returns here for each subsequent target after step 7 completes; see `references/batch-mode.md`.)
|
|
217
159
|
|
|
218
|
-
|
|
219
|
-
{"batch_summary":true,"targets_total":N,"succeeded":K,"failed":M,"status":"<...>","fail_fast_triggered":<bool>}
|
|
220
|
-
```
|
|
160
|
+
## Batch Mode
|
|
221
161
|
|
|
222
|
-
|
|
162
|
+
When `--batch <file>` is supplied, quick-skill processes a list of targets from a text file in sequence rather than a single argument.
|
|
223
163
|
|
|
224
|
-
|
|
164
|
+
See `references/batch-mode.md` for the full protocol (input format, execution loop, summary contract, headless events, exit code).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# DO NOT EDIT -- overwritten on every update.
|
|
2
|
+
#
|
|
3
|
+
# Workflow customization surface for skf-quick-skill.
|
|
4
|
+
|
|
5
|
+
[workflow]
|
|
6
|
+
|
|
7
|
+
# --- Configurable below. Overrides merge per BMad structural rules: ---
|
|
8
|
+
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
|
|
9
|
+
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
|
|
10
|
+
|
|
11
|
+
# Steps to run before the standard activation (uv probe, config load).
|
|
12
|
+
# Overrides append. Use for org-wide pre-flight checks (auth, network,
|
|
13
|
+
# compliance) that must precede any compilation work.
|
|
14
|
+
|
|
15
|
+
activation_steps_prepend = []
|
|
16
|
+
|
|
17
|
+
# Steps to run after activation but before the first stage executes.
|
|
18
|
+
# Overrides append. Use for context loads or banner customization that
|
|
19
|
+
# should run once activation completes successfully.
|
|
20
|
+
|
|
21
|
+
activation_steps_append = []
|
|
22
|
+
|
|
23
|
+
# Persistent facts the workflow keeps in mind for the whole run
|
|
24
|
+
# (house style, naming conventions, compilation guardrails).
|
|
25
|
+
# Overrides append.
|
|
26
|
+
#
|
|
27
|
+
# Each entry is either:
|
|
28
|
+
# - a literal sentence, e.g. "All skills must cite their upstream source."
|
|
29
|
+
# - a file reference prefixed with `file:`, e.g.
|
|
30
|
+
# "file:{project-root}/docs/skill-style.md" (globs supported; file
|
|
31
|
+
# contents are loaded and treated as facts).
|
|
32
|
+
|
|
33
|
+
persistent_facts = [
|
|
34
|
+
"file:{project-root}/**/project-context.md",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
# --- Optional asset overrides ---
|
|
38
|
+
#
|
|
39
|
+
# Lift the canonical asset paths so orgs can substitute house-style copies
|
|
40
|
+
# without forking the skill. Empty string = use the bundled default.
|
|
41
|
+
|
|
42
|
+
skill_template_path = ""
|
|
43
|
+
registry_resolution_path = ""
|
|
44
|
+
batch_output_path = ""
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: 'resolve-target.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
6
|
+
|
|
7
|
+
# Batch Mode
|
|
8
|
+
|
|
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 (CI pipelines, mass-rebuilds, the skf-batch-skills meta-workflow when it lands).
|
|
10
|
+
|
|
11
|
+
## Input format
|
|
12
|
+
|
|
13
|
+
One target per line. Empty lines and lines starting with `#` (after optional leading whitespace) are ignored. Each non-empty line has the same shape as the single-target `target` argument, with optional space-separated per-line modifiers:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
# A batch input file.
|
|
17
|
+
lodash
|
|
18
|
+
@vercel/og
|
|
19
|
+
cognee@0.5.0
|
|
20
|
+
https://github.com/foo/bar
|
|
21
|
+
https://github.com/foo/bar@2.1.0-beta
|
|
22
|
+
|
|
23
|
+
# Per-line modifiers — overrides for THIS target only:
|
|
24
|
+
lodash language=javascript scope=src/
|
|
25
|
+
cognee@0.5.0 language=python scope=cognee/api/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Recognised per-line modifiers:
|
|
29
|
+
|
|
30
|
+
| Modifier | Effect (this target only) |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `language=<lang>` | Sets `language_hint` for this target — same effect as the optional `language_hint` input on a single-target run. |
|
|
33
|
+
| `scope=<path>` | Sets `scope_hint` for this target — same effect as the optional `scope_hint` input on a single-target run. |
|
|
34
|
+
|
|
35
|
+
Per-line modifiers shadow the global `--description` / `--exports` / `--skip-snippet` / `--no-active-pointer` overrides only when those override fields are not set. Global overrides apply to every target unless a future modifier extends per-line override syntax.
|
|
36
|
+
|
|
37
|
+
## Execution
|
|
38
|
+
|
|
39
|
+
`--batch` implies `--headless`. The batch loop runs the full quick-skill pipeline (steps 1–7) for each target in file order:
|
|
40
|
+
|
|
41
|
+
1. Set `target`, `target_version`, `language_hint`, `scope_hint` from the batch line into the workflow context.
|
|
42
|
+
2. Execute steps 1–7 per the normal pipeline.
|
|
43
|
+
3. After step 7 completes (success or HARD HALT), record the per-target outcome (target, status, exit_code, skill_package, error.code) into the batch result list.
|
|
44
|
+
4. If `--fail-fast` is set and the target failed, exit the batch loop immediately. Otherwise continue with the next target.
|
|
45
|
+
|
|
46
|
+
Per-target output lands in `{skill_package}/` as today, with the per-target result contract at `{skill_package}/quick-skill-result-latest.json` (success or error variant per "Result Contract on HARD HALT" above).
|
|
47
|
+
|
|
48
|
+
## Batch summary contract
|
|
49
|
+
|
|
50
|
+
After the last target completes (or `--fail-fast` triggers an early exit), write the batch summary at:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
{skills_output_folder}/_batch/quick-skill-batch-{YYYYMMDD-HHmmss}.json
|
|
54
|
+
{skills_output_folder}/_batch/quick-skill-batch-latest.json (copy, not symlink)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Schema:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"skill": "skf-quick-skill",
|
|
62
|
+
"mode": "batch",
|
|
63
|
+
"status": "success | partial | failed",
|
|
64
|
+
"timestamp": "<ISO 8601 UTC>",
|
|
65
|
+
"input_file": "<path passed to --batch>",
|
|
66
|
+
"targets_total": 0,
|
|
67
|
+
"succeeded": 0,
|
|
68
|
+
"failed": 0,
|
|
69
|
+
"fail_fast_triggered": false,
|
|
70
|
+
"results": [
|
|
71
|
+
{
|
|
72
|
+
"target": "<line from batch file>",
|
|
73
|
+
"status": "success | error",
|
|
74
|
+
"exit_code": 0,
|
|
75
|
+
"skill_package": "<absolute path or null>",
|
|
76
|
+
"error_code": null
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`status` resolves as: `"success"` when `failed == 0`; `"partial"` when `failed > 0 && succeeded > 0`; `"failed"` when `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.
|
|
83
|
+
|
|
84
|
+
## Headless events
|
|
85
|
+
|
|
86
|
+
Batch mode emits per-target boundary events on stderr in addition to the per-step events documented in Workflow Rules:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
{"batch":<n>,"target":"<target>","status":"start"}
|
|
90
|
+
{"batch":<n>,"target":"<target>","status":"done","exit":<code>}
|
|
91
|
+
{"batch":<n>,"target":"<target>","status":"fail","exit":<code>,"error_code":"<class>"}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`<n>` is the 1-based index of the target in the parsed list. After the loop ends, emit one final batch-summary event:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
{"batch_summary":true,"targets_total":N,"succeeded":K,"failed":M,"status":"<...>","fail_fast_triggered":<bool>}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Exit code
|
|
101
|
+
|
|
102
|
+
The batch process exits with code `0` when `failed == 0`, otherwise with the exit code of the first failed target (so automators that already branch on the single-target exit-code map continue to work without batch-specific handling). When `--fail-fast` triggers, the exit code is the failing target's code.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'write-and-validate.md'
|
|
3
3
|
skillTemplateData: 'assets/skill-template.md'
|
|
4
4
|
quickMetadataRendererProbeOrder:
|
|
5
5
|
- '{project-root}/_bmad/skf/shared/scripts/skf-render-quick-metadata.py'
|
|
6
6
|
- '{project-root}/src/shared/scripts/skf-render-quick-metadata.py'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- Config: communicate in {communication_language}. Generated SKILL.md text in {document_output_language}. -->
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
# Step 4: Compile
|
|
12
12
|
|
|
13
13
|
## STEP GOAL:
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ To assemble the best-effort SKILL.md document, context-snippet.md in Vercel-alig
|
|
|
16
16
|
|
|
17
17
|
## Rules
|
|
18
18
|
|
|
19
|
-
- Focus only on assembling the three output documents — do not write files to disk (that's step
|
|
19
|
+
- Focus only on assembling the three output documents — do not write files to disk (that's step 6)
|
|
20
20
|
- Follow template structure exactly from {skillTemplateData}
|
|
21
21
|
- Mark any sections with insufficient data as best-effort
|
|
22
22
|
|
|
@@ -68,7 +68,7 @@ description: >
|
|
|
68
68
|
|
|
69
69
|
### 3. Generate Context Snippet
|
|
70
70
|
|
|
71
|
-
**If `{overrides.skip_snippet}` is true** — skip generation and note in the §5 preview: "context-snippet.md skipped per `--skip-snippet` override." Step-05 §2 will skip the corresponding write; step
|
|
71
|
+
**If `{overrides.skip_snippet}` is true** — skip generation and note in the §5 preview: "context-snippet.md skipped per `--skip-snippet` override." Step-05 §2 will skip the corresponding write; step 5 §5 advisory snippet validation will report a "skipped" entry.
|
|
72
72
|
|
|
73
73
|
Otherwise, create context-snippet.md in Vercel-aligned indexed format (~80-120 tokens):
|
|
74
74
|
|
|
@@ -97,14 +97,14 @@ Run the shared renderer against the assembled state. The helper applies the cons
|
|
|
97
97
|
2. If absent, read `{project-root}/_bmad/skf/VERSION`
|
|
98
98
|
3. If absent, set to `"unknown"`
|
|
99
99
|
|
|
100
|
-
Build the input payload from the extraction inventory + step
|
|
100
|
+
Build the input payload from the extraction inventory + step 1 resolution + the probed `tool_versions.skf` and pipe it to the renderer:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
echo '{"name":"<name>","version":"<v>","description":"<desc>","language":"<lang>","source_repo":"<url>","source_root":"<path or empty>","source_commit":"<source_ref or empty>","source_package":"<package or name>","exports":[{"name":"...","type":"..."}],"dependencies":["..."],"compatibility":"<semver-range or empty>","language_hint":<hint or null>,"scope_hint":<hint or null>,"skf_version":"<probed>"}' \
|
|
104
104
|
| python3 {quickMetadataRenderer}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
The renderer emits the rendered metadata.json on stdout. Capture the output as `metadata` for the §5 preview and step
|
|
107
|
+
The renderer emits the rendered metadata.json on stdout. Capture the output as `metadata` for the §5 preview and step 5 §2's deliverable write.
|
|
108
108
|
|
|
109
109
|
**Schema is canonical in the renderer.** When `{skillTemplateData}` adds a field, the renderer is updated to populate it (constants gain a row; input-derived fields gain a payload key). Do not hand-edit the rendered envelope here — the helper is the single source of truth for the population logic.
|
|
110
110
|
|
|
@@ -153,8 +153,8 @@ Display: **Select:** [C] Continue to Validation · [E] Edit description · [S] A
|
|
|
153
153
|
|
|
154
154
|
- **IF C** — Load, read entire file, then execute {nextStepFile}.
|
|
155
155
|
- **IF E** — Ask the user for a replacement description ("New description (1–1024 chars):"). Update SKILL.md frontmatter `description` and `metadata.json.description` in the in-memory compiled output, then re-render the §5 preview and redisplay this menu. Do not re-run extraction.
|
|
156
|
-
- **IF S** — Ask the user for an adjusted `scope_hint` ("New scope (e.g. `src/server/`, `packages/core/`):") and optionally a `language_hint`. Update the extraction context with the new hints, then load
|
|
157
|
-
- **IF Q** — HARD HALT with **exit code 6 (
|
|
156
|
+
- **IF S** — Ask the user for an adjusted `scope_hint` ("New scope (e.g. `src/server/`, `packages/core/`):") and optionally a `language_hint`. Update the extraction context with the new hints, then load `quick-extract.md` to re-extract. The new extraction returns to §1 of this step on completion. Discards the prior compiled output.
|
|
157
|
+
- **IF Q** — HARD HALT with **exit code 6 (user-cancelled)** per the SKILL.md exit-code map: "Compilation cancelled. No files written." Before exiting, emit the error result contract per SKILL.md "Result Contract on HARD HALT" (`phase: "compile"`, `error.code: "user-cancelled"`, `skill_package: null`). Do not proceed to validation; do not write any artifacts.
|
|
158
158
|
- **IF Any other** — Help the user adjust the compiled output (treated as a free-form revision request), then redisplay the menu.
|
|
159
159
|
|
|
160
160
|
#### EXECUTION RULES:
|
|
@@ -163,7 +163,7 @@ Display: **Select:** [C] Continue to Validation · [E] Edit description · [S] A
|
|
|
163
163
|
- **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-approve compiled output"
|
|
164
164
|
- ONLY proceed to validation when the user selects 'C' (or headless auto-approve)
|
|
165
165
|
- [E] is local: re-renders the preview without re-running extraction
|
|
166
|
-
- [S] is the heavy option: it discards the compiled output and re-runs step
|
|
166
|
+
- [S] is the heavy option: it discards the compiled output and re-runs step 3 with new hints
|
|
167
167
|
|
|
168
168
|
## CRITICAL STEP COMPLETION NOTE
|
|
169
169
|
|
package/src/skf-quick-skill/{steps-c/step-02-ecosystem-check.md → references/ecosystem-check.md}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'quick-extract.md'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Step 2: Ecosystem Check
|
|
8
8
|
|
|
9
9
|
## STEP GOAL:
|
|
10
10
|
|
|
@@ -59,8 +59,8 @@ An official skill already exists. You can:
|
|
|
59
59
|
#### Menu Handling Logic:
|
|
60
60
|
|
|
61
61
|
- IF P: Set `ecosystem_status: match-proceed`, then load, read entire file, then execute {nextStepFile}
|
|
62
|
-
- IF I: Display install instructions for the official skill,
|
|
63
|
-
- IF A: Display "Compilation cancelled."
|
|
62
|
+
- IF I: Display install instructions for the official skill, emit the HARD HALT envelope per SKILL.md "Result Contract on HARD HALT" (`phase: "ecosystem-check"`, `error.code: "ecosystem-redirect"`, `error.message: "User opted to install existing official skill instead of compiling a custom community skill."`, `skill_package: null`), exit with code 8 (ecosystem-redirect). Skill package is unknown at this phase — no on-disk result file is written.
|
|
63
|
+
- IF A: Display "Compilation cancelled.", emit the HARD HALT envelope (`phase: "ecosystem-check"`, `error.code: "user-cancelled"`, `error.message: "User aborted at ecosystem-match gate."`, `skill_package: null`), exit with code 6 (user-cancelled). Skill package is unknown at this phase — no on-disk result file is written.
|
|
64
64
|
- IF Any other: help user, then redisplay the match menu
|
|
65
65
|
|
|
66
66
|
#### EXECUTION RULES:
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'health-check.md'
|
|
3
3
|
atomicWriteProbeOrder:
|
|
4
4
|
- '{project-root}/_bmad/skf/shared/scripts/skf-atomic-write.py'
|
|
5
5
|
- '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<!-- Config: communicate in {communication_language}. Generated SKILL.md text in {document_output_language}. -->
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
# Step 6: Finalize
|
|
11
11
|
|
|
12
12
|
## STEP GOAL:
|
|
13
13
|
|
|
14
|
-
To finalize the skill by creating the active-version pointer, displaying the completion summary, and writing the result contract. Deliverables (SKILL.md, context-snippet.md, metadata.json) were already written in step
|
|
14
|
+
To finalize the skill by creating the active-version pointer, displaying the completion summary, and writing the result contract. Deliverables (SKILL.md, context-snippet.md, metadata.json) were already written in step 5 so that validation could run against files on disk; this step only performs the post-write finalization.
|
|
15
15
|
|
|
16
16
|
## Rules
|
|
17
17
|
|
|
18
|
-
- Do not rewrite deliverables — they were written and validated in step
|
|
18
|
+
- Do not rewrite deliverables — they were written and validated in step 5
|
|
19
19
|
- Create the active pointer via the shared helper — never `rm` + `ln -s` manually
|
|
20
20
|
- Result contract writing is mandatory (pipeline consumers depend on it)
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ To finalize the skill by creating the active-version pointer, displaying the com
|
|
|
25
25
|
|
|
26
26
|
**If `{overrides.no_active_pointer}` is true** — skip the helper invocation entirely. Log: "Active pointer: skipped per `--no-active-pointer` override." Do not update `{skill_group}/active`. Proceed to §2 with the active-pointer line omitted from the completion summary and the outputs payload.
|
|
27
27
|
|
|
28
|
-
`{skill_group}` and `{skill_package}` were computed in step
|
|
28
|
+
`{skill_group}` and `{skill_package}` were computed in step 5 §1 from `{skills_output_folder}`, `{repo_name}`, and `{version}`; `{version}` was resolved from the extraction inventory. Reuse the same values here — do not recompute.
|
|
29
29
|
|
|
30
30
|
Create or update the `active` pointer at `{skill_group}/active` pointing to `{version}` using the shared atomic-flip helper. The helper acquires an `flock` on `{skill_group}/active.skf-lock`, refuses to replace a non-link at `{skill_group}/active` (protecting against accidental `rm -rf` of a real directory), and uses a rename-over-symlink pattern so the update is atomic from a concurrent reader's perspective. On Windows the helper automatically falls back to a directory junction (`mklink /J`) when `os.symlink` fails with `PRIVILEGE_NOT_HELD` / `ACCESS_DENIED` — junctions require no admin elevation and resolve identically for `skf-skill-inventory`'s consumers:
|
|
31
31
|
|
|
@@ -37,7 +37,7 @@ python3 {atomicWriteHelper} flip-link \
|
|
|
37
37
|
--target {version}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
The helper returns non-zero (helper exit 2) if `{skill_group}/active` already exists as a real directory or file rather than a link — in that case, HARD HALT the workflow with **exit code 7 (finalize-blocked)** per the SKILL.md exit-code map: "Refusing to flip `{skill_group}/active` — existing path is not a symlink or junction. Investigate manually; expected a link pointing at a version directory." Before exiting, emit the error result contract per SKILL.md "Result Contract on HARD HALT" (`phase: "finalize"`, `error.code: "finalize-blocked"`, `skill_package` set, `outputs` listing the deliverables already on disk from step
|
|
40
|
+
The helper returns non-zero (helper exit 2) if `{skill_group}/active` already exists as a real directory or file rather than a link — in that case, HARD HALT the workflow with **exit code 7 (finalize-blocked)** per the SKILL.md exit-code map: "Refusing to flip `{skill_group}/active` — existing path is not a symlink or junction. Investigate manually; expected a link pointing at a version directory." Before exiting, emit the error result contract per SKILL.md "Result Contract on HARD HALT" (`phase: "finalize"`, `error.code: "finalize-blocked"`, `skill_package` set, `outputs` listing the deliverables already on disk from step 5). A common cause on Windows is a prior run that executed `ln -s` under git-bash without Developer Mode enabled, which silently wrote a full directory copy; remove that copy and retry.
|
|
41
41
|
|
|
42
42
|
**Never `rm` + `ln -s` the active pointer manually.** The bare-rm pattern has two failure modes: (1) a concurrent reader sees a missing `active` mid-flip, and (2) a bug or typo that replaces `{skill_group}/active` with a plain directory turns the next manual `rm -rf {skill_group}/active` into data loss. The helper encapsulates both guards and the Windows junction fallback.
|
|
43
43
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
nextStepFile: 'shared/health-check.md'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
# Step 7: Workflow Health Check
|
|
11
11
|
|
|
12
12
|
## STEP GOAL:
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ Chain to the shared workflow self-improvement health check at `{nextStepFile}`.
|
|
|
15
15
|
|
|
16
16
|
## Rules
|
|
17
17
|
|
|
18
|
-
- No user-facing reports, file writes, or result contracts in this step — those belong in step
|
|
18
|
+
- No user-facing reports, file writes, or result contracts in this step — those belong in step 6
|
|
19
19
|
- Delegate directly to `{nextStepFile}` with no additional commentary
|
|
20
20
|
- Do not attempt any other action between loading this step and executing `{nextStepFile}`
|
|
21
21
|
|