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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
状态: draft
|
|
3
|
+
级别: L1
|
|
4
|
+
模块: <词表之一,见 .agents/config/workflow-modules.txt>
|
|
5
|
+
---
|
|
6
|
+
# SPEC — <与入口文档同名主题>
|
|
7
|
+
<!-- 与 intents/ 或 incidents/ 下同名入口文档配对;L2 / L3 必须先有 spec 确认通过方可起草 plan;L1 可省略 -->
|
|
8
|
+
<!-- frontmatter 受限子集(2026-09-13):状态∈draft/approved/done/superseded/cancelled(done=关单、superseded=曾确认后放弃、cancelled=未完成即取消);L3 确认通过后在 frontmatter 追加两行:`确认结果: approved` 与 `确认时间: YYYY-MM-DD`(check-loop 对 L3 强制校验) -->
|
|
9
|
+
<!-- 模糊点纪律(2026-10-16):起草/修订遇无法自行决策的模糊点(多种解释/口径缺失/依赖外部事实)禁止脑补——在对应节原地插入 [NEEDS CLARIFICATION]: <一句话问题> 并保持 draft 向用户求澄清;澄清后删除标记、把决策落为正文。approved 前标记须清零(口径见 workflow/README.md 文档协议「模糊点显式阻断」)。 -->
|
|
10
|
+
|
|
11
|
+
对应入口:../intents/YYYY-MM-DD-<主题>.md 或 ../incidents/YYYY-MM-DD-<主题>.md(保留实际一项)
|
|
12
|
+
|
|
13
|
+
## 功能行为
|
|
14
|
+
<讲清功能怎么工作;分小节列用户 / 系统行为,必要时附状态机 / 时序图说明>
|
|
15
|
+
|
|
16
|
+
## 数据流
|
|
17
|
+
<数据从哪里来 → 经过哪些处理 → 落到哪里;含字段映射、接口契约、上下游依赖>
|
|
18
|
+
|
|
19
|
+
## 系统改动清单
|
|
20
|
+
- 后端:模块 / 文件 / 接口契约
|
|
21
|
+
- 数据库:无 / <表名 + 字段 + 迁移 SQL 路径>
|
|
22
|
+
- 前端:路由 / 组件 / store / api
|
|
23
|
+
|
|
24
|
+
## 约束遵守映射(对照 AGENTS.md 触达红线)
|
|
25
|
+
<!-- 2026-10-29 起:映射须覆盖项目目录 AGENTS.md 的机器门/红线条目(与本次改动面无关——全仓契约基准,起草前必读,见 stages.md Design §2「必读输入」);wiki 依据在相关节以路径引用 -->
|
|
26
|
+
| 红线 | 本 spec 如何满足 |
|
|
27
|
+
|------|------------------|
|
|
28
|
+
| Application 禁引 Infrastructure / DbContext | <通过 XXX,不引入 YYY> |
|
|
29
|
+
| 规则 / 契约(编码权威 / 共享契约 / 既有接口语义 / 全局横切口径) | <是否触及(触及即 L2 定级依据);编码权威仍在后端> |
|
|
30
|
+
| schema / 迁移 SQL(禁 dotnet ef) | <涉及 SQL 路径;历史 EF Migrations 目录(含 ModelSnapshot)已整体移除,不得重建> |
|
|
31
|
+
| 前端:Drawer / 禁 a-select / style.css 统一 | <本 spec 涉及哪些前端约定> |
|
|
32
|
+
|
|
33
|
+
## 验收判据
|
|
34
|
+
<!-- 判据级收敛对账的机器输入(check-loop 检查 23):每行一条判据,「证据」须机器可解析。
|
|
35
|
+
路径:文件必须存在。机器不读正文,不判断它和判据是否相关(那一步留给新会话复核)。
|
|
36
|
+
命令:只认全量门跑过的 npm test / dotnet test / dotnet build / npm run build / verify.mjs。
|
|
37
|
+
自 convergenceHardSince 起,还须 workflow/verify-evidence.md 有一行时间不早于本 spec「日期」的全绿凭证;没有这行 = 未覆盖。
|
|
38
|
+
日期口径:frontmatter「日期」与全绿行时间同为 UTC(fill-spec 默认即此);手写勿用本地时区日期——UTC+8 凌晨 0–8 点落的全绿行日期为前一日,会对不上(硬拦,08:00 后重跑门即解)。
|
|
39
|
+
verify-ui / vue-tsc / regression-smoke 等不在全量门里,改记证据文件路径。
|
|
40
|
+
「状态」写「覆盖」而证据无效仍判未覆盖。人工走查状态写「人工」,证据列留空(仅「人工+空证据」豁免机器对账;截图等图片不在路径白名单,需留痕改存 .md 报告后引路径)。
|
|
41
|
+
无本节或表为空 → WARN。证据无效:仅 convergenceSince 时 WARN;convergenceHardSince 起 HARD-BLOCK。 -->
|
|
42
|
+
| 判据(可观察行为) | 证据(测试文件 / 命令 / 证据文件) | 状态 | 对应验收 |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| <行为 1> | <路径或命令> | <覆盖 / 未覆盖 / 人工> | <A1 或 A1、A3> |
|
|
45
|
+
|
|
46
|
+
<!-- 「对应验收」列 = 入口 intent 验收编号(锚 coverageSince 2026-10-22 起确认门强制):每条 An 至少被引用一次,
|
|
47
|
+
可一对多;技术性判据无可对应验收时留空即可(只做单向覆盖,不反向逼假验收)。判据门见 stage-gates coverageGate。 -->
|
|
48
|
+
|
|
49
|
+
## 风险评估
|
|
50
|
+
- <风险点 1> | 应对:<测试 / hook / 评审>
|
|
51
|
+
- <风险点 2> | 应对:…
|
|
52
|
+
|
|
53
|
+
## 前提质询
|
|
54
|
+
<!-- 拦「自信的错误解读」(premise-interrogation 2026-10-29;根因 incidents/2026-10-23-pml-quota-substitute-identity-overwrite:
|
|
55
|
+
展示诉求被写成存储身份改写,测试按错前提固化期望、复核只核自洽——三层同源失效,唯一可拦点在前提进事实源之前)。
|
|
56
|
+
每行一个立论前提:反问对立解读、结论写凭什么选定;无解读风险的小件写一行「无关键前提」+ 理由。
|
|
57
|
+
confirm-doc 硬拦(premiseSince 2026-10-30 锚起):缺节 / 空表 / 占位未填 / 缺反问或缺依据 → 拒。 -->
|
|
58
|
+
| 前提 | 反问(对立解读会怎样) | 结论与依据 |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| <立论的解读 / 口径选择> | <换成对立解读会怎样、最坏后果> | <选定解读 + 凭什么(用户原话 / 文档 / 实验)> |
|
|
61
|
+
|
|
62
|
+
## 歧义清单
|
|
63
|
+
<!-- 6 维各一行、待澄清归零方可确认;工序与判据单源见 .agents/commands/stages.md Design §2.7 与 stage-gates clarifyGate。
|
|
64
|
+
缺维 ≠ 无歧义;锚前存量、缺 frontmatter「日期」者不参与。 -->
|
|
65
|
+
| 维度 | 结论 | 依据 / 问题 | 状态 |
|
|
66
|
+
|---|---|---|---|
|
|
67
|
+
| 状态与边界 | <谁在什么状态能做什么;越权 / 并发 / 幂等?> | <状态机节号或代码路径> | <已定 / 待澄清> |
|
|
68
|
+
| 数据口径 | <空值、精度、单位、时区、排序稳定性?> | <查库结果或既有实现> | <已定 / 待澄清> |
|
|
69
|
+
| 失败路径 | <部分成功是否回滚、重试、用户看到什么提示?> | <依据> | <已定 / 待澄清> |
|
|
70
|
+
| 契约对称 | <≥2 个消费方是否同口径;旧调用方如何兼容?> | <消费方清单> | <已定 / 待澄清> |
|
|
71
|
+
| 存量数据 | <历史行如何解释;是否需回填?> | <数据分布实测> | <已定 / 待澄清> |
|
|
72
|
+
| 验收可测性 | <每条验收能否被一条命令或一次实验判定?> | <测试文件或命令> | <已定 / 待澄清> |
|
|
73
|
+
|
|
74
|
+
## 假设与推断
|
|
75
|
+
<!-- 只登记推断(无实验 / 代码 / 文档支撑的口径选择),不登记实测事实;无推断则删本节。 -->
|
|
76
|
+
| 假设 | 影响面 | 若不成立会怎样 |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| <一句话假设> | <受影响模块 / 端点 / 页面> | <返工范围与兜底> |
|
|
79
|
+
|
|
80
|
+
## 确认与复核
|
|
81
|
+
> AI-Native 工作流:确认 = 用户在对话内一句话通过;无第二审批人,追溯靠 git(commit 记录确认时点)。
|
|
82
|
+
> 确认结果 / 确认时间写在文件头 frontmatter(L3 由 check-loop 强制校验);本节只留叙述性复核记录。
|
|
83
|
+
|
|
84
|
+
- 独立复核:<L3 强制:另开新会话由 AI 复核本 spec,记录复核会话与结论;L1 / L2 无则删除本行。2026-10-12(reviewerSince)起复核行须含「复核上下文:<会话/子代理 id>」>
|
|
85
|
+
- 复核结论:<无则删除本行>
|
|
86
|
+
- 返修意见:<无则删除本行>
|
|
87
|
+
- 确认通过后,方可起草 ../plans/YYYY-MM-DD-<主题>.md
|
|
File without changes
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 agentic-flow-kit contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/modules/gates/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# 门禁模块
|
|
2
|
-
|
|
3
|
-
可选红线。`flow-kit add-gate <名>` 把模块里除元数据外的文件平铺进 `.agents/hooks/`,并把 `local-pre-commit.line` 的那一行追加到 `.agents/hooks/local-pre-commit`。装完归项目所有,`sync` 不覆盖。
|
|
4
|
-
|
|
5
|
-
## 约定
|
|
6
|
-
|
|
7
|
-
| 文件 | 作用 |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `check-*.mjs` 或其他脚本 | 拷入 `.agents/hooks/`,由 pre-commit 调用 |
|
|
10
|
-
| `local-pre-commit.line` | 一行挂载命令,不拷入项目;已有相同行则不重复 |
|
|
11
|
-
| `README.md` | 只留在包内 |
|
|
12
|
-
|
|
13
|
-
脚本只看暂存区,退出码非 0 即拦住这次提交。不要在模块里放子目录。
|
|
14
|
-
|
|
15
|
-
## 现有模块
|
|
16
|
-
|
|
17
|
-
| 名 | 拦住什么 |
|
|
18
|
-
|---|---|
|
|
19
|
-
| `dotnet-ca` | Clean Architecture 分层红线(参考实现) |
|
|
20
|
-
| `node-layer` | `src/` 引用 `tests/`、`test/`、`__tests__/` |
|
|
21
|
-
| `py-import` | 业务 `.py` 引用 `tests` / `test` 包 |
|
|
22
|
-
| `generated-readonly` | 手改 `GENERATED:BEGIN` 与 `GENERATED:END` 之间的行 |
|
|
23
|
-
| `test-protect` | fix/调试提交里测试文件与被测代码同框改动(豁免:`FLOW_KIT_ALLOW_TEST_EDIT=1`) |
|
|
24
|
-
|
|
25
|
-
项目自己的红线复制其中一个目录,改判断,再用 `add-gate` 装上。
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# dotnet-ca — Clean Architecture 门禁模块(可选)
|
|
2
|
-
|
|
3
|
-
Clean Architecture(Application/Domain/Infrastructure/API 分层)红线守卫参考实现,抽自真实项目实战门禁。五条红线:Application 禁引 Infrastructure/DbContext、API Controller 禁直注 DbContext、EF 模型层解耦(无关系映射/无导航属性/无 Include)、InnerException 禁透传响应。
|
|
4
|
-
|
|
5
|
-
## 接线(一次性,装进项目本地)
|
|
6
|
-
|
|
7
|
-
已装 agentic-flow-kit 的项目直接:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npx agentic-flow-kit add-gate dotnet-ca
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
(装 .agents/hooks/check-architecture.sh + 自动接线 local-pre-commit;装后归项目所有,sync 不覆盖。)
|
|
14
|
-
|
|
15
|
-
手动装法等价于:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
mkdir -p .agents/hooks
|
|
19
|
-
cp <包内 modules/gates/dotnet-ca/check-architecture.sh> .agents/hooks/
|
|
20
|
-
# .agents/hooks/local-pre-commit(pre-commit 的项目门禁挂载点,没有则新建):
|
|
21
|
-
echo 'sh .agents/hooks/check-architecture.sh' >> .agents/hooks/local-pre-commit
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
然后改脚本头部 `CONFIG` 块的目录/类型名。红线不适用(如不用 EF)的条目自行删除——本模块是参考实现,装进项目后归项目所有。
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# check-architecture(agentic-flow-kit · dotnet-ca 门禁模块):Clean Architecture 红线参考实现
|
|
3
|
-
# 红线:Application 禁引用 Infrastructure / 禁 DbContext / EF 模型层解耦(无关系映射/无导航/无 Include)/ 异常详情不透传
|
|
4
|
-
# 违例输出到 stderr 并 exit 1;干净无输出 exit 0
|
|
5
|
-
#
|
|
6
|
-
# 接线(项目一次性):把本文件复制/引用到 .agents/hooks/ 下并在 .agents/hooks/local-pre-commit 里执行——
|
|
7
|
-
# mkdir -p .agents/hooks && cp <包内路径>/check-architecture.sh .agents/hooks/
|
|
8
|
-
# echo 'sh .agents/hooks/check-architecture.sh' >> .agents/hooks/local-pre-commit
|
|
9
|
-
cd "$(git rev-parse --show-toplevel 2>/dev/null)" || { echo "check-architecture: 不在 git 仓库内,门禁 fail-closed,不静默放行" >&2; exit 1; }
|
|
10
|
-
|
|
11
|
-
# ---- CONFIG:按项目改成你的目录/类型名(其余为通用逻辑,升级只动 CONFIG) ----
|
|
12
|
-
APP_DIR="backend/src/YourApp.Application"
|
|
13
|
-
API_DIR="backend/src/YourApp.API"
|
|
14
|
-
DBCTX_FILE="backend/src/YourApp.Infrastructure/Data/AppDbContext.cs"
|
|
15
|
-
DOMAIN_ENTITIES_DIR="backend/src/YourApp.Domain/Entities"
|
|
16
|
-
CONTROLLERS_DIR="backend/src/YourApp.API/Controllers"
|
|
17
|
-
DBCTX_CLASS="AppDbContext"
|
|
18
|
-
INFRA_USING="using YourCompany.YourApp.Infrastructure"
|
|
19
|
-
EXEMPT_CTRL="ExemptedController" # 冒号分隔的豁免 Controller 名(原生 LINQ 等历史豁免)
|
|
20
|
-
SHARED_TYPES="Staff,Company" # 跨模块共享实体名(红线 4.3 白名单)
|
|
21
|
-
# -------------------------------------------------------------------------
|
|
22
|
-
|
|
23
|
-
# 门禁目标存在性:目标缺失时 fail-closed(不静默放行)
|
|
24
|
-
require_target() {
|
|
25
|
-
[ -d "$1" ] || [ -f "$1" ] || { echo "check-architecture: 门禁目标缺失($1)——fail-closed,不静默放行" >&2; exit 1; }
|
|
26
|
-
}
|
|
27
|
-
require_target "$APP_DIR"
|
|
28
|
-
require_target "$API_DIR"
|
|
29
|
-
violations=""
|
|
30
|
-
# 豁免清单拆多 grep -e(2026-09-27 host-gates-p1 P1-B1):POSIX BRE 中 | 是字面量——旧 tr ':' '|' 造的
|
|
31
|
-
# "A|B" 模式永不命中,多值豁免全部失效(豁免 Controller 被误报违例)。
|
|
32
|
-
# set -- + "$@" 派发(复核 P2-2 收口):对任意值安全(含空格/glob 字符不拆宽豁免面)
|
|
33
|
-
set --
|
|
34
|
-
OLD_IFS="$IFS"
|
|
35
|
-
IFS=':'
|
|
36
|
-
for ex in $EXEMPT_CTRL; do
|
|
37
|
-
[ -n "$ex" ] && set -- "$@" -e "$ex"
|
|
38
|
-
done
|
|
39
|
-
IFS="$OLD_IFS"
|
|
40
|
-
|
|
41
|
-
# 红线 1:Application csproj 不得引用 Infrastructure 项目
|
|
42
|
-
# csproj 存在性 fail-closed(2026-09-27 host-gates-p1 随 P1-B3):glob 展开失败时旧代码静默放行
|
|
43
|
-
csproj_found=0
|
|
44
|
-
for cs in "$APP_DIR"/*.csproj; do
|
|
45
|
-
[ -f "$cs" ] && csproj_found=1
|
|
46
|
-
if grep -q "Infrastructure" "$cs" 2>/dev/null; then
|
|
47
|
-
violations="$violations
|
|
48
|
-
- csproj 引用了 Infrastructure 项目(Application 只允许依赖 Domain 与共享层)"
|
|
49
|
-
fi
|
|
50
|
-
done
|
|
51
|
-
[ "$csproj_found" -eq 1 ] || { echo "check-architecture: 门禁目标缺失($APP_DIR/*.csproj)——fail-closed,不静默放行" >&2; exit 1; }
|
|
52
|
-
|
|
53
|
-
# 红线 2:Application 代码不得出现 DbContext / Infrastructure 命名空间
|
|
54
|
-
hits=$(grep -rn -e "$DBCTX_CLASS" -e "$INFRA_USING" "$APP_DIR" --include="*.cs" 2>/dev/null | grep -v -e "/obj/" -e "/bin/")
|
|
55
|
-
if [ -n "$hits" ]; then
|
|
56
|
-
violations="$violations
|
|
57
|
-
- Application 代码出现 DbContext / Infrastructure 引用:
|
|
58
|
-
$hits"
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
# 红线 3:API 层 Controller 禁直接注入 DbContext(豁免清单内的 Controller 除外)
|
|
62
|
-
api_hits=$(grep -rn "$DBCTX_CLASS" "$API_DIR" --include="*.cs" 2>/dev/null | grep -v -e "/obj/" -e "/bin/" "$@")
|
|
63
|
-
if [ -n "$api_hits" ]; then
|
|
64
|
-
violations="$violations
|
|
65
|
-
- API 层出现 DbContext 直接引用(应走仓储/服务接口,豁免仅 $EXEMPT_CTRL):
|
|
66
|
-
$api_hits"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
# 红线 4.1:DbContext 禁关系映射配置(模型层解耦,关联一律显式 JOIN/分步查询)
|
|
70
|
-
require_target "$DBCTX_FILE"
|
|
71
|
-
rel_hits=$(grep -nE "HasOne|HasMany|WithOne|WithMany|HasForeignKey|OnDelete" "$DBCTX_FILE" 2>/dev/null)
|
|
72
|
-
if [ -n "$rel_hits" ]; then
|
|
73
|
-
violations="$violations
|
|
74
|
-
- $DBCTX_CLASS 出现关系映射(模型层已解耦):
|
|
75
|
-
$rel_hits"
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# 红线 4.2:Application / API 禁代码级 .Include((注释里的「原 Include(...)」无前导点,不误报)
|
|
79
|
-
inc_hits=$(grep -rnE "\.Include\(" "$APP_DIR" "$API_DIR" --include="*.cs" 2>/dev/null | grep -v -e "/obj/" -e "/bin/")
|
|
80
|
-
if [ -n "$inc_hits" ]; then
|
|
81
|
-
violations="$violations
|
|
82
|
-
- Application/API 出现 EF Include(导航已移除,明细/参照数据经仓储分步查询或显式 JOIN):
|
|
83
|
-
$inc_hits"
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# 红线 4.3:Domain 实体禁导航属性(按实体类名交叉扫描;枚举/标量属性不误伤)
|
|
87
|
-
require_target "$DOMAIN_ENTITIES_DIR"
|
|
88
|
-
PY_BIN=""
|
|
89
|
-
for c in python python3 py; do
|
|
90
|
-
if command -v "$c" >/dev/null 2>&1; then PY_BIN="$c"; break; fi
|
|
91
|
-
done
|
|
92
|
-
if [ -z "$PY_BIN" ]; then
|
|
93
|
-
violations="$violations
|
|
94
|
-
- 红线 4.3 无法执行:未找到 python/python3/py(Domain 导航属性扫描依赖 Python;门禁 fail-closed,不静默放行)"
|
|
95
|
-
else
|
|
96
|
-
# 2026-09-24:①python 运行期报错也 fail-closed(原只对「没装 python」兜底,脚本报错时 nav_hits 为空即放行);
|
|
97
|
-
# ②属性匹配改全文 finditer——支持「{ 换行」与 expression-bodied(=>)形态,先剥注释防误报
|
|
98
|
-
nav_hits=$(DOMAIN_ENTITIES_DIR="$DOMAIN_ENTITIES_DIR" SHARED_TYPES="$SHARED_TYPES" "$PY_BIN" - <<'PYEOF'
|
|
99
|
-
import re, glob, os
|
|
100
|
-
from os import environ
|
|
101
|
-
d = environ['DOMAIN_ENTITIES_DIR']
|
|
102
|
-
shared = {s.strip() for s in environ.get('SHARED_TYPES', '').split(',') if s.strip()}
|
|
103
|
-
files = glob.glob(d + '/**/*.cs', recursive=True)
|
|
104
|
-
names = set()
|
|
105
|
-
for f in files:
|
|
106
|
-
with open(f, encoding='utf-8-sig') as fh:
|
|
107
|
-
names |= set(re.findall(r'public\s+(?:sealed\s+|abstract\s+|partial\s+)*(?:class|record)\s+(\w+)', fh.read()))
|
|
108
|
-
hits = []
|
|
109
|
-
for f in files:
|
|
110
|
-
with open(f, encoding='utf-8-sig') as fh:
|
|
111
|
-
src = re.sub(r'/\*.*?\*/', '', fh.read(), flags=re.S)
|
|
112
|
-
src = re.sub(r'//[^\n]*', '', src)
|
|
113
|
-
for m in re.finditer(r'\bpublic\s+(?:virtual\s+)?([\w<>, \t.\?]+?)\s+(\w+)\s*(?:\{|=>)', src):
|
|
114
|
-
typ = m.group(1).strip()
|
|
115
|
-
mm = re.search(r'(?:ICollection|List|IEnumerable|IReadOnlyCollection|IReadOnlyList)<\s*(\w+)\s*>', typ)
|
|
116
|
-
core = mm.group(1) if mm else (typ.rstrip('?') if re.fullmatch(r'\w+\??', typ) else None)
|
|
117
|
-
if core and (core in names or core in shared):
|
|
118
|
-
ln = src.count('\n', 0, m.start()) + 1
|
|
119
|
-
hits.append(f"{os.path.basename(f)}:{ln} {m.group(2)} : {typ}")
|
|
120
|
-
if hits:
|
|
121
|
-
print('\n'.join(hits))
|
|
122
|
-
PYEOF
|
|
123
|
-
) || violations="$violations
|
|
124
|
-
- 红线 4.3 无法执行:python 扫描异常退出(fail-closed,不静默放行;诊断见上方 stderr)"
|
|
125
|
-
fi
|
|
126
|
-
if [ -n "$nav_hits" ]; then
|
|
127
|
-
violations="$violations
|
|
128
|
-
- Domain 实体出现导航属性(模型层已解耦,关联只保留外键标量列):
|
|
129
|
-
$nav_hits"
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
# 红线 5:Controller 禁把 InnerException 原文透传进响应体(详情只许进日志)
|
|
133
|
-
# CONTROLLERS_DIR fail-closed(2026-09-27 host-gates-p1 P1-B3):旧代码 2>/dev/null 吞目录缺失——
|
|
134
|
-
# Controllers 改名/改 minimal API 时本红线静默失效,违反脚本自述「目标缺失 fail-closed」硬约束
|
|
135
|
-
require_target "$CONTROLLERS_DIR"
|
|
136
|
-
# 已知天花板:grep 按整行排除 Log 调用——透传与 Log 写在同一行可绕过;语义级排除需 AST 工具,参考实现门禁按接受记录(2026-09-24)
|
|
137
|
-
inner_hits=$(grep -rn "InnerException" "$CONTROLLERS_DIR" --include="*.cs" 2>/dev/null \
|
|
138
|
-
| grep -v -e "/obj/" -e "/bin/" \
|
|
139
|
-
| grep -vE "Log(Warning|Error|Information|Debug|Trace)")
|
|
140
|
-
if [ -n "$inner_hits" ]; then
|
|
141
|
-
violations="$violations
|
|
142
|
-
- Controller 出现 InnerException 透传进响应(数据库异常统一翻译;详情只许进日志):
|
|
143
|
-
$inner_hits"
|
|
144
|
-
fi
|
|
145
|
-
|
|
146
|
-
if [ -n "$violations" ]; then
|
|
147
|
-
printf '架构红线违例(dotnet-ca 门禁):\n%s\n' "$violations" >&2
|
|
148
|
-
exit 1
|
|
149
|
-
fi
|
|
150
|
-
exit 0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sh .agents/hooks/check-architecture.sh
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# generated-readonly
|
|
2
|
-
|
|
3
|
-
暂存 diff 若改到 `GENERATED:BEGIN` 与 `GENERATED:END` 之间的行,提交失败。生成器自己重写时:
|
|
4
|
-
|
|
5
|
-
```sh
|
|
6
|
-
FLOW_KIT_ALLOW_GENERATED=1 git commit
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npx agentic-flow-kit add-gate generated-readonly
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
标记写在文件正文里。`workflow/INDEX.md` 与 `wiki/INDEX.md` 的生成区已经带这对标记。
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// 暂存 diff 不得改写 GENERATED:BEGIN / GENERATED:END 之间的行。
|
|
3
|
-
// 区间按索引里的文件计算(git show :path),不读工作区。
|
|
4
|
-
// 生成器重写该区域时设 FLOW_KIT_ALLOW_GENERATED=1。
|
|
5
|
-
import { spawnSync } from 'node:child_process';
|
|
6
|
-
|
|
7
|
-
if (process.env.FLOW_KIT_ALLOW_GENERATED === '1') process.exit(0);
|
|
8
|
-
|
|
9
|
-
const git = process.platform === 'win32' ? 'git.exe' : 'git';
|
|
10
|
-
const listed = spawnSync(git, ['diff', '--cached', '--name-only', '--diff-filter=ACMR'], { encoding: 'utf8' });
|
|
11
|
-
if (listed.status !== 0) {
|
|
12
|
-
console.error('check-generated: git diff --cached 失败(需在 git 仓库的暂存区上运行)');
|
|
13
|
-
process.exit(1);
|
|
14
|
-
}
|
|
15
|
-
const diff = spawnSync(git, ['diff', '--cached', '-U0', '--'], { encoding: 'utf8' });
|
|
16
|
-
if (diff.status !== 0) process.exit(1);
|
|
17
|
-
|
|
18
|
-
function rangesOf(text) {
|
|
19
|
-
const out = [];
|
|
20
|
-
let start = -1;
|
|
21
|
-
String(text).split(/\n/).forEach((line, i) => {
|
|
22
|
-
if (line.includes('GENERATED:BEGIN')) start = i + 1;
|
|
23
|
-
else if (line.includes('GENERATED:END') && start > 0) {
|
|
24
|
-
out.push([start, i + 1]);
|
|
25
|
-
start = -1;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return out;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const files = new Map();
|
|
32
|
-
let cur = null;
|
|
33
|
-
for (const line of String(diff.stdout).split(/\n/)) {
|
|
34
|
-
const name = /^diff --git a\/(.+?) b\//.exec(line);
|
|
35
|
-
if (name) { cur = name[1]; if (!files.has(cur)) files.set(cur, []); continue; }
|
|
36
|
-
const hunk = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/.exec(line);
|
|
37
|
-
if (hunk && cur) files.get(cur).push([Number(hunk[1]), hunk[2] === undefined ? 1 : Number(hunk[2])]);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let bad = 0;
|
|
41
|
-
for (const rel of listed.stdout.split(/\n/).map((s) => s.trim()).filter(Boolean)) {
|
|
42
|
-
const norm = rel.split('\\').join('/');
|
|
43
|
-
const shown = spawnSync(git, ['show', `:${norm}`], { encoding: 'utf8' });
|
|
44
|
-
if (shown.status !== 0) {
|
|
45
|
-
console.error(`${norm}: 读不到暂存内容`);
|
|
46
|
-
bad += 1;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
const text = shown.stdout;
|
|
50
|
-
const ranges = rangesOf(text);
|
|
51
|
-
if (!ranges.length) continue;
|
|
52
|
-
for (const [start, len] of files.get(norm) || []) {
|
|
53
|
-
const from = start;
|
|
54
|
-
const to = len === 0 ? start : start + len - 1;
|
|
55
|
-
if (!ranges.some(([s, e]) => !(to < s || from > e))) continue;
|
|
56
|
-
console.error(`${norm}: 暂存改动落入 GENERATED 区(${ranges.map(([s, e]) => `${s}-${e}`).join('、')})。生成器重写时设 FLOW_KIT_ALLOW_GENERATED=1`);
|
|
57
|
-
bad += 1;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
process.exit(bad ? 1 : 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node .agents/hooks/check-generated.mjs
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// 暂存区内 src/ 下的脚本不得引用 tests/、test/ 或 __tests__/。
|
|
3
|
-
// 正文只读索引(git show :path),不读工作区。
|
|
4
|
-
import { spawnSync } from 'node:child_process';
|
|
5
|
-
|
|
6
|
-
const git = process.platform === 'win32' ? 'git.exe' : 'git';
|
|
7
|
-
const listed = spawnSync(git, ['diff', '--cached', '--name-only', '--diff-filter=ACMR'], { encoding: 'utf8' });
|
|
8
|
-
if (listed.status !== 0) {
|
|
9
|
-
console.error('check-node-layer: git diff --cached 失败(需在 git 仓库的暂存区上运行)');
|
|
10
|
-
process.exit(1);
|
|
11
|
-
}
|
|
12
|
-
const re = /['"](?:[^'"]*\/)?(?:tests?|__tests__)(?:\/[^'"]*)?['"]/;
|
|
13
|
-
let bad = 0;
|
|
14
|
-
for (const rel of listed.stdout.split(/\n/).map((s) => s.trim()).filter(Boolean)) {
|
|
15
|
-
const norm = rel.split('\\').join('/');
|
|
16
|
-
if (!norm.startsWith('src/') || !/\.(?:[cm]?js|jsx|tsx?)$/.test(norm)) continue;
|
|
17
|
-
const shown = spawnSync(git, ['show', `:${norm}`], { encoding: 'utf8' });
|
|
18
|
-
if (shown.status !== 0) {
|
|
19
|
-
console.error(`${norm}: 读不到暂存内容`);
|
|
20
|
-
bad += 1;
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
shown.stdout.split(/\n/).forEach((line, i) => {
|
|
24
|
-
if (!re.test(line)) return;
|
|
25
|
-
console.error(`${norm}:${i + 1}: src 不得引用 tests/、test/ 或 __tests__/`);
|
|
26
|
-
bad += 1;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
process.exit(bad ? 1 : 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node .agents/hooks/check-node-layer.mjs
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// 暂存的业务 .py(不在 tests/ 或 test/ 下)不得 import tests 或 test。
|
|
3
|
-
// 正文只读索引(git show :path),不读工作区。
|
|
4
|
-
import { spawnSync } from 'node:child_process';
|
|
5
|
-
|
|
6
|
-
const git = process.platform === 'win32' ? 'git.exe' : 'git';
|
|
7
|
-
const listed = spawnSync(git, ['diff', '--cached', '--name-only', '--diff-filter=ACMR'], { encoding: 'utf8' });
|
|
8
|
-
if (listed.status !== 0) {
|
|
9
|
-
console.error('check-py-import: git diff --cached 失败(需在 git 仓库的暂存区上运行)');
|
|
10
|
-
process.exit(1);
|
|
11
|
-
}
|
|
12
|
-
const re = /^\s*(?:import|from)\s+(?:tests?|test)\b/;
|
|
13
|
-
let bad = 0;
|
|
14
|
-
for (const rel of listed.stdout.split(/\n/).map((s) => s.trim()).filter(Boolean)) {
|
|
15
|
-
const norm = rel.split('\\').join('/');
|
|
16
|
-
if (!norm.endsWith('.py')) continue;
|
|
17
|
-
if (norm.split('/').some((seg) => seg === 'tests' || seg === 'test')) continue;
|
|
18
|
-
const shown = spawnSync(git, ['show', `:${norm}`], { encoding: 'utf8' });
|
|
19
|
-
if (shown.status !== 0) {
|
|
20
|
-
console.error(`${norm}: 读不到暂存内容`);
|
|
21
|
-
bad += 1;
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
shown.stdout.split(/\n/).forEach((line, i) => {
|
|
25
|
-
if (!re.test(line)) return;
|
|
26
|
-
console.error(`${norm}:${i + 1}: 业务代码不得 import tests 或 test`);
|
|
27
|
-
bad += 1;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
process.exit(bad ? 1 : 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node .agents/hooks/check-py-import.mjs
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# test-protect
|
|
2
|
-
|
|
3
|
-
暂存 diff 若同时包含「测试文件」与「非测试文件」(即测试与代码同框改动),提交失败。
|
|
4
|
-
|
|
5
|
-
fix/调试任务中,测试是「bug 已修」的证据;证据与结论同一次改动 = 自证,闭环失去意义。此门禁把
|
|
6
|
-
「fix 不得改测试」从提示语变成机器红线,不依赖 agent 客户端自觉。
|
|
7
|
-
|
|
8
|
-
```sh
|
|
9
|
-
npx agentic-flow-kit add-gate test-protect
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
**测试文件识别**(脚本头部 CONFIG 可按项目扩展):
|
|
13
|
-
|
|
14
|
-
- 目录面:`tests/`、`__tests__/`、`test/`、`spec/`(任意层级)
|
|
15
|
-
- 文件面:`*.test.*`、`*.spec.*`、`_test_*.py`(python pytest 风格)
|
|
16
|
-
|
|
17
|
-
**豁免**(不是漏洞,是显式语义):
|
|
18
|
-
|
|
19
|
-
- 纯测试提交(只改测试文件,无代码同框)——新增/修正测试本身合法。
|
|
20
|
-
- 显式声明 `FLOW_KIT_ALLOW_TEST_EDIT=1 git commit`——对应 plan 中显式标注「本次需同步演进测试」
|
|
21
|
-
(测试先行 / 行为断言变更)。门禁只判暂存面事实,语义归显式声明,不读任务元数据。
|
|
22
|
-
|
|
23
|
-
**不拦截**:merge 提交无暂存 diff;工作区未暂存改动(提交面之外)。
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// test-protect — 防 agent 自证清白时弱化测试(2026-10-10 调研 P1 test-protect)。
|
|
3
|
-
// 语义:fix/调试任务中,同一提交不得既改被测代码又改它的测试文件——测试是「bug 已修」的证据,
|
|
4
|
-
// 证据与结论同一次改动 = 自证,闭环失去意义(Anthropic playbook Stage 4:fix 任务禁止改测试文件)。
|
|
5
|
-
// 判定范围:本次提交的暂存 diff(git diff --cached --name-only),只拦「测试文件」与「非测试文件」同框出现。
|
|
6
|
-
// 豁免:
|
|
7
|
-
// - 显式声明 `FLOW_KIT_ALLOW_TEST_EDIT=1 git commit`(对应 plan 中显式标注「本次需同步改测试」——测试先行、行为断言变更属于合法测试演进)。
|
|
8
|
-
// - 纯测试提交(只改测试文件,无被测代码同框)——新增/修正测试本身合法。
|
|
9
|
-
// - 测试文件自身之间的改动(如 fixture、helper 互改)。
|
|
10
|
-
// 设计(对照调研 P1):独立 add-gate 模块,不进 check-loop 核心检查面(20 项纪律);pre-commit 挂载点走 local-pre-commit,
|
|
11
|
-
// 不依赖 agent 客户端自觉。本脚本不读任务元数据(plan 状态 / frontmatter)——门禁只判暂存面事实,语义归环境变量显式声明。
|
|
12
|
-
// 实现零依赖、纯 Node ≥18。
|
|
13
|
-
|
|
14
|
-
import { spawnSync } from 'node:child_process';
|
|
15
|
-
|
|
16
|
-
// 测试文件识别:常见测试目录/文件命名。装户可按项目在脚本头部 CONFIG 扩展。
|
|
17
|
-
// 目录面:tests/、__tests__/、test/、spec/(仓库根或任意层级);文件面:*.test.*、*.spec.*、_test.*(python pytest 风格)。
|
|
18
|
-
const TEST_DIR_RE = /(^|\/)(tests?|__tests__|spec|test)\//i;
|
|
19
|
-
const TEST_FILE_RE = /\.(test|spec)\.[^.]+$/i;
|
|
20
|
-
const PYTEST_FILE_RE = /(^|\/)_?test_[^/]+\.py$/i;
|
|
21
|
-
|
|
22
|
-
function isTestFile(rel) {
|
|
23
|
-
const n = rel.replace(/\\/g, '/');
|
|
24
|
-
if (TEST_DIR_RE.test(n)) return true;
|
|
25
|
-
if (TEST_FILE_RE.test(n)) return true;
|
|
26
|
-
if (PYTEST_FILE_RE.test(n)) return true;
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function git(args, cwd) {
|
|
31
|
-
const p = spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
32
|
-
return { exit: p.status ?? 1, stdout: p.stdout || '', stderr: p.stderr || '' };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function main() {
|
|
36
|
-
const root = process.env.FLOW_KIT_GIT_ROOT || process.cwd();
|
|
37
|
-
// 只判暂存 diff(提交面);工作区未暂存改动不拦(与 generated-readonly / node-layer 同口径:暂存面即提交意图)
|
|
38
|
-
const r = git(['diff', '--cached', '--name-only', '--diff-filter=ACMR'], root);
|
|
39
|
-
if (r.exit !== 0) {
|
|
40
|
-
console.error('❌ test-protect:git diff --cached 失败(' + (r.stderr.trim() || '未知错误') + ')');
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
const files = r.stdout.split(/\r?\n/).map((s) => s.trim()).filter(Boolean);
|
|
44
|
-
if (!files.length) return; // 无暂存改动(如 merge 提交)不拦
|
|
45
|
-
|
|
46
|
-
const tests = files.filter(isTestFile);
|
|
47
|
-
const nonTests = files.filter((f) => !isTestFile(f));
|
|
48
|
-
if (!tests.length || !nonTests.length) return; // 纯测试提交 / 纯代码提交都合法
|
|
49
|
-
|
|
50
|
-
if (process.env.FLOW_KIT_ALLOW_TEST_EDIT === '1') {
|
|
51
|
-
console.log('ℹ️ test-protect:FLOW_KIT_ALLOW_TEST_EDIT=1 显式放行(测试与代码同框改动)');
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const sample = tests.slice(0, 5).join('、') + (tests.length > 5 ? ` 等 ${tests.length} 个` : '');
|
|
56
|
-
const codeSample = nonTests.slice(0, 3).join('、') + (nonTests.length > 3 ? ` 等 ${nonTests.length} 个` : '');
|
|
57
|
-
console.error(`❌ test-protect:提交同时改动测试与代码——「测试文件」${sample} 与「非测试文件」${codeSample} 同框。`);
|
|
58
|
-
console.error(' fix/调试任务中,测试是 bug 已修的证据;证据与结论同一次改动 = 自证,闭环失去意义。');
|
|
59
|
-
console.error(' 若本提交确实需要同步演进测试(测试先行 / 行为断言变更),显式声明后重试:');
|
|
60
|
-
console.error(' FLOW_KIT_ALLOW_TEST_EDIT=1 git commit');
|
|
61
|
-
process.exit(1);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
main();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node .agents/hooks/check-test-protect.mjs
|
package/modules/hosts/README.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# 宿主适配层
|
|
2
|
-
|
|
3
|
-
七个宿主的薄适配层。`flow-kit init --hosts <列表>` / `flow-kit add-host <宿主>` 把对应目录铺进装户仓,
|
|
4
|
-
`sync` 随包升级。权威源是 `templates/_agents/{commands,roles}/*.md`,本目录是**纯转发薄层**——
|
|
5
|
-
换宿主不换流程。
|
|
6
|
-
|
|
7
|
-
## 约定
|
|
8
|
-
|
|
9
|
-
每个宿主目录两子层:
|
|
10
|
-
|
|
11
|
-
| 层 | 文件 | 说明 |
|
|
12
|
-
|---|---|---|
|
|
13
|
-
| `agents/` | `<角色>.md` | 角色契约薄适配(全宿主无前缀,文件名 = 权威源文件名) |
|
|
14
|
-
| `commands/` | `<prefix><命令>.md` | 命令层薄适配,文件名统一带宿主前缀(见下),避免裸占宿主顶层命名空间 |
|
|
15
|
-
|
|
16
|
-
`commandPrefix`(`src/profiles.mjs#HOSTS` 单源):opencode / trae / claude / cursor / codex 用 `wf-`;
|
|
17
|
-
zcode / omp 无该字段——只有角色层适配,不参与 commands 权威源映射。
|
|
18
|
-
|
|
19
|
-
## 现有宿主
|
|
20
|
-
|
|
21
|
-
| 宿主 | 装户目录 | commands 层 | 宿主怎么读 |
|
|
22
|
-
|---|---|---|---|
|
|
23
|
-
| `zcode` | `.zcode/` | 无(仅角色) | `.zcode/agents/*.md` |
|
|
24
|
-
| `opencode` | `.opencode/` | `wf-*` | `.opencode/{agents,commands}/*.md` |
|
|
25
|
-
| `trae` | `.trae/` | `wf-*` | `.trae/{agents,commands}/*.md` |
|
|
26
|
-
| `omp` | `.omp/` | 无(仅角色) | `.omp/agents/*.md` |
|
|
27
|
-
| `claude` | `.claude/` | `wf-*` | `.claude/commands` + `.claude/agents` |
|
|
28
|
-
| `cursor` | `.cursor/` | `wf-*` | `.cursor/commands` |
|
|
29
|
-
| `codex` | `.codex/` | `wf-*` | 仓库根 `AGENTS.md` + `.codex/skills/`;`.codex/commands` 是同形薄转发,供显式引用 |
|
|
30
|
-
|
|
31
|
-
> codex 另有 `skills/` 子层(宿主级技能辅助),见 `modules/hosts/codex/skills/`。
|
|
32
|
-
|
|
33
|
-
七个宿主一律入库(2026-10-05 起撤销 localOnly)——换宿主不丢文件、CI 克隆面一致。zcode 的会话级
|
|
34
|
-
液态草稿(`.zcode/drafts/`、`.zcode/plans/`)是本机态、不该入库,init 不自动写这条规则,装户自行加进
|
|
35
|
-
`.gitignore`。
|
|
36
|
-
|
|
37
|
-
## 对账
|
|
38
|
-
|
|
39
|
-
权威源改一处,要同步到 N 份薄适配——人工 grep 易漏:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
flow-kit sync-hosts --diff # 权威源 vs 薄适配漂移报告(默认,不改盘面)
|
|
43
|
-
flow-kit sync-hosts --apply # 单向同步:权威源 → 薄适配(不反向,避免污染权威源)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
包源仓(含 `templates/_agents` + `modules/hosts`)与装户仓(含 `.agents`)两种布局都可用——
|
|
47
|
-
同一命令两处口径一致。装户侧等价体检在 `flow-kit doctor`(跨宿主薄适配正文段漂移校验)。
|
|
48
|
-
|
|
49
|
-
## 加一个新宿主
|
|
50
|
-
|
|
51
|
-
1. 在 `src/profiles.mjs#HOSTS` 注册:`dir`(装户目录名,带点)、`commandPrefix`(有命令层才填)。
|
|
52
|
-
2. 建 `modules/hosts/<宿主>/`:`agents/*.md` 三角色薄适配(从现有宿主拷一份改 frontmatter/调用约定);
|
|
53
|
-
有命令层再加 `commands/<prefix>*.md`。
|
|
54
|
-
3. 权威源(`templates/_agents/{commands,roles}/`)不动——薄适配只转发,不复刻判据。
|
|
55
|
-
4. 跑 `flow-kit sync-hosts --diff` 自查新增薄适配与权威源对齐;`npm test`(含 sync-hosts 套件与
|
|
56
|
-
doctor 跨宿主校验回归)。
|
|
57
|
-
5. README「现有宿主」表与 `cli.mjs` HELP 的宿主清单随动。
|