@bonesofspring/ai-rules 0.2.50 → 0.2.52
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 +122 -1
- package/README.md +3 -1
- package/bin/cli.js +65 -13
- package/bin/lib/ai-local-drift.js +706 -0
- package/bin/lib/seed-ai-local-team.js +169 -40
- package/bin/mavis-install.js +8 -0
- package/bin/opencode-install.js +15 -2
- package/docs/LOCAL-OVERLAY.md +77 -1
- package/docs/PRESET-CONTRIBUTION.md +11 -9
- package/package.json +5 -1
- package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +1 -1
- package/presets/_shared/ai-local/scripts/manifest.mjs +13 -3
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +872 -99
- package/presets/_shared/ai-local/scripts/run.mjs +76 -3
- package/presets/_shared/ai-local/scripts/signals.mjs +123 -7
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/quality/anti-hallucination-contract.md +2 -0
- package/presets/_shared/core/quality/interactive-questions.md +8 -8
- package/presets/_shared/core/review/code-review-mr.md +20 -1
- package/presets/_shared/core/review/receiving-code-review.md +7 -0
- package/presets/claude/android-kotlin/agents/code-reviewer.md +15 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/android-kotlin/skills/code-review/SKILL.md +11 -1
- package/presets/claude/go/agents/code-reviewer.md +37 -2
- package/presets/claude/go/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/go/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/go/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/go/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/go/skills/code-review/SKILL.md +10 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +15 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/ios-swift/skills/code-review/SKILL.md +11 -1
- package/presets/claude/java/agents/code-reviewer.md +37 -2
- package/presets/claude/java/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/java/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/java/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/java/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/java/skills/code-review/SKILL.md +10 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/mcp-ts/skills/code-review/SKILL.md +8 -0
- package/presets/claude/next/MCP.md +7 -0
- package/presets/claude/next/README.md +1 -1
- package/presets/claude/next/REPO_AGENTS.md +1 -1
- package/presets/claude/next/agents/README.md +3 -3
- package/presets/claude/next/agents/build-verifier.md +9 -3
- package/presets/claude/next/agents/code-reviewer.md +16 -1
- package/presets/claude/next/agents/codebase-analyzer.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +18 -8
- package/presets/claude/next/agents/openspec-author.md +1 -1
- package/presets/claude/next/agents/playwright-test-generator.md +22 -68
- package/presets/claude/next/agents/playwright-test-healer.md +27 -54
- package/presets/claude/next/agents/playwright-test-planner.md +18 -51
- package/presets/claude/next/agents/task-analyst.md +25 -9
- package/presets/claude/next/agents/task-router.md +1 -1
- package/presets/claude/next/agents/tech-writer.md +1 -1
- package/presets/claude/next/mcp.json +3 -3
- package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +1 -1
- package/presets/claude/next/rules/architecture/layer-barrel-exports.md +1 -1
- package/presets/claude/next/rules/architecture/reference-features.md +1 -1
- package/presets/claude/next/rules/stack/navigation-router-ui.md +1 -1
- package/presets/claude/next/rules/stack/navigation-router.md +14 -0
- package/presets/claude/next/rules/stack/next-app-core.md +19 -17
- package/presets/claude/next/rules/stack/next-app-router.md +5 -17
- package/presets/claude/next/rules/stack/next-static-export.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +20 -1
- package/presets/claude/next/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/next/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/security-next.md +28 -3
- package/presets/claude/next/rules/ui-and-accessibility/css-property-order.md +1 -1
- package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +4 -4
- package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +2 -2
- package/presets/claude/next/skills/code-review/SKILL.md +12 -2
- package/presets/claude/next/team/README.md +11 -0
- package/presets/claude/next/team/fixtures/feature-with-figma-url.json +10 -0
- package/presets/claude/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
- package/presets/claude/next/team/fixtures/mockup-review-standalone.json +9 -0
- package/presets/claude/next/team/fixtures/ux-design-standalone.json +9 -0
- package/presets/claude/nuxt/agents/code-reviewer.md +15 -0
- package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +1 -1
- package/presets/claude/nuxt/rules/stack/navigation-router-ui.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +20 -1
- package/presets/claude/nuxt/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/nuxt/skills/code-review/SKILL.md +11 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +37 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +10 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +37 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +20 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/php-laravel/skills/code-review/SKILL.md +10 -1
- package/presets/claude/svelte/agents/code-reviewer.md +15 -0
- package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +20 -1
- package/presets/claude/svelte/rules/tooling-and-review/interactive-questions.md +8 -8
- package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/svelte/skills/code-review/SKILL.md +11 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +15 -0
- package/presets/cursor/android-kotlin/rules/README.md +1 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +3 -3
- package/presets/cursor/android-kotlin/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/android-kotlin/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +11 -1
- package/presets/cursor/go/agents/code-reviewer.md +37 -2
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -2
- package/presets/cursor/go/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/go/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/go/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/skills/code-review/SKILL.md +10 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +15 -0
- package/presets/cursor/ios-swift/rules/README.md +1 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +3 -3
- package/presets/cursor/ios-swift/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/ios-swift/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/ios-swift/skills/code-review/SKILL.md +11 -1
- package/presets/cursor/java/agents/code-reviewer.md +37 -2
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -2
- package/presets/cursor/java/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/java/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/java/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/java/skills/code-review/SKILL.md +10 -1
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -2
- package/presets/cursor/mcp-ts/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/mcp-ts/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +8 -0
- package/presets/cursor/next/MCP.md +7 -0
- package/presets/cursor/next/REPO_AGENTS.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +15 -0
- package/presets/cursor/next/agents/playwright-test-healer.md +1 -0
- package/presets/cursor/next/ai-local/rules-library/router-pages.md +5 -5
- package/presets/cursor/next/mcp.json +3 -3
- package/presets/cursor/next/rules/README.md +1 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/next/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/next/rules/css-property-order-stylelint.mdc +1 -1
- package/presets/cursor/next/rules/design-tokens-binding.mdc +4 -4
- package/presets/cursor/next/rules/forms-validation.mdc +2 -2
- package/presets/cursor/next/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/next/rules/navigation-router-stack.mdc +14 -1
- package/presets/cursor/next/rules/next-app-core.mdc +19 -17
- package/presets/cursor/next/rules/next-app-router.mdc +5 -17
- package/presets/cursor/next/rules/next-static-export.mdc +1 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/next/rules/preset-token-budget.mdc +1 -1
- package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +1 -1
- package/presets/cursor/next/rules/reference-features.mdc +1 -1
- package/presets/cursor/next/rules/security-next.mdc +28 -3
- package/presets/cursor/next/skills/code-review/SKILL.md +12 -2
- package/presets/cursor/next/team/README.md +11 -0
- package/presets/cursor/next/team/fixtures/feature-with-figma-url.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
- package/presets/cursor/next/team/fixtures/mockup-review-standalone.json +9 -0
- package/presets/cursor/next/team/fixtures/ux-design-standalone.json +9 -0
- package/presets/cursor/nuxt/agents/code-reviewer.md +15 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/nuxt/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/nuxt/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/nuxt/skills/code-review/SKILL.md +11 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +37 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -2
- package/presets/cursor/php-hexagonal/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/php-hexagonal/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +10 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +37 -2
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -2
- package/presets/cursor/php-laravel/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/php-laravel/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/php-laravel/skills/code-review/SKILL.md +10 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +15 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/svelte/rules/anti-hallucination-contract.mdc +2 -0
- package/presets/cursor/svelte/rules/code-review-mr.mdc +20 -1
- package/presets/cursor/svelte/rules/interactive-questions.mdc +8 -8
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/svelte/skills/code-review/SKILL.md +11 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +15 -0
- package/presets/mavis/android-kotlin/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +20 -1
- package/presets/mavis/android-kotlin/rules/interactive-questions.md +8 -8
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/android-kotlin/skills/code-review/SKILL.md +11 -1
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +37 -2
- package/presets/mavis/go/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/go/rules/code-review-mr.md +20 -1
- package/presets/mavis/go/rules/interactive-questions.md +8 -8
- package/presets/mavis/go/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/go/skills/code-review/SKILL.md +10 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +15 -0
- package/presets/mavis/ios-swift/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/ios-swift/rules/code-review-mr.md +20 -1
- package/presets/mavis/ios-swift/rules/interactive-questions.md +8 -8
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/ios-swift/skills/code-review/SKILL.md +11 -1
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +37 -2
- package/presets/mavis/java/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/java/rules/code-review-mr.md +20 -1
- package/presets/mavis/java/rules/interactive-questions.md +8 -8
- package/presets/mavis/java/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/java/skills/code-review/SKILL.md +10 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +20 -1
- package/presets/mavis/mcp-ts/rules/interactive-questions.md +8 -8
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/mcp-ts/skills/code-review/SKILL.md +8 -0
- package/presets/mavis/next/MCP.md +7 -0
- package/presets/mavis/next/REPO_AGENTS.md +1 -1
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +15 -0
- package/presets/mavis/next/agents/playwright-test-healer.md +1 -0
- package/presets/mavis/next/ai-local/rules-library/router-pages.md +5 -5
- package/presets/mavis/next/mcp.json +3 -3
- package/presets/mavis/next/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/next/rules/code-review-mr.md +20 -1
- package/presets/mavis/next/rules/css-property-order-stylelint.md +1 -1
- package/presets/mavis/next/rules/design-tokens-binding.md +4 -4
- package/presets/mavis/next/rules/forms-validation.md +2 -2
- package/presets/mavis/next/rules/interactive-questions.md +8 -8
- package/presets/mavis/next/rules/navigation-router-stack.md +12 -0
- package/presets/mavis/next/rules/next-app-core.md +18 -17
- package/presets/mavis/next/rules/next-app-router.md +4 -17
- package/presets/mavis/next/rules/next-static-export.md +1 -1
- package/presets/mavis/next/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/next/rules/react-next-anti-hallucination.md +1 -1
- package/presets/mavis/next/rules/reference-features.md +1 -1
- package/presets/mavis/next/rules/security-next.md +24 -3
- package/presets/mavis/next/skills/code-review/SKILL.md +12 -2
- package/presets/mavis/next/team/README.md +11 -0
- package/presets/mavis/next/team/fixtures/feature-with-figma-url.json +10 -0
- package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
- package/presets/mavis/next/team/fixtures/mockup-review-standalone.json +9 -0
- package/presets/mavis/next/team/fixtures/ux-design-standalone.json +9 -0
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +15 -0
- package/presets/mavis/nuxt/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/nuxt/rules/code-review-mr.md +20 -1
- package/presets/mavis/nuxt/rules/interactive-questions.md +8 -8
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/nuxt/skills/code-review/SKILL.md +11 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +37 -2
- package/presets/mavis/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +20 -1
- package/presets/mavis/php-hexagonal/rules/interactive-questions.md +8 -8
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/php-hexagonal/skills/code-review/SKILL.md +10 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +37 -2
- package/presets/mavis/php-laravel/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/php-laravel/rules/code-review-mr.md +20 -1
- package/presets/mavis/php-laravel/rules/interactive-questions.md +8 -8
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/php-laravel/skills/code-review/SKILL.md +10 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +15 -0
- package/presets/mavis/svelte/rules/anti-hallucination-contract.md +2 -0
- package/presets/mavis/svelte/rules/code-review-mr.md +20 -1
- package/presets/mavis/svelte/rules/interactive-questions.md +8 -8
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +1 -1
- package/presets/mavis/svelte/skills/code-review/SKILL.md +11 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +15 -0
- package/presets/opencode/android-kotlin/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +20 -1
- package/presets/opencode/android-kotlin/rules/interactive-questions.md +8 -8
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/android-kotlin/skills/code-review/SKILL.md +11 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +37 -2
- package/presets/opencode/go/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/go/rules/code-review-mr.md +20 -1
- package/presets/opencode/go/rules/interactive-questions.md +8 -8
- package/presets/opencode/go/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/go/skills/code-review/SKILL.md +10 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +15 -0
- package/presets/opencode/ios-swift/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/ios-swift/rules/code-review-mr.md +20 -1
- package/presets/opencode/ios-swift/rules/interactive-questions.md +8 -8
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/ios-swift/skills/code-review/SKILL.md +11 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +37 -2
- package/presets/opencode/java/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/java/rules/code-review-mr.md +20 -1
- package/presets/opencode/java/rules/interactive-questions.md +8 -8
- package/presets/opencode/java/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/java/skills/code-review/SKILL.md +10 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +20 -1
- package/presets/opencode/mcp-ts/rules/interactive-questions.md +8 -8
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/mcp-ts/skills/code-review/SKILL.md +8 -0
- package/presets/opencode/next/MCP.md +7 -0
- package/presets/opencode/next/REPO_AGENTS.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +15 -0
- package/presets/opencode/next/agents/playwright-test-healer.md +1 -0
- package/presets/opencode/next/ai-local/rules-library/router-pages.md +5 -5
- package/presets/opencode/next/opencode.json +3 -3
- package/presets/opencode/next/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/next/rules/code-review-mr.md +20 -1
- package/presets/opencode/next/rules/css-property-order-stylelint.md +1 -1
- package/presets/opencode/next/rules/design-tokens-binding.md +4 -4
- package/presets/opencode/next/rules/forms-validation.md +2 -2
- package/presets/opencode/next/rules/interactive-questions.md +8 -8
- package/presets/opencode/next/rules/navigation-router-stack.md +12 -0
- package/presets/opencode/next/rules/next-app-core.md +18 -17
- package/presets/opencode/next/rules/next-app-router.md +4 -17
- package/presets/opencode/next/rules/next-static-export.md +1 -1
- package/presets/opencode/next/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/next/rules/react-next-anti-hallucination.md +1 -1
- package/presets/opencode/next/rules/reference-features.md +1 -1
- package/presets/opencode/next/rules/security-next.md +24 -3
- package/presets/opencode/next/skills/code-review/SKILL.md +12 -2
- package/presets/opencode/next/team/README.md +11 -0
- package/presets/opencode/next/team/fixtures/feature-with-figma-url.json +10 -0
- package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
- package/presets/opencode/next/team/fixtures/mockup-review-standalone.json +9 -0
- package/presets/opencode/next/team/fixtures/ux-design-standalone.json +9 -0
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +15 -0
- package/presets/opencode/nuxt/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/nuxt/rules/code-review-mr.md +20 -1
- package/presets/opencode/nuxt/rules/interactive-questions.md +8 -8
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/nuxt/skills/code-review/SKILL.md +11 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +37 -2
- package/presets/opencode/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +20 -1
- package/presets/opencode/php-hexagonal/rules/interactive-questions.md +8 -8
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/php-hexagonal/skills/code-review/SKILL.md +10 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +37 -2
- package/presets/opencode/php-laravel/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/php-laravel/rules/code-review-mr.md +20 -1
- package/presets/opencode/php-laravel/rules/interactive-questions.md +8 -8
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/php-laravel/skills/code-review/SKILL.md +10 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +15 -0
- package/presets/opencode/svelte/rules/anti-hallucination-contract.md +2 -0
- package/presets/opencode/svelte/rules/code-review-mr.md +20 -1
- package/presets/opencode/svelte/rules/interactive-questions.md +8 -8
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +1 -1
- package/presets/opencode/svelte/skills/code-review/SKILL.md +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,126 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.2.
|
|
3
|
+
## 0.2.52
|
|
4
|
+
|
|
5
|
+
### The `next` preset catches up with Next 16 and its own gates
|
|
6
|
+
|
|
7
|
+
- **`proxy.ts` and lowercase auth/session files.** `security-next` attaches on `**/auth*.{ts,tsx}`, `**/session*.{ts,tsx}`, `app/**/proxy.ts`, and `app/src/**/proxy*.{ts,tsx}`; its prose states that a token refresh may live in `middleware` / `proxy`, that neither is an authorisation boundary, and that a layout-only check is not one either. `next-static-export` and both anti-hallucination banlists list `proxy.ts`.
|
|
8
|
+
- **Pages Router work loads the routing rule.** `navigation-router-stack` attaches on `app/src/pages/**/*`; the `router-pages` seed now points at `app/src/pages`, `app/src/ui/pages`, and `app/src/app`.
|
|
9
|
+
- **Correct env advice.** `next-app-core` states that `NEXT_PUBLIC_*` in `.env*` is inlined at build, that `next.config.*` `env` is optional, and that Server Components may read server-only env while Client Components never read `process.env`. The rule is compressed to keep the attached-budget headroom; the per-layer detail stays in `architecture-boundaries`.
|
|
10
|
+
- **Metadata is server-only.** `next-app-router` states that `export const metadata` cannot live in a `'use client'` file and belongs in a server `layout.tsx` / `page.tsx` or a wrapper; the example no longer contradicts the prose.
|
|
11
|
+
- **Claude agent parity is a gate.** The six `next` Claude agents (`playwright-test-healer`, `playwright-test-generator`, `playwright-test-planner`, `feature-developer`, `build-verifier`, `task-analyst`) are refreshed from their Cursor bodies; `test.fixme()` is gone, the blanket "do not ask" becomes the `interactive-questions` policy, Playwright output follows `app/__tests__/e2e/**` + `*.cases.md`, and the implementation rail, preset DoD, and decomposition template sections are back. `check-claude-agent-parity.mjs` ratchets every agent pair against `scripts/_lib/claude-agent-parity-baseline.json`; `task-router` and the other unrefreshed pairs are recorded at their current divergence.
|
|
12
|
+
- **Claude `model` aliases.** The six cheap agents pin `haiku`; the agent README documents per-invocation `model` → frontmatter → `CLAUDE_CODE_SUBAGENT_MODEL` → parent.
|
|
13
|
+
- **Generated Claude output is consumer-correct.** The Claude generator rewrites `.cursor/` globs, mapped `.mdc` references in descriptions and bodies, and the narrow `.cursor/rules` / `.cursor/team` body tokens; `check-consumer-links.mjs` fails when committed Claude rules or agents carry a `.cursor/` path or a resolvable `.mdc` reference, with a line-hash allowlist for the two legitimate lines.
|
|
14
|
+
- **MCP pins.** `@upstash/context7-mcp`, `@playwright/mcp`, and `chrome-devtools-mcp` are refreshed from the registry; `MCP.md` documents the pin policy.
|
|
15
|
+
- **Eval coverage.** `eval/next/manifest.json` registers `next-app-core`, `next-app-router`, and `navigation-router-stack`, with Incorrect/Correct pairs for the env, proxy/metadata, Pages-vs-App, and proxy surfaces.
|
|
16
|
+
- **Docs.** Both session-start lists name all four stems, `check-rule-eval` is described as a hard gate inside `check:preset-structure`, `reference-features` drops the source-only links, and the stack notes in `forms-validation`, `design-tokens-binding`, and `css-property-order-stylelint` are conditional on the repo stack.
|
|
17
|
+
- **Fixtures.** The team `pipeline.json` example and four fixtures carry `profile` + `routingDecision`.
|
|
18
|
+
|
|
19
|
+
### The self-learning cap holds across runs
|
|
20
|
+
|
|
21
|
+
- **One auto-apply per task slug.** A later run reads `conventions-added` rows and will not auto-apply another signature for a slug that already spent its apply. Rollback frees the slug. Unload does not.
|
|
22
|
+
- **High severity without a path stays visible.** The lesson gate still refuses a conventions bullet and a seed. A high-severity pending lesson appends `action: "pending-lesson"` to `rule-changes.jsonl`. A low-severity pending lesson stays in the report only.
|
|
23
|
+
- **A crashed write is not an applied row.** The file is renamed before the ledger line. A kill between them leaves an `.intent` sidecar; the next run finishes the ledger row or drops the intent. `*.intent` is in the seeded `.ai.local/.gitignore`, and an existing ignore file gains any missing required line.
|
|
24
|
+
- **Nested overlay targets use one root.** Ledger paths and lesson paths resolve against the same root: the git root when `.git` is found, otherwise the overlay parent.
|
|
25
|
+
|
|
26
|
+
### A nested overlay keeps its own project root
|
|
27
|
+
|
|
28
|
+
- **Two roots, one job each.** The **project root** (the directory that holds `.ai.local/`) owns lesson paths, script names and file I/O. The **repo root** (git) owns the ledger's `target`, which is stored repo-relative so the committed file carries no machine path. A nested overlay (`packages/foo/.ai.local/`) resolves `app/src` against `packages/foo/`, not against the git root — the previous single root made the lesson gate fail there and the loop never auto-applied.
|
|
29
|
+
- **A legacy row rolls back the file it wrote.** A ledger row written before the split carries a project-relative `target`; it now resolves against the project root when that is where the file lives, instead of writing to a path outside the overlay.
|
|
30
|
+
- **A spent slug is not freed by a later row.** Every `conventions-added` row for a signature contributes its slugs; a later row for the same signature cannot hand back a slug an earlier row spent. A `rollback` frees exactly the slugs it names.
|
|
31
|
+
- **`run.mjs --status` never throws.** An unreadable rule degrades the envelope to `unreadable` and the report still prints; the engine keeps failing closed.
|
|
32
|
+
- **`rollbackInverse` reconciles a pending commit.** A leftover `.intent` sidecar from a killed run is finished or dropped before the rollback writes, instead of being overwritten.
|
|
33
|
+
- **`yarn test:ai-local` runs on every runtime.** A small runner enumerates `.ai.local/scripts/*.test.mjs` and hands an explicit file list to `node --test`; `node --test <dir>` is a glob on Node 22+ and fails with `MODULE_NOT_FOUND`, and a shell glob needs a POSIX shell. CI calls the same runner.
|
|
34
|
+
|
|
35
|
+
### Gates that fail on the case they were written for
|
|
36
|
+
|
|
37
|
+
- **Twin drift detects a one-sided rewrite after a mirrored change.** The ratchet compares the twins' difference, not two absolute snapshots, so a mirrored edit no longer makes the detector blind to the next one-sided edit. A baseline without its hash rows is a failure, not a silent downgrade.
|
|
38
|
+
- **`--update` cannot widen the twin-drift baseline by accident.** Raising an allowance needs `--update --widen`; dropping an orphan row needs `--update --prune`. A plain `--update` refuses both and leaves the file untouched. The ratchet now records the **divergence** between the twins, not two absolute snapshots, so a one-sided rewrite is caught even after a mirrored change.
|
|
39
|
+
- **The self-review tail is bounded by the section, not the paragraph.** Prose moved one blank line down is still caught; a tail in a later `## ` section is out of scope by design.
|
|
40
|
+
- **Release consistency compares semver.** `1.0.0-rc.10` above `1.0.0-rc.2` and `alpha-2` above `alpha-1` are valid changelogs and pass; a heading that looks like a version but is not one is reported.
|
|
41
|
+
- **The attached-budget caps bind.** The four new fixtures are calibrated to the measured totals plus the script's own headroom margin instead of a flat 400.
|
|
42
|
+
- **The Cursor family is checked for the shared contract.** Every adapter of a shared stem must carry the stem's required sentences — a platform whose adapter is not a byte-embed of the core cannot be covered by a body diff, so the normative fragments are pinned separately. A Cursor adapter can no longer silently lose shared-core prose.
|
|
43
|
+
- **The owning-agent roster cannot shrink silently.** A prompt that still carries the receipt-binding callout while its agent left the roster is a failure.
|
|
44
|
+
|
|
45
|
+
### Drift classification
|
|
46
|
+
|
|
47
|
+
- **`--check` prints rels and writes nothing.** `init` and `update` accept it. `clean --merge-ai-local` and `clean --check` exit 1.
|
|
48
|
+
- **A recreated file is not "edited locally".** When another tool's init creates a file that was missing, the record takes that tool as the owner. `team/**` stays on the previous owner because the seed refreshes it every run.
|
|
49
|
+
- **A corrupt template record is not an empty base.** Unreadable `.template-base.json` skips the merge and warns, instead of resetting the base.
|
|
50
|
+
|
|
51
|
+
### Upgrade
|
|
52
|
+
|
|
53
|
+
- Run `npx @bonesofspring/ai-rules update`. The installed `next` rules, Claude agents, team fixtures, generated Mavis/OpenCode trees, and MCP config are managed and refresh from the preset; `update` keeps each tool's recorded preset.
|
|
54
|
+
- MCP pins move to `@upstash/context7-mcp@4.5.0`, `@playwright/mcp@0.0.84`, and `chrome-devtools-mcp@1.12.0`. The merge keeps extra local servers; user-level MCP is untouched.
|
|
55
|
+
- The `router-pages` seed stays staged-inactive in `.ai.local/rules-library/`. If it is already active in `.ai.local/rules/router-pages.md`, update that consumer-owned copy manually — `init` / `update` do not overwrite `.ai.local/rules/**`.
|
|
56
|
+
- No `.ai.local` migration and no task-artifact change: `init` / `update` still never overwrite `tasks/<slug>/`. The new `check-claude-agent-parity` and `check-consumer-links` gates are preset-maintenance checks; consumer installs do not run them.
|
|
57
|
+
|
|
58
|
+
## 0.2.51
|
|
59
|
+
|
|
60
|
+
### A shared `.ai.local/` rel is counted once
|
|
61
|
+
|
|
62
|
+
- **One file, one count.** A rel that several installed tools ship is reported by the first pass of the command. A later pass does not add it again and does not replace its proposal. A later pass whose template already matches the file adopts it and drops that proposal.
|
|
63
|
+
- **Fast-forward still needs a base.** `update --merge-ai-local` rewrites a file only when the recorded base still matches. An edit, and a file that predates `.template-base.json`, stays put.
|
|
64
|
+
|
|
65
|
+
### The self-learning loop writes a lesson only when a path exists
|
|
66
|
+
|
|
67
|
+
- **No slogan bullets.** Two tasks that share `correction:prefer-at-imports` and no `paths` leave `conventions.md` unchanged (`pending-lesson` in `--status`).
|
|
68
|
+
- **Slots.** A signal may carry `paths` (1–8 repo-relative paths) and `command` (a package script name). The bullet names the path and, when agreed, the script.
|
|
69
|
+
- **Aliases and catalog.** `.ai.local/signature-aliases.json` merges signatures. `.ai.local/signature-catalog.json` may supply the path. Neither file is created by `init`.
|
|
70
|
+
- **Unload.** Two later tasks with the same signature remove that bullet (`unloaded`) without restoring the rest of `conventions.md`. The printed report lists `unloaded` on its own, and a pathless repeat is `pending lesson`, not a dedup no-op.
|
|
71
|
+
|
|
72
|
+
### `.ai.local/` template drift is recorded, reported, and optionally fast-forwarded
|
|
73
|
+
|
|
74
|
+
- **Record.** `init` / `update` write `.ai.local/.template-base.json` — `{schemaVersion, packageVersion, files: {rel: {sha256, normSha256, source}}}` — for exactly the rels whose bytes are a shipped template byte: the ones the seed wrote plus a file that already holds the current template. Sorted, no timestamp, `source` = `<tool>/<preset>`. Your own bytes are never recorded as a base, so a later release cannot mistake an edit made before the record existed for an untouched copy. A record whose `schemaVersion` is newer than the CLI is left untouched with a warning. It stays out of `<tool>/.ai-rules-install.json`, so `clean <tool>` still removes nothing under `.ai.local/`.
|
|
75
|
+
- **Default report.** Plain `update` prints one tree-level line when anything drifted (`.ai.local drift: 3 behind template, 1 edited locally (run with --merge-ai-local to fast-forward the untouched ones)`), once per tree rather than once per installed tool. Every installed tool's pass classifies its own map. Each rel is counted once, so a tree seeded first by `claude` or `mavis` reports the same files as a `cursor`-first one. The line is printed once, after the last pass of the command.
|
|
76
|
+
- **Opt-in merge.** `update --merge-ai-local` (and `init … --merge-ai-local`) rewrites a file only when its EOL- and trailing-newline-normalised digest still matches the recorded base. A file that already holds the current template but is not recorded is **adopted**: the run records the template digests and writes nothing — including on a plain `update`, which is how a pre-feature tree and a manually applied proposal converge. A file that differs from both the base and the current template is kept byte-identical, reported as edited, and its unified diff plus the preset copy land in `.ai.local/.rollback/template-drift/` (`*.diff`, `*.template-new`, never a `.md`, never a conflict marker). A base written by another tool or preset is a noop. A rel with no base gets one proposal, from the first pass, not one per tool.
|
|
77
|
+
- **Guards.** Every new path passes `assertSafeDest` (a symlinked or escaping destination warns, skips the merge, and still exits 0), the record, every fast-forward and every sink clear go through the install transaction so a failed install restores them, and the rel allowlist comes from the preset tree and excludes `.ai.local/team/**` — `team/README.md` and `team/fixtures/**` are refreshed by the seed, `team/tasks/**`, `requirements/**`, `adr/**`, and engine runtime files are never read for a decision or written.
|
|
78
|
+
- **Goldens.** The new rel is captured with `packageVersion` pinned in `scripts/lib/cli-golden.mjs`, so the 40 CLI fixtures do not churn on every version bump.
|
|
79
|
+
- **Documented.** `docs/LOCAL-OVERLAY.md` § Template drift covers the record, the summary line, the flag, the sink, the first-run adoption and what stays manual; the "never overwritten" sentence is qualified, not removed.
|
|
80
|
+
|
|
81
|
+
### The manifest writer follows the task directory's slug
|
|
82
|
+
|
|
83
|
+
- **Foreign slug.** The task directory now owns the slug: `upsert` rewrites `manifest.slug` instead of preserving whatever a copied manifest carried, which used to fail `check` with no repair path.
|
|
84
|
+
- **Documented.** The package README lists `manifest.mjs` as the seventh seeded script and shows the `init` / `upsert` / `check` forms; producers merge their receipt with it rather than editing the JSON by hand.
|
|
85
|
+
|
|
86
|
+
### The self-learning ledger keeps repo-relative paths
|
|
87
|
+
|
|
88
|
+
- **No host paths in a committed file.** `rule-improver` serialized the absolute `target` into `.ai.local/rule-changes.jsonl`, which is committed — so the machine layout leaked into the repo (`agent-artifacts-no-local-paths`). The ledger now stores a project-relative path (`toLedgerTarget`) and resolves it back for file I/O (`resolveLedgerTarget`); a target that escapes the project root is rejected instead of written. The improver's printed report renders the same relative form.
|
|
89
|
+
- **Legacy rows still roll back.** A row written by an older engine keeps its absolute `target` and is resolved as-is, so `--rollback` works on ledgers that predate the change.
|
|
90
|
+
- **Gate.** `test-rule-improver-ledger.mjs` covers the serialization, the escape rejection and the legacy path, is wired into `check-preset-structure.sh`, and runs as `yarn test:rule-improver`.
|
|
91
|
+
|
|
92
|
+
### Retro findings carry a category
|
|
93
|
+
|
|
94
|
+
- **Ledger field.** A signal may set `finding_category` — `correctness`, `contract`, `perf`, `hygiene`, or `process` — validated by `signals.mjs` when present and absent on rows written before the field existed. Gate-derived signals default to `process` (`derive-gate-signals.mjs`).
|
|
95
|
+
- **Why.** A repeated `gate-changes-requested` row only said that some gate rejected something; without the defect class it cannot be turned into a rule. A retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
|
|
96
|
+
|
|
97
|
+
### The review contract is what a consumer installs
|
|
98
|
+
|
|
99
|
+
- **No local registry in the agent.** `code-reviewer` no longer tells every consumer to write a 28-row table from `.ai.local/rules/preset-development-requirements.md`. That file is this repository's overlay, not a shipped preset.
|
|
100
|
+
- **Skills carry the new review rules.** Re-review, depth passes, `confidence`, and `## Not verified` are in each stack's `code-review` skill. The shared `receiving-code-review` stem is marker-only, so the four re-review rules are copied into the skill.
|
|
101
|
+
|
|
102
|
+
### Upgrade
|
|
103
|
+
|
|
104
|
+
- The ledger fix is seeded skip-if-exists: delete `.ai.local/scripts/rule-improver.mjs` to take the relative-path version. Ledger rows written with an absolute `target` keep working, so no migration is needed.
|
|
105
|
+
- The hook side (`<platform>/hooks/chain-team-phases.sh`) is managed, so `update` replaces it; an entry whose `status` was written as a receipt outcome now stalls with the rewrite command instead of a generic missing receipt.
|
|
106
|
+
- `update --merge-ai-local` fast-forwards a file whose recorded base still matches. It does not refresh a pre-record engine script; delete that script to take the seeded copy.
|
|
107
|
+
|
|
108
|
+
### A fresh install ignores the template record
|
|
109
|
+
|
|
110
|
+
- **`.template-base.json`.** The seeded `.ai.local/.gitignore` lists it, so the install record does not show up as an untracked file on every release.
|
|
111
|
+
|
|
112
|
+
### Interactive questions follow the host schema
|
|
113
|
+
|
|
114
|
+
- **No shared numeric limits.** Header length, option-label length, and option count are whatever the host schema allows. The shared rule no longer states OpenCode's 30 characters / 2–5 options, which Claude Code rejects (`header` ≤12, options 2–4).
|
|
115
|
+
- **Free-form is the host's channel.** When the host already accepts typed text, do not add an option labeled "Other": a plain option returns its label. A host with no free-form channel still needs an explicit "Other" that opens a text prompt, or prose.
|
|
116
|
+
|
|
117
|
+
### Cursor resume of an interrupted producer
|
|
118
|
+
|
|
119
|
+
- **Same sentence as the other hosts.** Each Cursor `agent-team-orchestrator` adapter now says an interrupted producer is resumed, not restarted, and that a host which writes no `status.json` resumes from `artifact-manifest.json` plus `.memlog.md`.
|
|
120
|
+
|
|
121
|
+
## 0.2.50
|
|
122
|
+
|
|
123
|
+
`0.2.49` was never published (no tag, no npm version) — its notes ship as `0.2.50`.
|
|
4
124
|
|
|
5
125
|
### Interactive questions: the free-form answer is mandatory, the “Other” option is not
|
|
6
126
|
|
|
@@ -48,6 +168,7 @@
|
|
|
48
168
|
- Run `npx @bonesofspring/ai-rules update`. The writer is seeded skip-if-exists — delete `.ai.local/scripts/manifest.mjs` to take the hardened copy, then run `node .ai.local/scripts/manifest.mjs check --slug <slug>` on every task with an open entry: a manifest written before 0.2.46 can carry `status: "changes_requested"` or a stale receipt, and `check` names the entry and the repair command.
|
|
49
169
|
- The new requestable stem `interactive-questions` ships with the preset; the always-on quality rule points at it. No always-on slot added, no install-path change.
|
|
50
170
|
|
|
171
|
+
|
|
51
172
|
## 0.2.48
|
|
52
173
|
|
|
53
174
|
### Interactive questions are the preferred way to ask the user
|
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Presets for **Cursor**, **Claude Code**, **Mavis** (MiniMax `mcode`), and **Open
|
|
|
5
5
|
```bash
|
|
6
6
|
npx @bonesofspring/ai-rules init multi --preset next
|
|
7
7
|
npx @bonesofspring/ai-rules update # reinstall tools already recorded in this repo
|
|
8
|
+
npx @bonesofspring/ai-rules update --merge-ai-local # fast-forward files whose recorded base still matches; edits and pre-record files stay put
|
|
8
9
|
npx @bonesofspring/ai-rules clean cursor # never deletes .ai.local/
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -21,6 +22,7 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
|
|
|
21
22
|
| MCP | `.cursor/mcp.json` (merge) | **`.mcp.json`** (merge) | `.mavis/mcp.json` (merge) | `opencode.json` (merge) |
|
|
22
23
|
| Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all four) | | | |
|
|
23
24
|
| `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
|
|
25
|
+
| 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) | | | |
|
|
24
26
|
| Self-learning engine | **`.ai.local/scripts/`** (shared; seven scripts — the engine plus `manifest.mjs`, the manifest writer; existing files never overwritten) | | | |
|
|
25
27
|
| Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
|
|
26
28
|
|
|
@@ -50,7 +52,7 @@ node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
|
50
52
|
|
|
51
53
|
Producers merge their receipt with it — the manifest is a whole-file merge target, never a fragment edit.
|
|
52
54
|
|
|
53
|
-
Living exceptions: **`.ai.local/rules/`** and **`.ai.local/conventions.md`** (`init` does not overwrite them). Overlay does not load `.ai.local/team/**` as rules.
|
|
55
|
+
Living exceptions: **`.ai.local/rules/`** and **`.ai.local/conventions.md`** (`init` does not overwrite them). The only exception is opt-in and hash-gated: `update --merge-ai-local` fast-forwards a file whose recorded base in `.ai.local/.template-base.json` still matches, keeps an edited file byte-identical, and diverts its unified diff to `.ai.local/.rollback/template-drift/` (never a `.md`, never a conflict marker). Plain `update` only prints one drift line and records the files that already hold the shipped template; your own bytes never become a base. Overlay does not load `.ai.local/team/**` as rules; see [`docs/LOCAL-OVERLAY.md`](docs/LOCAL-OVERLAY.md#template-drift).
|
|
54
56
|
|
|
55
57
|
**`clean <tool>`** removes only CLI-managed paths under that tool root. It does **not** wipe the whole `.cursor/` / `.claude/` tree, and it **never** deletes `.ai.local/`. Root `AGENTS.md` is removed only when no other tool install remains.
|
|
56
58
|
|
package/bin/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ const path = require('path');
|
|
|
7
7
|
const { cmdInitMavis, cmdCleanMavis } = require('./mavis-install');
|
|
8
8
|
const { cmdInitOpencode, cmdCleanOpencode } = require('./opencode-install');
|
|
9
9
|
const { seedAiLocalTeam } = require('./lib/seed-ai-local-team');
|
|
10
|
+
const { flushAiLocalDriftSummary, flushAllAiLocalDriftSummaries } = require('./lib/ai-local-drift');
|
|
10
11
|
const { assertSafeDest, escapesRoot, resolveManagedPath } = require('./lib/safe-path');
|
|
11
12
|
const {
|
|
12
13
|
createInstallTransaction,
|
|
@@ -26,6 +27,10 @@ const {
|
|
|
26
27
|
stripMergedConfigs,
|
|
27
28
|
} = require('./lib/merged-config');
|
|
28
29
|
|
|
30
|
+
// A pass that fails before the command boundary (`cmdInit` exits the process)
|
|
31
|
+
// must still print the drift line its completed passes accumulated.
|
|
32
|
+
process.on('exit', flushAllAiLocalDriftSummaries);
|
|
33
|
+
|
|
29
34
|
const FAIL_PHASE_ENV = 'AI_RULES_CLI_FAIL_PHASE';
|
|
30
35
|
const MANIFEST_SCHEMA_VERSION = 2;
|
|
31
36
|
|
|
@@ -81,12 +86,16 @@ function printHelp() {
|
|
|
81
86
|
Usage:
|
|
82
87
|
ai-rules init <cursor|claude|mavis|opencode|multi> [--preset <name>]
|
|
83
88
|
ai-rules init <cursor|claude|mavis|opencode|multi> <preset-name>
|
|
84
|
-
ai-rules update [--cwd <dir>]
|
|
89
|
+
ai-rules update [--merge-ai-local | --check] [--cwd <dir>]
|
|
85
90
|
ai-rules clean <cursor|claude|mavis|opencode> [--cwd <dir>]
|
|
86
91
|
|
|
87
92
|
Options:
|
|
88
|
-
--preset <name>
|
|
89
|
-
--cwd <dir>
|
|
93
|
+
--preset <name> Preset name (default: ${DEFAULT_PRESET})
|
|
94
|
+
--cwd <dir> Target project directory (default: current working directory)
|
|
95
|
+
--merge-ai-local Fast-forward .ai.local/ files whose recorded base still matches
|
|
96
|
+
--check Print each .ai.local/ drift rel and write nothing
|
|
97
|
+
the preset template; a file you edited is kept and its diff is
|
|
98
|
+
written to .ai.local/.rollback/template-drift/
|
|
90
99
|
|
|
91
100
|
Notes:
|
|
92
101
|
init merges into the target directory; same-named preset files are overwritten (no backups are kept).
|
|
@@ -101,6 +110,11 @@ Notes:
|
|
|
101
110
|
init refuses to write through a symlinked destination (tool dirs, AGENTS.md, rules dirs, ...).
|
|
102
111
|
All init targets seed .ai.local/team/ (shared pipeline artifacts; never overwritten task slugs; not removed by clean)
|
|
103
112
|
and .ai.local/conventions.md (living gotchas; seeded from the preset template only when absent, never overwritten).
|
|
113
|
+
.ai.local/.template-base.json records the digest of every .ai.local/ rel that holds a shipped template byte; it
|
|
114
|
+
stays out of the install manifest, so clean never removes it. Plain update prints one drift line per tree and
|
|
115
|
+
records a file that already holds the template; update --merge-ai-local rewrites only the files whose recorded base
|
|
116
|
+
still matches it, keeps an edited file byte-identical, and diverts its unified diff plus the template copy to
|
|
117
|
+
.ai.local/.rollback/template-drift/ (never a .md, never a conflict marker).
|
|
104
118
|
Because .ai.local/team/ is shared, ANY init consolidates every legacy .cursor|.claude|.mavis|.opencode/team/ into it,
|
|
105
119
|
not just the tool being installed. Consolidation is non-destructive: every non-README.md entry is migrated and copied
|
|
106
120
|
to a timestamped .ai.local/.rollback/legacy-team-<stamp>/ backup before it is removed, colliding task slugs are kept
|
|
@@ -111,7 +125,7 @@ Notes:
|
|
|
111
125
|
OpenCode init copies into .opencode/ plus REPO_AGENTS.md → <cwd>/AGENTS.md; MCP merges into <cwd>/opencode.json (never ~/.config/opencode/**).
|
|
112
126
|
All init targets also copy REPO_AGENTS.md → <cwd>/AGENTS.md (repo-root cross-tool agents file; overwrite; all next platforms ship the same file).
|
|
113
127
|
init multi installs every platform that has released the preset (cursor, claude, plus mavis/opencode when listed in releasedStacks). Not a clean target.
|
|
114
|
-
update reinstalls each tool that already has <tool>/.ai-rules-install.json, using the preset field that init wrote. Tools without a manifest stay uninstalled. The recorded preset is kept. update does not accept --preset or a tool name.
|
|
128
|
+
update reinstalls each tool that already has <tool>/.ai-rules-install.json, using the preset field that init wrote. Tools without a manifest stay uninstalled. The recorded preset is kept. update does not accept --preset or a tool name; --merge-ai-local is allowed on update and on init.
|
|
115
129
|
When <cwd>/docs/specs/ is absent, init also seeds INDEX.md stub + _templates/* from package assets (never overwrites an existing INDEX).
|
|
116
130
|
clean removes only files the last init copied and that are unchanged since; consumer files are kept.
|
|
117
131
|
Merged configs are never deleted wholesale: clean strips the entries init added (shipped MCP servers, preset
|
|
@@ -201,6 +215,14 @@ function parseArgs(argv) {
|
|
|
201
215
|
args.help = true;
|
|
202
216
|
continue;
|
|
203
217
|
}
|
|
218
|
+
if (a === '--merge-ai-local') {
|
|
219
|
+
args.mergeAiLocal = true;
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
if (a === '--check') {
|
|
223
|
+
args.checkAiLocal = true;
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
204
226
|
if (a.startsWith('-') && a !== '-') {
|
|
205
227
|
args.unknownOption = a;
|
|
206
228
|
continue;
|
|
@@ -662,7 +684,7 @@ function loadReleasedStacks(platform) {
|
|
|
662
684
|
}
|
|
663
685
|
}
|
|
664
686
|
|
|
665
|
-
function cmdInitMulti(preset, cwdOption) {
|
|
687
|
+
function cmdInitMulti(preset, cwdOption, opts) {
|
|
666
688
|
const presetName = preset === undefined || preset === '' ? DEFAULT_PRESET : preset;
|
|
667
689
|
const invalid = validatePresetName(presetName);
|
|
668
690
|
if (invalid) {
|
|
@@ -670,6 +692,9 @@ function cmdInitMulti(preset, cwdOption) {
|
|
|
670
692
|
process.exit(1);
|
|
671
693
|
}
|
|
672
694
|
|
|
695
|
+
const cwd = resolveTargetCwd(cwdOption);
|
|
696
|
+
// One command, one tree, one summary: each pass accumulates, the loop end prints.
|
|
697
|
+
const passOpts = { ...opts, deferAiLocalSummary: true };
|
|
673
698
|
const installed = [];
|
|
674
699
|
const skipped = [];
|
|
675
700
|
for (const tool of MULTI_INSTALL_ORDER) {
|
|
@@ -682,13 +707,14 @@ function cmdInitMulti(preset, cwdOption) {
|
|
|
682
707
|
continue;
|
|
683
708
|
}
|
|
684
709
|
console.log(`\n=== init ${tool} --preset ${presetName} ===`);
|
|
685
|
-
cmdInit(tool, presetName, cwdOption);
|
|
710
|
+
cmdInit(tool, presetName, cwdOption, passOpts);
|
|
686
711
|
installed.push(tool);
|
|
687
712
|
}
|
|
688
713
|
if (installed.length === 0) {
|
|
689
714
|
console.error(`multi: no platforms installed for preset "${presetName}".`);
|
|
690
715
|
process.exit(1);
|
|
691
716
|
}
|
|
717
|
+
flushAiLocalDriftSummary(cwd);
|
|
692
718
|
const skipNote = skipped.length > 0 ? `; skipped ${skipped.join(', ')}` : '';
|
|
693
719
|
console.log(`\nDone. multi installed ${installed.join(', ')}${skipNote}`);
|
|
694
720
|
}
|
|
@@ -718,7 +744,7 @@ function updatePresetReady(tool, presetName) {
|
|
|
718
744
|
* Reinstall every tool that has an install manifest, using the preset recorded there.
|
|
719
745
|
* Validates the whole plan before the first init so a bad manifest does not partially update.
|
|
720
746
|
*/
|
|
721
|
-
function cmdUpdate(cwdOption) {
|
|
747
|
+
function cmdUpdate(cwdOption, opts) {
|
|
722
748
|
const cwd = resolveTargetCwd(cwdOption);
|
|
723
749
|
const errors = [];
|
|
724
750
|
const found = [];
|
|
@@ -774,14 +800,20 @@ function cmdUpdate(cwdOption) {
|
|
|
774
800
|
|
|
775
801
|
const plan = found.map((item) => `${item.tool} (${item.preset})`).join(', ');
|
|
776
802
|
console.log(`update: reinstalling ${plan}`);
|
|
803
|
+
// One command, one tree, one summary: each tool's pass accumulates, this flushes.
|
|
804
|
+
const passOpts = { ...opts, deferAiLocalSummary: true };
|
|
777
805
|
for (const item of found) {
|
|
778
806
|
console.log(`\n=== update ${item.tool} --preset ${item.preset} ===`);
|
|
779
|
-
cmdInit(item.tool, item.preset, cwdOption);
|
|
807
|
+
cmdInit(item.tool, item.preset, cwdOption, passOpts);
|
|
780
808
|
}
|
|
809
|
+
flushAiLocalDriftSummary(cwd);
|
|
781
810
|
console.log(`\nDone. update reinstalled ${plan}`);
|
|
782
811
|
}
|
|
783
812
|
|
|
784
|
-
function cmdInit(tool, preset, cwdOption) {
|
|
813
|
+
function cmdInit(tool, preset, cwdOption, opts) {
|
|
814
|
+
const mergeAiLocal = Boolean(opts && opts.mergeAiLocal);
|
|
815
|
+
const checkAiLocal = Boolean(opts && opts.checkAiLocal);
|
|
816
|
+
const deferSummary = Boolean(opts && opts.deferAiLocalSummary);
|
|
785
817
|
if (tool === 'mavis') {
|
|
786
818
|
cmdInitMavis({
|
|
787
819
|
preset,
|
|
@@ -793,8 +825,11 @@ function cmdInit(tool, preset, cwdOption) {
|
|
|
793
825
|
seedAiLocalTeam,
|
|
794
826
|
installMcpJson,
|
|
795
827
|
getPackageRoot,
|
|
828
|
+
mergeAiLocal,
|
|
829
|
+
checkAiLocal,
|
|
796
830
|
},
|
|
797
831
|
});
|
|
832
|
+
if (!deferSummary) flushAiLocalDriftSummary(resolveTargetCwd(cwdOption));
|
|
798
833
|
return;
|
|
799
834
|
}
|
|
800
835
|
if (tool === 'opencode') {
|
|
@@ -807,8 +842,11 @@ function cmdInit(tool, preset, cwdOption) {
|
|
|
807
842
|
seedDocsSpecsIfAbsent,
|
|
808
843
|
seedAiLocalTeam,
|
|
809
844
|
getPackageRoot,
|
|
845
|
+
mergeAiLocal,
|
|
846
|
+
checkAiLocal,
|
|
810
847
|
},
|
|
811
848
|
});
|
|
849
|
+
if (!deferSummary) flushAiLocalDriftSummary(resolveTargetCwd(cwdOption));
|
|
812
850
|
return;
|
|
813
851
|
}
|
|
814
852
|
const cfg = PRESETS[tool];
|
|
@@ -900,7 +938,16 @@ function cmdInit(tool, preset, cwdOption) {
|
|
|
900
938
|
if (seedDocsSpecsIfAbsent(packageRoot, cwd) && !docsSpecsExisted) {
|
|
901
939
|
tx.addCreated(docsSpecsDir);
|
|
902
940
|
}
|
|
903
|
-
const teamResult = seedAiLocalTeam({
|
|
941
|
+
const teamResult = seedAiLocalTeam({
|
|
942
|
+
cwd,
|
|
943
|
+
presetTeamSrc: path.join(base, 'team'),
|
|
944
|
+
source: `${tool}/${presetName}`,
|
|
945
|
+
packageVersion: getPackageVersion(packageRoot),
|
|
946
|
+
mergeAiLocal,
|
|
947
|
+
checkAiLocal,
|
|
948
|
+
writeFile: (dest, content, label) => tx.writeFile(dest, content, label),
|
|
949
|
+
trackFile: (dest, label) => tx.track(dest, label),
|
|
950
|
+
});
|
|
904
951
|
for (const created of teamResult.createdPaths || []) {
|
|
905
952
|
tx.addCreated(created);
|
|
906
953
|
}
|
|
@@ -959,6 +1006,7 @@ function cmdInit(tool, preset, cwdOption) {
|
|
|
959
1006
|
process.exit(1);
|
|
960
1007
|
}
|
|
961
1008
|
|
|
1009
|
+
if (!deferSummary) flushAiLocalDriftSummary(cwd);
|
|
962
1010
|
console.log(`Done. ${toolRoot} installed at ${toolRootAbs} (preset: ${presetName})`);
|
|
963
1011
|
}
|
|
964
1012
|
|
|
@@ -1118,10 +1166,10 @@ function main() {
|
|
|
1118
1166
|
process.exit(1);
|
|
1119
1167
|
}
|
|
1120
1168
|
if (tool === 'multi') {
|
|
1121
|
-
cmdInitMulti(preset, parsed.cwd);
|
|
1169
|
+
cmdInitMulti(preset, parsed.cwd, parsed);
|
|
1122
1170
|
return;
|
|
1123
1171
|
}
|
|
1124
|
-
cmdInit(tool, preset, parsed.cwd);
|
|
1172
|
+
cmdInit(tool, preset, parsed.cwd, parsed);
|
|
1125
1173
|
return;
|
|
1126
1174
|
}
|
|
1127
1175
|
if (command === 'update') {
|
|
@@ -1135,10 +1183,14 @@ function main() {
|
|
|
1135
1183
|
);
|
|
1136
1184
|
process.exit(1);
|
|
1137
1185
|
}
|
|
1138
|
-
cmdUpdate(parsed.cwd);
|
|
1186
|
+
cmdUpdate(parsed.cwd, parsed);
|
|
1139
1187
|
return;
|
|
1140
1188
|
}
|
|
1141
1189
|
if (command === 'clean') {
|
|
1190
|
+
if (parsed.mergeAiLocal || parsed.checkAiLocal) {
|
|
1191
|
+
console.error('--merge-ai-local and --check apply to init and update.');
|
|
1192
|
+
process.exit(1);
|
|
1193
|
+
}
|
|
1142
1194
|
if (tool === 'multi') {
|
|
1143
1195
|
console.error('clean multi is not supported. Clean each tool: cursor, claude, mavis, opencode.');
|
|
1144
1196
|
process.exit(1);
|