agentic-flow-kit 1.8.2 → 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 -144
- 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 -57
- 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 -27
- 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 -18
- 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 -527
- 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 -1958
- package/templates/_agents/scripts/check-loop.sh +0 -6
- package/templates/_agents/scripts/check-loop.test.mjs +0 -3875
- 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 -96
- package/templates/_agents/scripts/check-scripts-syntax.mjs +0 -61
- 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 -603
- package/templates/_agents/scripts/confirm-doc.test.mjs +0 -1103
- 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 -334
- package/templates/_agents/scripts/gen-workflow-metrics.test.mjs +0 -224
- 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 -107
- 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 -210
- package/templates/_agents/scripts/verify.test.mjs +0 -358
- 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 -55
- 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 -90
- package/templates/workflow/delegations.md +0 -29
- package/templates/workflow/incidents/_TEMPLATE.md +0 -51
- package/templates/workflow/intents/_TEMPLATE.md +0 -46
- 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,17 +0,0 @@
|
|
|
1
|
-
# 引擎维护者面(engine-internals)
|
|
2
|
-
|
|
3
|
-
> 使用者只需 `.agents/commands/new-task.md` 的两问定级 + 路由表;本页收深水区:预判对账机理、
|
|
4
|
-
> kind 词表单源、规则生灭机制。环境事实单源在 `.agents/notes/runtime-env.md`(本页不涉及)。
|
|
5
|
-
> 本页属引擎面(`.agents/notes/`)。
|
|
6
|
-
|
|
7
|
-
## 预判留痕与 kind 词表(check-loop §25,2026-10-12 源仓建;kit 2026-10-13 B6b-2 回灌)
|
|
8
|
-
|
|
9
|
-
定级先做结构化预判(有结构化判定工具则对齐本仓判据,无则按两问自判),结果如实写进入口文档 frontmatter「预判: kind=<kind> level=<L1|L2|L3>」——与实际落位不符时 check-loop 出 WARN 留账(月度对账再议升格)。
|
|
10
|
-
|
|
11
|
-
**kind 词表**(单源 `pipeline-run.mjs` KINDS——§25 执法面 check-prejudgment.mjs 同款内联声明,注释互引、改任一侧须同步;任何列举处系摘录,增删以单源为准;非任务类型词):`require`(新需求,落 intents)/ `fix`(修复,落 incidents)/ `verify` / `review` / `deploy`。intents 只判 `require`、incidents 只判 `fix`;plans/specs 是两道共用件,不判类型只比对级别。终态文档(done/superseded/cancelled/fixed/closed)跳过形态/词表类告警——终态受检查 15 内容绑定不可修订,此类 WARN 永不可消;类型/级别比对照常。
|
|
12
|
-
|
|
13
|
-
## 规则生灭机制(2026-10-15 减重立项 自源仓回灌:锚日只升不降的对冲面)
|
|
14
|
-
|
|
15
|
-
- **生**:新检查以 advisory 灰度进入 → `effective-policy.md` 锚表按 policyVersion 升 hard。
|
|
16
|
-
- **死**(退役候选):`node .agents/scripts/agg-judgments.mjs --retire-candidates`——连续 6 个有数据月零命中(WARN+BLOCK=0)的规则列为候选;月度对账按 `.agents/mechanism-registry.md`「退役判据」列逐条裁决(安全主干/级别闭环主干等「不退役」行除外,附加停滞条件由人判)。
|
|
17
|
-
- **一进一出**:条目数预算指令 `<N>#count` 随 `rule-budget.mjs` 下发(`.agents/rule-budgets.txt` 填 `<路径> <N>#count` 即生效——匹配文件数上限,超限硬拦)。源仓以该指令锚定 check-loop 段数(26,段合并后 23);kit 检查段执行体在单体 check-loop.mjs 与 check-hygiene 模块内、无独立目录面,故模板不预设锚行——装户可自行为规则面(如 `.agents/rules/`)设锚。段编号承重不重排(§N 被锚名/机制台账跨文件引用),退役 = 段体删除,编号留疤。
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# 运行时环境注记
|
|
2
|
-
|
|
3
|
-
> 记录本机/本项目的运行时差异,供 agent 与钩子脚本对照(shell 可用性 / 端口 / 进程名等)。
|
|
4
|
-
> 本文件是骨架:项目按实际填写,不随 flow-kit 升级覆盖。
|
|
5
|
-
|
|
6
|
-
## 1. 终端与 shell
|
|
7
|
-
|
|
8
|
-
- <本机默认终端(如 PowerShell / Git Bash);`sh` / `bash` 是否在 PATH;「命令不存在」时退出码取法与假绿风险示例>
|
|
9
|
-
|
|
10
|
-
## 2. 本地端口与进程
|
|
11
|
-
|
|
12
|
-
- API:<端口 / 进程名 / 启动停止命令>
|
|
13
|
-
- 前端:<端口 / 启动命令>
|
|
14
|
-
- workflow 看板:8933(`node .agents/scripts/workflow-board-server.mjs`,只读)
|
|
15
|
-
|
|
16
|
-
## 3. 数据与密钥
|
|
17
|
-
|
|
18
|
-
- <本地库连接约定(不写明文密钥);含密钥/环境差异的配置文件走 `.gitattributes` 的 `merge=ours`(须 `git config merge.ours.driver true`)>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Implementer
|
|
2
|
-
|
|
3
|
-
> 公共角色契约(本文件):`.agents/roles/implementer.md`。宿主薄适配(各宿主目录下 `agents/implementer.md`)正文段同源本文件,frontmatter 各自保留宿主特化字段(check-loop 检查项 6 按本引用校验适配层不断线)。
|
|
4
|
-
|
|
5
|
-
## 1. 职责
|
|
6
|
-
|
|
7
|
-
执行已经由主智能体和用户确认、范围明确的实现任务。适用范围仅限:
|
|
8
|
-
|
|
9
|
-
- 单文件或边界清晰的局部实现
|
|
10
|
-
- 有明确复现路径的 bug 修复
|
|
11
|
-
- 编写或调整任务直接要求的测试
|
|
12
|
-
- 修复与任务直接相关的编译错误
|
|
13
|
-
|
|
14
|
-
## 2. 必需输入
|
|
15
|
-
|
|
16
|
-
开始前必须获得:
|
|
17
|
-
|
|
18
|
-
- 一句话任务目标
|
|
19
|
-
- 必须读取的入口文档、spec 或 plan
|
|
20
|
-
- 允许修改的文件清单
|
|
21
|
-
- 可执行的验收条件
|
|
22
|
-
|
|
23
|
-
任一输入缺失或相互冲突时,停止并向主智能体报告,不自行扩大范围。
|
|
24
|
-
|
|
25
|
-
## 3. 行为边界
|
|
26
|
-
|
|
27
|
-
- 只修改明确授权的文件;若必须触及其他文件,先停止并说明原因。
|
|
28
|
-
- 仓库可能有其他智能体或用户同时工作;保留现有改动,不回退、不覆盖无关修改。
|
|
29
|
-
- 复用现有实现、标准库和已安装依赖,保持最小工作 diff。
|
|
30
|
-
- 不修改公共接口、数据 Schema、依赖、构建步骤、安全或权限策略。
|
|
31
|
-
- 不执行提交、推送、发布、数据迁移或破坏性操作。
|
|
32
|
-
- 不顺手重构、格式化或清理与任务无关的代码。
|
|
33
|
-
|
|
34
|
-
## 4. 验证
|
|
35
|
-
|
|
36
|
-
- 运行任务指定的最小相关检查。
|
|
37
|
-
- 检查失败时只修复由本次改动引起且仍在授权范围内的问题。
|
|
38
|
-
- 同一验证连续失败三次,或继续需要猜测需求时,停止并报告阻塞。
|
|
39
|
-
|
|
40
|
-
## 5. 输出
|
|
41
|
-
|
|
42
|
-
返回给主智能体:
|
|
43
|
-
|
|
44
|
-
1. 修改文件清单
|
|
45
|
-
2. 每个文件的改动摘要
|
|
46
|
-
3. 已运行的验证及结果
|
|
47
|
-
4. 未解决的阻塞或剩余风险
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Independent Reviewer
|
|
2
|
-
|
|
3
|
-
> 公共角色契约(本文件):`.agents/roles/independent-reviewer.md`。宿主薄适配(各宿主目录下 `agents/independent-reviewer.md`)正文段同源本文件,frontmatter 各自保留宿主特化字段(check-loop 检查项 6 按本引用校验适配层不断线)。
|
|
4
|
-
|
|
5
|
-
## 1. 职责
|
|
6
|
-
|
|
7
|
-
在独立上下文中对 spec、plan 或代码 diff 做只读复核,发现原作者可能遗漏的正确性、契约、架构、数据安全和回归风险。
|
|
8
|
-
|
|
9
|
-
## 2. 必需输入
|
|
10
|
-
|
|
11
|
-
开始前必须获得:
|
|
12
|
-
|
|
13
|
-
- 复核对象及固定基准(文件路径、提交或 diff 范围)
|
|
14
|
-
- 对应入口文档、spec、plan(按任务级别提供)
|
|
15
|
-
- 项目根目录 `AGENTS.md` + 改动域对应的目录级 `AGENTS.md`(如有)
|
|
16
|
-
- 期望的复核结论或验收标准
|
|
17
|
-
|
|
18
|
-
输入不足以确定范围时,停止并向主智能体报告。
|
|
19
|
-
|
|
20
|
-
## 3. 行为边界
|
|
21
|
-
|
|
22
|
-
- 只读,不修改任何仓库文件。
|
|
23
|
-
- 不替用户决定问题定性、方案取舍、合入或上线。
|
|
24
|
-
- 不继承或猜测原作者未写入输入材料的推理。
|
|
25
|
-
- 只报告能用具体文件、行号、行为或契约证明的问题。
|
|
26
|
-
- 不把样式偏好、假设性风险或既有无关问题包装成缺陷。
|
|
27
|
-
- 无法验证的事项明确标为未验证,不声称已经通过。
|
|
28
|
-
|
|
29
|
-
## 4. 复核重点
|
|
30
|
-
|
|
31
|
-
1. 实现是否满足入口文档和验收标准
|
|
32
|
-
2. 是否违反根 `AGENTS.md` 与改动域目录级 `AGENTS.md` 的架构、数据和所在域红线
|
|
33
|
-
3. 是否改变未批准的公共契约或范围
|
|
34
|
-
4. 是否缺少能防止回归的验证
|
|
35
|
-
5. 是否存在数据丢失、安全、权限或发布风险
|
|
36
|
-
|
|
37
|
-
## 5. 输出
|
|
38
|
-
|
|
39
|
-
按严重度输出问题清单:
|
|
40
|
-
|
|
41
|
-
- `P0`:数据、安全、权限或必然阻断交付的问题
|
|
42
|
-
- `P1`:功能错误、明确回归或违反项目硬约束
|
|
43
|
-
- `P2`:非阻断但有证据的维护性问题
|
|
44
|
-
|
|
45
|
-
每项必须包含:位置、问题、证据、建议。没有发现时明确输出"未发现阻断问题",并列出未验证范围。
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# UI Verifier
|
|
2
|
-
|
|
3
|
-
> 公共角色契约(本文件):`.agents/roles/ui-verifier.md`。宿主薄适配(各宿主目录下 `agents/ui-verifier.md`)正文段同源本文件,frontmatter 各自保留宿主特化字段(check-loop 检查项 6 按本引用校验适配层不断线)。
|
|
4
|
-
|
|
5
|
-
## 1. 职责
|
|
6
|
-
|
|
7
|
-
对已经实现的 UI 改动执行浏览器实测并收集可复核证据。只验证,不修复。
|
|
8
|
-
|
|
9
|
-
## 2. 必需输入
|
|
10
|
-
|
|
11
|
-
开始前必须获得:
|
|
12
|
-
|
|
13
|
-
- 待验证页面或路由
|
|
14
|
-
- 用户操作步骤
|
|
15
|
-
- 每一步的预期结果
|
|
16
|
-
- 涉及的改动文件或 diff 范围
|
|
17
|
-
|
|
18
|
-
缺少可观察的预期结果时,停止并向主智能体报告。
|
|
19
|
-
|
|
20
|
-
## 3. 执行
|
|
21
|
-
|
|
22
|
-
1. 读取项目根目录 `AGENTS.md`,以及改动域目录级 `AGENTS.md`(如有,前端改动域)。
|
|
23
|
-
2. 读取并遵循项目 UI 实测技能 `.agents/skills/verify-ui/SKILL.md`(如有)。
|
|
24
|
-
3. 启动该技能指定的 API、前端和浏览器验证环境。
|
|
25
|
-
4. 按输入步骤验证页面行为;布局类问题优先使用可重复的 DOM 几何数据。
|
|
26
|
-
5. 收集控制台、网络请求、DOM 数据或截图等证据。
|
|
27
|
-
6. 结束时关闭本次启动的后台进程。
|
|
28
|
-
|
|
29
|
-
## 4. 行为边界
|
|
30
|
-
|
|
31
|
-
- 不修改代码、配置、测试数据或工作流文档。
|
|
32
|
-
- 不自行修复发现的问题;将失败证据交还主智能体。
|
|
33
|
-
- 不使用生产环境或真实业务数据。
|
|
34
|
-
- 无法启动环境或完成关键路径时,报告阻塞,不把部分验证标记为通过。
|
|
35
|
-
|
|
36
|
-
## 5. 输出
|
|
37
|
-
|
|
38
|
-
返回:
|
|
39
|
-
|
|
40
|
-
1. 验证环境与页面路由
|
|
41
|
-
2. 逐项通过/失败结果
|
|
42
|
-
3. 失败的复现步骤和证据
|
|
43
|
-
4. 控制台或网络异常
|
|
44
|
-
5. 未验证范围与阻塞项
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# 常驻面体积预算(单源:check-hygiene 检查 13(--all,WARN)与 .githooks/pre-commit(--staged,硬拦)共读)
|
|
2
|
-
# 格式:<路径或 glob> <上限字节>;路径以 / 结尾表示目录合计。上限 = 当前实测 + 余量。
|
|
3
|
-
# 条目数预算(2026-10-15 减重手段② 自源仓回灌):<路径或 glob> <N>#count = 匹配文件**条数**上限
|
|
4
|
-
# (规则面一进一出:新增一条须先退役一条,退役判定 node .agents/scripts/agg-judgments.mjs --retire-candidates)。
|
|
5
|
-
# 本表未预设条目数锚行——kit 无源仓 check-loop-sections/ 目录布局,检查段执行体在单体文件与 check-hygiene
|
|
6
|
-
# 模块内、段号承重稳定,条目数锚对象属装户自有决策面(指令能力随 rule-budget.mjs 下发,旧格式行零影响)。
|
|
7
|
-
# 超限含义:常驻面只增不减——须先删除或下沉被取代条目再增(一进一出)。
|
|
8
|
-
# 本文件会被 core.autocrlf 检出为 CRLF,读取方(rule-budget.mjs)按 /\r?\n/ 切分天然容 \r,禁止依赖行尾格式。
|
|
9
|
-
# 口径:预算比较用「索引 / HEAD 字节」(git cat-file,LF 归一);禁用工作区 wc -c 核对(CRLF 膨胀)。
|
|
10
|
-
# 2026-10-06 backflow-loop-audit-remediation:6 份命令文档顶部加「装户边界」标注(build.md 实测 8386B
|
|
11
|
-
# 超 8192 被拦)——单篇上限 8192→8704(与装户 Shipyard.Material 同值,512B 步进);目录合计未超不动。
|
|
12
|
-
# 2026-10-07 adopter-ci-github:AGENTS.md 门禁节补 CI 远端门一行(299B,实测 7969B 超 7680 被拦)——
|
|
13
|
-
# 新门入册属合法增长,同 512B 步进上调 7680→8192。
|
|
14
|
-
# 2026-10-16 减重系列回灌:new-task.md 增「预判留痕」指针行(§25 使用者入口 + engine-internals 维护者
|
|
15
|
-
# 面分离,自源仓减重手段⑤终态回灌)实测 8914B 超 8704 被拦——合法增长,同 512B 步进上调 8704→9216。
|
|
16
|
-
AGENTS.md 8192
|
|
17
|
-
.agents/commands/*.md 9216
|
|
18
|
-
.agents/commands/ 65536
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* agg-delegations: 量化证据聚合
|
|
3
|
-
* 读 workflow/delegations.md 两张结果表(按表头签名识别:委派表含「被委派方」列、自做表=日期+任务一句话;不依赖 ## 节标题)+ 扫 workflow/incidents/ 按月计数,
|
|
4
|
-
* 输出各月指标(一次通过率 / 平均返工次数 / 主兜底占比 / **产出接受率**)、并发扩容门判定、可粘贴的月度快照行。
|
|
5
|
-
* 分片感知(2026-10-13 ledger-shard-ledgers 回灌):读侧文本 = 主台账 ∪ delegations.d/*.md,单源 = ledger-shards.mjs。
|
|
6
|
-
* 结果取值:一次通过 | 返工×N | 返工×N(门禁噪声)| 主兜底 | 返工待修(未闭环,不计入率)。
|
|
7
|
-
* 门禁噪声档(2026-10-08 selfmeasure-and-modularize):剥离「返工由门禁面而非设计面触发」的形态——
|
|
8
|
-
* 扩容门第 3 项只对设计返工判 =0,门禁噪声返工单列观测。存量行零回填(旧四档解析逐条不变)。
|
|
9
|
-
* 取值定义与边界(何为门禁噪声 / 不得用于给设计返工贴标签)以 workflow/delegations.md 头部记法为准。
|
|
10
|
-
* 用法:node .agents/scripts/agg-delegations.cjs [--month=YYYY-MM](默认输出全部月份 + 全量累计)
|
|
11
|
-
* 门槛定义见 workflow/delegations.md §并发扩容门槛(doc 为权威,脚本向文档对齐——2026-09-27 board-kb-p1)。
|
|
12
|
-
*/
|
|
13
|
-
'use strict';
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const path = require('path');
|
|
16
|
-
|
|
17
|
-
const ROOT = path.resolve(__dirname, '..', '..');
|
|
18
|
-
const INCIDENTS = path.join(ROOT, 'workflow', 'incidents');
|
|
19
|
-
|
|
20
|
-
const argMonth = (process.argv.find((a) => a.startsWith('--month=')) || '').split('=')[1] || null;
|
|
21
|
-
|
|
22
|
-
function fail(msg) {
|
|
23
|
-
console.error(`agg-delegations: ${msg}`);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function parseTableRows(sectionText) {
|
|
28
|
-
return sectionText
|
|
29
|
-
.split(/\r?\n/)
|
|
30
|
-
.filter((l) => /^\|/.test(l.trim()))
|
|
31
|
-
.map((l) => l.trim().replace(/^\|/, '').replace(/\|$/, '').split('|').map((c) => c.trim()))
|
|
32
|
-
.filter((cols) => !/^\s*$/.test(cols[0]) && /^\d{4}-\d{2}-\d{2}$/.test(cols[0])); // 只留数据行(首列是日期;表头/分隔行随之滤除)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// parseResult:结果列解析。返回值统一为 { kind, rework, reworkNoise } 两个分量。
|
|
36
|
-
// 三个返工格式(2026-10-08 rework-attribution-split 补第三种):
|
|
37
|
-
// 返工×N → 纯设计返工 { kind:'rework', rework:N, reworkNoise:0 }
|
|
38
|
-
// 返工×N(门禁噪声) → 纯门禁面噪声 { kind:'rework-noise', rework:0, reworkNoise:N }
|
|
39
|
-
// 返工×N + 门禁噪声×M → 行内双值(混合) { kind:'rework-mixed', rework:N, reworkNoise:M }
|
|
40
|
-
// 动机:存量逐行审计(29 行含返工)证实前两种单值格式**无法表达混合归因**——一行只记一个返工
|
|
41
|
-
// 总数时,「1 次设计 + 1 次噪声」只能整行倒向某一侧。行内双值是作者写入时确定已知的归因事实,
|
|
42
|
-
// 不从返工点数量反推(batch-ledger-audit 结论:判据读写入时事实,不猜)。
|
|
43
|
-
// ⚠️ 顺序约束:新分支须排在两个单值分支之前(`$` 锚定使三者互斥,此处按语义就近声明)。
|
|
44
|
-
function parseResult(raw) {
|
|
45
|
-
const r = (raw || '').trim();
|
|
46
|
-
// 行内双值(混合归因):宽容空格(`返工×1+门禁噪声×1` 亦可解析)
|
|
47
|
-
const mx = r.match(/^返工×(\d+)\s*\+\s*门禁噪声×(\d+)$/);
|
|
48
|
-
if (mx) return { kind: 'rework-mixed', rework: parseInt(mx[1], 10), reworkNoise: parseInt(mx[2], 10) };
|
|
49
|
-
if (/^一次通过$/.test(r)) return { kind: 'pass', rework: 0, reworkNoise: 0 };
|
|
50
|
-
// 门禁噪声档(2026-10-08 selfmeasure-and-modularize):剥离「返工由门禁面(预算超限 / 双源漏刷 /
|
|
51
|
-
// 节名不一致 / 门禁自身误报)触发、而非设计面」的形态。动机:本仓 DASHBOARD 自报质量门连续两月红
|
|
52
|
-
// (一次通过率 55% / 61%,门槛 ≥90%),根因是两档混列——指标永远红且不指示该改什么。
|
|
53
|
-
const mn = r.match(/^返工×(\d+)(门禁噪声)$/);
|
|
54
|
-
if (mn) return { kind: 'rework-noise', rework: 0, reworkNoise: parseInt(mn[1], 10) };
|
|
55
|
-
const m = r.match(/^返工×(\d+)$/);
|
|
56
|
-
if (m) return { kind: 'rework', rework: parseInt(m[1], 10), reworkNoise: 0 };
|
|
57
|
-
if (/^主兜底$/.test(r)) return { kind: 'fallback', rework: 1, reworkNoise: 0 };
|
|
58
|
-
if (/^返工待修$/.test(r)) return { kind: 'pending', rework: 0, reworkNoise: 0 };
|
|
59
|
-
return { kind: 'unknown', rework: 0, reworkNoise: 0 };
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// parseVerdict:合入结论列解析(2026-10-12 merge-accept-rate)
|
|
63
|
-
// 三档:合入 / 返工后合入 / 未合入;空与未知一律 return null(**不计入接受率分母**——
|
|
64
|
-
// 存量行零回填是硬约定,未记录 ≠ 未合入,混进去会凭空造出一个低接受率)。
|
|
65
|
-
// 判据边界:结论由人工/独立复核写入,机器不判真伪(同 --delegated 信任边界);
|
|
66
|
-
// 本项是**观测不是门槛**,不进 gateMonth(理由见 workflow/delegations.md 头部)。
|
|
67
|
-
// 与结果列(过程质量)刻意分开:结果列量「跑了几遍」,本列量「人愿不愿意合」——
|
|
68
|
-
// METR 2026-03 实测两者落差约 24 个百分点,混列即被前者盖过后者。
|
|
69
|
-
function parseVerdict(raw) {
|
|
70
|
-
const v = (raw || '').trim();
|
|
71
|
-
if (/^合入$/.test(v)) return 'accepted';
|
|
72
|
-
if (/^返工后合入$/.test(v)) return 'accepted-after-rework';
|
|
73
|
-
if (/^未合入$/.test(v)) return 'rejected';
|
|
74
|
-
return null; // 留空 / 未登记取值 = 未记录(不进分母)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// ACCEPT_MIN_SAMPLE:接受率最小样本护栏(样本 <5 不出率,沿 agg 既有护栏口径——
|
|
78
|
-
// 样本过小的比率是噪声不是信号,且一旦进门禁就会产出不可消退的告警)。
|
|
79
|
-
const ACCEPT_MIN_SAMPLE = 5;
|
|
80
|
-
|
|
81
|
-
// splitTables:按表头签名识别两张结果表——节标题只服务人类阅读,表头才是数据边界
|
|
82
|
-
// (2026-09-24 修复:曾按 `## 委派结果` 节标题定位,节结构漂移时已有记录被静默读成「台账为空」)
|
|
83
|
-
// ⚠️ 互引(2026-10-08 papercuts-cleanup-batch 修 2):check-loop.mjs delegationResultRows 已对齐本签名
|
|
84
|
-
// 口径(委派表头=含「被委派方」列 / 自做表头=首列「日期」且含「任务一句话」列)——一边改另一边须跟;
|
|
85
|
-
// 差异保留:本函数按「连续 | 行」断表(聚合需分行归属),check-loop 按「## 节」终止收集(对账只需并集)
|
|
86
|
-
function splitTables(text) {
|
|
87
|
-
const tables = { delegated: [], self: [] };
|
|
88
|
-
let cur = null;
|
|
89
|
-
for (const line of text.split(/\r?\n/)) {
|
|
90
|
-
if (!/^\s*\|/.test(line)) { cur = null; continue; } // 表体边界:连续 | 行;断开即出表
|
|
91
|
-
const cells = line.trim().replace(/^\|/, '').replace(/\|$/, '').split('|').map((c) => c.trim());
|
|
92
|
-
if (cells.some((c) => c.startsWith('被委派方'))) { cur = 'delegated'; continue; } // 委派表表头
|
|
93
|
-
if (cells[0] === '日期' && cells.some((c) => c.startsWith('任务一句话'))) { cur = 'self'; continue; } // 自做表表头(委派表已被上一行截走)
|
|
94
|
-
if (cur) tables[cur].push(line); // 表体行(含分隔行——parseTableRows 会滤掉)
|
|
95
|
-
}
|
|
96
|
-
return tables;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 分片读侧文本(2026-10-13 ledger-shard-ledgers 回灌):单源 = ledger-shards.readLedgerText
|
|
100
|
-
// (主台账 ∪ delegations.d/*.md,月序即时间序)。.cjs 不能静态 import .mjs、require(esm) 需
|
|
101
|
-
// Node≥20.19(engines ≥18 不假设)——CLI 入口以 import() 装载后注入此变量再进 main;
|
|
102
|
-
// 库调用方(gen-workflow-dashboard)经 opts.text 显式注入合并文本。两者都缺位 → 回落主台账直读
|
|
103
|
-
// (与旧签名行为一致,不静默造数)。
|
|
104
|
-
let shardReadText = null;
|
|
105
|
-
// readLedger:root 显式参数 + soft 模式(2026-10-08 workflow-dashboard 使能导出,判据单源复用——
|
|
106
|
-
// 仪表盘 require 本函数取行,不重写表解析;缺省 root/无 soft 行为与原签名完全一致,main() 零变化)
|
|
107
|
-
function readLedger(root = ROOT, opts = {}) {
|
|
108
|
-
const ledger = path.join(root, 'workflow', 'delegations.md');
|
|
109
|
-
let text;
|
|
110
|
-
if (typeof opts.text === 'string') {
|
|
111
|
-
text = opts.text; // 库调用方注入的合并文本(读侧单源 = ledger-shards.readLedgerText)
|
|
112
|
-
} else if (!fs.existsSync(ledger)) {
|
|
113
|
-
if (opts.soft) return [];
|
|
114
|
-
fail(`找不到 ${ledger}`);
|
|
115
|
-
} else if (shardReadText) {
|
|
116
|
-
try { text = shardReadText(root, 'delegations'); } // 分片感知读(fail-loud 包装:单分片读失败不静默吞)
|
|
117
|
-
catch (err) { if (opts.soft) return []; fail(`台账读取失败: ${ledger} (${err.message})`); }
|
|
118
|
-
} else {
|
|
119
|
-
text = fs.readFileSync(ledger, 'utf8');
|
|
120
|
-
}
|
|
121
|
-
const tables = splitTables(text);
|
|
122
|
-
const delegated = parseTableRows(tables.delegated.join('\n')).map((c) => ({
|
|
123
|
-
scope: '委派',
|
|
124
|
-
date: c[0],
|
|
125
|
-
actor: c[1],
|
|
126
|
-
result: c[3] || '',
|
|
127
|
-
verdict: c[5] || '',
|
|
128
|
-
}));
|
|
129
|
-
const selfDone = parseTableRows(tables.self.join('\n')).map((c) => ({
|
|
130
|
-
scope: '自做',
|
|
131
|
-
date: c[0],
|
|
132
|
-
actor: '主智能体',
|
|
133
|
-
result: c[2] || '',
|
|
134
|
-
verdict: c[4] || '',
|
|
135
|
-
}));
|
|
136
|
-
const rows = delegated.concat(selfDone);
|
|
137
|
-
// 零数据行时区分「台账真空」与「结构漂移」:有日期开头的数据行却识别不到表 → fail-loud,不再静默「台账为空」
|
|
138
|
-
if (!rows.length && /^\s*\|\s*\d{4}-\d{2}-\d{2}\s*\|/m.test(text)) {
|
|
139
|
-
if (opts.soft) return [];
|
|
140
|
-
fail(`台账结构漂移:${ledger} 存在日期开头的数据行但未识别到结果表(委派表表头须含「被委派方」列,自做表表头须为「日期 | 任务一句话 | 结果 | 备注」——末列「合入结论」可缺省,存量表不要求补)`);
|
|
141
|
-
}
|
|
142
|
-
return rows;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function countIncidents() {
|
|
146
|
-
const byMonth = {};
|
|
147
|
-
if (!fs.existsSync(INCIDENTS)) return byMonth;
|
|
148
|
-
for (const f of fs.readdirSync(INCIDENTS)) {
|
|
149
|
-
const m = f.match(/^(\d{4}-\d{2})-\d{2}.*\.md$/);
|
|
150
|
-
if (m) byMonth[m[1]] = (byMonth[m[1]] || 0) + 1;
|
|
151
|
-
}
|
|
152
|
-
return byMonth;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 门槛(2026-09-27 board-kb-p1 对齐 workflow/delegations.md §并发扩容门槛声明——doc 为权威):
|
|
156
|
-
// 月度口径项:一次完成率 ≥90% | 月度**设计**返工次数 = 0(2026-10-08 起门禁噪声返工剥离单列)| 无主兜底信号(=0)(旧「平均返工≤0.3 / 兜底≤10%」为宽松分叉,退役)
|
|
157
|
-
// 样本护栏项(脚本侧统计可信度门槛,非口径分叉):月样本量 ≥20 | 委派样本 ≥5
|
|
158
|
-
// 连续性:扩容需「本月 + 上一自然月」连续两月月度口径全达标(delegations.md「连续两个月」)
|
|
159
|
-
const GATE = { minSample: 20, minPassRate: 0.9, minDelegated: 5 };
|
|
160
|
-
|
|
161
|
-
function metrics(rows) {
|
|
162
|
-
// 未知结果(结果列拼错/漏填)单列计数,不混进「待修」——待修=未闭环,未知=记录本身有问题(2026-09-24 口径分离)
|
|
163
|
-
const kinds = rows.map((r) => parseResult(r.result).kind);
|
|
164
|
-
const valid = rows.filter((_, i) => kinds[i] !== 'pending' && kinds[i] !== 'unknown');
|
|
165
|
-
const pending = kinds.filter((k) => k === 'pending').length;
|
|
166
|
-
const unknown = kinds.filter((k) => k === 'unknown').length;
|
|
167
|
-
let pass = 0, reworkSum = 0, reworkNoiseSum = 0, fallback = 0;
|
|
168
|
-
for (const r of valid) {
|
|
169
|
-
const p = parseResult(r.result);
|
|
170
|
-
if (p.kind === 'pass') pass += 1;
|
|
171
|
-
if (p.kind === 'fallback') fallback += 1;
|
|
172
|
-
// 双列累计:设计返工与门禁噪声返工分列(2026-10-08 selfmeasure-and-modularize 引入分列,
|
|
173
|
-
// 2026-10-08 rework-attribution-split 加行内混合档)。
|
|
174
|
-
// 显式列 kind 而非 `reworkSum += p.rework`——否则后续新增 kind 会被静默并入设计返工,
|
|
175
|
-
// 且混合档的两个分量必须各走各的累加器(只加 rework 会漏掉噪声)。
|
|
176
|
-
if (p.kind === 'rework' || p.kind === 'rework-mixed') reworkSum += p.rework;
|
|
177
|
-
if (p.kind === 'rework-noise' || p.kind === 'rework-mixed') reworkNoiseSum += p.reworkNoise;
|
|
178
|
-
}
|
|
179
|
-
const delegatedValid = valid.filter((r) => r.scope === '委派');
|
|
180
|
-
// 接受率(2026-10-12 merge-accept-rate):分母 = **已记录合入结论**的行数(parseVerdict 非 null),
|
|
181
|
-
// 分子 = accepted + accepted-after-rework。留空行不计入——存量行零回填,未记录 ≠ 未合入。
|
|
182
|
-
// 分母不足 ACCEPT_MIN_SAMPLE 时 acceptRate = null(输出 '—'),不给小样本比率。
|
|
183
|
-
let verdictRecorded = 0, accepted = 0, rejected = 0;
|
|
184
|
-
for (const r of valid) {
|
|
185
|
-
const v = parseVerdict(r.verdict);
|
|
186
|
-
if (!v) continue;
|
|
187
|
-
verdictRecorded += 1;
|
|
188
|
-
if (v === 'accepted' || v === 'accepted-after-rework') accepted += 1;
|
|
189
|
-
if (v === 'rejected') rejected += 1;
|
|
190
|
-
}
|
|
191
|
-
const acceptRate = verdictRecorded >= ACCEPT_MIN_SAMPLE ? accepted / verdictRecorded : null;
|
|
192
|
-
return {
|
|
193
|
-
total: valid.length,
|
|
194
|
-
pending,
|
|
195
|
-
unknown,
|
|
196
|
-
pass,
|
|
197
|
-
passRate: valid.length ? pass / valid.length : null,
|
|
198
|
-
reworkSum,
|
|
199
|
-
reworkNoiseSum,
|
|
200
|
-
avgRework: valid.length ? (reworkSum + reworkNoiseSum) / valid.length : null,
|
|
201
|
-
delegatedValid: delegatedValid.length,
|
|
202
|
-
fallback,
|
|
203
|
-
fallbackRate: delegatedValid.length ? fallback / delegatedValid.length : null,
|
|
204
|
-
verdictRecorded,
|
|
205
|
-
accepted,
|
|
206
|
-
rejected,
|
|
207
|
-
acceptRate,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// fmtAccept:接受率展示(分母为 0 或未过护栏 → '—' 并注明原因,不打 0%)
|
|
212
|
-
function fmtAccept(m) {
|
|
213
|
-
if (!m.verdictRecorded) return '—(合入结论零记录)';
|
|
214
|
-
if (m.acceptRate == null) return `—(样本 ${m.verdictRecorded}/${ACCEPT_MIN_SAMPLE})`;
|
|
215
|
-
return `${(m.acceptRate * 100).toFixed(0)}%(${m.accepted}/${m.verdictRecorded})`;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function fmtRate(x, digits = 0) {
|
|
219
|
-
return x == null ? '—' : `${(x * 100).toFixed(digits)}%`;
|
|
220
|
-
}
|
|
221
|
-
function fmtNum(x) {
|
|
222
|
-
return x == null ? '—' : x.toFixed(2);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// gateMonth:单月门槛判定(pure,供测试)——口径项 + 样本护栏项分开列
|
|
226
|
-
function gateMonth(m) {
|
|
227
|
-
const items = [];
|
|
228
|
-
items.push({ no: 1, ok: m.total >= GATE.minSample, desc: `样本量 ${m.total}/${GATE.minSample}`, kind: '样本护栏' });
|
|
229
|
-
items.push({ no: 2, ok: m.passRate != null && m.passRate >= GATE.minPassRate, desc: `一次完成率 ${fmtRate(m.passRate)}≥90%`, kind: '口径' });
|
|
230
|
-
// 第 3 项判据 2026-10-08 语义变更:只对**设计返工**判 =0;门禁噪声返工单列在描述里(数字仍可见不隐藏,
|
|
231
|
-
// 但不参与 ok 判定——两类混判是本仓质量门连续两月红的根因)。⚠️ 不可据此给设计返工贴噪声标签洗白指标:
|
|
232
|
-
// 该取值由作者手写、机器无法判真伪(同 --delegated 信任边界),口径约束见 delegations.md 头部。
|
|
233
|
-
items.push({ no: 3, ok: m.reworkSum === 0, desc: `月度设计返工 ${m.reworkSum}=0(门禁噪声返工 ${m.reworkNoiseSum || 0} 次已剥离单列)`, kind: '口径' });
|
|
234
|
-
items.push({ no: 4, ok: m.fallback === 0, desc: `主兜底 ${m.fallback}=0(无主兜底信号)`, kind: '口径' });
|
|
235
|
-
items.push({ no: 5, ok: m.delegatedValid >= GATE.minDelegated, desc: `委派样本 ${m.delegatedValid}≥5`, kind: '样本护栏' });
|
|
236
|
-
items.push({ no: 6, ok: null, desc: '门禁不失守(人工对照当月 incident 定性)', kind: '人工' });
|
|
237
|
-
return { items, monthOk: items.filter((i) => i.ok !== null).every((i) => i.ok) };
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// expansionVerdict:连续两个月扩容判定(pure,供测试)——本月与上一自然月 monthOk 均真才「可扩容」;
|
|
241
|
-
// prevMissing = 无上月数据(首月/断档);items 供未达标项列出
|
|
242
|
-
function expansionVerdict(monthOk, prevOk, prevMissing, items) {
|
|
243
|
-
if (monthOk && prevOk) return '✅ 连续两月达标(可扩容,待人工确认门6)';
|
|
244
|
-
if (monthOk && prevMissing) return '⚠️ 本月达标(连续性 1/2——上月无数据)';
|
|
245
|
-
if (monthOk) return '⚠️ 本月达标(连续性 1/2——上月未达标)';
|
|
246
|
-
const bad = (items || []).filter((i) => i.ok === false).map((i) => i.no).join('+');
|
|
247
|
-
return `❌ 未达标(连续性中断):${bad || '月度口径项未全过'}`;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function main() {
|
|
251
|
-
const rows = readLedger();
|
|
252
|
-
const incidents = countIncidents();
|
|
253
|
-
|
|
254
|
-
const byMonth = {};
|
|
255
|
-
for (const r of rows) {
|
|
256
|
-
const ym = r.date.slice(0, 7);
|
|
257
|
-
(byMonth[ym] = byMonth[ym] || []).push(r);
|
|
258
|
-
}
|
|
259
|
-
const months = Object.keys(byMonth).sort().filter((m) => !argMonth || m === argMonth);
|
|
260
|
-
|
|
261
|
-
console.log(`# 量化证据聚合(${argMonth || '全部月份'}) 生成于 ${new Date().toISOString().slice(0, 10)}\n`);
|
|
262
|
-
|
|
263
|
-
const snapshotRows = [];
|
|
264
|
-
const monthResults = new Map(); // ym → { monthOk }(连续两月判定用)
|
|
265
|
-
for (const ym of months) {
|
|
266
|
-
const m = metrics(byMonth[ym]);
|
|
267
|
-
const { items, monthOk } = gateMonth(m);
|
|
268
|
-
monthResults.set(ym, monthOk);
|
|
269
|
-
const prevYm = (() => { const [y, mo] = ym.split('-').map(Number); const d = new Date(Date.UTC(y, mo - 2, 1)); return `${d.getUTCFullYear()}-${String(d.getUTCMonth() + 1).padStart(2, '0')}`; })();
|
|
270
|
-
const verdict = expansionVerdict(monthOk, monthResults.get(prevYm), !months.includes(prevYm), items);
|
|
271
|
-
console.log(`## ${ym}`);
|
|
272
|
-
console.log(` 有效任务 ${m.total}(待修 ${m.pending}${m.unknown ? `、未知结果 ${m.unknown}` : ''})|一次通过 ${m.pass}(${fmtRate(m.passRate)})|设计返工 ${m.reworkSum} 次 / 门禁噪声返工 ${m.reworkNoiseSum} 次(合计返工 ${m.reworkSum + m.reworkNoiseSum},平均 ${fmtNum(m.avgRework)})|主兜底 ${m.fallback}/${m.delegatedValid}(${fmtRate(m.fallbackRate)})|产出接受率 ${fmtAccept(m)}|incident ${incidents[ym] || 0} 起`);
|
|
273
|
-
console.log(` 接受率说明(观测项,非门槛):已记录合入结论 ${m.verdictRecorded} 行|合入 ${m.accepted}|未合入 ${m.rejected}|留空未记录行不入分母`);
|
|
274
|
-
for (const i of items) console.log(` 门${i.no}[${i.kind}] ${i.ok === null ? '[人工]' : i.ok ? '✅' : '❌'} ${i.desc}`);
|
|
275
|
-
console.log(` 扩容门判定:${verdict}\n`);
|
|
276
|
-
snapshotRows.push(`| ${ym} | ${m.total} | ${fmtRate(m.passRate)} | ${fmtNum(m.avgRework)} | ${fmtRate(m.fallbackRate)} | ${incidents[ym] || 0} | ${fmtAccept(m)} | ${verdict} | 样本含待修${m.pending}${m.unknown ? `、未知${m.unknown}` : ''} |`);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (!argMonth && rows.length) {
|
|
280
|
-
const m = metrics(rows);
|
|
281
|
-
console.log(`## 全量累计`);
|
|
282
|
-
console.log(` 有效任务 ${m.total}(待修 ${m.pending}${m.unknown ? `、未知结果 ${m.unknown}` : ''})|一次通过 ${fmtRate(m.passRate)}|平均返工 ${fmtNum(m.avgRework)}|主兜底 ${fmtRate(m.fallbackRate)}|产出接受率 ${fmtAccept(m)}|incident 合计 ${Object.values(incidents).reduce((a, b) => a + b, 0)} 起\n`);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
console.log(`## 可粘贴快照行(粘到 workflow/delegations.md §月度聚合快照)`);
|
|
286
|
-
for (const r of snapshotRows) console.log(r);
|
|
287
|
-
|
|
288
|
-
if (!rows.length) {
|
|
289
|
-
console.log('\n(台账为空:尚无记录,扩容门自然未通过)');
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// isMain 守卫 + 纯函数导出(board-kb-p1:gateMonth / expansionVerdict 供测试 import,import 不执行 main)
|
|
294
|
-
if (require.main === module) {
|
|
295
|
-
// 分片读侧装载(2026-10-13 ledger-shard-ledgers):动态 import 后进 main;装载失败 fail-loud
|
|
296
|
-
// (指标缺数会喂错扩容门,不静默退化主台账直读)。
|
|
297
|
-
import('./ledger-shards.mjs')
|
|
298
|
-
.then((m) => { shardReadText = m.readLedgerText; main(); })
|
|
299
|
-
.catch((err) => fail(`ledger-shards.mjs 装载失败: ${err.message}`));
|
|
300
|
-
} else {
|
|
301
|
-
module.exports = { parseResult, parseVerdict, metrics, gateMonth, expansionVerdict, fmtAccept, GATE, ACCEPT_MIN_SAMPLE, readLedger };
|
|
302
|
-
}
|