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
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'step-03-coverage-check'
|
|
3
|
-
description: 'Compare documented exports in SKILL.md against actual source API surface'
|
|
4
|
-
|
|
5
|
-
nextStepFile: './step-04-coherence-check.md'
|
|
6
|
-
outputFile: '{forge_data_folder}/{skill_name}/test-report-{skill_name}.md'
|
|
7
|
-
scoringRulesFile: '../data/scoring-rules.md'
|
|
8
|
-
sourceAccessProtocol: '../data/source-access-protocol.md'
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Step 3: Coverage Check
|
|
12
|
-
|
|
13
|
-
## STEP GOAL:
|
|
14
|
-
|
|
15
|
-
Compare the exports, functions, classes, types, and interfaces documented in SKILL.md against the actual source code API surface. Identify missing documentation, undocumented exports, and signature mismatches. Analysis depth scales with forge tier.
|
|
16
|
-
|
|
17
|
-
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
18
|
-
|
|
19
|
-
### Universal Rules:
|
|
20
|
-
|
|
21
|
-
- 🛑 NEVER fabricate findings — every coverage result must trace to actual source code or SKILL.md content
|
|
22
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
23
|
-
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
24
|
-
- ⚙️ 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
|
|
25
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
26
|
-
|
|
27
|
-
### Role Reinforcement:
|
|
28
|
-
|
|
29
|
-
- ✅ You are a skill auditor in Ferris's Audit mode — zero hallucination
|
|
30
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
31
|
-
- ✅ Every finding must include file:line citations from source code
|
|
32
|
-
- ✅ Report what IS documented vs what SHOULD BE documented — facts only
|
|
33
|
-
|
|
34
|
-
### Step-Specific Rules:
|
|
35
|
-
|
|
36
|
-
- 🎯 Use subprocess optimization for per-file AST analysis when available
|
|
37
|
-
- 💬 Subprocess returns structured findings only, not full file contents
|
|
38
|
-
- 🚫 DO NOT BE LAZY — For EACH source file, launch a subprocess for deep analysis
|
|
39
|
-
- ⚙️ If subprocess unavailable, perform analysis in main thread sequentially
|
|
40
|
-
- 📋 Coverage depth must match the detected forge tier
|
|
41
|
-
|
|
42
|
-
## EXECUTION PROTOCOLS:
|
|
43
|
-
|
|
44
|
-
- 🎯 Load SKILL.md exports section and source files
|
|
45
|
-
- 💾 Append Coverage Analysis section to {outputFile}
|
|
46
|
-
- 📖 Update stepsCompleted in {outputFile}
|
|
47
|
-
- 🚫 FORBIDDEN to proceed without completing all source file analysis
|
|
48
|
-
|
|
49
|
-
## CONTEXT BOUNDARIES:
|
|
50
|
-
|
|
51
|
-
- Available: SKILL.md, source files, forge tier, test mode from step 02
|
|
52
|
-
- Focus: Export coverage comparison only — coherence is step 04
|
|
53
|
-
- Limits: Do NOT validate cross-references or integration patterns (that's coherence)
|
|
54
|
-
- Dependencies: step-02 must have set testMode and reported forge tier
|
|
55
|
-
|
|
56
|
-
## MANDATORY SEQUENCE
|
|
57
|
-
|
|
58
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
59
|
-
|
|
60
|
-
### 0. Check for Docs-Only Mode
|
|
61
|
-
|
|
62
|
-
**If metadata.json indicates `confidence_tier: "Quick"` and all SKILL.md citations are `[EXT:...]` format (docs-only skill):**
|
|
63
|
-
|
|
64
|
-
Coverage scoring adapts: instead of comparing SKILL.md against source code exports, compare SKILL.md documented items against themselves for internal completeness (every documented function has a description, parameters, and return type). Score based on documentation completeness rather than source coverage. Set `docs_only_mode: true` in context for step-05 scoring.
|
|
65
|
-
|
|
66
|
-
"**Docs-only skill detected.** Coverage check evaluates documentation completeness rather than source code coverage."
|
|
67
|
-
|
|
68
|
-
**If source-based skill:** Continue with standard coverage check below.
|
|
69
|
-
|
|
70
|
-
### 0b. Load Source Access Protocol
|
|
71
|
-
|
|
72
|
-
Load `{sourceAccessProtocol}` and follow both sections:
|
|
73
|
-
1. **Source API Surface Definition** — determines what counts as the public API for coverage denominator
|
|
74
|
-
2. **Source Access Resolution** — 5-state waterfall to determine how source files will be read and sets `analysis_confidence`
|
|
75
|
-
|
|
76
|
-
### 1. Extract Documented Exports from SKILL.md
|
|
77
|
-
|
|
78
|
-
Read SKILL.md and extract all documented items:
|
|
79
|
-
|
|
80
|
-
- **Functions:** name, parameters, return type, description
|
|
81
|
-
- **Classes:** name, methods, properties
|
|
82
|
-
- **Types/Interfaces:** name, fields
|
|
83
|
-
- **Constants/Enums:** name, values
|
|
84
|
-
- **Hooks/Patterns:** name, usage signature
|
|
85
|
-
|
|
86
|
-
Build the **documented inventory** — a list of everything the SKILL.md claims the source provides.
|
|
87
|
-
|
|
88
|
-
**Split-body traversal:** If a `references/` directory exists alongside SKILL.md and SKILL.md's `## Full` headings are absent or stubs (not a stack skill's structural references), extend the documented inventory scan to include all `references/*.md` files. After split-body, Tier 2 content (Full API Reference, Full Type Definitions) lives in reference files — the inventory must reflect the full skill content regardless of where it resides.
|
|
89
|
-
|
|
90
|
-
### 1b. Cross-Check Split-Body Consistency
|
|
91
|
-
|
|
92
|
-
**Only execute if a `references/` directory exists alongside SKILL.md** (detected during split-body traversal in Section 1). Skip silently otherwise.
|
|
93
|
-
|
|
94
|
-
For each function, class, type, or interface that appears in BOTH the SKILL.md body AND any `references/*.md` file, compare the documented signatures:
|
|
95
|
-
|
|
96
|
-
- **Parameters:** name, type, order, optionality
|
|
97
|
-
- **Return types:** exact type match
|
|
98
|
-
- **Description:** no contradictions (brief vs detailed is acceptable; conflicting semantics is not)
|
|
99
|
-
|
|
100
|
-
**SKILL.md body is authoritative.** When a mismatch is found, the reference file is the one that needs updating.
|
|
101
|
-
|
|
102
|
-
Build a split-body consistency findings list:
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"cross_check_mismatches": [
|
|
107
|
-
{
|
|
108
|
-
"export": "formatDate",
|
|
109
|
-
"skill_md_line": 42,
|
|
110
|
-
"reference_file": "references/api-reference.md",
|
|
111
|
-
"reference_line": 18,
|
|
112
|
-
"issue": "SKILL.md shows (date: Date) => string, reference shows (date: Date, format?: string) => string"
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"exports_cross_checked": 12,
|
|
116
|
-
"mismatches_found": 1
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Flag each mismatch as **High severity** — signature inconsistency between SKILL.md body and reference files undermines agent trust. These findings feed into the gap report (step-06).
|
|
121
|
-
|
|
122
|
-
### 2. Analyze Source Code (Tier-Dependent)
|
|
123
|
-
|
|
124
|
-
Start from the package entry point (see 0b) and identify the public API surface. Then analyze those exports at the appropriate tier depth.
|
|
125
|
-
|
|
126
|
-
**Quick Tier (no tools):**
|
|
127
|
-
- Read the entry point file(s) directly
|
|
128
|
-
- Identify public exports by scanning for `export` keywords, `module.exports`, `__init__.py` imports, or language-specific export patterns
|
|
129
|
-
- Compare against documented inventory by name matching
|
|
130
|
-
- Cannot verify signatures — note as "unverified" in report
|
|
131
|
-
|
|
132
|
-
**Forge Tier (ast-grep available):**
|
|
133
|
-
DO NOT BE LAZY — For EACH source file that defines public API exports, launch a subprocess that:
|
|
134
|
-
1. Uses ast-grep to extract all exported symbols with their full signatures
|
|
135
|
-
2. Matches each export against the documented inventory
|
|
136
|
-
3. Returns structured findings:
|
|
137
|
-
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"file": "src/utils.ts",
|
|
141
|
-
"exports_found": ["formatDate", "parseConfig", "ConfigType"],
|
|
142
|
-
"exports_documented": ["formatDate", "parseConfig"],
|
|
143
|
-
"missing_docs": ["ConfigType"],
|
|
144
|
-
"signature_mismatches": [
|
|
145
|
-
{
|
|
146
|
-
"name": "formatDate",
|
|
147
|
-
"source_sig": "(date: Date, format?: string) => string",
|
|
148
|
-
"documented_sig": "(date: Date) => string",
|
|
149
|
-
"issue": "missing optional parameter 'format'"
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
If subprocess unavailable, perform ast-grep analysis in main thread per file.
|
|
156
|
-
|
|
157
|
-
**Deep Tier (ast-grep + gh + QMD):**
|
|
158
|
-
- All Forge tier checks, plus:
|
|
159
|
-
- Use gh CLI to verify source repository matches documented version
|
|
160
|
-
- Cross-check type definitions against their source declarations
|
|
161
|
-
- Verify re-exported symbols trace to their original source
|
|
162
|
-
|
|
163
|
-
### 3. Build Coverage Results
|
|
164
|
-
|
|
165
|
-
Aggregate findings across all source files:
|
|
166
|
-
|
|
167
|
-
**Per-export status table:**
|
|
168
|
-
|
|
169
|
-
| Export | Type | Documented | Signature Match | File:Line | Status |
|
|
170
|
-
|--------|------|-----------|-----------------|-----------|--------|
|
|
171
|
-
| {name} | function/class/type | yes/no | yes/no/unverified | src/file.ts:42 | PASS/FAIL/WARN |
|
|
172
|
-
|
|
173
|
-
**Summary counts:**
|
|
174
|
-
- Total exports in source: {N}
|
|
175
|
-
- Documented in SKILL.md: {N}
|
|
176
|
-
- Missing documentation: {N}
|
|
177
|
-
- Signature mismatches: {N}
|
|
178
|
-
- Undocumented in SKILL.md but not in source (stale docs): {N}
|
|
179
|
-
|
|
180
|
-
### 4. Load Scoring Rules
|
|
181
|
-
|
|
182
|
-
Load `{scoringRulesFile}` to determine category scores:
|
|
183
|
-
|
|
184
|
-
- **Export Coverage:** (documented / total_exports) * 100
|
|
185
|
-
- **Signature Accuracy:** (matching_signatures / total_documented) * 100 (Forge/Deep only, "N/A" for Quick)
|
|
186
|
-
- **Type Coverage:** (documented_types / total_types) * 100 (Forge/Deep only, "N/A" for Quick)
|
|
187
|
-
|
|
188
|
-
**State 2 denominator validation:** When using provenance-map as the baseline (State 2), cross-reference the provenance-map entry count against `metadata.json`'s `exports[]` array before computing Export Coverage. If they diverge, use the union as the denominator per the source-access-protocol rules. Log the gap size if any.
|
|
189
|
-
|
|
190
|
-
### 5. Append Coverage Analysis to Output
|
|
191
|
-
|
|
192
|
-
Append the **Coverage Analysis** section to `{outputFile}`:
|
|
193
|
-
|
|
194
|
-
```markdown
|
|
195
|
-
## Coverage Analysis
|
|
196
|
-
|
|
197
|
-
**Tier:** {forge_tier}
|
|
198
|
-
**Source Access:** {analysis_confidence} (full | provenance-map | metadata-only | remote-only | docs-only)
|
|
199
|
-
**Source Path:** {source_path}
|
|
200
|
-
**Files Analyzed:** {count}
|
|
201
|
-
|
|
202
|
-
### Export Coverage
|
|
203
|
-
|
|
204
|
-
| Export | Type | Documented | Signature | Source Location | Status |
|
|
205
|
-
|--------|------|-----------|-----------|-----------------|--------|
|
|
206
|
-
| ... per-export rows ... |
|
|
207
|
-
|
|
208
|
-
### Coverage Summary
|
|
209
|
-
|
|
210
|
-
- **Exports Found:** {N}
|
|
211
|
-
- **Documented:** {N} ({percentage}%)
|
|
212
|
-
- **Missing Documentation:** {N}
|
|
213
|
-
- **Signature Mismatches:** {N}
|
|
214
|
-
- **Stale Documentation:** {N}
|
|
215
|
-
|
|
216
|
-
### Category Scores
|
|
217
|
-
|
|
218
|
-
| Category | Score |
|
|
219
|
-
|----------|-------|
|
|
220
|
-
| Export Coverage | {N}% |
|
|
221
|
-
| Signature Accuracy | {N}% or N/A |
|
|
222
|
-
| Type Coverage | {N}% or N/A |
|
|
223
|
-
|
|
224
|
-
Note: Weight application is deferred to step-05 where all category weights are calculated after external validation availability is known.
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### 6. Report Coverage Results
|
|
228
|
-
|
|
229
|
-
"**Coverage check complete.**
|
|
230
|
-
|
|
231
|
-
**{skill_name}** — {forge_tier} tier analysis of {file_count} source files:
|
|
232
|
-
|
|
233
|
-
- Exports: {documented}/{total} documented ({percentage}%)
|
|
234
|
-
- Signatures: {matching}/{total} accurate ({percentage}% or N/A for Quick)
|
|
235
|
-
- Types: {documented_types}/{total_types} covered ({percentage}% or N/A for Quick)
|
|
236
|
-
|
|
237
|
-
**{N} issues found** — details in Coverage Analysis section.
|
|
238
|
-
|
|
239
|
-
**Proceeding to coherence check...**"
|
|
240
|
-
|
|
241
|
-
### 7. Auto-Proceed
|
|
242
|
-
|
|
243
|
-
Display: "**Proceeding to coherence check...**"
|
|
244
|
-
|
|
245
|
-
#### Menu Handling Logic:
|
|
246
|
-
|
|
247
|
-
- After coverage analysis is complete, update {outputFile} frontmatter stepsCompleted, then immediately load, read entire file, then execute {nextStepFile}
|
|
248
|
-
|
|
249
|
-
#### EXECUTION RULES:
|
|
250
|
-
|
|
251
|
-
- This is an auto-proceed validation step with no user choices
|
|
252
|
-
- Proceed directly to next step after coverage is analyzed
|
|
253
|
-
|
|
254
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
255
|
-
|
|
256
|
-
ONLY WHEN all source files have been analyzed, the Coverage Analysis section has been appended to {outputFile}, and category scores have been calculated, will you then load and read fully `{nextStepFile}` to execute coherence check.
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
261
|
-
|
|
262
|
-
### ✅ SUCCESS:
|
|
263
|
-
|
|
264
|
-
- All source files analyzed at appropriate tier depth; split-body references/ traversed when present
|
|
265
|
-
- Every finding has file:line citation (Forge/Deep) or file-level reference (Quick)
|
|
266
|
-
- Per-export status table complete
|
|
267
|
-
- Category scores calculated per scoring rules
|
|
268
|
-
- Coverage Analysis section appended to output document
|
|
269
|
-
- Zero fabricated findings — all traceable to source
|
|
270
|
-
|
|
271
|
-
### ❌ SYSTEM FAILURE:
|
|
272
|
-
|
|
273
|
-
- Fabricating export names or signatures not in source code
|
|
274
|
-
- Skipping source files (DO NOT BE LAZY)
|
|
275
|
-
- Not scaling analysis depth to forge tier
|
|
276
|
-
- Not calculating category scores
|
|
277
|
-
- Reporting coverage without per-export evidence
|
|
278
|
-
- Hardcoding paths instead of using frontmatter variables
|
|
279
|
-
|
|
280
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. Zero hallucination — every finding traces to code.
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'step-04-coherence-check'
|
|
3
|
-
description: 'Validate internal consistency — references, types, and integration patterns'
|
|
4
|
-
|
|
5
|
-
nextStepFile: './step-04b-external-validators.md'
|
|
6
|
-
outputFile: '{forge_data_folder}/{skill_name}/test-report-{skill_name}.md'
|
|
7
|
-
outputFormatsFile: '../data/output-section-formats.md'
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Step 4: Coherence Check
|
|
11
|
-
|
|
12
|
-
## STEP GOAL:
|
|
13
|
-
|
|
14
|
-
Validate internal consistency of the skill documentation. In contextual mode (stack skills): verify that all cross-references in SKILL.md point to real files, types match their declarations, and integration patterns are complete. In naive mode (individual skills): perform basic structural validation only.
|
|
15
|
-
|
|
16
|
-
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
17
|
-
|
|
18
|
-
### Universal Rules:
|
|
19
|
-
|
|
20
|
-
- 🛑 NEVER fabricate references or claim files exist without verifying — zero hallucination
|
|
21
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
22
|
-
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
23
|
-
- ⚙️ 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
|
|
24
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
25
|
-
|
|
26
|
-
### Role Reinforcement:
|
|
27
|
-
|
|
28
|
-
- ✅ You are a skill auditor in Ferris's Audit mode — zero hallucination
|
|
29
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
30
|
-
- ✅ Every broken reference must cite exactly what was referenced and where it was expected
|
|
31
|
-
- ✅ Report structural facts — do not interpret or editorialize
|
|
32
|
-
|
|
33
|
-
### Step-Specific Rules:
|
|
34
|
-
|
|
35
|
-
- 🎯 Use subprocess optimization: grep for references across files, then per-reference deep validation
|
|
36
|
-
- 💬 Subprocess returns structured findings only, not full file contents
|
|
37
|
-
- 🚫 DO NOT BE LAZY — For EACH reference in contextual mode, launch a subprocess to validate the target
|
|
38
|
-
- ⚙️ If subprocess unavailable, perform validation in main thread sequentially
|
|
39
|
-
- 📋 Analysis depth is conditional on testMode (naive vs contextual)
|
|
40
|
-
|
|
41
|
-
## EXECUTION PROTOCOLS:
|
|
42
|
-
|
|
43
|
-
- 🎯 Check testMode from output frontmatter to determine analysis depth
|
|
44
|
-
- 💾 Append Coherence Analysis section to {outputFile}
|
|
45
|
-
- 📖 Update stepsCompleted in {outputFile}
|
|
46
|
-
- 🚫 FORBIDDEN to skip coherence check entirely — even naive mode runs basic structural validation
|
|
47
|
-
|
|
48
|
-
## CONTEXT BOUNDARIES:
|
|
49
|
-
|
|
50
|
-
- Available: SKILL.md, source files, testMode, forge tier, coverage results from step 03, evidence-report.md from skill's forge-data directory (Deep tier only)
|
|
51
|
-
- Focus: Internal consistency and reference validation only — coverage was step 03
|
|
52
|
-
- Limits: Do NOT recalculate coverage scores — use results from step 03
|
|
53
|
-
- Dependencies: step-03 must have completed coverage analysis
|
|
54
|
-
|
|
55
|
-
## MANDATORY SEQUENCE
|
|
56
|
-
|
|
57
|
-
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
58
|
-
|
|
59
|
-
### 1. Check Test Mode
|
|
60
|
-
|
|
61
|
-
Read `testMode` from `{outputFile}` frontmatter.
|
|
62
|
-
|
|
63
|
-
**IF naive mode → Execute Naive Coherence (Section 2)**
|
|
64
|
-
**IF contextual mode → Execute Contextual Coherence (Sections 3-5)**
|
|
65
|
-
|
|
66
|
-
### 2. Naive Mode: Basic Structural Validation
|
|
67
|
-
|
|
68
|
-
Perform lightweight structural checks:
|
|
69
|
-
|
|
70
|
-
**Document structure:**
|
|
71
|
-
- SKILL.md has required top-level sections (description, exports, usage)
|
|
72
|
-
- Section headers are properly formatted
|
|
73
|
-
- Code examples have language annotations
|
|
74
|
-
- No broken markdown (unclosed code blocks, malformed tables)
|
|
75
|
-
- If `scripts/` or `assets/` directory exists alongside SKILL.md, a "Scripts & Assets" section (Section 7b) should be present
|
|
76
|
-
|
|
77
|
-
**Internal consistency:**
|
|
78
|
-
- Exports referenced in usage examples match exports listed in exports section
|
|
79
|
-
- Type names used in examples match documented types
|
|
80
|
-
- No self-contradictions (e.g., function described as async but shown sync in example)
|
|
81
|
-
|
|
82
|
-
Build a simple structural findings list:
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"structural_issues": [
|
|
87
|
-
{"type": "missing_section", "detail": "No 'Usage' section found"},
|
|
88
|
-
{"type": "broken_example", "detail": "Line 42: references undeclared function 'getConfig'"}
|
|
89
|
-
],
|
|
90
|
-
"issues_found": 2
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**After naive coherence → Execute Section 2b if gate conditions met, then skip to Section 6 (Append Results)**
|
|
95
|
-
|
|
96
|
-
### 2b. Migration/Deprecation Verification (Mode-Independent)
|
|
97
|
-
|
|
98
|
-
**Gate check:** Execute this section ONLY IF both conditions are met:
|
|
99
|
-
1. Forge tier is **Deep** (tool-gated)
|
|
100
|
-
2. `{forge_data_folder}/{skill_name}/evidence-report.md` exists (data-gated)
|
|
101
|
-
|
|
102
|
-
If either condition fails, skip silently and proceed to Section 6.
|
|
103
|
-
|
|
104
|
-
**This check runs regardless of naive/contextual mode.** T2-future annotations are a property of the source code and enrichment data, not the skill type.
|
|
105
|
-
|
|
106
|
-
Check whether SKILL.md contains a "Migration & Deprecation Warnings" section (Section 4b). Then check the skill's `evidence-report.md` (at `{forge_data_folder}/{skill_name}/evidence-report.md`) for T2-future annotation counts.
|
|
107
|
-
|
|
108
|
-
- **If T2-future annotations > 0 AND Section 4b is absent:** Flag as Medium severity gap: "Migration section missing — T2-future annotations exist but Section 4b is not present in SKILL.md Tier 1."
|
|
109
|
-
- **If T2-future annotations = 0 AND Section 4b is present:** Flag as Medium severity gap: "Migration section unexpected — Section 4b is present but no T2-future annotations were produced."
|
|
110
|
-
- **If evidence-report.md is unavailable:** Skip this check silently. Note: "Section 4b verification skipped — evidence-report.md not found."
|
|
111
|
-
|
|
112
|
-
Add findings to the coherence analysis results.
|
|
113
|
-
|
|
114
|
-
**After Section 2b (naive path) → Skip to Section 6 (Append Results)**
|
|
115
|
-
|
|
116
|
-
### 3. Contextual Mode: Extract References
|
|
117
|
-
|
|
118
|
-
Scan SKILL.md for all cross-references:
|
|
119
|
-
|
|
120
|
-
**Reference types to extract:**
|
|
121
|
-
- File path references (`./path/to/file.ts`, `../shared/types.ts`)
|
|
122
|
-
- Skill references (`See SKILL.md for {other-skill}`, `Integrates with {package}`)
|
|
123
|
-
- Type imports (`import { Type } from './module'`)
|
|
124
|
-
- Integration pattern references (middleware chains, plugin hooks, shared state)
|
|
125
|
-
- Script/asset references (`scripts/{file}`, `assets/{file}`) in SKILL.md body
|
|
126
|
-
|
|
127
|
-
Launch a subprocess to grep/regex SKILL.md for reference patterns and return all found references with line numbers as structured JSON (`references_found[]` with line, type, target fields). If subprocess unavailable, scan in main thread.
|
|
128
|
-
|
|
129
|
-
### 4. Contextual Mode: Validate Each Reference
|
|
130
|
-
|
|
131
|
-
DO NOT BE LAZY — For EACH reference found, launch a subprocess that:
|
|
132
|
-
|
|
133
|
-
1. Checks if the target exists (file exists, skill exists, type is declared)
|
|
134
|
-
2. If target exists, validates the reference is accurate:
|
|
135
|
-
- File path references: file exists at specified path
|
|
136
|
-
- Type imports: type is actually exported from the referenced module
|
|
137
|
-
- Skill references: referenced skill exists in skills output folder
|
|
138
|
-
- Integration patterns: documented pattern matches actual implementation
|
|
139
|
-
- Script/asset references: verify the referenced file exists in the skill's `scripts/` or `assets/` directory
|
|
140
|
-
3. Returns structured validation JSON per reference (reference, line, target_exists, type_match, signature_match, issues[])
|
|
141
|
-
|
|
142
|
-
If subprocess unavailable, validate each reference in main thread.
|
|
143
|
-
|
|
144
|
-
4. **Scripts/assets directory check:** If a `scripts/` or `assets/` directory exists alongside SKILL.md, verify that a "Scripts & Assets" section (Section 7b) is present in SKILL.md. This directory-level check applies in both modes (naive mode performs it in Section 2; contextual mode performs it here alongside per-reference validation). Flag absence as Medium severity gap per `{scoringRulesFile}`.
|
|
145
|
-
|
|
146
|
-
### 5. Contextual Mode: Check Integration Pattern Completeness
|
|
147
|
-
|
|
148
|
-
For stack skills, verify integration patterns are complete:
|
|
149
|
-
|
|
150
|
-
- **All documented integration points have corresponding code examples**
|
|
151
|
-
- **Shared types are consistently used across referenced components**
|
|
152
|
-
- **Middleware/plugin chains show complete flow, not fragments**
|
|
153
|
-
- **Event handlers reference valid event types**
|
|
154
|
-
|
|
155
|
-
Build integration completeness findings:
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"patterns_documented": 5,
|
|
160
|
-
"patterns_complete": 4,
|
|
161
|
-
"incomplete_patterns": [
|
|
162
|
-
{
|
|
163
|
-
"pattern": "Auth middleware chain",
|
|
164
|
-
"issue": "Shows middleware registration but not the handler function signature",
|
|
165
|
-
"line": 95
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Zero integration patterns:** If no integration patterns are documented in SKILL.md (e.g., a contextual-mode skill that uses shared types but has no middleware chains, plugin hooks, or event flows): record `patterns_documented: 0`, `patterns_complete: 0`. The coherence score will use reference validity alone — see `{scoringRulesFile}` Coherence Score Aggregation: "If no integration patterns exist, combined coherence equals reference validity."
|
|
172
|
-
|
|
173
|
-
### 5b. Migration/Deprecation Verification (Contextual Path)
|
|
174
|
-
|
|
175
|
-
**This section shares logic with Section 2b.** If you are on the contextual mode path (Sections 3-5), execute the migration check here using the same rules as Section 2b:
|
|
176
|
-
|
|
177
|
-
**Gate check:** Execute ONLY IF both conditions are met:
|
|
178
|
-
1. Forge tier is **Deep** (tool-gated)
|
|
179
|
-
2. `{forge_data_folder}/{skill_name}/evidence-report.md` exists (data-gated)
|
|
180
|
-
|
|
181
|
-
If either condition fails, skip silently.
|
|
182
|
-
|
|
183
|
-
Check whether SKILL.md contains a "Migration & Deprecation Warnings" section (Section 4b). Then check the skill's `evidence-report.md` for T2-future annotation counts.
|
|
184
|
-
|
|
185
|
-
- **If T2-future annotations > 0 AND Section 4b is absent:** Flag as Medium severity gap: "Migration section missing — T2-future annotations exist but Section 4b is not present in SKILL.md Tier 1."
|
|
186
|
-
- **If T2-future annotations = 0 AND Section 4b is present:** Flag as Medium severity gap: "Migration section unexpected — Section 4b is present but no T2-future annotations were produced."
|
|
187
|
-
- **If evidence-report.md is unavailable:** Skip this check silently. Note: "Section 4b verification skipped — evidence-report.md not found."
|
|
188
|
-
|
|
189
|
-
Add findings to the coherence analysis results.
|
|
190
|
-
|
|
191
|
-
### 5c. Calculate Coherence Scores
|
|
192
|
-
|
|
193
|
-
**Contextual mode only.** Calculate coherence percentages using the formulas defined in `{scoringRulesFile}` — Coherence Score Aggregation section:
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
reference_validity = (valid_references / total_references) * 100
|
|
197
|
-
integration_completeness = (complete_patterns / total_patterns) * 100
|
|
198
|
-
combined_coherence = (reference_validity * 0.6) + (integration_completeness * 0.4)
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Edge case:** If no integration patterns are documented (patterns_documented = 0), combined coherence equals reference validity alone. Do not divide by zero.
|
|
202
|
-
|
|
203
|
-
These values fill the `{percentage}%` placeholders in the output template loaded in Section 6.
|
|
204
|
-
|
|
205
|
-
### 6. Append Coherence Analysis to Output
|
|
206
|
-
|
|
207
|
-
Load `{outputFormatsFile}` and use the appropriate Coherence Analysis section format (naive or contextual) to append findings to `{outputFile}`.
|
|
208
|
-
|
|
209
|
-
### 7. Report Coherence Results
|
|
210
|
-
|
|
211
|
-
**For Naive Mode:**
|
|
212
|
-
"**Coherence check complete (naive mode).**
|
|
213
|
-
|
|
214
|
-
Basic structural validation of **{skill_name}**:
|
|
215
|
-
- {N} structural issues found
|
|
216
|
-
- Coherence category not scored (weight redistributed to coverage)
|
|
217
|
-
|
|
218
|
-
**Proceeding to external validation...**"
|
|
219
|
-
|
|
220
|
-
**For Contextual Mode:**
|
|
221
|
-
"**Coherence check complete (contextual mode).**
|
|
222
|
-
|
|
223
|
-
Reference validation of **{skill_name}**:
|
|
224
|
-
- References: {valid}/{total} valid ({percentage}%)
|
|
225
|
-
- Integration patterns: {complete}/{total} complete ({percentage}%)
|
|
226
|
-
- Combined coherence: {percentage}%
|
|
227
|
-
|
|
228
|
-
**{N} issues found** — details in Coherence Analysis section.
|
|
229
|
-
|
|
230
|
-
**Proceeding to external validation...**"
|
|
231
|
-
|
|
232
|
-
### 8. Auto-Proceed
|
|
233
|
-
|
|
234
|
-
Display: "**Proceeding to external validation...**"
|
|
235
|
-
|
|
236
|
-
#### Menu Handling Logic:
|
|
237
|
-
|
|
238
|
-
- After coherence analysis is complete, update {outputFile} frontmatter stepsCompleted, then immediately load, read entire file, then execute {nextStepFile}
|
|
239
|
-
|
|
240
|
-
#### EXECUTION RULES:
|
|
241
|
-
|
|
242
|
-
- This is an auto-proceed validation step with no user choices
|
|
243
|
-
- Proceed directly to next step after coherence is analyzed
|
|
244
|
-
|
|
245
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
246
|
-
|
|
247
|
-
ONLY WHEN coherence analysis is complete (naive structural or contextual full validation), the Coherence Analysis section has been appended to {outputFile}, and coherence scores (if contextual) have been calculated, will you then load and read fully `{nextStepFile}` to execute external validation.
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
252
|
-
|
|
253
|
-
### ✅ SUCCESS:
|
|
254
|
-
|
|
255
|
-
- Correct mode path executed (naive structural OR contextual full)
|
|
256
|
-
- All references validated in contextual mode (DO NOT BE LAZY)
|
|
257
|
-
- Every broken reference cites exact location and expected target
|
|
258
|
-
- Coherence Analysis section appended to output document
|
|
259
|
-
- Coherence scores calculated (contextual) or weight redistribution noted (naive)
|
|
260
|
-
- Zero fabricated findings — all traceable to artifacts
|
|
261
|
-
|
|
262
|
-
### ❌ SYSTEM FAILURE:
|
|
263
|
-
|
|
264
|
-
- Skipping coherence check entirely (even naive mode runs structural checks)
|
|
265
|
-
- Fabricating reference validation results
|
|
266
|
-
- Not checking every reference in contextual mode (DO NOT BE LAZY)
|
|
267
|
-
- Running contextual checks on a naive-mode skill (unnecessary depth)
|
|
268
|
-
- Running only naive checks on a contextual-mode skill (insufficient depth)
|
|
269
|
-
- Hardcoding paths instead of using frontmatter variables
|
|
270
|
-
|
|
271
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. Zero hallucination — every finding traces to artifacts.
|