@bonesofspring/ai-rules 0.2.77 → 0.2.78
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 +42 -0
- package/README.md +1 -1
- package/bin/lib/engine-scripts.js +3 -0
- package/docs/LOCAL-OVERLAY.md +4 -4
- package/docs/PRESET-CONTRIBUTION.md +9 -8
- package/docs/TEAM-DB.md +43 -8
- package/package.json +2 -1
- package/presets/_shared/ai-local/scripts/aggregate-agent-task-metrics.mjs +23 -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/rule-improver.mjs +366 -13
- package/presets/_shared/ai-local/scripts/run.mjs +29 -6
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +208 -3
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +76 -15
- package/presets/_shared/ai-local/scripts/team-db.mjs +19 -4
- 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 +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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/svelte/adapter-map.json +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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 +1 -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/hooks/chain-team-phases.sh +313 -26
- 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,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.78
|
|
4
|
+
|
|
5
|
+
### `engine` — a follow-up must name a different task
|
|
6
|
+
|
|
7
|
+
- **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.
|
|
8
|
+
- **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.
|
|
9
|
+
|
|
10
|
+
### `engine` — a multi-hour attempt is a human-wait suspect, not agent time
|
|
11
|
+
|
|
12
|
+
- **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.
|
|
13
|
+
- **Fixture.** `a multi-hour attempt is flagged, not counted as agent time` pins the threshold, the per-task counters and the hint.
|
|
14
|
+
|
|
15
|
+
### `engine` — the write-scope audit knows engine telemetry
|
|
16
|
+
|
|
17
|
+
- **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`.
|
|
18
|
+
- **Fixture.** `test-write-scope.mjs` asserts the `derived: engine-telemetry` label and the new `derived: 6` count.
|
|
19
|
+
|
|
20
|
+
### `preset` — a green gate set is not an AC verdict
|
|
21
|
+
|
|
22
|
+
- **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.
|
|
23
|
+
- **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.
|
|
24
|
+
|
|
25
|
+
### `preset` — the report-header grammar is stated where it is enforced
|
|
26
|
+
|
|
27
|
+
- **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`.
|
|
28
|
+
- **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.
|
|
29
|
+
|
|
3
30
|
## 0.2.77
|
|
4
31
|
|
|
32
|
+
### `preset` + `engine` — verification evidence names its tree
|
|
33
|
+
|
|
34
|
+
- **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.
|
|
35
|
+
- **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.
|
|
36
|
+
- **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.
|
|
37
|
+
- **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}`.
|
|
38
|
+
|
|
5
39
|
### `preset` — one stack means one document on every platform
|
|
6
40
|
|
|
7
41
|
- **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 +78,14 @@ The `0.2.77` release gate ran phase 1 on `ddb234bf` and found five sub-checks re
|
|
|
44
78
|
- **`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
79
|
- **`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
80
|
|
|
81
|
+
### `preset` + `engine` — three hook facts stop being reconstructed by hand
|
|
82
|
+
|
|
83
|
+
- **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.
|
|
84
|
+
- **`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.
|
|
85
|
+
- **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.
|
|
86
|
+
- **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.
|
|
87
|
+
- **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.
|
|
88
|
+
|
|
47
89
|
## 0.2.76
|
|
48
90
|
|
|
49
91
|
### `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; twenty-
|
|
28
|
+
| Self-learning engine | **`.ai.local/scripts/`** (shared; twenty-nine 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`, 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.
|
|
@@ -86,6 +86,9 @@ const ENGINE_SCRIPTS = [
|
|
|
86
86
|
// Persisted verification evidence: command + exit + capped log tail bound to a
|
|
87
87
|
// git snapshot, with a freshness check closure can read.
|
|
88
88
|
'verification.mjs',
|
|
89
|
+
// Read-only audit of the reports `verification.mjs` sits beside: which ones
|
|
90
|
+
// name no tree, a stale tree, or a zero-input gate row. Never writes.
|
|
91
|
+
'check-verification.mjs',
|
|
89
92
|
// Append-only incident registry: recurrence threshold, promotion gate, advice.
|
|
90
93
|
'incidents.mjs',
|
|
91
94
|
];
|
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 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
|
|
@@ -367,8 +371,9 @@ reconciles it before the first fire, and `jobs reconcile` does the same on deman
|
|
|
367
371
|
manifest and the row become `interrupted` with reason `E_ORPHANED`. `sync --rebuild` and
|
|
368
372
|
`sync --vacuum` refuse with `E_SCHEDULER_RUNNING` (exit 4) while a fresh lease exists. That
|
|
369
373
|
guard covers the explicit destructive flags only: a plain `init` or `sync` opens writable, and
|
|
370
|
-
a database whose
|
|
374
|
+
a database whose DDL the migration chain does not produce is moved aside as
|
|
371
375
|
`team.db.mismatch-<stamp>` and rebuilt (see § Schema) even while a scheduler holds the lease.
|
|
376
|
+
A store whose DDL is the chain's own only has its fingerprint refreshed in place.
|
|
372
377
|
Stop the scheduler before any schema upgrade; the explicit flags are a backstop, not a
|
|
373
378
|
complete guard. The kill switch drains: no new claim, the in-flight child finishes inside its
|
|
374
379
|
own timeout, the result is recorded, exit 0. Supervision (launchd, systemd, Task Scheduler) is
|
|
@@ -477,10 +482,14 @@ capability created after migration, with an escaped `LIKE` fallback.
|
|
|
477
482
|
Migration `0002-scheduler` adds the scheduler's three tables — `scheduled_jobs`, `job_runs`,
|
|
478
483
|
`job_run_events` — and five indexes, and moves `SCHEMA_VERSION` to 2. It is additive and
|
|
479
484
|
sha256-pinned like the first one: a tampered literal aborts with `E_MIGRATION_CHECKSUM` before
|
|
480
|
-
any DDL. A v1 database
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
485
|
+
any DDL. A v1 database migrates in place through the chain and keeps its rows; the stored
|
|
486
|
+
fingerprint is a record of the DDL, so a record that lags the chain is a stale record — it is
|
|
487
|
+
rewritten in place and no rows move. A record that disagrees with a DDL the chain does not
|
|
488
|
+
produce — a table or index altered by hand — is moved aside as `team.db.mismatch-<stamp>` and
|
|
489
|
+
rebuilt, which is why the files stay the source of truth; under `--no-rebuild` or a read-only
|
|
490
|
+
open it fails as `E_SCHEMA_MISMATCH` instead. A database with no fingerprint record is stamped
|
|
491
|
+
with the DDL it opened with, without a comparison. Run `sync` after an upgrade and the counters
|
|
492
|
+
reconverge.
|
|
484
493
|
|
|
485
494
|
Migration `0003-backlog` stays immutable; migration `0004-tracker` creates the tracker
|
|
486
495
|
tables (`tracker_items`, `tracker_item_deps`, `tracker_queue`, `tracker_queue_events`,
|
|
@@ -525,6 +534,32 @@ gains ten columns (`intent`, `agent`, `parent_session_id`, `duration_ms`, `gap_m
|
|
|
525
534
|
file opens and migrates in place without a row copy; a v6 file is refused by a v5 binary with
|
|
526
535
|
`E_SCHEMA_NEWER`. There is no downgrade SQL: delete `team.db*` and run `sync`.
|
|
527
536
|
|
|
537
|
+
Migration `0008-ledger-owner` moves `SCHEMA_VERSION` to 8. It is additive: `review_ledger`
|
|
538
|
+
gains three nullable `TEXT` columns — `owner`, `due`, `follow_up` — so a version-7 file
|
|
539
|
+
migrates in place and historical rows insert `NULL`. There is no backfill and no row rewrite;
|
|
540
|
+
legacy is a function of the date, never of file mtime, and the header never decides it. A row is
|
|
541
|
+
legacy when it has no usable `at` — the one date git cannot supply — or when its `at` is before
|
|
542
|
+
`2026-11-22`. The header only decides a dated row: a post-cutoff row under a stale header still
|
|
543
|
+
fails, so a table moves to the canonical header rather than relying on width.
|
|
544
|
+
`ledger-check` is the single validator:
|
|
545
|
+
a row dated on or after `2026-11-22` whose disposition is `open`, `accepted` or `deferred`
|
|
546
|
+
needs an `owner` that is not one of the frozen placeholder tokens (`-`, `—`, `?`, `n/a`, `na`,
|
|
547
|
+
`none`, `null`, `tbd`, `tba`, `todo`, `unowned`, `unassigned`, `someone`, `anyone`, `owner`,
|
|
548
|
+
`team`; matching is equality after trim/quotes/one leading `@`/case, so `team-lead` passes)
|
|
549
|
+
and a `due` as `YYYY-MM-DD` on or after the check date (UTC); `accepted` and `deferred` also
|
|
550
|
+
need a `followUp` — `<slug>` or `blocked-on: <slug>`, one slug, resolving under
|
|
551
|
+
`<teamRoot>/tasks/`. Legacy rows are never failed and are counted in `legacyRows`; `undatedRows`
|
|
552
|
+
is their no-date subset. Both counters cover every parsed row, whatever its disposition — they
|
|
553
|
+
describe the ledger's age, not its debt. The output
|
|
554
|
+
carries both counters next to `checked=` / `failed=`, and `--json` adds them to the envelope.
|
|
555
|
+
The command
|
|
556
|
+
is file-only — it needs no `node:sqlite`. The chain hook spawns it on the receipt of the step
|
|
557
|
+
that owns the `review` artifact — `completed` and `changes_requested`, the two receipts a
|
|
558
|
+
review produces — and relays `failures[].reason` verbatim, so the message text lives once, in
|
|
559
|
+
`team-db-project.mjs`; a verifier or implementer receipt is not gated, because it may not
|
|
560
|
+
write a reviewer's row. A tree without the CLI or without a ledger skips the gate and says so
|
|
561
|
+
on stderr.
|
|
562
|
+
|
|
528
563
|
`serve` and `schedule` keep the schema module they loaded at startup. When `team-db-schema.mjs`
|
|
529
564
|
on disk is replaced by a higher `SCHEMA_VERSION`, the next request and the next idle scheduler
|
|
530
565
|
tick re-import that file and open with it. A database newer than the file on disk still fails
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonesofspring/ai-rules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.78",
|
|
4
4
|
"description": "Presets of Cursor, Claude, Mavis, OpenCode, and ZCode rules/commands for Revy Ross personal use",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Revy Ross",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"test:shared-core-drift-lineage-fixtures": "node scripts/test-shared-core-drift-lineage-fixtures.mjs",
|
|
85
85
|
"test:generated-drift-fixtures": "node scripts/test-generated-drift-fixtures.mjs",
|
|
86
86
|
"test:generate-claude-fixtures": "node scripts/test-generate-claude-fixtures.mjs",
|
|
87
|
+
"test:probe-order": "node scripts/test-probe-order.mjs",
|
|
87
88
|
"test:generated-drift-claude-fixtures": "node scripts/test-generated-drift-claude-fixtures.mjs",
|
|
88
89
|
"test:rule-improver": "node scripts/test-rule-improver-ledger.mjs",
|
|
89
90
|
"test:guard-shell-command": "node scripts/test-guard-shell-command.mjs",
|
|
@@ -36,12 +36,16 @@ const teamRoot =
|
|
|
36
36
|
const slugIndex = args.indexOf('--slug');
|
|
37
37
|
const slugFilter = slugIndex >= 0 ? args[slugIndex + 1] ?? null : null;
|
|
38
38
|
const tasksDir = path.join(teamRoot, 'tasks');
|
|
39
|
+
// An attempt this long almost always contains human wait (an overnight pause, a
|
|
40
|
+
// gate decision answered between attempts) that no gate event covers.
|
|
41
|
+
const LONG_ATTEMPT_MS = 3 * 60 * 60 * 1000;
|
|
39
42
|
const incomplete = [];
|
|
40
43
|
const attempts = [];
|
|
41
44
|
const tasks = [];
|
|
42
45
|
const taskReports = [];
|
|
43
46
|
const gateWaits = [];
|
|
44
47
|
const outOfBandDurations = [];
|
|
48
|
+
const longAttempts = [];
|
|
45
49
|
const attributionConfidenceCounts = new Map();
|
|
46
50
|
let unmatchedAttemptCount = 0;
|
|
47
51
|
let duplicateTerminalAttemptCount = 0;
|
|
@@ -200,6 +204,7 @@ function collect(metrics, filePath) {
|
|
|
200
204
|
const gateStarts = new Map();
|
|
201
205
|
const terminalAttempts = new Set();
|
|
202
206
|
const attemptDurations = [];
|
|
207
|
+
const taskLongAttempts = [];
|
|
203
208
|
const hostUsage = new Map();
|
|
204
209
|
const usageEventsByAttempt = new Map();
|
|
205
210
|
let taskCompleted = false;
|
|
@@ -260,6 +265,16 @@ function collect(metrics, filePath) {
|
|
|
260
265
|
(attributionConfidenceCounts.get(attributionConfidence) ?? 0) + 1,
|
|
261
266
|
);
|
|
262
267
|
if (Number.isFinite(event.durationMs)) attemptDurations.push(event.durationMs);
|
|
268
|
+
if (Number.isFinite(event.durationMs) && event.durationMs > LONG_ATTEMPT_MS) {
|
|
269
|
+
const longAttempt = {
|
|
270
|
+
slug: metrics.task.slug,
|
|
271
|
+
attemptId: event.attemptId,
|
|
272
|
+
agent: start.agent ?? 'unknown',
|
|
273
|
+
durationMs: event.durationMs,
|
|
274
|
+
};
|
|
275
|
+
taskLongAttempts.push(longAttempt);
|
|
276
|
+
longAttempts.push(longAttempt);
|
|
277
|
+
}
|
|
263
278
|
const usage = normalizeUsage(
|
|
264
279
|
hostUsage.get(event.attemptId) ??
|
|
265
280
|
(event.usage && typeof event.usage === 'object' ? event.usage : null),
|
|
@@ -331,6 +346,8 @@ function collect(metrics, filePath) {
|
|
|
331
346
|
outOfBandMs: taskOutOfBandMs,
|
|
332
347
|
outOfBandCount: taskOutOfBandCount,
|
|
333
348
|
attemptCount: terminalAttempts.size,
|
|
349
|
+
longestAttemptMs: attemptDurations.length ? Math.max(...attemptDurations) : null,
|
|
350
|
+
longAttemptCount: taskLongAttempts.length,
|
|
334
351
|
completed: taskCompleted,
|
|
335
352
|
incomplete: ledgerIncomplete,
|
|
336
353
|
usage: {
|
|
@@ -463,6 +480,12 @@ process.stdout.write(
|
|
|
463
480
|
sumDurationMs: outOfBandDurations.reduce((sum, value) => sum + value, 0),
|
|
464
481
|
},
|
|
465
482
|
attributionConfidence: Object.fromEntries(attributionConfidenceCounts),
|
|
483
|
+
longAttempts: {
|
|
484
|
+
thresholdMs: LONG_ATTEMPT_MS,
|
|
485
|
+
count: longAttempts.length,
|
|
486
|
+
attempts: longAttempts,
|
|
487
|
+
hint: 'an attempt this long may contain human wait that no human_gate event covers; read activeMs as an upper bound, not as agent time',
|
|
488
|
+
},
|
|
466
489
|
completeness: {
|
|
467
490
|
missingLedgerCount,
|
|
468
491
|
malformedLedgerCount,
|