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
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Languages: [English](README.md) · [한국어](docs/i18n/ko/README.md) · [中文](docs/i18n/zh/README.md) · [Español](docs/i18n/es/README.md) · [Français](docs/i18n/fr/README.md) · [हिन्दी](docs/i18n/hi/README.md)
|
|
4
4
|
|
|
5
|
-
mustflow is a
|
|
5
|
+
mustflow is a repository-local work contract and verification CLI for LLM coding agents. It keeps agents inside explicit read, command, and verification boundaries without replacing the host agent's sandbox, approval, checkpoint, model, or tool policies.
|
|
6
6
|
|
|
7
|
-
The core concept is straightforward: place `AGENTS.md` at the project root and keep detailed workflows under `.mustflow/`. Agents start from `AGENTS.md
|
|
7
|
+
The core concept is straightforward: place `AGENTS.md` at the project root and keep detailed workflows under `.mustflow/`. Agents start from `AGENTS.md`, then follow the repository command contract, skills, project context, and verification rules in sequence.
|
|
8
8
|
|
|
9
9
|
- Documentation site: <https://0disoft.github.io/mustflow/>
|
|
10
10
|
- Human-readable project examples: [`examples/`](examples/)
|
|
@@ -106,13 +106,16 @@ mustflow installs and validates an agent workflow for user projects.
|
|
|
106
106
|
- Installs `AGENTS.md` and `.mustflow/**` workflow files.
|
|
107
107
|
- Declares runnable command rules in `.mustflow/config/commands.toml`.
|
|
108
108
|
- Checks installation health and configuration structure with `mf check` and `mf doctor`.
|
|
109
|
+
- Reports host adapter compatibility with `mf adapters status` without generating host-specific files or treating them as command authority.
|
|
109
110
|
- Classifies changed files, public surfaces, and validation reasons with `mf classify`.
|
|
110
|
-
- Prints execution-free verification plans with `mf verify --plan-only --json`, including read-only local-index lock explanations when available.
|
|
111
|
+
- Prints execution-free verification plans with `mf verify --plan-only --json`, including a machine-readable verification decision graph and read-only local-index lock explanations when available.
|
|
111
112
|
- Runs only allowed one-shot commands within a timeout via `mf run <intent>` or `mf verify` when the selected intent is runnable.
|
|
112
113
|
- Writes command receipts to `.mustflow/state/runs/latest.json`.
|
|
113
114
|
- Generates a concise repository navigation map, `REPO_MAP.md`, with `mf map`.
|
|
114
|
-
- Indexes and searches mustflow docs, skills, skill routes, command rules, command-effect locks, file fingerprints, and opt-in source anchor metadata with SQLite via `mf index` and `mf search`. The local SQLite file is a rebuildable lookup cache, not a memory store, audit log, command transcript store, or source-content database.
|
|
115
|
+
- Indexes and searches mustflow docs, skills, skill routes, command rules, command-effect locks, file fingerprints, and opt-in source anchor metadata with SQLite via `mf index` and `mf search`. The local SQLite file is a rebuildable lookup cache, not a memory store, audit log, command transcript store, command-authority source, or source-content database.
|
|
115
116
|
- Tracks agent-created or agent-modified documentation needing prose review with `mf docs review`.
|
|
117
|
+
- Validates restricted work-item or handoff JSON records with `mf handoff validate` without creating backlog files, storing transcripts, or granting command authority.
|
|
118
|
+
- Exports bounded static dashboard reports with `mf dashboard --export-json <path>` or `mf dashboard --export <path>` for pull requests and continuous integration artifacts. The export includes a `harness_report` summary for install state, changed surfaces, verification decisions, latest receipt metadata, document-review status, and remaining risks without raw command-output tails or mutation controls.
|
|
116
119
|
- Previews and applies bundled template updates safely with `mf update`.
|
|
117
120
|
- Publishes JSON Schemas for automation-facing reports and command contracts in `schemas/`.
|
|
118
121
|
|
|
@@ -173,6 +176,8 @@ your-project/
|
|
|
173
176
|
│ └─ SKILL.md
|
|
174
177
|
├─ external-prompt-injection-defense/
|
|
175
178
|
│ └─ SKILL.md
|
|
179
|
+
├─ external-skill-intake/
|
|
180
|
+
│ └─ SKILL.md
|
|
176
181
|
├─ failure-triage/
|
|
177
182
|
│ └─ SKILL.md
|
|
178
183
|
├─ instruction-conflict-scope-check/
|
|
@@ -207,6 +212,8 @@ your-project/
|
|
|
207
212
|
│ └─ SKILL.md
|
|
208
213
|
├─ test-maintenance/
|
|
209
214
|
│ └─ SKILL.md
|
|
215
|
+
├─ vertical-slice-tdd/
|
|
216
|
+
│ └─ SKILL.md
|
|
210
217
|
├─ ui-quality-gate/
|
|
211
218
|
│ └─ SKILL.md
|
|
212
219
|
├─ visual-review-artifact/
|
|
@@ -261,6 +268,14 @@ npx mf update --dry-run
|
|
|
261
268
|
npx mf update --apply
|
|
262
269
|
```
|
|
263
270
|
|
|
271
|
+
After updating the mustflow package, `mf upgrade` combines the package freshness check with the safe project-file update step. It does not install packages by itself; update npm, pnpm, or Bun first.
|
|
272
|
+
|
|
273
|
+
```sh
|
|
274
|
+
bun update -g mustflow
|
|
275
|
+
mf upgrade --dry-run
|
|
276
|
+
mf upgrade
|
|
277
|
+
```
|
|
278
|
+
|
|
264
279
|
Agents should prefer the configured update intents so the repository receives a run receipt.
|
|
265
280
|
|
|
266
281
|
```sh
|
|
@@ -278,6 +293,7 @@ mf run mustflow_update_apply
|
|
|
278
293
|
| `mf init --force` | Back up conflicting files, then overwrite them. |
|
|
279
294
|
| `mf check` | Validate mustflow files, TOML configuration, and skill document shape. |
|
|
280
295
|
| `mf check --strict` | Run additional safety checks for document identity, authority/lifecycle metadata, skill index/body alignment, skill metadata, command boundaries, version-source discovery, retention policy, output limits, raw logs, and secret-like context. |
|
|
296
|
+
| `mf adapters status` | Inspect existing host-specific instruction and adapter files without generating adapter files or granting command authority. |
|
|
281
297
|
| `mf classify --changed` | Classify changed paths, public surfaces, and validation reasons without modifying files. |
|
|
282
298
|
| `mf contract-lint` | Inspect `.mustflow/config/commands.toml` for command-contract errors and warnings without running commands. |
|
|
283
299
|
| `mf doctor` | Inspect the current mustflow root without writing files. |
|
|
@@ -285,17 +301,21 @@ mf run mustflow_update_apply
|
|
|
285
301
|
| `mf docs review add <path>` | Add or refresh a document review queue entry. |
|
|
286
302
|
| `mf docs review comment <path>` | Add multiline review guidance to an existing queue entry. |
|
|
287
303
|
| `mf docs review approve <path>` | Mark review complete and hide the document from the default queue. |
|
|
304
|
+
| `mf handoff validate <path>` | Validate a restricted work-item or handoff JSON record without writing files. |
|
|
288
305
|
| `mf context --json` | Print read order, command rules, available capabilities, and recent run summary as JSON. |
|
|
289
306
|
| `mf map --stdout` | Print the current mustflow root map to stdout. |
|
|
290
307
|
| `mf map --write` | Create or update `REPO_MAP.md`. |
|
|
291
308
|
| `mf run <intent>` | Run an allowed one-shot command. |
|
|
309
|
+
| `mf run <intent> --dry-run --json` | Preview whether an intent is runnable and what command metadata would be used, without executing it. |
|
|
292
310
|
| `mf index` | Build a SQLite index for mustflow docs, skill routes, command rules, command-effect locks, and file fingerprints. Use `--incremental` to reuse a compatible fresh index without rewriting it. |
|
|
293
311
|
| `mf search <query>` | Search docs, skills, skill routes, command rules, and command-effect locks in the SQLite index. |
|
|
294
312
|
| `mf status` | Inspect installed state and changed or missing files. |
|
|
295
313
|
| `mf update --dry-run` | Calculate a template update plan without writing files. |
|
|
296
314
|
| `mf update --apply` | Apply template updates when nothing is blocked. |
|
|
315
|
+
| `mf upgrade` | Check package freshness, then apply safe bundled template updates when the package is current. |
|
|
316
|
+
| `mf upgrade --dry-run` | Check package freshness and print the safe project update plan without writing files. |
|
|
297
317
|
| `mf help <topic>` | Show installed mustflow help. |
|
|
298
|
-
| `mf dashboard` | Start a local inspection dashboard for status, verification recommendations, release/version-source status, template update readiness, latest run receipt, skill routes, safe preferences, and documentation review. It does not execute commands or apply fixes. |
|
|
318
|
+
| `mf dashboard` | Start a local inspection dashboard for status, verification recommendations, release/version-source status, template update readiness, latest run receipt, skill routes, safe preferences, and documentation review. Use `--export-json <path>` or `--export <path>` for a bounded static report. It does not execute commands or apply fixes. |
|
|
299
319
|
| `mf version` | Print the installed mustflow package version. |
|
|
300
320
|
| `mf version --check` | Compare the installed package version with the latest npm release and print an update command if a newer version exists. |
|
|
301
321
|
| `mf version-sources` | Inspect detected package, template, and declared version sources without modifying files. |
|
|
@@ -322,9 +342,9 @@ Runnable work is declared in `.mustflow/config/commands.toml` so agents do not g
|
|
|
322
342
|
|
|
323
343
|
Development servers, watch modes, browser UIs, interactive commands, and background processes do not run directly.
|
|
324
344
|
|
|
325
|
-
Use `mf verify --reason <event> --plan-only --json` to inspect matching verification intents and missing runnable coverage without executing commands. When `.mustflow/cache/mustflow.sqlite` is fresh, scheduled entries include read-only `effectGraph` metadata for write locks and lock conflicts.
|
|
345
|
+
Use `mf verify --reason <event> --plan-only --json` to inspect matching verification intents, command eligibility, remaining gaps, and missing runnable coverage without executing commands. Use `mf run <intent> --dry-run --json` to inspect one resolved command intent without spawning a process or writing a run receipt. Plan-only verification includes a `decision_graph` that connects changed surfaces, classification reasons, command candidates, eligibility checks, effects, and gaps. When `.mustflow/cache/mustflow.sqlite` is fresh, scheduled entries also include read-only `effectGraph` metadata for write locks and lock conflicts. These graph rows are marked `explanation_only` and never grant command authority; `.mustflow/config/commands.toml` remains the only runnable command source.
|
|
326
346
|
|
|
327
|
-
Each command run writes the latest run record to `.mustflow/state/runs/latest.json`. The record includes the intent name, working directory, timeout, exit code, timeout status, and the tail of stdout and stderr.
|
|
347
|
+
Each executed command run writes the latest run record to `.mustflow/state/runs/latest.json`. The record includes the intent name, working directory, timeout, exit code, timeout status, and the tail of stdout and stderr.
|
|
328
348
|
|
|
329
349
|
## Language and profiles
|
|
330
350
|
|
|
@@ -377,7 +397,7 @@ Versioned contract specifications live in `docs/spec/`. The documentation site l
|
|
|
377
397
|
These are ideas not yet officially supported:
|
|
378
398
|
|
|
379
399
|
- Community skill registry and skill pack installs
|
|
380
|
-
- Optional `.mustflow/work-items/`
|
|
400
|
+
- Optional `.mustflow/work-items/` writers and lifecycle commands
|
|
381
401
|
- `mf orient`, `mf refresh`
|
|
382
402
|
- Tool-specific adapters
|
|
383
403
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { inspectAdapterCompatibility } from '../../core/adapter-compatibility.js';
|
|
2
|
+
import { printUsageError, renderHelp } from '../lib/cli-output.js';
|
|
3
|
+
import { t } from '../lib/i18n.js';
|
|
4
|
+
import { resolveMustflowRoot } from '../lib/project-root.js';
|
|
5
|
+
export function getAdaptersHelp(lang = 'en') {
|
|
6
|
+
return renderHelp({
|
|
7
|
+
usage: 'mf adapters status [options]',
|
|
8
|
+
summary: t(lang, 'adapters.help.summary'),
|
|
9
|
+
options: [
|
|
10
|
+
{ label: '--json', description: t(lang, 'cli.option.json') },
|
|
11
|
+
{ label: '-h, --help', description: t(lang, 'cli.option.help') },
|
|
12
|
+
],
|
|
13
|
+
examples: ['mf adapters status', 'mf adapters status --json'],
|
|
14
|
+
exitCodes: [
|
|
15
|
+
{ label: '0', description: t(lang, 'adapters.help.exit.ok') },
|
|
16
|
+
{ label: '1', description: t(lang, 'adapters.help.exit.fail') },
|
|
17
|
+
],
|
|
18
|
+
}, lang);
|
|
19
|
+
}
|
|
20
|
+
function parseAdaptersArgs(args, lang) {
|
|
21
|
+
const [action, ...rest] = args;
|
|
22
|
+
const json = rest.includes('--json');
|
|
23
|
+
const supported = new Set(['--json']);
|
|
24
|
+
const unsupported = rest.find((arg) => arg.startsWith('-') && !supported.has(arg));
|
|
25
|
+
if (!action) {
|
|
26
|
+
return {
|
|
27
|
+
action: 'status',
|
|
28
|
+
json,
|
|
29
|
+
error: t(lang, 'adapters.error.missingAction'),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (action !== 'status') {
|
|
33
|
+
return {
|
|
34
|
+
action: 'status',
|
|
35
|
+
json,
|
|
36
|
+
error: t(lang, 'adapters.error.unknownAction', { action }),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (unsupported) {
|
|
40
|
+
return { action, json, error: t(lang, 'cli.error.unknownOption', { option: unsupported }) };
|
|
41
|
+
}
|
|
42
|
+
if (rest.some((arg) => !arg.startsWith('-'))) {
|
|
43
|
+
const unexpected = rest.find((arg) => !arg.startsWith('-'));
|
|
44
|
+
return { action, json, error: t(lang, 'cli.error.unexpectedArgument', { argument: unexpected }) };
|
|
45
|
+
}
|
|
46
|
+
return { action, json };
|
|
47
|
+
}
|
|
48
|
+
function renderAdapterReport(report, lang) {
|
|
49
|
+
const lines = [
|
|
50
|
+
t(lang, 'adapters.title'),
|
|
51
|
+
`${t(lang, 'label.mustflowRoot')}: ${report.mustflow_root}`,
|
|
52
|
+
`${t(lang, 'adapters.label.agents')}: ${report.agents_file.present ? t(lang, 'value.yes') : t(lang, 'value.no')}`,
|
|
53
|
+
`${t(lang, 'adapters.label.hostInstructionFiles')}: ${report.summary.host_instruction_files}`,
|
|
54
|
+
`${t(lang, 'adapters.label.adapterSurfaces')}: ${report.summary.adapter_surfaces_present}`,
|
|
55
|
+
`${t(lang, 'adapters.label.compatibilityNotes')}: ${report.summary.compatibility_notes}`,
|
|
56
|
+
`${t(lang, 'adapters.label.requiredChanges')}: ${report.summary.required_changes}`,
|
|
57
|
+
`${t(lang, 'adapters.label.commandAuthority')}: ${report.boundaries.command_authority}`,
|
|
58
|
+
];
|
|
59
|
+
if (report.required_changes.length > 0) {
|
|
60
|
+
lines.push('', t(lang, 'adapters.label.requiredChanges'));
|
|
61
|
+
for (const finding of report.required_changes) {
|
|
62
|
+
lines.push(`- [${finding.severity}] ${finding.path ?? '-'}: ${finding.message}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (report.compatibility_notes.length > 0) {
|
|
66
|
+
lines.push('', t(lang, 'adapters.label.compatibilityNotes'));
|
|
67
|
+
for (const finding of report.compatibility_notes) {
|
|
68
|
+
lines.push(`- [${finding.severity}] ${finding.path ?? '-'}: ${finding.message}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return lines.join('\n');
|
|
72
|
+
}
|
|
73
|
+
export function runAdapters(args, reporter, lang = 'en') {
|
|
74
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
75
|
+
reporter.stdout(getAdaptersHelp(lang));
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
const options = parseAdaptersArgs(args, lang);
|
|
79
|
+
if (options.error) {
|
|
80
|
+
printUsageError(reporter, options.error, 'mf adapters --help', getAdaptersHelp(lang), lang);
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
const report = inspectAdapterCompatibility(resolveMustflowRoot());
|
|
84
|
+
if (options.json) {
|
|
85
|
+
reporter.stdout(JSON.stringify(report, null, 2));
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
reporter.stdout(renderAdapterReport(report, lang));
|
|
89
|
+
return 0;
|
|
90
|
+
}
|
|
@@ -40,9 +40,8 @@ function parseClassifyArgs(args) {
|
|
|
40
40
|
}
|
|
41
41
|
return { json, changed, paths };
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
const files = parsed.changed ? readGitChangedFiles(projectRoot) : parsed.paths;
|
|
43
|
+
export function createClassifyOutput(projectRoot, source, paths) {
|
|
44
|
+
const files = source === 'changed' ? readGitChangedFiles(projectRoot) : paths;
|
|
46
45
|
return {
|
|
47
46
|
schema_version: CLASSIFY_SCHEMA_VERSION,
|
|
48
47
|
command: 'classify',
|
|
@@ -94,7 +93,7 @@ export function runClassify(args, reporter, lang = 'en') {
|
|
|
94
93
|
printUsageError(reporter, t(lang, 'classify.error.missingInput'), 'mf classify --help', getClassifyHelp(lang), lang);
|
|
95
94
|
return 1;
|
|
96
95
|
}
|
|
97
|
-
const output =
|
|
96
|
+
const output = createClassifyOutput(resolveMustflowRoot(), parsed.changed ? 'changed' : 'paths', parsed.paths);
|
|
98
97
|
if (parsed.json) {
|
|
99
98
|
reporter.stdout(JSON.stringify(output, null, 2));
|
|
100
99
|
return 0;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
1
3
|
import { lintCommandContract } from '../../core/contract-lint.js';
|
|
2
|
-
import { readCommandContract } from '../../core/config-loading.js';
|
|
4
|
+
import { readCommandContract, isRecord } from '../../core/config-loading.js';
|
|
5
|
+
import { readTomlFile } from '../../core/toml.js';
|
|
6
|
+
import { releaseVersioningIsEnabled } from '../../core/version-sources.js';
|
|
3
7
|
import { printUsageError, renderHelp } from '../lib/cli-output.js';
|
|
4
8
|
import { t } from '../lib/i18n.js';
|
|
5
9
|
import { resolveMustflowRoot } from '../lib/project-root.js';
|
|
@@ -9,22 +13,35 @@ export function getContractLintHelp(lang = 'en') {
|
|
|
9
13
|
usage: 'mf contract-lint [options]',
|
|
10
14
|
summary: t(lang, 'contractLint.help.summary'),
|
|
11
15
|
options: [
|
|
16
|
+
{ label: '--coverage', description: t(lang, 'contractLint.help.option.coverage') },
|
|
12
17
|
{ label: '--json', description: t(lang, 'cli.option.json') },
|
|
13
18
|
{ label: '-h, --help', description: t(lang, 'cli.option.help') },
|
|
14
19
|
],
|
|
15
|
-
examples: ['mf contract-lint', 'mf contract-lint --json'],
|
|
20
|
+
examples: ['mf contract-lint', 'mf contract-lint --coverage', 'mf contract-lint --coverage --json'],
|
|
16
21
|
exitCodes: [
|
|
17
22
|
{ label: '0', description: t(lang, 'contractLint.help.exit.ok') },
|
|
18
23
|
{ label: '1', description: t(lang, 'contractLint.help.exit.fail') },
|
|
19
24
|
],
|
|
20
25
|
}, lang);
|
|
21
26
|
}
|
|
22
|
-
function
|
|
27
|
+
function readPreferences(projectRoot) {
|
|
28
|
+
const preferencesPath = path.join(projectRoot, '.mustflow', 'config', 'preferences.toml');
|
|
29
|
+
if (!existsSync(preferencesPath)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const preferences = readTomlFile(preferencesPath);
|
|
33
|
+
return isRecord(preferences) ? preferences : undefined;
|
|
34
|
+
}
|
|
35
|
+
function createContractLintOutput(projectRoot, coverage) {
|
|
23
36
|
return {
|
|
24
37
|
schema_version: CONTRACT_LINT_SCHEMA_VERSION,
|
|
25
38
|
command: 'contract-lint',
|
|
26
39
|
mustflow_root: projectRoot,
|
|
27
|
-
report: lintCommandContract(readCommandContract(projectRoot)
|
|
40
|
+
report: lintCommandContract(readCommandContract(projectRoot), {
|
|
41
|
+
coverage,
|
|
42
|
+
projectRoot,
|
|
43
|
+
releaseVersioningEnabled: releaseVersioningIsEnabled(readPreferences(projectRoot)),
|
|
44
|
+
}),
|
|
28
45
|
};
|
|
29
46
|
}
|
|
30
47
|
function renderContractLintOutput(output, lang) {
|
|
@@ -43,6 +60,9 @@ function renderContractLintOutput(output, lang) {
|
|
|
43
60
|
t(lang, 'contractLint.label.sourceFiles'),
|
|
44
61
|
...output.report.sourceFiles.map((sourceFile) => `- ${sourceFile}`),
|
|
45
62
|
];
|
|
63
|
+
if (output.report.coverage) {
|
|
64
|
+
lines.push('', t(lang, 'contractLint.label.coverage'), `${t(lang, 'contractLint.label.classificationReasons')}: ${output.report.coverage.knownClassificationReasons.length}`, `${t(lang, 'contractLint.label.requiredAfterReasons')}: ${output.report.coverage.requiredAfterReasons.length}`, `${t(lang, 'contractLint.label.runnableReasons')}: ${output.report.coverage.runnableReasons.length}`, `${t(lang, 'contractLint.label.coverageFindings')}: ${output.report.coverage.findings.length}`);
|
|
65
|
+
}
|
|
46
66
|
if (output.report.issues.length > 0) {
|
|
47
67
|
lines.push('', t(lang, 'contractLint.label.issues'));
|
|
48
68
|
for (const issue of output.report.issues) {
|
|
@@ -57,13 +77,13 @@ export function runContractLint(args, reporter, lang = 'en') {
|
|
|
57
77
|
reporter.stdout(getContractLintHelp(lang));
|
|
58
78
|
return 0;
|
|
59
79
|
}
|
|
60
|
-
const supported = new Set(['--json']);
|
|
80
|
+
const supported = new Set(['--coverage', '--json']);
|
|
61
81
|
const unsupported = args.filter((arg) => !supported.has(arg));
|
|
62
82
|
if (unsupported.length > 0) {
|
|
63
83
|
printUsageError(reporter, t(lang, 'cli.error.unknownOption', { option: unsupported[0] }), 'mf contract-lint --help', getContractLintHelp(lang), lang);
|
|
64
84
|
return 1;
|
|
65
85
|
}
|
|
66
|
-
const output = createContractLintOutput(resolveMustflowRoot());
|
|
86
|
+
const output = createContractLintOutput(resolveMustflowRoot(), args.includes('--coverage'));
|
|
67
87
|
if (args.includes('--json')) {
|
|
68
88
|
reporter.stdout(JSON.stringify(output, null, 2));
|
|
69
89
|
}
|
|
@@ -5,7 +5,9 @@ import path from 'node:path';
|
|
|
5
5
|
import { openPathInFileManager, openUrlInBrowser } from '../lib/browser-open.js';
|
|
6
6
|
import { printUsageError, renderHelp } from '../lib/cli-output.js';
|
|
7
7
|
import { renderDashboardHtml, } from '../lib/dashboard-html.js';
|
|
8
|
+
import { DashboardExportPathError, writeDashboardExport, } from '../lib/dashboard-export.js';
|
|
8
9
|
import { DASHBOARD_VERIFICATION_MAX_FILE_MATCHES, createDashboardVerificationSnapshot, } from '../../core/dashboard-verification.js';
|
|
10
|
+
import { redactSecretLikeText } from '../../core/secret-redaction.js';
|
|
9
11
|
import { parseSkillIndexRoutes } from '../../core/skill-route-alignment.js';
|
|
10
12
|
import { getAgentContext } from '../lib/agent-context.js';
|
|
11
13
|
import { readGitChangedFiles } from '../lib/git-changes.js';
|
|
@@ -79,9 +81,18 @@ export function getDashboardHelp(lang = 'en') {
|
|
|
79
81
|
{ label: '--open', description: t(lang, 'dashboard.help.option.open') },
|
|
80
82
|
{ label: '--no-open', description: t(lang, 'dashboard.help.option.noOpen') },
|
|
81
83
|
{ label: '--json', description: t(lang, 'cli.option.json') },
|
|
84
|
+
{ label: '--export <path>', description: t(lang, 'dashboard.help.option.export') },
|
|
85
|
+
{ label: '--export-json <path>', description: t(lang, 'dashboard.help.option.exportJson') },
|
|
82
86
|
{ label: '-h, --help', description: t(lang, 'cli.option.help') },
|
|
83
87
|
],
|
|
84
|
-
examples: [
|
|
88
|
+
examples: [
|
|
89
|
+
'mf dashboard',
|
|
90
|
+
'mf dashboard --open',
|
|
91
|
+
'mf dashboard --port 4173',
|
|
92
|
+
'mf dashboard --json',
|
|
93
|
+
'mf dashboard --export .mustflow/state/artifacts/dashboard.html',
|
|
94
|
+
'mf dashboard --export-json .mustflow/state/artifacts/dashboard.json',
|
|
95
|
+
],
|
|
85
96
|
exitCodes: [
|
|
86
97
|
{
|
|
87
98
|
label: '0',
|
|
@@ -99,6 +110,9 @@ function parseDashboardOptions(args, lang) {
|
|
|
99
110
|
let port = DEFAULT_DASHBOARD_PORT;
|
|
100
111
|
let json = false;
|
|
101
112
|
let openBrowser = false;
|
|
113
|
+
let exportPath;
|
|
114
|
+
let exportFormat;
|
|
115
|
+
let serverOptionUsed = false;
|
|
102
116
|
for (let index = 0; index < args.length; index += 1) {
|
|
103
117
|
const arg = args[index];
|
|
104
118
|
if (!arg) {
|
|
@@ -107,14 +121,17 @@ function parseDashboardOptions(args, lang) {
|
|
|
107
121
|
if (arg === '--json') {
|
|
108
122
|
json = true;
|
|
109
123
|
openBrowser = false;
|
|
124
|
+
serverOptionUsed = true;
|
|
110
125
|
continue;
|
|
111
126
|
}
|
|
112
127
|
if (arg === '--open') {
|
|
113
128
|
openBrowser = true;
|
|
129
|
+
serverOptionUsed = true;
|
|
114
130
|
continue;
|
|
115
131
|
}
|
|
116
132
|
if (arg === '--no-open') {
|
|
117
133
|
openBrowser = false;
|
|
134
|
+
serverOptionUsed = true;
|
|
118
135
|
continue;
|
|
119
136
|
}
|
|
120
137
|
if (arg === '--host') {
|
|
@@ -123,11 +140,13 @@ function parseDashboardOptions(args, lang) {
|
|
|
123
140
|
return { error: t(lang, 'cli.error.missingValue', { option: '--host' }) };
|
|
124
141
|
}
|
|
125
142
|
host = value;
|
|
143
|
+
serverOptionUsed = true;
|
|
126
144
|
index += 1;
|
|
127
145
|
continue;
|
|
128
146
|
}
|
|
129
147
|
if (arg.startsWith('--host=')) {
|
|
130
148
|
host = arg.slice('--host='.length);
|
|
149
|
+
serverOptionUsed = true;
|
|
131
150
|
continue;
|
|
132
151
|
}
|
|
133
152
|
if (arg === '--port') {
|
|
@@ -140,6 +159,7 @@ function parseDashboardOptions(args, lang) {
|
|
|
140
159
|
return { error: t(lang, 'dashboard.error.invalidPort', { port: value }) };
|
|
141
160
|
}
|
|
142
161
|
port = parsedPort;
|
|
162
|
+
serverOptionUsed = true;
|
|
143
163
|
index += 1;
|
|
144
164
|
continue;
|
|
145
165
|
}
|
|
@@ -150,6 +170,42 @@ function parseDashboardOptions(args, lang) {
|
|
|
150
170
|
return { error: t(lang, 'dashboard.error.invalidPort', { port: value }) };
|
|
151
171
|
}
|
|
152
172
|
port = parsedPort;
|
|
173
|
+
serverOptionUsed = true;
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (arg === '--export' || arg === '--export-json') {
|
|
177
|
+
const value = args[index + 1];
|
|
178
|
+
if (!value || value.startsWith('-')) {
|
|
179
|
+
return { error: t(lang, 'cli.error.missingValue', { option: arg }) };
|
|
180
|
+
}
|
|
181
|
+
if (exportPath) {
|
|
182
|
+
return { error: t(lang, 'dashboard.error.conflictingExportModes') };
|
|
183
|
+
}
|
|
184
|
+
exportPath = value;
|
|
185
|
+
exportFormat = arg === '--export-json' ? 'json' : 'html';
|
|
186
|
+
index += 1;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (arg.startsWith('--export=')) {
|
|
190
|
+
if (exportPath) {
|
|
191
|
+
return { error: t(lang, 'dashboard.error.conflictingExportModes') };
|
|
192
|
+
}
|
|
193
|
+
exportPath = arg.slice('--export='.length);
|
|
194
|
+
exportFormat = 'html';
|
|
195
|
+
if (!exportPath) {
|
|
196
|
+
return { error: t(lang, 'cli.error.missingValue', { option: '--export' }) };
|
|
197
|
+
}
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (arg.startsWith('--export-json=')) {
|
|
201
|
+
if (exportPath) {
|
|
202
|
+
return { error: t(lang, 'dashboard.error.conflictingExportModes') };
|
|
203
|
+
}
|
|
204
|
+
exportPath = arg.slice('--export-json='.length);
|
|
205
|
+
exportFormat = 'json';
|
|
206
|
+
if (!exportPath) {
|
|
207
|
+
return { error: t(lang, 'cli.error.missingValue', { option: '--export-json' }) };
|
|
208
|
+
}
|
|
153
209
|
continue;
|
|
154
210
|
}
|
|
155
211
|
if (arg.startsWith('-')) {
|
|
@@ -157,6 +213,12 @@ function parseDashboardOptions(args, lang) {
|
|
|
157
213
|
}
|
|
158
214
|
return { error: t(lang, 'cli.error.unexpectedArgument', { argument: arg }) };
|
|
159
215
|
}
|
|
216
|
+
if (exportPath && serverOptionUsed) {
|
|
217
|
+
return { error: t(lang, 'dashboard.error.exportServerOptions') };
|
|
218
|
+
}
|
|
219
|
+
if (exportPath) {
|
|
220
|
+
return { options: { host, port, json: false, openBrowser: false, exportPath, exportFormat: exportFormat ?? 'html' } };
|
|
221
|
+
}
|
|
160
222
|
if (!LOCAL_DASHBOARD_HOSTS.has(host)) {
|
|
161
223
|
return { error: t(lang, 'dashboard.error.nonLocalHost', { host }) };
|
|
162
224
|
}
|
|
@@ -282,6 +344,9 @@ function readDashboardCommandContract(projectRoot) {
|
|
|
282
344
|
function toDashboardCommandEffectGraphStatus(graph) {
|
|
283
345
|
return {
|
|
284
346
|
source: graph.source,
|
|
347
|
+
authority: graph.authority,
|
|
348
|
+
command_authority: graph.commandAuthority,
|
|
349
|
+
grants_command_authority: graph.grantsCommandAuthority,
|
|
285
350
|
status: graph.status,
|
|
286
351
|
database_path: graph.databasePath,
|
|
287
352
|
index_fresh: graph.indexFresh,
|
|
@@ -466,12 +531,22 @@ function renderUpdateResponse(projectRoot) {
|
|
|
466
531
|
}
|
|
467
532
|
function readRunOutput(value) {
|
|
468
533
|
if (!isRecord(value)) {
|
|
469
|
-
return { bytes: 0, truncated: false, tail: '' };
|
|
534
|
+
return { bytes: 0, truncated: false, tail: '', redacted: false, redaction_count: 0, redaction_kinds: [] };
|
|
470
535
|
}
|
|
536
|
+
const rawTail = typeof value.tail === 'string' ? value.tail : '';
|
|
537
|
+
const tailRedaction = redactSecretLikeText(rawTail);
|
|
538
|
+
const storedKinds = Array.isArray(value.redaction_kinds)
|
|
539
|
+
? value.redaction_kinds.filter((entry) => typeof entry === 'string')
|
|
540
|
+
: [];
|
|
541
|
+
const redactionKinds = [...new Set([...storedKinds, ...tailRedaction.redactionKinds])].sort();
|
|
542
|
+
const storedRedactionCount = typeof value.redaction_count === 'number' ? value.redaction_count : 0;
|
|
471
543
|
return {
|
|
472
544
|
bytes: typeof value.bytes === 'number' ? value.bytes : 0,
|
|
473
545
|
truncated: value.truncated === true,
|
|
474
|
-
tail:
|
|
546
|
+
tail: tailRedaction.text,
|
|
547
|
+
redacted: value.redacted === true || tailRedaction.redacted,
|
|
548
|
+
redaction_count: storedRedactionCount + tailRedaction.redactionCount,
|
|
549
|
+
redaction_kinds: redactionKinds,
|
|
475
550
|
};
|
|
476
551
|
}
|
|
477
552
|
function readNumberArray(value) {
|
|
@@ -493,6 +568,7 @@ function renderRunHistoryResponse(projectRoot) {
|
|
|
493
568
|
const mode = typeof receipt.mode === 'string' ? receipt.mode : '';
|
|
494
569
|
const argv = Array.isArray(receipt.argv) ? receipt.argv.filter((entry) => typeof entry === 'string') : [];
|
|
495
570
|
const cmd = typeof receipt.cmd === 'string' && receipt.cmd.length > 0 ? [receipt.cmd] : [];
|
|
571
|
+
const commandLine = (mode === 'shell' ? cmd : argv).map((entry) => redactSecretLikeText(entry).text);
|
|
496
572
|
return {
|
|
497
573
|
path: LATEST_RUN_RELATIVE_PATH,
|
|
498
574
|
exists: true,
|
|
@@ -507,7 +583,7 @@ function renderRunHistoryResponse(projectRoot) {
|
|
|
507
583
|
lifecycle: typeof receipt.lifecycle === 'string' ? receipt.lifecycle : '',
|
|
508
584
|
run_policy: typeof receipt.run_policy === 'string' ? receipt.run_policy : '',
|
|
509
585
|
mode,
|
|
510
|
-
command_line:
|
|
586
|
+
command_line: commandLine,
|
|
511
587
|
timeout_seconds: typeof receipt.timeout_seconds === 'number' ? receipt.timeout_seconds : 0,
|
|
512
588
|
max_output_bytes: typeof receipt.max_output_bytes === 'number' ? receipt.max_output_bytes : 0,
|
|
513
589
|
success_exit_codes: readNumberArray(receipt.success_exit_codes),
|
|
@@ -580,6 +656,29 @@ export async function runDashboard(args, reporter, lang = 'en') {
|
|
|
580
656
|
}
|
|
581
657
|
const options = parsed.options;
|
|
582
658
|
const projectRoot = resolveMustflowRoot();
|
|
659
|
+
if (options.exportPath) {
|
|
660
|
+
try {
|
|
661
|
+
const result = writeDashboardExport({
|
|
662
|
+
projectRoot,
|
|
663
|
+
outputPath: options.exportPath,
|
|
664
|
+
format: options.exportFormat ?? 'html',
|
|
665
|
+
preferences: readDashboardPreferences(projectRoot),
|
|
666
|
+
status: await renderStatusResponse(projectRoot),
|
|
667
|
+
docsReview: renderDocReviewResponse(projectRoot, new URL('/api/docs/review', 'http://localhost')),
|
|
668
|
+
});
|
|
669
|
+
reporter.stdout(t(lang, 'dashboard.export.wrote', { path: result.relativePath, bytes: result.bytes }));
|
|
670
|
+
return 0;
|
|
671
|
+
}
|
|
672
|
+
catch (error) {
|
|
673
|
+
const message = error instanceof DashboardExportPathError
|
|
674
|
+
? t(lang, 'dashboard.error.exportPathOutsideRoot', { path: error.targetPath })
|
|
675
|
+
: error instanceof Error
|
|
676
|
+
? error.message
|
|
677
|
+
: String(error);
|
|
678
|
+
printUsageError(reporter, message, 'mf dashboard --help', getDashboardHelp(lang), lang);
|
|
679
|
+
return 1;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
583
682
|
const token = randomBytes(18).toString('base64url');
|
|
584
683
|
const initialSnapshot = readDashboardPreferences(projectRoot);
|
|
585
684
|
const server = http.createServer(async (request, response) => {
|