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,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-04b-external-validators'
|
|
3
|
-
description: 'Run external validation tools (skill-check, tessl) and capture scores for scoring step'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-05-score.md'
|
|
6
|
-
outputFile: '{
|
|
3
|
+
outputFile: '{forge_version}/test-report-{skill_name}-{run_id}.md'
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Step 4b: External Validators
|
|
@@ -12,41 +9,11 @@ outputFile: '{forge_data_folder}/{skill_name}/test-report-{skill_name}.md'
|
|
|
12
9
|
|
|
13
10
|
Run external validation tools (`skill-check` and `tessl`) against the skill directory, capture their scores and findings, and append results to the test report. These tools catch complementary issues that internal coverage and coherence checks miss: `skill-check` validates spec compliance while `tessl` evaluates content quality and actionability.
|
|
14
11
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
### Universal Rules:
|
|
18
|
-
|
|
19
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
-
- 🎯 ALWAYS follow the exact instructions in the step file
|
|
21
|
-
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
22
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
23
|
-
|
|
24
|
-
### Role Reinforcement:
|
|
25
|
-
|
|
26
|
-
- ✅ You are a skill auditor running external quality gates
|
|
27
|
-
- ✅ Both tools are optional — unavailability is a skip, never a halt
|
|
28
|
-
- ✅ Report scores factually — do not editorialize on the results
|
|
29
|
-
|
|
30
|
-
### Step-Specific Rules:
|
|
12
|
+
## Rules
|
|
31
13
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
- ⚠️ Ignore non-zero exit codes if the tool produces parseable output
|
|
36
|
-
|
|
37
|
-
## EXECUTION PROTOCOLS:
|
|
38
|
-
|
|
39
|
-
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
40
|
-
- 💾 Append External Validation section to {outputFile}
|
|
41
|
-
- 📖 Update stepsCompleted in {outputFile}
|
|
42
|
-
- 📖 Store scores in context for step-05 scoring
|
|
43
|
-
|
|
44
|
-
## CONTEXT BOUNDARIES:
|
|
45
|
-
|
|
46
|
-
- Available: skill directory path, testMode, forge tier from previous steps
|
|
47
|
-
- Focus: External tool execution and score capture only
|
|
48
|
-
- Limits: Do NOT modify skill content or recalculate internal scores
|
|
49
|
-
- Dependencies: steps 03 and 04 must have completed
|
|
14
|
+
- Run each tool independently — one tool's failure does not affect the other
|
|
15
|
+
- Do not halt the workflow if either tool is unavailable or fails
|
|
16
|
+
- Read-only — do not modify skill content
|
|
50
17
|
|
|
51
18
|
## MANDATORY SEQUENCE
|
|
52
19
|
|
|
@@ -73,6 +40,8 @@ Before running external validators, check if `{forge_data_folder}/{skill_name}/e
|
|
|
73
40
|
|
|
74
41
|
**Primary (git-tracked):** Run `git log -1 --format=%cI -- {skillDir}/SKILL.md` to get the last commit date of SKILL.md. Compare against the evidence report's generation date (from its frontmatter or the `## Validation Results` timestamp). If SKILL.md's last commit is newer, results are stale.
|
|
75
42
|
|
|
43
|
+
**Primary-cross (single-commit bundle detection):** The git-commit-timestamp comparison can return a false "fresh" when `update-skill` commits a regenerated SKILL.md alongside an unchanged `evidence-report.md` in the same commit — both files share the same `%cI` even though the cached validation results inside the evidence report were produced during an earlier run. To catch this, after the Primary check also compare `{skillDir}/metadata.json`'s `generation_date` field against the evidence report's internal `## Validation Results` timestamp (or its frontmatter `generated` field). If `metadata.json.generation_date` is strictly newer than the evidence report's internal validation timestamp, treat results as stale regardless of git commit parity — SKILL.md was regenerated after the cached validation ran, so the scores no longer reflect current content. If `metadata.json` is missing or has no `generation_date`, skip this cross-check and rely on the git comparison alone.
|
|
44
|
+
|
|
76
45
|
**Secondary (uncommitted changes):** Run `git diff --name-only -- {skillDir}/SKILL.md`. If output is non-empty, SKILL.md has uncommitted changes — treat results as stale regardless of commit dates. Also check `git diff --cached --name-only -- {skillDir}/SKILL.md` for staged-but-uncommitted changes — if non-empty, SKILL.md has been staged since last commit, treat results as stale.
|
|
77
46
|
|
|
78
47
|
If SKILL.md was modified after the evidence report was generated (e.g., after update-skill), the cached results are stale — skip auto-reuse and proceed to section 2 for a fresh run.
|
|
@@ -83,20 +52,27 @@ If no evidence report exists, it contains no validation section, or results are
|
|
|
83
52
|
|
|
84
53
|
### 2. Run skill-check
|
|
85
54
|
|
|
86
|
-
**Check availability:**
|
|
55
|
+
**Check availability (short probe — 15s timeout):**
|
|
87
56
|
|
|
88
57
|
```bash
|
|
89
|
-
npx skill-check -h
|
|
58
|
+
timeout 15s npx --no-install skill-check -h 2>/dev/null
|
|
90
59
|
```
|
|
91
60
|
|
|
92
|
-
|
|
61
|
+
Use `--no-install` so the probe never triggers a slow cold-cache download (npx
|
|
62
|
+
would otherwise fetch the package before printing help). Wrap in `timeout 15s`
|
|
63
|
+
so a hung probe cannot stall the workflow — consistent with the 120s cap used
|
|
64
|
+
on the actual validator run below. If the probe exits non-zero OR the 15s
|
|
65
|
+
timeout trips (exit code `124`), record `skill_check_score: N/A` and skip to
|
|
66
|
+
section 3.
|
|
93
67
|
|
|
94
|
-
**Run validation:**
|
|
68
|
+
**Run validation (S2 — 120s timeout):**
|
|
95
69
|
|
|
96
70
|
```bash
|
|
97
|
-
npx skill-check check {skillDir} --format json --no-security-scan
|
|
71
|
+
timeout 120s npx skill-check check {skillDir} --format json --no-security-scan
|
|
98
72
|
```
|
|
99
73
|
|
|
74
|
+
If the command exits non-zero AND the exit code is `124` (GNU timeout's signal for the 120s wall-clock expiring), record `skill_check_score: N/A` with reason `timeout-120s`, log a warning, and skip to section 3. Other non-zero exits fall through to the regular JSON-parse path per the note below.
|
|
75
|
+
|
|
100
76
|
**Parse JSON output** to extract:
|
|
101
77
|
- `qualityScore` — overall score (0-100)
|
|
102
78
|
- `diagnostics[]` — any remaining issues
|
|
@@ -110,30 +86,42 @@ Store in context: `skill_check_score`, `skill_check_diagnostics`
|
|
|
110
86
|
|
|
111
87
|
### 3. Run tessl
|
|
112
88
|
|
|
113
|
-
**Check availability:**
|
|
89
|
+
**Check availability (short probe — 15s timeout):**
|
|
114
90
|
|
|
115
91
|
```bash
|
|
116
|
-
npx -y tessl --version
|
|
92
|
+
timeout 15s npx --no-install -y tessl --version 2>/dev/null
|
|
117
93
|
```
|
|
118
94
|
|
|
119
|
-
|
|
95
|
+
Same rationale as the skill-check probe above: `--no-install` + `timeout 15s`
|
|
96
|
+
prevent a cold-cache fetch from stalling the workflow. If the probe exits
|
|
97
|
+
non-zero OR the 15s timeout trips (exit code `124`), record
|
|
98
|
+
`tessl_score: N/A` and skip to section 4.
|
|
99
|
+
|
|
100
|
+
**Run review (S2 — 120s timeout):**
|
|
120
101
|
|
|
121
|
-
|
|
102
|
+
The §2 probe (`npx --no-install -y tessl --version`) already resolved tessl via the caller's npm cache or a locally-installed binary on `$PATH`. Invoke the same binary for the review — do not re-pin to a registry-published version.
|
|
122
103
|
|
|
123
104
|
```bash
|
|
124
|
-
|
|
105
|
+
# Use the tessl binary the §2 probe just verified. `--no-install` keeps
|
|
106
|
+
# the review execution path identical to the probe; no fresh registry
|
|
107
|
+
# fetch needed.
|
|
108
|
+
timeout 120s npx --no-install -y tessl skill review {skillDir}
|
|
125
109
|
```
|
|
126
110
|
|
|
111
|
+
Timeout handling mirrors skill-check: exit `124` → `tessl_score: N/A` with reason `timeout-120s`. If the percentage regex (`/(Description|Content|Review Score):\s*(\d+)%/`) returns fewer than three matches, record `tessl_score: N/A` with reason `parse-failure` and include the first 200 chars of output in evidence-report for debugging.
|
|
112
|
+
|
|
113
|
+
**Registry-404 branch:** if the invocation emits `npm error 404 Not Found` or the npx wrapper exits with a not-found condition, record `tessl_score: N/A` with reason `pin-not-on-registry` and continue. This branch exists because tessl has historically shipped under shifting scope/tag combinations; do not HALT the workflow on a missing registry entry.
|
|
114
|
+
|
|
127
115
|
**Parse the output** to extract:
|
|
128
116
|
- `description_score` — percentage (e.g., 100%)
|
|
129
117
|
- `content_score` — percentage (e.g., 45%)
|
|
130
|
-
- `
|
|
118
|
+
- `review_score` — percentage (e.g., 73%)
|
|
131
119
|
- `validation_result` — PASSED/FAILED
|
|
132
120
|
- `judge_suggestions[]` — list of improvement suggestions
|
|
133
121
|
|
|
134
|
-
The tessl output is human-readable text, not JSON. Parse the percentage values from lines like "Description: 100%", "Content: 45%", "
|
|
122
|
+
The tessl output is human-readable text, not JSON. Parse the percentage values from lines like "Description: 100%", "Content: 45%", "Review Score: 73%".
|
|
135
123
|
|
|
136
|
-
Store in context: `tessl_description_score`, `tessl_content_score`, `
|
|
124
|
+
Store in context: `tessl_description_score`, `tessl_content_score`, `tessl_review_score`, `tessl_suggestions`
|
|
137
125
|
|
|
138
126
|
**If tessl content score < 70%:** Flag a warning:
|
|
139
127
|
|
|
@@ -146,10 +134,10 @@ Store in context: `tessl_description_score`, `tessl_content_score`, `tessl_avera
|
|
|
146
134
|
**If both tools ran:**
|
|
147
135
|
|
|
148
136
|
```
|
|
149
|
-
external_score = (skill_check_score +
|
|
137
|
+
external_score = (skill_check_score + tessl_review_score) / 2
|
|
150
138
|
```
|
|
151
139
|
|
|
152
|
-
Note: `skill_check_score` is 0-100, `
|
|
140
|
+
Note: `skill_check_score` is 0-100, `tessl_review_score` is 0-100%. Both are on the same scale.
|
|
153
141
|
|
|
154
142
|
**If only one tool ran:** Use that tool's score as the external score.
|
|
155
143
|
|
|
@@ -174,7 +162,7 @@ Append to `{outputFile}`:
|
|
|
174
162
|
- **Validation:** {PASSED/FAILED}
|
|
175
163
|
- **Description Score:** {score}%
|
|
176
164
|
- **Content Score:** {score}%
|
|
177
|
-
- **
|
|
165
|
+
- **Review Score:** {score}%
|
|
178
166
|
- **Suggestions:**
|
|
179
167
|
{bulleted list of judge suggestions}
|
|
180
168
|
|
|
@@ -213,26 +201,3 @@ Append to `{outputFile}`:
|
|
|
213
201
|
|
|
214
202
|
ONLY WHEN external validation results are appended to {outputFile} and scores are stored in context will you proceed to load `{nextStepFile}` for scoring.
|
|
215
203
|
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
219
|
-
|
|
220
|
-
### ✅ SUCCESS:
|
|
221
|
-
|
|
222
|
-
- skill-check executed and quality score captured (or skipped with N/A if unavailable)
|
|
223
|
-
- tessl executed and description/content/average scores captured (or skipped with N/A)
|
|
224
|
-
- Content quality warning raised if tessl content < 70%
|
|
225
|
-
- Combined external score calculated
|
|
226
|
-
- External Validation section appended to output
|
|
227
|
-
- Scores stored in context for step-05
|
|
228
|
-
- Auto-proceeded to step-05
|
|
229
|
-
|
|
230
|
-
### ❌ SYSTEM FAILURE:
|
|
231
|
-
|
|
232
|
-
- Halting the workflow because a tool is unavailable or fails
|
|
233
|
-
- Not recording N/A when a tool is skipped (step-05 needs to know)
|
|
234
|
-
- Modifying skill content based on validation results
|
|
235
|
-
- Not parsing tessl content score (the key insight this tool provides)
|
|
236
|
-
- Fabricating scores not from actual tool output
|
|
237
|
-
|
|
238
|
-
**Master Rule:** External validators inform — they do not block. Run what's available, capture the scores, report factually, and proceed.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-06-report.md'
|
|
3
|
+
outputFile: '{forge_version}/test-report-{skill_name}-{run_id}.md'
|
|
4
|
+
scoringRulesFile: 'references/scoring-rules.md'
|
|
5
|
+
sourceAccessProtocol: 'references/source-access-protocol.md'
|
|
6
|
+
scoringScript: 'scripts/compute-score.py'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 5: Score
|
|
10
|
+
|
|
11
|
+
## STEP GOAL:
|
|
12
|
+
|
|
13
|
+
Calculate the overall completeness score by aggregating coverage, coherence, and external validation category scores with the appropriate weight distribution (naive or contextual), apply the pass/fail threshold, and determine the test result.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- Focus only on score calculation — do not generate remediation suggestions (Step 06)
|
|
18
|
+
- Score must be deterministic — same inputs always produce same output
|
|
19
|
+
- Show the math: category scores, weights, weighted contributions, total
|
|
20
|
+
|
|
21
|
+
## MANDATORY SEQUENCE
|
|
22
|
+
|
|
23
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
24
|
+
|
|
25
|
+
### 1. Load Scoring Rules
|
|
26
|
+
|
|
27
|
+
Load `{scoringRulesFile}` to get:
|
|
28
|
+
- Category weights (naive vs contextual distribution)
|
|
29
|
+
- Default threshold (80%)
|
|
30
|
+
- Tier-dependent scoring adjustments
|
|
31
|
+
- Any custom threshold override from workflow input
|
|
32
|
+
|
|
33
|
+
**Docs-only mode check:** If the Coverage Analysis section in `{outputFile}` notes docs-only mode (set by step-03 for skills with all `[EXT:...]` citations and no local source), apply Quick-tier weight redistribution: Signature Accuracy and Type Coverage are not scored, their weights (22% + 14%) are redistributed proportionally to remaining active categories. Coverage score is based on documentation completeness rather than source coverage (as calculated by step-03).
|
|
34
|
+
|
|
35
|
+
### 2. Read Category Scores from Output
|
|
36
|
+
|
|
37
|
+
Read `{outputFile}` and extract the category scores calculated in previous steps:
|
|
38
|
+
|
|
39
|
+
**From Coverage Analysis (step 03):**
|
|
40
|
+
- Export Coverage: {percentage}%
|
|
41
|
+
- Signature Accuracy: {percentage}% or N/A (Quick tier)
|
|
42
|
+
- Type Coverage: {percentage}% or N/A (Quick tier)
|
|
43
|
+
|
|
44
|
+
**From Coherence Analysis (step 04):**
|
|
45
|
+
- Combined Coherence: {percentage}% (contextual mode only)
|
|
46
|
+
- Or: not scored (naive mode — weight redistributed)
|
|
47
|
+
|
|
48
|
+
**From External Validation (step 04b):**
|
|
49
|
+
- External Validation Score: {percentage}% (combined skill-check + tessl average)
|
|
50
|
+
- Or: N/A (if neither tool was available — weight redistributed to other categories)
|
|
51
|
+
|
|
52
|
+
### 3. Apply Weight Distribution
|
|
53
|
+
|
|
54
|
+
**Read testMode from {outputFile} frontmatter.**
|
|
55
|
+
|
|
56
|
+
#### 2b. Apply S9 State 2 Undercount Deduction (pre-script)
|
|
57
|
+
|
|
58
|
+
If `analysis_confidence == 'provenance-map'` (State 2) AND step-03 recorded a provenance vs metadata divergence > 5% (see §4b in step-03), apply a 10-point deduction to `exportCoverage` BEFORE building the scoring input:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
exportCoverage_adjusted = max(0, exportCoverage - 10)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Record in the report: `scoring_notes: State 2 undercount risk acknowledged — 10% deduction applied to Export Coverage (raw: {N}%, adjusted: {M}%)`. Use the adjusted value as the `exportCoverage` field in §3a below. The deduction is deterministic and does not change category weights or active-category counting.
|
|
65
|
+
|
|
66
|
+
#### 3a. Construct Scoring Input JSON
|
|
67
|
+
|
|
68
|
+
Build a JSON object from the data gathered in steps 1-2:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mode": "{testMode: contextual or naive}",
|
|
73
|
+
"tier": "{forge_tier: Quick, Forge, Forge+, or Deep}",
|
|
74
|
+
"docsOnly": "{true if docs_only_mode detected in step 03, else false}",
|
|
75
|
+
"state2": "{true if analysis_confidence is provenance-map, else false}",
|
|
76
|
+
"stackSkill": "{true if metadata.json.skill_type == 'stack', else false}",
|
|
77
|
+
"scores": {
|
|
78
|
+
"exportCoverage": "{export_coverage_percentage}",
|
|
79
|
+
"signatureAccuracy": "{signature_accuracy_percentage or null if N/A}",
|
|
80
|
+
"typeCoverage": "{type_coverage_percentage or null if N/A}",
|
|
81
|
+
"coherence": "{combined_coherence_percentage or null if naive mode}",
|
|
82
|
+
"externalValidation": "{external_validation_score or null if N/A}"
|
|
83
|
+
},
|
|
84
|
+
"threshold": "{custom_threshold or omit for default 80}"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Important:** Score values must be numbers (not strings). Use `null` (not `"N/A"`) for categories that were not scored. Read `metadata.json.skill_type` from `{resolved_skill_package}/metadata.json`; if the value is `"stack"`, set `stackSkill: true` and pass `null` for `signatureAccuracy` and `typeCoverage` (the categories will be redistributed per `{scoringRulesFile}` Stack Skills rule).
|
|
89
|
+
|
|
90
|
+
#### 3b. Run the Scoring Script
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
python3 {scoringScript} '<JSON>'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Where `{scoringScript}` is the path resolved from the frontmatter variable (relative to the skill root, i.e., the skf-test-skill/ directory).
|
|
97
|
+
|
|
98
|
+
Parse the JSON output. The script returns:
|
|
99
|
+
- `weights` — final redistributed weights per category
|
|
100
|
+
- `weightedScores` — weighted contribution per category
|
|
101
|
+
- `totalScore` — the overall completeness score
|
|
102
|
+
- `threshold` — the threshold used
|
|
103
|
+
- `result` — `"PASS"`, `"FAIL"`, or **`"INCONCLUSIVE"`** (minimum-evidence floor — see `{scoringRulesFile}`)
|
|
104
|
+
- `activeCategories` — list of categories that were scored
|
|
105
|
+
- `skippedCategories` — list of categories that were skipped
|
|
106
|
+
- `skipReasons` — why each category was skipped
|
|
107
|
+
- `weightSum` — sum of final weights (should be ~100)
|
|
108
|
+
- `inconclusiveReasons` — only present when `result == "INCONCLUSIVE"`; explains which floor clause tripped
|
|
109
|
+
|
|
110
|
+
Use these values for Section 4 (pass/fail/inconclusive) and Section 6 (output formatting). **Never override the script's `result` value** — floor enforcement is centralized in the script for determinism.
|
|
111
|
+
|
|
112
|
+
#### 3c. Fallback (if script execution fails)
|
|
113
|
+
|
|
114
|
+
If the script is unavailable or returns an error, fall back to manual calculation:
|
|
115
|
+
|
|
116
|
+
1. Select the weight table from `{scoringRulesFile}` for the detected mode (naive or contextual)
|
|
117
|
+
2. Determine skip conditions: Quick tier/docsOnly/state2/stackSkill skip Signature Accuracy + Type Coverage; naive mode coherence is already 0; null external validation means skip it
|
|
118
|
+
3. For each skipped category, set its weight to 0
|
|
119
|
+
4. Compute sum of active category weights
|
|
120
|
+
5. For each active category: `new_weight = old_weight / sum_active * 100`
|
|
121
|
+
6. `weighted_score = new_weight / 100 * category_score`
|
|
122
|
+
7. `total = sum of all weighted_scores`
|
|
123
|
+
|
|
124
|
+
Report: "**Note:** Scoring script unavailable — calculated manually per scoring-rules.md."
|
|
125
|
+
|
|
126
|
+
### 3d. Apply Post-Score Caps (BEFORE PASS/FAIL determination)
|
|
127
|
+
|
|
128
|
+
The scoring script returns `totalScore` and a preliminary `result`. Two caps may override the script's PASS into FAIL — applied in this order, and ONLY if the script did NOT return INCONCLUSIVE (floor always takes precedence):
|
|
129
|
+
|
|
130
|
+
**Cap 1 — Tooling degraded (B3):** if `analysisConfidence == "degraded"` or `toolingStatus` indicates a missing helper (`python3-missing`, `frontmatter-validator-missing`), set `effective_score = min(totalScore, threshold - 1)` and record `scoring_notes: tooling degraded — capped below threshold until helper restored`.
|
|
131
|
+
|
|
132
|
+
**Cap 2 — Docs-only without external validators (S4):** if `docsOnly == true` AND `externalValidation` score was null (neither skill-check nor tessl ran), set `effective_score = min(effective_score, threshold - 1)` and record `scoring_notes: docs-only without external validators — capped below threshold per S4`.
|
|
133
|
+
|
|
134
|
+
If either cap fired and `result` was `PASS`, change it to `FAIL`. If `result` was already `INCONCLUSIVE`, leave it — the evidence-floor verdict is never overridden by a cap.
|
|
135
|
+
|
|
136
|
+
### 4. Determine Result (PASS / FAIL / INCONCLUSIVE)
|
|
137
|
+
|
|
138
|
+
The scoring script enforces the minimum-evidence floor BEFORE comparing score vs threshold. Three possible outcomes:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
IF result == "INCONCLUSIVE" — minimum-evidence floor tripped; not PASS, not FAIL
|
|
142
|
+
IF score >= threshold → PASS
|
|
143
|
+
IF score < threshold → FAIL
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**INCONCLUSIVE floor clauses** (see `{scoringRulesFile}`):
|
|
147
|
+
- `active_categories < 2` (after all redistribution), OR
|
|
148
|
+
- `tier == "Quick"` AND Export Coverage is the sole scoring contributor
|
|
149
|
+
|
|
150
|
+
**Tooling-degraded cap (B3):** If the `analysisConfidence` in output frontmatter is `degraded` (python3 missing, frontmatter validator missing, or other degraded state flagged in step-01), the step MUST cap the score at `threshold - 1` BEFORE the PASS/FAIL comparison. This forces a deterministic FAIL until tooling is restored. Do NOT override an INCONCLUSIVE result with the cap — INCONCLUSIVE remains the verdict.
|
|
151
|
+
|
|
152
|
+
### 5. Determine Next Workflow Recommendation
|
|
153
|
+
|
|
154
|
+
Based on test result:
|
|
155
|
+
|
|
156
|
+
**IF PASS:**
|
|
157
|
+
- `nextWorkflow: 'export-skill'` — skill is ready for export
|
|
158
|
+
- **M5 — drift override:** if workflow context carries
|
|
159
|
+
`allow_workspace_drift: true` (set in step-01 §5b when the user passed
|
|
160
|
+
`--allow-workspace-drift` AND the workspace HEAD did not match
|
|
161
|
+
`metadata.source_commit`), the PASS is a **conditional PASS**:
|
|
162
|
+
- Write `testResult: 'pass-with-drift'` to the output frontmatter instead of
|
|
163
|
+
bare `'pass'`. The result contract (§4c of step-06) mirrors the same
|
|
164
|
+
value.
|
|
165
|
+
- Override `nextWorkflow` to `'update-skill'` — **refuse to recommend
|
|
166
|
+
`export-skill`**. The drift override weakens the workflow's strongest
|
|
167
|
+
false-positive guard (we tested against HEAD, not the pinned source); a
|
|
168
|
+
PASS under drift is not trustworthy enough to promote to export without a
|
|
169
|
+
clean re-test against the pinned commit.
|
|
170
|
+
- Record `scoring_notes: workspace drift overridden — PASS is conditional; re-run against pinned commit before export`.
|
|
171
|
+
|
|
172
|
+
**IF FAIL:**
|
|
173
|
+
- `nextWorkflow: 'update-skill'` — skill needs remediation before export
|
|
174
|
+
|
|
175
|
+
**IF INCONCLUSIVE:**
|
|
176
|
+
- `nextWorkflow: 'manual-review'` — evidence base is insufficient to grade the skill automatically. The test report records `inconclusiveReasons` from the scoring script. Surface to the user — do not auto-recommend export or update.
|
|
177
|
+
|
|
178
|
+
### 6. Append Completeness Score to Output
|
|
179
|
+
|
|
180
|
+
Append the **Completeness Score** section to `{outputFile}`:
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
## Completeness Score
|
|
184
|
+
|
|
185
|
+
### Score Breakdown
|
|
186
|
+
|
|
187
|
+
| Category | Score | Weight | Weighted |
|
|
188
|
+
|----------|-------|--------|----------|
|
|
189
|
+
| Export Coverage | {N}% | {W}% | {WS}% |
|
|
190
|
+
| Signature Accuracy | {N}% | {W}% | {WS}% |
|
|
191
|
+
| Type Coverage | {N}% | {W}% | {WS}% |
|
|
192
|
+
| Coherence | {N}% | {W}% | {WS}% |
|
|
193
|
+
| External Validation | {N}% | {W}% | {WS}% |
|
|
194
|
+
| **Total** | | **100%** | **{total}%** |
|
|
195
|
+
|
|
196
|
+
### Result
|
|
197
|
+
|
|
198
|
+
**Score:** {total}%
|
|
199
|
+
**Threshold:** {threshold}%
|
|
200
|
+
**Result:** **{PASS|FAIL|INCONCLUSIVE}**
|
|
201
|
+
{If INCONCLUSIVE:}
|
|
202
|
+
**Inconclusive Reasons:**
|
|
203
|
+
{bulleted list from script `inconclusiveReasons`}
|
|
204
|
+
|
|
205
|
+
**Weight Distribution:** {naive (redistributed) | contextual (full)}
|
|
206
|
+
**Tier Adjustment:** {none | Quick tier — signature and type coverage not scored}
|
|
207
|
+
**External Validators:** {both available | skill-check only | tessl only | none — weight redistributed}
|
|
208
|
+
**Analysis Confidence:** {full | provenance-map | metadata-only | remote-only | docs-only}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
If `analysis_confidence` is not `full`, append a degradation notice. **The notice must be confidence-aware** — see the degradation notice rules in `{sourceAccessProtocol}`:
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
### Access Degradation Notice
|
|
215
|
+
|
|
216
|
+
**Resolved via:** {analysis_confidence} {confidence breakdown if provenance-map, e.g., "(T1 AST-verified at compilation time)" or "(12 T1, 3 T1-low)"}
|
|
217
|
+
**Impact:** {describe limitation — e.g., "Signature checks limited to name-matching. Source file:line citations from provenance-map, not live AST." — or "Provenance data is at highest confidence; no limitation." for all-T1 provenance-map}
|
|
218
|
+
**Recommendation:** {confidence-dependent — see {sourceAccessProtocol} degradation notice rules. Do NOT recommend local clone when provenance-map entries are already T1.}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### 7. Update Output Frontmatter
|
|
222
|
+
|
|
223
|
+
Update `{outputFile}` frontmatter:
|
|
224
|
+
- `testResult: '{pass|pass-with-drift|fail|inconclusive}'` (lowercase; mirrors script `result`, with `pass-with-drift` substituted for `pass` when `allow_workspace_drift` was set and drift was observed — see §5 M5)
|
|
225
|
+
- `score: '{total}%'`
|
|
226
|
+
- `threshold: '{threshold}%'`
|
|
227
|
+
- `analysisConfidence: '{full|degraded|provenance-map|metadata-only|remote-only|docs-only}'`
|
|
228
|
+
- `nextWorkflow: '{export-skill|update-skill|manual-review}'`
|
|
229
|
+
- Append `'step-05-score'` to `stepsCompleted`
|
|
230
|
+
|
|
231
|
+
### 8. Report Score
|
|
232
|
+
|
|
233
|
+
"**Completeness score calculated.**
|
|
234
|
+
|
|
235
|
+
**{skill_name}:** **{total}%** — **{PASS|FAIL}**
|
|
236
|
+
|
|
237
|
+
| Category | Score | Weighted |
|
|
238
|
+
|----------|-------|----------|
|
|
239
|
+
| Export Coverage | {N}% | {WS}% |
|
|
240
|
+
| Signature Accuracy | {N}% | {WS}% |
|
|
241
|
+
| Type Coverage | {N}% | {WS}% |
|
|
242
|
+
| Coherence | {N}% | {WS}% |
|
|
243
|
+
| External Validation | {N}% | {WS}% |
|
|
244
|
+
|
|
245
|
+
**Threshold:** {threshold}%
|
|
246
|
+
**Recommendation:** {export-skill if pass | update-skill if fail}
|
|
247
|
+
|
|
248
|
+
**Proceeding to gap report...**"
|
|
249
|
+
|
|
250
|
+
### 9. Auto-Proceed
|
|
251
|
+
|
|
252
|
+
Display: "**Proceeding to gap report...**"
|
|
253
|
+
|
|
254
|
+
#### Menu Handling Logic:
|
|
255
|
+
|
|
256
|
+
- After score is calculated and frontmatter updated, immediately load, read entire file, then execute {nextStepFile}
|
|
257
|
+
|
|
258
|
+
#### EXECUTION RULES:
|
|
259
|
+
|
|
260
|
+
- This is an auto-proceed scoring step with no user choices
|
|
261
|
+
- Proceed directly to next step after score is determined
|
|
262
|
+
|
|
263
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
264
|
+
|
|
265
|
+
ONLY WHEN the score is calculated, pass/fail is determined, the Completeness Score section is appended to {outputFile}, and frontmatter is updated with testResult and score, will you then load and read fully `{nextStepFile}` to execute gap report generation.
|
|
266
|
+
|