bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +39 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +185 -0
- package/docs/STABILITY.md +123 -0
- package/docs/_data/pinned.yaml +98 -0
- package/docs/agents.md +16 -11
- package/docs/architecture.md +221 -0
- package/docs/bmad-synergy.md +11 -13
- package/docs/concepts.md +18 -108
- package/docs/examples.md +121 -80
- package/docs/getting-started.md +85 -147
- package/docs/how-it-works.md +25 -536
- package/docs/index.md +44 -27
- package/docs/skill-model.md +328 -0
- package/docs/troubleshooting.md +39 -0
- package/docs/verifying-a-skill.md +232 -0
- package/docs/why-skf.md +93 -0
- package/docs/workflows.md +119 -13
- package/package.json +25 -4
- package/src/README.md +23 -25
- package/src/forger/forge-tier.yaml +4 -2
- package/src/forger/preferences.yaml +7 -1
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +1 -1
- package/src/knowledge/ccc-bridge.md +16 -15
- package/src/knowledge/overview.md +11 -11
- package/src/knowledge/progressive-capability.md +3 -3
- package/src/knowledge/provenance-tracking.md +9 -3
- package/src/knowledge/qmd-registry.md +8 -8
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +16 -1
- package/src/knowledge/split-body-strategy.md +1 -1
- package/src/knowledge/version-paths.md +17 -12
- package/src/module-help.csv +18 -17
- package/src/module.yaml +4 -0
- package/src/shared/health-check.md +372 -0
- package/src/shared/references/feasibility-report-schema.md +86 -0
- package/src/shared/references/headless-gate-convention.md +62 -0
- package/src/shared/references/output-contract-schema.md +35 -0
- package/src/shared/references/pipeline-contracts.md +102 -0
- package/src/shared/scripts/skf-atomic-write.py +370 -0
- package/src/shared/scripts/skf-manifest-ops.py +236 -0
- package/src/shared/scripts/skf-preflight.py +164 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
- package/src/shared/scripts/skf-severity-classify.py +163 -0
- package/src/shared/scripts/skf-skill-inventory.py +210 -0
- package/src/shared/scripts/skf-structural-diff.py +257 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
- package/src/shared/scripts/skf-validate-output.py +247 -0
- package/src/skf-analyze-source/SKILL.md +57 -0
- package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
- package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
- package/src/skf-audit-skill/SKILL.md +59 -0
- package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
- package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
- package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-brief-skill/SKILL.md +53 -0
- package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
- package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
- package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
- package/src/skf-create-skill/SKILL.md +63 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
- package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
- package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
- package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
- package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
- package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
- package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
- package/src/skf-create-stack-skill/SKILL.md +64 -0
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
- package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
- package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
- package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
- package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
- package/src/skf-drop-skill/SKILL.md +57 -0
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
- package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-export-skill/SKILL.md +57 -0
- package/src/skf-export-skill/assets/managed-section-format.md +138 -0
- package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
- package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
- package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-forger/SKILL.md +110 -0
- package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
- package/src/skf-quick-skill/SKILL.md +56 -0
- package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
- package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-refine-architecture/SKILL.md +57 -0
- package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
- package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
- package/src/skf-rename-skill/SKILL.md +58 -0
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
- package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-setup/SKILL.md +55 -0
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
- package/src/skf-setup/steps-c/step-04-report.md +92 -0
- package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
- package/src/skf-test-skill/SKILL.md +59 -0
- package/src/skf-test-skill/references/migration-section-rules.md +114 -0
- package/src/skf-test-skill/references/scoring-rules.md +207 -0
- package/src/skf-test-skill/references/source-access-protocol.md +109 -0
- package/src/skf-test-skill/scripts/compute-score.py +310 -0
- package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
- package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
- package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
- package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
- package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
- package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
- package/src/skf-test-skill/templates/test-report-template.md +58 -0
- package/src/skf-update-skill/SKILL.md +58 -0
- package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
- package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
- package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
- package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
- package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
- package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
- package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
- package/src/skf-verify-stack/SKILL.md +60 -0
- package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
- package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
- package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
- package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
- package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
- package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
- package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
- package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ide-skills.js +216 -0
- package/tools/cli/lib/installer.js +29 -52
- package/tools/cli/lib/manifest.js +11 -5
- package/tools/cli/lib/platform-codes.yaml +223 -0
- package/tools/cli/lib/ui.js +76 -47
- package/tools/validate-docs-drift.js +193 -0
- package/src/agents/forger.agent.yaml +0 -114
- package/src/workflows/README.md +0 -174
- package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
- package/src/workflows/analyze-source/workflow.md +0 -61
- package/src/workflows/audit-skill/workflow.md +0 -64
- package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
- package/src/workflows/brief-skill/workflow.md +0 -58
- package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
- package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
- package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
- package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
- package/src/workflows/create-skill/workflow.md +0 -53
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
- package/src/workflows/drop-skill/workflow.md +0 -63
- package/src/workflows/export-skill/data/managed-section-format.md +0 -103
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
- package/src/workflows/export-skill/workflow.md +0 -58
- package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
- package/src/workflows/quick-skill/workflow.md +0 -58
- package/src/workflows/refine-architecture/workflow.md +0 -61
- package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/test-skill/data/scoring-rules.md +0 -123
- package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
- package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
- package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
- package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
- package/src/workflows/test-skill/templates/test-report-template.md +0 -28
- package/src/workflows/test-skill/workflow.md +0 -57
- package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
- package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
- package/src/workflows/update-skill/workflow.md +0 -56
- package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
- package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
- package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
- package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
- package/src/workflows/verify-stack/workflow.md +0 -61
- package/tools/cli/lib/compiler.js +0 -306
- package/tools/cli/lib/ide-commands.js +0 -244
- /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
- /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
- /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
- /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Integration Verification Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Rules for cross-referencing API surfaces between two skills to determine integration feasibility.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Verdict Definitions
|
|
10
|
+
|
|
11
|
+
Token set is defined canonically in `src/shared/references/feasibility-report-schema.md` — the table below restates the same set with this skill's evidence obligations. Tokens are case-sensitive (`Verified`, `Plausible`, `Risky`, `Blocked`); emitting any other token is a schema violation.
|
|
12
|
+
|
|
13
|
+
| Verdict | Meaning | Required Evidence |
|
|
14
|
+
|---------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
15
|
+
| **Verified** | APIs demonstrably connect AND docs cross-reference each other | Check 1 (language) passes with declared evidence; Check 3 (types) passes from cited `exports` signatures; **Check 4 (docs cross-reference) MUST pass with a literal substring/name citation** — without Check 4 evidence, cap at `Plausible`. Check 2 is best-effort only and cannot by itself promote to `Verified`. |
|
|
16
|
+
| **Plausible** | Checks pass but rely on inferred or indirect evidence | Language + type checks pass; Check 2 uses inferred `protocols_inferred`/`data_formats_inferred` (prose scan); Check 4 is weak or missing (no literal cross-reference). This is the mandatory cap whenever Check 4 does not surface a literal citation. |
|
|
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
|
+
| **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
|
+
|
|
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-03 §4 and is the producer obligation declared in the shared schema.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Cross-Reference Protocol
|
|
25
|
+
|
|
26
|
+
For each integration pair (Library A ↔ Library B):
|
|
27
|
+
|
|
28
|
+
### 1. Language Boundary Check
|
|
29
|
+
|
|
30
|
+
| A Language | B Language | Assessment |
|
|
31
|
+
|---------------------|----------------------------------------|----------------------------------------------------------------------------------|
|
|
32
|
+
| Same language | Same language | No boundary — direct API calls possible |
|
|
33
|
+
| TypeScript ↔ Rust | Requires FFI, IPC, or WebSocket bridge | Check if a bridge library exists in the stack (e.g., Tauri provides JS↔Rust IPC) |
|
|
34
|
+
| TypeScript ↔ Python | Requires REST/gRPC/WebSocket bridge | Typically not direct |
|
|
35
|
+
| Any ↔ C/C++ | FFI available in most languages | Check for bindings |
|
|
36
|
+
|
|
37
|
+
### 2. Protocol Compatibility Check
|
|
38
|
+
|
|
39
|
+
| A Protocol | B Protocol | Assessment |
|
|
40
|
+
|---------------------------|-------------------|-------------------------------------------------------------|
|
|
41
|
+
| In-process (same runtime) | In-process | Direct — function calls |
|
|
42
|
+
| HTTP/REST | HTTP/REST | Network bridge — compatible if API endpoints match |
|
|
43
|
+
| WebSocket | WebSocket | Real-time bridge — check message format compatibility |
|
|
44
|
+
| Shared filesystem | Shared filesystem | Async — check format compatibility |
|
|
45
|
+
| Embedded database | Embedded database | May conflict on lock files — check for multi-writer support |
|
|
46
|
+
|
|
47
|
+
### 3. Type Compatibility Check
|
|
48
|
+
|
|
49
|
+
- Extract the primary data types each library produces/consumes from the skill's export list
|
|
50
|
+
- Check: does Library A export a type that Library B accepts as input?
|
|
51
|
+
- Common patterns: JSON serialization (universal bridge), binary formats (check codec), shared schemas (strong compatibility)
|
|
52
|
+
|
|
53
|
+
### 4. Documentation Cross-Reference (required for `Verified`)
|
|
54
|
+
|
|
55
|
+
- Search Skill A's SKILL.md for a literal substring/name citation of Library B
|
|
56
|
+
- Search Skill B's SKILL.md for the reciprocal citation
|
|
57
|
+
- Accept literal names or aliases declared in that skill's metadata; do NOT accept paraphrase or fuzzy matches
|
|
58
|
+
- A pass requires at least one literal citation in at least one direction; the exact substring and location MUST be recorded in the evidence block
|
|
59
|
+
- If neither skill literally cites the other, Check 4 FAILS and the per-pair verdict MUST cap at `Plausible` (not `Verified`)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Verdict Evidence Format
|
|
64
|
+
|
|
65
|
+
Each verdict MUST include:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
**{Library A} ↔ {Library B}: {VERDICT}**
|
|
69
|
+
|
|
70
|
+
Evidence:
|
|
71
|
+
- A exports: `{function_name}({params}) → {return_type}` [from skill: {skill_name}]
|
|
72
|
+
- B accepts: `{function_name}({params})` [from skill: {skill_name}]
|
|
73
|
+
- Compatibility: {explanation}
|
|
74
|
+
- Language boundary: {same | bridge required via {mechanism}}
|
|
75
|
+
|
|
76
|
+
{If RISKY or BLOCKED:}
|
|
77
|
+
Recommendation: {actionable next step}
|
|
78
|
+
```
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-02-coverage.md'
|
|
3
|
+
reportTemplate: 'assets/feasibility-report-template.md'
|
|
4
|
+
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
5
|
+
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
6
|
+
outputFile: '{forge_data_folder}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
7
|
+
outputFileLatest: '{forge_data_folder}/feasibility-report-{project_slug}-latest.md'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Step 1: Initialize Verification
|
|
11
|
+
|
|
12
|
+
## STEP GOAL:
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Focus only on loading inputs, scanning skills, and creating the report skeleton — do not perform analysis
|
|
19
|
+
- Auto-proceed — halts only on validation errors
|
|
20
|
+
|
|
21
|
+
## MANDATORY SEQUENCE
|
|
22
|
+
|
|
23
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
24
|
+
|
|
25
|
+
### 1. Accept Input Documents
|
|
26
|
+
|
|
27
|
+
"**Verify Stack — Feasibility Analysis**
|
|
28
|
+
|
|
29
|
+
Please provide the following:
|
|
30
|
+
1. **Architecture document path** (REQUIRED) — your project's architecture doc
|
|
31
|
+
2. **PRD or vision document path** (OPTIONAL) — for requirements coverage analysis
|
|
32
|
+
3. **Previous feasibility report path** (OPTIONAL) — for delta comparison with a prior run (provide a backup copy)"
|
|
33
|
+
|
|
34
|
+
Wait for user input. **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".
|
|
35
|
+
|
|
36
|
+
**Validate architecture document:**
|
|
37
|
+
- Confirm the file exists and is readable
|
|
38
|
+
- If missing or unreadable → "Architecture document not found at `{path}`. Provide a valid path."
|
|
39
|
+
- HALT until a valid architecture document is provided
|
|
40
|
+
|
|
41
|
+
**Validate PRD document (if provided):**
|
|
42
|
+
- Confirm the file exists and is readable
|
|
43
|
+
- If missing → "PRD document not found at `{path}`. Proceeding without PRD — requirements pass will be skipped."
|
|
44
|
+
- Store PRD availability as `prdAvailable: true|false`
|
|
45
|
+
|
|
46
|
+
**Validate previous report (if provided):**
|
|
47
|
+
- Confirm the file exists and is readable
|
|
48
|
+
- **Collision check:** 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 until resolved.
|
|
49
|
+
- If missing → "Previous report not found at `{path}`. Proceeding without delta comparison."
|
|
50
|
+
- Store as `previousReport: {path}` (or empty string if not provided)
|
|
51
|
+
|
|
52
|
+
### 2. Scan Skills Folder
|
|
53
|
+
|
|
54
|
+
**Pre-flight — skills folder existence:**
|
|
55
|
+
- If `{skills_output_folder}` does not exist on disk: HALT with "**Cannot proceed.** `{skills_output_folder}` does not exist — run **[SF] Setup Forge** to initialize the forge, then generate skills with [CS] or [QS]."
|
|
56
|
+
- If `{skills_output_folder}` exists but is empty (no subdirectories at all): HALT with "**Cannot proceed.** `{skills_output_folder}` contains 0 skills. Generate skills with [CS] Create Skill or [QS] Quick Skill, then re-run [VS]."
|
|
57
|
+
|
|
58
|
+
Read the `{skills_output_folder}` directory. Skills use a version-nested directory structure (see `knowledge/version-paths.md`).
|
|
59
|
+
|
|
60
|
+
**Version-aware skill discovery:**
|
|
61
|
+
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}/`
|
|
62
|
+
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}/`
|
|
63
|
+
3. Fall back to flat path `{skills_output_folder}/{dir_name}/` for unmigrated skills
|
|
64
|
+
|
|
65
|
+
For each resolved skill package, check for the presence of `SKILL.md`, `metadata.json`, and `bmad-skill-manifest.yaml`. If `bmad-skill-manifest.yaml` is missing in the resolved package, log "Skipping `{dir_name}` — missing bmad-skill-manifest.yaml" and exclude from inventory (do not spawn a subagent).
|
|
66
|
+
|
|
67
|
+
**Non-symlink `active` check:** When resolving via the `active` symlink pattern (case 2 above), perform an explicit `is_symlink` check on `{skills_output_folder}/{dir_name}/active`. If the path exists but is NOT a symlink, log "Skipping `{dir_name}` — `active` is not a symlink (repair with [SKF-update-skill])" and treat as missing.
|
|
68
|
+
|
|
69
|
+
**Orphan-versions detection:** For any `{skills_output_folder}/{dir_name}/` that contains subdirectories matching semver (`^\d+\.\d+\.\d+`) but has no `active` symlink at all, emit: "**Error:** Skill `{dir_name}` has versions `{list_of_version_dirs}` but no `active` symlink — run [SKF-update-skill] to repair before re-running [VS]." Exclude the skill from inventory; count it toward the failure budget for the run summary.
|
|
70
|
+
|
|
71
|
+
<!-- Subagent delegation: read metadata.json files in parallel, return compact JSON -->
|
|
72
|
+
|
|
73
|
+
**Read all metadata.json files in parallel using subagents.** Launch up to **8 subagents concurrently** (batch larger inventories in rounds of 8 — the 8-way cap keeps the aggregate token window for the parent manageable while still parallelizing most typical stack sizes; tune in a future minor if inventories routinely exceed ~40 skills). Each subagent receives one resolved skill package path and MUST:
|
|
74
|
+
1. Read `{skill_package}/metadata.json`
|
|
75
|
+
2. ONLY return this compact JSON — no prose, no extra commentary:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"skill_name": "...",
|
|
80
|
+
"language": "...",
|
|
81
|
+
"confidence_tier": "...",
|
|
82
|
+
"exports_documented": 0,
|
|
83
|
+
"source_repo": "...",
|
|
84
|
+
"source_root": "..."
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Parent collects all subagent JSON summaries. Fields map directly from metadata.json:
|
|
89
|
+
- `skill_name` ← `name`
|
|
90
|
+
- `language` ← `language`
|
|
91
|
+
- `confidence_tier` ← `confidence_tier`
|
|
92
|
+
- `exports_documented` ← `stats.exports_documented`
|
|
93
|
+
- `source_repo` ← `source_repo` (or empty string if absent)
|
|
94
|
+
- `source_root` ← `source_root` (or empty string if absent)
|
|
95
|
+
|
|
96
|
+
**Subagent JSON schema validation:** For each subagent response, require keys `skill_name`, `language`, and an integer `exports_documented`. Wrap each JSON parse in try/catch. On parse failure or missing required key, log "Skipping `{dir_name}` — metadata.json unparseable (skill may be under active modification)" and exclude from the inventory. If more than **20%** (the failure-budget threshold — chosen so a single malformed skill in a small 3-5 skill inventory does not trip the halt, while larger inventories still halt before evidence quality collapses) of subagent calls fail schema validation, HALT the workflow with: "Inventory scan unreliable — {failed_count}/{total_count} skills returned malformed metadata. Re-run [VS] after skills stabilize."
|
|
97
|
+
|
|
98
|
+
**Capture mtime:** For each accepted skill, also record `metadata.json`'s mtime (via `stat`) into the inventory as `metadata_mtime`. Step-03 will re-verify this to detect mid-run modifications.
|
|
99
|
+
|
|
100
|
+
**metadata_schema_version check:** For each accepted skill, read `metadata_schema_version` from `metadata.json`. If missing or below minimum (`1.0`), log "Skipping `{dir_name}` — metadata_schema_version `{value}` below minimum `1.0`. Re-run [SKF-update-skill] to migrate." and exclude from the inventory.
|
|
101
|
+
|
|
102
|
+
**Build a skill inventory** as an internal list of all loaded skills with the fields above.
|
|
103
|
+
|
|
104
|
+
**If a resolved skill package lacks SKILL.md or metadata.json:**
|
|
105
|
+
- Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
|
|
106
|
+
- Do not include in inventory
|
|
107
|
+
|
|
108
|
+
### 3. Validate Minimum Requirements
|
|
109
|
+
|
|
110
|
+
**Check skill count:**
|
|
111
|
+
- At least 2 valid skills must exist (a stack requires multiple libraries)
|
|
112
|
+
- 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]."
|
|
113
|
+
- HALT workflow
|
|
114
|
+
|
|
115
|
+
**Check forge_data_folder:**
|
|
116
|
+
- Verify `forge_data_folder` was resolved from config.yaml and is non-empty
|
|
117
|
+
- If undefined or empty → "**Cannot proceed.** `forge_data_folder` is not configured in config.yaml. Re-run [SF] Setup Forge to initialize."
|
|
118
|
+
- HALT workflow
|
|
119
|
+
|
|
120
|
+
**Check architecture document:**
|
|
121
|
+
- Confirm it was loaded successfully in section 1
|
|
122
|
+
- If not → HALT with error (should not reach here if section 1 validation passed)
|
|
123
|
+
|
|
124
|
+
### 4. Create Feasibility Report
|
|
125
|
+
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
**Compute filename variables:**
|
|
129
|
+
- `project_slug`: slugify `project_name` (lowercase, hyphens only, no unicode, no whitespace)
|
|
130
|
+
- `timestamp`: UTC `YYYYMMDD-HHmmss` captured at step-01 start
|
|
131
|
+
- `outputFile` resolves to `{forge_data_folder}/feasibility-report-{project_slug}-{timestamp}.md`
|
|
132
|
+
- `outputFileLatest` resolves to `{forge_data_folder}/feasibility-report-{project_slug}-latest.md` (a copy, not a symlink — per schema)
|
|
133
|
+
|
|
134
|
+
**Load** `{reportTemplate}` and stage the initial content.
|
|
135
|
+
|
|
136
|
+
**Populate frontmatter (per shared schema — required keys):**
|
|
137
|
+
- `schemaVersion: "1.0"`
|
|
138
|
+
- `reportType: feasibility`
|
|
139
|
+
- `projectName: "{project_name}"`
|
|
140
|
+
- `projectSlug: "{project_slug}"`
|
|
141
|
+
- `generatedAt: "{ISO-8601 UTC}"`
|
|
142
|
+
- `generatedBy: skf-verify-stack`
|
|
143
|
+
- `overallVerdict: "CONDITIONALLY_FEASIBLE"` (provisional until step-05 finalizes)
|
|
144
|
+
- `coveragePercentage: 0`
|
|
145
|
+
- `pairsVerified: 0`, `pairsPlausible: 0`, `pairsRisky: 0`, `pairsBlocked: 0`
|
|
146
|
+
- `recommendationCount: 0`
|
|
147
|
+
- `prdAvailable: true|false` (from section 1 validation)
|
|
148
|
+
|
|
149
|
+
**Populate producer-local bookkeeping keys (not part of the consumer contract):**
|
|
150
|
+
- `architectureDoc`, `prdDoc` (or "none"), `previousReport` (or empty string)
|
|
151
|
+
- `skillsAnalyzed: {count}`
|
|
152
|
+
- `stepsCompleted: ['step-01-init']`
|
|
153
|
+
|
|
154
|
+
**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.
|
|
155
|
+
|
|
156
|
+
### 5. Display Initialization Summary
|
|
157
|
+
|
|
158
|
+
"**Stack Verification Initialized**
|
|
159
|
+
|
|
160
|
+
| Field | Value |
|
|
161
|
+
|-------|-------|
|
|
162
|
+
| **Skills Loaded** | {count} |
|
|
163
|
+
| **Architecture Doc** | {architecture_doc} |
|
|
164
|
+
| **PRD Document** | {prd_doc or 'Not provided — requirements pass will be skipped'} |
|
|
165
|
+
| **Previous Report** | {previousReport or 'Not provided — no delta comparison'} |
|
|
166
|
+
|
|
167
|
+
**Skill Inventory:**
|
|
168
|
+
|
|
169
|
+
| Skill | Language | Tier | Exports |
|
|
170
|
+
|-------|----------|------|---------|
|
|
171
|
+
| {skill_name} | {language} | {confidence_tier} | {exports_documented} |
|
|
172
|
+
|
|
173
|
+
**Proceeding to coverage analysis...**"
|
|
174
|
+
|
|
175
|
+
### 6. Auto-Proceed to Next Step
|
|
176
|
+
|
|
177
|
+
Load, read the full file and then execute `{nextStepFile}`.
|
|
178
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-02-coverage'
|
|
3
|
-
description: 'Pass 1 — check that a generated skill exists for every technology referenced in the architecture document'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-03-integrations.md'
|
|
6
|
-
coveragePatternsData: '
|
|
7
|
-
|
|
3
|
+
coveragePatternsData: 'references/coverage-patterns.md'
|
|
4
|
+
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
5
|
+
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
6
|
+
outputFile: '{forge_data_folder}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
7
|
+
outputFileLatest: '{forge_data_folder}/feasibility-report-{project_slug}-latest.md'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Step 2: Technology Coverage Analysis
|
|
@@ -13,41 +13,10 @@ outputFile: '{forge_data_folder}/feasibility-report-{project_name}.md'
|
|
|
13
13
|
|
|
14
14
|
Verify that a generated skill exists for every technology, library, or framework referenced in the architecture document. Produce a coverage matrix showing which technologies are covered and which are missing. Detect extra skills not referenced in the architecture.
|
|
15
15
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### Universal Rules:
|
|
19
|
-
|
|
20
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
21
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
22
|
-
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
23
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
24
|
-
|
|
25
|
-
### Role Reinforcement:
|
|
26
|
-
|
|
27
|
-
- ✅ You are a stack verification analyst performing coverage analysis
|
|
28
|
-
- ✅ Every technology reference must trace to actual text in the architecture document
|
|
29
|
-
- ✅ Matching must be precise — do not guess or infer technologies not explicitly mentioned
|
|
30
|
-
|
|
31
|
-
### Step-Specific Rules:
|
|
32
|
-
|
|
33
|
-
- 🎯 Focus ONLY on technology-to-skill coverage mapping
|
|
34
|
-
- 🚫 FORBIDDEN to analyze API surfaces or integration compatibility — that is Step 03
|
|
35
|
-
- 🚫 FORBIDDEN to evaluate requirements — that is Step 04
|
|
36
|
-
- 💬 Coverage verdicts must be binary: Covered or Missing — no ambiguity
|
|
37
|
-
|
|
38
|
-
## EXECUTION PROTOCOLS:
|
|
39
|
-
|
|
40
|
-
- 🎯 Extract technology references from architecture document using {coveragePatternsData}
|
|
41
|
-
- 💾 Build and display coverage matrix with Covered/Missing verdicts
|
|
42
|
-
- 📖 Append Coverage Matrix section to {outputFile}
|
|
43
|
-
- 🚫 Only coverage mapping — no integration analysis, no requirements checking
|
|
16
|
+
## Rules
|
|
44
17
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- Available: Architecture document content, skill inventory from Step 01, coverage patterns data
|
|
48
|
-
- Focus: Technology-to-skill matching only
|
|
49
|
-
- Limits: Do not read SKILL.md in detail — use metadata.json for name and source_repo matching only
|
|
50
|
-
- Dependencies: Step 01 must have loaded skill inventory and validated architecture document
|
|
18
|
+
- Focus only on technology-to-skill coverage mapping — do not analyze API surfaces (Step 03) or requirements (Step 04)
|
|
19
|
+
- Coverage verdicts must be binary: Covered or Missing
|
|
51
20
|
|
|
52
21
|
## MANDATORY SEQUENCE
|
|
53
22
|
|
|
@@ -86,7 +55,12 @@ For each referenced technology in the list:
|
|
|
86
55
|
**Check if a matching skill exists** in the skill inventory from Step 01.
|
|
87
56
|
- Match by skill name (case-insensitive)
|
|
88
57
|
- Match by alias from {coveragePatternsData}
|
|
89
|
-
- Match by `source_repo` or `source_root` field in metadata.json if skill name differs from technology name
|
|
58
|
+
- Match by `source_repo` or `source_root` field in metadata.json if skill name differs from technology name, using this algorithm:
|
|
59
|
+
1. For `source_repo`: extract the basename (last URL segment after the final `/`), strip any trailing `.git` suffix, lowercase
|
|
60
|
+
2. For `source_root`: take the last path segment (after the final `/` or `\`), lowercase
|
|
61
|
+
3. Lowercase each architecture tech token
|
|
62
|
+
4. Compare the resulting basenames/segments against the tech tokens via case-insensitive equality (no substring/fuzzy matching)
|
|
63
|
+
5. A match on either `source_repo` basename or `source_root` last segment counts as a hit
|
|
90
64
|
|
|
91
65
|
**Assign verdict:**
|
|
92
66
|
- **Covered** — a matching skill exists in the inventory
|
|
@@ -98,11 +72,15 @@ Build the coverage matrix as a structured table.
|
|
|
98
72
|
|
|
99
73
|
Check if any skills in the inventory are NOT referenced in the architecture document.
|
|
100
74
|
|
|
75
|
+
**Subdivide into two categories (both informational — not errors):**
|
|
76
|
+
- **Extra (unreferenced)** — The skill's `source_repo` / `source_root` resolves cleanly (both non-empty and well-formed), but no architecture document tech token matches it.
|
|
77
|
+
- **Orphan (source_repo unresolvable)** — The skill's `source_repo` is empty, malformed (not a valid URL-like string), OR its basename cannot be deterministically extracted. Cross-reference against architecture tokens is not possible for this skill.
|
|
78
|
+
|
|
101
79
|
**For each extra skill:**
|
|
102
|
-
-
|
|
103
|
-
-
|
|
80
|
+
- If `source_repo` resolves → mark as **Extra (unreferenced)**, note: "Skill `{skill_name}` exists and has a resolvable `source_repo`, but no architecture reference was found."
|
|
81
|
+
- If `source_repo` does not resolve → mark as **Orphan (source_repo unresolvable)**, note: "Skill `{skill_name}` has no resolvable `source_repo` — cannot cross-reference against architecture. Re-run [CS] or update the skill's metadata."
|
|
104
82
|
|
|
105
|
-
Extra skills are informational only. They do not affect the coverage verdict.
|
|
83
|
+
Extra and Orphan skills are informational only. They do not affect the coverage verdict.
|
|
106
84
|
|
|
107
85
|
### 5. Display Coverage Results
|
|
108
86
|
|
|
@@ -129,16 +107,17 @@ Extra skills are informational only. They do not affect the coverage verdict.
|
|
|
129
107
|
|
|
130
108
|
### 6. Append to Report
|
|
131
109
|
|
|
132
|
-
Write the **Coverage
|
|
110
|
+
Write the **Coverage Analysis** section to `{outputFile}` (see `{feasibilitySchemaRef}` — section headings are fixed and ordered: `## Executive Summary`, `## Coverage Analysis`, `## Integration Verdicts`, `## Recommendations`, `## Evidence Sources`):
|
|
133
111
|
- Include the full coverage table
|
|
134
112
|
- Include coverage percentage
|
|
135
113
|
- Include missing skill recommendations
|
|
136
|
-
- Include
|
|
137
|
-
- Update frontmatter: append `'step-02-coverage'` to `stepsCompleted
|
|
114
|
+
- Include the Extra (unreferenced) and Orphan (source_repo unresolvable) subdivisions from section 4
|
|
115
|
+
- Update frontmatter: append `'step-02-coverage'` to `stepsCompleted`; set `coveragePercentage` (integer 0..100)
|
|
116
|
+
- Pipe the updated full content through `python3 {atomicWriteScript} write --target {outputFile}` and again with `--target {outputFileLatest}`
|
|
138
117
|
|
|
139
118
|
### 7. Auto-Proceed to Next Step
|
|
140
119
|
|
|
141
|
-
{IF
|
|
120
|
+
{IF coveragePercentage is 0%:}
|
|
142
121
|
"**⚠️ 0% coverage — no matching skills found for any referenced technology.** All subsequent analysis (integration, requirements) will be vacuous and produce empty tables.
|
|
143
122
|
|
|
144
123
|
**Recommended:** Generate skills with [CS] or [QS] for your architecture technologies, then re-run [VS].
|
|
@@ -150,32 +129,8 @@ Write the **Coverage Matrix** section to `{outputFile}`:
|
|
|
150
129
|
|
|
151
130
|
Load, read the full file and then execute `{nextStepFile}`.
|
|
152
131
|
|
|
153
|
-
{IF
|
|
132
|
+
{IF coveragePercentage is not 0:}
|
|
154
133
|
"**Proceeding to integration analysis...**"
|
|
155
134
|
|
|
156
135
|
Load, read the full file and then execute `{nextStepFile}`.
|
|
157
136
|
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
161
|
-
|
|
162
|
-
### ✅ SUCCESS:
|
|
163
|
-
|
|
164
|
-
- Coverage patterns loaded from {coveragePatternsData}
|
|
165
|
-
- All technology references extracted from architecture document with section citations
|
|
166
|
-
- Every referenced technology cross-referenced against skill inventory
|
|
167
|
-
- Coverage matrix displayed with binary Covered/Missing verdicts
|
|
168
|
-
- Extra skills detected and reported as informational
|
|
169
|
-
- Missing skills have actionable recommendations (run [CS] or [QS])
|
|
170
|
-
- Coverage Matrix section appended to {outputFile}
|
|
171
|
-
- Auto-proceeded to step 03
|
|
172
|
-
|
|
173
|
-
### ❌ SYSTEM FAILURE:
|
|
174
|
-
|
|
175
|
-
- Inventing technologies not mentioned in the architecture document
|
|
176
|
-
- Ambiguous verdicts (anything other than Covered or Missing)
|
|
177
|
-
- Analyzing API surfaces or skill content in detail (that is Step 03)
|
|
178
|
-
- Not providing actionable recommendations for missing skills
|
|
179
|
-
- Hardcoded paths instead of frontmatter variables
|
|
180
|
-
|
|
181
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-04-requirements.md'
|
|
3
|
+
integrationRulesData: 'references/integration-verification-rules.md'
|
|
4
|
+
coveragePatternsData: 'references/coverage-patterns.md'
|
|
5
|
+
feasibilitySchemaRef: 'src/shared/references/feasibility-report-schema.md'
|
|
6
|
+
atomicWriteScript: '{project-root}/src/shared/scripts/skf-atomic-write.py'
|
|
7
|
+
outputFile: '{forge_data_folder}/feasibility-report-{project_slug}-{timestamp}.md'
|
|
8
|
+
outputFileLatest: '{forge_data_folder}/feasibility-report-{project_slug}-latest.md'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Step 3: Integration Verification
|
|
12
|
+
|
|
13
|
+
## STEP GOAL:
|
|
14
|
+
|
|
15
|
+
Cross-reference API surfaces between library pairs that the architecture document claims work together. For each integration pair, verify language compatibility, protocol alignment, type compatibility, and documentation cross-references. Produce an evidence-backed verdict for each integration.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Focus only on integration pair verification using skill API surfaces
|
|
20
|
+
- Do not evaluate requirements coverage (Step 04) or parse Mermaid diagrams
|
|
21
|
+
- Every verdict must include evidence citations from the skills
|
|
22
|
+
|
|
23
|
+
## MANDATORY SEQUENCE
|
|
24
|
+
|
|
25
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
26
|
+
|
|
27
|
+
### 1. Load Integration Verification Rules
|
|
28
|
+
|
|
29
|
+
Load `{integrationRulesData}` for the cross-reference verification protocol.
|
|
30
|
+
|
|
31
|
+
Extract: verification checks (language boundary, protocol compatibility, type compatibility, documentation cross-reference), verdict criteria, and evidence requirements.
|
|
32
|
+
|
|
33
|
+
### 2. Extract Integration Claims
|
|
34
|
+
|
|
35
|
+
**Source preference:** If a stack skill assembled by `skf-create-stack-skill` is present in the inventory and its manifest (`bmad-skill-manifest.yaml` or its `metadata.json`) declares `integration_patterns`, use THAT as the primary source of integration claims. Record `source: stack manifest` on each resulting pair. Fall back to prose co-mention (below) only when no such manifest is available, and record `source: prose co-mention` on those pairs.
|
|
36
|
+
|
|
37
|
+
Parse the architecture document for statements describing two or more technologies working together.
|
|
38
|
+
|
|
39
|
+
**Detection method — prose-based co-mention analysis (fallback only):**
|
|
40
|
+
- Identify sentences or paragraphs where two or more technology names appear together
|
|
41
|
+
- Look for integration verbs: "connects to", "communicates with", "wraps", "extends", "consumes", "produces", "bridges", "integrates with", "sits between"
|
|
42
|
+
- Look for data flow descriptions: "{A} sends data to {B}", "{A} results are consumed by {B}"
|
|
43
|
+
- Look for layer boundary descriptions: "{A} at the API layer connects to {B} at the data layer"
|
|
44
|
+
|
|
45
|
+
**CRITICAL — Mermaid Diagram Handling:** See `{coveragePatternsData}` → "Mermaid Diagram Handling" for the canonical rule (single source of truth). Summary: do NOT parse Mermaid diagram syntax for co-mention detection; use only prose text.
|
|
46
|
+
|
|
47
|
+
**Build integration pairs list:**
|
|
48
|
+
- Each pair: `{library_a, library_b, architectural_context}`
|
|
49
|
+
- `architectural_context`: the quoted text or paraphrased description of their relationship
|
|
50
|
+
|
|
51
|
+
**Filter:** Only include pairs where BOTH libraries have a corresponding skill (Covered in Step 02). Skip pairs involving Missing skills — they cannot be verified.
|
|
52
|
+
|
|
53
|
+
### 3. Load Skill API Surfaces
|
|
54
|
+
|
|
55
|
+
<!-- Subagent delegation: read SKILL.md files in parallel, return compact JSON -->
|
|
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-01 §2; keeps aggregate token window manageable while still parallelizing typical stack sizes). Each subagent receives one skill's SKILL.md path and MUST:
|
|
58
|
+
1. Read the SKILL.md file
|
|
59
|
+
2. Extract the API surface
|
|
60
|
+
3. ONLY return this compact JSON — no prose, no extra commentary:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"skill_name": "...",
|
|
65
|
+
"language": "...",
|
|
66
|
+
"exports": ["functionName(params): ReturnType", "..."],
|
|
67
|
+
"protocols_inferred": ["HTTP", "gRPC", "WebSocket", "message queue", "file I/O", "IPC"],
|
|
68
|
+
"data_formats_inferred": ["JSON", "protobuf", "CSV", "binary", "streaming"]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Extraction rules for subagents:**
|
|
73
|
+
- `skill_name`, `language`: mirror the skill's metadata fields
|
|
74
|
+
- `exports`: exported functions with signatures, exported types/interfaces/classes (extracted from SKILL.md prose)
|
|
75
|
+
- `protocols_inferred`: best-effort prose scan — protocol tokens mentioned in SKILL.md descriptions/examples. NOT a declared field in `metadata.json`
|
|
76
|
+
- `data_formats_inferred`: best-effort prose scan — format tokens mentioned in SKILL.md descriptions/examples. NOT a declared field in `metadata.json`
|
|
77
|
+
- If a field has no matches, return an empty array `[]`
|
|
78
|
+
|
|
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
|
+
|
|
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-01 §2; see the justification there) of subagent calls return malformed JSON.
|
|
82
|
+
|
|
83
|
+
**Parent collects all subagent JSON summaries.** Do not load full SKILL.md content into parent context.
|
|
84
|
+
|
|
85
|
+
**From metadata.json (read in parent — lightweight), also extract:**
|
|
86
|
+
- `language` — primary programming language (authoritative — overrides subagent `language` if they disagree)
|
|
87
|
+
- `exports` — export names array (populated for individual skills; empty for stack skills)
|
|
88
|
+
- `stats.exports_documented` — export count
|
|
89
|
+
- `confidence_tier` — extraction confidence level
|
|
90
|
+
|
|
91
|
+
**mtime re-verification:** Re-stat each `metadata.json` and compare against the mtime captured in step-01. If any mtime moved during the run, abort any pair involving that skill with rationale "skill modified mid-run — re-run [VS]".
|
|
92
|
+
|
|
93
|
+
Store collected API surface summaries for cross-referencing.
|
|
94
|
+
|
|
95
|
+
**Integration-evidence source preference:** If the stack was assembled by `skf-create-stack-skill` and a stack manifest (e.g., `integration_patterns` block in the stack skill's `bmad-skill-manifest.yaml` or `metadata.json`) is present in the inventory, use that as the authoritative integration source and cite `source: stack manifest` in each verdict. Fall back to prose co-mention only when no manifest is available, and cite `source: prose co-mention`.
|
|
96
|
+
|
|
97
|
+
### 4. Cross-Reference Each Integration Pair
|
|
98
|
+
|
|
99
|
+
For each integration pair `{library_a, library_b}`, apply the verification protocol from `{integrationRulesData}`:
|
|
100
|
+
|
|
101
|
+
**Check 1 — Language Boundary:**
|
|
102
|
+
- Same language → compatible
|
|
103
|
+
- Different languages → check for FFI, IPC, or network protocol bridge
|
|
104
|
+
- If no bridge mechanism documented → flag as risk
|
|
105
|
+
|
|
106
|
+
**Check 2 — Protocol Compatibility (best-effort prose scan):**
|
|
107
|
+
- Uses only the `protocols_inferred` / `data_formats_inferred` lists surfaced by the subagent prose scan — these are NOT declared metadata fields
|
|
108
|
+
- Both prose-scanned lists share a protocol token → treat as inferred compatibility (cap verdict at `Plausible`)
|
|
109
|
+
- Complementary tokens (e.g., "HTTP client" in one, "HTTP server" in the other) → inferred compatibility (cap at `Plausible`)
|
|
110
|
+
- Neither skill surfaces any protocol token, or tokens appear to conflict with no adapter mentioned → flag as risk
|
|
111
|
+
- Do NOT assert that protocols come from a declared schema field; when prose evidence is all that's available, the per-pair verdict MUST cap at `Plausible`
|
|
112
|
+
|
|
113
|
+
**Check 3 — Type Compatibility:**
|
|
114
|
+
- Shared types or compatible serialization formats (cited from `exports` signatures) → compatible
|
|
115
|
+
- Incompatible type systems with no conversion layer → flag as risk
|
|
116
|
+
|
|
117
|
+
**Check 4 — Documentation Cross-Reference (REQUIRED for `Verified`):**
|
|
118
|
+
- Search Skill A's SKILL.md for a literal substring/name citation of Skill B's library name (or an explicit alias declared in that skill's metadata)
|
|
119
|
+
- Search Skill B's SKILL.md for the reciprocal citation
|
|
120
|
+
- If a literal citation is found in at least one direction → Check 4 PASSES; record the exact cited substring and its location as evidence
|
|
121
|
+
- If neither skill literally cites the other → Check 4 FAILS (weak/missing evidence); per-pair verdict MUST be capped at `Plausible` regardless of Checks 1–3 outcomes
|
|
122
|
+
|
|
123
|
+
**Assign verdict per pair (per `src/shared/references/feasibility-report-schema.md`):**
|
|
124
|
+
- **Verified** — Checks 1, 3 pass with declared evidence AND Check 4 passes with a literal substring/name citation recorded in the evidence block. Check 2 is best-effort only; it cannot by itself promote a pair to `Verified`.
|
|
125
|
+
- **Plausible** — Checks pass, but at least one relies on inferred evidence (e.g., Check 2 prose scan) OR Check 4 is weak/missing. This is the cap whenever Check 4 fails.
|
|
126
|
+
- **Risky** — At least one check flags an incompatibility that a workaround may resolve (bridge layer, adapter, serialization shim).
|
|
127
|
+
- **Blocked** — Fundamental incompatibility: language barrier with no bridge documented anywhere in the inventory, or type/protocol mismatch with no adapter mentioned.
|
|
128
|
+
|
|
129
|
+
**Each verdict MUST include:**
|
|
130
|
+
- Which checks passed and which flagged
|
|
131
|
+
- Evidence citations: specific exports, types, or literal substrings from the skills
|
|
132
|
+
- `source: stack manifest` or `source: prose co-mention` tag (per section 3)
|
|
133
|
+
- For `Verified`: the exact Check 4 literal citation (e.g., `"see also: {lib_b}"` quoted from Skill A's SKILL.md, line N)
|
|
134
|
+
- **Tier annotation:** For each contributing skill, append `(evidence from Tier {n} skill)` citing that skill's `confidence_tier` (e.g., `(evidence from Tier 1 skill)`). This lets reviewers weigh evidence strength by extraction confidence.
|
|
135
|
+
|
|
136
|
+
**Cycle detection (after all pairs evaluated):** Build a directed pair graph where an edge `A → B` exists when A cites B via Check 4. Run cycle detection (DFS with visited + recursion stack). For each cycle found, append a synthetic row to the verdict table with verdict `Risky` and rationale "circular integration dependency detected: `{A → B → C → A}`". Do not otherwise modify the individual pair verdicts.
|
|
137
|
+
|
|
138
|
+
### 5. Display Integration Results
|
|
139
|
+
|
|
140
|
+
"**Pass 2: Integration Verification**
|
|
141
|
+
|
|
142
|
+
| Library A | Library B | Context | Source | Verdict | Evidence |
|
|
143
|
+
|-----------|-----------|---------|--------|---------|----------|
|
|
144
|
+
| {lib_a} | {lib_b} | {brief context} | {stack manifest / prose co-mention} | {Verified/Plausible/Risky/Blocked} | {key evidence, including Check 4 literal citation if Verified} |
|
|
145
|
+
|
|
146
|
+
**Summary:** {verified_count} Verified, {plausible_count} Plausible, {risky_count} Risky, {blocked_count} Blocked
|
|
147
|
+
|
|
148
|
+
{IF zero integration pairs found:}
|
|
149
|
+
**No integration claims detected in the architecture document prose.** Ensure your architecture document describes relationships between technologies in text form (not exclusively in Mermaid diagrams). Coverage-only analysis was performed.
|
|
150
|
+
|
|
151
|
+
{IF any Risky:}
|
|
152
|
+
**Risky Integrations — Recommendations:**
|
|
153
|
+
{For each risky pair:}
|
|
154
|
+
- `{lib_a}` ↔ `{lib_b}`: {specific concern}. **Recommendation:** {prescriptive action}
|
|
155
|
+
|
|
156
|
+
{IF any Blocked:}
|
|
157
|
+
**Blocked Integrations — Action Required:**
|
|
158
|
+
{For each blocked pair:}
|
|
159
|
+
- `{lib_a}` ↔ `{lib_b}`: {fundamental incompatibility}. **Recommendation:** {prescriptive action}"
|
|
160
|
+
|
|
161
|
+
### 6. Append to Report
|
|
162
|
+
|
|
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
|
+
- Emit the canonical `| lib_a | lib_b | verdict | rationale |` table first (verdict tokens MUST be one of `Verified`, `Plausible`, `Risky`, `Blocked` — case-sensitive)
|
|
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-05 H6, or the explicit no-candidate notice)
|
|
167
|
+
- Update frontmatter: append `'step-03-integrations'` to `stepsCompleted`; set `pairsVerified`, `pairsPlausible`, `pairsRisky`, `pairsBlocked` counts
|
|
168
|
+
- Pipe the updated full content through `python3 {atomicWriteScript} write --target {outputFile}` and again with `--target {outputFileLatest}`
|
|
169
|
+
|
|
170
|
+
### 7. Auto-Proceed to Next Step
|
|
171
|
+
|
|
172
|
+
**Early halt guard:** If ALL integration pairs are Blocked, present: "**All integrations are Blocked** — fundamental incompatibilities detected across all library pairs. Remaining analysis will produce limited value. **[X] Halt workflow (recommended)** | **[C] Continue anyway**" — wait for user input. If X: halt with: "**Workflow halted — all integrations blocked.** Integration Verdicts saved to `{outputFile}`. Run **[VS]** after applying architectural changes. **Blocked integrations:** {list each blocked pair with reason}." If C: continue.
|
|
173
|
+
|
|
174
|
+
{IF NOT halted (user selected C, or early halt guard did not trigger):}
|
|
175
|
+
|
|
176
|
+
"**Proceeding to requirements verification...**"
|
|
177
|
+
|
|
178
|
+
Load, read the full file and then execute `{nextStepFile}`.
|
|
179
|
+
|