bmad-module-skill-forge 1.4.1 → 1.5.1
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 +147 -16
- 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-manifest-ops.py +22 -6
- package/src/shared/scripts/skf-merge-ccc-exclusions.py +34 -4
- 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} +48 -14
- package/src/skf-analyze-source/{steps-c/step-01-init.md → references/init.md} +32 -9
- 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} +16 -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/{steps-c/step-01-init.md → references/init.md} +63 -19
- 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} +35 -17
- package/src/skf-brief-skill/SKILL.md +49 -19
- 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} +27 -15
- 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} +35 -29
- 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 +2 -2
- package/src/skf-brief-skill/{steps-c/step-03-scope-definition.md → references/scope-definition.md} +27 -20
- 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} +29 -16
- 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 +10 -8
- package/src/skf-create-skill/{steps-c/step-07-generate-artifacts.md → references/generate-artifacts.md} +11 -11
- 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} +48 -28
- 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} +37 -11
- package/src/skf-create-stack-skill/{steps-c/step-02-detect-manifests.md → references/detect-manifests.md} +32 -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} +44 -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} +11 -11
- 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} +11 -49
- 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 +79 -0
- package/src/skf-export-skill/{steps-c/step-06-summary.md → references/summary.md} +23 -11
- 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} +109 -113
- 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} +16 -31
- 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} +37 -73
- 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} +13 -9
- 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 +170 -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} +18 -14
- package/src/skf-verify-stack/{steps-c/step-06-report.md → references/report.md} +27 -42
- package/src/skf-verify-stack/{steps-c/step-04-requirements.md → references/requirements.md} +13 -9
- package/src/skf-verify-stack/{steps-c/step-05-synthesize.md → references/synthesize.md} +14 -10
- package/tools/validate-docs-drift.js +1 -1
- 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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# DO NOT EDIT -- overwritten on every update.
|
|
2
|
+
#
|
|
3
|
+
# Workflow customization surface for skf-create-stack-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 stack 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, integration-pattern guardrails).
|
|
25
|
+
# Overrides append.
|
|
26
|
+
#
|
|
27
|
+
# Each entry is either:
|
|
28
|
+
# - a literal sentence, e.g. "Stack skills must cite their constituent libraries."
|
|
29
|
+
# - a file reference prefixed with `file:`, e.g.
|
|
30
|
+
# "file:{project-root}/docs/stack-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
|
+
stack_skill_template_path = ""
|
|
43
|
+
integration_patterns_path = ""
|
|
44
|
+
manifest_patterns_path = ""
|
|
45
|
+
compose_mode_rules_path = ""
|
|
46
|
+
provenance_map_schema_path = ""
|
package/src/skf-create-stack-skill/{steps-c/step-06-compile-stack.md → references/compile-stack.md}
RENAMED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'generate-output.md'
|
|
3
3
|
stackSkillTemplate: 'assets/stack-skill-template.md'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
<!-- Config: communicate in {communication_language}. Artifact text in {document_output_language}. -->
|
|
7
|
+
|
|
6
8
|
# Step 6: Compile Stack Skill
|
|
7
9
|
|
|
8
10
|
## STEP GOAL:
|
|
@@ -17,8 +19,6 @@ Assemble the main SKILL.md by combining per-library extractions with the integra
|
|
|
17
19
|
|
|
18
20
|
## MANDATORY SEQUENCE
|
|
19
21
|
|
|
20
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
21
|
-
|
|
22
22
|
### 1. Load Template Structure
|
|
23
23
|
|
|
24
24
|
Load `{stackSkillTemplate}` and prepare SKILL.md section structure.
|
|
@@ -74,7 +74,7 @@ For each confirmed library (ordered by integration connectivity, then import cou
|
|
|
74
74
|
- Key exports used in this project
|
|
75
75
|
- Usage patterns from extraction
|
|
76
76
|
- Confidence tier label
|
|
77
|
-
- Link to reference file:
|
|
77
|
+
- Link to reference file: `references/{library}.md`
|
|
78
78
|
|
|
79
79
|
### 5. Compile Project Conventions
|
|
80
80
|
|
|
@@ -117,7 +117,7 @@ Create the reference index table:
|
|
|
117
117
|
|
|
118
118
|
### 8. Present MENU OPTIONS
|
|
119
119
|
|
|
120
|
-
Display: **Select:** [C] Continue to Output Generation
|
|
120
|
+
Display: **Select:** [C] Continue to Output Generation | [X] Cancel and exit
|
|
121
121
|
|
|
122
122
|
#### EXECUTION RULES:
|
|
123
123
|
|
|
@@ -128,5 +128,6 @@ Display: **Select:** [C] Continue to Output Generation
|
|
|
128
128
|
#### Menu Handling Logic:
|
|
129
129
|
|
|
130
130
|
- IF C: Store skill_content, then load, read entire file, then execute {nextStepFile}
|
|
131
|
+
- IF X: Invoke the rollback contract (purge any `{forge_data_folder}/{project_name}-stack/{version}/*-tmp` and `*.skf-tmp` staging artifacts under the forge workspace, leave any existing committed stack package untouched), emit the `SKF_STACK_RESULT_JSON` envelope on stderr with `status: "error"`, `halt_reason: "user-cancelled"`, `exit_code: 6`, and exit with code 6
|
|
131
132
|
- IF Any other: Process as feedback, adjust compilation, redisplay preview, then [Redisplay Menu Options](#8-present-menu-options)
|
|
132
133
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
2
|
+
|
|
1
3
|
# Compose Mode Rules
|
|
2
4
|
|
|
3
5
|
Rules for synthesizing a stack skill from pre-generated individual skills and an architecture document, without requiring a codebase.
|
|
@@ -19,7 +21,7 @@ Skills use version-nested directories — see `knowledge/version-paths.md` for t
|
|
|
19
21
|
|
|
20
22
|
## Compose-mode Co-mention Precision
|
|
21
23
|
|
|
22
|
-
Prose co-mention detection is heuristic — it can only provide `Plausible`-class evidence (compared to code-mode's co-imports, which are literal). To reduce false positives the matcher in step
|
|
24
|
+
Prose co-mention detection is heuristic — it can only provide `Plausible`-class evidence (compared to code-mode's co-imports, which are literal). To reduce false positives the matcher in step 5 §2 applies three guards:
|
|
23
25
|
|
|
24
26
|
1. **Word-boundary matching** (`\b{skill_name}\b`, case-insensitive). Substring matches are rejected (no `react` inside `reactive`).
|
|
25
27
|
2. **Section filtering.** Paragraphs under H1/H2 headers that normalise to `introduction`, `overview`, `glossary`, `table of contents`, `references`, `appendix`, or `index` are excluded — they typically enumerate all libraries without describing integration. Headings themselves are also excluded as co-mention sources.
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'compile-stack.md'
|
|
3
3
|
integrationPatterns: 'references/integration-patterns.md'
|
|
4
4
|
composeModeRules: 'references/compose-mode-rules.md'
|
|
5
|
+
pairIntersectProbeOrder:
|
|
6
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-pair-intersect.py'
|
|
7
|
+
- '{project-root}/src/shared/scripts/skf-pair-intersect.py'
|
|
5
8
|
---
|
|
6
9
|
|
|
10
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
11
|
+
|
|
7
12
|
# Step 5: Detect Integrations
|
|
8
13
|
|
|
9
14
|
## STEP GOAL:
|
|
@@ -18,17 +23,38 @@ Analyze co-import patterns between confirmed libraries to identify integration p
|
|
|
18
23
|
|
|
19
24
|
## MANDATORY SEQUENCE
|
|
20
25
|
|
|
21
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
22
|
-
|
|
23
26
|
### 1. Generate Library Pairs
|
|
24
27
|
|
|
25
|
-
From `confirmed_dependencies`,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
**
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
From `confirmed_dependencies`, conceptually you have N*(N-1)/2 unordered pairs. Rather than enumerating and grep-testing each one, prune the matrix via a deterministic **file-list intersection fast path** (MANDATORY first pass, all N): pairs whose per-library file lists do not overlap cannot be integration candidates by construction — drop them. Subsequent grep passes (§2) run only against pairs with a non-empty intersection, and grep scope is restricted to those intersection files rather than the whole source tree. This is NOT a "subprocess-unavailable" fallback; it is the default strategy for every N. Rationale: at N≈21 this collapses 210 prescribed pair greps to ~12 non-empty-intersection pairs in typical codebases; at larger N the compression is even greater.
|
|
29
|
+
|
|
30
|
+
**Compute the intersection deterministically via the shared script:**
|
|
31
|
+
|
|
32
|
+
1. **Build the libraries JSON** from the per-library file enumeration recorded by step 3 import-count extraction. Skip libraries where step 04 reported extraction failure. Shape:
|
|
33
|
+
```json
|
|
34
|
+
[
|
|
35
|
+
{"name": "<library-name>", "files": ["<rel-path-forward-slash>", ...]},
|
|
36
|
+
...
|
|
37
|
+
]
|
|
38
|
+
```
|
|
39
|
+
2. **Invoke the script** via stdin (or a temp file under `{forge_data_folder}/` if stdin piping is unavailable):
|
|
40
|
+
|
|
41
|
+
**Resolve `{pairIntersectHelper}`** from `{pairIntersectProbeOrder}`; first existing path wins. HALT if no candidate exists.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv run {pairIntersectHelper} intersect --libraries -
|
|
45
|
+
```
|
|
46
|
+
piping the libraries JSON on stdin. The script emits:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"pairs": [{"a": "<lib>", "b": "<lib>", "intersection_count": N, "files": [...]}, ...],
|
|
50
|
+
"truncated": <bool>,
|
|
51
|
+
"total_pairs": <int>
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
`pairs[]` is sorted by `intersection_count` DESC, then `(a, b)` ASC for stable ordering. Default Top-K cap is **20** (matches S7 below); pass `--top-k N` to override.
|
|
55
|
+
3. **Parse the JSON result** and use `pairs[]` as the qualifying-pair set for §2 onward. The `intersection_count` is the candidate file count for the §2 2-file threshold pre-grep; `files[]` is the grep-scope for that pair.
|
|
56
|
+
|
|
57
|
+
**Top-K cap (S7, 20):** If the script's response has `truncated: true`, more pairs than the cap had non-empty intersections. Surface a user-visible warning composed as: `"non-empty-intersection pair count {total_pairs} exceeds cap — analyzing top 20 by intersection size; {total_pairs - 20} pairs skipped"`. Record this cap in the evidence report. (Tie-break by intersection size is what the script sorts on; if you need to override the cap intentionally, pass `--top-k N` and document the rationale.) The legacy 50-dependency threshold that formerly gated a separate Top-K pass is retired — the file-intersection prune does the bulk of the work and the cap is now a second-order safety limit, not a primary strategy.
|
|
32
58
|
|
|
33
59
|
Report: "**Analyzing {pair_count} library pairs for integration patterns** (pruned from {N*(N-1)/2} via file-list intersection; {capped_count} after Top-K if applicable)**...**"
|
|
34
60
|
|
|
@@ -63,7 +89,7 @@ All integration evidence inherits confidence tiers from the source skills. Load
|
|
|
63
89
|
- For each architecture-detected pair, include `VS overall: {overallVerdict}` and `VS pair: {verdict}` in the integration evidence per the format in `{composeModeRules}`. VS verdicts do not apply to inferred integrations since the VS report operates on architecture-described interactions only. Additionally, flag any pairs where VS reported `Risky` or `Blocked` by appending a `[VS: Risky]` or `[VS: Blocked]` warning annotation to the integration entry.
|
|
64
90
|
|
|
65
91
|
If no architecture document available:
|
|
66
|
-
- Infer potential integrations from skills sharing the same `language` field or sharing domain keywords in their SKILL.md descriptions (use the `usage_patterns` and `exports` fields from `per_library_extractions[]` built in step
|
|
92
|
+
- Infer potential integrations from skills sharing the same `language` field or sharing domain keywords in their SKILL.md descriptions (use the `usage_patterns` and `exports` fields from `per_library_extractions[]` built in step 4, or reload SKILL.md from the version-aware path: use `skill_package_path` from step 2, or resolve via `{skills_output_folder}/{skill_dir}/active/{skill_dir}/SKILL.md` — see `knowledge/version-paths.md`)
|
|
67
93
|
- Mark inferred integrations: `[inferred from shared domain]` — use this suffix instead of `[composed]` for inferred integrations
|
|
68
94
|
- Inferred integrations qualify automatically — no file-count threshold applies
|
|
69
95
|
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'rank-and-confirm.md'
|
|
3
3
|
manifestPatterns: 'references/manifest-patterns.md'
|
|
4
|
+
scanManifestsProbeOrder:
|
|
5
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-scan-manifests.py'
|
|
6
|
+
- '{project-root}/src/shared/scripts/skf-scan-manifests.py'
|
|
4
7
|
---
|
|
5
8
|
|
|
9
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
10
|
+
|
|
6
11
|
# Step 2: Detect Manifests
|
|
7
12
|
|
|
8
13
|
## STEP GOAL:
|
|
@@ -17,8 +22,6 @@ Scan the project root for dependency manifest files, parse each to extract depen
|
|
|
17
22
|
|
|
18
23
|
## MANDATORY SEQUENCE
|
|
19
24
|
|
|
20
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
21
|
-
|
|
22
25
|
### 0. Check Compose Mode
|
|
23
26
|
|
|
24
27
|
**If `compose_mode` is true AND `explicit_deps` was provided in step 01:**
|
|
@@ -57,7 +60,7 @@ For each skill found:
|
|
|
57
60
|
2. Extract: name, language, confidence_tier, source_repo, exports count, version
|
|
58
61
|
3. Store the skill group directory name as `skill_dir` (the top-level name under `{skills_output_folder}`, distinct from `name` — the directory may differ from the metadata name)
|
|
59
62
|
4. Store the resolved package path as `skill_package_path` for use in later steps
|
|
60
|
-
5. **Hash the constituent metadata at read-time (S13):** compute `sha256` of the raw `metadata.json` bytes just read, and store it in workflow state as `metadata_hash` alongside `skill_package_path`. Step-07 uses this stored hash (not a re-read) for `constituents[].metadata_hash` in `provenance-map.json`, so drift between step
|
|
63
|
+
5. **Hash the constituent metadata at read-time (S13):** compute `sha256` of the raw `metadata.json` bytes just read, and store it in workflow state as `metadata_hash` alongside `skill_package_path`. Step-07 uses this stored hash (not a re-read) for `constituents[].metadata_hash` in `provenance-map.json`, so drift between step 2 read and step 7 write is captured.
|
|
61
64
|
6. Store as `raw_dependencies` with source: "existing_skill"
|
|
62
65
|
|
|
63
66
|
Display:
|
|
@@ -85,20 +88,35 @@ Store the explicit list as `raw_dependencies` and skip to [Display Detection Sum
|
|
|
85
88
|
|
|
86
89
|
**If no explicit list:** Continue to section 2.
|
|
87
90
|
|
|
88
|
-
### 2. Scan
|
|
91
|
+
### 2. Scan and Parse Manifests
|
|
92
|
+
|
|
93
|
+
Invoke the deterministic manifest scanner — it walks the project root, parses every recognised manifest, dedupes the production dep set, and flags monorepo layout:
|
|
94
|
+
|
|
95
|
+
**Resolve `{scanManifestsHelper}`** from `{scanManifestsProbeOrder}`; first existing path wins. HALT if no candidate exists.
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
```bash
|
|
98
|
+
uv run {scanManifestsHelper} scan {scan_root}
|
|
99
|
+
```
|
|
91
100
|
|
|
92
|
-
|
|
101
|
+
Where `{scan_root}` is the project root path. Load `{manifestPatterns}` for the ecosystem reference table that documents supported filenames, dependency keys, and normalisation rules; the script implements exactly that table (npm/pnpm/yarn, python pip/poetry/pdm, rust cargo, go modules, java/kotlin maven + gradle, ruby bundler, composer, swift package manager). Exclusion patterns (`node_modules/`, `.venv/`, `vendor/`, `dist/`, `build/`, `target/`, `.git/`, hidden dirs) are applied internally.
|
|
93
102
|
|
|
94
|
-
|
|
95
|
-
- Record: file path, ecosystem type, file size
|
|
96
|
-
- **Apply exclusion patterns** from `{manifestPatterns}` — skip `node_modules/`, `.venv/`, `vendor/`, `dist/`, `build/`, `target/`, `.git/`, and all hidden directories when globbing
|
|
97
|
-
- Note any unusual structures (monorepo with multiple manifests, workspace configurations)
|
|
103
|
+
Parse the JSON output — shape:
|
|
98
104
|
|
|
99
|
-
|
|
105
|
+
```
|
|
106
|
+
{
|
|
107
|
+
"manifests": [
|
|
108
|
+
{"path": "<rel-from-root>", "ecosystem": "<name>", "deps": [{"name": "...", "version": "..."}]},
|
|
109
|
+
...
|
|
110
|
+
],
|
|
111
|
+
"total_unique": N,
|
|
112
|
+
"monorepo": <bool>,
|
|
113
|
+
"warnings": ["..."] // optional, only if any parse warning fired
|
|
114
|
+
}
|
|
115
|
+
```
|
|
100
116
|
|
|
101
|
-
|
|
117
|
+
If `manifests` is empty:
|
|
118
|
+
|
|
119
|
+
**Headless auto-cancel (S2):** If `{headless_mode}` is true, do NOT wait for user input. Emit a structured error contract `{"status":"error","skill":"skf-create-stack-skill","stage":"step 2","reason":"no manifests found, headless cannot prompt"}` on stderr and exit non-zero. Headless mode cannot proceed without an explicit dependency list.
|
|
102
120
|
|
|
103
121
|
**Interactive mode:**
|
|
104
122
|
|
|
@@ -115,21 +133,7 @@ Searched for: package.json, requirements.txt, Cargo.toml, go.mod, pom.xml, build
|
|
|
115
133
|
|
|
116
134
|
STOP — wait for user response.
|
|
117
135
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
For each discovered manifest file:
|
|
121
|
-
|
|
122
|
-
1. Read the file contents
|
|
123
|
-
2. Extract dependency names and version constraints using ecosystem-specific parsing:
|
|
124
|
-
- JSON manifests: parse dependencies/devDependencies keys
|
|
125
|
-
- TOML manifests: parse [dependencies] sections
|
|
126
|
-
- Text manifests: parse line-by-line (name==version or name>=version)
|
|
127
|
-
- XML manifests: parse dependency elements
|
|
128
|
-
- Gradle: parse implementation/api/compile declarations
|
|
129
|
-
3. Categorize: runtime vs dev-only
|
|
130
|
-
4. Normalize dependency names across ecosystems
|
|
131
|
-
|
|
132
|
-
Deduplicate dependencies found across multiple manifests.
|
|
136
|
+
Otherwise, store the parsed `manifests[]` and `total_unique` as `raw_dependencies` (dedup is already applied by the scanner), surface any `warnings[]` to the user as parse-quality notes, and inspect the `monorepo` flag: if `true`, mention the monorepo layout in the detection summary so the user can decide whether to scope the ranking to a specific package or proceed across all manifests.
|
|
133
137
|
|
|
134
138
|
### 4. Display Detection Summary
|
|
135
139
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'validate.md'
|
|
3
3
|
stackSkillTemplate: 'assets/stack-skill-template.md'
|
|
4
|
+
provenanceMapSchemaPath: 'assets/provenance-map-schema.md'
|
|
4
5
|
# Resolve `{atomicWriteHelper}` by probing `{atomicWriteProbeOrder}` in order
|
|
5
6
|
# (installed SKF module path first, src/ dev-checkout fallback); first existing
|
|
6
7
|
# path wins. HALT if neither resolves — stage/commit/flip-link/write below
|
|
@@ -10,6 +11,8 @@ atomicWriteProbeOrder:
|
|
|
10
11
|
- '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
11
12
|
---
|
|
12
13
|
|
|
14
|
+
<!-- Config: communicate in {communication_language}. Artifact text in {document_output_language}. -->
|
|
15
|
+
|
|
13
16
|
# Step 7: Generate Output Files
|
|
14
17
|
|
|
15
18
|
## STEP GOAL:
|
|
@@ -24,8 +27,6 @@ Write all deliverable and workspace artifact files to their target directories.
|
|
|
24
27
|
|
|
25
28
|
## MANDATORY SEQUENCE
|
|
26
29
|
|
|
27
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
28
|
-
|
|
29
30
|
### 1. Resolve Paths and Stage Target Directory
|
|
30
31
|
|
|
31
32
|
Resolve `{version}` from the primary library version or default to `1.0.0` (see S11 in "Primary library" note below). The final artifact paths are:
|
|
@@ -40,7 +41,7 @@ Resolve `{version}` from the primary library version or default to `1.0.0` (see
|
|
|
40
41
|
|
|
41
42
|
Where the skill name is `{project_name}-stack` and `{version}` is the semver version (with build metadata stripped per `knowledge/version-paths.md`).
|
|
42
43
|
|
|
43
|
-
**Primary library definition (S11):** In code-mode, the primary library is the dependency with the highest import count from step
|
|
44
|
+
**Primary library definition (S11):** In code-mode, the primary library is the dependency with the highest import count from step 3; its `version` (from the manifest) becomes `{primary_library_version}`. In compose-mode, use the highest semver across constituent skill `metadata.json` files. If neither is available, fall back to `1.0.0`.
|
|
44
45
|
|
|
45
46
|
**Pre-flight: group-dir type check (S3):** If `{skills_output_folder}/{project_name}-stack/` already exists, probe `{skills_output_folder}/{project_name}-stack/active/{project_name}-stack/metadata.json`. If that metadata exists and `skill_type != "stack"`, HALT with:
|
|
46
47
|
|
|
@@ -74,7 +75,7 @@ mkdir -p {forge_version}
|
|
|
74
75
|
python3 {atomicWriteHelper} commit-dir --rollback --target {skill_package}
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
Then abort with a structured error contract (see B7): purge any `{forge_version}/*-tmp` staging artifacts, emit `{"status":"error","skill":"skf-create-stack-skill","stage":"step
|
|
78
|
+
Then abort with a structured error contract (see B7): purge any `{forge_version}/*-tmp` staging artifacts, emit `{"status":"error","skill":"skf-create-stack-skill","stage":"step 7","reason":"<message>"}` on stderr, and halt the workflow.
|
|
78
79
|
|
|
79
80
|
### 2. Stage SKILL.md
|
|
80
81
|
|
|
@@ -136,7 +137,7 @@ Write `{skill_staging}/metadata.json`:
|
|
|
136
137
|
Populate all fields from the metadata.json schema defined in `{stackSkillTemplate}`.
|
|
137
138
|
|
|
138
139
|
**Tier fields:**
|
|
139
|
-
- `forge_tier` — the run tier (Quick/Forge/Forge+/Deep) resolved in step
|
|
140
|
+
- `forge_tier` — the run tier (Quick/Forge/Forge+/Deep) resolved in step 1.
|
|
140
141
|
- `confidence_tier` — the dominant T-code from `confidence_distribution`. Pick the tier with the highest count; resolve ties toward the weaker tier (T1-low > T1, T2 > T1-low, T3 > T2) so the reported value never overstates confidence. When `confidence_distribution` is empty (no libraries extracted), emit `"T1-low"` as the conservative default.
|
|
141
142
|
|
|
142
143
|
```json
|
|
@@ -191,87 +192,12 @@ If any workspace write fails, invoke the rollback contract from §1.
|
|
|
191
192
|
|
|
192
193
|
**provenance-map.json:**
|
|
193
194
|
|
|
194
|
-
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"provenance_version": "2.0",
|
|
198
|
-
"skill_name": "{project_name}-stack",
|
|
199
|
-
"skill_type": "stack",
|
|
200
|
-
"source_repo": ["{repo_url_1}", "{repo_url_2}"],
|
|
201
|
-
"source_commit": {"{repo_1}": "{hash_1}", "{repo_2}": "{hash_2}"},
|
|
202
|
-
"generated_at": "{ISO-8601}",
|
|
203
|
-
"entries": [
|
|
204
|
-
{
|
|
205
|
-
"export_name": "{name}",
|
|
206
|
-
"export_type": "{type}",
|
|
207
|
-
"source_library": "{library-name}",
|
|
208
|
-
"params": [],
|
|
209
|
-
"return_type": "{type}",
|
|
210
|
-
"source_file": "{file}",
|
|
211
|
-
"source_line": 0,
|
|
212
|
-
"confidence": "T1|T1-low|T2",
|
|
213
|
-
"extraction_method": "ast_bridge|source_reading|qmd_bridge",
|
|
214
|
-
"signature_source": "T1|T2|T3"
|
|
215
|
-
}
|
|
216
|
-
],
|
|
217
|
-
"integrations": [
|
|
218
|
-
{
|
|
219
|
-
"libraries": ["{libA}", "{libB}"],
|
|
220
|
-
"pattern_type": "{type}",
|
|
221
|
-
"detection_method": "co-import grep",
|
|
222
|
-
"co_import_files": [{"file": "{path}", "line": 0}],
|
|
223
|
-
"confidence": "T1|T2"
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
```
|
|
195
|
+
Use the schema from `{provenanceMapSchemaPath}` — see that asset for the canonical templates and field definitions of both variants:
|
|
228
196
|
|
|
229
|
-
**In
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
"provenance_version": "2.0",
|
|
233
|
-
"skill_name": "{project_name}-stack",
|
|
234
|
-
"skill_type": "stack",
|
|
235
|
-
"source_repo": null,
|
|
236
|
-
"source_commit": null,
|
|
237
|
-
"source_ref": null,
|
|
238
|
-
"generated_at": "{ISO-8601}",
|
|
239
|
-
"entries": [
|
|
240
|
-
{
|
|
241
|
-
"export_name": "{name}",
|
|
242
|
-
"export_type": "{type}",
|
|
243
|
-
"source_library": "{library-name}",
|
|
244
|
-
"params": [],
|
|
245
|
-
"return_type": "{type}",
|
|
246
|
-
"source_file": "{from constituent skill}",
|
|
247
|
-
"source_line": 0,
|
|
248
|
-
"confidence": "T1|T1-low|T2",
|
|
249
|
-
"extraction_method": "compose-from-skill",
|
|
250
|
-
"signature_source": "T1|T2|T3"
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
"integrations": [
|
|
254
|
-
{
|
|
255
|
-
"libraries": ["{libA}", "{libB}"],
|
|
256
|
-
"pattern_type": "{type}",
|
|
257
|
-
"detection_method": "architecture_co_mention|inferred_from_shared_domain",
|
|
258
|
-
"co_import_files": [],
|
|
259
|
-
"confidence": "T2|T3"
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"constituents": [
|
|
263
|
-
{
|
|
264
|
-
"skill_name": "{constituent-skill-name}",
|
|
265
|
-
"skill_path": "skills/{skill-dir}/",
|
|
266
|
-
"version": "{version from constituent metadata.json}",
|
|
267
|
-
"composed_at": "{ISO-8601}",
|
|
268
|
-
"metadata_hash": "sha256:{hash of constituent metadata.json}"
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
}
|
|
272
|
-
```
|
|
197
|
+
- **In code-mode:** use the code-mode variant (`source_repo` / `source_commit` populated; `extraction_method` ∈ `ast_bridge|source_reading|qmd_bridge`; `detection_method = "co-import grep"`).
|
|
198
|
+
- **In compose-mode:** use the compose-mode variant (source-anchor fields `null`; `extraction_method = "compose-from-skill"`; `detection_method ∈ "architecture_co_mention|inferred_from_shared_domain"`; includes the additional `constituents[]` array for drift detection).
|
|
273
199
|
|
|
274
|
-
|
|
200
|
+
**Use the `metadata_hash` value already stored in workflow state during step 2 (S13) — do NOT re-read and re-hash at step 7 time. The stored hash captures the state as it was at manifest-detection time, which is the correct provenance anchor.**
|
|
275
201
|
|
|
276
202
|
**evidence-report.md:**
|
|
277
203
|
- Extraction summary per library
|
package/src/skf-create-stack-skill/{steps-c/step-10-health-check.md → references/health-check.md}
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
# `shared/health-check.md` resolves relative to the SKF module root
|
|
3
|
-
# (`_bmad/skf/` when installed, `src/` during development), NOT relative
|
|
3
|
+
# (`{project-root}/_bmad/skf/` when installed, `src/` during development), NOT relative
|
|
4
4
|
# to this step file.
|
|
5
5
|
nextStepFile: 'shared/health-check.md'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
9
|
+
|
|
8
10
|
# Step 10: Workflow Health Check
|
|
9
11
|
|
|
10
12
|
## STEP GOAL:
|
|
@@ -13,7 +15,7 @@ Chain to the shared workflow self-improvement health check at `{nextStepFile}`.
|
|
|
13
15
|
|
|
14
16
|
## Rules
|
|
15
17
|
|
|
16
|
-
- 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 9
|
|
17
19
|
- Delegate directly to `{nextStepFile}` with no additional commentary
|
|
18
20
|
- Do not attempt any other action between loading this step and executing `{nextStepFile}`
|
|
19
21
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'detect-manifests.md'
|
|
3
3
|
forgeTierFile: '{sidecar_path}/forge-tier.yaml'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
<!-- Config: communicate in {communication_language}. -->
|
|
7
|
+
|
|
6
8
|
# Step 1: Initialize
|
|
7
9
|
|
|
8
10
|
## STEP GOAL:
|
|
@@ -15,8 +17,6 @@ Load forge tier configuration, validate prerequisites, and prepare the stack ski
|
|
|
15
17
|
|
|
16
18
|
## MANDATORY SEQUENCE
|
|
17
19
|
|
|
18
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
19
|
-
|
|
20
20
|
### 0. Validate Project Config
|
|
21
21
|
|
|
22
22
|
Before anything else, load `{project-root}/_bmad/skf/config.yaml`. If the file is missing OR fails YAML parse OR lacks the required top-level keys (`project_name`, `output_folder`, `skills_output_folder`, `forge_data_folder`, `sidecar_path`), HALT with:
|
|
@@ -29,6 +29,72 @@ Before anything else, load `{project-root}/_bmad/skf/config.yaml`. If the file i
|
|
|
29
29
|
|
|
30
30
|
STOP — do not proceed.
|
|
31
31
|
|
|
32
|
+
### 0b. Resume Check
|
|
33
|
+
|
|
34
|
+
Before any further init work, check for an interrupted prior run.
|
|
35
|
+
|
|
36
|
+
**Probe path.** Resolve `{resume_skill_name}` as `{project_name}-stack` (the same skill name used at step 7) and probe `{forge_data_folder}/{resume_skill_name}/in-progress.json`. (The file lives at the version-agnostic skill root so it can be found before `{version}` resolution.)
|
|
37
|
+
|
|
38
|
+
**If no in-progress.json exists:** Continue to §1.
|
|
39
|
+
|
|
40
|
+
**If in-progress.json exists:** Load and parse it. Read `last_completed_step` and `started_at` (ISO-8601 timestamp). Surface a soft gate:
|
|
41
|
+
|
|
42
|
+
"**Resume previous run?**
|
|
43
|
+
|
|
44
|
+
Found a previous in-progress run at `{forge_data_folder}/{resume_skill_name}/in-progress.json` from {started_at}, last completed at step {last_completed_step}.
|
|
45
|
+
|
|
46
|
+
- **[C] Continue** (recommended) — resume from the next step after {last_completed_step}, restoring saved workflow state.
|
|
47
|
+
- **[F] Fresh** — archive the existing in-progress.json (rename to `in-progress.{timestamp}.json`) and start over from step 1.
|
|
48
|
+
- **[X] Cancel and exit** — leave the in-progress.json untouched and halt.
|
|
49
|
+
|
|
50
|
+
Select [C/F/X]:"
|
|
51
|
+
|
|
52
|
+
**Headless default:** `[C]` Continue.
|
|
53
|
+
|
|
54
|
+
**On [C] Continue:**
|
|
55
|
+
1. Restore workflow context from in-progress.json fields: `last_completed_step`, `workflow_state` (mode, tier, scope), and any accumulator fields (partial extractions, ranked libraries, integration pairs, compile-stack output) that the writing step persisted.
|
|
56
|
+
2. Determine the resume target: the step file that runs immediately after `last_completed_step`.
|
|
57
|
+
3. Jump directly to that step file by loading and executing it (skip the remaining §0b–§5 init substeps for this run).
|
|
58
|
+
|
|
59
|
+
**On [F] Fresh:**
|
|
60
|
+
1. Compute `{archive_timestamp}` as the current UTC time in `YYYYMMDDTHHMMSSZ` form.
|
|
61
|
+
2. Rename `{forge_data_folder}/{resume_skill_name}/in-progress.json` → `{forge_data_folder}/{resume_skill_name}/in-progress.{archive_timestamp}.json`.
|
|
62
|
+
3. Continue with §1 of this file as if no prior run existed.
|
|
63
|
+
|
|
64
|
+
**On [X] Cancel and exit:** HARD HALT with exit code 6 (user-cancelled). Do NOT modify the in-progress.json. Emit the result envelope on stderr per the Result Contract in SKILL.md:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
SKF_STACK_RESULT_JSON: {"status":"error","skill_package":null,"skill_name":"{resume_skill_name}","stack_libraries":[],"mode":null,"exit_code":6,"halt_reason":"user-cancelled"}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**in-progress.json schema (read side).** This PR wires only the READ side of the resume protocol. The WRITE side — each stage step persisting an updated in-progress.json after it completes — is deferred to a follow-up PR. When write-side wiring lands, each step writes the file via `skf-atomic-write.py write` at the end of its mandatory sequence with this shape:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"schema_version": "1.0",
|
|
75
|
+
"skill_name": "{project_name}-stack",
|
|
76
|
+
"started_at": "{ISO-8601 of step 1 start}",
|
|
77
|
+
"updated_at": "{ISO-8601 of most recent step completion}",
|
|
78
|
+
"last_completed_step": "step-NN",
|
|
79
|
+
"workflow_state": {
|
|
80
|
+
"mode": "code|compose",
|
|
81
|
+
"forge_tier": "Quick|Forge|Forge+|Deep",
|
|
82
|
+
"headless_mode": false,
|
|
83
|
+
"scope": {"explicit_deps": [], "scope_overrides": {}, "architecture_doc_path": null}
|
|
84
|
+
},
|
|
85
|
+
"accumulators": {
|
|
86
|
+
"manifests": [],
|
|
87
|
+
"ranked_libraries": [],
|
|
88
|
+
"extractions": {},
|
|
89
|
+
"integration_pairs": [],
|
|
90
|
+
"compiled_stack": null,
|
|
91
|
+
"workflow_warnings": []
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Until the write side is wired, in-progress.json will not naturally appear and §0b will fall through to §1 on every run. The resume gate is a no-op until that follow-up lands.
|
|
97
|
+
|
|
32
98
|
### 1. Load Forge Tier Configuration
|
|
33
99
|
|
|
34
100
|
Load `{forgeTierFile}` from the Ferris sidecar.
|
|
@@ -60,7 +126,7 @@ Extract:
|
|
|
60
126
|
**Tier-dependent tools:**
|
|
61
127
|
- **Quick:** gh_bridge (source reading) — graceful degradation to local file reading if unavailable
|
|
62
128
|
- **Forge:** ast_bridge (ast-grep structural analysis) — required for Forge tier
|
|
63
|
-
- **Forge+:** ast_bridge + ccc_bridge (ccc semantic co-import augmentation) — ccc available for step
|
|
129
|
+
- **Forge+:** ast_bridge + ccc_bridge (ccc semantic co-import augmentation) — ccc available for step 5
|
|
64
130
|
- **Deep:** qmd_bridge (QMD temporal enrichment) — required for Deep tier
|
|
65
131
|
|
|
66
132
|
See `knowledge/tool-resolution.md` for how each bridge name resolves to concrete tools per IDE environment.
|