@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
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,88 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.80
|
|
4
|
+
|
|
5
|
+
### `opencode` — the task sidebar shows the session's own task
|
|
6
|
+
|
|
7
|
+
- **Match anchor.** The sidebar no longer matches by any user message: the index is `prompt.md` only (a `prompt-log.md` holds confirmations, not prompts) and the match anchors on the session's opening prompt. A later `делай` / `продолжай` / `подтверждаю` cannot map a tab to a newer task, and a confirmation-only session resolves to `no task`.
|
|
8
|
+
- **Tiers and binding.** An exact prompt match wins; the fallback substring tier is 40 characters and ignores confirmation words. A `/task-continue <slug>` resolves case-insensitively and an unknown slug falls back to the prompt match instead of hiding the task. The first successful mapping is pinned for the session, so a new message cannot flip the tab; only another explicit `/task-continue` re-binds it.
|
|
9
|
+
- **Prompt parser.** `prompt-text.ts` reads the legacy `# Original prompt` heading, list-style meta lines (`- source: ...`), a bare body, and fences, so `prompt.md` variants match exactly and the details excerpt no longer includes the meta block.
|
|
10
|
+
- **Resume authority.** A resume word clears only the pinned task's `STOP`; a repository-wide `.ai.local/STOP` needs an explicit `/task-continue <slug>`. A text match no longer carries that authority.
|
|
11
|
+
- **Tick cost.** The economy block parses only the appended bytes of `output-guard/results*.jsonl` and memoizes its totals (a 10 MB ledger cost ~44 ms per second before); the details dialog reuses its ETA index and its build until a task file changes; the prompt index no longer re-reads `prompt-log.md`.
|
|
12
|
+
- **Robustness.** A throw inside the tick keeps the last view instead of freezing it, an unreadable sentinel is absent rather than a phantom pause, a stale slot input stops following a closed tab, and parallel waves display the highest active step.
|
|
13
|
+
- **Fixtures.** `test-task-status-view` grows from 18 to 27 cases: confirmation words, prompt-log noise, the legacy prompt format, case-insensitive and unknown `/task-continue`, the pinned binding, the `/task` prefix, a re-used session, and details reuse. The `cli-golden` opencode fixtures carry the new plugin hashes.
|
|
14
|
+
|
|
15
|
+
## 0.2.79
|
|
16
|
+
|
|
17
|
+
### `engine` — a repository registry with task links and honest verdicts
|
|
18
|
+
|
|
19
|
+
- **File of record.** `.ai.local/team/repositories.json` holds `{ version, repositories[], links[], attributions[] }`, local-only and git-ignored, deterministically serialized (declared key order, records by `id`, links by `(taskSlug, repositoryId)`, attributions by `taskSlug`); an unchanged rewrite performs no write. An absent file is a valid empty store, so `init` seeds nothing. `/rr-migrate-repositories` scans the clones on disk (default: the parent of the repository root), creates the missing records, updates a changed name/locator/status with the stored revision, and projects the file, so a new machine is one command away.
|
|
20
|
+
- **One lock-guarded verb.** `team-db.mjs repositories apply|put|delete|list|project` holds `.repositories.lock` across the read-modify-write-projection, writes the file by temp file plus rename, then projects the touched rows; a projection throw is caught, logged once, and still answers `ok: true`. Record-level `revision` is the CAS token — a stale or missing one is `409 E_CONFLICT` — and `delete` on a linked record answers `409 E_REPOSITORY_IN_USE` with `linkedTasks`, while `--force` removes the record and its links in the same write.
|
|
21
|
+
- **Migrations `0009-repositories` and `0010-repository-attributions`.** `repositories` + `task_repositories` (`PRIMARY KEY (task_slug, repository_id)`, `ON DELETE CASCADE`, no foreign key on `task_slug`) and `task_repository_attributions` (the verdict only); schema v10, applied from v0 and from a v8 store, links and verdicts replaced together in one transaction.
|
|
22
|
+
- **Five operations over two paths.** `GET|POST /api/v1/repositories` and `GET|PUT|DELETE /api/v1/repositories/{id}`, the write body carrying its own required `id` (a duplicate is 409, a `PUT` body id that differs from the path is 409), plus `?repository=<id>` on the task list and a required `repositories`/`repositoriesInference` pair on the task detail where links outrank the attribution. Five contract counters move together (53 operations, 42 paths, 84 schemas, 53 served routes, 17 mutating routes).
|
|
23
|
+
- **Intake.** `/task` records `repositories` in `pipeline.json` — the array is mandatory — and an empty array is legal only beside `repositoriesInference: "unknown"`, which a non-empty list refuses. The field reaches all 55 preset carriers and the five host trees, and the router never defaults it. The chain hook gates the first receipt of every task — the router's, or the first step's when a pipeline runs without one, graph mode included: no `repositories` array, `[]` without `"unknown"`, `"unknown"` beside a non-empty list, an `repositoriesInference` outside the four verdicts, or an id the registry lacks answers `state: blocked` with the repair text, and the task does not advance. A task that already completed a step is never re-judged; `intakeExemption: { approvedBy, reason, at }` is the only escape hatch — a bare boolean is refused, and every exemption leaves an `intake_repositories_exempted` metric naming its approver. `check-task-repositories.mjs` ships to `<repo>/.ai.local/scripts/` and audits the store after the fact (a folder that omits the field, names an id the registry lacks, or disagrees with its `links[]`), dating the pre-invariant era from `2026-11-22`.
|
|
24
|
+
- **Backfill.** `backfill-repositories.mjs` (dry-run default, idempotent) walks the 227 folders that predate the field down the evidence ladder — 150 `evidence-paths`, 4 `repo-scope-only`, 68 `unknown`, 5 `ambiguous` — and prints each row's rung and evidence, an ambiguous row quoting the excerpt that made it so.
|
|
25
|
+
- **Fixtures.** `test-team-db-schema` pins the two migrations and their checksums plus the v8 → v10 path, `-project` the three-table rebuild from the file alone and a malformed file that tombstones nothing, `-api` the CRUD, both 409s, the delete guard and the verdict ladder, and `-concurrency` two registry writers serializing on the lock. `test-task-repositories` covers the intake presence rule and its cutoff, `test-backfill-repositories` the evidence ladder and a second idempotent run, and `test-rr-migrate-repositories` the remote normalisation, id reuse by locator, one-remote dedupe and the kill switch that leaves the file absent.
|
|
26
|
+
- **Docs.** `docs/TEAM-DB.md` gains § Repository registry and moves the mutation count to seventeen; ADR `0006-repository-registry.md` and `0007-repository-registry-local-only.md`.
|
|
27
|
+
|
|
28
|
+
### `team-tasks-ui` — a repository surface with task links
|
|
29
|
+
|
|
30
|
+
- **Pages.** `/repositories`, `/repositories/new`, `/repositories/[id]`, and `/repositories/[id]/edit`, plus a nav entry after Catalog. The list pages over `total`/`nextOffset`, the detail page pages its linked tasks over the same pair, the create/edit form requires `id` (read-only on edit), and delete runs a two-step dialog that names the N links before any request.
|
|
31
|
+
- **Task detail.** The link block renders each repository with its status badge and keeps `unknown` and `ambiguous` as different empty sentences, so a missing inference is never read as "no repository" — the ambiguous one names the backfill report in text, because no route serves it.
|
|
32
|
+
|
|
33
|
+
### `engine` — a closed tracker item leaves the launch queue
|
|
34
|
+
|
|
35
|
+
- **Queue.** `setTrackerItem` expires the item's open requests in the same transaction for every terminal status — `cancelled` → `item-cancelled`, `superseded` → `item-superseded`, now `completed` → `item-completed` — and only when the status actually changed, so a re-save cannot re-expire. `done` stays derived from the task row and is never stored.
|
|
36
|
+
- **Prune.** `pruneTrackerEntries` retires stored `cancelled`/`expired` and derived `done` alike; a derived-done entry ages from `finishedAt`, else `claimedAt`, else `requestedAt`, so a completed item's `claimed` entry can finally be pruned instead of lingering in the launch queue.
|
|
37
|
+
- **Docs and fixture.** `docs/TEAM-DB.md` § tracker queue states the lifecycle; `test-team-db-tracker-queue.mjs` pins the terminal transitions and the aged-entry prune.
|
|
38
|
+
|
|
39
|
+
### `engine` — a rejected tracker payload burns no id
|
|
40
|
+
|
|
41
|
+
- **Reserve, then commit.** `team-db-tracker.mjs` splits the sequence step: `peekItemId` computes the next id without writing, and `commitItemId` advances `tracker/sequence.json` only after `validateItemIdentity`, `validateItemGraph`, and `validateTransition` pass. A rejected `tracker add` leaves the sequence untouched and the next accepted item reuses the id, so the observed 23/24 gap cannot recur.
|
|
42
|
+
- **The contract is written down.** `docs/TEAM-DB.md` § tracker states the bounds the validator already enforced: `title` one trimmed line of 1–120 characters, `description` at most 2000, `labels` at most 8 of 1–32, `sourceRefs` at most 16 of 1–40, `priority` 0–9, and the `status`/`type` enumerations.
|
|
43
|
+
- **Fixture.** `test-team-db-tracker.mjs` adds "a rejected add never burns an id": a 41-character `sourceRef` exits `1` with `E_SCHEMA`, `sequence.json.nextId` is unchanged, and the next valid add takes that id.
|
|
44
|
+
|
|
45
|
+
### `team-tasks-ui` — `/ui-start` guarantees the process view
|
|
46
|
+
|
|
47
|
+
- **Stack script.** `apps/team-tasks-ui/scripts/stack.mjs` probes `http://127.0.0.1:4179/api/v1/processes` and, when nothing answers, starts `processes.mjs serve` through the process manager (`processes.mjs start --name process-view --port 4179`), so `/processes` no longer opens on `E_DISABLED: The process view is unreachable`. The manager's lease (`.ai.local/.processes/leases/process-view.json`) is the ownership record: an owned view that answers a non-200 is stopped and started once, a foreign listener is reported and left running, and `stop` calls `processes.mjs stop --name process-view` instead of signalling a pid. A missing `processes.mjs` is reported and does not block the UI.
|
|
48
|
+
- **Commands and docs.** `ui-start` quotes the new `processes:` line next to `ui:` and `api:`; `ui-stop` reports the view it stopped. The `apps/team-tasks-ui` README start/stop section and lifecycle matrix rows 1–3 carry the `:4179` expectations.
|
|
49
|
+
|
|
50
|
+
## 0.2.78
|
|
51
|
+
|
|
52
|
+
### `engine` — a follow-up must name a different task
|
|
53
|
+
|
|
54
|
+
- **Validator.** `validateLedgerRows(rows, { taskSlug })` refuses a `followUp` equal to the filing task's own slug: the self-reference resolves to a real directory while closing nothing. The message names the row, the slug and the repair — create the follow-up task, or close the row as `fixed`/`rejected`. `team-db.mjs ledger-check --slug` passes `taskSlug`, and the chain hook still relays `failures[].reason` verbatim, so the text keeps one source.
|
|
55
|
+
- **Fixtures.** `ledger-followup-self-reference-red` pins the red for a bare slug and for `blocked-on: <slug>`, and the green for a follow-up that names another real task; `yarn test:team-db:project` is 53 checks.
|
|
56
|
+
|
|
57
|
+
### `engine` — a multi-hour attempt is a human-wait suspect, not agent time
|
|
58
|
+
|
|
59
|
+
- **Aggregator.** `aggregate-agent-task-metrics.mjs` flags every attempt longer than `LONG_ATTEMPT_MS` (3 h) in `longAttempts`, and each task report gains `longestAttemptMs` and `longAttemptCount`. The hint carries the reading rule: an attempt stays open while the owner answers and no `human_gate` event covers that wait, so `activeMs` is an upper bound. `gateWaitMs` and `outOfBandMs` stay separate and are never added to attempt duration.
|
|
60
|
+
- **Fixture.** `a multi-hour attempt is flagged, not counted as agent time` pins the threshold, the per-task counters and the hint.
|
|
61
|
+
|
|
62
|
+
### `engine` — the write-scope audit knows engine telemetry
|
|
63
|
+
|
|
64
|
+
- **Derived class.** `DERIVED_RULES` gains `engine-telemetry` for `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` (and their `.lock` files): the self-learning loop writes them between steps, so no step's `writeScopes` can own them and an implementation step stops reporting them as `outOfScope`.
|
|
65
|
+
- **Fixture.** `test-write-scope.mjs` asserts the `derived: engine-telemetry` label and the new `derived: 6` count.
|
|
66
|
+
|
|
67
|
+
### `preset` — a green gate set is not an AC verdict
|
|
68
|
+
|
|
69
|
+
- **Agent contract.** `build-verifier` (Cursor source plus the hand-maintained Claude twin) reads the AC **sentences**, not only the IDs: when the shipped behaviour diverges from an AC sentence the verdict is `FAIL` with that AC named as a blocker, however green every gate is, and "acceptable and tracked elsewhere" is a question for the gate, never a PASS.
|
|
70
|
+
- **Framing rule.** `task-framing` gains **Oracle on real data**: when the oracle is a shipped validator over existing data, the brief states its expected output on the real corpus — the counters, not only "it passes" — and the current predicate runs before the gate, so a semantics drift surfaces at intake rather than in review.
|
|
71
|
+
|
|
72
|
+
### `preset` — the report-header grammar is stated where it is enforced
|
|
73
|
+
|
|
74
|
+
- **Prose.** `verification-before-completion` names the anchor: nothing follows the closing `)` on the `tree:` line. A clarification such as `(+511 dirty excluding .ai.local)` obeys "opens with these two lines" and still stalls the receipt, so every qualification belongs under `## Notes`.
|
|
75
|
+
- **Hook.** The stall message repeats the grammar, so the repair is readable from the receipt that failed; `gate-tree-clarification-red` pins a header that matches `HEAD` and the dirty count but carries a trailing clarification, and `gate-tree-missing-red` asserts the rule literal so no adapter can drop it again.
|
|
76
|
+
|
|
3
77
|
## 0.2.77
|
|
4
78
|
|
|
79
|
+
### `preset` + `engine` — verification evidence names its tree
|
|
80
|
+
|
|
81
|
+
- **Rule.** `verification-before-completion` gains three Gate clauses — name the tree, prove the gate can fail, re-run when the tree moved — plus the `validation-report.md` header grammar (`tree: <sha> (+N dirty)`, `run-at: <ISO>`) and the zero-input clause. `agent-artifact-contracts.md` names that header in the `validation-report.md` budget row. The rule stays requestable.
|
|
82
|
+
- **Hook.** Inside `validateCompletedArtifact`, a `build-verifier` receipt is rejected when `validation-report.md` is missing or headerless, when the named `HEAD` or dirty count no longer matches the worktree (the existing `gitSnapshot()`), or when the report carries an unallowlisted `checked: 0` row. Each message names the repair: re-run the named gate on the current tree, then `/task-continue <slug>`. The allowlist is data — `zeroInputAllowlist[{gate, reason, owner}]` in `.ai.local/pipeline-gates.json` — and an entry without a reason allowlists nothing.
|
|
83
|
+
- **Audit.** `check-verification.mjs` joins `ENGINE_SCRIPTS` (thirty entries, twenty-nine published): read-only buckets for missing tree, stale tree, and zero-input, with tasks last touched before `2026-11-01` reported as `legacy`. A scan over zero tasks prints `checked: 0` and exits 1 unless `check-verification` is allowlisted.
|
|
84
|
+
- **Fixtures.** `yarn test:hooks` gains ten cases: `gate-tree-missing-red`, `gate-tree-fresh-green`, `gate-tree-stale-red`, `gate-zero-input-red`, `gate-zero-input-allowlisted`, and `audit-{missing-tree,stale-tree,zero-input,legacy-precutoff,empty-root-red}`.
|
|
85
|
+
|
|
5
86
|
### `preset` — one stack means one document on every platform
|
|
6
87
|
|
|
7
88
|
- **Entry text restored on all five platforms.** Every `REPO_AGENTS.md` regains the `## ZCode host` block (`node .zcode/hooks/list-ai-local.mjs`) and the `ai-local-overlay` closing sentence — additive only, 753 B and 227 B — and the 44 derived copies carry it byte for byte. `check-zcode-local-overlay`, `check-opencode-local-overlay` and `check-mavis-local-overlay` go from 22 / 11 / 11 findings to zero.
|
|
@@ -44,6 +125,14 @@ The `0.2.77` release gate ran phase 1 on `ddb234bf` and found five sub-checks re
|
|
|
44
125
|
- **`hook-body-parity fixtures`.** `makeTree()` copies the whole `presets/_shared/hooks/` directory and stages the Cursor `compact-shell-output.mjs`, so a shared hook added later can no longer turn the clean-tree case into an `ENOENT`.
|
|
45
126
|
- **`test-write-scope` teardown.** The seven temp-repo teardowns retry `ENOTEMPTY`/`EBUSY` (`maxRetries: 5`); no assertion changed, so a real verdict failure still surfaces as itself.
|
|
46
127
|
|
|
128
|
+
### `preset` + `engine` — three hook facts stop being reconstructed by hand
|
|
129
|
+
|
|
130
|
+
- **Bootstrap hands over the advance payload.** `bootstrap` now prints the `followup_message` the advance path builds (`handoffForAgent`): the agent, the step-owned output id, the `attemptId` it just armed, and the artifact-input line. A parallel first step uses the advance path's `handoffForParallelStep` instead, so the payload names every agent it armed and every owned id. A step that declares no resolvable agent — including `agent: []` — is refused (`ok: false` + reason, nothing armed) instead of handing over an `undefined` id. One ownership clause in the template, two call sites.
|
|
131
|
+
- **`manifest.mjs upsert` refuses a foreign id.** When `pipeline.json`'s active step declares `artifactOutputId` / `artifactOutputIds[producer]`, an `--id` it does not name exits 2 with the expected id and the repair; `--attempt` equal to that step's active attempt is the deliberate re-bind. The scalar `artifactOutputId` binds only to the step's own agent(s), and a bound attempt resolves its own step — so the second step of a parallel wave writes its own id while the wave's first unit still cannot. An attempt armed for another agent does not authorise the producer. A missing `pipeline.json`, a step that declares no id, and a legacy producer keep the earlier behaviour.
|
|
132
|
+
- **The verification snapshot refreshes on every verifier receipt.** The `existsSync` early return is gone: `snapshot`, the `validation-report.md` hash and `gate.checkedAt` follow the tree the commands ran on, and the recorded `commands[]` are preserved. Report lookup is the gate's live-then-archived one, so a post-close refresh records the archived body instead of erasing the hash. The freshness warn compares the report's `tree:` header — the same `REPORT_TREE_RE` the report gate parses — so a retried verifier no longer warns `verification_stale` about the report it just wrote.
|
|
133
|
+
- **The write-scope baseline is saved at activation.** `activateAttempts` runs `check-write-scope --slug <slug> --step <id> --save-baseline --paths <the step's writeScopes>` when the step declares `writeScopes`, so the audit no longer skips every step as `no-baseline`; the declared surface is seeded into the baseline, so a step armed on a clean tree still attributes its own writes instead of relying on `--allow-empty` (which the hook no longer passes). The save is create-once (`wx`, a second save keeps the first file) and a failure is a stderr note, never a failed receipt. A step with no `writeScopes` keeps the shipped `no-write-scopes` skip.
|
|
134
|
+
- **Fixtures.** `yarn test:hooks` gains nine cases — `bootstrap-carries-output-id`, `bootstrap-carries-parallel-payload`, `bootstrap-refuses-no-id`, `manifest-rejects-foreign-id`, `manifest-wave-owns-each-step-id`, `verification-refresh-on-retry`, `verification-reads-archived-report`, `write-scope-baseline-at-activation`, `write-scope-clean-activation-baseline` — all red on the previous tree. No new always-on rule; `package.json` unchanged.
|
|
135
|
+
|
|
47
136
|
## 0.2.76
|
|
48
137
|
|
|
49
138
|
### `preset` — guard accounting reads every ledger generation
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
|
|
|
25
25
|
| Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all five; ZCode loads it natively) | | | | |
|
|
26
26
|
| `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
|
|
27
27
|
| Template drift | **`.ai.local/.template-base.json`** (shared; one record per tree of files that hold a shipped template byte; `update` prints one drift line, `update --merge-ai-local` fast-forwards a file only when its recorded base still matches and reports the rest) | | | |
|
|
28
|
-
| Self-learning engine | **`.ai.local/scripts/`** (shared;
|
|
28
|
+
| Self-learning engine | **`.ai.local/scripts/`** (shared; thirty published scripts — the six self-learning engine modules, `manifest.mjs`, `dump-output.mjs`, `run-compact.mjs`, the eight `team-db*.mjs` modules, `action-signals.mjs`, `actions-report.mjs`, `check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`, `verification.mjs`, `check-verification.mjs`, `incidents.mjs`, `processes.mjs`, `process-lease.mjs`, `rr-scheduler-start.mjs`, `rr-migrate-repositories.mjs`, and `tracker-planned-drain.mjs`; existing files never overwritten. The repository-only `upstream-research.mjs` is not published) | | | |
|
|
29
29
|
| Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
|
|
30
30
|
|
|
31
31
|
OpenCode also ships **`.opencode/plugins/task-status/`**, a TUI sidebar for the active `/task` run (slug, state, elapsed time, step, remaining-time estimate, soft-stop). OpenCode auto-loads it; it needs no `opencode.json` entry, is refreshed by `update`, and is a viewer only — the chain hook stays manual.
|
|
@@ -62,7 +62,8 @@ node .ai.local/scripts/run.mjs --dry-run # read-only preview: decision, target,
|
|
|
62
62
|
`--force`. The seeded tree is byte-identical to `presets/_shared/ai-local/scripts/`, and `.ai.local/.gitignore` (created
|
|
63
63
|
when absent, missing required lines appended to an existing file) ignores `*.lock`, `*.tmp`, `.rollback/`, `STOP`,
|
|
64
64
|
`ESTOP`, `team.db`, `team.db-wal`, `team.db-shm`, `team-db-errors.log`, `team.db.corrupt-*`,
|
|
65
|
-
`team.db.mismatch-*`, `team/scheduler/runs/`,
|
|
65
|
+
`team.db.mismatch-*`, `team/scheduler/runs/`, `team/scheduler/state.json`, and
|
|
66
|
+
`team/repositories.json`; the root `.gitignore` is never edited.
|
|
66
67
|
|
|
67
68
|
Upgrade a seeded module with `update --fix`: it writes a module only when its current bytes still match the shipped digest
|
|
68
69
|
recorded in `.ai.local/.template-base.json`. A module you edited is reported `kept modified` and stays byte-identical; a
|
|
@@ -134,6 +135,7 @@ failure is written to `team-db-errors.log` and never fails a file write.
|
|
|
134
135
|
```bash
|
|
135
136
|
node .ai.local/scripts/team-db.mjs init # create/migrate the database
|
|
136
137
|
node .ai.local/scripts/team-db.mjs migrate-tasks # create when absent, then write only the delta
|
|
138
|
+
node .ai.local/scripts/rr-migrate-repositories.mjs # scan local clones into the registry, then project
|
|
137
139
|
node .ai.local/scripts/team-db.mjs sync # full backfill + reconciliation
|
|
138
140
|
node .ai.local/scripts/team-db.mjs sync --slug <slug> # the bounded hook-shaped projection
|
|
139
141
|
node .ai.local/scripts/team-db.mjs check # schema, fingerprint, integrity
|
|
@@ -66,6 +66,9 @@ const ENGINE_SCRIPTS = [
|
|
|
66
66
|
// Read-only post-step write-scope audit used by build-verifier and code-reviewer.
|
|
67
67
|
// Shells out to git, so it is not part of the self-learning loop module set.
|
|
68
68
|
'check-write-scope.mjs',
|
|
69
|
+
// Retrospective audit of `pipeline.json.repositories` across the task store.
|
|
70
|
+
// The chain hook gates intake; this one judges the folders that already exist.
|
|
71
|
+
'check-task-repositories.mjs',
|
|
69
72
|
// Process leases and the one view over them (`start|acquire|run|list|watch|
|
|
70
73
|
// scan|doctor|stop|serve`). `processes.mjs` owns a detached dev-server start
|
|
71
74
|
// and reuses `process-lease.mjs` for the protocol; both spawn `ps`/`lsof` and
|
|
@@ -76,6 +79,9 @@ const ENGINE_SCRIPTS = [
|
|
|
76
79
|
// `/rr-scheduler-start`: stop a recorded scheduler, then start
|
|
77
80
|
// `team-db.mjs schedule` through the process manager.
|
|
78
81
|
'rr-scheduler-start.mjs',
|
|
82
|
+
// `/rr-migrate-repositories`: scan local clones and sync the repository
|
|
83
|
+
// registry through the lock-guarded `repositories apply|put|project` verbs.
|
|
84
|
+
'rr-migrate-repositories.mjs',
|
|
79
85
|
// Role/task metrics aggregation used by technical-retro; ships with the engine
|
|
80
86
|
// so a consumer can run it from `.ai.local/scripts/` without the package.
|
|
81
87
|
'aggregate-agent-task-metrics.mjs',
|
|
@@ -86,6 +92,9 @@ const ENGINE_SCRIPTS = [
|
|
|
86
92
|
// Persisted verification evidence: command + exit + capped log tail bound to a
|
|
87
93
|
// git snapshot, with a freshness check closure can read.
|
|
88
94
|
'verification.mjs',
|
|
95
|
+
// Read-only audit of the reports `verification.mjs` sits beside: which ones
|
|
96
|
+
// name no tree, a stale tree, or a zero-input gate row. Never writes.
|
|
97
|
+
'check-verification.mjs',
|
|
89
98
|
// Append-only incident registry: recurrence threshold, promotion gate, advice.
|
|
90
99
|
'incidents.mjs',
|
|
91
100
|
];
|
|
@@ -44,6 +44,8 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
44
44
|
'# Tracker launch queue and opt-in runner runtime state; items and links stay tracked.',
|
|
45
45
|
'team/tracker/queue/',
|
|
46
46
|
'team/task-runs/',
|
|
47
|
+
'# Local-only repository registry: generated from this machine, never commit.',
|
|
48
|
+
'team/repositories.json',
|
|
47
49
|
'# Per-step write-scope baselines; derived from git, never a project input.',
|
|
48
50
|
'team/.write-scope/',
|
|
49
51
|
'team/upstream/cursor.json',
|
package/docs/LOCAL-OVERLAY.md
CHANGED
|
@@ -21,12 +21,12 @@ Put a `.ai.local/` directory in your repo. Write rules as plain markdown. The `a
|
|
|
21
21
|
|
|
22
22
|
`init` and `update` write `.ai.local/.template-base.json` — the digest of every `.ai.local/` file that holds a shipped template byte — so `update` can tell a file you edited from a file the preset moved. Your own bytes never become a base. See [Template drift](#template-drift).
|
|
23
23
|
|
|
24
|
-
No IDE config, no `@include`, no codegen. Same files work in Cursor, Claude Code, Mavis, and
|
|
24
|
+
No IDE config, no `@include`, no codegen. Same files work in Cursor, Claude Code, Mavis, OpenCode, and ZCode.
|
|
25
25
|
|
|
26
26
|
## How it works
|
|
27
27
|
|
|
28
|
-
1. `init cursor|claude|mavis|opencode --preset <stack>` (or `init multi`) installs `ai-local-overlay`. Cursor: `alwaysApply: true`. Claude: session-start (no `paths:`). Mavis/OpenCode: listed as a root-entry rule in `AGENTS.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md`.
|
|
29
|
-
2. On every turn the rule runs `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, or `.
|
|
28
|
+
1. `init cursor|claude|mavis|opencode|zcode --preset <stack>` (or `init multi`) installs `ai-local-overlay`. Cursor: `alwaysApply: true`. Claude: session-start (no `paths:`). Mavis/OpenCode: listed as a root-entry rule in `AGENTS.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md`. ZCode reads the root `AGENTS.md`.
|
|
29
|
+
2. On every turn the rule runs `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`, current host first) with the paths that step will touch. The script prints `rules/*.md` and `conventions.md` for the ancestor chain. Do **not** load `team/**` or `rules-library/**` as rules. `team/` lives only at the **repo root** `.ai.local/team/`, not in nested package overlays.
|
|
30
30
|
3. If a local rule conflicts with a preset rule, **the local rule wins**.
|
|
31
31
|
4. **Deeper wins on one chain.** The root `.ai.local` applies to every path. A nested `.ai.local` applies only under its directory. The same rule file name on that chain: the deeper file wins (`shadowed` is not read). A sibling package does not inherit the other package's overlay.
|
|
32
32
|
5. When the path set grows, run the script again with the new paths. If `.ai.local/team/tasks/<slug>/` already exists, pass `--record <slug>`. The script writes `overlay-scope.json` there and appends one `.memlog.md` `event:` per newly entered overlay directory. Read files listed under `new:` before editing. Cursor and Claude also print a prefix index at session start; that index is not the apply set.
|
|
@@ -297,7 +297,7 @@ A nested overlay does not contain `team/`. If the same rule name appears on one
|
|
|
297
297
|
|
|
298
298
|
## Limitations
|
|
299
299
|
|
|
300
|
-
- Cursor, Claude, Mavis, and
|
|
300
|
+
- Cursor, Claude, Mavis, OpenCode, and ZCode do **not** natively read `.ai.local/`. `list-ai-local.mjs` prints the chain; the model still reads the listed files. Cursor and Claude inject the prefix index once per session. Mavis, OpenCode, and ZCode have no session hook, so the rule runs the same script.
|
|
301
301
|
- A file added under an overlay the task has already entered is picked up the next time the script runs with a path on that chain. A brand-new `.ai.local` directory is picked up the same way; it does not wait for a new session.
|
|
302
302
|
- "Priority" is **contextual**, not enforced. If the model already internalized a preset rule, the local rule may not fully override it.
|
|
303
303
|
- Local rules consume your context window. Keep them tight.
|
|
@@ -19,13 +19,13 @@ Every preset artifact belongs to one of these layers. Do not mix semantics acros
|
|
|
19
19
|
| Layer | Path | What belongs here |
|
|
20
20
|
|-------|------|-------------------|
|
|
21
21
|
| **Core** | `presets/_shared/core/**` | Stack-agnostic prose and checklists. No Cursor/Claude frontmatter. No stack paths (`app/src/**`, `Features/**`, Playwright, `xcodebuild`). |
|
|
22
|
-
| **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain rules, stack always-on set, stack tooling, stack examples in a delimited `## Stack notes` section. |
|
|
22
|
+
| **Stack** | `presets/{cursor\|claude\|mavis\|opencode\|zcode}/<stack>/` | Domain rules, stack always-on set, stack tooling, stack examples in a delimited `## Stack notes` section. |
|
|
23
23
|
| **Platform** | Same stack tree | Adapter packaging: Cursor `.mdc` (`alwaysApply` / `globs`) vs Claude `.md` (`paths:`). Platform-only files (`BUGBOT.md`, `AGENTS.md`, `CLAUDE.md`, `hooks.json`). |
|
|
24
24
|
|
|
25
25
|
```text
|
|
26
26
|
Core (_shared/core) → shared principles
|
|
27
27
|
↓ embed / copy + marker
|
|
28
|
-
Stack (cursor
|
|
28
|
+
Stack (cursor/<stack>, then derived platforms) → domain + stack deltas
|
|
29
29
|
↓ frontmatter / layout
|
|
30
30
|
Platform adapter → .mdc | .md + platform-only artifacts
|
|
31
31
|
```
|
|
@@ -34,7 +34,7 @@ Platform adapter → .mdc | .md + platform-only artifacts
|
|
|
34
34
|
|
|
35
35
|
- Applies to all stacks with only example differences → **core** + stack adapters.
|
|
36
36
|
- Only one installable stack (`next` / `nuxt` / `svelte` / `mol` / `ios-swift` / `android-kotlin` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (never in `_shared`).
|
|
37
|
-
- Only
|
|
37
|
+
- Only one platform's file shape → **platform** (do not duplicate semantics on the other platforms).
|
|
38
38
|
|
|
39
39
|
Meta-rules for **preset authors** live in `core/meta/` and are packaged into each stack with globs limited to `packages/ai-rules/presets/**` (never `alwaysApply` / session-start in consumer installs).
|
|
40
40
|
|
|
@@ -46,7 +46,8 @@ Meta-rules for **preset authors** live in `core/meta/` and are packaged into eac
|
|
|
46
46
|
|---------|-----|-------|
|
|
47
47
|
| Preset content | `packages/ai-rules/presets/**` | **Not** repo root `.cursor/` — dogfood is a synced working copy. |
|
|
48
48
|
| Per stack | `presets/cursor/<stack>/` | Cursor `.mdc` is SoT for that stack. |
|
|
49
|
-
| Claude twins | `presets/claude/<stack>/` |
|
|
49
|
+
| Claude twins | `presets/claude/<stack>/` | Rules derived in the **same PR**. Agents, commands, skills, `CLAUDE.md`, and `settings.json` stay hand-maintained twins. |
|
|
50
|
+
| Mavis, OpenCode, ZCode | `presets/<platform>/<stack>/` | Derived from Cursor in the **same PR** (`generate-mavis.mjs`, `generate-opencode.mjs`, `generate-zcode.mjs`). Never hand-edit. |
|
|
50
51
|
| Shared core | `presets/_shared/core/**` | Edit core first; update all `<!-- shared-core: … -->` consumers in the same PR. |
|
|
51
52
|
| Monorepo dogfood | Root `.cursor/` | Sync **from** packages on release / dogfood PR (typically `cursor/next` + author meta globs). |
|
|
52
53
|
|
|
@@ -74,7 +75,7 @@ Claude topic folders (all stacks): `architecture/`, `stack/`, `api-and-data/`, `
|
|
|
74
75
|
|
|
75
76
|
1. Change prose under `presets/_shared/core/<area>/<stem>.md`.
|
|
76
77
|
2. Find consumers: `rg 'shared-core: <path>' packages/ai-rules/presets`.
|
|
77
|
-
3. Update
|
|
78
|
+
3. Update the Cursor adapter in the **same PR**, then regenerate Claude, Mavis, OpenCode, and ZCode — see **sync modes** below. Do not hand-edit a derived tree.
|
|
78
79
|
4. Keep stack-specific content only in adapters (embed: `## Stack notes`; lineage: full stack body).
|
|
79
80
|
5. Update stack `rules/README.md` core→stack mapping if stems or paths changed.
|
|
80
81
|
6. Sync dogfood: `packages/ai-rules/scripts/sync-dogfood-cursor.sh` when maintaining this monorepo.
|
|
@@ -171,7 +172,7 @@ Summary:
|
|
|
171
172
|
- [ ] Anti-hallucination: `check-anti-hallucination-coverage.mjs` passes. New skill families are registered in `SKILL_CONTRACT_CLASS` (`writer` loads the stack floor; `reader` loads the contract only). `code-review` is `writer`.
|
|
172
173
|
- [ ] Structure gates: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names; `yarn release:gate` before a release (the full `bash scripts/check-preset-structure.sh` composite)
|
|
173
174
|
- [ ] Twin drift: after editing a Claude `commands/**` or `skills/**` file, `node scripts/check-preset-twin-drift.mjs` passes — mirror the change in the Cursor twin (delta and divergence unchanged) or record a deliberate divergence with `--update`. A deliberate divergence that **raises** an allowance needs `--update --widen`; dropping a baseline row needs `--update --prune`. A plain `--update` refuses both.
|
|
174
|
-
- [ ] Generated trees regenerated (`generate-mavis.mjs` + `generate-opencode.mjs`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
|
|
175
|
+
- [ ] Generated trees regenerated (`generate-claude.mjs` + `generate-mavis.mjs` + `generate-opencode.mjs` + `generate-zcode.mjs`, or `yarn fix:generated`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
|
|
175
176
|
|
|
176
177
|
Validation: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) + the `preset-pr-checklist` rule; the full composite runs in `yarn release:gate`. CI workflows: `preset-structure.yml` (`check`, `hooks`, `ai-local-engine-tests`), `platform-smoke.yml` (3-OS smoke: `init multi`/`update`/`doctor`, platform suites, script gate), `rule-eval.yml` (opt-in next rule-eval), and `release-gate.yml` (manual `yarn release:gate` run + report artifact).
|
|
177
178
|
|
|
@@ -407,7 +408,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
407
408
|
|
|
408
409
|
| Script / npm | Purpose |
|
|
409
410
|
|--------------|---------|
|
|
410
|
-
| `yarn fix:generated` | Regenerate every released generated platform and recapture the CLI goldens it owns (`cursor/next`, `claude/next`, and every Mavis/OpenCode stack). Run after changing Cursor SoT, before fail-only checks. Capture a non-`next` Cursor/Claude golden explicitly with `node scripts/capture-cli-golden.mjs <cursor|claude> <stack>`; never hand-edit one. Dogfood sync remains separate. |
|
|
411
|
+
| `yarn fix:generated` | Regenerate every released generated platform and recapture the CLI goldens it owns (`cursor/next`, `claude/next`, and every Mavis/OpenCode/ZCode stack). Claude's stack set is the Cursor stack directories, not the OpenCode contract. Run after changing Cursor SoT, before fail-only checks. Capture a non-`next` Cursor/Claude golden explicitly with `node scripts/capture-cli-golden.mjs <cursor|claude> <stack>`; never hand-edit one. Dogfood sync remains separate. |
|
|
411
412
|
| `scripts/sync-dogfood-cursor.sh` | Copy `presets/cursor/<preset>/` → root `.cursor/` (`AI_RULES_DOGFOOD_PRESET`, default `next`). Also copies `REPO_AGENTS.md` → repo-root `AGENTS.md`. Seeds `.ai.local/team` templates; preserves `.ai.local/team/tasks/`. |
|
|
412
413
|
| `scripts/check-shared-core-drift.sh` / `yarn check:shared-core-drift` | Check embed-mode adapters vs core; lists lineage consumers. **Always hard:** every `_shared/core/**` file must be classified `embed | lineage | internal` in `_lib/embed-stems.json` (unclassified → exit 1). Drift is soft by default; set `AI_RULES_DRIFT_FAIL=1` (or use `release:gate`) to exit non-zero. A stem listed in `requiredSentences` is checked in the core **and in every adapter of that stem, whatever the lineage class** — the body comparison cannot cover a platform whose adapter is not a byte-embed of the core (the Cursor family reorders, omits and adds sections), so the normative fragments of that stem are pinned separately. |
|
|
413
414
|
| `scripts/check-preset-twin-map.sh` / `yarn check:preset-twin-map` | **FAIL** if Cursor `.mdc` missing from Claude mapping table, twin file missing, or orphan topic `.md` (excl. `**/README.md`). Stacks: `next`, `nuxt`, `svelte`, `mol`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`. **Rules only** — commands and skills are guarded by `check-preset-twin-drift.mjs`. |
|
|
@@ -425,7 +426,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
425
426
|
| `scripts/check-preset-language-policy.sh` / `yarn check:preset-structure` | **FAIL** if the native-language policy is absent: the core `_shared/core/agent-team/language-policy.md` tokens, the `language-policy` consumer + `<!-- shared-core -->` marker, the Cursor `globs:`/`alwaysApply: false` + Claude `paths:` shape, the `## Language` setting home (with a BCP-47 marker) in `ai-local/conventions.md`, the always-on anchors (`ai-local-overlay` + `<app-core>` + `REPO_AGENTS.md` must contain `native language` and `every user message`), or the `language:` persistence token in `commands/task.md`; **refuses vacuous PASS** when the iteration set is empty. Wired into `check-preset-structure.sh` next to `goal-contract` / `prompt-persistence`; fixture `test-preset-language-policy-fixtures.mjs`. |
|
|
426
427
|
| `scripts/check-preset-self-review-contract.sh` / `yarn check:preset-structure` | **FAIL** if the producer-side self-review / context-hygiene contract is absent: the core `_shared/core/quality/self-review-and-context-hygiene.md` tokens (G0 non-vacuous guard), the `<!-- shared-core: quality/self-review-and-context-hygiene.md -->` marker on `task-analyst` / `feature-developer` / `build-verifier` (×10) and on `debugger` / `code-reviewer` where present (skip-if-absent → `mcp-ts`), the `Self-review` + `re-anchor` tokens on every orchestrator rule, `Self-review` in `team/README.md` + `commands/task.md`, and leakage-free core + docs; **refuses vacuous PASS** when the iteration set is empty. Also holds two prose contracts: the canonical self-learning-loop sentence must not be followed by unsanctioned prose (an allowlist of sanctioned clauses; the tail is bounded by the carrier's **section**, not by a blank line, so prose moved one paragraph down still fails — a tail in a later `## ` section is out of scope), and every retro carrier (command, skill, rule) must state `finding_category`. Wired into `check-preset-structure.sh` next to `goal-contract`; fixture `test-preset-self-review-contract-fixtures.mjs`. |
|
|
427
428
|
| `scripts/check-anti-hallucination-coverage.mjs` | **FAIL** when the shared contract, a Cursor load-line embed, a writer stack floor, or a generated Rules-to-load stem is missing. Writer roles are `implementer`, `unit-test`, `e2e`, `qa`, and `reviewer` (`code-reviewer` loads `STACK_FLOOR_STEMS` plus the contract). `/task` and the orchestrator must not name a floor stem. Does not scan consumer `app/**` and does not call Context7. Fixture `test-anti-hallucination-coverage.mjs` deletes `anti-hallucination-contract` from `next.reviewer` in memory and expects FAIL mentioning `next` and `reviewer`. Wired into `check-preset-structure.sh` immediately after `check-claude-agent-blocks.mjs`. |
|
|
428
|
-
| `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--save-baseline] [--json]`. Baseline resolution: `--paths`, then `--base <ref>`, then the step baseline written by `--step <id> --save-baseline` (every dirty path with its content hash,
|
|
429
|
+
| `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--save-baseline] [--json]`. Baseline resolution: `--paths`, then `--base <ref>`, then the step baseline written by `--step <id> --save-baseline` (every dirty path with its content hash, plus the files its declared `writeScopes` cover — passed as `--paths` — so a step armed on a clean tree still owns its surface), then `HEAD` (whole uncommitted change-set, reported with a notice). Exit `1` for an out-of-scope path on an implementation step, `0` for a reviewer/verifier step (advisory), `2` on a usage/config error, `3` (SKIP) when the pipeline predates step ids or `writeScopes` and is therefore not auditable. Fixture `test-write-scope.mjs`; wired into the build-verifier and code-reviewer prompts, never a hook. |
|
|
429
430
|
| `scripts/check-preset-structure.sh` / `yarn check:preset-structure` | Low-level orchestrator: twin-map + token-budget + leakage + shared-core drift + anti-hallucination coverage + rule-eval (**all hard**; drift via `AI_RULES_DRIFT_FAIL=1`). Invoked by `yarn release:gate` and CI; not a feature-task gate. |
|
|
430
431
|
| `scripts/check-product-specs.sh` / `yarn check:product-specs` | Opt-in consumer tree check: frontmatter v1 keys + required body headings on `docs/specs/**` (bash; does **not** run JSON Schema). Ships in the npm package `files` (`scripts/`). **WARN** by default; **`--strict`** exits non-zero. |
|
|
431
432
|
| `yarn check:product-specs:dogfood` | Same script against monorepo `dogfood/mcp-ts-sample`. Soft WARN inside the composite + CI step (`continue-on-error`); the release gate runs `--strict`; not a hard consumer CI gate. |
|
package/docs/TEAM-DB.md
CHANGED
|
@@ -20,8 +20,8 @@ The projection is installed by `init` as eight `team-db*.mjs` modules under `.ai
|
|
|
20
20
|
The same seeded set is `ENGINE_SCRIPTS` in `bin/lib/engine-scripts.js`: the eight `team-db*.mjs`
|
|
21
21
|
modules plus the self-learning engine, `manifest.mjs`, `dump-output.mjs`,
|
|
22
22
|
`check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`,
|
|
23
|
-
`verification.mjs`, `incidents.mjs`, `tracker-planned-drain.mjs`, and the `processes.mjs` +
|
|
24
|
-
`process-lease.mjs` process manager (
|
|
23
|
+
`verification.mjs`, `check-verification.mjs`, `incidents.mjs`, `tracker-planned-drain.mjs`, and the `processes.mjs` +
|
|
24
|
+
`process-lease.mjs` process manager (thirty-one entries;
|
|
25
25
|
`node -e "require('./bin/lib/engine-scripts.js').ENGINE_SCRIPTS.length"` prints the shipped
|
|
26
26
|
count). One further module, `upstream-research.mjs`, is declared in
|
|
27
27
|
`REPO_ONLY_ENGINE_SCRIPTS`: it exists in this repository's preset source and dogfood mirror but
|
|
@@ -33,7 +33,11 @@ is excluded from the published tarball, and a consumer install skips it without
|
|
|
33
33
|
`artifact-manifest.json`, prompts, memlogs, and review ledgers are read, never written.
|
|
34
34
|
No agent writes a lifecycle field through the projection.
|
|
35
35
|
- **The database is rebuildable.** Delete `team.db*` and run `sync`; the next run recreates
|
|
36
|
-
the schema and reconverges.
|
|
36
|
+
the schema and reconverges. An older database migrates in place and keeps its rows, and a
|
|
37
|
+
stored fingerprint that lags the DDL the migration chain produces is a stale record: it is
|
|
38
|
+
overwritten in place, no rebuild. A record that disagrees with a DDL the chain does not
|
|
39
|
+
produce is moved aside as `team.db.mismatch-<stamp>` and rebuilt. A file with no fingerprint
|
|
40
|
+
record is stamped with the DDL it opened with, without a comparison.
|
|
37
41
|
- **Writes are isolated.** A projection or deletion failure never fails a file write or a
|
|
38
42
|
receipt. The hook and `manifest.mjs` each run a bounded child (5 s, `SIGKILL`) and append
|
|
39
43
|
one line to `team-db-errors.log` on failure; the confirmed task delete runs its own
|
|
@@ -41,16 +45,24 @@ is excluded from the published tarball, and a consumer install skips it without
|
|
|
41
45
|
envelope, or one stderr line on the CLI.
|
|
42
46
|
- **Bounded mutations.** `POST /api/v1/sync` re-runs the projector and `DELETE
|
|
43
47
|
/api/v1/tasks/{slug}` deletes one confirmed task (the folder first, then the rows); every
|
|
44
|
-
other route is `GET`/`HEAD` apart from the four job writes
|
|
45
|
-
asynchronous child process — the server never opens a writable
|
|
46
|
-
switch answers before a child is spawned. Job writes carry
|
|
47
|
-
64 KiB, run-now an absent body or `{}
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
other route is `GET`/`HEAD` apart from the four job writes and the three repository writes.
|
|
49
|
+
Each mutation runs as an asynchronous child process — the server never opens a writable
|
|
50
|
+
connection, and the kill switch answers before a child is spawned. Job writes carry
|
|
51
|
+
`application/json` and at most 64 KiB, run-now an absent body or `{}`; repository writes
|
|
52
|
+
carry `application/json` and at most 16 KiB. The rescan and delete children are bounded at
|
|
53
|
+
30 s, a job write or run-now at 10 s, a repository write at 10 s and a repository delete at
|
|
54
|
+
30 s. There is no write-back and no outbound call; the efficiency ledgers are local files
|
|
55
|
+
read by a full sync.
|
|
50
56
|
- **The scheduler writes files before rows.** `scheduler/jobs.json` is the definition of
|
|
51
57
|
record, `scheduler/runs/**` and `scheduler/state.json` are its runtime state, and the three
|
|
52
58
|
`scheduled_jobs` / `job_runs` / `job_run_events` tables are projections of those files. The
|
|
53
59
|
scheduler never writes `status.json`, `metrics.json`, or a receipt.
|
|
60
|
+
- **The repository registry writes files before rows.** `repositories.json` holds the
|
|
61
|
+
records, the resolved task→repository links and the unresolved attribution verdicts; the
|
|
62
|
+
`repositories` / `task_repositories` / `task_repository_attributions` tables are derived
|
|
63
|
+
from it alone and rebuild byte-identically. One lock-guarded verb serves both writers (the
|
|
64
|
+
API and `/task` intake or the backfill), and a projection failure never fails a file
|
|
65
|
+
write.
|
|
54
66
|
- **Local only.** The server binds loopback by default, checks `Host` and `Origin`, sends no
|
|
55
67
|
CORS header, and serves raw documents from SQLite by exact `(slug, path)` lookup.
|
|
56
68
|
|
|
@@ -158,6 +170,13 @@ vocabulary: `0` ok, `1` a validation refusal carrying its named code (`E_TRACKER
|
|
|
158
170
|
`E_TRACKER_TRANSITION`, `E_TRACKER_REVISION`, `E_SCHEMA`), `3` usage, `4` the tree lock was
|
|
159
171
|
contended (`E_TRACKER_BUSY`).
|
|
160
172
|
|
|
173
|
+
A tracker item payload is bounded, and a refusal burns no id: `title` is one trimmed line of
|
|
174
|
+
1–120 characters, `description` at most 2000 characters, `labels` at most 8 of 1–32 characters,
|
|
175
|
+
`sourceRefs` at most 16 of 1–40 characters, `priority` 0–9, `status` ∈ backlog | planned |
|
|
176
|
+
completed | cancelled | superseded, `type` ∈ feature | bugfix | spike | chore | docs | refactor.
|
|
177
|
+
`tracker add` validates the payload before it reserves the sequence: a rejected add leaves
|
|
178
|
+
`tracker/sequence.json` untouched and the next accepted item reuses that id.
|
|
179
|
+
|
|
161
180
|
A `--rebuild` of `init`, `sync` or `migrate-tasks` takes the team-root rebuild lock
|
|
162
181
|
(`.ai.local/team/.rebuild.lock.d`, a transient directory) before it touches the database: a
|
|
163
182
|
second rebuild that meets it fails fast with `E_REBUILD_BUSY` (exit 4) instead of moving
|
|
@@ -264,13 +283,16 @@ task in a holding state (`in_progress`, `awaiting_artifact_receipt`, `blocked`)
|
|
|
264
283
|
slot, a task at a human gate does not. `GET /api/v1/tracker/queue` includes that holding
|
|
265
284
|
task even when it has no tracker link and no queue file: the row is derived (`entryId` null,
|
|
266
285
|
`itemId` null, `status` `active`, reason `current task`) and is not cancellable. A
|
|
267
|
-
non-terminal queue entry for the same slug is the row that is shown instead.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
286
|
+
non-terminal queue entry for the same slug is the row that is shown instead. A claim older
|
|
287
|
+
than 90 s with no task row is released on the next drain or by `tracker recover`; `tracker
|
|
288
|
+
prune --older-than <days>` deletes aged terminal entry files only — stored
|
|
289
|
+
`cancelled`/`expired` and derived `done` alike, where a derived-done entry ages from its
|
|
290
|
+
`finishedAt`, else `claimedAt`, else `requestedAt`. A terminal item closes its open request
|
|
291
|
+
in the same transaction: `cancelled`/`superseded` write `expired` with
|
|
292
|
+
`item-cancelled`/`item-superseded`, and `completed` writes `expired` with `item-completed`,
|
|
293
|
+
so a `done` row (derived from the task row, never stored) cannot linger in the launch queue
|
|
294
|
+
after the item is closed. The tracker module never writes `status.json`, `metrics.json`, or
|
|
295
|
+
`scheduler/jobs.json`.
|
|
274
296
|
|
|
275
297
|
**Task control.** The tracker item detail can start a new linked task (link + queue
|
|
276
298
|
request), stop a link (cancel the queued request, write the per-task `tasks/<slug>/STOP`
|
|
@@ -367,14 +389,98 @@ reconciles it before the first fire, and `jobs reconcile` does the same on deman
|
|
|
367
389
|
manifest and the row become `interrupted` with reason `E_ORPHANED`. `sync --rebuild` and
|
|
368
390
|
`sync --vacuum` refuse with `E_SCHEDULER_RUNNING` (exit 4) while a fresh lease exists. That
|
|
369
391
|
guard covers the explicit destructive flags only: a plain `init` or `sync` opens writable, and
|
|
370
|
-
a database whose
|
|
392
|
+
a database whose DDL the migration chain does not produce is moved aside as
|
|
371
393
|
`team.db.mismatch-<stamp>` and rebuilt (see § Schema) even while a scheduler holds the lease.
|
|
394
|
+
A store whose DDL is the chain's own only has its fingerprint refreshed in place.
|
|
372
395
|
Stop the scheduler before any schema upgrade; the explicit flags are a backstop, not a
|
|
373
396
|
complete guard. The kill switch drains: no new claim, the in-flight child finishes inside its
|
|
374
397
|
own timeout, the result is recorded, exit 0. Supervision (launchd, systemd, Task Scheduler) is
|
|
375
398
|
documented practice, never shipped as a second timer, and Windows process-group termination is
|
|
376
399
|
not supported in v1.
|
|
377
400
|
|
|
401
|
+
## Repository registry
|
|
402
|
+
|
|
403
|
+
`team/repositories.json` is **local-only and git-ignored**; it is the definition of record for the
|
|
404
|
+
repository records, the resolved task→repository links and the unresolved attribution verdicts:
|
|
405
|
+
|
|
406
|
+
```json
|
|
407
|
+
{
|
|
408
|
+
"version": 1,
|
|
409
|
+
"repositories": [ { "id": "ai-rules", "name": "…", "locator": "…", "description": null,
|
|
410
|
+
"labels": null, "status": "active", "revision": 1,
|
|
411
|
+
"createdAt": "…", "updatedAt": "…" } ],
|
|
412
|
+
"links": [ { "taskSlug": "…", "repositoryId": "ai-rules", "addedAt": "…",
|
|
413
|
+
"source": "intake", "inference": "evidence-paths", "evidence": "…" } ],
|
|
414
|
+
"attributions": [ { "taskSlug": "…", "verdict": "unknown", "evidence": "",
|
|
415
|
+
"recordedAt": "…", "source": "backfill" } ]
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
`version` must be `1`, an unknown top-level key or two records with one id is a parse error,
|
|
420
|
+
and an absent file is an empty valid store (the first write creates it — `init` seeds nothing).
|
|
421
|
+
The writer serializes deterministically: declared key order, records sorted by `id`, links by
|
|
422
|
+
`(taskSlug, repositoryId)`, attributions by `taskSlug`, two-space indent, one trailing newline;
|
|
423
|
+
an unchanged rewrite performs no write at all.
|
|
424
|
+
|
|
425
|
+
One lock-guarded verb serves both writers — the CRUD API and `/task` intake or the backfill:
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
node .ai.local/scripts/team-db.mjs repositories apply --file <path|-> [--dry-run]
|
|
429
|
+
node .ai.local/scripts/team-db.mjs repositories put --file <path|-> [--dry-run]
|
|
430
|
+
node .ai.local/scripts/team-db.mjs repositories delete <id> [--force] [--revision <n>]
|
|
431
|
+
node .ai.local/scripts/team-db.mjs repositories list [--json]
|
|
432
|
+
node .ai.local/scripts/team-db.mjs repositories project [--json]
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
The order is kill switch → `.repositories.lock` (5 s, `E_REPOSITORIES_BUSY` / 503 `E_BUSY`)
|
|
436
|
+
→ read → validate and CAS → file write by temp file plus rename → projection of the touched
|
|
437
|
+
rows → release in `finally`. `status` is validated on write (`active | archived`, 422 with
|
|
438
|
+
`parameter: "status"`) and is not a SQL `CHECK`: the projection serves whatever a hand-edited
|
|
439
|
+
file says. Update requires the stored `revision` and advances it by one; create writes `1`;
|
|
440
|
+
delete compares `revision` only when supplied — a stale or missing token is `409 E_CONFLICT`
|
|
441
|
+
and changes no bytes. `DELETE` on a record linked to N tasks answers `409
|
|
442
|
+
E_REPOSITORY_IN_USE` with `details.linkedTasks = N`; `force=true` removes the record and
|
|
443
|
+
every link in the same write and reports `linksRemoved` — the tasks stay.
|
|
444
|
+
|
|
445
|
+
`/rr-migrate-repositories` seeds and refreshes the records from the clones on this machine:
|
|
446
|
+
`node .ai.local/scripts/rr-migrate-repositories.mjs` walks the scan roots (default: the parent of
|
|
447
|
+
the repository root, or the root itself when that parent is `$HOME`), treats a directory with `.git` as one repository and stops descending there,
|
|
448
|
+
skips submodule checkouts and linked worktrees, and collapses several clones of one remote to the
|
|
449
|
+
shallowest path. A scan record whose locator already exists keeps its id; a new id is the slug of
|
|
450
|
+
the directory name, parent-prefixed on a collision. Missing records go through one `repositories
|
|
451
|
+
apply`, a changed `name`/`locator`/`status` through `repositories put` with the stored `revision`,
|
|
452
|
+
and the run finishes with `repositories project`, so the file and the database stay in step. The
|
|
453
|
+
script never deletes a record: a clone outside the scanned roots is not gone. `--dry-run` prints the
|
|
454
|
+
plan, `--scan <dir>` (repeatable) and `--depth <n>` widen or narrow the walk, `--team-root <dir>`
|
|
455
|
+
points at another store, and `AI_RULES_TEAM_DB_DISABLE` leaves the file untouched with exit 0.
|
|
456
|
+
|
|
457
|
+
The projection adds three tables through two migrations: `repositories` and
|
|
458
|
+
`task_repositories` (`0009-repositories`, `PRIMARY KEY (task_slug, repository_id)`,
|
|
459
|
+
`ON DELETE CASCADE` on the repository, **no foreign key on `task_slug`**) and
|
|
460
|
+
`task_repository_attributions` (`0010-repository-attributions`, the verdict only). Links and
|
|
461
|
+
verdicts are replaced together in one transaction, so a task that gains a link loses its
|
|
462
|
+
attribution row and vice versa. A malformed file records its error and tombstones nothing.
|
|
463
|
+
`rm team.db* && node .ai.local/scripts/team-db.mjs init --rebuild` reproduces all three
|
|
464
|
+
tables from the file alone.
|
|
465
|
+
|
|
466
|
+
Five operations, two paths: `GET|POST /api/v1/repositories`, and
|
|
467
|
+
`GET|PUT|DELETE /api/v1/repositories/{id}`; reads answer `RepositorySummary` (the record plus
|
|
468
|
+
`linkedTaskCount`, which the app never counts), writes answer `Repository`. `POST` creates the
|
|
469
|
+
body's `id` (a duplicate is 409) and `PUT` refuses a body id that differs from the path id
|
|
470
|
+
(409); neither route derives an id from `name`. The task list accepts `?repository=<id>` and
|
|
471
|
+
the task detail carries a required `repositories` array plus a required
|
|
472
|
+
`repositoriesInference` (`evidence-paths | repo-scope-only | unknown | ambiguous`), where a
|
|
473
|
+
link always outranks the attribution.
|
|
474
|
+
|
|
475
|
+
`/task` records the repositories a task touched: it sends one `repositories apply` payload
|
|
476
|
+
carrying a link row per touched repository, or — when the task names none — one `attributions`
|
|
477
|
+
row with `verdict: "unknown"`; `pipeline.json` carries the derived `repositories` echo. The
|
|
478
|
+
gate is `yarn check:task-repositories` (cutoff `2026-11-22`): a task folder without the field
|
|
479
|
+
fails, `[]` with `"unknown"` passes, and a folder whose own earliest artifact predates the
|
|
480
|
+
cutoff is counted as legacy — the chain hook rewrites `status.json` on every step, so a
|
|
481
|
+
rewritten status never makes a legacy folder new. The slug named by `active-task.json` is
|
|
482
|
+
excluded and printed, because its intake is still in flight; it is judged once the task closes.
|
|
483
|
+
|
|
378
484
|
## Start or restart
|
|
379
485
|
|
|
380
486
|
`/rr-scheduler-start` runs `node .ai.local/scripts/rr-scheduler-start.mjs`. `init` seeds that
|
|
@@ -477,10 +583,14 @@ capability created after migration, with an escaped `LIKE` fallback.
|
|
|
477
583
|
Migration `0002-scheduler` adds the scheduler's three tables — `scheduled_jobs`, `job_runs`,
|
|
478
584
|
`job_run_events` — and five indexes, and moves `SCHEMA_VERSION` to 2. It is additive and
|
|
479
585
|
sha256-pinned like the first one: a tampered literal aborts with `E_MIGRATION_CHECKSUM` before
|
|
480
|
-
any DDL. A v1 database
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
586
|
+
any DDL. A v1 database migrates in place through the chain and keeps its rows; the stored
|
|
587
|
+
fingerprint is a record of the DDL, so a record that lags the chain is a stale record — it is
|
|
588
|
+
rewritten in place and no rows move. A record that disagrees with a DDL the chain does not
|
|
589
|
+
produce — a table or index altered by hand — is moved aside as `team.db.mismatch-<stamp>` and
|
|
590
|
+
rebuilt, which is why the files stay the source of truth; under `--no-rebuild` or a read-only
|
|
591
|
+
open it fails as `E_SCHEMA_MISMATCH` instead. A database with no fingerprint record is stamped
|
|
592
|
+
with the DDL it opened with, without a comparison. Run `sync` after an upgrade and the counters
|
|
593
|
+
reconverge.
|
|
484
594
|
|
|
485
595
|
Migration `0003-backlog` stays immutable; migration `0004-tracker` creates the tracker
|
|
486
596
|
tables (`tracker_items`, `tracker_item_deps`, `tracker_queue`, `tracker_queue_events`,
|
|
@@ -525,6 +635,32 @@ gains ten columns (`intent`, `agent`, `parent_session_id`, `duration_ms`, `gap_m
|
|
|
525
635
|
file opens and migrates in place without a row copy; a v6 file is refused by a v5 binary with
|
|
526
636
|
`E_SCHEMA_NEWER`. There is no downgrade SQL: delete `team.db*` and run `sync`.
|
|
527
637
|
|
|
638
|
+
Migration `0008-ledger-owner` moves `SCHEMA_VERSION` to 8. It is additive: `review_ledger`
|
|
639
|
+
gains three nullable `TEXT` columns — `owner`, `due`, `follow_up` — so a version-7 file
|
|
640
|
+
migrates in place and historical rows insert `NULL`. There is no backfill and no row rewrite;
|
|
641
|
+
legacy is a function of the date, never of file mtime, and the header never decides it. A row is
|
|
642
|
+
legacy when it has no usable `at` — the one date git cannot supply — or when its `at` is before
|
|
643
|
+
`2026-11-22`. The header only decides a dated row: a post-cutoff row under a stale header still
|
|
644
|
+
fails, so a table moves to the canonical header rather than relying on width.
|
|
645
|
+
`ledger-check` is the single validator:
|
|
646
|
+
a row dated on or after `2026-11-22` whose disposition is `open`, `accepted` or `deferred`
|
|
647
|
+
needs an `owner` that is not one of the frozen placeholder tokens (`-`, `—`, `?`, `n/a`, `na`,
|
|
648
|
+
`none`, `null`, `tbd`, `tba`, `todo`, `unowned`, `unassigned`, `someone`, `anyone`, `owner`,
|
|
649
|
+
`team`; matching is equality after trim/quotes/one leading `@`/case, so `team-lead` passes)
|
|
650
|
+
and a `due` as `YYYY-MM-DD` on or after the check date (UTC); `accepted` and `deferred` also
|
|
651
|
+
need a `followUp` — `<slug>` or `blocked-on: <slug>`, one slug, resolving under
|
|
652
|
+
`<teamRoot>/tasks/`. Legacy rows are never failed and are counted in `legacyRows`; `undatedRows`
|
|
653
|
+
is their no-date subset. Both counters cover every parsed row, whatever its disposition — they
|
|
654
|
+
describe the ledger's age, not its debt. The output
|
|
655
|
+
carries both counters next to `checked=` / `failed=`, and `--json` adds them to the envelope.
|
|
656
|
+
The command
|
|
657
|
+
is file-only — it needs no `node:sqlite`. The chain hook spawns it on the receipt of the step
|
|
658
|
+
that owns the `review` artifact — `completed` and `changes_requested`, the two receipts a
|
|
659
|
+
review produces — and relays `failures[].reason` verbatim, so the message text lives once, in
|
|
660
|
+
`team-db-project.mjs`; a verifier or implementer receipt is not gated, because it may not
|
|
661
|
+
write a reviewer's row. A tree without the CLI or without a ledger skips the gate and says so
|
|
662
|
+
on stderr.
|
|
663
|
+
|
|
528
664
|
`serve` and `schedule` keep the schema module they loaded at startup. When `team-db-schema.mjs`
|
|
529
665
|
on disk is replaced by a higher `SCHEMA_VERSION`, the next request and the next idle scheduler
|
|
530
666
|
tick re-import that file and open with it. A database newer than the file on disk still fails
|
|
@@ -633,7 +769,9 @@ no `Access-Control-*` header, hardened response headers, request bodies bounded
|
|
|
633
769
|
document chunks at 1 MiB, exports at 5 MiB, parameterized SQL only, and no outbound call.
|
|
634
770
|
`--allow-remote` also exposes the four job mutations — `POST /api/v1/jobs`,
|
|
635
771
|
`PUT /api/v1/jobs/{id}`, `DELETE /api/v1/jobs/{id}`, and `POST /api/v1/jobs/{id}/run` —
|
|
636
|
-
the
|
|
772
|
+
the three repository writes (`POST /api/v1/repositories`, `PUT /api/v1/repositories/{id}`,
|
|
773
|
+
`DELETE /api/v1/repositories/{id}`), the confirmed task delete and the rescan to the named
|
|
774
|
+
interface without authentication.
|
|
637
775
|
A job definition carries arbitrary `argv` and run-now enqueues it, so that surface
|
|
638
776
|
executes operator-supplied commands as the API user; see `## Scheduled jobs`.
|
|
639
777
|
|