agentic-flow-kit 1.8.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -148
- package/bin/flow-kit.mjs +5 -2
- package/locales/en/installer.json +25 -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 +67 -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 +25 -0
- package/package.json +23 -36
- package/schemas/install-manifest.schema.json +24 -0
- package/schemas/project-profile.schema.json +28 -0
- package/src/cli/args.mjs +41 -0
- package/src/cli/main.mjs +72 -0
- package/src/commands/add-host.mjs +29 -0
- package/src/commands/doctor.mjs +80 -0
- package/src/commands/install.mjs +149 -0
- package/src/commands/upgrade.mjs +30 -0
- package/src/git/config.mjs +61 -0
- package/src/hosts/registry.mjs +26 -0
- package/src/i18n.mjs +32 -0
- package/src/install/apply.mjs +124 -0
- package/src/install/manifest.mjs +40 -0
- package/src/install/plan.mjs +83 -0
- package/src/render/tokens.mjs +58 -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 +56 -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 +256 -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 +62 -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/pr-review.json +67 -0
- package/templates/engine/.agents/config/principles.md +32 -0
- package/templates/engine/.agents/config/workflow-enums.txt +25 -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 +220 -0
- package/templates/engine/.agents/notes/gate-diet.md +75 -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/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/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-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/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 +283 -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/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/metrics-core.mjs +131 -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/stage-gates.mjs +812 -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 +847 -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 +50 -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 +63 -0
- package/templates/engine/.agents/skills/eval/SKILL.md +42 -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/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 +69 -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 +57 -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 +53 -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 +22 -0
- package/templates/git/.githooks/commit-msg +72 -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/.gitignore.engine +11 -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.json +57 -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 +59 -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 +63 -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 +59 -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/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/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 +13 -0
- package/templates/scaffold/workflow/README.md +67 -0
- package/templates/scaffold/workflow/archive/README.md +3 -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/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/LICENSE +0 -21
- 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
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
// fixture-scripts.mjs — 测试夹具脚本闭包工具(2026-10-12 fixture-closure-rootfix)
|
|
2
|
-
//
|
|
3
|
-
// 为什么有它:夹具此前用**手工枚举**把被测脚本及其依赖拷进临时根(如 `const SCRIPTS = ['check-loop.mjs',
|
|
4
|
-
// 'policy.mjs', ...]`)。那份枚举必须与被测脚本真实的依赖闭包一致,但两者互不校验——给脚本加一行
|
|
5
|
-
// `import './x.mjs'`,枚举不会自动跟着变,而滞后的表现是**静默绿**:ESM resolve 失败 → 被测脚本根本没跑
|
|
6
|
-
// → 断言面为空 → 套件判绿。2026-10-12 那批台账改动就因此在 `check-loop.test` / `edit-face-check.test` /
|
|
7
|
-
// `ledger-prune.test` 三处先后假绿(各自补拷才转绿)。补齐是止血,消灭枚举才是根治。
|
|
8
|
-
//
|
|
9
|
-
// 本模块给两样东西,各自独立成立:
|
|
10
|
-
// ① scriptClosure / copyScriptClosure —— 自动求依赖传递闭包并整闭包拷贝,维护面归零(新增依赖自动跟随);
|
|
11
|
-
// ② assertFixtureScripts —— 拷完在**目标目录**独立复扫一遍,任一相对依赖解析不到就抛错报全量缺失清单。
|
|
12
|
-
// 这是纵深防御:即使将来有人又手写枚举(或绕过本 helper 直接拷),漏拷会在建夹具那一刻响亮炸掉,
|
|
13
|
-
// 而不是几十个场景之后以「门禁没跑」的形式悄悄绿掉。
|
|
14
|
-
//
|
|
15
|
-
// 依赖发现口径(刻意取宽):**静态 import/export from**、**动态 import()**、以及**裸文件名字面量**
|
|
16
|
-
// (形如 path.join(here, 'kb-search.mjs') 的 spawn 依赖——wiki-search.mjs 就只靠这一条挂住 kb-search;
|
|
17
|
-
// check-hygiene 靠它挂住 rule-budget.mjs 与两个生成器)。裸文件名只在**解析到同目录真实文件**时才计入,
|
|
18
|
-
// 故 `'../hooks/commit-check.cjs'` 这类跨目录字面量天然被排除(scripts/ 下不存在同名文件)。
|
|
19
|
-
// 宁可多拷(多一个文件不会让测试变假绿),不可漏拷(漏拷就是假绿)。
|
|
20
|
-
import fs from 'node:fs';
|
|
21
|
-
import path from 'node:path';
|
|
22
|
-
import { fileURLToPath } from 'node:url';
|
|
23
|
-
|
|
24
|
-
export const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
25
|
-
|
|
26
|
-
const SCRIPT_EXT = /\.(?:mjs|cjs|js|sh)$/;
|
|
27
|
-
// 裸文件名 / ./x / ../x 三种形态;含目录分隔的更长路径字面量(如 'templates/_agents/scripts/gate.mjs')不匹配。
|
|
28
|
-
// 点开头的隐藏名不匹配:check-loop.mjs 里有 `.replace(/\.mjs$/, '.test.mjs')`,那个 '.test.mjs'
|
|
29
|
-
// 是**后缀字面量**不是文件名,按名解析必然扑空(对每个测试夹具都误报「漏拷」→ 整套件红)。
|
|
30
|
-
const BARE_NAME = /^(?:\.{1,2}\/)?[A-Za-z0-9_][A-Za-z0-9_.-]*$/;
|
|
31
|
-
// 引号字面量(单/双引号皆可),逐行扫即可——模板字面量里的文件名由动态拼接给出,不在此列
|
|
32
|
-
const QUOTED = /'([^'\n]*)'|"([^"\n]*)"/g;
|
|
33
|
-
|
|
34
|
-
// stripComments:抹掉注释,保留字符串字面量内容。
|
|
35
|
-
// 刻意**不用正则**:正则版把 `confirmations.d/*.jsonl` 这类注释里的 `/*` 当块注释起点,跨注释一路吃到下一个
|
|
36
|
-
// 真 `*/`,把后面的 import 整段吃掉(check-ledger-invariant 实测:12141 字符被砍到 4198,43 行的
|
|
37
|
-
// import 直接消失 → 闭包漏依赖 → 回到假绿)。故走一个 40 行的逐字符状态机,只认三种真形态。
|
|
38
|
-
// 字符串内容**不抹**(我们要的就是字面量里的文件名),故正则里的 ".*?/*.jsonl" 这类串不被误当注释。
|
|
39
|
-
function stripComments(src) {
|
|
40
|
-
let out = '';
|
|
41
|
-
let i = 0;
|
|
42
|
-
const n = src.length;
|
|
43
|
-
while (i < n) {
|
|
44
|
-
const c = src[i];
|
|
45
|
-
const d = src[i + 1];
|
|
46
|
-
if (c === '/' && d === '/') { while (i < n && src[i] !== '\n') i++; continue; }
|
|
47
|
-
if (c === '/' && d === '*') {
|
|
48
|
-
i += 2;
|
|
49
|
-
while (i < n && !(src[i] === '*' && src[i + 1] === '/')) i++;
|
|
50
|
-
i += 2;
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
if (c === '"' || c === "'" || c === '`') {
|
|
54
|
-
const quote = c;
|
|
55
|
-
out += c;
|
|
56
|
-
i++;
|
|
57
|
-
while (i < n) {
|
|
58
|
-
if (src[i] === '\\') { out += src[i] + (src[i + 1] || ''); i += 2; continue; }
|
|
59
|
-
out += src[i];
|
|
60
|
-
if (src[i] === quote) { i++; break; }
|
|
61
|
-
i++;
|
|
62
|
-
}
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
out += c;
|
|
66
|
-
i++;
|
|
67
|
-
}
|
|
68
|
-
return out;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// depsOf:某脚本源码里引用的、可能落在同目录的脚本文件名(去重、保持出现序)。
|
|
72
|
-
// 纯文本解析——不查盘面,故「源码引用了但盘面没有的名字」也会被列出,由调用方按盘面存在性收窄。
|
|
73
|
-
export function depsOf(sourceText) {
|
|
74
|
-
const out = [];
|
|
75
|
-
const push = (v) => { if (v && !out.includes(v)) out.push(v); };
|
|
76
|
-
const text = stripComments(sourceText);
|
|
77
|
-
// import/export ... from '...' 与 import('...')
|
|
78
|
-
for (const m of text.matchAll(/(?:\bfrom\s*|\bimport\s*\(\s*)(['"])([^'"]+)\1/g)) push(m[2]);
|
|
79
|
-
// 其余裸文件名字面量(spawn / path.join 依赖)
|
|
80
|
-
for (const m of text.matchAll(QUOTED)) push(m[1] || m[2]);
|
|
81
|
-
return out.filter((v) => SCRIPT_EXT.test(v) && BARE_NAME.test(v));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// scriptClosure:从入口出发递归求同目录依赖传递闭包(BFS,稳定序;不存在的引用不炸——由 assert 层兜)
|
|
85
|
-
export function scriptClosure(entries, { from = SCRIPT_DIR } = {}) {
|
|
86
|
-
const queue = [...new Set(entries)].map((e) => path.basename(e));
|
|
87
|
-
const seen = new Set();
|
|
88
|
-
const order = [];
|
|
89
|
-
while (queue.length) {
|
|
90
|
-
const name = queue.shift();
|
|
91
|
-
if (seen.has(name)) continue;
|
|
92
|
-
seen.add(name);
|
|
93
|
-
order.push(name);
|
|
94
|
-
const abs = path.join(from, name);
|
|
95
|
-
if (!fs.existsSync(abs)) continue;
|
|
96
|
-
for (const dep of depsOf(fs.readFileSync(abs, 'utf8'))) {
|
|
97
|
-
const base = path.basename(dep);
|
|
98
|
-
if (!seen.has(base)) queue.push(base);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return order;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// copyScriptClosure:把入口的整个依赖闭包拷进 destScriptsDir,返回实际拷入的文件名。
|
|
105
|
-
// opts.extra —— 额外要拷的同级非脚本件(如 rule-budget.mjs 之外的 .txt 词表由 copyAgentsFiles 负责)。
|
|
106
|
-
export function copyScriptClosure(destScriptsDir, entries, opts = {}) {
|
|
107
|
-
const from = opts.from || SCRIPT_DIR;
|
|
108
|
-
fs.mkdirSync(destScriptsDir, { recursive: true });
|
|
109
|
-
const closure = scriptClosure(entries, { from });
|
|
110
|
-
const copied = [];
|
|
111
|
-
for (const name of closure) {
|
|
112
|
-
const src = path.join(from, name);
|
|
113
|
-
if (!fs.existsSync(src) || !fs.statSync(src).isFile()) continue;
|
|
114
|
-
const dest = path.join(destScriptsDir, name);
|
|
115
|
-
fs.copyFileSync(src, dest);
|
|
116
|
-
copied.push(name);
|
|
117
|
-
}
|
|
118
|
-
// 纵深防御:在**目标目录**独立复扫,不复用上面的闭包结果(这样才抓得到拷贝环节本身的错漏)
|
|
119
|
-
assertFixtureScripts(destScriptsDir);
|
|
120
|
-
return copied;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// copyAgentsFiles:把包源 `.agents/` 面的词表/配置(workflow-enums.txt 等)拷进夹具的 .agents/ 根
|
|
124
|
-
export function copyAgentsFiles(destAgentsDir, names, { from = path.join(SCRIPT_DIR, '..') } = {}) {
|
|
125
|
-
fs.mkdirSync(destAgentsDir, { recursive: true });
|
|
126
|
-
const copied = [];
|
|
127
|
-
for (const name of names) {
|
|
128
|
-
const src = path.join(from, name);
|
|
129
|
-
if (!fs.existsSync(src)) continue;
|
|
130
|
-
fs.copyFileSync(src, path.join(destAgentsDir, name));
|
|
131
|
-
copied.push(name);
|
|
132
|
-
}
|
|
133
|
-
return copied;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// assertFixtureScripts:扫目录内全部脚本,任一相对/裸文件名依赖解析不到 → 抛错(报全量缺失,不报第一个)
|
|
137
|
-
// 用法:夹具建好后立即调;漏拷在当场炸,而不是在「门禁静默不跑」之后绿掉。
|
|
138
|
-
export function assertFixtureScripts(dir) {
|
|
139
|
-
const missing = [];
|
|
140
|
-
if (!fs.existsSync(dir)) throw new Error(`assertFixtureScripts: 目录不存在 ${dir}`);
|
|
141
|
-
for (const f of fs.readdirSync(dir).filter((f) => SCRIPT_EXT.test(f)).sort()) {
|
|
142
|
-
const src = fs.readFileSync(path.join(dir, f), 'utf8');
|
|
143
|
-
for (const dep of depsOf(src)) {
|
|
144
|
-
if (dep.includes('/') && dep.startsWith('..')) continue; // 跨目录引用不在本夹具职责内
|
|
145
|
-
if (!fs.existsSync(path.join(dir, dep))) missing.push(`${f} → ${dep}`);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (missing.length) {
|
|
149
|
-
throw new Error(`夹具依赖缺失(漏拷 → 被测脚本 import 失败 → 门禁静默不跑 = 假绿):\n ${missing.join('\n ')}\n`
|
|
150
|
-
+ '修法:改用 copyScriptClosure(入口脚本) 让闭包自动跟随,不要手写枚举。');
|
|
151
|
-
}
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// fixture-scripts.test.mjs — 夹具闭包工具自身套件(2026-10-12 fixture-closure-rootfix)
|
|
3
|
-
// 命题:本工具**只能比手工枚举多拷,绝不能少拷**——多拷的文件不会让测试假绿,少拷的文件会让
|
|
4
|
-
// 被测脚本 import 失败、门禁静默不跑、套件假绿(2026-10-12 台账那批三处假绿的根因)。
|
|
5
|
-
// 覆盖面:多层传递依赖 / node: 内建跳过 / 注释与字符串字面量不误收 / 后缀字面量('.test.mjs')不误报 /
|
|
6
|
-
// 缺失即炸且报全量清单 / spawn 依赖(裸文件名字面量)也被收进闭包。
|
|
7
|
-
import fs from 'node:fs';
|
|
8
|
-
import os from 'node:os';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
import { SCRIPT_DIR, depsOf, scriptClosure, copyScriptClosure, assertFixtureScripts, copyAgentsFiles } from './fixture-scripts.mjs';
|
|
11
|
-
|
|
12
|
-
let pass = 0, fail = 0;
|
|
13
|
-
const check = (name, ok, detail = '') => {
|
|
14
|
-
if (ok) { pass++; console.log(` ok ${name}`); }
|
|
15
|
-
else { fail++; console.error(`FAIL ${name}${detail ? ' — ' + detail : ''}`); }
|
|
16
|
-
};
|
|
17
|
-
const tmpRoot = (p) => fs.mkdtempSync(path.join(os.tmpdir(), `fxsc-${p}-`));
|
|
18
|
-
// 造一个合成 scripts 目录(不触真实盘面——本工具的依赖发现是纯文本解析,故合成目录可独立验证)
|
|
19
|
-
const synth = (files) => {
|
|
20
|
-
const dir = tmpRoot('synth');
|
|
21
|
-
for (const [name, body] of Object.entries(files)) fs.writeFileSync(path.join(dir, name), body, 'utf8');
|
|
22
|
-
return dir;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// ---- S1:多层传递依赖闭包 ----
|
|
26
|
-
{
|
|
27
|
-
const src = synth({
|
|
28
|
-
'a.mjs': `import './b.mjs';\nimport { x } from './sub/c.mjs';\n`,
|
|
29
|
-
'b.mjs': `import './c.mjs';\n`,
|
|
30
|
-
'c.mjs': `export const x = 1;\n`,
|
|
31
|
-
'd.mjs': `export const y = 2;\n`,
|
|
32
|
-
});
|
|
33
|
-
const cl = scriptClosure(['a.mjs'], { from: src });
|
|
34
|
-
check('S1 三层传递依赖全部收进闭包', ['a.mjs', 'b.mjs', 'c.mjs'].every((f) => cl.includes(f)) && !cl.includes('d.mjs'), cl.join(','));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ---- S2:node: 内建与跨目录字面量不误收 ----
|
|
38
|
-
{
|
|
39
|
-
const src = synth({
|
|
40
|
-
'a.mjs': `import fs from 'node:fs';\nimport { x } from './b.mjs';\nconst p = path.join(h, 'templates/_agents/scripts/gate.mjs');\n`,
|
|
41
|
-
'b.mjs': 'export const x=1;\n',
|
|
42
|
-
});
|
|
43
|
-
const cl = scriptClosure(['a.mjs'], { from: src });
|
|
44
|
-
check('S2 node: 内建与长路径字面量被排除', cl.length === 2, cl.join(','));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// ---- S3:注释与字符串里的脚本名不算依赖 ----
|
|
48
|
-
{
|
|
49
|
-
const deps = depsOf(`// 拷 './gone.mjs' 进来\n/* from './gone2.mjs' */\nimport './real.mjs';\n`);
|
|
50
|
-
check('S3 注释里的文件名不算依赖', deps.length === 1 && deps[0] === './real.mjs', JSON.stringify(deps));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ---- S4:后缀字面量('.test.mjs')不误报——防「每个夹具都误报漏拷」 ----
|
|
54
|
-
// 这条是真实回归:check-loop.mjs 里就有 `.replace(/\.mjs$/, '.test.mjs')`,按名解析必然扑空。
|
|
55
|
-
{
|
|
56
|
-
const deps = depsOf(`f.replace(/\\.mjs$/, '.test.mjs')\nimport './real.mjs';\n`);
|
|
57
|
-
check('S4 后缀字面量 .test.mjs 不计入依赖', !deps.some((d) => d.includes('test')), JSON.stringify(deps));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ---- S5:spawn 依赖(裸文件名字面量)也进闭包——wiki-search 只靠 path.join(here,'kb-search.mjs') 挂住依赖 ----
|
|
61
|
-
{
|
|
62
|
-
const src = synth({
|
|
63
|
-
'wiki-search.mjs': `spawnSync(process.execPath, [path.join(here, 'kb-search.mjs')]);\n`,
|
|
64
|
-
'kb-search.mjs': `import './workflow-enums.mjs';\n`,
|
|
65
|
-
'workflow-enums.mjs': 'export const a=1;\n',
|
|
66
|
-
});
|
|
67
|
-
const cl = scriptClosure(['wiki-search.mjs'], { from: src });
|
|
68
|
-
check('S5 spawn 裸文件名依赖传递收进闭包', cl.includes('kb-search.mjs') && cl.includes('workflow-enums.mjs'), cl.join(','));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// ---- S6:缺失即炸且报全量清单(非报第一个就停) ----
|
|
72
|
-
{
|
|
73
|
-
const dir = tmpRoot('missing');
|
|
74
|
-
fs.writeFileSync(path.join(dir, 'a.mjs'), `import './m1.mjs';\nimport './m2.mjs';\n`, 'utf8');
|
|
75
|
-
let msg = '';
|
|
76
|
-
try { assertFixtureScripts(dir); } catch (e) { msg = String(e.message); }
|
|
77
|
-
check('S6 缺依赖 → 抛错', !!msg, '未抛错');
|
|
78
|
-
check('S6 报全量缺失清单(m1+m2 都在)', msg.includes('m1.mjs') && msg.includes('m2.mjs'), msg);
|
|
79
|
-
check('S6 报文点明假绿与修法', msg.includes('假绿') && msg.includes('copyScriptClosure'), msg.slice(0, 120));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// ---- S7:copyScriptClosure 对真实盘面跑通(check-loop 闭包 + 拷后自检不炸) ----
|
|
83
|
-
{
|
|
84
|
-
const dest = path.join(tmpRoot('copy'), 'scripts');
|
|
85
|
-
const copied = copyScriptClosure(dest, ['check-loop.mjs']);
|
|
86
|
-
check('S7 check-loop 闭包含新台账依赖(含 policy.mjs——B6b-1 分道/policy 锚随闭包自动跟随)', ['check-loop.mjs', 'ledger-loader.mjs', 'ledger-prune.mjs', 'policy.mjs'].every((f) => copied.includes(f)), copied.join(','));
|
|
87
|
-
// B6b-2 六段模块(2026-10-13):check-loop.mjs import 的段模块须随闭包自动带上——漏拷 = 被测脚本
|
|
88
|
-
// 在夹具里 resolve 失败 → 门禁静默不跑(本文件头注的假绿形态)。显式断言六件在场,不靠运气。
|
|
89
|
-
check('S7 check-loop 闭包含 B6b-2 六段模块(import 闭包自动跟随)',
|
|
90
|
-
['check-spec-verif.mjs', 'check-registry.mjs', 'check-convergence.mjs', 'check-attribution.mjs', 'check-prejudgment.mjs', 'check-funnel.mjs'].every((f) => copied.includes(f)),
|
|
91
|
-
copied.join(','));
|
|
92
|
-
check('S7 拷贝后 assertFixtureScripts 不炸(闭包自洽)', assertFixtureScripts(dest) === true);
|
|
93
|
-
// 真跑一次被测脚本,确认夹具不是「文件齐了但跑不起来」
|
|
94
|
-
const fx = path.dirname(dest);
|
|
95
|
-
fs.mkdirSync(path.join(fx, '.agents'), { recursive: true });
|
|
96
|
-
fs.copyFileSync(SCRIPT_DIR.replace(/scripts$/, 'workflow-enums.txt'), path.join(fx, '.agents', 'workflow-enums.txt'));
|
|
97
|
-
const { spawnSync } = await import('node:child_process');
|
|
98
|
-
const r = spawnSync(process.execPath, [path.join(dest, 'check-loop.mjs')], {
|
|
99
|
-
cwd: fx, encoding: 'utf8', env: { ...process.env, CHECK_LOOP_ROOT: fx },
|
|
100
|
-
});
|
|
101
|
-
check('S7 夹具内 check-loop 真能跑起来(非 ENOENT 崩)', !/Cannot find module|ERR_MODULE_NOT_FOUND/.test(`${r.stdout || ''}${r.stderr || ''}`), `${r.stdout || ''}${r.stderr || ''}`.slice(0, 200));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// ---- S8:copyAgentsFiles 拷词表,缺失的静默跳过 ----
|
|
105
|
-
{
|
|
106
|
-
const dest = tmpRoot('agents');
|
|
107
|
-
const copied = copyAgentsFiles(dest, ['workflow-enums.txt', 'definitely-absent.txt']);
|
|
108
|
-
check('S8 存在词表拷入、缺席跳过', copied.length === 1 && copied[0] === 'workflow-enums.txt', copied.join(','));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
console.log(`\n[fixture-scripts] PASS ${pass} / FAIL ${fail}`);
|
|
112
|
-
process.exit(fail ? 1 : 0);
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
// flow-kit gate-checklist:三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表)
|
|
2
|
-
// 目的:任何一处加新检查项,另一处不会自动同步——本工具按登记表给出对照表 + 断档/未登记告警。
|
|
3
|
-
// 机制(2026-09-25 gate-checklist-registry 重写):关键词猜测匹配退役(实测 18×14 项只匹配 2、报 28 条
|
|
4
|
-
// 噪声缺点,真漏点不可见),改为显式配对登记表 PAIRS(单源本文件)——沿 workflow-modules.txt
|
|
5
|
-
// 的单源思路与 check-loop「frontmatter 受限子集替代全文正则猜测」同一演进路径。
|
|
6
|
-
// 解析面(只读不改两处源码,均为既有稳定结构):
|
|
7
|
-
// doctor:src/doctor.mjs 节注释 `// N. 标题`(N 支持 6.5 小节号)
|
|
8
|
-
// check-loop:.agents/scripts/check-loop.sh 头部检查项注释 `# N. 标题 [severity]`(多行标题截断仅影响展示,配对按 id)
|
|
9
|
-
// 登记三形态:
|
|
10
|
-
// { doctor, cl } 直接配对——同一检查两处实现
|
|
11
|
-
// { doctor, cl: null } 声明独有——doctor 装户体检面,无 check-loop 对应(原 intent「只报告不修复」拍板的已知漏点入账)
|
|
12
|
-
// { doctor: '7', cl } 经 §7 覆盖——doctor §7 整体运行 check-loop,各 #N 自动流入 doctor
|
|
13
|
-
// 报告(只报告不修复,B-b;exit 恒 0):
|
|
14
|
-
// 断档:登记表声明的 id 在对应侧已不存在(检查项被删/改号而登记未跟)
|
|
15
|
-
// 未登记:任一侧出现登记表之外的 § 检查项(新检查项没对账——本工具的核心信号)
|
|
16
|
-
// 用法:node .agents/scripts/gate-checklist.mjs --diff
|
|
17
|
-
// node .agents/scripts/gate-checklist.mjs --json
|
|
18
|
-
// 零依赖;不修改 doctor / check-loop 既有检查项
|
|
19
|
-
// 测试:node templates/_agents/scripts/gate-checklist.test.mjs(fixture + 真实仓库 baseline)
|
|
20
|
-
import fs from 'node:fs';
|
|
21
|
-
import path from 'node:path';
|
|
22
|
-
import { fileURLToPath } from 'node:url';
|
|
23
|
-
|
|
24
|
-
function fail(msg) { console.error('❌ ' + msg); process.exit(1); }
|
|
25
|
-
|
|
26
|
-
// parseDoctorSections:扫 doctor.mjs 节注释 → [{id, title}]。两种真实格式:
|
|
27
|
-
// `// N. 标题`(整数节号带点,如 // 1. Node 版本)与 `// N.M 标题`(小节号不带点,如 // 6.5 delegations)。
|
|
28
|
-
// 整数无点(如正文注释 // 4 宿主目录映射)不匹配——避免函数体普通注释误判为节。
|
|
29
|
-
function parseDoctorSections(doctorSrc) {
|
|
30
|
-
const out = [];
|
|
31
|
-
const re = /^\s*\/\/\s+(\d+\.\d+|\d+\.)\s+([^\n]+)/gm;
|
|
32
|
-
let m;
|
|
33
|
-
while ((m = re.exec(doctorSrc)) !== null) {
|
|
34
|
-
const title = m[2].split(/[((]/)[0].trim() || m[2].trim();
|
|
35
|
-
out.push({ id: m[1].replace(/\.$/, ''), title });
|
|
36
|
-
}
|
|
37
|
-
return out;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// parseCheckLoopChecks:扫 check-loop 检查项注释(`// N. 标题 [severity]` 于 .mjs 头部清单——2026-09-26
|
|
41
|
-
// check-loop-node 迁移后的主位;旧装户 sync 前只有 .sh 时按 `# N. 标题` fallback,登记表口径不变)
|
|
42
|
-
function parseCheckLoopChecks(clSrc) {
|
|
43
|
-
const checks = [];
|
|
44
|
-
const re = /^\s*(?:\/\/|#)\s*(\d+)\.\s+(.+?)(?:\s*\[(hard-block|warning|advisory)\])?\s*$/gm;
|
|
45
|
-
let m;
|
|
46
|
-
while ((m = re.exec(clSrc)) !== null) {
|
|
47
|
-
checks.push({ id: m[1], title: m[2].trim(), severity: m[3] || null });
|
|
48
|
-
}
|
|
49
|
-
return checks;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ---- 配对登记表(单源契约;2026-09-25 gate-checklist-registry 全量登记)----
|
|
53
|
-
// 纪律:doctor / check-loop 任一处加新 § 检查项,必须同步在本表登记(直接配对 / 声明独有 / 经 §7 覆盖),
|
|
54
|
-
// 否则工具报「未登记」。删/改检查项须同步改本表,否则报「断档」。
|
|
55
|
-
const PAIRS = [
|
|
56
|
-
// 直接配对:同一检查两处实现
|
|
57
|
-
{ doctor: '5', cl: '2', note: '占位符残留' },
|
|
58
|
-
{ doctor: '6', cl: '11', note: 'workflow/INDEX.md 漂移' },
|
|
59
|
-
// 声明独有:doctor 装户体检面(原 intent 拍板「只报告不修复」的已知漏点入账)
|
|
60
|
-
{ doctor: '1', cl: null, note: 'Node 版本——装户体检独有' },
|
|
61
|
-
{ doctor: '2', cl: null, note: '目录布局——装户体检独有' },
|
|
62
|
-
{ doctor: '3', cl: null, note: 'git 仓库与钩子——装户体检独有' },
|
|
63
|
-
{ doctor: '4', cl: null, note: 'kit.json managed 台账——装户体检独有' },
|
|
64
|
-
{ doctor: '4.5', cl: null, note: '台账覆盖率——装户体检独有(盘上有 managed 类文件未登记,2026-09-26 managed-ledger-adopt)' },
|
|
65
|
-
{ doctor: '6.5', cl: null, note: 'delegations 台账结构 + 快照新鲜度——装户体检独有' },
|
|
66
|
-
{ doctor: '6.6', cl: null, note: 'owned 漂移——装户体检独有' },
|
|
67
|
-
{ doctor: '6.7', cl: null, note: '跨宿主薄适配——装户体检独有' },
|
|
68
|
-
{ doctor: '6.8', cl: null, note: 'workflows 编排脚本 lint——装户体检独有' },
|
|
69
|
-
{ doctor: '6.9', cl: null, note: '模板下发感知(2026-10-06 template-downstream)——装户体检独有(只读回显 sync 出账同源判据)' },
|
|
70
|
-
{ doctor: '6.10', cl: null, note: 'level-hints 配置体检(2026-10-13 hint-doctor)——装户体检独有;提交面判低由 check-lane-surface(pre-commit 增量面)承担,不在 check-loop 项内' },
|
|
71
|
-
{ doctor: '8', cl: null, note: '看板端口——信息级独有' },
|
|
72
|
-
// 经 §7 覆盖:doctor §7 整体运行 check-loop(#2/#11 已直接配对,不重复登记)
|
|
73
|
-
{ doctor: '7', cl: '1', note: '经 §7 整体运行覆盖' },
|
|
74
|
-
{ doctor: '7', cl: '3', note: '经 §7 整体运行覆盖' },
|
|
75
|
-
{ doctor: '7', cl: '4', note: '经 §7 整体运行覆盖' },
|
|
76
|
-
{ doctor: '7', cl: '5', note: '经 §7 整体运行覆盖' },
|
|
77
|
-
{ doctor: '7', cl: '6', note: '经 §7 整体运行覆盖' },
|
|
78
|
-
{ doctor: '7', cl: '7', note: '经 §7 整体运行覆盖' },
|
|
79
|
-
{ doctor: '7', cl: '8', note: '经 §7 整体运行覆盖' },
|
|
80
|
-
{ doctor: '7', cl: '9', note: '经 §7 整体运行覆盖' },
|
|
81
|
-
{ doctor: '7', cl: '10', note: '经 §7 整体运行覆盖' },
|
|
82
|
-
{ doctor: '7', cl: '12', note: '经 §7 整体运行覆盖' },
|
|
83
|
-
{ doctor: '7', cl: '13', note: '经 §7 整体运行覆盖' },
|
|
84
|
-
{ doctor: '7', cl: '14', note: '经 §7 整体运行覆盖' },
|
|
85
|
-
{ doctor: '7', cl: '15', note: '经 §7 整体运行覆盖' },
|
|
86
|
-
{ doctor: '7', cl: '16', note: '经 §7 整体运行覆盖(量化断言指标签名对账,2026-09-28 claim-exceeds-fix)' },
|
|
87
|
-
{ doctor: '7', cl: '17', note: '经 §7 整体运行覆盖(发版提交树上仍未收口的 intent/spec/plan)' },
|
|
88
|
-
{ doctor: '7', cl: '18', note: '经 §7 整体运行覆盖(委派台账对账)' },
|
|
89
|
-
{ doctor: '7', cl: '19', note: '经 §7 整体运行覆盖(逐阶段审计——起草先于入口确认 / 台账审批顺序倒置)' },
|
|
90
|
-
{ doctor: '7', cl: '20', note: '经 §7 整体运行覆盖(引擎脚本测试覆盖,2026-10-01 gate-script-test-coverage)' },
|
|
91
|
-
{ doctor: '7', cl: '21', note: '经 §7 整体运行覆盖(spec 验证落地核查,2026-10-13 B6b-2 回灌)' },
|
|
92
|
-
{ doctor: '7', cl: '22', note: '经 §7 整体运行覆盖(机制使用量台账,2026-10-13 B6b-2 回灌)' },
|
|
93
|
-
{ doctor: '7', cl: '23', note: '经 §7 整体运行覆盖(判据级收敛对账,2026-10-13 B6b-2 回灌)' },
|
|
94
|
-
{ doctor: '7', cl: '24', note: '经 §7 整体运行覆盖(incident 归因字段核查,2026-10-13 B6b-2 回灌)' },
|
|
95
|
-
{ doctor: '7', cl: '25', note: '经 §7 整体运行覆盖(路由预判一致性,2026-10-13 B6b-2 回灌)' },
|
|
96
|
-
{ doctor: '7', cl: '26', note: '经 §7 整体运行覆盖(闭环漏斗「协议前」占比动作阈值,2026-10-13 B6b-2 回灌)' },
|
|
97
|
-
];
|
|
98
|
-
|
|
99
|
-
// gateChecklist:按登记表对照两侧检查项(pure function;pairs 可注入供测试)
|
|
100
|
-
// 返回 { doctorCount, checkLoopCount, pairs, matched, broken, unregistered, doctor, checkLoop }
|
|
101
|
-
// matched = 登记两侧都存在的条目(直接配对 + 经 §7 覆盖)
|
|
102
|
-
// broken = 登记声明的 id 在对应侧已不存在
|
|
103
|
-
// unregistered = 两侧出现登记表之外的 § 检查项(新检查项未对账——核心信号)
|
|
104
|
-
export function gateChecklist({ doctorSrc, checkLoopSrc, pairs = PAIRS }) {
|
|
105
|
-
const doctor = parseDoctorSections(doctorSrc);
|
|
106
|
-
const checkLoop = parseCheckLoopChecks(checkLoopSrc);
|
|
107
|
-
const doctorIds = new Set(doctor.map((d) => d.id));
|
|
108
|
-
const clIds = new Set(checkLoop.map((c) => c.id));
|
|
109
|
-
const declaredDoctor = new Set(pairs.map((p) => p.doctor).filter(Boolean));
|
|
110
|
-
const declaredCl = new Set(pairs.map((p) => p.cl).filter(Boolean));
|
|
111
|
-
|
|
112
|
-
const broken = [];
|
|
113
|
-
for (const p of pairs) {
|
|
114
|
-
if (p.doctor && !doctorIds.has(p.doctor)) broken.push({ side: 'doctor', id: p.doctor, note: p.note || '' });
|
|
115
|
-
if (p.cl && !clIds.has(p.cl)) broken.push({ side: 'check-loop', id: p.cl, note: p.note || '' });
|
|
116
|
-
}
|
|
117
|
-
const unregistered = [];
|
|
118
|
-
for (const d of doctor) {
|
|
119
|
-
if (!declaredDoctor.has(d.id)) unregistered.push({ side: 'doctor', id: d.id, title: d.title });
|
|
120
|
-
}
|
|
121
|
-
for (const c of checkLoop) {
|
|
122
|
-
if (!declaredCl.has(c.id)) unregistered.push({ side: 'check-loop', id: c.id, title: c.title });
|
|
123
|
-
}
|
|
124
|
-
const matched = pairs.filter((p) => p.doctor && doctorIds.has(p.doctor) && p.cl && clIds.has(p.cl));
|
|
125
|
-
return {
|
|
126
|
-
doctorCount: doctor.length,
|
|
127
|
-
checkLoopCount: checkLoop.length,
|
|
128
|
-
pairs,
|
|
129
|
-
matched,
|
|
130
|
-
broken,
|
|
131
|
-
unregistered,
|
|
132
|
-
doctor,
|
|
133
|
-
checkLoop,
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const clip = (s, n) => (String(s).length > n ? String(s).slice(0, n) + '…' : String(s));
|
|
138
|
-
|
|
139
|
-
function printDiff(result) {
|
|
140
|
-
console.log('▶ flow-kit gate-checklist --diff(显式配对登记表)');
|
|
141
|
-
const direct = result.pairs.filter((p) => p.doctor !== '7' && p.cl).length;
|
|
142
|
-
const via = result.pairs.filter((p) => p.doctor === '7').length;
|
|
143
|
-
const solo = result.pairs.filter((p) => !p.cl).length;
|
|
144
|
-
console.log(` doctor §检查项: ${result.doctorCount} | check-loop §检查项: ${result.checkLoopCount} | 直接配对 ${direct} + 经 §7 覆盖 ${via} + 声明独有 ${solo}`);
|
|
145
|
-
const doctorById = new Map(result.doctor.map((d) => [d.id, d]));
|
|
146
|
-
const clById = new Map(result.checkLoop.map((c) => [c.id, c]));
|
|
147
|
-
console.log(' 对照表(登记表展开):');
|
|
148
|
-
for (const p of result.pairs) {
|
|
149
|
-
const d = doctorById.get(p.doctor);
|
|
150
|
-
if (!p.cl) {
|
|
151
|
-
console.log(` ● §${p.doctor} ${clip(d?.title || '?', 22)}(声明独有:${p.note})`);
|
|
152
|
-
} else {
|
|
153
|
-
const c = clById.get(p.cl);
|
|
154
|
-
const mark = d && c ? '✓' : '✗';
|
|
155
|
-
console.log(` ${mark} §${p.doctor} ${clip(d?.title || '?', 22)} ↔ #${p.cl} ${clip(c?.title || '?', 26)}(${p.note})`);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
if (result.broken.length) {
|
|
159
|
-
console.log(' 断档(登记的检查项已不存在——删/改检查项后登记表未跟):');
|
|
160
|
-
for (const b of result.broken) {
|
|
161
|
-
console.log(` ⚠️ ${b.side === 'doctor' ? 'doctor §' + b.id : 'check-loop #' + b.id} 已不存在(登记备注:${b.note || '无'})`);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
if (result.unregistered.length) {
|
|
165
|
-
console.log(' 未登记(新检查项未对账——配对 / 声明独有 / 经 §7 三选一登记进 PAIRS):');
|
|
166
|
-
for (const u of result.unregistered) {
|
|
167
|
-
console.log(` ⚠️ ${u.side === 'doctor' ? 'doctor §' + u.id : 'check-loop #' + u.id} ${clip(u.title, 30)}`);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (!result.broken.length && !result.unregistered.length) {
|
|
171
|
-
console.log(' ✅ 登记完整(0 断档 / 0 未登记)');
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const isMain = process.argv[1] && process.argv[1].endsWith('gate-checklist.mjs');
|
|
176
|
-
if (isMain) {
|
|
177
|
-
let jsonMode = false;
|
|
178
|
-
for (const a of process.argv.slice(2)) {
|
|
179
|
-
if (a === '--json') jsonMode = true;
|
|
180
|
-
else if (a === '--diff') { /* 默认模式,兼容显式传参 */ }
|
|
181
|
-
else fail('未知选项:' + a + '(flow-kit gate-checklist --diff / --json)');
|
|
182
|
-
}
|
|
183
|
-
const pkgRoot = process.argv[2] && !process.argv[2].startsWith('--') ? process.argv[2] : null;
|
|
184
|
-
const base = pkgRoot || process.cwd();
|
|
185
|
-
const doctorPath = path.join(base, 'src', 'doctor.mjs');
|
|
186
|
-
// check-loop 与本脚本同目录:包源 templates/_agents/scripts/,装户副本 .agents/scripts/。
|
|
187
|
-
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
188
|
-
const clPath = path.join(here, 'check-loop.mjs');
|
|
189
|
-
if (!fs.existsSync(doctorPath)) fail('找不到 doctor.mjs:' + doctorPath);
|
|
190
|
-
if (!fs.existsSync(clPath)) fail('找不到 check-loop.mjs:' + clPath);
|
|
191
|
-
const doctorSrc = fs.readFileSync(doctorPath, 'utf8');
|
|
192
|
-
const checkLoopSrc = fs.readFileSync(clPath, 'utf8');
|
|
193
|
-
const result = gateChecklist({ doctorSrc, checkLoopSrc });
|
|
194
|
-
if (jsonMode) {
|
|
195
|
-
process.stdout.write(JSON.stringify({
|
|
196
|
-
doctorCount: result.doctorCount,
|
|
197
|
-
checkLoopCount: result.checkLoopCount,
|
|
198
|
-
matched: result.matched.map((p) => ({ doctor: p.doctor, cl: p.cl, note: p.note || '' })),
|
|
199
|
-
solo: result.pairs.filter((p) => !p.cl).map((p) => ({ doctor: p.doctor, note: p.note || '' })),
|
|
200
|
-
broken: result.broken,
|
|
201
|
-
unregistered: result.unregistered,
|
|
202
|
-
}, null, 2) + '\n');
|
|
203
|
-
} else {
|
|
204
|
-
printDiff(result);
|
|
205
|
-
}
|
|
206
|
-
// diff/json 模式总 exit 0;断档/未登记不视作错误(人类阅读用;B-b 决策「只报告不修复」)
|
|
207
|
-
process.exit(0);
|
|
208
|
-
}
|
|
209
|
-
export default gateChecklist;
|