@bonesofspring/ai-rules 0.2.77 → 0.2.80
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/CHANGELOG.md +89 -0
- package/README.md +4 -2
- package/bin/lib/engine-scripts.js +9 -0
- package/bin/lib/seed-ai-local-team.js +2 -0
- package/docs/LOCAL-OVERLAY.md +4 -4
- package/docs/PRESET-CONTRIBUTION.md +9 -8
- package/docs/TEAM-DB.md +160 -22
- package/docs/openapi/team-db.v1.json +2879 -1858
- package/package.json +6 -1
- package/presets/_shared/ai-local/scripts/aggregate-agent-task-metrics.mjs +23 -0
- package/presets/_shared/ai-local/scripts/check-task-repositories.mjs +264 -0
- package/presets/_shared/ai-local/scripts/check-verification.mjs +275 -0
- package/presets/_shared/ai-local/scripts/check-write-scope.mjs +72 -18
- package/presets/_shared/ai-local/scripts/manifest.mjs +78 -4
- package/presets/_shared/ai-local/scripts/rr-migrate-repositories.mjs +481 -0
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +366 -13
- package/presets/_shared/ai-local/scripts/run.mjs +29 -6
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +211 -12
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +289 -3
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +1065 -4
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +144 -15
- package/presets/_shared/ai-local/scripts/team-db-tracker.mjs +29 -10
- package/presets/_shared/ai-local/scripts/team-db.mjs +65 -5
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -4
- package/presets/_shared/core/agent-team/task-framing.md +1 -0
- package/presets/_shared/core/meta/preset-layering.md +4 -4
- package/presets/_shared/core/meta/preset-pr-checklist.md +2 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +12 -5
- package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -1
- package/presets/_shared/core/quality/verification-before-completion.md +28 -4
- package/presets/_shared/core/review/code-review-mr.md +1 -0
- package/presets/_shared/core/review/receiving-code-review.md +1 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +382 -27
- package/presets/claude/android-kotlin/CLAUDE.md +1 -1
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/claude/android-kotlin/agents/debugger.md +1 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/agents/task-router.md +2 -0
- package/presets/claude/android-kotlin/commands/README.md +1 -0
- package/presets/claude/android-kotlin/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/android-kotlin/commands/task.md +4 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/go/CLAUDE.md +1 -1
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/agents/code-reviewer.md +1 -1
- package/presets/claude/go/agents/debugger.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/task-analyst.md +1 -1
- package/presets/claude/go/agents/task-router.md +2 -0
- package/presets/claude/go/commands/README.md +1 -0
- package/presets/claude/go/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/go/commands/task.md +4 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/ios-swift/CLAUDE.md +1 -1
- package/presets/claude/ios-swift/agents/build-verifier.md +4 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/debugger.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/agents/task-router.md +2 -0
- package/presets/claude/ios-swift/commands/README.md +1 -0
- package/presets/claude/ios-swift/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/ios-swift/commands/task.md +4 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/java/CLAUDE.md +1 -1
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/agents/code-reviewer.md +1 -1
- package/presets/claude/java/agents/debugger.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/task-analyst.md +1 -1
- package/presets/claude/java/agents/task-router.md +2 -0
- package/presets/claude/java/commands/README.md +1 -0
- package/presets/claude/java/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/java/commands/task.md +4 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/mcp-ts/CLAUDE.md +1 -1
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/agents/task-router.md +2 -0
- package/presets/claude/mcp-ts/commands/README.md +1 -0
- package/presets/claude/mcp-ts/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/mcp-ts/commands/task.md +4 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/mol/CLAUDE.md +1 -1
- package/presets/claude/mol/agents/build-verifier.md +4 -1
- package/presets/claude/mol/agents/code-reviewer.md +1 -1
- package/presets/claude/mol/agents/debugger.md +1 -1
- package/presets/claude/mol/agents/feature-developer.md +1 -1
- package/presets/claude/mol/agents/task-analyst.md +1 -1
- package/presets/claude/mol/agents/task-router.md +2 -0
- package/presets/claude/mol/commands/README.md +1 -0
- package/presets/claude/mol/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/mol/commands/task.md +4 -0
- package/presets/claude/mol/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/mol/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/mol/rules/tooling-and-review/code-review-mr.md +1 -0
- package/presets/claude/mol/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/mol/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/next/CLAUDE.md +1 -1
- package/presets/claude/next/agents/build-verifier.md +6 -1
- package/presets/claude/next/agents/code-reviewer.md +1 -1
- package/presets/claude/next/agents/debugger.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/task-analyst.md +1 -1
- package/presets/claude/next/agents/task-router.md +2 -0
- package/presets/claude/next/commands/README.md +1 -0
- package/presets/claude/next/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/next/commands/task.md +4 -0
- package/presets/claude/next/commands/ui-start.md +12 -4
- package/presets/claude/next/commands/ui-stop.md +5 -2
- package/presets/claude/next/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/nuxt/CLAUDE.md +1 -1
- package/presets/claude/nuxt/agents/build-verifier.md +4 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/agents/task-router.md +2 -0
- package/presets/claude/nuxt/commands/README.md +1 -0
- package/presets/claude/nuxt/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/nuxt/commands/task.md +4 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +1 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +2 -0
- package/presets/claude/php-hexagonal/commands/README.md +1 -0
- package/presets/claude/php-hexagonal/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/php-hexagonal/commands/task.md +4 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/php-laravel/CLAUDE.md +1 -1
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/claude/php-laravel/agents/debugger.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
- package/presets/claude/php-laravel/agents/task-router.md +2 -0
- package/presets/claude/php-laravel/commands/README.md +1 -0
- package/presets/claude/php-laravel/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/php-laravel/commands/task.md +4 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/claude/svelte/CLAUDE.md +1 -1
- package/presets/claude/svelte/agents/build-verifier.md +4 -1
- package/presets/claude/svelte/agents/code-reviewer.md +1 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/agents/task-router.md +2 -0
- package/presets/claude/svelte/commands/README.md +1 -0
- package/presets/claude/svelte/commands/rr-migrate-repositories.md +59 -0
- package/presets/claude/svelte/commands/task.md +4 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +382 -27
- package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +1 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +4 -4
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +12 -5
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-router.md +2 -0
- package/presets/cursor/android-kotlin/commands/README.md +1 -0
- package/presets/cursor/android-kotlin/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/android-kotlin/commands/task.md +4 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/android-kotlin/rules/preset-layering.mdc +4 -4
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/agents/code-reviewer.md +1 -1
- package/presets/cursor/go/agents/debugger.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/task-analyst.md +1 -1
- package/presets/cursor/go/agents/task-router.md +2 -0
- package/presets/cursor/go/commands/README.md +1 -0
- package/presets/cursor/go/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/go/commands/task.md +4 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/go/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/go/rules/preset-layering.mdc +4 -4
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/go/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/ios-swift/agents/build-verifier.md +4 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/debugger.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/agents/task-router.md +2 -0
- package/presets/cursor/ios-swift/commands/README.md +1 -0
- package/presets/cursor/ios-swift/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/ios-swift/commands/task.md +4 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +4 -4
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/agents/code-reviewer.md +1 -1
- package/presets/cursor/java/agents/debugger.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/task-analyst.md +1 -1
- package/presets/cursor/java/agents/task-router.md +2 -0
- package/presets/cursor/java/commands/README.md +1 -0
- package/presets/cursor/java/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/java/commands/task.md +4 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/java/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/java/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/java/rules/preset-layering.mdc +4 -4
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/java/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +2 -0
- package/presets/cursor/mcp-ts/commands/README.md +1 -0
- package/presets/cursor/mcp-ts/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/mcp-ts/commands/task.md +4 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +4 -4
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/mol/agents/build-verifier.md +4 -1
- package/presets/cursor/mol/agents/code-reviewer.md +1 -1
- package/presets/cursor/mol/agents/debugger.md +1 -1
- package/presets/cursor/mol/agents/feature-developer.md +1 -1
- package/presets/cursor/mol/agents/task-analyst.md +1 -1
- package/presets/cursor/mol/agents/task-router.md +2 -0
- package/presets/cursor/mol/commands/README.md +1 -0
- package/presets/cursor/mol/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/mol/commands/task.md +4 -0
- package/presets/cursor/mol/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/mol/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/mol/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/mol/rules/preset-layering.mdc +4 -4
- package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/mol/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/next/agents/build-verifier.md +6 -1
- package/presets/cursor/next/agents/code-reviewer.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +2 -0
- package/presets/cursor/next/commands/README.md +1 -0
- package/presets/cursor/next/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/next/commands/task.md +4 -0
- package/presets/cursor/next/commands/ui-start.md +12 -4
- package/presets/cursor/next/commands/ui-stop.md +5 -2
- package/presets/cursor/next/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/next/rules/ai-local-overlay.mdc +2 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/next/rules/preset-layering.mdc +4 -4
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/next/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/nuxt/agents/build-verifier.md +4 -1
- package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
- package/presets/cursor/nuxt/agents/debugger.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/agents/task-router.md +2 -0
- package/presets/cursor/nuxt/commands/README.md +1 -0
- package/presets/cursor/nuxt/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/nuxt/commands/task.md +4 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/nuxt/rules/preset-layering.mdc +4 -4
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +2 -0
- package/presets/cursor/php-hexagonal/commands/README.md +1 -0
- package/presets/cursor/php-hexagonal/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/php-hexagonal/commands/task.md +4 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +4 -4
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-laravel/agents/debugger.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/agents/task-router.md +2 -0
- package/presets/cursor/php-laravel/commands/README.md +1 -0
- package/presets/cursor/php-laravel/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/php-laravel/commands/task.md +4 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +4 -4
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +12 -5
- package/presets/cursor/svelte/agents/build-verifier.md +4 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
- package/presets/cursor/svelte/agents/debugger.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/agents/task-router.md +2 -0
- package/presets/cursor/svelte/commands/README.md +1 -0
- package/presets/cursor/svelte/commands/rr-migrate-repositories.md +59 -0
- package/presets/cursor/svelte/commands/task.md +4 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +382 -27
- package/presets/cursor/svelte/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/svelte/rules/code-review-mr.mdc +1 -0
- package/presets/cursor/svelte/rules/preset-layering.mdc +4 -4
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +12 -5
- package/presets/mavis/android-kotlin/adapter-map.json +9 -1
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
- package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-router.md +2 -0
- package/presets/mavis/android-kotlin/commands/README.md +1 -0
- package/presets/mavis/android-kotlin/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/android-kotlin/commands/task.md +4 -0
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +1 -0
- package/presets/mavis/android-kotlin/rules/preset-layering.md +4 -4
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/go/adapter-map.json +9 -1
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +1 -1
- package/presets/mavis/go/agents/debugger.md +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/task-analyst.md +1 -1
- package/presets/mavis/go/agents/task-router.md +2 -0
- package/presets/mavis/go/commands/README.md +1 -0
- package/presets/mavis/go/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/go/commands/task.md +4 -0
- package/presets/mavis/go/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/go/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/go/rules/code-review-mr.md +1 -0
- package/presets/mavis/go/rules/preset-layering.md +4 -4
- package/presets/mavis/go/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/go/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/ios-swift/adapter-map.json +9 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +4 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/mavis/ios-swift/agents/debugger.md +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/agents/task-router.md +2 -0
- package/presets/mavis/ios-swift/commands/README.md +1 -0
- package/presets/mavis/ios-swift/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/ios-swift/commands/task.md +4 -0
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/ios-swift/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/ios-swift/rules/code-review-mr.md +1 -0
- package/presets/mavis/ios-swift/rules/preset-layering.md +4 -4
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/ios-swift/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/java/adapter-map.json +9 -1
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +1 -1
- package/presets/mavis/java/agents/debugger.md +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/task-analyst.md +1 -1
- package/presets/mavis/java/agents/task-router.md +2 -0
- package/presets/mavis/java/commands/README.md +1 -0
- package/presets/mavis/java/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/java/commands/task.md +4 -0
- package/presets/mavis/java/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/java/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/java/rules/code-review-mr.md +1 -0
- package/presets/mavis/java/rules/preset-layering.md +4 -4
- package/presets/mavis/java/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/java/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/mcp-ts/adapter-map.json +9 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-router.md +2 -0
- package/presets/mavis/mcp-ts/commands/README.md +1 -0
- package/presets/mavis/mcp-ts/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/mcp-ts/commands/task.md +4 -0
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +1 -0
- package/presets/mavis/mcp-ts/rules/preset-layering.md +4 -4
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/mol/adapter-map.json +9 -1
- package/presets/mavis/mol/agents/build-verifier.md +4 -1
- package/presets/mavis/mol/agents/code-reviewer.md +1 -1
- package/presets/mavis/mol/agents/debugger.md +1 -1
- package/presets/mavis/mol/agents/feature-developer.md +1 -1
- package/presets/mavis/mol/agents/task-analyst.md +1 -1
- package/presets/mavis/mol/agents/task-router.md +2 -0
- package/presets/mavis/mol/commands/README.md +1 -0
- package/presets/mavis/mol/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/mol/commands/task.md +4 -0
- package/presets/mavis/mol/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/mol/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/mol/rules/code-review-mr.md +1 -0
- package/presets/mavis/mol/rules/preset-layering.md +4 -4
- package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/mol/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/next/adapter-map.json +9 -1
- package/presets/mavis/next/agents/build-verifier.md +6 -1
- package/presets/mavis/next/agents/code-reviewer.md +1 -1
- package/presets/mavis/next/agents/debugger.md +1 -1
- package/presets/mavis/next/agents/feature-developer.md +1 -1
- package/presets/mavis/next/agents/task-analyst.md +1 -1
- package/presets/mavis/next/agents/task-router.md +2 -0
- package/presets/mavis/next/commands/README.md +1 -0
- package/presets/mavis/next/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/next/commands/task.md +4 -0
- package/presets/mavis/next/commands/ui-start.md +12 -4
- package/presets/mavis/next/commands/ui-stop.md +5 -2
- package/presets/mavis/next/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/next/rules/ai-local-overlay.md +2 -1
- package/presets/mavis/next/rules/code-review-mr.md +1 -0
- package/presets/mavis/next/rules/preset-layering.md +4 -4
- package/presets/mavis/next/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/next/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/nuxt/adapter-map.json +9 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +4 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
- package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
- package/presets/mavis/nuxt/agents/task-router.md +2 -0
- package/presets/mavis/nuxt/commands/README.md +1 -0
- package/presets/mavis/nuxt/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/nuxt/commands/task.md +4 -0
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/nuxt/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/nuxt/rules/code-review-mr.md +1 -0
- package/presets/mavis/nuxt/rules/preset-layering.md +4 -4
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/nuxt/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/php-hexagonal/adapter-map.json +9 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-router.md +2 -0
- package/presets/mavis/php-hexagonal/commands/README.md +1 -0
- package/presets/mavis/php-hexagonal/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/php-hexagonal/commands/task.md +4 -0
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +1 -0
- package/presets/mavis/php-hexagonal/rules/preset-layering.md +4 -4
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/php-laravel/adapter-map.json +9 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-laravel/agents/debugger.md +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/agents/task-router.md +2 -0
- package/presets/mavis/php-laravel/commands/README.md +1 -0
- package/presets/mavis/php-laravel/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/php-laravel/commands/task.md +4 -0
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/php-laravel/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/php-laravel/rules/code-review-mr.md +1 -0
- package/presets/mavis/php-laravel/rules/preset-layering.md +4 -4
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/php-laravel/rules/preset-twin-sync.md +12 -5
- package/presets/mavis/svelte/adapter-map.json +9 -1
- package/presets/mavis/svelte/agents/build-verifier.md +4 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +1 -1
- package/presets/mavis/svelte/agents/task-analyst.md +1 -1
- package/presets/mavis/svelte/agents/task-router.md +2 -0
- package/presets/mavis/svelte/commands/README.md +1 -0
- package/presets/mavis/svelte/commands/rr-migrate-repositories.md +54 -0
- package/presets/mavis/svelte/commands/task.md +4 -0
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +382 -27
- package/presets/mavis/svelte/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/svelte/rules/code-review-mr.md +1 -0
- package/presets/mavis/svelte/rules/preset-layering.md +4 -4
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -1
- package/presets/mavis/svelte/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/android-kotlin/adapter-map.json +9 -1
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
- package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-router.md +2 -0
- package/presets/opencode/android-kotlin/commands/README.md +1 -0
- package/presets/opencode/android-kotlin/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/android-kotlin/commands/task.md +4 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +1 -0
- package/presets/opencode/android-kotlin/rules/preset-layering.md +4 -4
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/go/adapter-map.json +9 -1
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +1 -1
- package/presets/opencode/go/agents/debugger.md +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/task-analyst.md +1 -1
- package/presets/opencode/go/agents/task-router.md +2 -0
- package/presets/opencode/go/commands/README.md +1 -0
- package/presets/opencode/go/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/go/commands/task.md +4 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/go/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/go/rules/code-review-mr.md +1 -0
- package/presets/opencode/go/rules/preset-layering.md +4 -4
- package/presets/opencode/go/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/go/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/ios-swift/adapter-map.json +9 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +4 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/opencode/ios-swift/agents/debugger.md +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/agents/task-router.md +2 -0
- package/presets/opencode/ios-swift/commands/README.md +1 -0
- package/presets/opencode/ios-swift/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/ios-swift/commands/task.md +4 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/ios-swift/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/ios-swift/rules/code-review-mr.md +1 -0
- package/presets/opencode/ios-swift/rules/preset-layering.md +4 -4
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/ios-swift/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/java/adapter-map.json +9 -1
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +1 -1
- package/presets/opencode/java/agents/debugger.md +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/task-analyst.md +1 -1
- package/presets/opencode/java/agents/task-router.md +2 -0
- package/presets/opencode/java/commands/README.md +1 -0
- package/presets/opencode/java/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/java/commands/task.md +4 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/java/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/java/rules/code-review-mr.md +1 -0
- package/presets/opencode/java/rules/preset-layering.md +4 -4
- package/presets/opencode/java/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/java/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/mcp-ts/adapter-map.json +9 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-router.md +2 -0
- package/presets/opencode/mcp-ts/commands/README.md +1 -0
- package/presets/opencode/mcp-ts/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/mcp-ts/commands/task.md +4 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +1 -0
- package/presets/opencode/mcp-ts/rules/preset-layering.md +4 -4
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/mol/adapter-map.json +9 -1
- package/presets/opencode/mol/agents/build-verifier.md +4 -1
- package/presets/opencode/mol/agents/code-reviewer.md +1 -1
- package/presets/opencode/mol/agents/debugger.md +1 -1
- package/presets/opencode/mol/agents/feature-developer.md +1 -1
- package/presets/opencode/mol/agents/task-analyst.md +1 -1
- package/presets/opencode/mol/agents/task-router.md +2 -0
- package/presets/opencode/mol/commands/README.md +1 -0
- package/presets/opencode/mol/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/mol/commands/task.md +4 -0
- package/presets/opencode/mol/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/mol/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/mol/rules/code-review-mr.md +1 -0
- package/presets/opencode/mol/rules/preset-layering.md +4 -4
- package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/mol/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/next/adapter-map.json +9 -1
- package/presets/opencode/next/agents/build-verifier.md +6 -1
- package/presets/opencode/next/agents/code-reviewer.md +1 -1
- package/presets/opencode/next/agents/debugger.md +1 -1
- package/presets/opencode/next/agents/feature-developer.md +1 -1
- package/presets/opencode/next/agents/task-analyst.md +1 -1
- package/presets/opencode/next/agents/task-router.md +2 -0
- package/presets/opencode/next/commands/README.md +1 -0
- package/presets/opencode/next/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/next/commands/task.md +4 -0
- package/presets/opencode/next/commands/ui-start.md +12 -4
- package/presets/opencode/next/commands/ui-stop.md +5 -2
- package/presets/opencode/next/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/next/rules/ai-local-overlay.md +2 -1
- package/presets/opencode/next/rules/code-review-mr.md +1 -0
- package/presets/opencode/next/rules/preset-layering.md +4 -4
- package/presets/opencode/next/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/next/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/nuxt/adapter-map.json +9 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +4 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
- package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
- package/presets/opencode/nuxt/agents/task-router.md +2 -0
- package/presets/opencode/nuxt/commands/README.md +1 -0
- package/presets/opencode/nuxt/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/nuxt/commands/task.md +4 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/nuxt/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/nuxt/rules/code-review-mr.md +1 -0
- package/presets/opencode/nuxt/rules/preset-layering.md +4 -4
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/nuxt/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/php-hexagonal/adapter-map.json +9 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-router.md +2 -0
- package/presets/opencode/php-hexagonal/commands/README.md +1 -0
- package/presets/opencode/php-hexagonal/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/php-hexagonal/commands/task.md +4 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +1 -0
- package/presets/opencode/php-hexagonal/rules/preset-layering.md +4 -4
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/php-laravel/adapter-map.json +9 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-laravel/agents/debugger.md +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/agents/task-router.md +2 -0
- package/presets/opencode/php-laravel/commands/README.md +1 -0
- package/presets/opencode/php-laravel/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/php-laravel/commands/task.md +4 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/php-laravel/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/php-laravel/rules/code-review-mr.md +1 -0
- package/presets/opencode/php-laravel/rules/preset-layering.md +4 -4
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/php-laravel/rules/preset-twin-sync.md +12 -5
- package/presets/opencode/plugins/task-status/README.md +15 -7
- package/presets/opencode/plugins/task-status/deepseek.ts +193 -0
- package/presets/opencode/plugins/task-status/details-data.ts +39 -2
- package/presets/opencode/plugins/task-status/prompt-text.ts +18 -8
- package/presets/opencode/plugins/task-status/task-view.ts +253 -63
- package/presets/opencode/plugins/task-status/tui.tsx +48 -11
- package/presets/opencode/svelte/adapter-map.json +9 -1
- package/presets/opencode/svelte/agents/build-verifier.md +4 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +1 -1
- package/presets/opencode/svelte/agents/task-analyst.md +1 -1
- package/presets/opencode/svelte/agents/task-router.md +2 -0
- package/presets/opencode/svelte/commands/README.md +1 -0
- package/presets/opencode/svelte/commands/rr-migrate-repositories.md +62 -0
- package/presets/opencode/svelte/commands/task.md +4 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +382 -27
- package/presets/opencode/svelte/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/svelte/rules/code-review-mr.md +1 -0
- package/presets/opencode/svelte/rules/preset-layering.md +4 -4
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -1
- package/presets/opencode/svelte/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/android-kotlin/adapter-map.json +9 -1
- package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
- package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/zcode/android-kotlin/agents/task-router.md +2 -0
- package/presets/zcode/android-kotlin/commands/README.md +1 -0
- package/presets/zcode/android-kotlin/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/android-kotlin/commands/task.md +4 -0
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/android-kotlin/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/android-kotlin/rules/code-review-mr.md +1 -0
- package/presets/zcode/android-kotlin/rules/preset-layering.md +4 -4
- package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/android-kotlin/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/go/adapter-map.json +9 -1
- package/presets/zcode/go/agents/build-verifier.md +1 -1
- package/presets/zcode/go/agents/code-reviewer.md +1 -1
- package/presets/zcode/go/agents/debugger.md +1 -1
- package/presets/zcode/go/agents/feature-developer.md +1 -1
- package/presets/zcode/go/agents/task-analyst.md +1 -1
- package/presets/zcode/go/agents/task-router.md +2 -0
- package/presets/zcode/go/commands/README.md +1 -0
- package/presets/zcode/go/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/go/commands/task.md +4 -0
- package/presets/zcode/go/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/go/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/go/rules/code-review-mr.md +1 -0
- package/presets/zcode/go/rules/preset-layering.md +4 -4
- package/presets/zcode/go/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/go/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/ios-swift/adapter-map.json +9 -1
- package/presets/zcode/ios-swift/agents/build-verifier.md +4 -1
- package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/zcode/ios-swift/agents/debugger.md +1 -1
- package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/zcode/ios-swift/agents/task-router.md +2 -0
- package/presets/zcode/ios-swift/commands/README.md +1 -0
- package/presets/zcode/ios-swift/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/ios-swift/commands/task.md +4 -0
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/ios-swift/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/ios-swift/rules/code-review-mr.md +1 -0
- package/presets/zcode/ios-swift/rules/preset-layering.md +4 -4
- package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/ios-swift/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/java/adapter-map.json +9 -1
- package/presets/zcode/java/agents/build-verifier.md +1 -1
- package/presets/zcode/java/agents/code-reviewer.md +1 -1
- package/presets/zcode/java/agents/debugger.md +1 -1
- package/presets/zcode/java/agents/feature-developer.md +1 -1
- package/presets/zcode/java/agents/task-analyst.md +1 -1
- package/presets/zcode/java/agents/task-router.md +2 -0
- package/presets/zcode/java/commands/README.md +1 -0
- package/presets/zcode/java/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/java/commands/task.md +4 -0
- package/presets/zcode/java/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/java/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/java/rules/code-review-mr.md +1 -0
- package/presets/zcode/java/rules/preset-layering.md +4 -4
- package/presets/zcode/java/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/java/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/mcp-ts/adapter-map.json +9 -1
- package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/zcode/mcp-ts/agents/task-router.md +2 -0
- package/presets/zcode/mcp-ts/commands/README.md +1 -0
- package/presets/zcode/mcp-ts/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/mcp-ts/commands/task.md +4 -0
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/mcp-ts/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/mcp-ts/rules/code-review-mr.md +1 -0
- package/presets/zcode/mcp-ts/rules/preset-layering.md +4 -4
- package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/mcp-ts/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/mol/adapter-map.json +9 -1
- package/presets/zcode/mol/agents/build-verifier.md +4 -1
- package/presets/zcode/mol/agents/code-reviewer.md +1 -1
- package/presets/zcode/mol/agents/debugger.md +1 -1
- package/presets/zcode/mol/agents/feature-developer.md +1 -1
- package/presets/zcode/mol/agents/task-analyst.md +1 -1
- package/presets/zcode/mol/agents/task-router.md +2 -0
- package/presets/zcode/mol/commands/README.md +1 -0
- package/presets/zcode/mol/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/mol/commands/task.md +4 -0
- package/presets/zcode/mol/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/mol/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/mol/rules/code-review-mr.md +1 -0
- package/presets/zcode/mol/rules/preset-layering.md +4 -4
- package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/mol/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/next/adapter-map.json +9 -1
- package/presets/zcode/next/agents/build-verifier.md +6 -1
- package/presets/zcode/next/agents/code-reviewer.md +1 -1
- package/presets/zcode/next/agents/debugger.md +1 -1
- package/presets/zcode/next/agents/feature-developer.md +1 -1
- package/presets/zcode/next/agents/task-analyst.md +1 -1
- package/presets/zcode/next/agents/task-router.md +2 -0
- package/presets/zcode/next/commands/README.md +1 -0
- package/presets/zcode/next/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/next/commands/task.md +4 -0
- package/presets/zcode/next/commands/ui-start.md +12 -4
- package/presets/zcode/next/commands/ui-stop.md +5 -2
- package/presets/zcode/next/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/next/rules/ai-local-overlay.md +2 -1
- package/presets/zcode/next/rules/code-review-mr.md +1 -0
- package/presets/zcode/next/rules/preset-layering.md +4 -4
- package/presets/zcode/next/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/next/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/nuxt/adapter-map.json +9 -1
- package/presets/zcode/nuxt/agents/build-verifier.md +4 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/zcode/nuxt/agents/debugger.md +1 -1
- package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
- package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
- package/presets/zcode/nuxt/agents/task-router.md +2 -0
- package/presets/zcode/nuxt/commands/README.md +1 -0
- package/presets/zcode/nuxt/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/nuxt/commands/task.md +4 -0
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/nuxt/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/nuxt/rules/code-review-mr.md +1 -0
- package/presets/zcode/nuxt/rules/preset-layering.md +4 -4
- package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/nuxt/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/php-hexagonal/adapter-map.json +9 -1
- package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/zcode/php-hexagonal/agents/task-router.md +2 -0
- package/presets/zcode/php-hexagonal/commands/README.md +1 -0
- package/presets/zcode/php-hexagonal/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/php-hexagonal/commands/task.md +4 -0
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/php-hexagonal/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/php-hexagonal/rules/code-review-mr.md +1 -0
- package/presets/zcode/php-hexagonal/rules/preset-layering.md +4 -4
- package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/php-hexagonal/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/php-laravel/adapter-map.json +9 -1
- package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-laravel/agents/debugger.md +1 -1
- package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/zcode/php-laravel/agents/task-router.md +2 -0
- package/presets/zcode/php-laravel/commands/README.md +1 -0
- package/presets/zcode/php-laravel/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/php-laravel/commands/task.md +4 -0
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/php-laravel/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/php-laravel/rules/code-review-mr.md +1 -0
- package/presets/zcode/php-laravel/rules/preset-layering.md +4 -4
- package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/php-laravel/rules/preset-twin-sync.md +12 -5
- package/presets/zcode/svelte/adapter-map.json +9 -1
- package/presets/zcode/svelte/agents/build-verifier.md +4 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
- package/presets/zcode/svelte/agents/debugger.md +1 -1
- package/presets/zcode/svelte/agents/feature-developer.md +1 -1
- package/presets/zcode/svelte/agents/task-analyst.md +1 -1
- package/presets/zcode/svelte/agents/task-router.md +2 -0
- package/presets/zcode/svelte/commands/README.md +1 -0
- package/presets/zcode/svelte/commands/rr-migrate-repositories.md +62 -0
- package/presets/zcode/svelte/commands/task.md +4 -0
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +382 -27
- package/presets/zcode/svelte/rules/ai-local-overlay.md +1 -1
- package/presets/zcode/svelte/rules/code-review-mr.md +1 -0
- package/presets/zcode/svelte/rules/preset-layering.md +4 -4
- package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -1
- package/presets/zcode/svelte/rules/preset-twin-sync.md +12 -5
|
@@ -54,7 +54,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
|
|
|
54
54
|
|
|
55
55
|
Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
56
56
|
|
|
57
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix
|
|
57
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | owner | due | followUp | evidence | signature |`; a row written on or after 2026-11-22 that stays `open`, `accepted`, or `deferred` needs an `owner` that is a person and not a placeholder plus a `due` as YYYY-MM-DD, `accepted` and `deferred` also need a `followUp` naming an existing task slug. A row is legacy — never failed, counted in `legacyRows` — when it has no usable `at`, which is the one date git cannot supply, or when its `at` is before that date; neither clause reads the header. The header only decides a dated row: a post-cutoff row under a stale header still fails, so move the table to the canonical header. After appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix what it rejects.
|
|
58
58
|
|
|
59
59
|
## Review artifact
|
|
60
60
|
|
|
@@ -97,7 +97,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
|
|
|
97
97
|
|
|
98
98
|
Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
99
99
|
|
|
100
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix
|
|
100
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | owner | due | followUp | evidence | signature |`; a row written on or after 2026-11-22 that stays `open`, `accepted`, or `deferred` needs an `owner` that is a person and not a placeholder plus a `due` as YYYY-MM-DD, `accepted` and `deferred` also need a `followUp` naming an existing task slug. A row is legacy — never failed, counted in `legacyRows` — when it has no usable `at`, which is the one date git cannot supply, or when its `at` is before that date; neither clause reads the header. The header only decides a dated row: a post-cutoff row under a stale header still fails, so move the table to the canonical header. After appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix what it rejects.
|
|
101
101
|
|
|
102
102
|
## MCP usage
|
|
103
103
|
|
|
@@ -104,7 +104,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
|
|
|
104
104
|
|
|
105
105
|
Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
106
106
|
|
|
107
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix
|
|
107
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | owner | due | followUp | evidence | signature |`; a row written on or after 2026-11-22 that stays `open`, `accepted`, or `deferred` needs an `owner` that is a person and not a placeholder plus a `due` as YYYY-MM-DD, `accepted` and `deferred` also need a `followUp` naming an existing task slug. A row is legacy — never failed, counted in `legacyRows` — when it has no usable `at`, which is the one date git cannot supply, or when its `at` is before that date; neither clause reads the header. The header only decides a dated row: a post-cutoff row under a stale header still fails, so move the table to the canonical header. After appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix what it rejects.
|
|
108
108
|
|
|
109
109
|
## Anti-hallucination (Svelte / SvelteKit / Svelte stores/runes)
|
|
110
110
|
|
|
@@ -66,7 +66,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
|
|
|
66
66
|
|
|
67
67
|
Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
68
68
|
|
|
69
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix
|
|
69
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | owner | due | followUp | evidence | signature |`; a row written on or after 2026-11-22 that stays `open`, `accepted`, or `deferred` needs an `owner` that is a person and not a placeholder plus a `due` as YYYY-MM-DD, `accepted` and `deferred` also need a `followUp` naming an existing task slug. A row is legacy — never failed, counted in `legacyRows` — when it has no usable `at`, which is the one date git cannot supply, or when its `at` is before that date; neither clause reads the header. The header only decides a dated row: a post-cutoff row under a stale header still fails, so move the table to the canonical header. After appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix what it rejects.
|
|
70
70
|
|
|
71
71
|
## Clarification cycle (must)
|
|
72
72
|
|
|
@@ -208,6 +208,8 @@ Do **not** add a dedicated `spec-author` agent for `docs/specs/**`. Do not requi
|
|
|
208
208
|
|
|
209
209
|
**specMode (optional `pipeline.json` field):** `none` for spike/research; `generate` for `spec-gen` / `/spec-start`; `consume` default when INDEX exists. Echo top-level `specMode`. Brief `## Spec mode` wins on conflict.
|
|
210
210
|
|
|
211
|
+
**repositories (mandatory `pipeline.json` field):** echo `"repositories": [<ids>]` and `"repositoriesInference": "evidence-paths" | "repo-scope-only" | "unknown" | "ambiguous"` immediately after `specMode`, before `summary`; the ids come from `.ai.local/team/repositories.json` and are never defaulted to the workspace repository. Then record the same list as link rows through `node .ai.local/scripts/team-db.mjs repositories apply --file -` — one `{"links": [{taskSlug, repositoryId, source: "intake", inference: "evidence-paths"}]}` envelope per touched repository (the verb takes the envelope, never a bare row). When the request names no repository, write `"repositories": []` with `"unknown"` and one `{"attributions": [{taskSlug, verdict: "unknown", evidence: ""}]}` envelope; `yarn check:task-repositories` fails a folder without the field.
|
|
212
|
+
|
|
211
213
|
Do **not** add a pipeline step for `spec-discovery`. Instruct analyst to load that skill only when the user/AC asks research-before-spec.
|
|
212
214
|
|
|
213
215
|
## Runtime initialization
|
|
@@ -11,6 +11,7 @@ Slash commands are copied to `.claude/commands/` on `ai-rules init claude --pres
|
|
|
11
11
|
| `/technical-retro [slug]` | Retro; with slug — “Agent work” block |
|
|
12
12
|
| `update.md` | Reinstall each installed tool with the preset recorded at init |
|
|
13
13
|
| `migrate-tasks.md` | Create or reconcile `.ai.local/team/team.db`; writes only the delta |
|
|
14
|
+
| `rr-migrate-repositories.md` | Scan repositories on disk, add the missing ones to the local registry, and project the file into `team.db` |
|
|
14
15
|
|
|
15
16
|
## `/task` examples
|
|
16
17
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rr-migrate-repositories
|
|
3
|
+
description: Scan repositories on disk, add the missing ones to the local registry, and project the file into team.db.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migrate repositories
|
|
7
|
+
|
|
8
|
+
Turn the repositories already cloned on this machine into registry records, then
|
|
9
|
+
sync the registry file into the team database.
|
|
10
|
+
|
|
11
|
+
## What to do
|
|
12
|
+
|
|
13
|
+
1. From the repository root, run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node .ai.local/scripts/rr-migrate-repositories.mjs
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. Report the summary in the user's native language, keeping the counters
|
|
20
|
+
verbatim: `scanned`, `repositories`, `duplicates`, `create`, `update`,
|
|
21
|
+
`unchanged`, `not-on-disk`, and the `project` line.
|
|
22
|
+
3. A `disabled by AI_RULES_TEAM_DB_DISABLE` line means the plan was computed and
|
|
23
|
+
nothing was written; exit 0 is the documented fallback. Relay it and stop.
|
|
24
|
+
4. Any non-zero exit: quote stderr and stop.
|
|
25
|
+
|
|
26
|
+
## Arguments
|
|
27
|
+
|
|
28
|
+
- `--scan <dir>` — directory to scan; repeatable. Default: the parent of the
|
|
29
|
+
repository root (the repository root itself when its parent is `$HOME`), so
|
|
30
|
+
sibling clones are picked up.
|
|
31
|
+
- `--depth <n>` — directory levels below a scan root (default `4`).
|
|
32
|
+
- `--dry-run` — print the plan and write nothing.
|
|
33
|
+
- `--no-update` — create missing records only; never touch an existing one.
|
|
34
|
+
- `--team-root <dir>` — team store root (default `<repo-root>/.ai.local/team`).
|
|
35
|
+
- `--json` — machine-readable summary.
|
|
36
|
+
|
|
37
|
+
## What the script does
|
|
38
|
+
|
|
39
|
+
- Walks the scan roots; a directory with `.git` is a repository and is not
|
|
40
|
+
descended into. Submodule checkouts and linked worktrees are skipped.
|
|
41
|
+
- Collapses clones that share one remote to the shallowest path.
|
|
42
|
+
- Keeps the id of a record whose locator already exists, so a re-run is
|
|
43
|
+
idempotent; a new id is the slug of the directory name, with a parent prefix
|
|
44
|
+
when that slug is taken.
|
|
45
|
+
- Creates missing records through `team-db.mjs repositories apply`, updates a
|
|
46
|
+
changed `name`, `locator`, or `status` through `repositories put`, then runs
|
|
47
|
+
`repositories project`. The lock-guarded verb is the only writer.
|
|
48
|
+
- Never deletes a record: a repository missing from this scan may simply live
|
|
49
|
+
outside the scanned roots.
|
|
50
|
+
|
|
51
|
+
`.ai.local/team/repositories.json` is local-only and git-ignored. The database is
|
|
52
|
+
derived: deleting `team.db` costs a rebuild, not the records.
|
|
53
|
+
|
|
54
|
+
## Do not
|
|
55
|
+
|
|
56
|
+
- Hand-edit `.ai.local/team/repositories.json`; the verb owns the write lock.
|
|
57
|
+
- Commit the registry file or `team.db*`.
|
|
58
|
+
- Delete registry records to make a scan look clean.
|
|
59
|
+
- Pass `--scan` a filesystem root without a matching `--depth`.
|
|
@@ -44,6 +44,10 @@ Examples:
|
|
|
44
44
|
6. **After each agent** — wait for hook handoff / reconciliation terminal receipt → `status.state`; do not start the next step until `status.json` reflects the handoff (or until there is a hook `followup_message`).
|
|
45
45
|
7. **Human gate** — if after the current step there is a gate in `humanGates` (`after:<agent>`), after the agent finishes **stop** and ask for `/task-continue <slug>`.
|
|
46
46
|
|
|
47
|
+
## Repositories (mandatory)
|
|
48
|
+
|
|
49
|
+
The repositories a task touches are part of its intake: `pipeline.json` must carry `"repositories": [<registry ids>]`, or `"repositories": []` together with `"repositoriesInference": "unknown"` when the request names none. The router reads `.ai.local/team/repositories.json` and records the same list as link rows; the field is never defaulted; `node .ai.local/scripts/check-task-repositories.mjs` audits the store and the chain hook blocks a task-router receipt that omits it. See `agents/task-router.md`.
|
|
50
|
+
|
|
47
51
|
## Plan contract
|
|
48
52
|
|
|
49
53
|
Intake runs the planning workflow before any implementation: **goal frame** (goal, user value, success + result-evaluation criteria) → **requirements + AC-IDs** → **information-sufficiency** verdict (`sufficient` | `insufficient`) → decompose with a **dependency graph** (`dependsOn[]`, DAG, critical path) and, for large flows, **epics / stages** with exit criteria. The plan is revisable: a **plan revision** is a named, recorded operation (`planRevision`), and progress is checkpointed to `.memlog.md` (with the optional `contextBudget` note) so a run can resume.
|
|
@@ -404,6 +404,50 @@ function artifactOutputIdFor(step, agent) {
|
|
|
404
404
|
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
405
405
|
return DEFAULT_ARTIFACT_OUTPUT_IDS[agent] || agent;
|
|
406
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* P0-3 (AC-5): `review-ledger.md` belongs to the step that owns the `review`
|
|
409
|
+
* artifact, so only that step's receipt runs the ledger gate. A verifier or an
|
|
410
|
+
* implementer reads the same file but may not write a reviewer's row, so gating
|
|
411
|
+
* them would stall a step with no repair path. `changes_requested` is gated with
|
|
412
|
+
* `completed`: that review is the one that usually introduces the rows.
|
|
413
|
+
*/
|
|
414
|
+
const LEDGER_GATE_OUTCOMES = new Set(['completed', 'changes_requested']);
|
|
415
|
+
function ownsReviewLedger(step, agent) {
|
|
416
|
+
if (agent === 'code-reviewer') return true;
|
|
417
|
+
return artifactOutputIdFor(step, agent) === 'review';
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* AC-4: the step's write-scope baseline is a fact the hook already has at
|
|
421
|
+
* activation, so it saves it there instead of leaving a repair nobody runs. A
|
|
422
|
+
* step with no `writeScopes` keeps the shipped `no-write-scopes` skip; a failed
|
|
423
|
+
* save is a note on stderr, never a failed receipt (a read-only step cannot fix
|
|
424
|
+
* its own audit input). The declared scopes are handed to the save as its seed,
|
|
425
|
+
* so a step armed on a clean tree still records the paths it may write — an
|
|
426
|
+
* `--allow-empty` baseline would satisfy the audit's exit code while attributing
|
|
427
|
+
* nothing. Create-once lives in `check-write-scope --save-baseline`: a re-save
|
|
428
|
+
* after the step wrote would erase its own attribution.
|
|
429
|
+
*/
|
|
430
|
+
function saveWriteScopeBaseline(step) {
|
|
431
|
+
const stepId = step && typeof step.id === 'string' && step.id !== '' ? step.id : null;
|
|
432
|
+
const scopes = declaredScopes(step);
|
|
433
|
+
if (!stepId || scopes.length === 0) return;
|
|
434
|
+
const root = process.cwd();
|
|
435
|
+
const script = path.join(root, '.ai.local', 'scripts', 'check-write-scope.mjs');
|
|
436
|
+
if (!fs.existsSync(script)) {
|
|
437
|
+
process.stderr.write(`[chain-team-phases] ${slug}: no .ai.local/scripts/check-write-scope.mjs; step ${stepId} keeps no write-scope baseline.\n`);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const { spawnSync } = require('child_process');
|
|
441
|
+
const result = spawnSync(
|
|
442
|
+
process.execPath,
|
|
443
|
+
[script, '--root', root, '--slug', slug, '--step', stepId, '--save-baseline', '--paths', scopes.join(',')],
|
|
444
|
+
{ cwd: root, encoding: 'utf8', timeout: 20000 },
|
|
445
|
+
);
|
|
446
|
+
if (result && result.status === 0) return;
|
|
447
|
+
const reason = String((result && (result.stderr || result.stdout)) || '')
|
|
448
|
+
.split('\n').map((line) => line.trim()).filter(Boolean)[0] || `exit ${result ? result.status : 'unknown'}`;
|
|
449
|
+
process.stderr.write(`[chain-team-phases] ${slug}: write-scope baseline for step ${stepId} not saved (${reason}); the audit will skip that step.\n`);
|
|
450
|
+
}
|
|
407
451
|
function activateAttempts(step, stepIndex, waveId = null, agentsOverride = null) {
|
|
408
452
|
const agents = Array.isArray(agentsOverride) && agentsOverride.length > 0 ? agentsOverride : getStepAgents(step);
|
|
409
453
|
const parallelGroupId = step.parallel && getStepAgents(step).length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
|
|
@@ -417,6 +461,7 @@ function activateAttempts(step, stepIndex, waveId = null, agentsOverride = null)
|
|
|
417
461
|
appendMetric({ type: 'attempt_started', at: now, attemptId, stepIndex, stepLabel: step.label || null, agent, role: roleFor(agent), attempt, parallelGroupId, waveId: waveId || null, source: 'hook', attributionConfidence: 'high' });
|
|
418
462
|
}
|
|
419
463
|
status.activeAttempts = active;
|
|
464
|
+
saveWriteScopeBaseline(step);
|
|
420
465
|
}
|
|
421
466
|
function resolvedAttempt() {
|
|
422
467
|
const active = status.activeAttempts || {}; const entries = Object.entries(active);
|
|
@@ -871,6 +916,76 @@ function productionWriteListError(entry) {
|
|
|
871
916
|
}
|
|
872
917
|
}
|
|
873
918
|
|
|
919
|
+
// A2b: a `build-verifier` completion is evidence only when it names the tree it
|
|
920
|
+
// ran on. The report header (`tree: <sha> (+N dirty)`, `run-at: <ISO>`) is
|
|
921
|
+
// compared with the worktree at receipt time through the existing
|
|
922
|
+
// `gitSnapshot()`. A zero-input row is data: only a `zeroInputAllowlist` entry
|
|
923
|
+
// with a reason admits it.
|
|
924
|
+
const REPORT_TREE_RE = /^tree:[ \t]*([0-9a-f]{7,40})[ \t]*\(\+([0-9]+) dirty\)[ \t]*$/m;
|
|
925
|
+
const REPORT_RUN_AT_RE = /^run-at:[ \t]*(\S+)[ \t]*$/m;
|
|
926
|
+
const ZERO_INPUT_ROW_RE = /^[ \t]*[-*][ \t]+`([^`]+)`:[ \t]*checked:[ \t]*0[ \t]*$/gm;
|
|
927
|
+
|
|
928
|
+
function zeroInputAllowlist() {
|
|
929
|
+
const file = path.join(process.cwd(), '.ai.local', 'pipeline-gates.json');
|
|
930
|
+
let parsed = null;
|
|
931
|
+
try { parsed = JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return []; }
|
|
932
|
+
const list = Array.isArray(parsed && parsed.zeroInputAllowlist) ? parsed.zeroInputAllowlist : [];
|
|
933
|
+
return list.filter((item) => item && typeof item.gate === 'string' && item.gate.trim() !== '' && typeof item.reason === 'string' && item.reason.trim() !== '');
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
function zeroInputGates(report) {
|
|
937
|
+
const gates = [];
|
|
938
|
+
ZERO_INPUT_ROW_RE.lastIndex = 0;
|
|
939
|
+
let match;
|
|
940
|
+
while ((match = ZERO_INPUT_ROW_RE.exec(report)) !== null) gates.push(match[1].trim());
|
|
941
|
+
return gates;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* The report a verifier receipt is bound to. On pipeline completion the hook
|
|
946
|
+
* archives the cited body and repoints `authoritativePaths` at
|
|
947
|
+
* `archive/<date>/validation-report.md`; a later reconcile of the same receipt
|
|
948
|
+
* must read the archived copy, not treat the report as missing.
|
|
949
|
+
*/
|
|
950
|
+
function verifierReportText(entry) {
|
|
951
|
+
try { return fs.readFileSync(path.join(taskDir, 'validation-report.md'), 'utf8'); } catch {}
|
|
952
|
+
const cited = Array.isArray(entry && entry.authoritativePaths) ? entry.authoritativePaths : [];
|
|
953
|
+
for (const value of cited) {
|
|
954
|
+
const relative = typeof value === 'string' ? value.trim().replace(/\\/g, '/') : '';
|
|
955
|
+
if (!/^archive\/\d{4}-\d{2}-\d{2}\/validation-report\.md$/.test(relative)) continue;
|
|
956
|
+
try { return fs.readFileSync(path.join(taskDir, relative), 'utf8'); } catch {}
|
|
957
|
+
}
|
|
958
|
+
return null;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
function validateVerifierEvidence(entry) {
|
|
962
|
+
if (!entry || entry.producer !== 'build-verifier') return null;
|
|
963
|
+
const artifactId = entry.id || '(unnamed)';
|
|
964
|
+
const repair = `re-run the named gate on the current tree, then resume with: /task-continue ${slug}`;
|
|
965
|
+
const report = verifierReportText(entry);
|
|
966
|
+
if (report === null) {
|
|
967
|
+
return `[chain-team-phases] ${slug}: receipt "${artifactId}" is a build-verifier completion but validation-report.md is missing. Write it with the "tree: <sha> (+N dirty)" and "run-at: <ISO>" header from the run you are claiming, then ${repair}`;
|
|
968
|
+
}
|
|
969
|
+
const tree = report.match(REPORT_TREE_RE);
|
|
970
|
+
const runAt = report.match(REPORT_RUN_AT_RE);
|
|
971
|
+
if (!tree || !runAt || !Number.isFinite(Date.parse(runAt[1]))) {
|
|
972
|
+
return `[chain-team-phases] ${slug}: receipt "${artifactId}" has a validation-report.md without the required "tree: <sha> (+N dirty)" and "run-at: <ISO>" header lines. Nothing may follow the closing ")" on the tree line — put clarifications under "## Notes". Add the lines from the run you are claiming, then ${repair}`;
|
|
973
|
+
}
|
|
974
|
+
const snapshot = gitSnapshot();
|
|
975
|
+
if (snapshot && !snapshot.head.startsWith(tree[1])) {
|
|
976
|
+
return `[chain-team-phases] ${slug}: receipt "${artifactId}" names tree ${tree[1]} but HEAD is ${snapshot.head.slice(0, 12)}. The gate ran on another revision: ${repair}`;
|
|
977
|
+
}
|
|
978
|
+
if (snapshot && Number(tree[2]) !== snapshot.dirtyFiles) {
|
|
979
|
+
return `[chain-team-phases] ${slug}: receipt "${artifactId}" names (+${tree[2]} dirty) but the worktree carries ${snapshot.dirtyFiles} changed paths. ${repair}`;
|
|
980
|
+
}
|
|
981
|
+
const allowlist = zeroInputAllowlist();
|
|
982
|
+
const blocked = zeroInputGates(report).filter((gate) => !allowlist.some((item) => item.gate === gate));
|
|
983
|
+
if (blocked.length > 0) {
|
|
984
|
+
return `[chain-team-phases] ${slug}: receipt "${artifactId}" reports gate "${blocked[0]}" as checked: 0 without a zeroInputAllowlist entry. List it under zeroInputAllowlist in .ai.local/pipeline-gates.json with a reason, or fix the selection. Then ${repair}`;
|
|
985
|
+
}
|
|
986
|
+
return null;
|
|
987
|
+
}
|
|
988
|
+
|
|
874
989
|
// A2: a `completed` receipt must cite evidence the harness can inspect. Order is
|
|
875
990
|
// the message order — the first failing predicate wins, so the operator sees one
|
|
876
991
|
// actionable line. `authoritativePaths[]` stays task-dir-relative; external
|
|
@@ -910,9 +1025,91 @@ function validateCompletedArtifact(entry) {
|
|
|
910
1025
|
}
|
|
911
1026
|
const productionListError = productionWriteListError(entry);
|
|
912
1027
|
if (productionListError) return productionListError;
|
|
1028
|
+
const evidenceError = validateVerifierEvidence(entry);
|
|
1029
|
+
if (evidenceError) return evidenceError;
|
|
1030
|
+
return null;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// P0-3: the reviewer's receipt is the moment the ledger is read, so an
|
|
1034
|
+
// `open`/`accepted`/`deferred` row without an owner or a due date stops there.
|
|
1035
|
+
// The shipped `ledger-check` owns the message text; this seam relays
|
|
1036
|
+
// `failures[].reason` verbatim and holds no copy of its own. A missing script,
|
|
1037
|
+
// a task without a ledger, a timeout, or a child that returns no reason is a
|
|
1038
|
+
// skip — the gate never fails a receipt on its own, but a skip is never silent.
|
|
1039
|
+
function ledgerGateSkip(reason, repair) {
|
|
1040
|
+
process.stderr.write(`[chain-team-phases] ${slug}: ledger gate skipped — ${reason}; ${repair}\n`);
|
|
913
1041
|
return null;
|
|
914
1042
|
}
|
|
915
1043
|
|
|
1044
|
+
function ledgerCheckStall() {
|
|
1045
|
+
const runByHand = `run it by hand: node .ai.local/scripts/team-db.mjs ledger-check --slug ${slug}`;
|
|
1046
|
+
try {
|
|
1047
|
+
const script = path.join(process.cwd(), '.ai.local', 'scripts', 'team-db.mjs');
|
|
1048
|
+
if (!fs.existsSync(script)) {
|
|
1049
|
+
return ledgerGateSkip(
|
|
1050
|
+
'.ai.local/scripts/team-db.mjs is not installed',
|
|
1051
|
+
'run "npx @bonesofspring/ai-rules init update" (preset repo: "yarn fix:generated") so the shipped ledger-check lands',
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
if (!fs.existsSync(path.join(taskDir, 'review-ledger.md'))) {
|
|
1055
|
+
return ledgerGateSkip(
|
|
1056
|
+
`the task has no review-ledger.md at .ai.local/team/tasks/${slug}/review-ledger.md`,
|
|
1057
|
+
'write the canonical table when you owe rows, or ignore this line if the task produced none',
|
|
1058
|
+
);
|
|
1059
|
+
}
|
|
1060
|
+
const { spawnSync } = require('child_process');
|
|
1061
|
+
const result = spawnSync(
|
|
1062
|
+
process.execPath,
|
|
1063
|
+
['.ai.local/scripts/team-db.mjs', 'ledger-check', '--json', '--slug', slug],
|
|
1064
|
+
{ cwd: process.cwd(), encoding: 'utf8', timeout: 5000, killSignal: 'SIGKILL', stdio: ['ignore', 'pipe', 'pipe'] },
|
|
1065
|
+
);
|
|
1066
|
+
if (result.error) {
|
|
1067
|
+
return ledgerGateSkip(
|
|
1068
|
+
`ledger-check could not start (${result.error.message})`,
|
|
1069
|
+
`check that Node can run .ai.local/scripts/team-db.mjs, then ${runByHand}`,
|
|
1070
|
+
);
|
|
1071
|
+
}
|
|
1072
|
+
if (result.status === 0) return null;
|
|
1073
|
+
if (result.status === null && result.signal) {
|
|
1074
|
+
return ledgerGateSkip(
|
|
1075
|
+
`ledger-check was killed by ${result.signal} after the 5000 ms budget`,
|
|
1076
|
+
`check the ledger by hand, then ${runByHand}`,
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
let reasons = [];
|
|
1080
|
+
try {
|
|
1081
|
+
const payload = JSON.parse(String(result.stdout || '').trim() || '{}');
|
|
1082
|
+
const failures = Array.isArray(payload.failures) ? payload.failures : [];
|
|
1083
|
+
reasons = failures
|
|
1084
|
+
.map((failure) => (failure && typeof failure.reason === 'string' ? failure.reason.trim() : ''))
|
|
1085
|
+
.filter(Boolean);
|
|
1086
|
+
} catch {
|
|
1087
|
+
reasons = [];
|
|
1088
|
+
}
|
|
1089
|
+
if (reasons.length === 0) {
|
|
1090
|
+
// No machine-readable reason: relay the child's own first stderr line
|
|
1091
|
+
// rather than invent one. A child that says nothing is a documented skip.
|
|
1092
|
+
const raw = String(result.stderr || '')
|
|
1093
|
+
.split('\n')
|
|
1094
|
+
.map((line) => line.trim())
|
|
1095
|
+
.filter(Boolean)[0];
|
|
1096
|
+
if (!raw) {
|
|
1097
|
+
return ledgerGateSkip(
|
|
1098
|
+
`ledger-check exited ${result.status} with no reason on stdout or stderr`,
|
|
1099
|
+
runByHand,
|
|
1100
|
+
);
|
|
1101
|
+
}
|
|
1102
|
+
return `[chain-team-phases] ${slug}: review-ledger.md fails ledger-check: ${raw}. Then resume with: /task-continue ${slug}`;
|
|
1103
|
+
}
|
|
1104
|
+
return `[chain-team-phases] ${slug}: review-ledger.md fails ledger-check — ${reasons.join(' | ')}. Fix the rows, then resume with: /task-continue ${slug}`;
|
|
1105
|
+
} catch (error) {
|
|
1106
|
+
return ledgerGateSkip(
|
|
1107
|
+
`the gate itself threw (${error && error.message ? error.message : String(error)})`,
|
|
1108
|
+
runByHand,
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
916
1113
|
function readBoundReceiptOutcome(agent, step, resolved) {
|
|
917
1114
|
if (!agent || !resolved) return { outcome: null, receiptRequired: false };
|
|
918
1115
|
const manifestPath = path.join(taskDir, 'artifact-manifest.json');
|
|
@@ -987,6 +1184,10 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
987
1184
|
const stallMessage = validateCompletedArtifact(owned[0]);
|
|
988
1185
|
if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
|
|
989
1186
|
}
|
|
1187
|
+
if (LEDGER_GATE_OUTCOMES.has(outcome) && ownsReviewLedger(step, agent)) {
|
|
1188
|
+
const ledgerStallMessage = ledgerCheckStall();
|
|
1189
|
+
if (ledgerStallMessage) return { outcome: null, receiptRequired: true, stallMessage: ledgerStallMessage };
|
|
1190
|
+
}
|
|
990
1191
|
return { outcome, receiptRequired: true };
|
|
991
1192
|
} catch {
|
|
992
1193
|
return { outcome: null, receiptRequired: false };
|
|
@@ -1062,33 +1263,89 @@ function gitSnapshot() {
|
|
|
1062
1263
|
}
|
|
1063
1264
|
|
|
1064
1265
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
*
|
|
1266
|
+
* The report the gate reads: the live body, else the newest archived copy. The
|
|
1267
|
+
* manifest close archives `validation-report.md` under `archive/<date>/`, so a
|
|
1268
|
+
* refresh that read the task root alone would erase the hash the gate still
|
|
1269
|
+
* accepts and hand every later freshness check back to `worktreeHash`.
|
|
1270
|
+
*/
|
|
1271
|
+
function evidenceReportText(dir) {
|
|
1272
|
+
try {
|
|
1273
|
+
return { path: 'validation-report.md', text: fs.readFileSync(path.join(dir, 'validation-report.md'), 'utf8') };
|
|
1274
|
+
} catch {}
|
|
1275
|
+
let dates = [];
|
|
1276
|
+
try { dates = fs.readdirSync(path.join(dir, 'archive')).filter((name) => /^\d{4}-\d{2}-\d{2}$/.test(name)).sort(); } catch { return null; }
|
|
1277
|
+
for (let index = dates.length - 1; index >= 0; index -= 1) {
|
|
1278
|
+
const relative = 'archive/' + dates[index] + '/validation-report.md';
|
|
1279
|
+
try { return { path: relative, text: fs.readFileSync(path.join(dir, relative), 'utf8') }; } catch {}
|
|
1280
|
+
}
|
|
1281
|
+
return null;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* `verification.mjs` takes `${file}.lock` for this file; the hook's
|
|
1286
|
+
* read-modify-write takes the same one, so a concurrent `record` append is not
|
|
1287
|
+
* dropped by the refresh. A lock that cannot be taken is a note, never a failed
|
|
1288
|
+
* receipt.
|
|
1289
|
+
*/
|
|
1290
|
+
function withVerificationLock(file, run) {
|
|
1291
|
+
const lockPath = file + '.lock';
|
|
1292
|
+
let held = false;
|
|
1293
|
+
for (let attempt = 0; attempt < 200 && !held; attempt += 1) {
|
|
1294
|
+
try {
|
|
1295
|
+
const fd = fs.openSync(lockPath, 'wx');
|
|
1296
|
+
fs.writeSync(fd, `${process.pid}:${Date.now()}`);
|
|
1297
|
+
fs.closeSync(fd);
|
|
1298
|
+
held = true;
|
|
1299
|
+
} catch (error) {
|
|
1300
|
+
if (error && error.code !== 'EEXIST') return run();
|
|
1301
|
+
let stale = false;
|
|
1302
|
+
try { stale = Date.now() - fs.statSync(lockPath).mtimeMs > 30000; } catch {}
|
|
1303
|
+
if (!stale) break;
|
|
1304
|
+
try { fs.unlinkSync(lockPath); } catch {}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
if (!held) process.stderr.write(`[chain-team-phases] ${slug}: verification.json is locked by another writer; refreshing without the lock.\n`);
|
|
1308
|
+
try {
|
|
1309
|
+
return run();
|
|
1310
|
+
} finally {
|
|
1311
|
+
if (held) { try { fs.unlinkSync(lockPath); } catch {} }
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Bind the evidence file to the tree the verifier's commands actually ran on.
|
|
1317
|
+
* Every verifier receipt refreshes it: a retried verifier must not inherit the
|
|
1318
|
+
* attempt-1 tree, because the report gate reads the current one. What the
|
|
1319
|
+
* verifier recorded (`commands[]`, the gate status) is kept — the hook owns the
|
|
1320
|
+
* tree, the verifier owns what ran.
|
|
1069
1321
|
*/
|
|
1070
1322
|
function ensureVerificationSnapshot(dir, agent) {
|
|
1071
|
-
const file = path.join(dir, 'verification.json');
|
|
1072
|
-
if (fs.existsSync(file)) return;
|
|
1073
1323
|
const snapshot = gitSnapshot();
|
|
1074
1324
|
if (!snapshot) return;
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1325
|
+
const file = path.join(dir, 'verification.json');
|
|
1326
|
+
const found = evidenceReportText(dir);
|
|
1327
|
+
const report = found === null ? null : { path: found.path, sha256: crypto.createHash('sha256').update(found.text).digest('hex') };
|
|
1328
|
+
withVerificationLock(file, () => {
|
|
1329
|
+
let previous = null;
|
|
1330
|
+
try { previous = JSON.parse(fs.readFileSync(file, 'utf8')); } catch {}
|
|
1331
|
+
const previousGate = previous && previous.gate && typeof previous.gate === 'object' ? previous.gate : {};
|
|
1332
|
+
const verification = {
|
|
1333
|
+
schemaVersion: 1,
|
|
1334
|
+
task: path.basename(dir),
|
|
1335
|
+
snapshot,
|
|
1336
|
+
report,
|
|
1337
|
+
commands: previous && Array.isArray(previous.commands) ? previous.commands : [],
|
|
1338
|
+
gate: {
|
|
1339
|
+
...previousGate,
|
|
1340
|
+
status: typeof previousGate.status === 'string' ? previousGate.status : 'snapshot-only',
|
|
1341
|
+
recordedBy: agent || previousGate.recordedBy || null,
|
|
1342
|
+
checkedAt: now,
|
|
1343
|
+
},
|
|
1344
|
+
};
|
|
1345
|
+
const temporary = `${file}.${process.pid}.tmp`;
|
|
1346
|
+
fs.writeFileSync(temporary, JSON.stringify(verification, null, 2) + '\n');
|
|
1347
|
+
fs.renameSync(temporary, file);
|
|
1348
|
+
});
|
|
1092
1349
|
appendMetric({ type: 'verification_recorded', at: now, kind: 'snapshot-only', agent: agent || null, head: snapshot.head, worktreeHash: snapshot.worktreeHash, source: 'hook', attributionConfidence: 'high' });
|
|
1093
1350
|
}
|
|
1094
1351
|
|
|
@@ -1101,9 +1358,19 @@ function verificationFreshness(dir) {
|
|
|
1101
1358
|
if (!snapshot || typeof snapshot.head !== 'string') return { present: true, fresh: false, reasons: ['no-snapshot'] };
|
|
1102
1359
|
const current = gitSnapshot();
|
|
1103
1360
|
if (!current) return { present: true, fresh: false, reasons: ['no-git'] };
|
|
1361
|
+
// Judge the report the gate judges: its `tree:` header, not the wider worktree
|
|
1362
|
+
// hash. A later edit inside the same report generation moved the hash while the
|
|
1363
|
+
// gate still accepted the report, so the same fresh evidence warned twice.
|
|
1364
|
+
const found = evidenceReportText(dir);
|
|
1365
|
+
const header = found === null ? null : found.text.match(REPORT_TREE_RE);
|
|
1104
1366
|
const reasons = [];
|
|
1105
|
-
if (
|
|
1106
|
-
|
|
1367
|
+
if (header) {
|
|
1368
|
+
if (!current.head.startsWith(header[1])) reasons.push('head-changed');
|
|
1369
|
+
if (Number(header[2]) !== current.dirtyFiles) reasons.push('worktree-changed');
|
|
1370
|
+
} else {
|
|
1371
|
+
if (current.head !== snapshot.head) reasons.push('head-changed');
|
|
1372
|
+
if (current.worktreeHash !== snapshot.worktreeHash) reasons.push('worktree-changed');
|
|
1373
|
+
}
|
|
1107
1374
|
return { present: true, fresh: reasons.length === 0, reasons };
|
|
1108
1375
|
}
|
|
1109
1376
|
|
|
@@ -2389,6 +2656,15 @@ if (hookInput.action === 'bootstrap') {
|
|
|
2389
2656
|
}
|
|
2390
2657
|
const first = firstResolved.step;
|
|
2391
2658
|
const firstAgents = getStepAgents(first);
|
|
2659
|
+
// A handoff that names no agent cannot name an owned output id either: the
|
|
2660
|
+
// producer would receive `undefined` as its artifact id and stall on a receipt
|
|
2661
|
+
// the hook never accepts. Refuse before anything is armed or written.
|
|
2662
|
+
if (firstAgents.length === 0 || firstAgents.some((agent) => typeof agent !== 'string' || agent.trim() === '')) {
|
|
2663
|
+
const reason = `bootstrap cannot hand over step ${firstResolved.index} ("${first.id || 'step-' + firstResolved.index}"): it declares no resolvable agent, so the owned output id is undefined. Declare steps[].agent (or steps[].artifactOutputId) in pipeline.json with the task-router, then re-run bootstrap.`;
|
|
2664
|
+
process.stderr.write(`[chain-team-phases] ${slug}: ${reason}\n`);
|
|
2665
|
+
process.stdout.write(JSON.stringify({ ok: false, action: 'bootstrap', pipelineIndex: firstResolved.index, reason }));
|
|
2666
|
+
process.exit(0);
|
|
2667
|
+
}
|
|
2392
2668
|
let metrics = null;
|
|
2393
2669
|
try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {}
|
|
2394
2670
|
const hasAttempt = Boolean(
|
|
@@ -2414,7 +2690,18 @@ if (hookInput.action === 'bootstrap') {
|
|
|
2414
2690
|
awaitingHumanGate: false,
|
|
2415
2691
|
});
|
|
2416
2692
|
process.stdout.write(
|
|
2417
|
-
JSON.stringify({
|
|
2693
|
+
JSON.stringify({
|
|
2694
|
+
ok: true,
|
|
2695
|
+
action: 'bootstrap',
|
|
2696
|
+
pipelineIndex: firstResolved.index,
|
|
2697
|
+
agents: firstAgents,
|
|
2698
|
+
attemptStarted: !hasAttempt,
|
|
2699
|
+
// Same builder as the advance path: the producer must learn the id and the
|
|
2700
|
+
// attemptId from the hook, not reconstruct them (AC-1). A parallel step has
|
|
2701
|
+
// one attempt per agent, so the single-agent builder would hand the second
|
|
2702
|
+
// producer nothing to act on.
|
|
2703
|
+
followup_message: first.parallel && firstAgents.length > 1 ? handoffForParallelStep(first) : handoffForAgent(firstAgents[0], first.scope, first),
|
|
2704
|
+
}),
|
|
2418
2705
|
);
|
|
2419
2706
|
process.exit(0);
|
|
2420
2707
|
}
|
|
@@ -2666,6 +2953,10 @@ if (status.state === 'awaiting_artifact_receipt') {
|
|
|
2666
2953
|
emitArtifactStall(artifactStallMessage, !wasWaitingForReceipt);
|
|
2667
2954
|
process.exit(0);
|
|
2668
2955
|
}
|
|
2956
|
+
// Snapshot before `finishActiveAttempt` writes `lastCompletedAttempt`: the
|
|
2957
|
+
// repositories intake gate judges a task at its first receipt, so a folder whose
|
|
2958
|
+
// first step already completed is never re-judged.
|
|
2959
|
+
const hadPriorCompletion = Boolean(status.lastCompletedAttempt);
|
|
2669
2960
|
let finishedAttempt = finishActiveAttempt();
|
|
2670
2961
|
// The just-finished attempt's metric is already written; a pause now blocks
|
|
2671
2962
|
// every handoff, including the unattributable-stop repair path below.
|
|
@@ -2693,7 +2984,7 @@ if (!finishedAttempt && activeAttemptCountBeforeFinish > 0) {
|
|
|
2693
2984
|
}
|
|
2694
2985
|
}
|
|
2695
2986
|
endHumanGateIfResumed();
|
|
2696
|
-
if (steps.length === 0
|
|
2987
|
+
if (steps.length === 0) {
|
|
2697
2988
|
writeStatus({});
|
|
2698
2989
|
process.stdout.write('{}');
|
|
2699
2990
|
process.exit(0);
|
|
@@ -2740,6 +3031,70 @@ const waveIndexes = activeWave
|
|
|
2740
3031
|
? [idx]
|
|
2741
3032
|
: (isGraphMode() && finishedAttempt ? [completedStepIndex] : null));
|
|
2742
3033
|
|
|
3034
|
+
/**
|
|
3035
|
+
* Intake invariant: a task records which repositories it touches — or says that
|
|
3036
|
+
* it does not know. Judged on the first receipt of a task: the router's, or the
|
|
3037
|
+
* first step's when a pipeline runs without one. A task that already completed a
|
|
3038
|
+
* step predates the invariant and is never re-judged.
|
|
3039
|
+
* `intakeExemption: { approvedBy, reason, at }` is the recorded escape hatch; a
|
|
3040
|
+
* bare boolean does not count, so an exemption always names who approved it. The
|
|
3041
|
+
* shape mirrors `check-task-repositories.mjs`, which audits the same field after
|
|
3042
|
+
* the fact.
|
|
3043
|
+
*/
|
|
3044
|
+
const REPOSITORY_INFERENCES = new Set(['evidence-paths', 'repo-scope-only', 'unknown', 'ambiguous']);
|
|
3045
|
+
const EXEMPTION_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
3046
|
+
function repositoriesIntakeViolation(record) {
|
|
3047
|
+
if (!record) return 'has no `repositories` array';
|
|
3048
|
+
const ids = record.repositories;
|
|
3049
|
+
const inference = record.repositoriesInference;
|
|
3050
|
+
if (!Array.isArray(ids)) return 'carries no `repositories` array';
|
|
3051
|
+
if (ids.some((id) => typeof id !== 'string' || id.trim() === '')) return 'carries a `repositories` entry that is not a non-empty registry id';
|
|
3052
|
+
if (ids.length === 0) {
|
|
3053
|
+
return inference === 'unknown' ? null : 'carries `repositories: []` without `"repositoriesInference": "unknown"`';
|
|
3054
|
+
}
|
|
3055
|
+
if (inference !== undefined && !REPOSITORY_INFERENCES.has(inference)) return `carries an unknown \`repositoriesInference\` value "${inference}"`;
|
|
3056
|
+
if (inference === 'unknown') return 'lists repositories beside `"repositoriesInference": "unknown"`';
|
|
3057
|
+
let known = null;
|
|
3058
|
+
try {
|
|
3059
|
+
const registry = JSON.parse(fs.readFileSync(path.join(TEAM_ROOT, 'repositories.json'), 'utf8'));
|
|
3060
|
+
known = new Set((Array.isArray(registry.repositories) ? registry.repositories : []).map((row) => row && row.id).filter((id) => typeof id === 'string'));
|
|
3061
|
+
} catch { known = null; }
|
|
3062
|
+
if (known && known.size > 0) {
|
|
3063
|
+
const unknownIds = ids.filter((id) => !known.has(id));
|
|
3064
|
+
if (unknownIds.length > 0) return `names ${unknownIds.join(', ')} — not in .ai.local/team/repositories.json`;
|
|
3065
|
+
}
|
|
3066
|
+
return null;
|
|
3067
|
+
}
|
|
3068
|
+
function repositoriesIntakeExemption(record) {
|
|
3069
|
+
const entry = record && record.intakeExemption;
|
|
3070
|
+
if (!entry || typeof entry !== 'object') return null;
|
|
3071
|
+
const approvedBy = typeof entry.approvedBy === 'string' ? entry.approvedBy.trim() : '';
|
|
3072
|
+
const reason = typeof entry.reason === 'string' ? entry.reason.trim() : '';
|
|
3073
|
+
const at = typeof entry.at === 'string' ? entry.at.trim() : '';
|
|
3074
|
+
if (approvedBy === '' || reason.length < 10 || !EXEMPTION_DATE.test(at)) return null;
|
|
3075
|
+
return { approvedBy, reason, at };
|
|
3076
|
+
}
|
|
3077
|
+
const repositoriesGateApplies = Boolean(finishedAttempt)
|
|
3078
|
+
&& (completedAgent === 'task-router' || (!hadPriorCompletion && completedStepIndex === 0));
|
|
3079
|
+
if (repositoriesGateApplies) {
|
|
3080
|
+
const violation = repositoriesIntakeViolation(pipeline);
|
|
3081
|
+
if (violation) {
|
|
3082
|
+
const exemption = repositoriesIntakeExemption(pipeline);
|
|
3083
|
+
if (!exemption) {
|
|
3084
|
+
appendMetric({ type: 'intake_repositories_blocked', at: now, stepIndex: completedStepIndex, agent: completedAgent, violation, source: 'hook', attributionConfidence: 'high' });
|
|
3085
|
+
writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: 'task-router' });
|
|
3086
|
+
out(`pipeline.json for "${slug}" ${violation}. Intake stays open until the repositories are recorded: set "repositories" to the ids in .ai.local/team/repositories.json with "repositoriesInference": "evidence-paths" (or "repo-scope-only"), or "repositories": [] with "repositoriesInference": "unknown" when the request names none. Rewrite pipeline.json through the task-router, then resume via /task-continue ${slug}. A task that predates the invariant carries "intakeExemption": { "approvedBy": "<human>", "reason": "<why, 10+ characters>", "at": "YYYY-MM-DD" } — a bare boolean is not accepted.`);
|
|
3087
|
+
process.exit(0);
|
|
3088
|
+
}
|
|
3089
|
+
appendMetric({ type: 'intake_repositories_exempted', at: now, stepIndex: completedStepIndex, agent: completedAgent, violation, approvedBy: exemption.approvedBy, reason: exemption.reason, exemptedAt: exemption.at, source: 'hook', attributionConfidence: 'high' });
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
if (pipeline.autoChain === false) {
|
|
3093
|
+
writeStatus({});
|
|
3094
|
+
process.stdout.write('{}');
|
|
3095
|
+
process.exit(0);
|
|
3096
|
+
}
|
|
3097
|
+
|
|
2743
3098
|
|
|
2744
3099
|
if (waveIndexes) {
|
|
2745
3100
|
const waveAgents = waveIndexes.flatMap((i) => getStepAgents(steps[i]));
|