agentic-flow-kit 1.8.7 → 2.1.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/LICENSE +2 -2
- package/README.md +172 -138
- package/bin/flow-kit.mjs +7 -2
- package/locales/en/installer.json +110 -0
- package/locales/en/overrides/.agents/commands/deploy.md +52 -0
- package/locales/en/overrides/.agents/commands/maintain.md +76 -0
- package/locales/en/overrides/.agents/commands/new-task.md +89 -0
- package/locales/en/overrides/.agents/commands/pipeline-run.md +56 -0
- package/locales/en/overrides/.agents/commands/pr-review.md +30 -0
- package/locales/en/overrides/.agents/commands/review.md +93 -0
- package/locales/en/overrides/.agents/commands/stages.md +256 -0
- package/locales/en/overrides/.agents/notes/pr-review-cost-discipline.md +48 -0
- package/locales/en/overrides/.agents/notes/process-order-rule.md +21 -0
- package/locales/en/overrides/.agents/notes/runtime-env.local.example.md +21 -0
- package/locales/en/overrides/.agents/pipelines/_TEMPLATE.md +75 -0
- package/locales/en/overrides/.agents/pipelines/pipeline-closing.md +28 -0
- package/locales/en/overrides/.agents/roles/implementer.md +28 -0
- package/locales/en/overrides/.agents/roles/independent-reviewer.md +39 -0
- package/locales/en/overrides/.agents/roles/pr-adjudicator.md +27 -0
- package/locales/en/overrides/.agents/roles/pr-finder.md +51 -0
- package/locales/en/overrides/.agents/roles/pr-verifier.md +44 -0
- package/locales/en/overrides/.agents/roles/ui-verifier.md +22 -0
- package/locales/en/overrides/.agents/roles/wiki-compiler.md +47 -0
- package/locales/en/overrides/.agents/skills/arena/SKILL.md +50 -0
- package/locales/en/overrides/.agents/skills/autonomous-run/SKILL.md +45 -0
- package/locales/en/overrides/.agents/skills/blast-radius/SKILL.md +53 -0
- package/locales/en/overrides/.agents/skills/csharp-quality-gates/SKILL.md +109 -0
- package/locales/en/overrides/.agents/skills/dev-tour/SKILL.md +98 -0
- package/locales/en/overrides/.agents/skills/dream/SKILL.md +63 -0
- package/locales/en/overrides/.agents/skills/eval/SKILL.md +42 -0
- package/locales/en/overrides/.agents/skills/interrogate/SKILL.md +49 -0
- package/locales/en/overrides/.agents/skills/number-vetting/SKILL.md +35 -0
- package/locales/en/overrides/.agents/skills/page-refactor/SKILL.md +192 -0
- package/locales/en/overrides/.agents/skills/papercut-fix/SKILL.md +92 -0
- package/locales/en/overrides/.agents/skills/pause-safely/SKILL.md +31 -0
- package/locales/en/overrides/.agents/skills/perf/SKILL.md +42 -0
- package/locales/en/overrides/.agents/skills/review-method/SKILL.md +92 -0
- package/locales/en/overrides/.agents/skills/session-resume/SKILL.md +69 -0
- package/locales/en/overrides/.agents/skills/shipyard-workflow-closeout/SKILL.md +109 -0
- package/locales/en/overrides/.agents/skills/show-me-your-work/SKILL.md +57 -0
- package/locales/en/overrides/.agents/skills/tfs-pr/SKILL.md +95 -0
- package/locales/en/overrides/.agents/skills/verify-ui/SKILL.md +116 -0
- package/locales/en/overrides/.agents/skills/visual-parity/SKILL.md +35 -0
- package/locales/en/overrides/.agents/skills/why/SKILL.md +56 -0
- package/locales/en/overrides/.agents/skills/wiki/SKILL.md +53 -0
- package/locales/en/overrides/.claude/agents/implementer.md +9 -0
- package/locales/en/overrides/.claude/agents/independent-reviewer.md +10 -0
- package/locales/en/overrides/.claude/agents/pr-adjudicator.md +10 -0
- package/locales/en/overrides/.claude/agents/pr-finder.md +10 -0
- package/locales/en/overrides/.claude/agents/pr-verifier.md +10 -0
- package/locales/en/overrides/.claude/agents/ui-verifier.md +10 -0
- package/locales/en/overrides/.claude/agents/wiki-compiler.md +10 -0
- package/locales/en/overrides/.claude/commands/wf-deploy.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-maintain.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-new-task.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-pipeline-run.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-pr-review.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-review.md +8 -0
- package/locales/en/overrides/.claude/commands/wf-stages.md +8 -0
- package/locales/en/overrides/.cline/agents/implementer.yml +13 -0
- package/locales/en/overrides/.cline/agents/independent-reviewer.yml +11 -0
- package/locales/en/overrides/.cline/agents/pr-adjudicator.yml +11 -0
- package/locales/en/overrides/.cline/agents/pr-finder.yml +11 -0
- package/locales/en/overrides/.cline/agents/pr-verifier.yml +11 -0
- package/locales/en/overrides/.cline/agents/ui-verifier.yml +8 -0
- package/locales/en/overrides/.cline/agents/wiki-compiler.yml +14 -0
- package/locales/en/overrides/.cline/workflows/wf-deploy.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-maintain.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-new-task.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-pipeline-run.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-pr-review.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-review.md +8 -0
- package/locales/en/overrides/.cline/workflows/wf-stages.md +8 -0
- package/locales/en/overrides/.codebuddy/CODEBUDDY.md +7 -0
- package/locales/en/overrides/.codebuddy/agents/implementer.md +9 -0
- package/locales/en/overrides/.codebuddy/agents/independent-reviewer.md +10 -0
- package/locales/en/overrides/.codebuddy/agents/pr-adjudicator.md +10 -0
- package/locales/en/overrides/.codebuddy/agents/pr-finder.md +10 -0
- package/locales/en/overrides/.codebuddy/agents/pr-verifier.md +10 -0
- package/locales/en/overrides/.codebuddy/agents/ui-verifier.md +11 -0
- package/locales/en/overrides/.codebuddy/agents/wiki-compiler.md +10 -0
- package/locales/en/overrides/.codebuddy/commands/wf-deploy.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-maintain.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-new-task.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-pipeline-run.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-pr-review.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-review.md +8 -0
- package/locales/en/overrides/.codebuddy/commands/wf-stages.md +8 -0
- package/locales/en/overrides/.codebuddy/rules/backend-scope.md +5 -0
- package/locales/en/overrides/.codebuddy/rules/frontend-scope.md +5 -0
- package/locales/en/overrides/.codebuddy/skills/tfs-pr/SKILL.md +6 -0
- package/locales/en/overrides/.commandcode/agents/implementer.md +10 -0
- package/locales/en/overrides/.commandcode/agents/independent-reviewer.md +9 -0
- package/locales/en/overrides/.commandcode/agents/pr-adjudicator.md +9 -0
- package/locales/en/overrides/.commandcode/agents/pr-finder.md +9 -0
- package/locales/en/overrides/.commandcode/agents/pr-verifier.md +9 -0
- package/locales/en/overrides/.commandcode/agents/ui-verifier.md +10 -0
- package/locales/en/overrides/.commandcode/agents/wiki-compiler.md +10 -0
- package/locales/en/overrides/.commandcode/commands/wf-deploy.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-maintain.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-new-task.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-pipeline-run.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-pr-review.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-review.md +7 -0
- package/locales/en/overrides/.commandcode/commands/wf-stages.md +7 -0
- package/locales/en/overrides/.opencode/agents/implementer.md +51 -0
- package/locales/en/overrides/.opencode/agents/independent-reviewer.md +18 -0
- package/locales/en/overrides/.opencode/agents/pr-adjudicator.md +18 -0
- package/locales/en/overrides/.opencode/agents/pr-finder.md +18 -0
- package/locales/en/overrides/.opencode/agents/pr-verifier.md +18 -0
- package/locales/en/overrides/.opencode/agents/ui-verifier.md +45 -0
- package/locales/en/overrides/.opencode/agents/wiki-compiler.md +51 -0
- package/locales/en/overrides/.opencode/commands/wf-deploy.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-maintain.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-new-task.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-pipeline-run.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-pr-review.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-review.md +7 -0
- package/locales/en/overrides/.opencode/commands/wf-stages.md +7 -0
- package/locales/en/overrides/.pi/agents/implementer.md +11 -0
- package/locales/en/overrides/.pi/agents/independent-reviewer.md +12 -0
- package/locales/en/overrides/.pi/agents/pr-adjudicator.md +12 -0
- package/locales/en/overrides/.pi/agents/pr-finder.md +11 -0
- package/locales/en/overrides/.pi/agents/pr-verifier.md +11 -0
- package/locales/en/overrides/.pi/agents/ui-verifier.md +11 -0
- package/locales/en/overrides/.pi/agents/wiki-compiler.md +11 -0
- package/locales/en/overrides/.qoder/agents/implementer.md +9 -0
- package/locales/en/overrides/.qoder/agents/independent-reviewer.md +10 -0
- package/locales/en/overrides/.qoder/agents/pr-adjudicator.md +10 -0
- package/locales/en/overrides/.qoder/agents/pr-finder.md +10 -0
- package/locales/en/overrides/.qoder/agents/pr-verifier.md +10 -0
- package/locales/en/overrides/.qoder/agents/ui-verifier.md +10 -0
- package/locales/en/overrides/.qoder/agents/wiki-compiler.md +10 -0
- package/locales/en/overrides/.qoder/commands/wf-deploy.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-maintain.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-new-task.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-pipeline-run.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-pr-review.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-review.md +8 -0
- package/locales/en/overrides/.qoder/commands/wf-stages.md +8 -0
- package/locales/en/overrides/.qwen/agents/implementer.md +10 -0
- package/locales/en/overrides/.qwen/agents/independent-reviewer.md +10 -0
- package/locales/en/overrides/.qwen/agents/pr-adjudicator.md +10 -0
- package/locales/en/overrides/.qwen/agents/pr-finder.md +10 -0
- package/locales/en/overrides/.qwen/agents/pr-verifier.md +10 -0
- package/locales/en/overrides/.qwen/agents/ui-verifier.md +10 -0
- package/locales/en/overrides/.qwen/agents/wiki-compiler.md +13 -0
- package/locales/en/overrides/.qwen/commands/wf-deploy.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-maintain.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-new-task.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-pipeline-run.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-pr-review.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-review.md +7 -0
- package/locales/en/overrides/.qwen/commands/wf-stages.md +7 -0
- package/locales/en/overrides/.trae/agents/implementer.md +9 -0
- package/locales/en/overrides/.trae/agents/independent-reviewer.md +10 -0
- package/locales/en/overrides/.trae/agents/pr-adjudicator.md +10 -0
- package/locales/en/overrides/.trae/agents/pr-finder.md +10 -0
- package/locales/en/overrides/.trae/agents/pr-verifier.md +10 -0
- package/locales/en/overrides/.trae/agents/ui-verifier.md +10 -0
- package/locales/en/overrides/.trae/agents/wiki-compiler.md +10 -0
- package/locales/en/overrides/.trae/commands/wf-deploy.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-maintain.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-new-task.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-pipeline-run.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-pr-review.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-review.md +8 -0
- package/locales/en/overrides/.trae/commands/wf-stages.md +8 -0
- package/locales/en/overrides/.trae/rules/backend-scope.md +5 -0
- package/locales/en/overrides/.trae/rules/frontend-scope.md +5 -0
- package/locales/en/overrides/.zcode/agents/implementer.md +8 -0
- package/locales/en/overrides/.zcode/agents/independent-reviewer.md +8 -0
- package/locales/en/overrides/.zcode/agents/ui-verifier.md +8 -0
- package/locales/en/overrides/.zcode/agents/wiki-compiler.md +8 -0
- package/locales/en/overrides/AGENTS.md +52 -0
- package/locales/en/overrides/CLAUDE.md +20 -0
- package/locales/en/overrides/wiki/INDEX.md +33 -0
- package/locales/en/overrides/wiki/drafts-archive/README.md +6 -0
- package/locales/en/overrides/wiki//346/225/260/346/215/256/347/273/264/346/212/244/README.md +22 -0
- package/locales/en/overrides/wiki//347/237/245/350/257/206/346/262/211/346/267/200/346/200/273/350/247/210.html +230 -0
- package/locales/en/overrides/workflow/INDEX.md +13 -0
- package/locales/en/overrides/workflow/README.md +69 -0
- package/locales/en/overrides/workflow/archive/README.md +3 -0
- package/locales/en/overrides/workflow/delegations.md +4 -0
- package/locales/en/overrides/workflow/effective-policy.md +4 -0
- package/locales/en/overrides/workflow/gate-cost.md +4 -0
- package/locales/en/overrides/workflow/incidents/_TEMPLATE.md +49 -0
- package/locales/en/overrides/workflow/intents/_TEMPLATE.md +43 -0
- package/locales/en/overrides/workflow/metrics.md +4 -0
- package/locales/en/overrides/workflow/papercuts.md +3 -0
- package/locales/en/overrides/workflow/plans/_TEMPLATE.md +47 -0
- package/locales/en/overrides/workflow/regression-checklist.md +3 -0
- package/locales/en/overrides/workflow/specs/_TEMPLATE.md +86 -0
- package/locales/en/overrides/workflow/verify-evidence.md +4 -0
- package/locales/zh-CN/installer.json +110 -0
- package/package.json +23 -36
- package/schemas/install-manifest.schema.json +26 -0
- package/schemas/project-profile.schema.json +28 -0
- package/src/cli/args.mjs +43 -0
- package/src/cli/main.mjs +79 -0
- package/src/commands/add-host.mjs +29 -0
- package/src/commands/doctor.mjs +126 -0
- package/src/commands/install.mjs +296 -0
- package/src/commands/upgrade.mjs +30 -0
- package/src/git/config.mjs +61 -0
- package/src/hosts/registry.mjs +170 -0
- package/src/i18n.mjs +35 -0
- package/src/install/apply.mjs +138 -0
- package/src/install/frontmatter.mjs +84 -0
- package/src/install/manifest.mjs +40 -0
- package/src/install/plan.mjs +241 -0
- package/src/models/known.mjs +13 -0
- package/src/models/probe.mjs +163 -0
- package/src/models/resolve.mjs +312 -0
- package/src/render/tokens.mjs +105 -0
- package/src/tui/ansi.mjs +55 -0
- package/src/tui/flows.mjs +306 -0
- package/src/tui/prompts.mjs +139 -0
- package/src/tui/screen.mjs +217 -0
- package/src/tui/widgets.mjs +111 -0
- package/src/tui/wizard.mjs +68 -0
- package/templates/engine/.agents/board/dev-tour.html +1940 -0
- package/templates/engine/.agents/board/index.html +835 -0
- package/templates/engine/.agents/commands/deploy.md +52 -0
- package/templates/engine/.agents/commands/maintain.md +76 -0
- package/templates/engine/.agents/commands/new-task.md +89 -0
- package/templates/engine/.agents/commands/pipeline-run.md +60 -0
- package/templates/engine/.agents/commands/pr-review.md +30 -0
- package/templates/engine/.agents/commands/review.md +93 -0
- package/templates/engine/.agents/commands/stages.md +257 -0
- package/templates/engine/.agents/config/agent-eval.json +17 -0
- package/templates/engine/.agents/config/commit-msg-rules.json +7 -0
- package/templates/engine/.agents/config/engine.json +11 -0
- package/templates/engine/.agents/config/gate-budgets.json +5 -0
- package/templates/engine/.agents/config/mechanism-registry.md +63 -0
- package/templates/engine/.agents/config/memory-tiers.json +13 -0
- package/templates/engine/.agents/config/model-roles.json +26 -0
- package/templates/engine/.agents/config/model-roles.local.example.json +7 -0
- package/templates/engine/.agents/config/pipeline.json +36 -0
- package/templates/engine/.agents/config/pr-review.json +67 -0
- package/templates/engine/.agents/config/principles.md +32 -0
- package/templates/engine/.agents/config/steering.json +28 -0
- package/templates/engine/.agents/config/workflow-enums.txt +25 -0
- package/templates/engine/.agents/evals/README.md +49 -0
- package/templates/engine/.agents/evals/tasks.tsv +6 -0
- package/templates/engine/.agents/hooks/check-architecture.mjs +168 -0
- package/templates/engine/.agents/hooks/check-audit-fields.mjs +56 -0
- package/templates/engine/.agents/hooks/check-commit-plan-ref.mjs +84 -0
- package/templates/engine/.agents/hooks/check-confirm-order.mjs +281 -0
- package/templates/engine/.agents/hooks/check-delete-guard.mjs +63 -0
- package/templates/engine/.agents/hooks/check-notify-guard.mjs +55 -0
- package/templates/engine/.agents/hooks/commit-check.cjs +208 -0
- package/templates/engine/.agents/hooks/gates.json +33 -0
- package/templates/engine/.agents/hooks/local-pre-commit.mjs +27 -0
- package/templates/engine/.agents/hooks/pre-shell-check.cjs +361 -0
- package/templates/engine/.agents/hooks/pre-write-check.cjs +247 -0
- package/templates/engine/.agents/notes/gate-diet.md +75 -0
- package/templates/engine/.agents/notes/injected-memory.md +14 -0
- package/templates/engine/.agents/notes/pr-review-cost-discipline.md +48 -0
- package/templates/engine/.agents/notes/process-order-rule.md +21 -0
- package/templates/engine/.agents/notes/runtime-env.local.example.md +21 -0
- package/templates/engine/.agents/notes/steering-tiers.md +28 -0
- package/templates/engine/.agents/pipelines/_TEMPLATE.md +75 -0
- package/templates/engine/.agents/pipelines/pipeline-closing.md +28 -0
- package/templates/engine/.agents/pipelines//347/244/272/344/276/213-/345/271/266/350/241/214/345/256/236/347/216/260/350/257/204/345/256/241.md +16 -0
- package/templates/engine/.agents/roles/implementer.md +28 -0
- package/templates/engine/.agents/roles/independent-reviewer.md +39 -0
- package/templates/engine/.agents/roles/pr-adjudicator.md +27 -0
- package/templates/engine/.agents/roles/pr-finder.md +51 -0
- package/templates/engine/.agents/roles/pr-verifier.md +44 -0
- package/templates/engine/.agents/roles/ui-verifier.md +22 -0
- package/templates/engine/.agents/roles/wiki-compiler.md +47 -0
- package/templates/engine/.agents/scripts/agent-eval.mjs +268 -0
- package/templates/engine/.agents/scripts/agg-delegations.mjs +439 -0
- package/templates/engine/.agents/scripts/agg-judgments.mjs +301 -0
- package/templates/engine/.agents/scripts/agg-kb-usage.mjs +196 -0
- package/templates/engine/.agents/scripts/append-compensation.mjs +109 -0
- package/templates/engine/.agents/scripts/archive-sweep.mjs +229 -0
- package/templates/engine/.agents/scripts/auto-tour.mjs +77 -0
- package/templates/engine/.agents/scripts/board-port.mjs +17 -0
- package/templates/engine/.agents/scripts/check-doc-body-drift.mjs +102 -0
- package/templates/engine/.agents/scripts/check-engine-artifacts.mjs +54 -0
- package/templates/engine/.agents/scripts/check-hook-wiring.mjs +75 -0
- package/templates/engine/.agents/scripts/check-lane-surface.mjs +393 -0
- package/templates/engine/.agents/scripts/check-ledger-doc-presence.mjs +71 -0
- package/templates/engine/.agents/scripts/check-ledger-invariant.mjs +873 -0
- package/templates/engine/.agents/scripts/check-local-gate-config.mjs +95 -0
- package/templates/engine/.agents/scripts/check-local-gates.mjs +248 -0
- package/templates/engine/.agents/scripts/check-loop-kit.mjs +550 -0
- package/templates/engine/.agents/scripts/check-loop-rev-semantics.mjs +59 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s01-pairing.mjs +116 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s03x-regr-evidence.mjs +38 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s08-acceptance.mjs +130 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s15-fingerprint.mjs +152 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s23-convergence-audit.mjs +182 -0
- package/templates/engine/.agents/scripts/check-loop-sections/s29-regr-enforcer.mjs +69 -0
- package/templates/engine/.agents/scripts/check-loop.mjs +131 -0
- package/templates/engine/.agents/scripts/check-pipeline-state.mjs +85 -0
- package/templates/engine/.agents/scripts/check-regression-consistency.mjs +252 -0
- package/templates/engine/.agents/scripts/check-schema-residue.mjs +144 -0
- package/templates/engine/.agents/scripts/check-scope-range.mjs +156 -0
- package/templates/engine/.agents/scripts/check-scope.mjs +121 -0
- package/templates/engine/.agents/scripts/check-scripts-syntax.mjs +138 -0
- package/templates/engine/.agents/scripts/check-secrets-lite.mjs +239 -0
- package/templates/engine/.agents/scripts/check-secrets.mjs +104 -0
- package/templates/engine/.agents/scripts/check-test-impact-map.mjs +107 -0
- package/templates/engine/.agents/scripts/ci-assert-frontend-deps.mjs +42 -0
- package/templates/engine/.agents/scripts/ci-commit-hygiene.mjs +86 -0
- package/templates/engine/.agents/scripts/ci-install-gitleaks.mjs +75 -0
- package/templates/engine/.agents/scripts/ci-push-before.mjs +49 -0
- package/templates/engine/.agents/scripts/claims.mjs +166 -0
- package/templates/engine/.agents/scripts/closeout.mjs +127 -0
- package/templates/engine/.agents/scripts/compact-ledgers.mjs +70 -0
- package/templates/engine/.agents/scripts/confirm-doc.mjs +737 -0
- package/templates/engine/.agents/scripts/delegation-presence.mjs +38 -0
- package/templates/engine/.agents/scripts/dev-tour-model.mjs +1398 -0
- package/templates/engine/.agents/scripts/dream-run.mjs +358 -0
- package/templates/engine/.agents/scripts/ensure-board.mjs +187 -0
- package/templates/engine/.agents/scripts/failure-attribution.mjs +11 -0
- package/templates/engine/.agents/scripts/fill-intent.mjs +60 -0
- package/templates/engine/.agents/scripts/fill-plan.mjs +105 -0
- package/templates/engine/.agents/scripts/fill-spec.mjs +72 -0
- package/templates/engine/.agents/scripts/fix-task.mjs +77 -0
- package/templates/engine/.agents/scripts/gen-dev-tour.mjs +191 -0
- package/templates/engine/.agents/scripts/gen-effective-policy.mjs +113 -0
- package/templates/engine/.agents/scripts/gen-engine-map.mjs +292 -0
- package/templates/engine/.agents/scripts/gen-narrative-claims.mjs +275 -0
- package/templates/engine/.agents/scripts/gen-verify-evidence.mjs +115 -0
- package/templates/engine/.agents/scripts/gen-wiki-board.mjs +221 -0
- package/templates/engine/.agents/scripts/gen-workflow-index.mjs +201 -0
- package/templates/engine/.agents/scripts/gen-workflow-metrics.mjs +692 -0
- package/templates/engine/.agents/scripts/git-merge-jsonl.mjs +62 -0
- package/templates/engine/.agents/scripts/judgment-ledger.mjs +68 -0
- package/templates/engine/.agents/scripts/kb-cache-evict.mjs +50 -0
- package/templates/engine/.agents/scripts/kb-search.mjs +423 -0
- package/templates/engine/.agents/scripts/lane-surface-audit.mjs +145 -0
- package/templates/engine/.agents/scripts/ledger-loader.mjs +77 -0
- package/templates/engine/.agents/scripts/ledger-shards.mjs +346 -0
- package/templates/engine/.agents/scripts/memory-tier.mjs +196 -0
- package/templates/engine/.agents/scripts/memory-wiki.mjs +296 -0
- package/templates/engine/.agents/scripts/metrics-core.mjs +131 -0
- package/templates/engine/.agents/scripts/outcome-metrics.mjs +195 -0
- package/templates/engine/.agents/scripts/path-lease.mjs +177 -0
- package/templates/engine/.agents/scripts/pipeline-run.mjs +964 -0
- package/templates/engine/.agents/scripts/policy.mjs +250 -0
- package/templates/engine/.agents/scripts/pr-create.mjs +54 -0
- package/templates/engine/.agents/scripts/pr-review.mjs +1551 -0
- package/templates/engine/.agents/scripts/quote-grounding.mjs +233 -0
- package/templates/engine/.agents/scripts/regen-ledgers.mjs +59 -0
- package/templates/engine/.agents/scripts/rewrite-file.mjs +135 -0
- package/templates/engine/.agents/scripts/rule-budget.mjs +246 -0
- package/templates/engine/.agents/scripts/session-log.mjs +157 -0
- package/templates/engine/.agents/scripts/stage-gates.mjs +812 -0
- package/templates/engine/.agents/scripts/steering.mjs +75 -0
- package/templates/engine/.agents/scripts/test-impact-lib.mjs +451 -0
- package/templates/engine/.agents/scripts/test-impact.mjs +105 -0
- package/templates/engine/.agents/scripts/trust-mode.mjs +130 -0
- package/templates/engine/.agents/scripts/verify-scope.mjs +163 -0
- package/templates/engine/.agents/scripts/verify-wiki-consistency.mjs +264 -0
- package/templates/engine/.agents/scripts/verify.mjs +858 -0
- package/templates/engine/.agents/scripts/warn-format.mjs +57 -0
- package/templates/engine/.agents/scripts/wf-journal.mjs +230 -0
- package/templates/engine/.agents/scripts/workflow-board-server.mjs +696 -0
- package/templates/engine/.agents/scripts/workflow-enums.mjs +70 -0
- package/templates/engine/.agents/scripts/workflows-check.mjs +260 -0
- package/templates/engine/.agents/settings.json +33 -0
- package/templates/engine/.agents/skills/arena/SKILL.md +54 -0
- package/templates/engine/.agents/skills/autonomous-run/SKILL.md +45 -0
- package/templates/engine/.agents/skills/blast-radius/SKILL.md +53 -0
- package/templates/engine/.agents/skills/csharp-quality-gates/SKILL.md +109 -0
- package/templates/engine/.agents/skills/csharp-quality-gates/scripts/quality-gates.mjs +430 -0
- package/templates/engine/.agents/skills/dev-tour/SKILL.md +98 -0
- package/templates/engine/.agents/skills/dream/SKILL.md +82 -0
- package/templates/engine/.agents/skills/eval/SKILL.md +58 -0
- package/templates/engine/.agents/skills/eval/scripts/eval-score.mjs +59 -0
- package/templates/engine/.agents/skills/interrogate/SKILL.md +49 -0
- package/templates/engine/.agents/skills/interrogate/scripts/interrogate-plan.mjs +72 -0
- package/templates/engine/.agents/skills/model-upgrade/SKILL.md +41 -0
- package/templates/engine/.agents/skills/number-vetting/SKILL.md +35 -0
- package/templates/engine/.agents/skills/page-refactor/SKILL.md +192 -0
- package/templates/engine/.agents/skills/page-refactor/references/templates.md +989 -0
- package/templates/engine/.agents/skills/papercut-fix/SKILL.md +92 -0
- package/templates/engine/.agents/skills/papercut-fix/references/response-template.md +81 -0
- package/templates/engine/.agents/skills/pause-safely/SKILL.md +31 -0
- package/templates/engine/.agents/skills/perf/SKILL.md +42 -0
- package/templates/engine/.agents/skills/review-method/SKILL.md +92 -0
- package/templates/engine/.agents/skills/review-method/golden-set.md +61 -0
- package/templates/engine/.agents/skills/session-resume/SKILL.md +76 -0
- package/templates/engine/.agents/skills/session-resume/scripts/worktree-audit.mjs +110 -0
- package/templates/engine/.agents/skills/shipyard-workflow-closeout/SKILL.md +109 -0
- package/templates/engine/.agents/skills/show-me-your-work/SKILL.md +71 -0
- package/templates/engine/.agents/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/templates/engine/.agents/skills/show-me-your-work/scripts/decision-log.mjs +24 -0
- package/templates/engine/.agents/skills/tfs-pr/SKILL.md +95 -0
- package/templates/engine/.agents/skills/tfs-pr/scripts/tfs-pr.mjs +947 -0
- package/templates/engine/.agents/skills/verify-ui/SKILL.md +116 -0
- package/templates/engine/.agents/skills/verify-ui/features/.gitkeep +0 -0
- package/templates/engine/.agents/skills/verify-ui/scripts/gen-verify-feature.mjs +114 -0
- package/templates/engine/.agents/skills/visual-parity/SKILL.md +35 -0
- package/templates/engine/.agents/skills/why/SKILL.md +56 -0
- package/templates/engine/.agents/skills/why/scripts/why-evidence.mjs +74 -0
- package/templates/engine/.agents/skills/wiki/SKILL.md +56 -0
- package/templates/engine/.agents/tests/auto-tour.test.mjs +82 -0
- package/templates/engine/.agents/tests/dev-tour-model.test.mjs +452 -0
- package/templates/engine/.agents/tests/fill-plan-lite.test.mjs +46 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-bare-mid-path.md +14 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-bare-mid-path.model.json +179 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-fake-path-guard.md +21 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-fake-path-guard.model.json +194 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-h3-batches.md +20 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-h3-batches.model.json +207 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-issues.md +24 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-issues.model.json +225 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-l1-single-file.md +15 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-l1-single-file.model.json +160 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-layer-word-unique.md +29 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-layer-word-unique.model.json +266 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-layers-fallback.md +17 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-layers-fallback.model.json +207 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-numbered-steps.md +39 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-numbered-steps.model.json +359 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-path-guess.md +16 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-path-guess.model.json +131 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-table-rows.md +29 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-table-rows.model.json +190 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-task-checkboxes.md +39 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-task-checkboxes.model.json +362 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-union-label.md +24 -0
- package/templates/engine/.agents/tests/fixtures/dev-tour/plan-union-label.model.json +224 -0
- package/templates/engine/.agents/tests/tools/gen-synthetic-plan.mjs +108 -0
- package/templates/git/.gitattributes +23 -0
- package/templates/git/.githooks/commit-msg +72 -0
- package/templates/git/.githooks/package.json +3 -0
- package/templates/git/.githooks/post-commit +62 -0
- package/templates/git/.githooks/pre-commit +197 -0
- package/templates/git/.githooks/pre-merge-commit +28 -0
- package/templates/git/.githooks/pre-push +201 -0
- package/templates/git/.github/workflows/ci.yml +32 -0
- package/templates/git/.gitignore.engine +11 -0
- package/templates/git/azure-pipelines.yml +46 -0
- package/templates/host-meta/SKILLS.md +3 -0
- package/templates/host-meta/claude/skill-pointer.md +6 -0
- package/templates/host-meta/cline/skill-index.md +6 -0
- package/templates/host-meta/codebuddy/skill-pointer.md +6 -0
- package/templates/host-meta/commandcode/skill-index.md +5 -0
- package/templates/host-meta/opencode/skill-pointer.md +6 -0
- package/templates/host-meta/qoder/skill-index.md +5 -0
- package/templates/host-meta/qwen/skill-index.md +5 -0
- package/templates/host-meta/trae/skill-index.md +6 -0
- package/templates/hosts/claude/CLAUDE.md +55 -0
- package/templates/hosts/claude/agents/implementer.md +7 -0
- package/templates/hosts/claude/agents/independent-reviewer.md +8 -0
- package/templates/hosts/claude/agents/pr-adjudicator.md +8 -0
- package/templates/hosts/claude/agents/pr-finder.md +8 -0
- package/templates/hosts/claude/agents/pr-verifier.md +8 -0
- package/templates/hosts/claude/agents/ui-verifier.md +8 -0
- package/templates/hosts/claude/agents/wiki-compiler.md +8 -0
- package/templates/hosts/claude/commands/wf-deploy.md +10 -0
- package/templates/hosts/claude/commands/wf-maintain.md +10 -0
- package/templates/hosts/claude/commands/wf-new-task.md +10 -0
- package/templates/hosts/claude/commands/wf-pipeline-run.md +10 -0
- package/templates/hosts/claude/commands/wf-pr-review.md +10 -0
- package/templates/hosts/claude/commands/wf-review.md +10 -0
- package/templates/hosts/claude/commands/wf-stages.md +10 -0
- package/templates/hosts/claude/settings.hardened.json +94 -0
- package/templates/hosts/claude/settings.json +55 -0
- package/templates/hosts/cline/agents/implementer.yml +15 -0
- package/templates/hosts/cline/agents/independent-reviewer.yml +20 -0
- package/templates/hosts/cline/agents/pr-adjudicator.yml +18 -0
- package/templates/hosts/cline/agents/pr-finder.yml +19 -0
- package/templates/hosts/cline/agents/pr-verifier.yml +18 -0
- package/templates/hosts/cline/agents/ui-verifier.yml +17 -0
- package/templates/hosts/cline/agents/wiki-compiler.yml +20 -0
- package/templates/hosts/cline/hooks/PreToolUse.cjs +260 -0
- package/templates/hosts/cline/workflows/wf-deploy.md +8 -0
- package/templates/hosts/cline/workflows/wf-maintain.md +8 -0
- package/templates/hosts/cline/workflows/wf-new-task.md +8 -0
- package/templates/hosts/cline/workflows/wf-pipeline-run.md +8 -0
- package/templates/hosts/cline/workflows/wf-pr-review.md +8 -0
- package/templates/hosts/cline/workflows/wf-review.md +8 -0
- package/templates/hosts/cline/workflows/wf-stages.md +8 -0
- package/templates/hosts/codebuddy/CODEBUDDY.md +7 -0
- package/templates/hosts/codebuddy/agents/implementer.md +9 -0
- package/templates/hosts/codebuddy/agents/independent-reviewer.md +10 -0
- package/templates/hosts/codebuddy/agents/pr-adjudicator.md +10 -0
- package/templates/hosts/codebuddy/agents/pr-finder.md +10 -0
- package/templates/hosts/codebuddy/agents/pr-verifier.md +10 -0
- package/templates/hosts/codebuddy/agents/ui-verifier.md +11 -0
- package/templates/hosts/codebuddy/agents/wiki-compiler.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-deploy.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-maintain.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-new-task.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-pipeline-run.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-pr-review.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-review.md +10 -0
- package/templates/hosts/codebuddy/commands/wf-stages.md +10 -0
- package/templates/hosts/codebuddy/rules/backend-scope.md +5 -0
- package/templates/hosts/codebuddy/rules/frontend-scope.md +5 -0
- package/templates/hosts/codebuddy/settings.json +31 -0
- package/templates/hosts/codebuddy/skills/tfs-pr/SKILL.md +6 -0
- package/templates/hosts/commandcode/agents/implementer.md +10 -0
- package/templates/hosts/commandcode/agents/independent-reviewer.md +9 -0
- package/templates/hosts/commandcode/agents/pr-adjudicator.md +9 -0
- package/templates/hosts/commandcode/agents/pr-finder.md +9 -0
- package/templates/hosts/commandcode/agents/pr-verifier.md +9 -0
- package/templates/hosts/commandcode/agents/ui-verifier.md +11 -0
- package/templates/hosts/commandcode/agents/wiki-compiler.md +10 -0
- package/templates/hosts/commandcode/commands/wf-deploy.md +9 -0
- package/templates/hosts/commandcode/commands/wf-maintain.md +9 -0
- package/templates/hosts/commandcode/commands/wf-new-task.md +9 -0
- package/templates/hosts/commandcode/commands/wf-pipeline-run.md +9 -0
- package/templates/hosts/commandcode/commands/wf-pr-review.md +9 -0
- package/templates/hosts/commandcode/commands/wf-review.md +9 -0
- package/templates/hosts/commandcode/commands/wf-stages.md +9 -0
- package/templates/hosts/commandcode/settings.json +57 -0
- package/templates/hosts/opencode/agents/implementer.md +51 -0
- package/templates/hosts/opencode/agents/independent-reviewer.md +18 -0
- package/templates/hosts/opencode/agents/pr-adjudicator.md +18 -0
- package/templates/hosts/opencode/agents/pr-finder.md +18 -0
- package/templates/hosts/opencode/agents/pr-verifier.md +18 -0
- package/templates/hosts/opencode/agents/ui-verifier.md +45 -0
- package/templates/hosts/opencode/agents/wiki-compiler.md +51 -0
- package/templates/hosts/opencode/commands/wf-deploy.md +7 -0
- package/templates/hosts/opencode/commands/wf-maintain.md +7 -0
- package/templates/hosts/opencode/commands/wf-new-task.md +7 -0
- package/templates/hosts/opencode/commands/wf-pipeline-run.md +7 -0
- package/templates/hosts/opencode/commands/wf-pr-review.md +7 -0
- package/templates/hosts/opencode/commands/wf-review.md +7 -0
- package/templates/hosts/opencode/commands/wf-stages.md +7 -0
- package/templates/hosts/pi/agents/implementer.md +10 -0
- package/templates/hosts/pi/agents/independent-reviewer.md +11 -0
- package/templates/hosts/pi/agents/pr-adjudicator.md +11 -0
- package/templates/hosts/pi/agents/pr-finder.md +10 -0
- package/templates/hosts/pi/agents/pr-verifier.md +10 -0
- package/templates/hosts/pi/agents/ui-verifier.md +10 -0
- package/templates/hosts/pi/agents/wiki-compiler.md +10 -0
- package/templates/hosts/pi/extensions/lib/gates-core.cjs +196 -0
- package/templates/hosts/pi/extensions/shipyard-gates.ts +95 -0
- package/templates/hosts/pi/settings.json +5 -0
- package/templates/hosts/qoder/agents/implementer.md +9 -0
- package/templates/hosts/qoder/agents/independent-reviewer.md +10 -0
- package/templates/hosts/qoder/agents/pr-adjudicator.md +10 -0
- package/templates/hosts/qoder/agents/pr-finder.md +10 -0
- package/templates/hosts/qoder/agents/pr-verifier.md +10 -0
- package/templates/hosts/qoder/agents/ui-verifier.md +10 -0
- package/templates/hosts/qoder/agents/wiki-compiler.md +10 -0
- package/templates/hosts/qoder/commands/wf-deploy.md +8 -0
- package/templates/hosts/qoder/commands/wf-maintain.md +8 -0
- package/templates/hosts/qoder/commands/wf-new-task.md +8 -0
- package/templates/hosts/qoder/commands/wf-pipeline-run.md +8 -0
- package/templates/hosts/qoder/commands/wf-pr-review.md +8 -0
- package/templates/hosts/qoder/commands/wf-review.md +8 -0
- package/templates/hosts/qoder/commands/wf-stages.md +8 -0
- package/templates/hosts/qoder/settings.json +61 -0
- package/templates/hosts/qwen/agents/implementer.md +8 -0
- package/templates/hosts/qwen/agents/independent-reviewer.md +8 -0
- package/templates/hosts/qwen/agents/pr-adjudicator.md +8 -0
- package/templates/hosts/qwen/agents/pr-finder.md +8 -0
- package/templates/hosts/qwen/agents/pr-verifier.md +8 -0
- package/templates/hosts/qwen/agents/ui-verifier.md +8 -0
- package/templates/hosts/qwen/agents/wiki-compiler.md +11 -0
- package/templates/hosts/qwen/commands/wf-deploy.md +9 -0
- package/templates/hosts/qwen/commands/wf-maintain.md +9 -0
- package/templates/hosts/qwen/commands/wf-new-task.md +9 -0
- package/templates/hosts/qwen/commands/wf-pipeline-run.md +9 -0
- package/templates/hosts/qwen/commands/wf-pr-review.md +9 -0
- package/templates/hosts/qwen/commands/wf-review.md +9 -0
- package/templates/hosts/qwen/commands/wf-stages.md +9 -0
- package/templates/hosts/qwen/settings.json +57 -0
- package/templates/hosts/trae/agents/implementer.md +9 -0
- package/templates/hosts/trae/agents/independent-reviewer.md +10 -0
- package/templates/hosts/trae/agents/pr-adjudicator.md +10 -0
- package/templates/hosts/trae/agents/pr-finder.md +10 -0
- package/templates/hosts/trae/agents/pr-verifier.md +10 -0
- package/templates/hosts/trae/agents/ui-verifier.md +10 -0
- package/templates/hosts/trae/agents/wiki-compiler.md +10 -0
- package/templates/hosts/trae/commands/wf-deploy.md +8 -0
- package/templates/hosts/trae/commands/wf-maintain.md +8 -0
- package/templates/hosts/trae/commands/wf-new-task.md +8 -0
- package/templates/hosts/trae/commands/wf-pipeline-run.md +8 -0
- package/templates/hosts/trae/commands/wf-pr-review.md +8 -0
- package/templates/hosts/trae/commands/wf-review.md +8 -0
- package/templates/hosts/trae/commands/wf-stages.md +8 -0
- package/templates/hosts/trae/hooks.json +17 -0
- package/templates/hosts/trae/rules/backend-scope.md +5 -0
- package/templates/hosts/trae/rules/frontend-scope.md +5 -0
- package/templates/hosts/zcode/agents/implementer.md +8 -0
- package/templates/hosts/zcode/agents/independent-reviewer.md +8 -0
- package/templates/hosts/zcode/agents/ui-verifier.md +8 -0
- package/templates/hosts/zcode/agents/wiki-compiler.md +8 -0
- package/templates/hosts/zcode/config.json +31 -0
- package/templates/hosts/zcode/workflows/code-review.dwf.ts +428 -0
- package/templates/hosts/zcode/workflows/fullchain-flow-test.dwf.ts +898 -0
- package/templates/profiles/dotnet/.agents/config/lane-surfaces.txt +33 -0
- package/templates/profiles/dotnet/.agents/config/rule-budgets.txt +84 -0
- package/templates/profiles/dotnet/.agents/config/test-impact-map.json +590 -0
- package/templates/profiles/dotnet/.agents/config/workflow-modules.txt +18 -0
- package/templates/profiles/dotnet/.agents/hooks/commit-check.config.json +18 -0
- package/templates/profiles/dotnet/.agents/hooks/delete-guard-allowlist.txt +28 -0
- package/templates/profiles/dotnet/.agents/notes/runtime-env.md +178 -0
- package/templates/profiles/dotnet/AGENTS.md +52 -0
- package/templates/profiles/empty/.agents/config/lane-surfaces.txt +12 -0
- package/templates/profiles/empty/.agents/config/rule-budgets.txt +3 -0
- package/templates/profiles/empty/.agents/config/test-impact-map.json +8 -0
- package/templates/profiles/empty/.agents/config/workflow-modules.txt +2 -0
- package/templates/profiles/empty/.agents/hooks/commit-check.config.json +5 -0
- package/templates/profiles/empty/.agents/hooks/delete-guard-allowlist.txt +2 -0
- package/templates/profiles/empty/.agents/notes/runtime-env.md +44 -0
- package/templates/profiles/empty/AGENTS.md +52 -0
- package/templates/profiles/go/AGENTS.md +52 -0
- package/templates/profiles/java/AGENTS.md +52 -0
- package/templates/profiles/node/.agents/config/lane-surfaces.txt +12 -0
- package/templates/profiles/node/.agents/config/rule-budgets.txt +3 -0
- package/templates/profiles/node/.agents/config/test-impact-map.json +8 -0
- package/templates/profiles/node/.agents/config/workflow-modules.txt +2 -0
- package/templates/profiles/node/.agents/hooks/commit-check.config.json +5 -0
- package/templates/profiles/node/.agents/hooks/delete-guard-allowlist.txt +2 -0
- package/templates/profiles/node/.agents/notes/runtime-env.md +44 -0
- package/templates/profiles/node/AGENTS.md +52 -0
- package/templates/profiles/rust/AGENTS.md +52 -0
- package/templates/profiles/typescript/AGENTS.md +52 -0
- package/templates/scaffold/wiki/INDEX.md +33 -0
- package/templates/scaffold/wiki/drafts-archive/README.md +7 -0
- package/templates/scaffold/wiki//344/272/247/345/223/201/351/234/200/346/261/202/.gitkeep +0 -0
- package/templates/scaffold/wiki//345/274/200/345/217/221/346/226/271/346/241/210/.gitkeep +0 -0
- package/templates/scaffold/wiki//346/225/260/346/215/256/347/273/264/346/212/244/README.md +22 -0
- package/templates/scaffold/wiki//346/265/213/350/257/225/346/212/245/345/221/212/.gitkeep +0 -0
- package/templates/scaffold/wiki//347/224/250/346/210/267/345/212/237/350/203/275/.gitkeep +0 -0
- package/templates/scaffold/wiki//347/237/245/350/257/206/346/262/211/346/267/200/346/200/273/350/247/210.html +230 -0
- package/templates/scaffold/wiki//351/241/271/347/233/256/350/247/204/350/214/203/.gitkeep +0 -0
- package/templates/scaffold/workflow/INDEX.md +29 -0
- package/templates/scaffold/workflow/README.md +69 -0
- package/templates/scaffold/workflow/archive/README.md +3 -0
- package/templates/scaffold/workflow/artifact-sources.md +25 -0
- package/templates/scaffold/workflow/delegations.d/.gitkeep +0 -0
- package/templates/scaffold/workflow/delegations.md +4 -0
- package/templates/scaffold/workflow/effective-policy.md +4 -0
- package/templates/scaffold/workflow/evidence/.gitkeep +0 -0
- package/templates/scaffold/workflow/gate-cost.md +4 -0
- package/templates/scaffold/workflow/gate-metrics.d/.gitkeep +0 -0
- package/templates/scaffold/workflow/incidents/_TEMPLATE.md +49 -0
- package/templates/scaffold/workflow/intents/_TEMPLATE.md +43 -0
- package/templates/scaffold/workflow/metrics.md +4 -0
- package/templates/scaffold/workflow/non-engineer-intent.md +51 -0
- package/templates/scaffold/workflow/papercuts.d/.gitkeep +0 -0
- package/templates/scaffold/workflow/papercuts.md +3 -0
- package/templates/scaffold/workflow/plans/_TEMPLATE.md +47 -0
- package/templates/scaffold/workflow/regression-checklist.d/.gitkeep +0 -0
- package/templates/scaffold/workflow/regression-checklist.md +3 -0
- package/templates/scaffold/workflow/research/.gitkeep +0 -0
- package/templates/scaffold/workflow/reviews.d/.gitkeep +0 -0
- package/templates/scaffold/workflow/specs/_TEMPLATE.md +87 -0
- package/templates/scaffold/workflow/verify-evidence/.gitkeep +0 -0
- package/templates/scaffold/workflow/verify-evidence.md +4 -0
- package/modules/gates/README.md +0 -25
- package/modules/gates/dotnet-ca/README.md +0 -24
- package/modules/gates/dotnet-ca/check-architecture.sh +0 -150
- package/modules/gates/dotnet-ca/local-pre-commit.line +0 -1
- package/modules/gates/generated-readonly/README.md +0 -13
- package/modules/gates/generated-readonly/check-generated.mjs +0 -61
- package/modules/gates/generated-readonly/local-pre-commit.line +0 -1
- package/modules/gates/node-layer/README.md +0 -9
- package/modules/gates/node-layer/check-node-layer.mjs +0 -29
- package/modules/gates/node-layer/local-pre-commit.line +0 -1
- package/modules/gates/py-import/README.md +0 -9
- package/modules/gates/py-import/check-py-import.mjs +0 -30
- package/modules/gates/py-import/local-pre-commit.line +0 -1
- package/modules/gates/test-protect/README.md +0 -23
- package/modules/gates/test-protect/check-test-protect.mjs +0 -64
- package/modules/gates/test-protect/local-pre-commit.line +0 -1
- package/modules/hosts/README.md +0 -57
- package/modules/hosts/claude/agents/implementer.md +0 -51
- package/modules/hosts/claude/agents/independent-reviewer.md +0 -49
- package/modules/hosts/claude/agents/ui-verifier.md +0 -48
- package/modules/hosts/claude/commands/wf-build.md +0 -69
- package/modules/hosts/claude/commands/wf-deploy.md +0 -58
- package/modules/hosts/claude/commands/wf-design.md +0 -49
- package/modules/hosts/claude/commands/wf-gate-checklist.md +0 -77
- package/modules/hosts/claude/commands/wf-maintain.md +0 -76
- package/modules/hosts/claude/commands/wf-new-task.md +0 -102
- package/modules/hosts/claude/commands/wf-pipeline-run.md +0 -35
- package/modules/hosts/claude/commands/wf-plan.md +0 -40
- package/modules/hosts/claude/commands/wf-review.md +0 -49
- package/modules/hosts/claude/commands/wf-sync-hosts.md +0 -64
- package/modules/hosts/claude/commands/wf-test.md +0 -68
- package/modules/hosts/codex/agents/implementer.md +0 -51
- package/modules/hosts/codex/agents/independent-reviewer.md +0 -49
- package/modules/hosts/codex/agents/ui-verifier.md +0 -48
- package/modules/hosts/codex/commands/wf-build.md +0 -69
- package/modules/hosts/codex/commands/wf-deploy.md +0 -58
- package/modules/hosts/codex/commands/wf-design.md +0 -49
- package/modules/hosts/codex/commands/wf-gate-checklist.md +0 -77
- package/modules/hosts/codex/commands/wf-maintain.md +0 -76
- package/modules/hosts/codex/commands/wf-new-task.md +0 -102
- package/modules/hosts/codex/commands/wf-pipeline-run.md +0 -35
- package/modules/hosts/codex/commands/wf-plan.md +0 -40
- package/modules/hosts/codex/commands/wf-review.md +0 -49
- package/modules/hosts/codex/commands/wf-sync-hosts.md +0 -64
- package/modules/hosts/codex/commands/wf-test.md +0 -68
- package/modules/hosts/codex/skills/flow-kit/SKILL.md +0 -14
- package/modules/hosts/cursor/agents/implementer.md +0 -51
- package/modules/hosts/cursor/agents/independent-reviewer.md +0 -49
- package/modules/hosts/cursor/agents/ui-verifier.md +0 -48
- package/modules/hosts/cursor/commands/wf-build.md +0 -69
- package/modules/hosts/cursor/commands/wf-deploy.md +0 -58
- package/modules/hosts/cursor/commands/wf-design.md +0 -49
- package/modules/hosts/cursor/commands/wf-gate-checklist.md +0 -77
- package/modules/hosts/cursor/commands/wf-maintain.md +0 -76
- package/modules/hosts/cursor/commands/wf-new-task.md +0 -102
- package/modules/hosts/cursor/commands/wf-pipeline-run.md +0 -35
- package/modules/hosts/cursor/commands/wf-plan.md +0 -40
- package/modules/hosts/cursor/commands/wf-review.md +0 -49
- package/modules/hosts/cursor/commands/wf-sync-hosts.md +0 -64
- package/modules/hosts/cursor/commands/wf-test.md +0 -68
- package/modules/hosts/omp/agents/implementer.md +0 -52
- package/modules/hosts/omp/agents/independent-reviewer.md +0 -50
- package/modules/hosts/omp/agents/ui-verifier.md +0 -49
- package/modules/hosts/opencode/agents/implementer.md +0 -59
- package/modules/hosts/opencode/agents/independent-reviewer.md +0 -53
- package/modules/hosts/opencode/agents/ui-verifier.md +0 -52
- package/modules/hosts/opencode/commands/wf-build.md +0 -69
- package/modules/hosts/opencode/commands/wf-deploy.md +0 -58
- package/modules/hosts/opencode/commands/wf-design.md +0 -49
- package/modules/hosts/opencode/commands/wf-gate-checklist.md +0 -77
- package/modules/hosts/opencode/commands/wf-maintain.md +0 -76
- package/modules/hosts/opencode/commands/wf-new-task.md +0 -102
- package/modules/hosts/opencode/commands/wf-pipeline-run.md +0 -35
- package/modules/hosts/opencode/commands/wf-plan.md +0 -40
- package/modules/hosts/opencode/commands/wf-review.md +0 -49
- package/modules/hosts/opencode/commands/wf-sync-hosts.md +0 -64
- package/modules/hosts/opencode/commands/wf-test.md +0 -68
- package/modules/hosts/trae/agents/implementer.md +0 -52
- package/modules/hosts/trae/agents/independent-reviewer.md +0 -51
- package/modules/hosts/trae/agents/ui-verifier.md +0 -50
- package/modules/hosts/trae/commands/wf-build.md +0 -70
- package/modules/hosts/trae/commands/wf-deploy.md +0 -59
- package/modules/hosts/trae/commands/wf-design.md +0 -50
- package/modules/hosts/trae/commands/wf-gate-checklist.md +0 -78
- package/modules/hosts/trae/commands/wf-maintain.md +0 -77
- package/modules/hosts/trae/commands/wf-new-task.md +0 -103
- package/modules/hosts/trae/commands/wf-pipeline-run.md +0 -36
- package/modules/hosts/trae/commands/wf-plan.md +0 -41
- package/modules/hosts/trae/commands/wf-review.md +0 -50
- package/modules/hosts/trae/commands/wf-sync-hosts.md +0 -65
- package/modules/hosts/trae/commands/wf-test.md +0 -69
- package/modules/hosts/trae/hooks/post-edit-check.cjs +0 -98
- package/modules/hosts/trae/hooks/pre-shell-check.cjs +0 -192
- package/modules/hosts/trae/hooks/resolve-shell.cjs +0 -30
- package/modules/hosts/trae/hooks.json +0 -29
- package/modules/hosts/trae/rules/beautify-input-chinese.md +0 -6
- package/modules/hosts/trae/rules/git-commit-message.md +0 -10
- package/modules/hosts/trae/rules/project-workflow.md +0 -14
- package/modules/hosts/zcode/agents/implementer.md +0 -51
- package/modules/hosts/zcode/agents/independent-reviewer.md +0 -49
- package/modules/hosts/zcode/agents/ui-verifier.md +0 -48
- package/src/add-gate.mjs +0 -116
- package/src/add-gate.test.mjs +0 -103
- package/src/add-host.mjs +0 -68
- package/src/cli.mjs +0 -169
- package/src/doctor.mjs +0 -629
- package/src/executor.mjs +0 -262
- package/src/executor.test.mjs +0 -295
- package/src/fresh-init.test.mjs +0 -64
- package/src/gate-dotnet-ca.test.mjs +0 -124
- package/src/gates.test.mjs +0 -143
- package/src/init.mjs +0 -382
- package/src/init.test.mjs +0 -163
- package/src/instance-ref.test.mjs +0 -62
- package/src/jscpd-drift.test.mjs +0 -145
- package/src/pack.test.mjs +0 -24
- package/src/profiles.mjs +0 -183
- package/src/render.mjs +0 -132
- package/src/rule-budget.test.mjs +0 -103
- package/src/run-tests.mjs +0 -56
- package/src/stack-profile.test.mjs +0 -95
- package/src/sync-hosts.mjs +0 -257
- package/src/sync-hosts.test.mjs +0 -291
- package/src/sync.mjs +0 -228
- package/src/sync.test.mjs +0 -452
- package/src/trae-hooks.test.mjs +0 -127
- package/src/validate.mjs +0 -77
- package/src/validate.test.mjs +0 -95
- package/templates/.gitattributes +0 -17
- package/templates/AGENTS.md +0 -58
- package/templates/_agents/board/index.html +0 -676
- package/templates/_agents/commands/build.md +0 -84
- package/templates/_agents/commands/deploy.md +0 -66
- package/templates/_agents/commands/design.md +0 -63
- package/templates/_agents/commands/gate-checklist.md +0 -91
- package/templates/_agents/commands/maintain.md +0 -90
- package/templates/_agents/commands/new-task.md +0 -110
- package/templates/_agents/commands/pipeline-run.md +0 -43
- package/templates/_agents/commands/plan.md +0 -48
- package/templates/_agents/commands/review.md +0 -62
- package/templates/_agents/commands/sync-hosts.md +0 -77
- package/templates/_agents/commands/test.md +0 -87
- package/templates/_agents/control-surfaces.txt +0 -53
- package/templates/_agents/engine-lock.json +0 -342
- package/templates/_agents/hooks/check-index-incremental.mjs +0 -48
- package/templates/_agents/hooks/check-pairing-incremental.mjs +0 -66
- package/templates/_agents/hooks/check-wiki-ledger.mjs +0 -30
- package/templates/_agents/hooks/commit-check.cjs +0 -193
- package/templates/_agents/hooks/local-pre-commit +0 -6
- package/templates/_agents/lane-surfaces.txt +0 -17
- package/templates/_agents/level-hints.txt +0 -30
- package/templates/_agents/loop/papercut-debt/DESIGN.md +0 -112
- package/templates/_agents/mechanism-registry.md +0 -35
- package/templates/_agents/metric-claims.txt +0 -81
- package/templates/_agents/notes/engine-internals.md +0 -17
- package/templates/_agents/notes/runtime-env.md +0 -18
- package/templates/_agents/roles/implementer.md +0 -47
- package/templates/_agents/roles/independent-reviewer.md +0 -45
- package/templates/_agents/roles/ui-verifier.md +0 -44
- package/templates/_agents/rule-budgets.txt +0 -20
- package/templates/_agents/scripts/agg-delegations.cjs +0 -302
- package/templates/_agents/scripts/agg-delegations.test.mjs +0 -282
- package/templates/_agents/scripts/agg-gate-stats.mjs +0 -113
- package/templates/_agents/scripts/agg-gate-stats.test.mjs +0 -95
- package/templates/_agents/scripts/agg-judgments.mjs +0 -156
- package/templates/_agents/scripts/agg-judgments.test.mjs +0 -93
- package/templates/_agents/scripts/archive-sweep.mjs +0 -235
- package/templates/_agents/scripts/archive-sweep.test.mjs +0 -129
- package/templates/_agents/scripts/check-attribution.mjs +0 -37
- package/templates/_agents/scripts/check-convergence.mjs +0 -124
- package/templates/_agents/scripts/check-engine-integrity.mjs +0 -220
- package/templates/_agents/scripts/check-engine-integrity.test.mjs +0 -215
- package/templates/_agents/scripts/check-funnel.mjs +0 -56
- package/templates/_agents/scripts/check-hygiene.mjs +0 -167
- package/templates/_agents/scripts/check-hygiene.test.mjs +0 -182
- package/templates/_agents/scripts/check-index-incremental.test.mjs +0 -73
- package/templates/_agents/scripts/check-lane-surface.mjs +0 -238
- package/templates/_agents/scripts/check-lane-surface.test.mjs +0 -302
- package/templates/_agents/scripts/check-ledger-invariant.mjs +0 -586
- package/templates/_agents/scripts/check-ledger-invariant.test.mjs +0 -639
- package/templates/_agents/scripts/check-loop-rev.test.mjs +0 -336
- package/templates/_agents/scripts/check-loop-unit.test.mjs +0 -103
- package/templates/_agents/scripts/check-loop.mjs +0 -1987
- package/templates/_agents/scripts/check-loop.sh +0 -6
- package/templates/_agents/scripts/check-loop.test.mjs +0 -3912
- package/templates/_agents/scripts/check-metric-claims.mjs +0 -277
- package/templates/_agents/scripts/check-prejudgment.mjs +0 -64
- package/templates/_agents/scripts/check-registry.mjs +0 -45
- package/templates/_agents/scripts/check-scope.mjs +0 -96
- package/templates/_agents/scripts/check-scope.test.mjs +0 -99
- package/templates/_agents/scripts/check-scripts-syntax.mjs +0 -84
- package/templates/_agents/scripts/check-scripts-syntax.test.mjs +0 -72
- package/templates/_agents/scripts/check-spec-verif.mjs +0 -47
- package/templates/_agents/scripts/check-stage-index.mjs +0 -40
- package/templates/_agents/scripts/check-stage-index.test.mjs +0 -77
- package/templates/_agents/scripts/closeout-l1.mjs +0 -217
- package/templates/_agents/scripts/closeout-l1.test.mjs +0 -105
- package/templates/_agents/scripts/commit-check-trigger.test.mjs +0 -205
- package/templates/_agents/scripts/compact-ledgers.mjs +0 -97
- package/templates/_agents/scripts/compact-ledgers.test.mjs +0 -162
- package/templates/_agents/scripts/confirm-doc.mjs +0 -610
- package/templates/_agents/scripts/confirm-doc.test.mjs +0 -1119
- package/templates/_agents/scripts/doctor.test.mjs +0 -770
- package/templates/_agents/scripts/draft-sediment.mjs +0 -178
- package/templates/_agents/scripts/draft-sediment.test.mjs +0 -272
- package/templates/_agents/scripts/edit-face-check.mjs +0 -109
- package/templates/_agents/scripts/edit-face-check.test.mjs +0 -99
- package/templates/_agents/scripts/ensure-board.mjs +0 -185
- package/templates/_agents/scripts/fill-intent.mjs +0 -91
- package/templates/_agents/scripts/fill-intent.test.mjs +0 -113
- package/templates/_agents/scripts/fill-plan.mjs +0 -79
- package/templates/_agents/scripts/fill-plan.test.mjs +0 -224
- package/templates/_agents/scripts/fill-spec.mjs +0 -70
- package/templates/_agents/scripts/fill-spec.test.mjs +0 -266
- package/templates/_agents/scripts/fixture-scripts.mjs +0 -153
- package/templates/_agents/scripts/fixture-scripts.test.mjs +0 -112
- package/templates/_agents/scripts/gate-checklist.mjs +0 -209
- package/templates/_agents/scripts/gate-checklist.test.mjs +0 -201
- package/templates/_agents/scripts/gate-seg.mjs +0 -54
- package/templates/_agents/scripts/gate-seg.test.mjs +0 -112
- package/templates/_agents/scripts/gen-effective-policy.mjs +0 -107
- package/templates/_agents/scripts/gen-effective-policy.test.mjs +0 -100
- package/templates/_agents/scripts/gen-verify-evidence.mjs +0 -107
- package/templates/_agents/scripts/gen-verify-evidence.test.mjs +0 -84
- package/templates/_agents/scripts/gen-wiki-board.mjs +0 -276
- package/templates/_agents/scripts/gen-wiki-board.test.mjs +0 -249
- package/templates/_agents/scripts/gen-workflow-dashboard.mjs +0 -251
- package/templates/_agents/scripts/gen-workflow-dashboard.test.mjs +0 -188
- package/templates/_agents/scripts/gen-workflow-index.mjs +0 -201
- package/templates/_agents/scripts/gen-workflow-index.test.mjs +0 -152
- package/templates/_agents/scripts/gen-workflow-metrics.mjs +0 -466
- package/templates/_agents/scripts/gen-workflow-metrics.test.mjs +0 -343
- package/templates/_agents/scripts/git-merge-jsonl.mjs +0 -63
- package/templates/_agents/scripts/git-merge-jsonl.test.mjs +0 -125
- package/templates/_agents/scripts/judgment-ledger.mjs +0 -65
- package/templates/_agents/scripts/judgment-ledger.test.mjs +0 -129
- package/templates/_agents/scripts/kb-cache-evict.mjs +0 -50
- package/templates/_agents/scripts/kb-cache-evict.test.mjs +0 -104
- package/templates/_agents/scripts/kb-search.mjs +0 -413
- package/templates/_agents/scripts/kb-search.test.mjs +0 -299
- package/templates/_agents/scripts/lane-surface-audit.mjs +0 -143
- package/templates/_agents/scripts/lane-surface-audit.test.mjs +0 -93
- package/templates/_agents/scripts/ledger-doc-chain.test.mjs +0 -166
- package/templates/_agents/scripts/ledger-loader.mjs +0 -108
- package/templates/_agents/scripts/ledger-loader.test.mjs +0 -131
- package/templates/_agents/scripts/ledger-prune.mjs +0 -96
- package/templates/_agents/scripts/ledger-prune.test.mjs +0 -120
- package/templates/_agents/scripts/ledger-shards.mjs +0 -344
- package/templates/_agents/scripts/ledger-shards.test.mjs +0 -356
- package/templates/_agents/scripts/ledger-ts-monotonic.test.mjs +0 -135
- package/templates/_agents/scripts/level-criteria.mjs +0 -231
- package/templates/_agents/scripts/level-criteria.test.mjs +0 -281
- package/templates/_agents/scripts/mechanism-retire-watch.mjs +0 -183
- package/templates/_agents/scripts/mechanism-retire-watch.test.mjs +0 -114
- package/templates/_agents/scripts/papercut-debt-controller.mjs +0 -141
- package/templates/_agents/scripts/papercut-debt-controller.test.mjs +0 -127
- package/templates/_agents/scripts/papercut-debt-sensor.mjs +0 -170
- package/templates/_agents/scripts/papercut-debt-sensor.test.mjs +0 -146
- package/templates/_agents/scripts/pipeline-run-docs.mjs +0 -76
- package/templates/_agents/scripts/pipeline-run-run.mjs +0 -63
- package/templates/_agents/scripts/pipeline-run.mjs +0 -867
- package/templates/_agents/scripts/pipeline-run.test.mjs +0 -517
- package/templates/_agents/scripts/policy.mjs +0 -281
- package/templates/_agents/scripts/pre-push.test.mjs +0 -105
- package/templates/_agents/scripts/resolve-merge-conflicts.mjs +0 -110
- package/templates/_agents/scripts/resolve-merge-conflicts.test.mjs +0 -87
- package/templates/_agents/scripts/rewrite-file.mjs +0 -133
- package/templates/_agents/scripts/rewrite-file.test.mjs +0 -148
- package/templates/_agents/scripts/rule-budget.mjs +0 -96
- package/templates/_agents/scripts/rule-budget.test.mjs +0 -118
- package/templates/_agents/scripts/run-tests.mjs +0 -99
- package/templates/_agents/scripts/run-tests.test.mjs +0 -105
- package/templates/_agents/scripts/solidify-task.mjs +0 -109
- package/templates/_agents/scripts/solidify-task.test.mjs +0 -129
- package/templates/_agents/scripts/stage-gates.mjs +0 -343
- package/templates/_agents/scripts/stage-gates.test.mjs +0 -105
- package/templates/_agents/scripts/trust-mode.mjs +0 -67
- package/templates/_agents/scripts/trust-mode.test.mjs +0 -110
- package/templates/_agents/scripts/verify-wiki-consistency.mjs +0 -253
- package/templates/_agents/scripts/verify-wiki-consistency.test.mjs +0 -123
- package/templates/_agents/scripts/verify.mjs +0 -345
- package/templates/_agents/scripts/verify.test.mjs +0 -373
- package/templates/_agents/scripts/wf-journal.mjs +0 -231
- package/templates/_agents/scripts/wf-journal.test.mjs +0 -216
- package/templates/_agents/scripts/wiki-search.mjs +0 -19
- package/templates/_agents/scripts/wiki-search.test.mjs +0 -57
- package/templates/_agents/scripts/workflow-board-server.mjs +0 -393
- package/templates/_agents/scripts/workflow-board-server.test.mjs +0 -201
- package/templates/_agents/scripts/workflow-enums.mjs +0 -70
- package/templates/_agents/scripts/workflow-enums.test.mjs +0 -118
- package/templates/_agents/scripts/workflows-check.mjs +0 -260
- package/templates/_agents/scripts/workflows-check.test.mjs +0 -278
- package/templates/_agents/scripts-test-exempt.txt +0 -16
- package/templates/_agents/skills/papercut-fix/SKILL.md +0 -60
- package/templates/_agents/skills/papercut-fix/references/response-template.md +0 -81
- package/templates/_agents/skills/review-method/SKILL.md +0 -58
- package/templates/_agents/skills/verify-ui/SKILL.md +0 -61
- package/templates/_agents/skills/wiki/SKILL.md +0 -106
- package/templates/_agents/workflow-enums.txt +0 -26
- package/templates/_agents/workflow-modules.txt +0 -11
- package/templates/_agents/workflows/_TEMPLATE.md +0 -75
- package/templates/_agents/workflows/pipeline-closing.md +0 -28
- package/templates/_agents/workflows//347/244/272/344/276/213-/345/271/266/350/241/214/345/256/236/347/216/260/350/257/204/345/256/241.md +0 -16
- package/templates/_githooks/commit-msg +0 -17
- package/templates/_githooks/post-commit +0 -10
- package/templates/_githooks/pre-commit +0 -126
- package/templates/_githooks/pre-merge-commit +0 -29
- package/templates/_githooks/pre-push +0 -136
- package/templates/_github/workflows/kit-ci.yml +0 -49
- package/templates/wiki/INDEX.md +0 -73
- package/templates/wiki/drafts-archive/README.md +0 -3
- package/templates/wiki//344/272/247/345/223/201/351/234/200/346/261/202/README.md +0 -3
- package/templates/wiki//345/274/200/345/217/221/346/226/271/346/241/210/README.md +0 -3
- package/templates/wiki//346/225/260/346/215/256/347/273/264/346/212/244/README.md +0 -3
- package/templates/wiki//346/265/213/350/257/225/346/212/245/345/221/212/README.md +0 -3
- package/templates/wiki//347/224/250/346/210/267/345/212/237/350/203/275/README.md +0 -3
- package/templates/wiki//347/237/245/350/257/206/346/262/211/346/267/200/346/200/273/350/247/210.html +0 -77
- package/templates/wiki//351/241/271/347/233/256/350/247/204/350/214/203/README.md +0 -3
- package/templates/wiki//351/241/271/347/233/256/350/256/241/345/210/222/README.md +0 -3
- package/templates/workflow/README.md +0 -91
- package/templates/workflow/delegations.md +0 -29
- package/templates/workflow/incidents/_TEMPLATE.md +0 -51
- package/templates/workflow/intents/_TEMPLATE.md +0 -51
- package/templates/workflow/papercuts.md +0 -9
- package/templates/workflow/plans/_TEMPLATE.md +0 -47
- package/templates/workflow/regression-checklist.md +0 -23
- package/templates/workflow/specs/_TEMPLATE.md +0 -80
- /package/templates/{_agents → engine/.agents}/board/marked.min.js +0 -0
- /package/templates/{_agents/workflows → engine/.agents/pipelines}/steps//347/244/272/344/276/213-/351/203/250/347/275/262/351/252/214/350/257/201.md" +0 -0
- /package/templates/{_agents → engine/.agents}/scripts/git-core.mjs +0 -0
|
@@ -0,0 +1,812 @@
|
|
|
1
|
+
// stage-gates.mjs — 逐阶段前置判定的单源(fill-spec / fill-plan / confirm-doc 共享;stage-gate-machine)
|
|
2
|
+
// 口径(与 check-loop 检查 19 内联实现互引——改一处须跟另一处):
|
|
3
|
+
// 入口「已确认」= 文件存在且 frontmatter 状态 ∈ {approved, done},且【机器事实源】满足其一:
|
|
4
|
+
// ① confirmations.jsonl 台账存在该 doc 的 stage ∈ {approved, done} 行(经 confirm-doc 才产生,防手改状态冒充);
|
|
5
|
+
// ② 存量口径:文档日期早于 policy.confirmDocsEffective,或行首含「流程: legacy」。
|
|
6
|
+
// incident 入口 = 文件存在 + 「时间线」小节内、行首列表条目含「用户确认」(原 maintain.md §3 约定;
|
|
7
|
+
// 2026-09-30 复核 P2-1 收窄为小节内行首条目;第三轮复核 P1-1 起接受日期前缀形态,与模板样例一致);
|
|
8
|
+
// 状态 ∈ {open, fixed, closed}(spec/plan 须先于 fixed 起草,故 open 即为有效态)。
|
|
9
|
+
// 入口「级别」须 ∈ L1-L3;缺失即拒(fail-closed)——**但库存量形态短路**(`流程: legacy` 或 日期早于
|
|
10
|
+
// 确认门生效日):跳过级别校验与 spec 档(2026-09-30 增量复核 N1——存量最可能缺级别,硬拒会锁死
|
|
11
|
+
// spec 起草与确认)。
|
|
12
|
+
// 注意:**库存量信号本身即等于「入口已确认」**(judgeDoc:`台账行 || 存量口径`,与检查 15 / 检查 1 /
|
|
13
|
+
// 配对门的既有口径一致——早于确认门生效日的自报日期即存量豁免,不要求另有台账行);此处「短路」
|
|
14
|
+
// 只额外豁免**级别前置与 spec 档**,不是对台账要求的二次豁免(P2-1:原注释把二者写反,已订正)。
|
|
15
|
+
// plan 门追加:入口级别(取入口 frontmatter 级别,不取工具 --level)为 L2/L3 时,同名 spec 须已确认(同口径)。
|
|
16
|
+
// 探索泳道豁免(hybrid-governance-explore-hardening):同名 intent 仍为 draft 且风险泳道为
|
|
17
|
+
// L1 →「先起草后确认」是协作道
|
|
18
|
+
// 语义(check-loop 检查 19 同款豁免口径),放行 spec/plan 起草与确认;L2/L3 防御道维持入口确认前置。
|
|
19
|
+
// incident 入口不豁免(过目留痕本就轻量)。(原「收口由加固门兜底」随 2026-10-10 收敛系列 2 退役。)
|
|
20
|
+
// L1 plan 即入口(2026-10-10):kind=plan 且无同名 intent/incident 时,级别为 L1(已有文件读 frontmatter,
|
|
21
|
+
// 尚未落盘则读 opts.level)即放行。L2/L3 与 spec 仍要求先有入口。
|
|
22
|
+
// 信任边界声明(沿 audit-gate-hardening 口径):本地可写台账 / 手改状态仍可伪造——本模块只把
|
|
23
|
+
// 「顺手绕过」抬到「主动伪造」,不宣称通道关闭;事后对质靠 git 历史与台账。
|
|
24
|
+
// 设计先例:fill-* 已 import 同目录 workflow-enums.mjs;check-loop 检查 19 内联同口径(门禁脚本自包含、防兄弟依赖)。
|
|
25
|
+
import fs from 'node:fs';
|
|
26
|
+
import path from 'node:path';
|
|
27
|
+
import { spawnSync } from 'node:child_process';
|
|
28
|
+
import { createHash } from 'node:crypto';
|
|
29
|
+
import { loadKitPolicy } from './policy.mjs';
|
|
30
|
+
|
|
31
|
+
export const ENTRY_STATUSES = ['approved', 'done'];
|
|
32
|
+
export const INCIDENT_STATUSES = ['open', 'fixed', 'closed'];
|
|
33
|
+
|
|
34
|
+
// commitmentFingerprint:承诺面指纹(approved 档内容绑定的单源;2026-10-27 approved-content-binding)
|
|
35
|
+
// 语义:用户在 approved 那一刻点头的是「承诺面」——判据文本、红线、目标、改动方案、约束与风险;
|
|
36
|
+
// 关单期的合法动作(勾验收 + 证据回填、确认结果/确认时间回填、复核行改锚)不改承诺面,故归一掉。
|
|
37
|
+
// 归一规则(逐条对应真实关单动作,边界如实声明):
|
|
38
|
+
// ① 剔「确认指纹:」行(指纹自指,与 computeFingerprint 同口径)
|
|
39
|
+
// ①' 剔 frontmatter「状态:」行(状态机自有字段——draft→approved→done 是合法推进,不是承诺变更;
|
|
40
|
+
// 不剔会把每次状态推进误判为承诺改写)
|
|
41
|
+
// ② 剔 frontmatter「确认结果:」「确认时间:」(L3 spec 关单前置回填)
|
|
42
|
+
// ③ 剔复核行(行首「- 复核:」「- 独立复核:」或含「复核上下文:」)——复核锚改写属关单前置动作
|
|
43
|
+
// ③b 剔确认记录行(行首「- 确认结果:」「- 确认时间:」)——确认记录非承诺(frontmatter 同名键见②)
|
|
44
|
+
// ④ 勾选态归一:`- [x]`/`- [X]` → `- [ ]`(勾验收是关单动作,不是承诺变更)
|
|
45
|
+
// ⑤ 剔证据尾注:`(证据:…)`/`(证据:…)` 整段,及行内首个「证据:」至行尾
|
|
46
|
+
// ⑥ 剔留痕尾注:行内首个「留痕:」至行尾(任务项实现留痕回填属关单动作,与证据尾注同口径;
|
|
47
|
+
// papercut 2026-10-30「留痕行漂移」)
|
|
48
|
+
// 诚实边界:承诺若被藏进证据括号或复核行,机器看不见——不宣称通道关闭(同本模块信任边界声明口径)。
|
|
49
|
+
// ⑤ 实现注(2026-10-29 根修 papercuts 2026-10-29 行「stage-gates 归一漏」):剥段按括号配对深度——
|
|
50
|
+
// 证据段内嵌括号时旧正则 [^()()]* 不匹配,回落「截断至证据:」留下悬空开括号 → 归一漂移 → 关单被误拒。
|
|
51
|
+
const stripEvidenceSegment = (l) => {
|
|
52
|
+
const idx = l.search(/证据[::]/);
|
|
53
|
+
if (idx < 0) return l;
|
|
54
|
+
// 自「证据:」向前找紧邻开括号:先遇闭括号 = 证据不在括号组内(裸「证据:…」)→ 剥至行尾
|
|
55
|
+
let open = -1;
|
|
56
|
+
for (let i = idx - 1; i >= 0; i--) {
|
|
57
|
+
const c = l[i];
|
|
58
|
+
if (c === ')' || c === ')') break;
|
|
59
|
+
if (c === '(' || c === '(') { open = i; break; }
|
|
60
|
+
}
|
|
61
|
+
if (open < 0) return l.slice(0, idx).replace(/[,,、;;]\s*$/, ''); // 裸形态连带剥前导逗号/顿号
|
|
62
|
+
// 深度配对剥整组(全/半角同 family 计数;未配对至行尾 → 剥开括号起至行尾,不留悬空)
|
|
63
|
+
let depth = 0;
|
|
64
|
+
for (let i = open; i < l.length; i++) {
|
|
65
|
+
const c = l[i];
|
|
66
|
+
if (c === '(' || c === '(') depth++;
|
|
67
|
+
else if (c === ')' || c === ')') {
|
|
68
|
+
depth--;
|
|
69
|
+
if (depth === 0) return l.slice(0, open) + l.slice(i + 1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return l.slice(0, open);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export function commitmentFingerprint(text) {
|
|
76
|
+
const lines = Array.isArray(text) ? text : String(text).replace(/\r\n/g, '\n').split('\n');
|
|
77
|
+
const out = [];
|
|
78
|
+
let inFm = false;
|
|
79
|
+
for (let i = 0; i < lines.length; i++) {
|
|
80
|
+
let l = lines[i];
|
|
81
|
+
if (i === 0) {
|
|
82
|
+
if (/^---\s*$/.test(l)) { inFm = true; out.push(l); continue; }
|
|
83
|
+
}
|
|
84
|
+
if (inFm) {
|
|
85
|
+
if (/^---\s*$/.test(l)) { inFm = false; out.push(l); continue; }
|
|
86
|
+
if (/^确认指纹:/.test(l)) continue;
|
|
87
|
+
if (/^状态:/.test(l)) continue;
|
|
88
|
+
if (/^(确认结果|确认时间):/.test(l)) continue;
|
|
89
|
+
}
|
|
90
|
+
if (/^\s*[-*]\s*(独立复核|复核)\s*[::]/.test(l) || l.includes('复核上下文:')) continue;
|
|
91
|
+
if (/^\s*[-*]\s*(确认结果|确认时间)\s*[::]/.test(l)) continue;
|
|
92
|
+
let prev;
|
|
93
|
+
do { prev = l; l = stripEvidenceSegment(l); } while (l !== prev); // 一行多段证据循环剥净
|
|
94
|
+
const lk = l.search(/留痕[::]/);
|
|
95
|
+
if (lk >= 0) l = l.slice(0, lk);
|
|
96
|
+
l = l.replace(/^(\s*[-*]\s*)\[[xX]\]/, '$1[ ]');
|
|
97
|
+
l = l.replace(/\s+$/, '');
|
|
98
|
+
if (!l.trim()) continue;
|
|
99
|
+
out.push(l);
|
|
100
|
+
}
|
|
101
|
+
return createHash('sha256').update(out.join('\n'), 'utf8').digest('hex').slice(0, 16);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// readFm:frontmatter 区(首 --- 至闭合 ---)取单字段值;无 frontmatter / 无该键 → ''
|
|
105
|
+
export function readFm(abs, key) {
|
|
106
|
+
let text;
|
|
107
|
+
try { text = fs.readFileSync(abs, 'utf8'); } catch { return ''; }
|
|
108
|
+
const lines = text.replace(/\r\n/g, '\n').split('\n');
|
|
109
|
+
if (!/^---\s*$/.test(lines[0] || '')) return '';
|
|
110
|
+
for (let i = 1; i < lines.length; i++) {
|
|
111
|
+
if (/^---\s*$/.test(lines[i])) break;
|
|
112
|
+
const m = lines[i].match(new RegExp(`^${key}:\\s*(.*)$`));
|
|
113
|
+
if (m) return m[1].trim();
|
|
114
|
+
}
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function readBody(abs) {
|
|
119
|
+
try { return fs.readFileSync(abs, 'utf8'); } catch { return ''; }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
import { loadAllConfirmations } from './ledger-loader.mjs';
|
|
123
|
+
|
|
124
|
+
// readLedger:透明支持主台账与 .agents/confirmations.d/*.jsonl 分片台账
|
|
125
|
+
export function readLedger(root) {
|
|
126
|
+
return loadAllConfirmations(root);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// judgeDoc:状态枚举 + 机器事实源判定(供入口 / spec 复用)
|
|
130
|
+
// legacy:库存量信号(`流程: legacy` 标记 或 日期 < confirmDocsEffective)——所有调用方与门禁其余部分
|
|
131
|
+
// 同口径(配对门 / 检查 1 / 检查 15 / 检查 19);2026-09-30 复核 N1:存量入口须先短路,不得被
|
|
132
|
+
// 「缺级别」fail-closed 硬拒(存量最可能缺级别,硬拒会锁死 spec 起草/确认,违反「存量零新增」契约)。
|
|
133
|
+
function judgeDoc(root, abs, rel, statuses) {
|
|
134
|
+
const st = readFm(abs, '状态');
|
|
135
|
+
if (!statuses.includes(st)) {
|
|
136
|
+
return { ok: false, status: st, legacy: false, reason: `状态「${st || '缺失'}」不在 ${statuses.join(' / ')}` };
|
|
137
|
+
}
|
|
138
|
+
const policy = loadKitPolicy(root);
|
|
139
|
+
const body = readBody(abs);
|
|
140
|
+
const legacyByMarker = body.split(/\r?\n/).some((l) => /^流程: legacy/.test(l));
|
|
141
|
+
const d = readFm(abs, '日期') || readFm(abs, '发现');
|
|
142
|
+
const legacyByDate = /^\d{4}-\d{2}-\d{2}$/.test(d) && d < policy.confirmDocsEffective;
|
|
143
|
+
const legacy = legacyByMarker || legacyByDate;
|
|
144
|
+
const hasRow = readLedger(root).some((e) => e && e.doc === rel && (e.stage === 'approved' || e.stage === 'done'));
|
|
145
|
+
if (hasRow || legacy) return { ok: true, status: st, legacy };
|
|
146
|
+
return { ok: false, status: st, legacy: false, reason: `无确认台账行(门禁后的入口须经 confirm-doc,且台账无 ${rel} 的 approved / done 行)` };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// entryStorageLegacy:入口是否属「库存量」形态(`流程: legacy` 标记 或 日期早于确认门生效日)——
|
|
150
|
+
// 与 judgeDoc 的存量信号同口径,供门在**级别校验**处短路(2026-09-30 增量复核 N1)。注意:本短路
|
|
151
|
+
// **只豁免 level 前置**(存量多为门禁前建档、无级别字段),**不豁免台账要求**——`judgeDoc` 的
|
|
152
|
+
// hasRow||legacy 仍照常判定(门禁后无台账行即拒,不因日期早于生效日而放行)。
|
|
153
|
+
export function entryStorageLegacy(root, abs) {
|
|
154
|
+
const body = readBody(abs);
|
|
155
|
+
if (body.split(/\r?\n/).some((l) => /^流程: legacy/.test(l))) return true;
|
|
156
|
+
const d = readFm(abs, '日期') || readFm(abs, '发现');
|
|
157
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(d) && d < loadKitPolicy(root).confirmDocsEffective;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// incidentMarked:「## 时间线」小节内、行首列表条目形态的「用户确认」(维持口径;正文叙述句不算——
|
|
161
|
+
// 2026-09-30 复核 P2-1 实证:全仓唯一历史命中为叙述句,非过目留痕)。
|
|
162
|
+
// 行首可选日期前缀(`- 2026-09-30 用户确认:…`)与可选加粗(`- **用户确认**:…`)均接受——
|
|
163
|
+
// 与 _TEMPLATE.md 时间线样例形态保持一致(2026-09-30 第三轮复核 P1-1:样例若不可解析即误导)。
|
|
164
|
+
export function incidentMarked(body) {
|
|
165
|
+
let inTimeline = false;
|
|
166
|
+
for (const l of String(body).replace(/\r\n/g, '\n').split('\n')) {
|
|
167
|
+
if (/^##\s/.test(l)) { inTimeline = /^##\s*时间线/.test(l); continue; }
|
|
168
|
+
if (inTimeline && MARK_RE.test(l)) return true;
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// MARK_RE:行首列表条目 + 可选日期前缀(YYYY-MM-DD 或 <日期> 占位)+ 可选加粗围栏(词前 / 词后均可)
|
|
174
|
+
// + 「用户确认」+ **须紧跟冒号或行尾**(词边界)。
|
|
175
|
+
// 形态矩阵(2026-09-30 四/五轮复核收敛,8 正例 / 5 负例由 fill-spec.test S19/S20 钉死):
|
|
176
|
+
// 命中:`- 用户确认:…` / `- **用户确认**:…` / `- 2026-09-30 用户确认:…` / `- <日期> **用户确认**:…` / 行尾无冒号
|
|
177
|
+
// 拒绝:`- 2026-09-30 用户确认了方案` / `- 用户确认书已归档` / `- 用户确认。` / `- 待用户确认:…`
|
|
178
|
+
// 注:词前的 `\**` 与词后的 `\**` 必须都允许——只开一侧即产生结构性假阴性(第五轮复核 P1 实证:
|
|
179
|
+
// 加粗围栏形态被拒,与 _TEMPLATE.md 自述契约冲突)。
|
|
180
|
+
export const MARK_RE = /^\s*[-*]\s*(?:\d{4}-\d{2}-\d{2}|<日期>)?\s*\**用户确认\**(?=\s*[::]|\s*$)/;
|
|
181
|
+
|
|
182
|
+
// entryConfirmed:同主题入口判定(intent 优先;否则 incidents)——返回 {ok, kind, rel, level, status, reason?}
|
|
183
|
+
export function entryConfirmed(root, base) {
|
|
184
|
+
const intentRel = `workflow/intents/${base}.md`;
|
|
185
|
+
const intentAbs = path.join(root, intentRel);
|
|
186
|
+
if (fs.existsSync(intentAbs)) {
|
|
187
|
+
const r = judgeDoc(root, intentAbs, intentRel, ENTRY_STATUSES);
|
|
188
|
+
return { ...r, kind: 'intent', rel: intentRel, level: readFm(intentAbs, '级别'), date: readFm(intentAbs, '日期'), storageLegacy: entryStorageLegacy(root, intentAbs) };
|
|
189
|
+
}
|
|
190
|
+
const incRel = `workflow/incidents/${base}.md`;
|
|
191
|
+
const incAbs = path.join(root, incRel);
|
|
192
|
+
if (fs.existsSync(incAbs)) {
|
|
193
|
+
const st = readFm(incAbs, '状态');
|
|
194
|
+
const level = readFm(incAbs, '级别');
|
|
195
|
+
if (INCIDENT_STATUSES.includes(st) && incidentMarked(readBody(incAbs))) {
|
|
196
|
+
return { ok: true, kind: 'incident', rel: incRel, level, status: st, legacy: false };
|
|
197
|
+
}
|
|
198
|
+
const why = !INCIDENT_STATUSES.includes(st) ? `状态「${st || '缺失'}」非法` : '「时间线」小节缺「用户确认」条目(maintain.md §3)';
|
|
199
|
+
return { ok: false, kind: 'incident', rel: incRel, level, status: st, legacy: false, reason: `同名 incident 未过目确认——${why}` };
|
|
200
|
+
}
|
|
201
|
+
return { ok: false, kind: null, rel: null, level: '', status: '', reason: `未找到同名入口(workflow/intents 与 workflow/incidents 均无 ${base}.md)` };
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// specConfirmed:plan 门的 L2/L3 追加要求
|
|
205
|
+
export function specConfirmed(root, base) {
|
|
206
|
+
const rel = `workflow/specs/${base}.md`;
|
|
207
|
+
const abs = path.join(root, rel);
|
|
208
|
+
if (!fs.existsSync(abs)) return { ok: false, reason: `缺同名 spec(${rel})` };
|
|
209
|
+
return judgeDoc(root, abs, rel, ENTRY_STATUSES);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// ---- 关单完成度门(closeout-completeness 2026-10-24)----
|
|
213
|
+
// 背景(复核 P1):两个承诺此前只有 closeout skill §0 的流程内自核——L2/L3 intent →done 既不要求
|
|
214
|
+
// 同名 plan 已确认(s01 仅 WARN),也不要求独立复核行(s01 只对 L3 spec WARN)。agent 跳过自核即可
|
|
215
|
+
// 合规关单。本组把判据前移到 confirm-doc 的 →done 动作时刻(与 L2/L3 spec 关单门同一执法位置),
|
|
216
|
+
// 判据与 closeout skill §0 同口径,不新增第二套语义。
|
|
217
|
+
function archiveCandidates(root, kind, base) {
|
|
218
|
+
const out = [];
|
|
219
|
+
const ar = path.join(root, 'workflow', 'archive');
|
|
220
|
+
if (!fs.existsSync(ar)) return out;
|
|
221
|
+
for (const month of fs.readdirSync(ar)) {
|
|
222
|
+
const p = path.join(ar, month, kind, `${base}.md`);
|
|
223
|
+
if (fs.existsSync(p)) out.push(p);
|
|
224
|
+
}
|
|
225
|
+
return out;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// planConfirmedFor:L2/L3 intent 关单门——同名 plan 须存在且已确认(approved/done)。
|
|
229
|
+
// 归档感知(关单即归档是既有语义);台账匹配仍用原路径(归档不改台账 doc 字段)。
|
|
230
|
+
// 边界(2026-10-24 复核 m2):plan 被合法置 superseded/cancelled 时本门恒拒——该 intent 的 →done
|
|
231
|
+
// 通道随之关闭(superseded 不可逆)。正确处置是**intent 同步 superseded**,不是放宽本门;勿在
|
|
232
|
+
// 此处加 superseded 放行(否则「plan 已废弃但 intent 照样关单」成为逃逸路径)。
|
|
233
|
+
export function planConfirmedFor(root, base) {
|
|
234
|
+
const rel = `workflow/plans/${base}.md`;
|
|
235
|
+
const abs = path.join(root, rel);
|
|
236
|
+
const target = fs.existsSync(abs) ? abs : archiveCandidates(root, 'plans', base)[0];
|
|
237
|
+
if (!target) return { ok: false, reason: `缺同名 plan(${rel},活跃与归档均未命中)` };
|
|
238
|
+
return judgeDoc(root, target, rel, ENTRY_STATUSES);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// reviewLineFor:L2/L3 关单门——intent 或同名 spec 正文须有独立复核落盘行,且含可证伪基底。
|
|
242
|
+
// 判据与 check-loop s01(`^- 独立复核:`)及 closeout §0.3(行内含「复核上下文:」)单源。
|
|
243
|
+
const REVIEW_LINE_RE = /^- 独立复核:/;
|
|
244
|
+
export function reviewLineFor(root, base) {
|
|
245
|
+
const found = [];
|
|
246
|
+
for (const [kind, rel] of [['intents', `workflow/intents/${base}.md`], ['specs', `workflow/specs/${base}.md`]]) {
|
|
247
|
+
const abs = path.join(root, rel);
|
|
248
|
+
const paths = fs.existsSync(abs) ? [abs] : archiveCandidates(root, kind, base);
|
|
249
|
+
for (const p of paths) {
|
|
250
|
+
// 逐行全取(2026-10-24 复核 m1):原 find() 只取每个文件**首个**「- 独立复核:」行——
|
|
251
|
+
// 首行无「复核上下文:」而后续行有时会误拒(实证 specs/2026-10-18-po-concurrent-overorder-lost-update.md:202/:204)
|
|
252
|
+
const lines = readBody(p).replace(/\r\n/g, '\n').split('\n').filter((l) => REVIEW_LINE_RE.test(l));
|
|
253
|
+
for (const l of lines) found.push(l.trim());
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (!found.length) return { ok: false, reason: 'intent 与 spec 均无「- 独立复核:」落盘行' };
|
|
257
|
+
if (!found.some((l) => /复核上下文:/.test(l))) {
|
|
258
|
+
return { ok: false, reason: '独立复核行缺「复核上下文:<会话/子代理 id>」(独立性声明无可证伪基底)' };
|
|
259
|
+
}
|
|
260
|
+
return { ok: true, line: found.find((l) => /复核上下文:/.test(l)) };
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// laneOfDoc:泳道单源取法(2026-10-10 收敛系列 2 起**级别单字段协议**——原 risk_level 双字段协议
|
|
264
|
+
// 随 5% 使用率退役,见 .agents/config/mechanism-registry.md;存量 risk_level 字段宽容不校验):
|
|
265
|
+
// 级别非法/缺失 → suspect(fail-closed 就严);L1 → low,L2/L3 → high。
|
|
266
|
+
// suspect 消费规则:红线类检查按 low 执行(拦红线);豁免类门(起草豁免/--batch/--auto/逐阶段深度)
|
|
267
|
+
// 按 high 执行(不豁免)。
|
|
268
|
+
export function laneOfDoc(level) {
|
|
269
|
+
if (!/^L[1-3]$/.test(level || '')) return 'suspect';
|
|
270
|
+
return level === 'L1' ? 'low' : 'high';
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// ---- 歧义清单门(clarify-ledger 2026-10-22)----
|
|
274
|
+
// 设计取向:**入口靠闭集扫描,出口靠机器判据**。2026-10-16 的「模糊点纪律」只有出口(approved 前
|
|
275
|
+
// [NEEDS CLARIFICATION] 清零)——判据为空、无入口方法,等于把「发现自己的模糊」交给模型自我觉察,
|
|
276
|
+
// 而这是模型最不擅长的能力。此处补三件事:
|
|
277
|
+
// ① 入口:固定 6 维(CLARIFY_DIMS)强制扫描,缺任一维即「未扫描」,杜绝选择性失明;
|
|
278
|
+
// ② 判据:状态闭集(已定/待澄清)+ 待澄清归零 + 依据非空,全部机器可判,不依赖 agent 自述;
|
|
279
|
+
// ③ 反逃避:可实验项必须在起草期用实验关闭(stages.md Design §2 工序承载),只允许「任何实验都定不了」的
|
|
280
|
+
// 遗留为待澄清——本门只验形态,分型纪律由工序约束(不可机器判的部分不装成机器判)。
|
|
281
|
+
// 信任边界(同全模块口径):把「漏想」抬到「显式写已定 + 编依据」的主动伪造,事后靠 git 历史对质。
|
|
282
|
+
export const CLARIFY_DIMS = ['状态与边界', '数据口径', '失败路径', '契约对称', '存量数据', '验收可测性'];
|
|
283
|
+
export const CLARIFY_STATUSES = ['已定', '待澄清'];
|
|
284
|
+
|
|
285
|
+
// parseClarifyTable:从 spec 正文解析「## 歧义清单」表(行首管道表;跳过表头与分隔行)
|
|
286
|
+
export function parseClarifyTable(text) {
|
|
287
|
+
const lines = String(text || '').replace(/\r\n/g, '\n').split('\n');
|
|
288
|
+
let start = -1;
|
|
289
|
+
for (let i = 0; i < lines.length; i++) {
|
|
290
|
+
if (/^##\s*歧义清单\s*$/.test(lines[i].trim())) { start = i; break; }
|
|
291
|
+
}
|
|
292
|
+
if (start < 0) return { found: false, rows: [] };
|
|
293
|
+
const rows = [];
|
|
294
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
295
|
+
if (/^##\s/.test(lines[i])) break;
|
|
296
|
+
if (!/^\s*\|/.test(lines[i])) continue;
|
|
297
|
+
const cells = lines[i].replace(/^\s*\|/, '').replace(/\|\s*$/, '').split('|').map((c) => c.trim());
|
|
298
|
+
if (cells.length < 4) continue;
|
|
299
|
+
if (/^:?-{2,}:?$/.test(cells[0]) || cells[0] === '维度') continue; // 分隔行 / 表头
|
|
300
|
+
rows.push({ dim: cells[0], concl: cells[1] || '', basis: cells[2] || '', status: cells[3] || '', line: i + 1 });
|
|
301
|
+
}
|
|
302
|
+
return { found: true, rows };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// clarifyGate:spec 确认门前置(confirmGateFor 调用)。
|
|
306
|
+
// applied=false 的三种情形一律放行且零噪声:政策无 clarifySince(v1–v12)/ 文档缺「日期」不可判定 / 锚前存量。
|
|
307
|
+
export function clarifyGate(root, docRel) {
|
|
308
|
+
let pol = null;
|
|
309
|
+
try { pol = loadKitPolicy(root); } catch { return { applied: false }; }
|
|
310
|
+
const since = pol && pol.clarifySince;
|
|
311
|
+
if (!since) return { applied: false };
|
|
312
|
+
const abs = path.join(root, ...docRel.split('/'));
|
|
313
|
+
const date = readFm(abs, '日期');
|
|
314
|
+
if (!date) return { applied: false };
|
|
315
|
+
if (date < since) return { applied: false };
|
|
316
|
+
const { found, rows } = parseClarifyTable(readBody(abs));
|
|
317
|
+
const hint = `补「## 歧义清单」表:6 维(${CLARIFY_DIMS.join(' / ')})逐维一行,列序 维度 | 结论 | 依据 或 问题 | 状态;`
|
|
318
|
+
+ '可实验的先用实验关闭并写依据,只有「任何实验都定不了」的才留「待澄清」并当场问用户';
|
|
319
|
+
if (!found) {
|
|
320
|
+
return { applied: true, ok: false, reason: 'spec 缺「## 歧义清单」节(口径见 workflow/specs/_TEMPLATE.md)', hint };
|
|
321
|
+
}
|
|
322
|
+
const dims = new Set(rows.map((r) => r.dim));
|
|
323
|
+
const missing = CLARIFY_DIMS.filter((d) => !dims.has(d));
|
|
324
|
+
if (missing.length) {
|
|
325
|
+
return { applied: true, ok: false, reason: `歧义清单缺维度:${missing.join('、')}(缺维 = 未扫描,不是「无歧义」)`, hint };
|
|
326
|
+
}
|
|
327
|
+
// 规模上界(2026-10-22,参照 spec-kit 对 [NEEDS CLARIFICATION] 的条数封顶):清单是**收敛工具,不是工作台**。
|
|
328
|
+
// 同一维超过 2 行 = 该维根本没想清(或把探索过程直接倒进表里),继续确认只会把不确定转嫁给读者。
|
|
329
|
+
// 上界同时约束「向用户提问的量」——单轮问询的 5 问上限在 stages.md Design §2.7 的工序里承载(机器看不到问询轮次)。
|
|
330
|
+
const perDim = new Map();
|
|
331
|
+
for (const r of rows) perDim.set(r.dim, (perDim.get(r.dim) || 0) + 1);
|
|
332
|
+
const overDim = [...perDim.entries()].filter(([, n]) => n > 2);
|
|
333
|
+
if (overDim.length) {
|
|
334
|
+
return {
|
|
335
|
+
applied: true, ok: false,
|
|
336
|
+
reason: `歧义清单某维超过 2 行(${overDim.map(([d, n]) => `${d}×${n}`).join('、')})——该维没想清,先做实验关闭或把需求拆小`,
|
|
337
|
+
hint,
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
const MAX_ROWS = CLARIFY_DIMS.length * 2;
|
|
341
|
+
if (rows.length > MAX_ROWS) {
|
|
342
|
+
return { applied: true, ok: false, reason: `歧义清单共 ${rows.length} 行,超上限 ${MAX_ROWS}(6 维 × 2)——清单已变工作台`, hint };
|
|
343
|
+
}
|
|
344
|
+
const badStatus = rows.filter((r) => !CLARIFY_STATUSES.includes(r.status));
|
|
345
|
+
if (badStatus.length) {
|
|
346
|
+
return { applied: true, ok: false, reason: `歧义清单状态列非法:第 ${badStatus.map((r) => r.line).join('、')} 行(仅允许 ${CLARIFY_STATUSES.join(' / ')})`, hint };
|
|
347
|
+
}
|
|
348
|
+
const noBasis = rows.filter((r) => !r.basis || r.basis.length < 4);
|
|
349
|
+
if (noBasis.length) {
|
|
350
|
+
return { applied: true, ok: false, reason: `歧义清单缺依据:第 ${noBasis.map((r) => r.line).join('、')} 行(「已定」必须写凭什么定,否则等于没想过)`, hint };
|
|
351
|
+
}
|
|
352
|
+
const pending = rows.filter((r) => r.status === '待澄清');
|
|
353
|
+
if (pending.length) {
|
|
354
|
+
return {
|
|
355
|
+
applied: true, ok: false,
|
|
356
|
+
reason: `尚有 ${pending.length} 条待澄清未关闭:${pending.map((r) => r.dim).join('、')}`,
|
|
357
|
+
hint: '先在对话里问用户拿判定,拿到后把该行状态改「已定」并写依据,再走确认门',
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
return { applied: true, ok: true };
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// ---- 前提质询门(premise-interrogation 2026-10-29)----
|
|
364
|
+
// 与 clarifyGate 互补:歧义清单拦「列出的维度没想清」,本门拦「自信的错误解读」。根因实证
|
|
365
|
+
// 2026-10-23 pml-quota-substitute-identity-overwrite(L3,user 发现):spec 把「代用后显示成谁」的展示
|
|
366
|
+
// 诉求写成存储身份改写——20 个测试按错误前提固化期望、独立复核只核实现自洽不质疑前提、静态门不读语义,
|
|
367
|
+
// 三层吃同一前提同时失守。前提不是歧义(有清单可扫),是未被反问的立论;唯一可拦点在它进事实源(approved)之前。
|
|
368
|
+
export function parsePremiseTable(text) {
|
|
369
|
+
const lines = String(text || '').replace(/\r\n/g, '\n').split('\n');
|
|
370
|
+
let start = -1;
|
|
371
|
+
for (let i = 0; i < lines.length; i++) {
|
|
372
|
+
if (/^##\s*前提质询\s*$/.test(lines[i].trim())) { start = i; break; }
|
|
373
|
+
}
|
|
374
|
+
if (start < 0) return { found: false, rows: [] };
|
|
375
|
+
const rows = [];
|
|
376
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
377
|
+
if (/^##\s/.test(lines[i])) break;
|
|
378
|
+
if (!/^\s*\|/.test(lines[i])) continue;
|
|
379
|
+
const cells = lines[i].replace(/^\s*\|/, '').replace(/\|\s*$/, '').split('|').map((c) => c.trim());
|
|
380
|
+
if (cells.length < 3) continue;
|
|
381
|
+
if (/^:?-{2,}:?$/.test(cells[0]) || cells[0] === '前提') continue; // 分隔行 / 表头
|
|
382
|
+
rows.push({ premise: cells[0], challenge: cells[1] || '', concl: cells[2] || '', line: i + 1 });
|
|
383
|
+
}
|
|
384
|
+
return { found: true, rows };
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// premiseGate:spec 确认门前置(confirmGateFor 调用)。
|
|
388
|
+
// applied=false 的情形同 clarifyGate:政策无 premiseSince(v1–v14)/ 文档缺「日期」不可判定 / 锚前存量。
|
|
389
|
+
export function premiseGate(root, docRel) {
|
|
390
|
+
let pol = null;
|
|
391
|
+
try { pol = loadKitPolicy(root); } catch { return { applied: false }; }
|
|
392
|
+
const since = pol && pol.premiseSince;
|
|
393
|
+
if (!since) return { applied: false };
|
|
394
|
+
const abs = path.join(root, ...docRel.split('/'));
|
|
395
|
+
const date = readFm(abs, '日期');
|
|
396
|
+
if (!date) return { applied: false };
|
|
397
|
+
if (date < since) return { applied: false };
|
|
398
|
+
const { found, rows } = parsePremiseTable(readBody(abs));
|
|
399
|
+
const hint = '补「## 前提质询」表:每行一个立论前提(解读/口径选择,如「展示诉求 vs 存储改写」),'
|
|
400
|
+
+ '反问「换成对立解读会怎样」,结论写凭什么选定(用户原话/文档/实验);无解读风险的小件写一行「无关键前提」+ 理由';
|
|
401
|
+
if (!found) {
|
|
402
|
+
return { applied: true, ok: false, reason: 'spec 缺「## 前提质询」节(口径见 workflow/specs/_TEMPLATE.md)', hint };
|
|
403
|
+
}
|
|
404
|
+
if (!rows.length) {
|
|
405
|
+
return { applied: true, ok: false, reason: '前提质询表为空——至少一行(含「无关键前提」声明行)', hint };
|
|
406
|
+
}
|
|
407
|
+
// 占位行(模板 <…> 未填)视同没写:与验收判据表「作者只填行」同口径。
|
|
408
|
+
const ph = rows.filter((r) => /^</.test(r.premise) || /^</.test(r.concl));
|
|
409
|
+
if (ph.length) {
|
|
410
|
+
return { applied: true, ok: false, reason: `前提质询第 ${ph.map((r) => r.line).join('、')} 行仍是模板占位未填`, hint };
|
|
411
|
+
}
|
|
412
|
+
// 上界(同「清单是收敛工具不是工作台」纪律):前提是立论骨架,>5 行 = 没提炼或 spec 该拆小。
|
|
413
|
+
const MAX_ROWS = 5;
|
|
414
|
+
if (rows.length > MAX_ROWS) {
|
|
415
|
+
return { applied: true, ok: false, reason: `前提质询共 ${rows.length} 行,超上限 ${MAX_ROWS}——前提没提炼,或 spec 该拆小`, hint };
|
|
416
|
+
}
|
|
417
|
+
const noChal = rows.filter((r) => r.challenge.length < 4);
|
|
418
|
+
if (noChal.length) {
|
|
419
|
+
return { applied: true, ok: false, reason: `前提质询缺反问:第 ${noChal.map((r) => r.line).join('、')} 行(对立解读没问 = 没质询)`, hint };
|
|
420
|
+
}
|
|
421
|
+
const noBasis = rows.filter((r) => !r.concl || r.concl.length < 4);
|
|
422
|
+
if (noBasis.length) {
|
|
423
|
+
return { applied: true, ok: false, reason: `前提质询缺结论依据:第 ${noBasis.map((r) => r.line).join('、')} 行(选定解读须写凭什么——用户原话/文档/实验)`, hint };
|
|
424
|
+
}
|
|
425
|
+
return { applied: true, ok: true };
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// ---- 验收覆盖门(coverage-map 2026-10-22)----
|
|
429
|
+
// 背景(实测):L2/L3 的 intent↔spec 共 37 对,两侧各有一条证据链——intent 验收清单走 §8 勾验、
|
|
430
|
+
// spec 判据表走 §23 判据级对账——但**没有任何编号把两条链连起来**。后果:intent 新增一条验收而 spec
|
|
431
|
+
// 没同步时,§8 照样能勾、§23 照样能过,覆盖率只能靠条数粗比(现 300:228 = 0.76),无法判定是「一条判据
|
|
432
|
+
// 覆盖多条」还是「漏了」。本门补的就是这条单向映射:intent 验收条目编号 A1..An,spec 判据表「对应验收」
|
|
433
|
+
// 列引用之,每条 An 至少被引用一次。
|
|
434
|
+
// 刻意只做**单向**:反向(每条判据须有验收来源)会把并发压测这类技术判据逼着编一条假验收,制造仪式化数据。
|
|
435
|
+
// 挂在 spec 确认门而非 done:覆盖关系在「批准」时就该成立,等 done 时返工成本已最高。
|
|
436
|
+
export function parseIntentAcceptance(text) {
|
|
437
|
+
const lines = String(text || '').replace(/\r\n/g, '\n').split('\n');
|
|
438
|
+
let inSec = false;
|
|
439
|
+
const items = [];
|
|
440
|
+
for (let i = 0; i < lines.length; i++) {
|
|
441
|
+
const l = lines[i];
|
|
442
|
+
if (/^##\s/.test(l)) { inSec = /^##\s*验收标准/.test(l); continue; }
|
|
443
|
+
if (!inSec) continue;
|
|
444
|
+
const m = /^\s*-\s*\[[ xX]\]\s*(.*)$/.exec(l);
|
|
445
|
+
if (!m) continue;
|
|
446
|
+
const idm = /^A(\d+)\b/.exec(m[1]);
|
|
447
|
+
items.push({ id: idm ? `A${idm[1]}` : '', text: m[1].trim(), line: i + 1 });
|
|
448
|
+
}
|
|
449
|
+
return { items, unnumbered: items.filter((x) => !x.id).length };
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// parseAcceptanceTable:spec「## 验收判据」表 → [{crit, ev, stat, refs:[]}]
|
|
453
|
+
export function parseAcceptanceTable(text) {
|
|
454
|
+
const lines = String(text || '').replace(/\r\n/g, '\n').split('\n');
|
|
455
|
+
let inSec = false;
|
|
456
|
+
const rows = [];
|
|
457
|
+
for (let i = 0; i < lines.length; i++) {
|
|
458
|
+
const l = lines[i];
|
|
459
|
+
if (/^##\s/.test(l)) { inSec = /^##\s*.*验收判据/.test(l); continue; }
|
|
460
|
+
if (!inSec || !/^\s*\|/.test(l)) continue;
|
|
461
|
+
const cells = l.replace(/^\s*\|/, '').replace(/\|\s*$/, '').split('|').map((c) => c.trim());
|
|
462
|
+
if (cells.length < 3) continue;
|
|
463
|
+
if (/^:?-{2,}:?$/.test(cells[0]) || cells[0].startsWith('判据(')) continue;
|
|
464
|
+
if (/^<.*>$/.test(cells[0])) continue; // 模板占位行
|
|
465
|
+
const refCell = cells[3] || '';
|
|
466
|
+
const refs = (refCell.match(/A\d+/g) || []);
|
|
467
|
+
rows.push({ crit: cells[0], ev: cells[1] || '', stat: cells[2] || '', refs, hasRefCol: cells.length >= 4 });
|
|
468
|
+
}
|
|
469
|
+
return rows;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// coverageGate:spec 确认门前置。applied=false:政策缺键 / 缺日期 / 锚前 / 无同名 intent(修复类)/ 无判据表。
|
|
473
|
+
export function coverageGate(root, docRel) {
|
|
474
|
+
let pol = null;
|
|
475
|
+
try { pol = loadKitPolicy(root); } catch { return { applied: false }; }
|
|
476
|
+
const since = pol && pol.coverageSince;
|
|
477
|
+
if (!since) return { applied: false };
|
|
478
|
+
const abs = path.join(root, ...docRel.split('/'));
|
|
479
|
+
const date = readFm(abs, '日期');
|
|
480
|
+
if (!date || date < since) return { applied: false };
|
|
481
|
+
const base = path.basename(docRel).replace(/\.md$/, '');
|
|
482
|
+
const intentAbs = path.join(root, 'workflow', 'intents', `${base}.md`);
|
|
483
|
+
if (!fs.existsSync(intentAbs)) return { applied: false };
|
|
484
|
+
const acc = parseIntentAcceptance(readBody(intentAbs));
|
|
485
|
+
if (!acc.items.length) return { applied: false };
|
|
486
|
+
const rows = parseAcceptanceTable(readBody(abs));
|
|
487
|
+
if (!rows.length) return { applied: false }; // 判据表缺失归 §23 管,不在此重复执法
|
|
488
|
+
const hint = '给 intent「验收标准」每条加稳定编号 A1..An,再在 spec「验收判据」表第 4 列写对应编号(可一对多)';
|
|
489
|
+
if (acc.unnumbered) {
|
|
490
|
+
return { applied: true, ok: false, reason: `${base} 入口 intent 有 ${acc.unnumbered} 条验收未编号(锚后须 A1..An)`, hint };
|
|
491
|
+
}
|
|
492
|
+
const ids = acc.items.map((x) => x.id);
|
|
493
|
+
const dup = ids.filter((v, i) => ids.indexOf(v) !== i);
|
|
494
|
+
if (dup.length) return { applied: true, ok: false, reason: `入口 intent 验收编号重复:${[...new Set(dup)].join('、')}`, hint: '编号须唯一——增删用新号,不复用旧号(引用会指错)' };
|
|
495
|
+
if (!rows.some((r) => r.hasRefCol)) {
|
|
496
|
+
return { applied: true, ok: false, reason: 'spec「验收判据」表缺「对应验收」列(第 4 列)', hint };
|
|
497
|
+
}
|
|
498
|
+
const refs = new Set(rows.flatMap((r) => r.refs));
|
|
499
|
+
const missing = ids.filter((id) => !refs.has(id));
|
|
500
|
+
if (missing.length) {
|
|
501
|
+
return {
|
|
502
|
+
applied: true, ok: false,
|
|
503
|
+
reason: `spec 未覆盖 ${missing.length}/${ids.length} 条 intent 验收:${missing.join('、')}`,
|
|
504
|
+
hint: '给这些验收补判据行并填「对应验收」,或确认该验收已被现有判据覆盖后把编号补进对应行',
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
return { applied: true, ok: true };
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// draftGateFor:起草门总判(kind = 'spec' | 'plan',fill 工具与 confirm-doc 逐阶段门共用)
|
|
511
|
+
export function draftGateFor(kind, root, base, opts = {}) {
|
|
512
|
+
const entry = entryConfirmed(root, base);
|
|
513
|
+
if (!entry.ok) {
|
|
514
|
+
// 探索泳道豁免(hybrid-governance-explore-hardening):L1 draft intent 放行起草
|
|
515
|
+
// ——「先动手后确认」;泳道单源 laneOfDoc(2026-10-10 起级别单字段;suspect 不豁免——级别缺失/
|
|
516
|
+
// 非法按防御道走入口确认)。
|
|
517
|
+
const lane = laneOfDoc(entry.level);
|
|
518
|
+
if (entry.kind === 'intent' && entry.status === 'draft' && lane === 'low') {
|
|
519
|
+
return { ok: true, entry, laneBypass: true };
|
|
520
|
+
}
|
|
521
|
+
// L1 plan 即入口:没有 intent/incident 时,这份 plan 自己就是入口。
|
|
522
|
+
// 文件已在则级别以文件为准(禁止用 --level L1 把已有 L2 plan 放行);尚未落盘才认 opts.level。
|
|
523
|
+
if (kind === 'plan' && entry.kind === null) {
|
|
524
|
+
const planAbs = path.join(root, 'workflow', 'plans', `${base}.md`);
|
|
525
|
+
const declared = fs.existsSync(planAbs) ? readFm(planAbs, '级别') : (opts.level || '');
|
|
526
|
+
if (declared === 'L1') {
|
|
527
|
+
return {
|
|
528
|
+
ok: true,
|
|
529
|
+
entry: {
|
|
530
|
+
ok: true, kind: 'plan', rel: `workflow/plans/${base}.md`, level: 'L1',
|
|
531
|
+
status: fs.existsSync(planAbs) ? (readFm(planAbs, '状态') || 'draft') : 'draft',
|
|
532
|
+
selfEntry: true, legacy: false,
|
|
533
|
+
},
|
|
534
|
+
laneBypass: true,
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return {
|
|
539
|
+
ok: false,
|
|
540
|
+
reason: `同主题入口未确认——${entry.reason}`,
|
|
541
|
+
hint: '先走 stages.md Plan 章完成入口确认(修复类走 maintain.md,incident 草稿过目后在时间线留「用户确认」条目)',
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
// 库存量形态短路(2026-09-30 增量复核 N1):**只额外豁免「级别前置」与「spec 档」**——
|
|
545
|
+
// 库存量入口(`流程: legacy` / 日期早于确认门生效日)多为门禁前建档、常缺「级别」字段,硬拒会锁死
|
|
546
|
+
// spec 起草与确认。注意:库存量信号**本身即等于入口已确认**(judgeDoc 的 `台账行 || 存量口径`,
|
|
547
|
+
// 与检查 1 / 15 / 配对门同口径)——台账豁免发生在 judgeDoc,不在本处;本处不做二次豁免
|
|
548
|
+
// (第三轮复核 P2-1:原句「台账要求不豁免」把两件事写反,已订正)。
|
|
549
|
+
if (!entry.storageLegacy && !/^L[1-3]$/.test(entry.level)) {
|
|
550
|
+
return {
|
|
551
|
+
ok: false,
|
|
552
|
+
reason: `入口缺合法「级别」字段(现「${entry.level || '缺失'}」,无法判定前置深度)`,
|
|
553
|
+
hint: '先给入口补「级别: L1-L3」字段,再继续',
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
if (kind === 'plan' && !entry.storageLegacy && (entry.level === 'L2' || entry.level === 'L3')) {
|
|
557
|
+
const sp = specConfirmed(root, base);
|
|
558
|
+
if (!sp.ok) {
|
|
559
|
+
return { ok: false, reason: `入口级别 ${entry.level},前置 spec 未确认——${sp.reason}`, hint: '先走 stages.md Design 章完成 spec 确认' };
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return { ok: true, entry };
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// confirmGateFor:确认门总判(confirm-doc 用;docRel = workflow/specs/... 或 workflow/plans/...)
|
|
566
|
+
export function confirmGateFor(root, docRel) {
|
|
567
|
+
const base = path.basename(docRel).replace(/\.md$/, '');
|
|
568
|
+
const kind = docRel.startsWith('workflow/specs/') ? 'spec' : 'plan';
|
|
569
|
+
const g = draftGateFor(kind, root, base);
|
|
570
|
+
if (!g.ok) return g;
|
|
571
|
+
// 歧义清单门(clarify-ledger)+ 前提质询门(premise-interrogation)+ 验收覆盖门(coverage-map):
|
|
572
|
+
// 只在 spec 的 draft→approved 前置上叠加;plan 与存量(锚前/缺日期)不涉。
|
|
573
|
+
// 放在进入门之后——先证明「这份 spec 有资格被确认」,再判「它想清楚了没有」(歧义=已知维度没想清、
|
|
574
|
+
// 前提=立论解读没被反问、覆盖=判据连不回验收),两错并存时先修前置。
|
|
575
|
+
if (kind === 'spec') {
|
|
576
|
+
const cg = clarifyGate(root, docRel);
|
|
577
|
+
if (cg.applied && !cg.ok) return { ok: false, reason: `歧义未清——${cg.reason}`, hint: cg.hint };
|
|
578
|
+
const pg = premiseGate(root, docRel);
|
|
579
|
+
if (pg.applied && !pg.ok) return { ok: false, reason: `前提未质询——${pg.reason}`, hint: pg.hint };
|
|
580
|
+
const vg = coverageGate(root, docRel);
|
|
581
|
+
if (vg.applied && !vg.ok) return { ok: false, reason: `验收覆盖不足——${vg.reason}`, hint: vg.hint };
|
|
582
|
+
}
|
|
583
|
+
return g;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
// ---- done 前置门族(confirm-gate-approved-history)----
|
|
587
|
+
// 背景:stage-gate-machine 关单后检查 14 报「确认态缺失」×2——approved→done 期间从未提交、首次提交即
|
|
588
|
+
// done 态(先 done 后提交),git 历史无 approved 中间态;检查 14 是事后审计(发现即定局),本族把
|
|
589
|
+
// 校验收口到 confirm-doc 的「→done」跳转——「approved 态还在工作区」的最后一刻,即唯一可拦截窗口。
|
|
590
|
+
import { gitOut as coreGitOut, spawnGit as coreSpawnGit } from './git-core.mjs';
|
|
591
|
+
|
|
592
|
+
// 命中判据单源:approvedTraceHit(逐文档,本模块 doneGateFor 与 confirm-doc 用)经
|
|
593
|
+
// APPROVED_TRACE_ARGS 常量承担(2026-09-30 复核 N3 教训:双份字面量靠注释同步必漂移;
|
|
594
|
+
// 批量版 approvedTraceIndex 已随检查 14 退役于 2026-10-28 删除,常量仅剩逐文档消费方)。
|
|
595
|
+
// 注(2026-09-30 复核 P2-2 登记):gitRun 的 GIT 解析 / maxBuffer / 失败语义与 check-loop.mjs 的
|
|
596
|
+
// gitOut、gitReady 与检查 14 段级两条 rev-parse 为**同口径的两份实现**(未合并——检查 14 段结构不动
|
|
597
|
+
// 属本单非目标)——任一侧调整(如加 --no-pager)须同步另一侧,防段级门与文档级判据分叉。
|
|
598
|
+
// gitRun:git-core 单源薄封装(2026-10-10 收敛系列 5——原「同口径两份实现」债偿清;升级点:
|
|
599
|
+
// 记忆化 + 瞬时错误重试 + 基础设施异常响亮出账,语义并集见 git-core 头注)
|
|
600
|
+
function gitRun(root, args) {
|
|
601
|
+
const r = coreSpawnGit(args, root);
|
|
602
|
+
if (r.error || r.status !== 0) return null;
|
|
603
|
+
return r.stdout || '';
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// gitReady:git 环境可用(在仓库内且已有 HEAD)。
|
|
607
|
+
export function gitReady(root) {
|
|
608
|
+
return gitRun(root, ['rev-parse', '--git-dir']) !== null
|
|
609
|
+
&& gitRun(root, ['rev-parse', '-q', '--verify', 'HEAD']) !== null;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// approvedTraceHit:命中判定单源——git 历史是否出现过行首「状态: approved」(经提交进入历史才算,
|
|
613
|
+
// 当前工作区未提交的 approved 不算——这正是「留痕」语义)。rel = 仓库根相对路径。
|
|
614
|
+
// 返回:'' = 从未出现;<sha> = 命中;null = git 调用失败(调用方按各自容错口径处理——done 门跳过,
|
|
615
|
+
// 沿 fail-open 边界;诚实边界声明见 spec。原消费方检查 14 已随 2026-10-28 引擎减重退役)。
|
|
616
|
+
// pickaxe 参数常量(perf-pickaxe-batch):命令行字面量单源由常量承担,替代「双份字面量靠注释
|
|
617
|
+
// 同步」的旧约定(原批量消费方 approvedTraceIndex 已随检查 14 退役删除,常量仅剩逐文档消费方)。
|
|
618
|
+
// 2026-10-11 合并盲视修复(评审 B1 关单实证:2026-09-23-arrival intent 的 approved 痕迹经 evil merge
|
|
619
|
+
// 入库,git log -G 默认不生成合并提交 diff → 痕迹不可见 → done 前置门误拦)。加
|
|
620
|
+
// --diff-merges=first-parent:合并提交按第一父生成 diff,痕迹在合并面即可见(git ≥2.31;更老 git
|
|
621
|
+
// 该旗标报错 → gitRun null → 沿既有 fail-open 边界:检查 14 不报、done 门跳过)。
|
|
622
|
+
// 2026-10-12 工作树分支合并盲视修复(pml-three-ui-tweaks 关单实证:2026-10-10 两个 plan 的
|
|
623
|
+
// approved 痕在 JihWs6 工作树分支提交 37126b5f/83a4b7d4c,merge-base --is-ancestor 验证非当前
|
|
624
|
+
// 分支第一父链可达 → --diff-merges=first-parent 的 diff 不含分支侧痕 → s14 误报"确认态缺失")。
|
|
625
|
+
// 加 --all:让所有分支可达,分支提交(非合并提交)的 approved 痕也能被 -G 命中。性能影响可接受
|
|
626
|
+
//(approvedTraceHit 逐文档 -1 取最近命中,限 workflow 路径)。
|
|
627
|
+
const APPROVED_TRACE_ARGS = ['--all', '--diff-merges=first-parent', '-G', '^状态:[[:space:]]*approved'];
|
|
628
|
+
export function approvedTraceHit(root, rel) {
|
|
629
|
+
const r = gitRun(root, ['log', '-1', '--format=%H', ...APPROVED_TRACE_ARGS, '--', rel]);
|
|
630
|
+
return r === null ? null : r.trim();
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// 批量版 approvedTraceIndex 已随检查 14 退役于 2026-10-28 删除(唯一消费方消失——零调用点实证,
|
|
634
|
+
// 恢复走重新建门;退役时逐文档/批量等价性实证与 scope 限流实测留 git 史)。
|
|
635
|
+
|
|
636
|
+
// doneGateFor:confirm-doc「→done」前置门(三件套 intent/spec/plan 均适用;incidents 的 fixed/closed 不在本门)。
|
|
637
|
+
// 豁免与顺序:① 行首 `流程: legacy` ② 行含「存量确认态豁免(」声明(与检查 14 同标记,显式逃生口)
|
|
638
|
+
// ③ 非 git 环境 ④ git 调用失败 → 均跳过(不误拦)。未豁免且未命中 → 拒绝(调用方负责非零退出 +
|
|
639
|
+
// 零落账 + 零写盘 + 回退指引)。
|
|
640
|
+
export function doneGateFor(root, abs, rel) {
|
|
641
|
+
const body = readBody(abs);
|
|
642
|
+
if (body.split(/\r?\n/).some((l) => /^流程: legacy/.test(l))) return { ok: true, skipped: 'legacy' };
|
|
643
|
+
if (body.split(/\r?\n/).some((l) => l.includes('存量确认态豁免('))) return { ok: true, skipped: 'declared' };
|
|
644
|
+
if (!gitReady(root)) return { ok: true, skipped: 'no-git' };
|
|
645
|
+
const hit = approvedTraceHit(root, rel);
|
|
646
|
+
if (hit === null) return { ok: true, skipped: 'git-error' };
|
|
647
|
+
if (hit === '') {
|
|
648
|
+
return {
|
|
649
|
+
ok: false,
|
|
650
|
+
reason: 'git 历史中从未出现行首「状态: approved」——确认态未留痕(先 done 后提交 / 两跳同批提交)',
|
|
651
|
+
hint: '先把该文档的 approved 态提交(git add 该文件并 commit)后再重试关单',
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
return { ok: true, hit };
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// acceptanceEvidenceGate:→done 关单格式门(done-evidence-gate)——关单是最后一次写入,
|
|
658
|
+
// 验收面的机器可读格式必须在落账前就位,否则 s08(验收缺证据)/s23(收敛无判据)在关单后 hard,
|
|
659
|
+
// 只能走「重确认」返工(wiki-backfill-workflow-slim 关单后补标注实证)。两判据与 check-loop 同源:
|
|
660
|
+
// ① intent / 独立 L1 plan(无同名 intent/incident,s08 口径):验收节 [x] 项逐条须「证据:」标注
|
|
661
|
+
// (同行或块内续行,evRe=/证据[::]/ 同 s08);存在 [ ] 未勾项即拒(s08「验收未对账」同源)。
|
|
662
|
+
// isNew 判据(git 首加 author date ≥ 2026-09-12,s08 accCutoff 同源)才执法;存量与不可判定放行。
|
|
663
|
+
// ② L2/L3 spec:「## 验收判据」节须存在且表有数据行(s23 SEC_RE 同源;无数据行=收敛对账无机器输入)。
|
|
664
|
+
// 豁免沿 doneGateFor 同款三逃生口:流程: legacy / 存量确认态豁免( / 非 git。
|
|
665
|
+
export function acceptanceEvidenceGate(root, abs, rel) {
|
|
666
|
+
const body = readBody(abs);
|
|
667
|
+
const bodyLines = body.split(/\r?\n/);
|
|
668
|
+
if (bodyLines.some((l) => /^流程: legacy/.test(l))) return { ok: true, skipped: 'legacy' };
|
|
669
|
+
if (bodyLines.some((l) => l.includes('存量确认态豁免('))) return { ok: true, skipped: 'declared' };
|
|
670
|
+
if (!gitReady(root)) return { ok: true, skipped: 'no-git' };
|
|
671
|
+
const type = (/(?:^|[\\/])workflow[\\/](intents|specs|plans|incidents)[\\/]/.exec(rel) || [])[1] || '';
|
|
672
|
+
if (!['intents', 'specs', 'plans'].includes(type)) return { ok: true, skipped: 'type' };
|
|
673
|
+
if (type === 'specs') {
|
|
674
|
+
const level = readFm(abs, '级别');
|
|
675
|
+
if (!['L2', 'L3'].includes(level)) return { ok: true };
|
|
676
|
+
const idx = bodyLines.findIndex((l) => /^##\s+.*验收判据/.test(l));
|
|
677
|
+
if (idx === -1) {
|
|
678
|
+
return { ok: false, reason: 'L2/L3 spec 缺「## 验收判据」节(检查 23 收敛对账的机器输入,关单时必须就位)', hint: '补验收判据表(判据 | 证据引用逐行)后重试关单;存量件可正文声明「存量确认态豁免(…)」' };
|
|
679
|
+
}
|
|
680
|
+
const pipeLines = [];
|
|
681
|
+
for (let i = idx + 1; i < bodyLines.length; i++) {
|
|
682
|
+
if (/^##\s/.test(bodyLines[i])) break;
|
|
683
|
+
if (/^\s*\|/.test(bodyLines[i])) pipeLines.push(bodyLines[i]);
|
|
684
|
+
}
|
|
685
|
+
const dataRows = pipeLines.filter((l) => !/^\|[\s:|-]+\|?\s*$/.test(l)).slice(1); // 去分隔行后首行为表头
|
|
686
|
+
if (!dataRows.length) {
|
|
687
|
+
return { ok: false, reason: '「验收判据」表无数据行(空表 = 收敛对账无机器输入,检查 23)', hint: '逐判据登记证据引用(路径 / 全量门命令)后重试关单' };
|
|
688
|
+
}
|
|
689
|
+
return { ok: true };
|
|
690
|
+
}
|
|
691
|
+
// intent / 独立 L1 plan:isNew 执法
|
|
692
|
+
let added = '';
|
|
693
|
+
try {
|
|
694
|
+
added = spawnSync('git', ['log', '--diff-filter=A', '--format=%aI', '-1', '--', rel], { cwd: root, encoding: 'utf8' }).stdout.trim();
|
|
695
|
+
} catch { added = ''; }
|
|
696
|
+
if (!/^\d{4}-/.test(added)) return { ok: true, skipped: 'no-date' };
|
|
697
|
+
if (added < '2026-09-12') return { ok: true, skipped: 'legacy-era' };
|
|
698
|
+
let isTarget = type === 'intents';
|
|
699
|
+
if (type === 'plans') {
|
|
700
|
+
const base = path.basename(rel);
|
|
701
|
+
const hasIntent = fs.existsSync(path.join(root, 'workflow', 'intents', base));
|
|
702
|
+
const hasIncident = fs.existsSync(path.join(root, 'workflow', 'incidents', base));
|
|
703
|
+
isTarget = readFm(abs, '级别') === 'L1' && !hasIntent && !hasIncident;
|
|
704
|
+
}
|
|
705
|
+
if (!isTarget) return { ok: true };
|
|
706
|
+
const secIdx = bodyLines.findIndex((l) => /^##\s*[^#]*验收标准/.test(l));
|
|
707
|
+
if (secIdx === -1) {
|
|
708
|
+
return { ok: false, reason: 'done 前缺「## 验收标准」节(勾验无从核对,s08)', hint: '补验收标准节并逐条勾验补证据后重试关单' };
|
|
709
|
+
}
|
|
710
|
+
let unchecked = 0;
|
|
711
|
+
let missing = 0;
|
|
712
|
+
let firstMissing = '';
|
|
713
|
+
let itemLines = null;
|
|
714
|
+
const flush = () => {
|
|
715
|
+
if (!itemLines) return;
|
|
716
|
+
if (!itemLines.some((l) => /证据[::]/.test(l))) {
|
|
717
|
+
missing++;
|
|
718
|
+
if (!firstMissing) firstMissing = itemLines[0].trim().replace(/^-\s*\[x\]\s*/i, '').slice(0, 60);
|
|
719
|
+
}
|
|
720
|
+
itemLines = null;
|
|
721
|
+
};
|
|
722
|
+
for (let i = secIdx + 1; i < bodyLines.length; i++) {
|
|
723
|
+
const l = bodyLines[i];
|
|
724
|
+
if (/^##\s/.test(l)) break;
|
|
725
|
+
if (/^\s*-\s\[[ xX]\]/.test(l)) {
|
|
726
|
+
flush();
|
|
727
|
+
if (/^\s*-\s\[\s\]/.test(l)) { unchecked++; continue; }
|
|
728
|
+
itemLines = [l];
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
if (itemLines && l.trim()) itemLines.push(l);
|
|
732
|
+
}
|
|
733
|
+
flush();
|
|
734
|
+
if (unchecked) {
|
|
735
|
+
return { ok: false, reason: `验收节有 ${unchecked} 个未勾验项——done 须逐条勾验(s08 验收未对账同源)`, hint: '勾验或移除未达成项(未达成工作另立档)后重试关单' };
|
|
736
|
+
}
|
|
737
|
+
if (missing) {
|
|
738
|
+
return { ok: false, reason: `验收节 ${missing} 个勾选项缺「证据:」标注(首例:${firstMissing}…)`, hint: '每条 [x] 附证据(commit / 用例 / 冒烟输出,同行或紧随续行写「证据:…」)后重试关单' };
|
|
739
|
+
}
|
|
740
|
+
return { ok: true };
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
// incidentTrioGate:incidents →fixed/→closed 的复盘三件套门(closeout-skill-hardening 2026-11-08)。
|
|
744
|
+
// 背景:check-loop §3 三件套随 2026-10-22/28 门禁收敛退役,承载力前移到 closeout skill §0 第 2 项自核——
|
|
745
|
+
// 但自核靠 agent 自觉,跳过即可合规关单。与 L2/L3 配对门「门退了,闭环不退」同思路:执法点前移到
|
|
746
|
+
// confirm-doc 关单动作时刻;判据单源落本函数,skill 只引用,不复制文字。
|
|
747
|
+
// 判据:正文「## 复盘三件套」节内三条编号项(1. 结构性修复 / 2. 防复发验证 / 3. 规范条目,容许
|
|
748
|
+
// ** 加粗与 → 装饰)+「是否需要新 intent」行;选「是」→ 行内引用的 intent 路径须存在。
|
|
749
|
+
// 存量豁免(沿 doneGateFor / acceptanceEvidenceGate 三逃生口 + 首加日锚):2026-11-09 前新建件、
|
|
750
|
+
// 流程: legacy、显式「存量确认态豁免(」、非 git / git 调用失败一律跳过(发布次日起在途件不追溯)。
|
|
751
|
+
export const INCIDENT_TRIO_SINCE = '2026-11-09';
|
|
752
|
+
export function incidentTrioGate(root, abs, rel) {
|
|
753
|
+
const bodyLines = readBody(abs).split(/\r?\n/);
|
|
754
|
+
if (bodyLines.some((l) => /^流程: legacy/.test(l))) return { ok: true, skipped: 'legacy' };
|
|
755
|
+
if (bodyLines.some((l) => l.includes('存量确认态豁免('))) return { ok: true, skipped: 'declared' };
|
|
756
|
+
if (!gitReady(root)) return { ok: true, skipped: 'no-git' };
|
|
757
|
+
let added = '';
|
|
758
|
+
try {
|
|
759
|
+
added = spawnSync('git', ['log', '--diff-filter=A', '--format=%aI', '-1', '--', rel], { cwd: root, encoding: 'utf8' }).stdout.trim();
|
|
760
|
+
} catch { added = ''; }
|
|
761
|
+
if (!/^\d{4}-/.test(added)) return { ok: true, skipped: 'no-date' };
|
|
762
|
+
if (added.slice(0, 10) < INCIDENT_TRIO_SINCE) return { ok: true, skipped: 'legacy-era' };
|
|
763
|
+
const idx = bodyLines.findIndex((l) => /^##\s*复盘三件套/.test(l));
|
|
764
|
+
if (idx === -1) {
|
|
765
|
+
return { ok: false, reason: '缺「## 复盘三件套」节', hint: '补复盘三件套(结构性修复 / 防复发验证 / 规范条目)后重试关单' };
|
|
766
|
+
}
|
|
767
|
+
const sec = [];
|
|
768
|
+
for (let i = idx + 1; i < bodyLines.length; i++) {
|
|
769
|
+
if (/^##\s/.test(bodyLines[i])) break;
|
|
770
|
+
sec.push(bodyLines[i]);
|
|
771
|
+
}
|
|
772
|
+
const text = sec.join('\n');
|
|
773
|
+
const parts = [
|
|
774
|
+
[/^\s*1\.\s*\*{0,2}结构性修复/m, '结构性修复'],
|
|
775
|
+
[/^\s*2\.\s*\*{0,2}防复发验证/m, '防复发验证'],
|
|
776
|
+
[/^\s*3\.\s*\*{0,2}规范条目/m, '规范条目'],
|
|
777
|
+
];
|
|
778
|
+
for (const [re, label] of parts) {
|
|
779
|
+
if (!re.test(text)) {
|
|
780
|
+
return { ok: false, reason: `复盘三件套缺「${label}」节`, hint: '按 incident 模板补三节编号项,再重试关单' };
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (!/是否需要新 intent[::]/.test(text)) {
|
|
784
|
+
return { ok: false, reason: '复盘三件套缺「是否需要新 intent」行', hint: '补「是否需要新 intent:是/否」行(选是须附 intent 路径),再重试关单' };
|
|
785
|
+
}
|
|
786
|
+
if (/是否需要新 intent[::]\s*是/.test(text)) {
|
|
787
|
+
const full = /(workflow[\\/]intents[\\/][\w.-]+\.md)/.exec(text);
|
|
788
|
+
const bare = /([\w.-]+\.md)/.exec(text);
|
|
789
|
+
const ref = full ? full[1] : (bare ? `workflow/intents/${bare[1]}` : '');
|
|
790
|
+
if (!ref) {
|
|
791
|
+
return { ok: false, reason: '「是否需要新 intent:是」但未引用 intent 路径', hint: '在同行附 workflow/intents/<文件名>.md 路径,再重试关单' };
|
|
792
|
+
}
|
|
793
|
+
if (!fs.existsSync(path.join(root, ref.replace(/[\\/]/g, path.sep)))) {
|
|
794
|
+
return { ok: false, reason: `引用的 intent 不存在:${ref}`, hint: '先起草同名 intent 或修正引用路径,再重试关单' };
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return { ok: true };
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// resolveWorkspace:从输出路径推导工作区根与主题名;output 路径不含 workflow 段 → null(仓外草稿,不校验)
|
|
801
|
+
export function resolveWorkspace(outputPath, rootOverride) {
|
|
802
|
+
const abs = path.resolve(outputPath);
|
|
803
|
+
const base = path.basename(abs).replace(/\.md$/, '');
|
|
804
|
+
if (rootOverride) return { root: path.resolve(rootOverride), base };
|
|
805
|
+
const parts = abs.split(path.sep);
|
|
806
|
+
for (let i = parts.length - 2; i >= 0; i--) {
|
|
807
|
+
if (parts[i].toLowerCase() === 'workflow') return { root: parts.slice(0, i).join(path.sep) || path.sep, base };
|
|
808
|
+
}
|
|
809
|
+
return null;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export default { entryConfirmed, specConfirmed, draftGateFor, confirmGateFor, doneGateFor, acceptanceEvidenceGate, incidentTrioGate, gitReady, approvedTraceHit, resolveWorkspace, readFm, readLedger };
|