bmad-module-skill-forge 1.4.1 → 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 +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} +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/{steps-c/step-01-init.md → references/init.md} +57 -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} +29 -17
- 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} +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} +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} +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 +74 -0
- package/src/skf-export-skill/{steps-c/step-06-summary.md → references/summary.md} +20 -8
- 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} +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-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,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: 'coverage.md'
|
|
3
|
+
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
4
|
+
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
5
|
+
# {outputFile} and {outputFileLatest} resolve from the activation-stored
|
|
6
|
+
# {project_slug}, {timestamp}, and {outputFolderPath} variables (set in
|
|
7
|
+
# SKILL.md On Activation §2 + §4). The activation-stored values are
|
|
8
|
+
# fixed for the entire run, so every later reference sees the same
|
|
9
|
+
# filename — no order-of-operations bug.
|
|
10
|
+
outputFile: '{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
11
|
+
outputFileLatest: '{outputFolderPath}/feasibility-report-{project_slug}-latest.md'
|
|
12
|
+
# Resolve `{enumerateStackSkillsHelper}` by probing
|
|
13
|
+
# `{enumerateStackSkillsProbeOrder}` in order (installed SKF module path
|
|
14
|
+
# first, src/ dev-checkout fallback); first existing path wins. §2 calls
|
|
15
|
+
# it for the deterministic skills inventory (cascade-resolved exports,
|
|
16
|
+
# metadata-hash for change-detection, confidence-tier mapping). HALT if
|
|
17
|
+
# neither candidate exists — falls through to LLM-driven subagent fan-out
|
|
18
|
+
# only as graceful degradation, see §2.
|
|
19
|
+
enumerateStackSkillsProbeOrder:
|
|
20
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-enumerate-stack-skills.py'
|
|
21
|
+
- '{project-root}/src/shared/scripts/skf-enumerate-stack-skills.py'
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<!-- Config: communicate in {communication_language}. Initialize the feasibility report skeleton in {document_output_language}. -->
|
|
25
|
+
|
|
26
|
+
# Step 1: Initialize Verification
|
|
27
|
+
|
|
28
|
+
## STEP GOAL:
|
|
29
|
+
|
|
30
|
+
Load all generated skills from the skills output folder, accept the architecture document path (required) and optional PRD/vision document path from the user, validate that all inputs exist and are readable, create the feasibility report document, and present an initialization summary before auto-proceeding.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- Focus only on loading inputs, scanning skills, and creating the report skeleton — do not perform analysis
|
|
35
|
+
- Auto-proceed — halts only on validation errors
|
|
36
|
+
|
|
37
|
+
## MANDATORY SEQUENCE
|
|
38
|
+
|
|
39
|
+
### 1. Accept Input Documents
|
|
40
|
+
|
|
41
|
+
"**Verify Stack — Feasibility Analysis** (read-only — never modifies your skills, architecture doc, or PRD).
|
|
42
|
+
|
|
43
|
+
If you meant to *generate* skills first, type `cancel` and run `[CS] Create Skill` or `[QS] Quick Skill`. Otherwise, please provide the following:
|
|
44
|
+
1. **Architecture document path** (REQUIRED) — your project's architecture doc
|
|
45
|
+
2. **PRD or vision document path** (OPTIONAL) — for requirements coverage analysis
|
|
46
|
+
3. **Previous feasibility report path** (OPTIONAL) — for delta comparison with a prior run (provide a backup copy)
|
|
47
|
+
|
|
48
|
+
Or type `cancel` / `exit` / `:q` at any prompt to abort cleanly."
|
|
49
|
+
|
|
50
|
+
Wait for user input. **GATE [default: use args]** — If `{headless_mode}` and `--architecture-doc` was provided: use that path and auto-proceed, log: "headless: using provided architecture path". If `--prd` and/or `--previous-report` were provided, consume them at the corresponding sub-validations below. If `--architecture-doc` is absent in headless: HALT (exit code 2, `halt_reason: "input-missing"`) and emit the error envelope.
|
|
51
|
+
|
|
52
|
+
- If the user enters `cancel`, `exit`, `[X]`, `q`, or `:q` at any sub-prompt below: Display "Cancelled — no analysis was performed." and HALT (exit code 6, `halt_reason: "user-cancelled"`).
|
|
53
|
+
|
|
54
|
+
**Validate architecture document:**
|
|
55
|
+
- Confirm the file exists and is readable
|
|
56
|
+
- If missing or unreadable → "Architecture document not found at `{path}`. Provide a valid path."
|
|
57
|
+
- HALT (exit code 2, `halt_reason: "input-invalid"`) if the user cannot provide a valid path. In headless, emit the error envelope per SKILL.md "Result Contract (Headless)" immediately.
|
|
58
|
+
|
|
59
|
+
**Validate PRD document (if provided):**
|
|
60
|
+
- Confirm the file exists and is readable
|
|
61
|
+
- If missing → "PRD document not found at `{path}`. Proceeding without PRD — requirements pass will be skipped."
|
|
62
|
+
- Store PRD availability as `prdAvailable: true|false`
|
|
63
|
+
|
|
64
|
+
**Validate previous report (if provided):**
|
|
65
|
+
- Confirm the file exists and is readable
|
|
66
|
+
- **Collision check:** Resolve `{outputFile}` from the activation-stored `{outputFolderPath}`, `{project_slug}`, and `{timestamp}` (all three computed in SKILL.md On Activation §2 + §4 — they are fixed for the entire run). Then compare both the provided path and `{outputFile}` via `(st_dev, st_ino)` tuples obtained from `stat(2)` on each path (do not rely on absolute-path string equality — symlinks, bind mounts, and case-insensitive filesystems can defeat string comparison; the `(st_dev, st_ino)` comparison is the canonical kernel-level equivalent of `os.path.realpath`-based equality and is strictly stronger because it also catches hardlinks). If `{outputFile}` does not yet exist, resolve its parent via `realpath`, stat that directory, and combine `(st_dev, parent_ino, basename)` for comparison. If the two paths resolve to the same inode, warn: "The previous report path points to the same inode as the new report. This file will be overwritten during this run. Provide a path to a backup copy, or leave empty to skip delta comparison." HALT (exit code 5, `halt_reason: "previous-report-collision"`) until resolved. In headless, emit the error envelope.
|
|
67
|
+
- If missing → "Previous report not found at `{path}`. Proceeding without delta comparison."
|
|
68
|
+
- Store as `previousReport: {path}` (or empty string if not provided)
|
|
69
|
+
|
|
70
|
+
### 2. Scan Skills Folder
|
|
71
|
+
|
|
72
|
+
**Pre-flight — skills folder existence:**
|
|
73
|
+
- If `{skills_output_folder}` does not exist on disk: HALT (exit code 3, `halt_reason: "skills-folder-missing"`) with "**Cannot proceed.** `{skills_output_folder}` does not exist — run **[SF] Setup Forge** to initialize the forge, then generate skills with [CS] or [QS]." In headless, emit the error envelope.
|
|
74
|
+
- If `{skills_output_folder}` exists but is empty (no subdirectories at all): HALT (exit code 3, `halt_reason: "skills-folder-missing"`) with "**Cannot proceed.** `{skills_output_folder}` contains 0 skills. Generate skills with [CS] Create Skill or [QS] Quick Skill, then re-run [VS]." In headless, emit the error envelope.
|
|
75
|
+
|
|
76
|
+
**Resolve `{enumerateStackSkillsHelper}`** from `{enumerateStackSkillsProbeOrder}`; first existing path wins.
|
|
77
|
+
|
|
78
|
+
**Primary path — deterministic enumeration via shared helper:**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python3 {enumerateStackSkillsHelper} enumerate {skills_output_folder}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The helper walks `{skills_output_folder}`, reads each `metadata.json`, applies the exports cascade (metadata → references/ → SKILL.md prose), maps `confidence_tier` (T1/T2/T1-low), captures stack-skill cycles via `composes:`, and emits structured JSON with one entry per skill plus a top-level `warnings[]` array. Cache the result as `skill_inventory` (used by §3, §4, §5, and the integrations + coverage stages).
|
|
85
|
+
|
|
86
|
+
Each helper-emitted entry includes: `skill_name`, `version`, `language`, `confidence_tier`, `exports` (cascade-resolved), `source_repo`, `source_root`, plus a `metadata_hash` for change-detection across runs. The helper's `warnings[]` carries per-skill skip reasons (missing manifest, malformed JSON, non-symlink `active`, orphan-versions, schema-version violations).
|
|
87
|
+
|
|
88
|
+
**Failure-budget guard:** If `len(warnings) / len(skill_inventory) + len(warnings) > 0.20` (the same 20% threshold chosen so a single malformed skill in a small 3-5 skill inventory does not trip the halt), HALT (exit code 7, `halt_reason: "inventory-unreliable"`) with: "Inventory scan unreliable — {len(warnings)}/{total} skills returned malformed metadata or skip warnings. Re-run [VS] after skills stabilize." In headless, emit the error envelope.
|
|
89
|
+
|
|
90
|
+
**Capture mtime:** For each accepted skill in `skill_inventory`, also record `metadata.json`'s mtime via `stat` into the entry as `metadata_mtime`. Step-03 will re-verify this to detect mid-run modifications.
|
|
91
|
+
|
|
92
|
+
**Fallback path — graceful degradation when the helper is unavailable:** If `{enumerateStackSkillsHelper}` has no existing candidate (e.g. partial installation), fall through to the LLM-driven subagent fan-out: launch up to **8 subagents concurrently**, each reading one resolved skill package's `metadata.json` and returning the same JSON shape the helper would emit. Apply the same 20% failure-budget guard. This path exists so verify-stack survives a missing helper, but the deterministic helper is preferred — it has a tested cascade resolver, captures the metadata-hash, and surfaces every skip reason in `warnings[]` consistently.
|
|
93
|
+
|
|
94
|
+
### 3. Validate Minimum Requirements
|
|
95
|
+
|
|
96
|
+
**Check skill count:**
|
|
97
|
+
- At least 2 valid skills must exist (a stack requires multiple libraries)
|
|
98
|
+
- If fewer than 2 → "**Cannot proceed.** Only {count} skill(s) found in `{skills_output_folder}`. A stack requires at least 2 skills. Generate more skills with [CS] Create Skill or [QS] Quick Skill, then re-run [VS]."
|
|
99
|
+
- HALT (exit code 5, `halt_reason: "insufficient-skills"`). In headless, emit the error envelope.
|
|
100
|
+
|
|
101
|
+
**Check forge_data_folder:**
|
|
102
|
+
- Verify `forge_data_folder` was resolved from config.yaml and is non-empty
|
|
103
|
+
- If undefined or empty → "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Re-run [SF] Setup Forge to initialize."
|
|
104
|
+
- HALT (exit code 3, `halt_reason: "forge-folder-unconfigured"`). In headless, emit the error envelope.
|
|
105
|
+
|
|
106
|
+
**Check architecture document:**
|
|
107
|
+
- Confirm it was loaded successfully in section 1
|
|
108
|
+
- If not → HALT with error (should not reach here if section 1 validation passed)
|
|
109
|
+
|
|
110
|
+
### 4. Create Feasibility Report
|
|
111
|
+
|
|
112
|
+
This skill is the PRODUCER of the feasibility report schema defined in `{feasibilitySchemaRef}`. All outputs MUST conform to that schema — in particular: `schemaVersion: "1.0"`, the defined verdict token set (`Verified|Plausible|Risky|Blocked`; overall `FEASIBLE|CONDITIONALLY_FEASIBLE|NOT_FEASIBLE`), the filename pattern, and the section-heading order.
|
|
113
|
+
|
|
114
|
+
**Filename variables** (already computed at activation — do not re-derive):
|
|
115
|
+
- `project_slug`: set in SKILL.md On Activation §2 from `project_name`
|
|
116
|
+
- `timestamp`: set in SKILL.md On Activation §2 (UTC `YYYYMMDD-HHmmss`, fixed for the run)
|
|
117
|
+
- `outputFile` resolves to `{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md` per the stage frontmatter template
|
|
118
|
+
- `outputFileLatest` resolves to `{outputFolderPath}/feasibility-report-{project_slug}-latest.md` (a copy, not a symlink — per schema)
|
|
119
|
+
|
|
120
|
+
**Load** `{reportTemplatePath}` (the customize-aware template path resolved in SKILL.md On Activation §4) and stage the initial content.
|
|
121
|
+
|
|
122
|
+
**Populate frontmatter (per shared schema — required keys):**
|
|
123
|
+
- `schemaVersion: "1.0"`
|
|
124
|
+
- `reportType: feasibility`
|
|
125
|
+
- `projectName: "{project_name}"`
|
|
126
|
+
- `projectSlug: "{project_slug}"`
|
|
127
|
+
- `generatedAt: "{ISO-8601 UTC}"`
|
|
128
|
+
- `generatedBy: skf-verify-stack`
|
|
129
|
+
- `overallVerdict: "CONDITIONALLY_FEASIBLE"` (provisional until step 5 finalizes)
|
|
130
|
+
- `coveragePercentage: 0`
|
|
131
|
+
- `pairsVerified: 0`, `pairsPlausible: 0`, `pairsRisky: 0`, `pairsBlocked: 0`
|
|
132
|
+
- `recommendationCount: 0`
|
|
133
|
+
- `prdAvailable: true|false` (from section 1 validation)
|
|
134
|
+
|
|
135
|
+
**Populate producer-local bookkeeping keys (not part of the consumer contract):**
|
|
136
|
+
- `architectureDoc`, `prdDoc` (or "none"), `previousReport` (or empty string)
|
|
137
|
+
- `skillsAnalyzed: {count}`
|
|
138
|
+
- `stepsCompleted: ['init']`
|
|
139
|
+
|
|
140
|
+
**Atomic write:** Pipe the staged content through `python3 {atomicWriteScript} write --target {outputFile}` and then again with `--target {outputFileLatest}`. Both writes use the same staged content. Do NOT use `rm`+rewrite; do NOT create a symlink for the `-latest` copy.
|
|
141
|
+
|
|
142
|
+
On any non-zero exit from either write: HALT (exit code 4, `halt_reason: "write-failed"`) and emit the error envelope per SKILL.md "Result Contract (Headless)" with `report_path: null`, `report_latest_path: null`, `overall_verdict: null`.
|
|
143
|
+
|
|
144
|
+
### 5. Display Initialization Summary
|
|
145
|
+
|
|
146
|
+
"**Stack Verification Initialized**
|
|
147
|
+
|
|
148
|
+
| Field | Value |
|
|
149
|
+
|-------|-------|
|
|
150
|
+
| **Skills Loaded** | {count} |
|
|
151
|
+
| **Architecture Doc** | {architecture_doc} |
|
|
152
|
+
| **PRD Document** | {prd_doc or 'Not provided — requirements pass will be skipped'} |
|
|
153
|
+
| **Previous Report** | {previousReport or 'Not provided — no delta comparison'} |
|
|
154
|
+
|
|
155
|
+
**Skill Inventory:**
|
|
156
|
+
|
|
157
|
+
| Skill | Language | Tier | Exports |
|
|
158
|
+
|-------|----------|------|---------|
|
|
159
|
+
| {skill_name} | {language} | {confidence_tier} | {exports_documented} |
|
|
160
|
+
|
|
161
|
+
**Proceeding to coverage analysis...**"
|
|
162
|
+
|
|
163
|
+
### 6. Auto-Proceed to Next Step
|
|
164
|
+
|
|
165
|
+
Load, read the full file and then execute `{nextStepFile}`.
|
|
166
|
+
|
|
@@ -17,7 +17,7 @@ Token set is defined canonically in `src/shared/references/feasibility-report-sc
|
|
|
17
17
|
| **Risky** | Type mismatch, protocol gap, or language boundary requiring a bridge | A clear gap exists (e.g., TypeScript↔Rust FFI needed) but a workaround is architecturally feasible — a named workaround MUST be cited in the recommendation |
|
|
18
18
|
| **Blocked** | Fundamental incompatibility — no feasible integration path even with a bridge or adapter layer | The two libraries cannot exchange data in any documented way; requires replacing one of the libraries |
|
|
19
19
|
|
|
20
|
-
**Promotion rule:** `Verified` requires Check 4 evidence. If Checks 1 and 3 pass but Check 4 fails (no literal substring/name citation from either skill's SKILL.md), the verdict is capped at `Plausible`. This rule is enforced by step
|
|
20
|
+
**Promotion rule:** `Verified` requires Check 4 evidence. If Checks 1 and 3 pass but Check 4 fails (no literal substring/name citation from either skill's SKILL.md), the verdict is capped at `Plausible`. This rule is enforced by step 3 §4 and is the producer obligation declared in the shared schema.
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
3
|
-
integrationRulesData: '
|
|
4
|
-
coveragePatternsData: '
|
|
2
|
+
nextStepFile: 'requirements.md'
|
|
3
|
+
integrationRulesData: '{integrationRulesPath}'
|
|
4
|
+
coveragePatternsData: '{coveragePatternsPath}'
|
|
5
5
|
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
6
6
|
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
7
|
-
outputFile: '{
|
|
8
|
-
outputFileLatest: '{
|
|
7
|
+
outputFile: '{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
8
|
+
outputFileLatest: '{outputFolderPath}/feasibility-report-{project_slug}-latest.md'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
<!-- Config: communicate in {communication_language}. Append the Integration Verdicts section to the report in {document_output_language}. -->
|
|
12
|
+
|
|
11
13
|
# Step 3: Integration Verification
|
|
12
14
|
|
|
13
15
|
## STEP GOAL:
|
|
@@ -22,8 +24,6 @@ Cross-reference API surfaces between library pairs that the architecture documen
|
|
|
22
24
|
|
|
23
25
|
## MANDATORY SEQUENCE
|
|
24
26
|
|
|
25
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
26
|
-
|
|
27
27
|
### 1. Load Integration Verification Rules
|
|
28
28
|
|
|
29
29
|
Load `{integrationRulesData}` for the cross-reference verification protocol.
|
|
@@ -54,7 +54,7 @@ Parse the architecture document for statements describing two or more technologi
|
|
|
54
54
|
|
|
55
55
|
<!-- Subagent delegation: read SKILL.md files in parallel, return compact JSON -->
|
|
56
56
|
|
|
57
|
-
For each library in an integration pair, delegate SKILL.md reading to a parallel subagent. Launch up to **8 subagents concurrently** (batch if needed — same 8-way cap as step
|
|
57
|
+
For each library in an integration pair, delegate SKILL.md reading to a parallel subagent. Launch up to **8 subagents concurrently** (batch if needed — same 8-way cap as step 1 §2; keeps aggregate token window manageable while still parallelizing typical stack sizes). Each subagent receives one skill's SKILL.md path and MUST:
|
|
58
58
|
1. Read the SKILL.md file
|
|
59
59
|
2. Extract the API surface
|
|
60
60
|
3. ONLY return this compact JSON — no prose, no extra commentary:
|
|
@@ -78,7 +78,7 @@ For each library in an integration pair, delegate SKILL.md reading to a parallel
|
|
|
78
78
|
|
|
79
79
|
**CRITICAL — these fields are inferred, not declared.** `protocols` and `data_formats` do not exist in any skill's `metadata.json`. Treat them as weak evidence from prose scanning only. When either list is used to justify compatibility in Check 2, the per-pair verdict MUST be capped at `Plausible` (see the schema's producer obligations — `src/shared/references/feasibility-report-schema.md`).
|
|
80
80
|
|
|
81
|
-
**Schema validation (parent):** Each subagent response must contain the required keys (`skill_name`, `language`, `exports`). Reject responses missing required keys and exclude that skill from pair evaluation; HALT if more than **20%** (same failure-budget threshold as step
|
|
81
|
+
**Schema validation (parent):** Each subagent response must contain the required keys (`skill_name`, `language`, `exports`). Reject responses missing required keys and exclude that skill from pair evaluation; HALT if more than **20%** (same failure-budget threshold as step 1 §2; see the justification there) of subagent calls return malformed JSON.
|
|
82
82
|
|
|
83
83
|
**Parent collects all subagent JSON summaries.** Do not load full SKILL.md content into parent context.
|
|
84
84
|
|
|
@@ -88,7 +88,7 @@ For each library in an integration pair, delegate SKILL.md reading to a parallel
|
|
|
88
88
|
- `stats.exports_documented` — export count
|
|
89
89
|
- `confidence_tier` — extraction confidence level
|
|
90
90
|
|
|
91
|
-
**mtime re-verification:** Re-stat each `metadata.json` and compare against the mtime captured in step
|
|
91
|
+
**mtime re-verification:** Re-stat each `metadata.json` and compare against the mtime captured in step 1. If any mtime moved during the run, abort any pair involving that skill with rationale "skill modified mid-run — re-run [VS]".
|
|
92
92
|
|
|
93
93
|
Store collected API surface summaries for cross-referencing.
|
|
94
94
|
|
|
@@ -163,8 +163,8 @@ For each integration pair `{library_a, library_b}`, apply the verification proto
|
|
|
163
163
|
Write the **Integration Verdicts** section to `{outputFile}` (heading is fixed — consumers grep for `## Integration Verdicts`; the table header MUST be the canonical `| lib_a | lib_b | verdict | rationale |` per `{feasibilitySchemaRef}`; the skill-local display table with the extra Context/Source/Evidence columns can be rendered beneath it for human readers):
|
|
164
164
|
- Emit the canonical `| lib_a | lib_b | verdict | rationale |` table first (verdict tokens MUST be one of `Verified`, `Plausible`, `Risky`, `Blocked` — case-sensitive)
|
|
165
165
|
- Include the extended table with Context, Source, and Evidence columns below it
|
|
166
|
-
- Include recommendations for Risky and Blocked pairs (Blocked recommendations MUST cite a named candidate per step
|
|
167
|
-
- Update frontmatter: append `'
|
|
166
|
+
- Include recommendations for Risky and Blocked pairs (Blocked recommendations MUST cite a named candidate per step 5 H6, or the explicit no-candidate notice)
|
|
167
|
+
- Update frontmatter: append `'integrations'` to `stepsCompleted`; set `pairsVerified`, `pairsPlausible`, `pairsRisky`, `pairsBlocked` counts
|
|
168
168
|
- Pipe the updated full content through `python3 {atomicWriteScript} write --target {outputFile}` and again with `--target {outputFileLatest}`
|
|
169
169
|
|
|
170
170
|
### 7. Auto-Proceed to Next Step
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
# {outputFile} and {outputFileLatest} resolve from the activation-stored
|
|
3
|
+
# {project_slug}, {timestamp}, and {outputFolderPath} variables (set in
|
|
4
|
+
# SKILL.md On Activation §2 + §4) — same template as init.md frontmatter
|
|
5
|
+
# so every stage sees the same path.
|
|
6
|
+
outputFile: '{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
7
|
+
outputFileLatest: '{outputFolderPath}/feasibility-report-{project_slug}-latest.md'
|
|
4
8
|
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
5
9
|
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
6
|
-
nextStepFile: '
|
|
10
|
+
nextStepFile: 'health-check.md'
|
|
7
11
|
---
|
|
8
12
|
|
|
13
|
+
<!-- Config: communicate in {communication_language}. Render the user-facing summary in {document_output_language}. -->
|
|
14
|
+
|
|
9
15
|
# Step 6: Present Report
|
|
10
16
|
|
|
11
17
|
## STEP GOAL:
|
|
@@ -19,17 +25,15 @@ Present the complete feasibility report to the user. Display the overall verdict
|
|
|
19
25
|
|
|
20
26
|
## MANDATORY SEQUENCE
|
|
21
27
|
|
|
22
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
23
|
-
|
|
24
28
|
### 1. Load Complete Report
|
|
25
29
|
|
|
26
30
|
Read the entire `{outputFile}` to have all data available for presentation.
|
|
27
31
|
|
|
28
|
-
Verify all expected sections are present in order per `{feasibilitySchemaRef}`: `## Executive Summary`, `## Coverage Analysis`, `## Integration Verdicts`, `## Recommendations`, `## Evidence Sources`. If any section is missing or out of order, HALT and report the schema violation — do not display partial results.
|
|
32
|
+
Verify all expected sections are present in order per `{feasibilitySchemaRef}`: `## Executive Summary`, `## Coverage Analysis`, `## Integration Verdicts`, `## Recommendations`, `## Evidence Sources`. If any section is missing or out of order, HALT (exit code 5, `halt_reason: "schema-violation"`) and report the schema violation — do not display partial results. In headless, emit the error envelope per SKILL.md "Result Contract (Headless)" with `report_path: "{outputFile}"`, `overall_verdict: null`.
|
|
29
33
|
|
|
30
34
|
**Extract metrics from `{outputFile}` frontmatter** (per shared schema in `{feasibilitySchemaRef}`): `skillsAnalyzed`, `coveragePercentage`, `pairsVerified` (as `verified_count`), `pairsPlausible` (as `plausible_count`), `pairsRisky` (as `risky_count`), `pairsBlocked` (as `blocked_count`), `requirementsFulfilled` (as `fulfilled_count`), `requirementsPartial` (as `partial_count`), `requirementsNotAddressed` (as `not_addressed_count`), `requirementsPass`, `overallVerdict`, and `recommendationCount`. Use these mapped display names in the summary table and next steps below.
|
|
31
35
|
|
|
32
|
-
**Schema guard:** Verify `schemaVersion == "1.0"` in the frontmatter. If mismatched, HALT with "Report frontmatter schemaVersion `{value}` does not match producer schema `1.0` — report was corrupted between steps. Re-run [VS]." (Producer never proceeds past a schema mismatch.)
|
|
36
|
+
**Schema guard:** Verify `schemaVersion == "1.0"` in the frontmatter. If mismatched, HALT (exit code 5, `halt_reason: "schema-violation"`) with "Report frontmatter schemaVersion `{value}` does not match producer schema `1.0` — report was corrupted between steps. Re-run [VS]." (Producer never proceeds past a schema mismatch.) In headless, emit the error envelope.
|
|
33
37
|
|
|
34
38
|
### 2. Present Summary
|
|
35
39
|
|
|
@@ -62,35 +66,7 @@ Verify all expected sections are present in order per `{feasibilitySchemaRef}`:
|
|
|
62
66
|
|
|
63
67
|
### 3. Present Detailed Findings
|
|
64
68
|
|
|
65
|
-
Walk through
|
|
66
|
-
|
|
67
|
-
"**Coverage Highlights:**
|
|
68
|
-
{IF 100% coverage:}
|
|
69
|
-
- All referenced technologies have a matching skill
|
|
70
|
-
|
|
71
|
-
{IF any missing:}
|
|
72
|
-
- **Missing:** {list of missing technology names}
|
|
73
|
-
|
|
74
|
-
**Integration Verdicts:**
|
|
75
|
-
{IF all Verified/Plausible:}
|
|
76
|
-
- All integration pairs verified or plausible — no blockers
|
|
77
|
-
|
|
78
|
-
{IF any Risky:}
|
|
79
|
-
- **Risky:** {list of risky pairs with brief concern}
|
|
80
|
-
|
|
81
|
-
{IF any Blocked:}
|
|
82
|
-
- **Blocked:** {list of blocked pairs with brief incompatibility}
|
|
83
|
-
|
|
84
|
-
{IF requirements pass completed:}
|
|
85
|
-
**Requirements Gaps:**
|
|
86
|
-
{IF all Fulfilled:}
|
|
87
|
-
- All stated requirements addressed by the stack
|
|
88
|
-
|
|
89
|
-
{IF any Partially Fulfilled:}
|
|
90
|
-
- **Partially Fulfilled:** {list of partially covered requirements with gap description}
|
|
91
|
-
|
|
92
|
-
{IF any Not Addressed:}
|
|
93
|
-
- **Not Addressed:** {list of unaddressed requirements}"
|
|
69
|
+
Walk through the highlights — coverage gaps, risky/blocked integrations, and partial/unaddressed requirements (when a PRD pass ran). Cite specific items by name; cap at the top ~5 per category to keep the summary scannable. The full detail is in `{outputFile}` for the user to inspect via the [R] Review menu (§5).
|
|
94
70
|
|
|
95
71
|
### 4. Present Next Steps
|
|
96
72
|
|
|
@@ -124,9 +100,17 @@ Based on the overall verdict, present the appropriate recommendation:
|
|
|
124
100
|
|
|
125
101
|
Write the result contract per `shared/references/output-contract-schema.md`: the per-run record at `{forge_data_folder}/verify-stack-result-{YYYYMMDD-HHmmss}.json` (UTC timestamp, resolution to seconds) and a copy at `{forge_data_folder}/verify-stack-result-latest.json` (stable path for pipeline consumers — copy, not symlink). Include the feasibility report path (both `{outputFile}` and `{outputFileLatest}`) in `outputs`; include `overallVerdict` (`FEASIBLE` / `CONDITIONALLY_FEASIBLE` / `NOT_FEASIBLE`), `coveragePercentage`, and `recommendationCount` in `summary` — use the case-sensitive schema tokens.
|
|
126
102
|
|
|
127
|
-
Write both JSON files through `python3 {atomicWriteScript} write --target ...` to avoid partial-write corruption.
|
|
103
|
+
Write both JSON files through `python3 {atomicWriteScript} write --target ...` to avoid partial-write corruption. On any non-zero exit: HALT (exit code 4, `halt_reason: "write-failed"`) and emit the error envelope.
|
|
104
|
+
|
|
105
|
+
When `{headless_mode}` is true, also emit the single-line envelope on **stdout** before chaining to step 7 (matches the SKILL.md "Result Contract (Headless)" shape):
|
|
128
106
|
|
|
129
|
-
|
|
107
|
+
```
|
|
108
|
+
SKF_VERIFY_STACK_RESULT_JSON: {"status":"success","report_path":"{outputFile}","report_latest_path":"{outputFileLatest}","overall_verdict":"{overallVerdict}","coverage_percentage":{coveragePercentage},"recommendation_count":{recommendationCount},"exit_code":0,"halt_reason":null}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`{overallVerdict}` uses the schema tokens (`FEASIBLE` / `CONDITIONALLY_FEASIBLE` / `NOT_FEASIBLE`).
|
|
112
|
+
|
|
113
|
+
**Result-contract ordering:** The result contract is written exactly once on the first entry to step 6 (the `[X] Exit verification` path). Re-walks of the report via the `[R] Review full report` menu option do NOT regenerate it — the contract captures the run, not the presentation loop. If the user selects `[R]` repeatedly before exiting, the single on-disk contract written on first entry remains authoritative.
|
|
130
114
|
|
|
131
115
|
### 5. Present Menu
|
|
132
116
|
|
|
@@ -150,7 +134,4 @@ Re-run **[VS] Verify Stack** anytime after making changes to your skills or arch
|
|
|
150
134
|
- R may be selected multiple times — always walk through the full report
|
|
151
135
|
- X triggers the health check, which is the true workflow exit
|
|
152
136
|
|
|
153
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
154
|
-
|
|
155
|
-
When the user selects X, this step chains to the local health-check step (`{nextStepFile}`), which in turn delegates to `shared/health-check.md`. After the health check completes, the verify-stack workflow is fully done. The feasibility report at `{outputFile}` (and its stable `-latest.md` copy) contains the full analysis under the fixed headings: Executive Summary, Coverage Analysis, Integration Verdicts, Recommendations, Evidence Sources.
|
|
156
137
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'synthesize.md'
|
|
3
3
|
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
4
4
|
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
5
|
-
outputFile: '{
|
|
6
|
-
outputFileLatest: '{
|
|
5
|
+
outputFile: '{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
6
|
+
outputFileLatest: '{outputFolderPath}/feasibility-report-{project_slug}-latest.md'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
<!-- Config: communicate in {communication_language}. Append the Requirements Coverage section to the report in {document_output_language}. -->
|
|
10
|
+
|
|
9
11
|
# Step 4: Requirements Coverage
|
|
10
12
|
|
|
11
13
|
## STEP GOAL:
|
|
@@ -20,8 +22,6 @@ If a PRD or vision document was provided in Step 01, verify that the combined ca
|
|
|
20
22
|
|
|
21
23
|
## MANDATORY SEQUENCE
|
|
22
24
|
|
|
23
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
24
|
-
|
|
25
25
|
### 1. Check PRD Availability
|
|
26
26
|
|
|
27
27
|
**Read `prdAvailable` from `{outputFile}` frontmatter (set in Step 01). If `prdAvailable` is false (no PRD/vision document was provided):**
|
|
@@ -34,7 +34,7 @@ To include this pass, re-run **[VS]** with a PRD or vision document path.
|
|
|
34
34
|
|
|
35
35
|
**Proceeding to synthesis...**"
|
|
36
36
|
|
|
37
|
-
Update `{outputFile}` frontmatter: append `'
|
|
37
|
+
Update `{outputFile}` frontmatter: append `'requirements'` to `stepsCompleted`; set `requirementsPass: "skipped"`. Pipe the updated content through `python3 {atomicWriteScript} write --target {outputFile}` and again with `--target {outputFileLatest}`.
|
|
38
38
|
|
|
39
39
|
Load, read the full file and then execute `{nextStepFile}`. **STOP HERE — do not execute sections 2-6.**
|
|
40
40
|
|
|
@@ -102,7 +102,7 @@ For each requirement, evaluate whether the combined capabilities of the generate
|
|
|
102
102
|
Write the Requirements Coverage content under the `## Recommendations` section (or as a clearly-titled subsection preceding Recommendations — the shared schema's fixed top-level headings are Executive Summary, Coverage Analysis, Integration Verdicts, Recommendations, Evidence Sources; requirements detail lives under Recommendations):
|
|
103
103
|
- Include the full requirements coverage table
|
|
104
104
|
- Include recommendations for Not Addressed and Partially Fulfilled items
|
|
105
|
-
- Update frontmatter: append `'
|
|
105
|
+
- Update frontmatter: append `'requirements'` to `stepsCompleted`
|
|
106
106
|
- Set `requirementsPass: "completed"`
|
|
107
107
|
- Set `requirementsFulfilled`, `requirementsPartial`, `requirementsNotAddressed` counts
|
|
108
108
|
- Pipe the updated full content through `python3 {atomicWriteScript} write --target {outputFile}` and again with `--target {outputFileLatest}`
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
nextStepFile: '
|
|
2
|
+
nextStepFile: 'report.md'
|
|
3
3
|
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
4
4
|
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
5
|
-
outputFile: '{
|
|
6
|
-
outputFileLatest: '{
|
|
5
|
+
outputFile: '{outputFolderPath}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
6
|
+
outputFileLatest: '{outputFolderPath}/feasibility-report-{project_slug}-latest.md'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
<!-- Config: communicate in {communication_language}. Append the Executive Summary, synthesized verdict, and Recommendations to the report in {document_output_language}. -->
|
|
10
|
+
|
|
9
11
|
# Step 5: Synthesize Verdict
|
|
10
12
|
|
|
11
13
|
## STEP GOAL:
|
|
@@ -19,8 +21,6 @@ Calculate the overall feasibility verdict based on all three analysis passes, ge
|
|
|
19
21
|
|
|
20
22
|
## MANDATORY SEQUENCE
|
|
21
23
|
|
|
22
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
23
|
-
|
|
24
24
|
### 1. Calculate Overall Verdict
|
|
25
25
|
|
|
26
26
|
**Zero-coverage short-circuit (evaluate before anything else):** Read `coveragePercentage` from `{outputFile}` frontmatter. If `coveragePercentage == 0`, force `overallVerdict: NOT_FEASIBLE` with rationale "no coverage — analysis vacuous: zero generated skills match the architecture's referenced technologies, so integration and requirements verdicts cannot produce meaningful evidence." Skip the remainder of the verdict ladder; proceed directly to section 2 to generate recommendations for the Missing skills surfaced by Step 02.
|
|
@@ -47,7 +47,7 @@ If ANY of the following apply, the verdict is `CONDITIONALLY_FEASIBLE`. Include
|
|
|
47
47
|
- Rationale: {IF requirements pass completed:} the stack can support the architecture as described — all requirements fully fulfilled, every integration pair has a literal cross-reference. {IF requirements pass was skipped:} the stack can support the architecture as described — requirements were not evaluated (no PRD provided)
|
|
48
48
|
|
|
49
49
|
**Post-verdict: Zero integration pairs guard (apply after ANY verdict):**
|
|
50
|
-
If zero integration pairs were extracted (all four integration counts are 0), fire the guard whenever the user continued past the step
|
|
50
|
+
If zero integration pairs were extracted (all four integration counts are 0), fire the guard whenever the user continued past the step 2 `[C] Continue anyway` prompt (i.e., any `[C]` continuation from 0% coverage or any other zero-state) — regardless of how many technologies the architecture document references:
|
|
51
51
|
- If the verdict was `FEASIBLE`, override to `CONDITIONALLY_FEASIBLE`
|
|
52
52
|
- Regardless of verdict, append this note to the rationale: "No integration claims were found in the architecture document prose. Manual review recommended to confirm that technology relationships are not documented exclusively in diagrams or implied without explicit co-mention."
|
|
53
53
|
|
|
@@ -103,7 +103,7 @@ Assemble the following for the report:
|
|
|
103
103
|
|
|
104
104
|
**Overall verdict** with rationale citing the decision logic.
|
|
105
105
|
|
|
106
|
-
**Recommendation list** ordered by priority (count total recommendations as `recommendationCount` — persist this count to `{outputFile}` frontmatter for use in step
|
|
106
|
+
**Recommendation list** ordered by priority (count total recommendations as `recommendationCount` — persist this count to `{outputFile}` frontmatter for use in step 6):
|
|
107
107
|
1. Blocked integrations (if any)
|
|
108
108
|
2. Missing skills
|
|
109
109
|
3. Risky integrations
|
|
@@ -128,7 +128,7 @@ Write the **Recommendations** and **Evidence Sources** sections to `{outputFile}
|
|
|
128
128
|
- Include suggested next workflow at the end of `## Recommendations`
|
|
129
129
|
- Populate `## Evidence Sources` with per-skill citations (SKILL.md path, `metadata_schema_version`, `confidence_tier`, stack manifest if any) and architecture/PRD doc paths
|
|
130
130
|
- Update frontmatter (shared-schema keys):
|
|
131
|
-
- Append `'
|
|
131
|
+
- Append `'synthesize'` to `stepsCompleted`
|
|
132
132
|
- Set `overallVerdict` to one of `FEASIBLE`, `CONDITIONALLY_FEASIBLE`, `NOT_FEASIBLE` (case-sensitive, underscores — NOT spaces)
|
|
133
133
|
- Set `recommendationCount` to the total number of recommendations
|
|
134
134
|
- If delta was computed (section 3), set `deltaImproved`, `deltaRegressed`, `deltaNew`, `deltaUnchanged`
|
|
@@ -90,7 +90,7 @@ function resolveOmsPath(anchors) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// Accept either a full SHA match or a short-SHA prefix match, per
|
|
93
|
-
// src/skf-update-skill/
|
|
93
|
+
// src/skf-update-skill/references/re-extract.md:36 — the pinned commit
|
|
94
94
|
// is often stored as an 8-char short hash. Both anchors and metadata are
|
|
95
95
|
// lowercased before comparison; blank / null values never match.
|
|
96
96
|
function commitsMatch(anchorCommit, metadataCommit) {
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
nextStepFile: './step-02-gap-analysis.md'
|
|
3
|
-
refinementRulesData: 'references/refinement-rules.md'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 1: Initialize Refinement
|
|
7
|
-
|
|
8
|
-
## STEP GOAL:
|
|
9
|
-
|
|
10
|
-
Load the architecture document (required), scan the skills folder to build a skill inventory with metadata, load the optional VS feasibility report for context, validate that all inputs exist and meet minimum requirements, and present an initialization summary before auto-proceeding.
|
|
11
|
-
|
|
12
|
-
## Rules
|
|
13
|
-
|
|
14
|
-
- Focus only on loading inputs, scanning skills, and validating prerequisites — do not perform analysis
|
|
15
|
-
- Present a clear initialization summary so downstream steps have validated inputs
|
|
16
|
-
|
|
17
|
-
## MANDATORY SEQUENCE
|
|
18
|
-
|
|
19
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
20
|
-
|
|
21
|
-
### 1. Accept Input Documents
|
|
22
|
-
|
|
23
|
-
"**Refine Architecture — Evidence-Backed Refinement**
|
|
24
|
-
|
|
25
|
-
Please provide the following:
|
|
26
|
-
1. **Architecture document path** (REQUIRED) — your project's architecture doc to refine
|
|
27
|
-
2. **VS feasibility report path** (OPTIONAL) — from a previous [VS] Verify Stack run, for additional context"
|
|
28
|
-
|
|
29
|
-
Wait for user input. Store the validated architecture document path as `architecture_doc`. **GATE [default: use args]** — If `{headless_mode}` and architecture doc path was provided as argument: use that path and auto-proceed, log: "headless: using provided architecture path".
|
|
30
|
-
|
|
31
|
-
**Validate architecture document:**
|
|
32
|
-
- Confirm the file exists and is readable
|
|
33
|
-
- If missing or unreadable: "Architecture document not found at `{path}`. Provide a valid path."
|
|
34
|
-
- HALT until a valid architecture document is provided
|
|
35
|
-
|
|
36
|
-
**Validate VS report (if provided):**
|
|
37
|
-
- Confirm the file exists and is readable
|
|
38
|
-
- If missing at user-provided path: attempt auto-probe (below) before giving up
|
|
39
|
-
- Store VS report availability as `vs_report_available: true|false` and `vs_report_path`
|
|
40
|
-
|
|
41
|
-
### 2. Scan Skills Folder
|
|
42
|
-
|
|
43
|
-
Read the `{skills_output_folder}` directory. Skills use a version-nested directory structure (see `knowledge/version-paths.md`).
|
|
44
|
-
|
|
45
|
-
**Version-aware skill discovery:**
|
|
46
|
-
1. Read `{skills_output_folder}/.export-manifest.json` if it exists. For each skill in `exports`, use `active_version` to resolve `{skill_package}` = `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/`
|
|
47
|
-
2. For any subdirectory not covered by the manifest, check for an `active` symlink at `{skills_output_folder}/{dir_name}/active` — resolve to `{skill_group}/active/{dir_name}/`
|
|
48
|
-
3. Fall back to flat path `{skills_output_folder}/{dir_name}/` for unmigrated skills
|
|
49
|
-
|
|
50
|
-
For each resolved skill package, check for the presence of `SKILL.md` and `metadata.json`.
|
|
51
|
-
|
|
52
|
-
**For each valid skill directory, extract from metadata.json:**
|
|
53
|
-
- `name` — skill name
|
|
54
|
-
- `language` — primary language
|
|
55
|
-
- `confidence_tier` — Quick, Forge, Forge+, or Deep
|
|
56
|
-
- `exports_documented` — read from `stats.exports_documented` in metadata.json (count of documented exports)
|
|
57
|
-
- `source_repo` or `source_root` — original source repository
|
|
58
|
-
|
|
59
|
-
**Build a skill inventory** as an internal list of all loaded skills with the fields above.
|
|
60
|
-
|
|
61
|
-
**If a resolved skill package lacks SKILL.md or metadata.json:**
|
|
62
|
-
- Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
|
|
63
|
-
- Do not include in inventory
|
|
64
|
-
|
|
65
|
-
### 3. Validate Minimum Requirements
|
|
66
|
-
|
|
67
|
-
**Check skill count:**
|
|
68
|
-
- At least 1 valid skill must exist
|
|
69
|
-
- If no skills found: "**Cannot proceed.** No skills found in `{skills_output_folder}`. Generate skills with [CS] Create Skill or [QS] Quick Skill, then re-run [RA]."
|
|
70
|
-
- HALT workflow
|
|
71
|
-
- If exactly 1 valid skill found: "⚠️ Proceeding with 1 skill. Note: gap analysis will find no gaps — pairwise analysis requires at least 2 skills. Step 02 will still execute and issue an appropriate notice. Issue detection and improvement detection will proceed normally."
|
|
72
|
-
|
|
73
|
-
**Check output_folder:**
|
|
74
|
-
- Verify `output_folder` was resolved from config.yaml and is non-empty
|
|
75
|
-
- If undefined or empty: "**Cannot proceed.** `output_folder` is not configured in config.yaml. Add an `output_folder` path and re-run [RA]."
|
|
76
|
-
- HALT workflow
|
|
77
|
-
- Verify the `output_folder` directory exists. If it does not exist, create it. HALT with error if creation fails.
|
|
78
|
-
|
|
79
|
-
**Check forge_data_folder:**
|
|
80
|
-
- Verify `forge_data_folder` was resolved from config.yaml and is non-empty
|
|
81
|
-
- If undefined or empty: "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Add a `forge_data_folder` path to your config.yaml and re-run [RA]."
|
|
82
|
-
- HALT workflow
|
|
83
|
-
- Verify the `forge_data_folder` directory exists. If it does not exist, attempt to create it. If creation fails: "**Cannot proceed.** `forge_data_folder` at `{forge_data_folder}` does not exist and could not be created. Create the directory manually and re-run [RA]."
|
|
84
|
-
- HALT workflow on creation failure
|
|
85
|
-
|
|
86
|
-
**Check architecture document:**
|
|
87
|
-
- Confirm it was loaded successfully in section 1
|
|
88
|
-
- If not: HALT with error (should not reach here if section 1 validation passed)
|
|
89
|
-
|
|
90
|
-
### 3b. Auto-Probe VS Report
|
|
91
|
-
|
|
92
|
-
**Auto-probe VS report (if not provided by user in section 1, OR if user-provided path was invalid):**
|
|
93
|
-
- Only attempt if `forge_data_folder` is non-empty and the directory exists (validated above); otherwise skip probe and set `vs_report_available: false`
|
|
94
|
-
- Check for `{forge_data_folder}/feasibility-report-{project_name}.md`
|
|
95
|
-
- If found: "Auto-discovered VS report at `{path}`. Loading for additional context."
|
|
96
|
-
- Store `vs_report_available: true` and `vs_report_path`
|
|
97
|
-
- If not found: `vs_report_available: false` — "Proceeding without VS report — issue detection will rely on skill data only."
|
|
98
|
-
|
|
99
|
-
### 3c. Reset RA State File
|
|
100
|
-
|
|
101
|
-
Create (or overwrite) `{forge_data_folder}/ra-state-{project_name}.md` with a fresh header:
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
<!-- RA state for {project_name} — generated {current_date} -->
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
This ensures steps 02-04 append to a clean slate and context recovery in step-05 never loads stale findings from a prior run.
|
|
108
|
-
|
|
109
|
-
### 4. Load Refinement Rules
|
|
110
|
-
|
|
111
|
-
Load `{refinementRulesData}` for reference by downstream steps.
|
|
112
|
-
|
|
113
|
-
Extract: gap detection rules, issue detection rules, improvement detection rules, citation format, and preservation rules.
|
|
114
|
-
|
|
115
|
-
### 5. Display Initialization Summary
|
|
116
|
-
|
|
117
|
-
"**Architecture Refinement Initialized**
|
|
118
|
-
|
|
119
|
-
| Field | Value |
|
|
120
|
-
|-------|-------|
|
|
121
|
-
| **Architecture Doc** | {architecture_doc} |
|
|
122
|
-
| **VS Report** | {vs_report_path or 'Not provided — issue detection will use skill data only'} |
|
|
123
|
-
| **Skills Loaded** | {skill_count} |
|
|
124
|
-
|
|
125
|
-
**Skill Inventory:**
|
|
126
|
-
|
|
127
|
-
| Skill | Language | Tier | Exports |
|
|
128
|
-
|-------|----------|------|---------|
|
|
129
|
-
| {skill_name} | {language} | {confidence_tier} | {exports_documented} |
|
|
130
|
-
|
|
131
|
-
**Proceeding to gap analysis...**"
|
|
132
|
-
|
|
133
|
-
### 6. Auto-Proceed to Next Step
|
|
134
|
-
|
|
135
|
-
Load, read the full file and then execute `{nextStepFile}`.
|
|
136
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# `shared/health-check.md` resolves relative to the SKF module root
|
|
3
|
-
# (`_bmad/skf/` when installed, `src/` during development), NOT relative
|
|
4
|
-
# to this step file.
|
|
5
|
-
nextStepFile: 'shared/health-check.md'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Step 4: Workflow Health Check
|
|
9
|
-
|
|
10
|
-
## STEP GOAL:
|
|
11
|
-
|
|
12
|
-
Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of rename-skill — after the shared health check completes, the workflow is fully done.
|
|
13
|
-
|
|
14
|
-
## Rules
|
|
15
|
-
|
|
16
|
-
- No user-facing reports, file writes, or result contracts in this step — those belong in step-03
|
|
17
|
-
- Delegate directly to `{nextStepFile}` with no additional commentary
|
|
18
|
-
- Do not attempt any other action between loading this step and executing `{nextStepFile}`
|
|
19
|
-
|
|
20
|
-
## MANDATORY SEQUENCE
|
|
21
|
-
|
|
22
|
-
Load `{nextStepFile}`, read it fully, then execute it.
|