mustflow 1.18.16 → 1.31.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/README.md +28 -8
- package/dist/cli/commands/adapters.js +90 -0
- package/dist/cli/commands/classify.js +3 -4
- package/dist/cli/commands/contract-lint.js +26 -6
- package/dist/cli/commands/dashboard.js +103 -4
- package/dist/cli/commands/explain-verify.js +213 -0
- package/dist/cli/commands/explain.js +48 -4
- package/dist/cli/commands/handoff.js +136 -0
- package/dist/cli/commands/run.js +302 -168
- package/dist/cli/commands/update.js +91 -61
- package/dist/cli/commands/upgrade.js +65 -0
- package/dist/cli/commands/verify.js +304 -139
- package/dist/cli/i18n/en.js +77 -4
- package/dist/cli/i18n/es.js +77 -4
- package/dist/cli/i18n/fr.js +77 -4
- package/dist/cli/i18n/hi.js +77 -4
- package/dist/cli/i18n/ko.js +77 -4
- package/dist/cli/i18n/zh.js +77 -4
- package/dist/cli/index.js +34 -42
- package/dist/cli/lib/command-registry.js +15 -0
- package/dist/cli/lib/dashboard-export.js +775 -0
- package/dist/cli/lib/dashboard-html.js +1 -1
- package/dist/cli/lib/local-index.js +33 -14
- package/dist/cli/lib/reporter.js +6 -0
- package/dist/cli/lib/run-plan.js +239 -0
- package/dist/cli/lib/templates.js +18 -3
- package/dist/cli/lib/update-diff-preview.js +163 -0
- package/dist/cli/lib/validation.js +132 -1
- package/dist/core/adapter-compatibility.js +235 -0
- package/dist/core/bounded-output.js +38 -0
- package/dist/core/change-classification.js +14 -1
- package/dist/core/change-verification.js +246 -5
- package/dist/core/check-issues.js +10 -0
- package/dist/core/command-contract-validation.js +34 -0
- package/dist/core/command-cwd.js +18 -6
- package/dist/core/command-effects.js +13 -0
- package/dist/core/command-env.js +91 -0
- package/dist/core/contract-lint.js +260 -4
- package/dist/core/contract-models.js +172 -0
- package/dist/core/dashboard-verification.js +10 -0
- package/dist/core/doc-review-triage.js +1 -0
- package/dist/core/handoff-record.js +376 -0
- package/dist/core/public-json-contracts.js +23 -0
- package/dist/core/run-performance-history.js +307 -0
- package/dist/core/run-profile.js +87 -0
- package/dist/core/run-receipt.js +217 -11
- package/dist/core/run-write-drift.js +196 -0
- package/dist/core/secret-redaction.js +39 -0
- package/dist/core/skill-route-alignment.js +90 -0
- package/dist/core/source-anchors.js +3 -5
- package/dist/core/test-selection.js +224 -0
- package/dist/core/verification-decision-graph.js +290 -0
- package/dist/core/verification-scheduler.js +96 -2
- package/package.json +3 -1
- package/schemas/README.md +15 -4
- package/schemas/adapter-compatibility-report.schema.json +184 -0
- package/schemas/change-verification-report.schema.json +286 -4
- package/schemas/commands.schema.json +55 -2
- package/schemas/contract-lint-report.schema.json +99 -0
- package/schemas/dashboard-export.schema.json +273 -0
- package/schemas/explain-report.schema.json +267 -2
- package/schemas/handoff-validation-report.schema.json +68 -0
- package/schemas/run-receipt.schema.json +183 -1
- package/templates/default/common/.mustflow/config/commands.toml +3 -1
- package/templates/default/i18n.toml +78 -234
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +7 -3
- package/templates/default/locales/en/.mustflow/skills/architecture-deepening-review/SKILL.md +154 -0
- package/templates/default/locales/en/.mustflow/skills/behavior-preserving-refactor/SKILL.md +8 -3
- package/templates/default/locales/en/.mustflow/skills/code-review/SKILL.md +9 -4
- package/templates/default/locales/en/.mustflow/skills/date-number-audit/SKILL.md +19 -4
- package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +4 -2
- package/templates/default/locales/en/.mustflow/skills/external-skill-intake/SKILL.md +141 -0
- package/templates/default/locales/en/.mustflow/skills/release-notes-authoring/SKILL.md +143 -0
- package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +22 -8
- package/templates/default/locales/en/.mustflow/skills/skill-authoring/SKILL.md +3 -3
- package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +22 -9
- package/templates/default/locales/en/.mustflow/skills/ui-quality-gate/SKILL.md +21 -13
- package/templates/default/locales/en/.mustflow/skills/vertical-slice-tdd/SKILL.md +167 -0
- package/templates/default/manifest.toml +16 -1
- package/templates/default/locales/es/.mustflow/skills/INDEX.md +0 -75
- package/templates/default/locales/es/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
- package/templates/default/locales/es/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
- package/templates/default/locales/es/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
- package/templates/default/locales/es/.mustflow/skills/code-review/SKILL.md +0 -115
- package/templates/default/locales/es/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
- package/templates/default/locales/es/.mustflow/skills/command-pattern/SKILL.md +0 -247
- package/templates/default/locales/es/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
- package/templates/default/locales/es/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
- package/templates/default/locales/es/.mustflow/skills/database-change-safety/SKILL.md +0 -155
- package/templates/default/locales/es/.mustflow/skills/date-number-audit/SKILL.md +0 -116
- package/templates/default/locales/es/.mustflow/skills/dependency-injection/SKILL.md +0 -161
- package/templates/default/locales/es/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
- package/templates/default/locales/es/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
- package/templates/default/locales/es/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
- package/templates/default/locales/es/.mustflow/skills/docs-update/SKILL.md +0 -97
- package/templates/default/locales/es/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
- package/templates/default/locales/es/.mustflow/skills/facade-pattern/SKILL.md +0 -210
- package/templates/default/locales/es/.mustflow/skills/failure-triage/SKILL.md +0 -97
- package/templates/default/locales/es/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
- package/templates/default/locales/es/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
- package/templates/default/locales/es/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
- package/templates/default/locales/es/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
- package/templates/default/locales/es/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
- package/templates/default/locales/es/.mustflow/skills/pattern-scout/SKILL.md +0 -110
- package/templates/default/locales/es/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
- package/templates/default/locales/es/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
- package/templates/default/locales/es/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
- package/templates/default/locales/es/.mustflow/skills/readme-authoring/SKILL.md +0 -115
- package/templates/default/locales/es/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
- package/templates/default/locales/es/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
- package/templates/default/locales/es/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
- package/templates/default/locales/es/.mustflow/skills/result-option/SKILL.md +0 -186
- package/templates/default/locales/es/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
- package/templates/default/locales/es/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
- package/templates/default/locales/es/.mustflow/skills/skill-authoring/SKILL.md +0 -110
- package/templates/default/locales/es/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
- package/templates/default/locales/es/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
- package/templates/default/locales/es/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
- package/templates/default/locales/es/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
- package/templates/default/locales/es/.mustflow/skills/test-design-guard/SKILL.md +0 -162
- package/templates/default/locales/es/.mustflow/skills/test-maintenance/SKILL.md +0 -122
- package/templates/default/locales/es/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
- package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
- package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
- package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
- package/templates/default/locales/es/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
- package/templates/default/locales/fr/.mustflow/skills/INDEX.md +0 -75
- package/templates/default/locales/fr/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
- package/templates/default/locales/fr/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
- package/templates/default/locales/fr/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
- package/templates/default/locales/fr/.mustflow/skills/code-review/SKILL.md +0 -115
- package/templates/default/locales/fr/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
- package/templates/default/locales/fr/.mustflow/skills/command-pattern/SKILL.md +0 -247
- package/templates/default/locales/fr/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
- package/templates/default/locales/fr/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
- package/templates/default/locales/fr/.mustflow/skills/database-change-safety/SKILL.md +0 -155
- package/templates/default/locales/fr/.mustflow/skills/date-number-audit/SKILL.md +0 -116
- package/templates/default/locales/fr/.mustflow/skills/dependency-injection/SKILL.md +0 -161
- package/templates/default/locales/fr/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
- package/templates/default/locales/fr/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
- package/templates/default/locales/fr/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
- package/templates/default/locales/fr/.mustflow/skills/docs-update/SKILL.md +0 -97
- package/templates/default/locales/fr/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
- package/templates/default/locales/fr/.mustflow/skills/facade-pattern/SKILL.md +0 -210
- package/templates/default/locales/fr/.mustflow/skills/failure-triage/SKILL.md +0 -97
- package/templates/default/locales/fr/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
- package/templates/default/locales/fr/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
- package/templates/default/locales/fr/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
- package/templates/default/locales/fr/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
- package/templates/default/locales/fr/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
- package/templates/default/locales/fr/.mustflow/skills/pattern-scout/SKILL.md +0 -110
- package/templates/default/locales/fr/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
- package/templates/default/locales/fr/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
- package/templates/default/locales/fr/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
- package/templates/default/locales/fr/.mustflow/skills/readme-authoring/SKILL.md +0 -115
- package/templates/default/locales/fr/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
- package/templates/default/locales/fr/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
- package/templates/default/locales/fr/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
- package/templates/default/locales/fr/.mustflow/skills/result-option/SKILL.md +0 -186
- package/templates/default/locales/fr/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
- package/templates/default/locales/fr/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
- package/templates/default/locales/fr/.mustflow/skills/skill-authoring/SKILL.md +0 -110
- package/templates/default/locales/fr/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
- package/templates/default/locales/fr/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
- package/templates/default/locales/fr/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
- package/templates/default/locales/fr/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
- package/templates/default/locales/fr/.mustflow/skills/test-design-guard/SKILL.md +0 -162
- package/templates/default/locales/fr/.mustflow/skills/test-maintenance/SKILL.md +0 -122
- package/templates/default/locales/fr/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
- package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
- package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
- package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
- package/templates/default/locales/fr/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
- package/templates/default/locales/hi/.mustflow/skills/INDEX.md +0 -75
- package/templates/default/locales/hi/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
- package/templates/default/locales/hi/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
- package/templates/default/locales/hi/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
- package/templates/default/locales/hi/.mustflow/skills/code-review/SKILL.md +0 -115
- package/templates/default/locales/hi/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
- package/templates/default/locales/hi/.mustflow/skills/command-pattern/SKILL.md +0 -247
- package/templates/default/locales/hi/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
- package/templates/default/locales/hi/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
- package/templates/default/locales/hi/.mustflow/skills/database-change-safety/SKILL.md +0 -155
- package/templates/default/locales/hi/.mustflow/skills/date-number-audit/SKILL.md +0 -116
- package/templates/default/locales/hi/.mustflow/skills/dependency-injection/SKILL.md +0 -161
- package/templates/default/locales/hi/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
- package/templates/default/locales/hi/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
- package/templates/default/locales/hi/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
- package/templates/default/locales/hi/.mustflow/skills/docs-update/SKILL.md +0 -97
- package/templates/default/locales/hi/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
- package/templates/default/locales/hi/.mustflow/skills/facade-pattern/SKILL.md +0 -210
- package/templates/default/locales/hi/.mustflow/skills/failure-triage/SKILL.md +0 -97
- package/templates/default/locales/hi/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
- package/templates/default/locales/hi/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
- package/templates/default/locales/hi/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
- package/templates/default/locales/hi/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
- package/templates/default/locales/hi/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
- package/templates/default/locales/hi/.mustflow/skills/pattern-scout/SKILL.md +0 -110
- package/templates/default/locales/hi/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
- package/templates/default/locales/hi/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
- package/templates/default/locales/hi/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
- package/templates/default/locales/hi/.mustflow/skills/readme-authoring/SKILL.md +0 -115
- package/templates/default/locales/hi/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
- package/templates/default/locales/hi/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
- package/templates/default/locales/hi/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
- package/templates/default/locales/hi/.mustflow/skills/result-option/SKILL.md +0 -186
- package/templates/default/locales/hi/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
- package/templates/default/locales/hi/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
- package/templates/default/locales/hi/.mustflow/skills/skill-authoring/SKILL.md +0 -110
- package/templates/default/locales/hi/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
- package/templates/default/locales/hi/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
- package/templates/default/locales/hi/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
- package/templates/default/locales/hi/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
- package/templates/default/locales/hi/.mustflow/skills/test-design-guard/SKILL.md +0 -162
- package/templates/default/locales/hi/.mustflow/skills/test-maintenance/SKILL.md +0 -122
- package/templates/default/locales/hi/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
- package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
- package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
- package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
- package/templates/default/locales/hi/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
- package/templates/default/locales/ko/.mustflow/skills/INDEX.md +0 -80
- package/templates/default/locales/ko/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
- package/templates/default/locales/ko/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
- package/templates/default/locales/ko/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
- package/templates/default/locales/ko/.mustflow/skills/code-review/SKILL.md +0 -118
- package/templates/default/locales/ko/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
- package/templates/default/locales/ko/.mustflow/skills/command-pattern/SKILL.md +0 -247
- package/templates/default/locales/ko/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
- package/templates/default/locales/ko/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
- package/templates/default/locales/ko/.mustflow/skills/database-change-safety/SKILL.md +0 -155
- package/templates/default/locales/ko/.mustflow/skills/date-number-audit/SKILL.md +0 -116
- package/templates/default/locales/ko/.mustflow/skills/dependency-injection/SKILL.md +0 -161
- package/templates/default/locales/ko/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
- package/templates/default/locales/ko/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
- package/templates/default/locales/ko/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
- package/templates/default/locales/ko/.mustflow/skills/docs-update/SKILL.md +0 -107
- package/templates/default/locales/ko/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
- package/templates/default/locales/ko/.mustflow/skills/facade-pattern/SKILL.md +0 -210
- package/templates/default/locales/ko/.mustflow/skills/failure-triage/SKILL.md +0 -119
- package/templates/default/locales/ko/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
- package/templates/default/locales/ko/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
- package/templates/default/locales/ko/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
- package/templates/default/locales/ko/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -259
- package/templates/default/locales/ko/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
- package/templates/default/locales/ko/.mustflow/skills/pattern-scout/SKILL.md +0 -110
- package/templates/default/locales/ko/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
- package/templates/default/locales/ko/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
- package/templates/default/locales/ko/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
- package/templates/default/locales/ko/.mustflow/skills/readme-authoring/SKILL.md +0 -115
- package/templates/default/locales/ko/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
- package/templates/default/locales/ko/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
- package/templates/default/locales/ko/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
- package/templates/default/locales/ko/.mustflow/skills/result-option/SKILL.md +0 -186
- package/templates/default/locales/ko/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
- package/templates/default/locales/ko/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
- package/templates/default/locales/ko/.mustflow/skills/skill-authoring/SKILL.md +0 -110
- package/templates/default/locales/ko/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
- package/templates/default/locales/ko/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
- package/templates/default/locales/ko/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
- package/templates/default/locales/ko/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
- package/templates/default/locales/ko/.mustflow/skills/test-design-guard/SKILL.md +0 -162
- package/templates/default/locales/ko/.mustflow/skills/test-maintenance/SKILL.md +0 -130
- package/templates/default/locales/ko/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
- package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
- package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
- package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
- package/templates/default/locales/ko/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
- package/templates/default/locales/zh/.mustflow/skills/INDEX.md +0 -74
- package/templates/default/locales/zh/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
- package/templates/default/locales/zh/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
- package/templates/default/locales/zh/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
- package/templates/default/locales/zh/.mustflow/skills/code-review/SKILL.md +0 -115
- package/templates/default/locales/zh/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
- package/templates/default/locales/zh/.mustflow/skills/command-pattern/SKILL.md +0 -247
- package/templates/default/locales/zh/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
- package/templates/default/locales/zh/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
- package/templates/default/locales/zh/.mustflow/skills/database-change-safety/SKILL.md +0 -155
- package/templates/default/locales/zh/.mustflow/skills/date-number-audit/SKILL.md +0 -116
- package/templates/default/locales/zh/.mustflow/skills/dependency-injection/SKILL.md +0 -161
- package/templates/default/locales/zh/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
- package/templates/default/locales/zh/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
- package/templates/default/locales/zh/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
- package/templates/default/locales/zh/.mustflow/skills/docs-update/SKILL.md +0 -97
- package/templates/default/locales/zh/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
- package/templates/default/locales/zh/.mustflow/skills/facade-pattern/SKILL.md +0 -210
- package/templates/default/locales/zh/.mustflow/skills/failure-triage/SKILL.md +0 -96
- package/templates/default/locales/zh/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
- package/templates/default/locales/zh/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
- package/templates/default/locales/zh/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
- package/templates/default/locales/zh/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
- package/templates/default/locales/zh/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
- package/templates/default/locales/zh/.mustflow/skills/pattern-scout/SKILL.md +0 -110
- package/templates/default/locales/zh/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
- package/templates/default/locales/zh/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
- package/templates/default/locales/zh/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
- package/templates/default/locales/zh/.mustflow/skills/readme-authoring/SKILL.md +0 -115
- package/templates/default/locales/zh/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
- package/templates/default/locales/zh/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
- package/templates/default/locales/zh/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
- package/templates/default/locales/zh/.mustflow/skills/result-option/SKILL.md +0 -186
- package/templates/default/locales/zh/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
- package/templates/default/locales/zh/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
- package/templates/default/locales/zh/.mustflow/skills/skill-authoring/SKILL.md +0 -110
- package/templates/default/locales/zh/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
- package/templates/default/locales/zh/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
- package/templates/default/locales/zh/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
- package/templates/default/locales/zh/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
- package/templates/default/locales/zh/.mustflow/skills/test-design-guard/SKILL.md +0 -162
- package/templates/default/locales/zh/.mustflow/skills/test-maintenance/SKILL.md +0 -122
- package/templates/default/locales/zh/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
- package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
- package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
- package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
- package/templates/default/locales/zh/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
const HANDOFF_SCHEMA_VERSION = '1';
|
|
2
|
+
export const MAX_HANDOFF_RECORD_BYTES = 256 * 1024;
|
|
3
|
+
const MAX_STRING_LENGTH = 2_000;
|
|
4
|
+
const MAX_ARRAY_ITEMS = 100;
|
|
5
|
+
const MAX_OBJECT_DEPTH = 8;
|
|
6
|
+
const ALLOWED_TOP_LEVEL_KEYS = new Set([
|
|
7
|
+
'schema_version',
|
|
8
|
+
'kind',
|
|
9
|
+
'task_id',
|
|
10
|
+
'goal',
|
|
11
|
+
'scope',
|
|
12
|
+
'non_goals',
|
|
13
|
+
'acceptance_criteria',
|
|
14
|
+
'source_refs',
|
|
15
|
+
'changed_surfaces',
|
|
16
|
+
'verification_plan',
|
|
17
|
+
'coverage',
|
|
18
|
+
'remaining_risks',
|
|
19
|
+
'next_restart_point',
|
|
20
|
+
]);
|
|
21
|
+
const ALLOWED_VERIFICATION_PLAN_KEYS = new Set([
|
|
22
|
+
'intent',
|
|
23
|
+
'reason',
|
|
24
|
+
'status',
|
|
25
|
+
'receipt_path',
|
|
26
|
+
'skip_reason',
|
|
27
|
+
]);
|
|
28
|
+
const ALLOWED_COVERAGE_KEYS = new Set(['status', 'requirement', 'evidence', 'gap']);
|
|
29
|
+
const RECORD_KINDS = new Set(['work_item', 'handoff']);
|
|
30
|
+
const COVERAGE_STATUSES = new Set(['covered', 'partial', 'missing', 'blocked']);
|
|
31
|
+
const VERIFICATION_STATUSES = new Set(['planned', 'run', 'skipped']);
|
|
32
|
+
const FORBIDDEN_KEY_RULES = [
|
|
33
|
+
{
|
|
34
|
+
code: 'forbidden_transcript_or_log_field',
|
|
35
|
+
pattern: /^(?:transcript|raw_transcript|chat|conversation|messages|terminal_log|command_log|logs?|stdout|stderr|raw_output|full_output)$/iu,
|
|
36
|
+
message: 'Handoff records must not store raw chats, transcripts, terminal logs, or command output.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
code: 'forbidden_secret_field',
|
|
40
|
+
pattern: /(?:secret|password|token|api[_-]?key|credential|private[_-]?key)/iu,
|
|
41
|
+
message: 'Handoff records must not store secrets, credentials, tokens, or key material.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
code: 'forbidden_hidden_reasoning_field',
|
|
45
|
+
pattern: /(?:reasoning|chain[_-]?of[_-]?thought|hidden[_-]?thoughts?)/iu,
|
|
46
|
+
message: 'Handoff records must not store hidden reasoning or chain-of-thought content.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
code: 'forbidden_memory_field',
|
|
50
|
+
pattern: /(?:memory|memory[_-]?summary|broad[_-]?summary)/iu,
|
|
51
|
+
message: 'Handoff records must not become broad memory summaries.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
code: 'forbidden_worker_state_field',
|
|
55
|
+
pattern: /(?:worker[_-]?state|autonomous[_-]?loop|background[_-]?process|persona|agent[_-]?state)/iu,
|
|
56
|
+
message: 'Handoff records must not store autonomous worker state or background-loop state.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
code: 'forbidden_command_authority_field',
|
|
60
|
+
pattern: /^(?:argv|cmd|run_policy|lifecycle|stdin|timeout_seconds|writes|network|destructive|required_after|skip_validation|agent_action|command_authority)$/iu,
|
|
61
|
+
message: 'Handoff records must not include command-authority fields that bypass commands.toml.',
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
const SECRET_VALUE_RULES = [
|
|
65
|
+
{
|
|
66
|
+
code: 'secret_like_private_key',
|
|
67
|
+
pattern: /-----BEGIN [A-Z ]*PRIVATE KEY-----/u,
|
|
68
|
+
message: 'Value looks like private key material.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
code: 'secret_like_token',
|
|
72
|
+
pattern: /\b(?:sk-[A-Za-z0-9_-]{12,}|ghp_[A-Za-z0-9_]{12,}|github_pat_[A-Za-z0-9_]{12,}|xox[abprs]-[A-Za-z0-9-]{12,})\b/u,
|
|
73
|
+
message: 'Value looks like an API token or service token.',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
code: 'secret_like_aws_access_key',
|
|
77
|
+
pattern: /\bAKIA[0-9A-Z]{16}\b/u,
|
|
78
|
+
message: 'Value looks like an AWS access key.',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
code: 'secret_like_assignment',
|
|
82
|
+
pattern: /\b(?:password|token|secret|api[_-]?key)\s*[:=]\s*\S+/iu,
|
|
83
|
+
message: 'Value looks like an inline secret assignment.',
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
function isRecord(value) {
|
|
87
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
88
|
+
}
|
|
89
|
+
function isString(value) {
|
|
90
|
+
return typeof value === 'string';
|
|
91
|
+
}
|
|
92
|
+
function normalizeKey(value) {
|
|
93
|
+
return value.replaceAll('-', '_').toLowerCase();
|
|
94
|
+
}
|
|
95
|
+
function makeEmptySummary() {
|
|
96
|
+
return {
|
|
97
|
+
scope_count: 0,
|
|
98
|
+
acceptance_criteria_count: 0,
|
|
99
|
+
source_ref_count: 0,
|
|
100
|
+
verification_plan_count: 0,
|
|
101
|
+
coverage_count: 0,
|
|
102
|
+
remaining_risk_count: 0,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function countArray(value) {
|
|
106
|
+
return Array.isArray(value) ? value.length : 0;
|
|
107
|
+
}
|
|
108
|
+
function getSummary(value) {
|
|
109
|
+
if (!isRecord(value)) {
|
|
110
|
+
return makeEmptySummary();
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
scope_count: countArray(value.scope),
|
|
114
|
+
acceptance_criteria_count: countArray(value.acceptance_criteria),
|
|
115
|
+
source_ref_count: countArray(value.source_refs),
|
|
116
|
+
verification_plan_count: countArray(value.verification_plan),
|
|
117
|
+
coverage_count: countArray(value.coverage),
|
|
118
|
+
remaining_risk_count: countArray(value.remaining_risks),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function getRecordKind(value) {
|
|
122
|
+
if (!isRecord(value) || !isString(value.kind) || !RECORD_KINDS.has(value.kind)) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return value.kind;
|
|
126
|
+
}
|
|
127
|
+
function getTaskId(value) {
|
|
128
|
+
return isRecord(value) && isString(value.task_id) ? value.task_id : null;
|
|
129
|
+
}
|
|
130
|
+
function pushIssue(issues, severity, code, path, message) {
|
|
131
|
+
issues.push({ severity, code, path, message });
|
|
132
|
+
}
|
|
133
|
+
function validateString(issues, value, pointer, label, options) {
|
|
134
|
+
if (value === undefined) {
|
|
135
|
+
if (options.required) {
|
|
136
|
+
pushIssue(issues, 'error', 'missing_required_field', pointer, `${label} is required.`);
|
|
137
|
+
}
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (!isString(value)) {
|
|
141
|
+
pushIssue(issues, 'error', 'invalid_string', pointer, `${label} must be a string.`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (options.nonEmpty && value.trim().length === 0) {
|
|
145
|
+
pushIssue(issues, 'error', 'empty_string', pointer, `${label} must not be empty.`);
|
|
146
|
+
}
|
|
147
|
+
if (value.length > MAX_STRING_LENGTH) {
|
|
148
|
+
pushIssue(issues, 'error', 'string_too_long', pointer, `${label} is too long for a restart pointer record.`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function validateStringArray(issues, value, pointer, label, options) {
|
|
152
|
+
if (value === undefined) {
|
|
153
|
+
if (options.required) {
|
|
154
|
+
pushIssue(issues, 'error', 'missing_required_field', pointer, `${label} is required.`);
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (!Array.isArray(value)) {
|
|
159
|
+
pushIssue(issues, 'error', 'invalid_array', pointer, `${label} must be an array.`);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (options.nonEmpty && value.length === 0) {
|
|
163
|
+
pushIssue(issues, 'error', 'empty_array', pointer, `${label} must include at least one entry.`);
|
|
164
|
+
}
|
|
165
|
+
if (value.length > MAX_ARRAY_ITEMS) {
|
|
166
|
+
pushIssue(issues, 'error', 'array_too_large', pointer, `${label} has too many entries for a restart pointer.`);
|
|
167
|
+
}
|
|
168
|
+
value.forEach((item, index) => {
|
|
169
|
+
validateString(issues, item, `${pointer}[${index}]`, `${label} item`, {
|
|
170
|
+
required: true,
|
|
171
|
+
nonEmpty: true,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function validateAllowedKeys(issues, record, allowedKeys, pointer) {
|
|
176
|
+
for (const key of Object.keys(record)) {
|
|
177
|
+
if (!allowedKeys.has(key)) {
|
|
178
|
+
pushIssue(issues, 'error', 'unknown_field', `${pointer}.${key}`, `Field is not part of the handoff record contract.`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function validateVerificationPlan(issues, value) {
|
|
183
|
+
if (value === undefined) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (!Array.isArray(value)) {
|
|
187
|
+
pushIssue(issues, 'error', 'invalid_array', '$.verification_plan', 'verification_plan must be an array.');
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (value.length > MAX_ARRAY_ITEMS) {
|
|
191
|
+
pushIssue(issues, 'error', 'array_too_large', '$.verification_plan', 'verification_plan has too many entries for a restart pointer.');
|
|
192
|
+
}
|
|
193
|
+
value.forEach((entry, index) => {
|
|
194
|
+
const pointer = `$.verification_plan[${index}]`;
|
|
195
|
+
if (!isRecord(entry)) {
|
|
196
|
+
pushIssue(issues, 'error', 'invalid_object', pointer, 'verification_plan entries must be objects.');
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
validateAllowedKeys(issues, entry, ALLOWED_VERIFICATION_PLAN_KEYS, pointer);
|
|
200
|
+
validateString(issues, entry.intent, `${pointer}.intent`, 'intent', { required: true, nonEmpty: true });
|
|
201
|
+
validateString(issues, entry.reason, `${pointer}.reason`, 'reason', { required: true, nonEmpty: true });
|
|
202
|
+
if (!isString(entry.status) || !VERIFICATION_STATUSES.has(entry.status)) {
|
|
203
|
+
pushIssue(issues, 'error', 'invalid_verification_status', `${pointer}.status`, 'status must be one of planned, run, or skipped.');
|
|
204
|
+
}
|
|
205
|
+
validateString(issues, entry.receipt_path, `${pointer}.receipt_path`, 'receipt_path', {
|
|
206
|
+
required: false,
|
|
207
|
+
nonEmpty: true,
|
|
208
|
+
});
|
|
209
|
+
validateString(issues, entry.skip_reason, `${pointer}.skip_reason`, 'skip_reason', {
|
|
210
|
+
required: false,
|
|
211
|
+
nonEmpty: true,
|
|
212
|
+
});
|
|
213
|
+
if (entry.status === 'skipped' && entry.skip_reason === undefined) {
|
|
214
|
+
pushIssue(issues, 'error', 'missing_skip_reason', `${pointer}.skip_reason`, 'Skipped verification must explain why it was skipped.');
|
|
215
|
+
}
|
|
216
|
+
if (entry.status !== 'run' && entry.receipt_path !== undefined) {
|
|
217
|
+
pushIssue(issues, 'error', 'unrun_verification_receipt_claim', `${pointer}.receipt_path`, 'Only verification entries with status run may include a receipt_path.');
|
|
218
|
+
}
|
|
219
|
+
if (entry.status !== 'skipped' && entry.skip_reason !== undefined) {
|
|
220
|
+
pushIssue(issues, 'warning', 'unused_skip_reason', `${pointer}.skip_reason`, 'skip_reason is meaningful only when status is skipped.');
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
function validateCoverage(issues, value) {
|
|
225
|
+
if (value === undefined) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (!Array.isArray(value)) {
|
|
229
|
+
pushIssue(issues, 'error', 'invalid_array', '$.coverage', 'coverage must be an array.');
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (value.length > MAX_ARRAY_ITEMS) {
|
|
233
|
+
pushIssue(issues, 'error', 'array_too_large', '$.coverage', 'coverage has too many entries for a restart pointer.');
|
|
234
|
+
}
|
|
235
|
+
value.forEach((entry, index) => {
|
|
236
|
+
const pointer = `$.coverage[${index}]`;
|
|
237
|
+
if (!isRecord(entry)) {
|
|
238
|
+
pushIssue(issues, 'error', 'invalid_object', pointer, 'coverage entries must be objects.');
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
validateAllowedKeys(issues, entry, ALLOWED_COVERAGE_KEYS, pointer);
|
|
242
|
+
if (!isString(entry.status) || !COVERAGE_STATUSES.has(entry.status)) {
|
|
243
|
+
pushIssue(issues, 'error', 'invalid_coverage_status', `${pointer}.status`, 'coverage status must be one of covered, partial, missing, or blocked.');
|
|
244
|
+
}
|
|
245
|
+
validateString(issues, entry.requirement, `${pointer}.requirement`, 'requirement', {
|
|
246
|
+
required: false,
|
|
247
|
+
nonEmpty: true,
|
|
248
|
+
});
|
|
249
|
+
validateStringArray(issues, entry.evidence, `${pointer}.evidence`, 'evidence', {
|
|
250
|
+
required: false,
|
|
251
|
+
nonEmpty: false,
|
|
252
|
+
});
|
|
253
|
+
validateString(issues, entry.gap, `${pointer}.gap`, 'gap', { required: false, nonEmpty: true });
|
|
254
|
+
if (entry.status === 'covered' && (!Array.isArray(entry.evidence) || entry.evidence.length === 0)) {
|
|
255
|
+
pushIssue(issues, 'warning', 'covered_without_evidence', `${pointer}.evidence`, 'covered entries should name the guard, file, or receipt that supports the claim.');
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
function scanForbiddenKeysAndValues(issues, value, pointer, depth = 0) {
|
|
260
|
+
if (depth > MAX_OBJECT_DEPTH) {
|
|
261
|
+
pushIssue(issues, 'error', 'record_too_deep', pointer, 'Handoff records must stay shallow restart pointers.');
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (isString(value)) {
|
|
265
|
+
for (const rule of SECRET_VALUE_RULES) {
|
|
266
|
+
if (rule.pattern.test(value)) {
|
|
267
|
+
pushIssue(issues, 'error', rule.code, pointer, rule.message);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (/[A-Z]:\\Users\\/u.test(value) || /\/home\/[^/\s]+/u.test(value)) {
|
|
271
|
+
pushIssue(issues, 'warning', 'personal_path_candidate', pointer, 'Value looks like a personal local path; use repository-relative paths when possible.');
|
|
272
|
+
}
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (Array.isArray(value)) {
|
|
276
|
+
value.forEach((item, index) => scanForbiddenKeysAndValues(issues, item, `${pointer}[${index}]`, depth + 1));
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (!isRecord(value)) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
283
|
+
const nestedPointer = pointer === '$' ? `$.${key}` : `${pointer}.${key}`;
|
|
284
|
+
const normalizedKey = normalizeKey(key);
|
|
285
|
+
for (const rule of FORBIDDEN_KEY_RULES) {
|
|
286
|
+
if (rule.pattern.test(normalizedKey)) {
|
|
287
|
+
pushIssue(issues, 'error', rule.code, nestedPointer, rule.message);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
scanForbiddenKeysAndValues(issues, nestedValue, nestedPointer, depth + 1);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function validateRecordShape(issues, value) {
|
|
294
|
+
if (!isRecord(value)) {
|
|
295
|
+
pushIssue(issues, 'error', 'invalid_record', '$', 'Handoff record must be a JSON object.');
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
validateAllowedKeys(issues, value, ALLOWED_TOP_LEVEL_KEYS, '$');
|
|
299
|
+
if (value.schema_version !== HANDOFF_SCHEMA_VERSION) {
|
|
300
|
+
pushIssue(issues, 'error', 'invalid_schema_version', '$.schema_version', 'schema_version must be "1".');
|
|
301
|
+
}
|
|
302
|
+
if (!isString(value.kind) || !RECORD_KINDS.has(value.kind)) {
|
|
303
|
+
pushIssue(issues, 'error', 'invalid_kind', '$.kind', 'kind must be work_item or handoff.');
|
|
304
|
+
}
|
|
305
|
+
validateString(issues, value.task_id, '$.task_id', 'task_id', { required: true, nonEmpty: true });
|
|
306
|
+
validateString(issues, value.goal, '$.goal', 'goal', { required: true, nonEmpty: true });
|
|
307
|
+
validateStringArray(issues, value.scope, '$.scope', 'scope', { required: true, nonEmpty: true });
|
|
308
|
+
validateStringArray(issues, value.non_goals, '$.non_goals', 'non_goals', { required: false, nonEmpty: false });
|
|
309
|
+
validateStringArray(issues, value.acceptance_criteria, '$.acceptance_criteria', 'acceptance_criteria', {
|
|
310
|
+
required: true,
|
|
311
|
+
nonEmpty: true,
|
|
312
|
+
});
|
|
313
|
+
validateStringArray(issues, value.source_refs, '$.source_refs', 'source_refs', {
|
|
314
|
+
required: true,
|
|
315
|
+
nonEmpty: true,
|
|
316
|
+
});
|
|
317
|
+
validateStringArray(issues, value.changed_surfaces, '$.changed_surfaces', 'changed_surfaces', {
|
|
318
|
+
required: false,
|
|
319
|
+
nonEmpty: false,
|
|
320
|
+
});
|
|
321
|
+
validateVerificationPlan(issues, value.verification_plan);
|
|
322
|
+
validateCoverage(issues, value.coverage);
|
|
323
|
+
validateStringArray(issues, value.remaining_risks, '$.remaining_risks', 'remaining_risks', {
|
|
324
|
+
required: false,
|
|
325
|
+
nonEmpty: false,
|
|
326
|
+
});
|
|
327
|
+
validateString(issues, value.next_restart_point, '$.next_restart_point', 'next_restart_point', {
|
|
328
|
+
required: true,
|
|
329
|
+
nonEmpty: true,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
export function validateHandoffRecord(value, options) {
|
|
333
|
+
const issues = [];
|
|
334
|
+
validateRecordShape(issues, value);
|
|
335
|
+
scanForbiddenKeysAndValues(issues, value, '$');
|
|
336
|
+
const hasErrors = issues.some((issue) => issue.severity === 'error');
|
|
337
|
+
return {
|
|
338
|
+
schema_version: HANDOFF_SCHEMA_VERSION,
|
|
339
|
+
command: 'handoff_validate',
|
|
340
|
+
ok: !hasErrors,
|
|
341
|
+
mustflow_root: options.mustflowRoot,
|
|
342
|
+
path: options.path,
|
|
343
|
+
record_kind: getRecordKind(value),
|
|
344
|
+
task_id: getTaskId(value),
|
|
345
|
+
summary: getSummary(value),
|
|
346
|
+
issues,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
export function validateHandoffRecordJson(content, options) {
|
|
350
|
+
let parsed;
|
|
351
|
+
try {
|
|
352
|
+
parsed = JSON.parse(content);
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
356
|
+
return {
|
|
357
|
+
schema_version: HANDOFF_SCHEMA_VERSION,
|
|
358
|
+
command: 'handoff_validate',
|
|
359
|
+
ok: false,
|
|
360
|
+
mustflow_root: options.mustflowRoot,
|
|
361
|
+
path: options.path,
|
|
362
|
+
record_kind: null,
|
|
363
|
+
task_id: null,
|
|
364
|
+
summary: makeEmptySummary(),
|
|
365
|
+
issues: [
|
|
366
|
+
{
|
|
367
|
+
severity: 'error',
|
|
368
|
+
code: 'invalid_json',
|
|
369
|
+
path: '$',
|
|
370
|
+
message: `Handoff record must be valid JSON: ${message}`,
|
|
371
|
+
},
|
|
372
|
+
],
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
return validateHandoffRecord(parsed, options);
|
|
376
|
+
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
const PUBLIC_JSON_SCHEMA_CONTRACTS = [
|
|
2
|
+
{
|
|
3
|
+
id: 'adapter-compatibility-report',
|
|
4
|
+
schemaFile: 'adapter-compatibility-report.schema.json',
|
|
5
|
+
producer: 'mf adapters status --json',
|
|
6
|
+
packaged: true,
|
|
7
|
+
documented: true,
|
|
8
|
+
installedCommand: ['mf', 'adapters', 'status', '--json'],
|
|
9
|
+
},
|
|
2
10
|
{
|
|
3
11
|
id: 'doctor-report',
|
|
4
12
|
schemaFile: 'doctor-report.schema.json',
|
|
@@ -38,6 +46,13 @@ const PUBLIC_JSON_SCHEMA_CONTRACTS = [
|
|
|
38
46
|
documented: true,
|
|
39
47
|
installedCommand: ['mf', 'contract-lint', '--json'],
|
|
40
48
|
},
|
|
49
|
+
{
|
|
50
|
+
id: 'dashboard-export',
|
|
51
|
+
schemaFile: 'dashboard-export.schema.json',
|
|
52
|
+
producer: 'mf dashboard --export-json <path>',
|
|
53
|
+
packaged: true,
|
|
54
|
+
documented: true,
|
|
55
|
+
},
|
|
41
56
|
{
|
|
42
57
|
id: 'classify-report',
|
|
43
58
|
schemaFile: 'classify-report.schema.json',
|
|
@@ -63,6 +78,14 @@ const PUBLIC_JSON_SCHEMA_CONTRACTS = [
|
|
|
63
78
|
installedCommand: ['mf', 'line-endings', 'check', '--json'],
|
|
64
79
|
expectedExitCodes: [0, 1],
|
|
65
80
|
},
|
|
81
|
+
{
|
|
82
|
+
id: 'handoff-validation-report',
|
|
83
|
+
schemaFile: 'handoff-validation-report.schema.json',
|
|
84
|
+
producer: 'mf handoff validate <path> --json',
|
|
85
|
+
packaged: true,
|
|
86
|
+
documented: true,
|
|
87
|
+
expectedExitCodes: [0, 1],
|
|
88
|
+
},
|
|
66
89
|
{
|
|
67
90
|
id: 'version-sources-report',
|
|
68
91
|
schemaFile: 'version-sources-report.schema.json',
|