@bonesofspring/ai-rules 0.2.37 → 0.2.39
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 +282 -1
- package/README.md +23 -2
- package/bin/cli.js +106 -1
- package/bin/lib/engine-scripts.js +22 -0
- package/bin/lib/fs-utils.js +78 -11
- package/bin/lib/merged-config.js +30 -16
- package/bin/lib/seed-ai-local-team.js +160 -12
- package/bin/opencode-install.js +37 -52
- package/docs/OPENCODE.md +4 -4
- package/docs/specs/INDEX.md +5 -2
- package/package.json +4 -1
- package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +171 -0
- package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +581 -0
- package/presets/_shared/ai-local/scripts/lock.mjs +146 -0
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +795 -0
- package/presets/_shared/ai-local/scripts/run.mjs +318 -0
- package/presets/_shared/ai-local/scripts/signals.mjs +286 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
- package/presets/_shared/core/quality/self-review-and-context-hygiene.md +8 -7
- package/presets/_shared/hooks/README.md +5 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +111 -23
- package/presets/_shared/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/android-kotlin/CLAUDE.md +1 -1
- package/presets/claude/android-kotlin/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/android-kotlin/commands/task-continue.md +9 -0
- package/presets/claude/android-kotlin/commands/technical-retro.md +8 -0
- package/presets/claude/android-kotlin/commands/update.md +39 -0
- package/presets/claude/android-kotlin/hooks/README.md +1 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/android-kotlin/hooks/examples/README.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/android-kotlin/settings.json +14 -1
- package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/go/CLAUDE.md +1 -1
- package/presets/claude/go/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/go/commands/task-continue.md +9 -0
- package/presets/claude/go/commands/technical-retro.md +8 -0
- package/presets/claude/go/commands/update.md +39 -0
- package/presets/claude/go/hooks/README.md +1 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/go/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/go/hooks/examples/README.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/settings.json +14 -1
- package/presets/claude/go/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/ios-swift/CLAUDE.md +1 -1
- package/presets/claude/ios-swift/REPO_AGENTS.md +14 -0
- package/presets/claude/ios-swift/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/claude/ios-swift/commands/task-continue.md +9 -0
- package/presets/claude/ios-swift/commands/technical-retro.md +8 -0
- package/presets/claude/ios-swift/commands/update.md +39 -0
- package/presets/claude/ios-swift/hooks/README.md +1 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/ios-swift/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/ios-swift/hooks/examples/README.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/ios-swift/settings.json +14 -1
- package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/java/CLAUDE.md +2 -2
- package/presets/claude/java/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/java/commands/task-continue.md +9 -0
- package/presets/claude/java/commands/technical-retro.md +8 -0
- package/presets/claude/java/commands/update.md +39 -0
- package/presets/claude/java/hooks/README.md +1 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/java/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/java/hooks/examples/README.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/java/settings.json +14 -1
- package/presets/claude/java/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/mcp-ts/CLAUDE.md +1 -1
- package/presets/claude/mcp-ts/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/mcp-ts/commands/task-continue.md +9 -0
- package/presets/claude/mcp-ts/commands/technical-retro.md +8 -0
- package/presets/claude/mcp-ts/commands/update.md +39 -0
- package/presets/claude/mcp-ts/hooks/README.md +1 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/mcp-ts/settings.json +14 -1
- package/presets/claude/next/CLAUDE.md +2 -1
- package/presets/claude/next/REPO_AGENTS.md +15 -1
- package/presets/claude/next/agents/build-verifier.md +1 -1
- package/presets/claude/next/agents/code-reviewer.md +1 -1
- package/presets/claude/next/agents/debugger.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/task-analyst.md +1 -1
- package/presets/claude/next/agents/task-router.md +1 -1
- package/presets/claude/next/commands/README.md +1 -0
- package/presets/claude/next/commands/task-continue.md +9 -0
- package/presets/claude/next/commands/technical-retro.md +8 -0
- package/presets/claude/next/commands/update.md +39 -0
- package/presets/claude/next/hooks/README.md +1 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/next/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/next/hooks/examples/README.md +1 -1
- package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +21 -18
- package/presets/claude/next/rules/stack/next-app-router.md +27 -0
- package/presets/claude/next/rules/stack/next-static-export.md +16 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/security-next.md +16 -2
- package/presets/claude/next/rules/ui-and-accessibility/component-catalog-gate.md +13 -0
- package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +12 -0
- package/presets/claude/next/settings.json +13 -0
- package/presets/claude/next/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/next/team/fixtures/feature-light.json +2 -1
- package/presets/claude/next/team/fixtures/feature-ui-standard.json +24 -0
- package/presets/claude/nuxt/CLAUDE.md +2 -1
- package/presets/claude/nuxt/REPO_AGENTS.md +14 -0
- package/presets/claude/nuxt/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/claude/nuxt/commands/task-continue.md +9 -0
- package/presets/claude/nuxt/commands/technical-retro.md +8 -0
- package/presets/claude/nuxt/commands/update.md +39 -0
- package/presets/claude/nuxt/hooks/README.md +1 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/nuxt/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/nuxt/hooks/examples/README.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/nuxt/settings.json +13 -0
- package/presets/claude/nuxt/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/php-hexagonal/CLAUDE.md +2 -2
- package/presets/claude/php-hexagonal/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/php-hexagonal/commands/task-continue.md +9 -0
- package/presets/claude/php-hexagonal/commands/technical-retro.md +8 -0
- package/presets/claude/php-hexagonal/commands/update.md +39 -0
- package/presets/claude/php-hexagonal/hooks/README.md +1 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/php-hexagonal/hooks/examples/README.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-hexagonal/settings.json +14 -1
- package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/php-laravel/CLAUDE.md +1 -1
- package/presets/claude/php-laravel/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/claude/php-laravel/commands/task-continue.md +9 -0
- package/presets/claude/php-laravel/commands/technical-retro.md +8 -0
- package/presets/claude/php-laravel/commands/update.md +39 -0
- package/presets/claude/php-laravel/hooks/README.md +1 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/php-laravel/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/php-laravel/hooks/examples/README.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-laravel/settings.json +14 -1
- package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +2 -0
- package/presets/claude/svelte/CLAUDE.md +2 -1
- package/presets/claude/svelte/REPO_AGENTS.md +14 -0
- package/presets/claude/svelte/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/claude/svelte/commands/task-continue.md +9 -0
- package/presets/claude/svelte/commands/technical-retro.md +8 -0
- package/presets/claude/svelte/commands/update.md +39 -0
- package/presets/claude/svelte/hooks/README.md +1 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +111 -23
- package/presets/claude/svelte/hooks/check-preset-update.mjs +227 -0
- package/presets/claude/svelte/hooks/examples/README.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/svelte/settings.json +13 -0
- package/presets/claude/svelte/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/android-kotlin/AGENTS.md +1 -0
- package/presets/cursor/android-kotlin/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/android-kotlin/commands/task-continue.md +9 -0
- package/presets/cursor/android-kotlin/commands/technical-retro.md +8 -0
- package/presets/cursor/android-kotlin/commands/update.md +39 -0
- package/presets/cursor/android-kotlin/hooks/README.md +5 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/android-kotlin/hooks/examples/README.md +1 -1
- package/presets/cursor/android-kotlin/hooks.json +6 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/go/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/go/commands/task-continue.md +9 -0
- package/presets/cursor/go/commands/technical-retro.md +8 -0
- package/presets/cursor/go/commands/update.md +39 -0
- package/presets/cursor/go/hooks/README.md +5 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/go/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/go/hooks/examples/README.md +1 -1
- package/presets/cursor/go/hooks.json +6 -0
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/ios-swift/AGENTS.md +1 -0
- package/presets/cursor/ios-swift/REPO_AGENTS.md +14 -0
- package/presets/cursor/ios-swift/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/cursor/ios-swift/commands/task-continue.md +9 -0
- package/presets/cursor/ios-swift/commands/technical-retro.md +8 -0
- package/presets/cursor/ios-swift/commands/update.md +39 -0
- package/presets/cursor/ios-swift/hooks/README.md +5 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/ios-swift/hooks/examples/README.md +1 -1
- package/presets/cursor/ios-swift/hooks.json +6 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/java/AGENTS.md +1 -1
- package/presets/cursor/java/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/java/commands/task-continue.md +9 -0
- package/presets/cursor/java/commands/technical-retro.md +8 -0
- package/presets/cursor/java/commands/update.md +39 -0
- package/presets/cursor/java/hooks/README.md +5 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/java/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/java/hooks/examples/README.md +1 -1
- package/presets/cursor/java/hooks.json +6 -0
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/mcp-ts/commands/task-continue.md +9 -0
- package/presets/cursor/mcp-ts/commands/technical-retro.md +8 -0
- package/presets/cursor/mcp-ts/commands/update.md +39 -0
- package/presets/cursor/mcp-ts/hooks/README.md +5 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/mcp-ts/hooks.json +6 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/AGENTS.md +1 -0
- package/presets/cursor/next/REPO_AGENTS.md +15 -1
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +1 -1
- package/presets/cursor/next/commands/README.md +1 -0
- package/presets/cursor/next/commands/task-continue.md +9 -0
- package/presets/cursor/next/commands/technical-retro.md +8 -0
- package/presets/cursor/next/commands/update.md +39 -0
- package/presets/cursor/next/hooks/README.md +6 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/next/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/next/hooks/examples/README.md +1 -1
- package/presets/cursor/next/hooks.json +6 -0
- package/presets/cursor/next/rules/README.md +3 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/rules/component-catalog-gate.mdc +13 -0
- package/presets/cursor/next/rules/forms-validation.mdc +12 -0
- package/presets/cursor/next/rules/next-app-router.mdc +27 -0
- package/presets/cursor/next/rules/next-static-export.mdc +16 -0
- package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +21 -18
- package/presets/cursor/next/rules/security-next.mdc +16 -2
- package/presets/cursor/next/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/next/team/fixtures/feature-light.json +2 -1
- package/presets/cursor/next/team/fixtures/feature-ui-standard.json +24 -0
- package/presets/cursor/nuxt/AGENTS.md +1 -0
- package/presets/cursor/nuxt/REPO_AGENTS.md +14 -0
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/cursor/nuxt/commands/task-continue.md +9 -0
- package/presets/cursor/nuxt/commands/technical-retro.md +8 -0
- package/presets/cursor/nuxt/commands/update.md +39 -0
- package/presets/cursor/nuxt/hooks/README.md +4 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/nuxt/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/nuxt/hooks/examples/README.md +1 -1
- package/presets/cursor/nuxt/hooks.json +6 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
- package/presets/cursor/php-hexagonal/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/php-hexagonal/commands/task-continue.md +9 -0
- package/presets/cursor/php-hexagonal/commands/technical-retro.md +8 -0
- package/presets/cursor/php-hexagonal/commands/update.md +39 -0
- package/presets/cursor/php-hexagonal/hooks/README.md +5 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/php-hexagonal/hooks/examples/README.md +1 -1
- package/presets/cursor/php-hexagonal/hooks.json +6 -0
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/php-laravel/AGENTS.md +1 -1
- package/presets/cursor/php-laravel/REPO_AGENTS.md +14 -0
- 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/commands/README.md +1 -0
- package/presets/cursor/php-laravel/commands/task-continue.md +9 -0
- package/presets/cursor/php-laravel/commands/technical-retro.md +8 -0
- package/presets/cursor/php-laravel/commands/update.md +39 -0
- package/presets/cursor/php-laravel/hooks/README.md +5 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/php-laravel/hooks/examples/README.md +1 -1
- package/presets/cursor/php-laravel/hooks.json +6 -0
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +2 -0
- package/presets/cursor/svelte/AGENTS.md +1 -0
- package/presets/cursor/svelte/REPO_AGENTS.md +14 -0
- package/presets/cursor/svelte/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/cursor/svelte/commands/task-continue.md +9 -0
- package/presets/cursor/svelte/commands/technical-retro.md +8 -0
- package/presets/cursor/svelte/commands/update.md +39 -0
- package/presets/cursor/svelte/hooks/README.md +4 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +111 -23
- package/presets/cursor/svelte/hooks/check-preset-update.mjs +227 -0
- package/presets/cursor/svelte/hooks/examples/README.md +1 -1
- package/presets/cursor/svelte/hooks.json +6 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/svelte/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/android-kotlin/MAVIS.md +1 -0
- package/presets/mavis/android-kotlin/REPO_AGENTS.md +14 -0
- package/presets/mavis/android-kotlin/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/android-kotlin/commands/task-continue.md +9 -0
- package/presets/mavis/android-kotlin/commands/technical-retro.md +8 -0
- package/presets/mavis/android-kotlin/commands/update.md +34 -0
- package/presets/mavis/android-kotlin/hooks/README.md +3 -0
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/android-kotlin/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/go/REPO_AGENTS.md +14 -0
- package/presets/mavis/go/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/go/commands/task-continue.md +9 -0
- package/presets/mavis/go/commands/technical-retro.md +8 -0
- package/presets/mavis/go/commands/update.md +34 -0
- package/presets/mavis/go/hooks/README.md +3 -0
- package/presets/mavis/go/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/go/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/go/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/ios-swift/MAVIS.md +1 -0
- package/presets/mavis/ios-swift/REPO_AGENTS.md +14 -0
- package/presets/mavis/ios-swift/adapter-map.json +17 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/mavis/ios-swift/commands/task-continue.md +9 -0
- package/presets/mavis/ios-swift/commands/technical-retro.md +8 -0
- package/presets/mavis/ios-swift/commands/update.md +34 -0
- package/presets/mavis/ios-swift/hooks/README.md +3 -0
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/ios-swift/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/java/REPO_AGENTS.md +14 -0
- package/presets/mavis/java/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/java/commands/task-continue.md +9 -0
- package/presets/mavis/java/commands/technical-retro.md +8 -0
- package/presets/mavis/java/commands/update.md +34 -0
- package/presets/mavis/java/hooks/README.md +3 -0
- package/presets/mavis/java/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/java/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/java/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/mcp-ts/REPO_AGENTS.md +14 -0
- package/presets/mavis/mcp-ts/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/mcp-ts/commands/task-continue.md +9 -0
- package/presets/mavis/mcp-ts/commands/technical-retro.md +8 -0
- package/presets/mavis/mcp-ts/commands/update.md +34 -0
- package/presets/mavis/mcp-ts/hooks/README.md +3 -0
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/next/MAVIS.md +1 -0
- package/presets/mavis/next/REPO_AGENTS.md +15 -1
- package/presets/mavis/next/adapter-map.json +25 -1
- package/presets/mavis/next/agents/build-verifier.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +1 -1
- package/presets/mavis/next/agents/debugger.md +1 -1
- package/presets/mavis/next/agents/feature-developer.md +1 -1
- package/presets/mavis/next/agents/task-analyst.md +1 -1
- package/presets/mavis/next/agents/task-router.md +1 -1
- package/presets/mavis/next/commands/README.md +1 -0
- package/presets/mavis/next/commands/task-continue.md +9 -0
- package/presets/mavis/next/commands/technical-retro.md +8 -0
- package/presets/mavis/next/commands/update.md +34 -0
- package/presets/mavis/next/hooks/README.md +3 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/next/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/next/rules/component-catalog-gate.md +13 -0
- package/presets/mavis/next/rules/forms-validation.md +12 -0
- package/presets/mavis/next/rules/next-app-router.md +27 -0
- package/presets/mavis/next/rules/next-static-export.md +16 -0
- package/presets/mavis/next/rules/react-next-anti-hallucination.md +20 -18
- package/presets/mavis/next/rules/security-next.md +13 -0
- package/presets/mavis/next/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/next/team/fixtures/feature-light.json +2 -1
- package/presets/mavis/next/team/fixtures/feature-ui-standard.json +24 -0
- package/presets/mavis/nuxt/MAVIS.md +1 -0
- package/presets/mavis/nuxt/REPO_AGENTS.md +14 -0
- package/presets/mavis/nuxt/adapter-map.json +17 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/mavis/nuxt/commands/task-continue.md +9 -0
- package/presets/mavis/nuxt/commands/technical-retro.md +8 -0
- package/presets/mavis/nuxt/commands/update.md +34 -0
- package/presets/mavis/nuxt/hooks/README.md +3 -0
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/nuxt/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/nuxt/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/php-hexagonal/REPO_AGENTS.md +14 -0
- package/presets/mavis/php-hexagonal/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/php-hexagonal/commands/task-continue.md +9 -0
- package/presets/mavis/php-hexagonal/commands/technical-retro.md +8 -0
- package/presets/mavis/php-hexagonal/commands/update.md +34 -0
- package/presets/mavis/php-hexagonal/hooks/README.md +3 -0
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/php-laravel/REPO_AGENTS.md +14 -0
- package/presets/mavis/php-laravel/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/mavis/php-laravel/commands/task-continue.md +9 -0
- package/presets/mavis/php-laravel/commands/technical-retro.md +8 -0
- package/presets/mavis/php-laravel/commands/update.md +34 -0
- package/presets/mavis/php-laravel/hooks/README.md +3 -0
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-laravel/skills/technical-retro/SKILL.md +2 -0
- package/presets/mavis/svelte/MAVIS.md +1 -0
- package/presets/mavis/svelte/REPO_AGENTS.md +14 -0
- package/presets/mavis/svelte/adapter-map.json +17 -1
- package/presets/mavis/svelte/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/mavis/svelte/commands/task-continue.md +9 -0
- package/presets/mavis/svelte/commands/technical-retro.md +8 -0
- package/presets/mavis/svelte/commands/update.md +34 -0
- package/presets/mavis/svelte/hooks/README.md +3 -0
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +111 -23
- package/presets/mavis/svelte/hooks/check-preset-update.mjs +227 -0
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/svelte/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/android-kotlin/OPENCODE.md +15 -6
- package/presets/opencode/android-kotlin/REPO_AGENTS.md +14 -0
- package/presets/opencode/android-kotlin/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/android-kotlin/commands/task-continue.md +9 -0
- package/presets/opencode/android-kotlin/commands/technical-retro.md +8 -0
- package/presets/opencode/android-kotlin/commands/update.md +42 -0
- package/presets/opencode/android-kotlin/hooks/README.md +3 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/android-kotlin/opencode.json +2 -12
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/go/OPENCODE.md +14 -6
- package/presets/opencode/go/REPO_AGENTS.md +14 -0
- package/presets/opencode/go/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/go/commands/task-continue.md +9 -0
- package/presets/opencode/go/commands/technical-retro.md +8 -0
- package/presets/opencode/go/commands/update.md +42 -0
- package/presets/opencode/go/hooks/README.md +3 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/go/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/go/opencode.json +2 -12
- package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/go/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/ios-swift/OPENCODE.md +15 -6
- package/presets/opencode/ios-swift/REPO_AGENTS.md +14 -0
- package/presets/opencode/ios-swift/adapter-map.json +17 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/opencode/ios-swift/commands/task-continue.md +9 -0
- package/presets/opencode/ios-swift/commands/technical-retro.md +8 -0
- package/presets/opencode/ios-swift/commands/update.md +42 -0
- package/presets/opencode/ios-swift/hooks/README.md +3 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/ios-swift/opencode.json +2 -12
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/java/OPENCODE.md +14 -6
- package/presets/opencode/java/REPO_AGENTS.md +14 -0
- package/presets/opencode/java/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/java/commands/task-continue.md +9 -0
- package/presets/opencode/java/commands/technical-retro.md +8 -0
- package/presets/opencode/java/commands/update.md +42 -0
- package/presets/opencode/java/hooks/README.md +3 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/java/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/java/opencode.json +2 -12
- package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/java/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/mcp-ts/OPENCODE.md +14 -6
- package/presets/opencode/mcp-ts/REPO_AGENTS.md +14 -0
- package/presets/opencode/mcp-ts/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/mcp-ts/commands/task-continue.md +9 -0
- package/presets/opencode/mcp-ts/commands/technical-retro.md +8 -0
- package/presets/opencode/mcp-ts/commands/update.md +42 -0
- package/presets/opencode/mcp-ts/hooks/README.md +3 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/mcp-ts/opencode.json +2 -12
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/next/OPENCODE.md +15 -6
- package/presets/opencode/next/REPO_AGENTS.md +15 -1
- package/presets/opencode/next/adapter-map.json +25 -1
- package/presets/opencode/next/agents/build-verifier.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +1 -1
- package/presets/opencode/next/agents/debugger.md +1 -1
- package/presets/opencode/next/agents/feature-developer.md +1 -1
- package/presets/opencode/next/agents/task-analyst.md +1 -1
- package/presets/opencode/next/agents/task-router.md +1 -1
- package/presets/opencode/next/commands/README.md +1 -0
- package/presets/opencode/next/commands/task-continue.md +9 -0
- package/presets/opencode/next/commands/technical-retro.md +8 -0
- package/presets/opencode/next/commands/update.md +42 -0
- package/presets/opencode/next/hooks/README.md +3 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/next/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/next/opencode.json +2 -12
- package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/next/rules/component-catalog-gate.md +13 -0
- package/presets/opencode/next/rules/forms-validation.md +12 -0
- package/presets/opencode/next/rules/next-app-router.md +27 -0
- package/presets/opencode/next/rules/next-static-export.md +16 -0
- package/presets/opencode/next/rules/react-next-anti-hallucination.md +20 -18
- package/presets/opencode/next/rules/security-next.md +13 -0
- package/presets/opencode/next/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/next/team/fixtures/feature-light.json +2 -1
- package/presets/opencode/next/team/fixtures/feature-ui-standard.json +24 -0
- package/presets/opencode/nuxt/OPENCODE.md +15 -6
- package/presets/opencode/nuxt/REPO_AGENTS.md +14 -0
- package/presets/opencode/nuxt/adapter-map.json +17 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/opencode/nuxt/commands/task-continue.md +9 -0
- package/presets/opencode/nuxt/commands/technical-retro.md +8 -0
- package/presets/opencode/nuxt/commands/update.md +42 -0
- package/presets/opencode/nuxt/hooks/README.md +3 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/nuxt/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/nuxt/opencode.json +2 -12
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/php-hexagonal/OPENCODE.md +14 -6
- package/presets/opencode/php-hexagonal/REPO_AGENTS.md +14 -0
- package/presets/opencode/php-hexagonal/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/php-hexagonal/commands/task-continue.md +9 -0
- package/presets/opencode/php-hexagonal/commands/technical-retro.md +8 -0
- package/presets/opencode/php-hexagonal/commands/update.md +42 -0
- package/presets/opencode/php-hexagonal/hooks/README.md +3 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/php-hexagonal/opencode.json +2 -12
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/php-laravel/OPENCODE.md +14 -6
- package/presets/opencode/php-laravel/REPO_AGENTS.md +14 -0
- package/presets/opencode/php-laravel/adapter-map.json +17 -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/commands/README.md +1 -0
- package/presets/opencode/php-laravel/commands/task-continue.md +9 -0
- package/presets/opencode/php-laravel/commands/technical-retro.md +8 -0
- package/presets/opencode/php-laravel/commands/update.md +42 -0
- package/presets/opencode/php-laravel/hooks/README.md +3 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/php-laravel/opencode.json +2 -12
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +2 -0
- package/presets/opencode/svelte/OPENCODE.md +15 -6
- package/presets/opencode/svelte/REPO_AGENTS.md +14 -0
- package/presets/opencode/svelte/adapter-map.json +17 -1
- package/presets/opencode/svelte/agents/build-verifier.md +1 -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/commands/README.md +1 -0
- package/presets/opencode/svelte/commands/task-continue.md +9 -0
- package/presets/opencode/svelte/commands/technical-retro.md +8 -0
- package/presets/opencode/svelte/commands/update.md +42 -0
- package/presets/opencode/svelte/hooks/README.md +3 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +111 -23
- package/presets/opencode/svelte/hooks/check-preset-update.mjs +227 -0
- package/presets/opencode/svelte/opencode.json +2 -12
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/svelte/skills/technical-retro/SKILL.md +2 -0
- package/scripts/check-product-specs.sh +115 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### `update` reinstalls the tools and presets already recorded
|
|
6
|
+
|
|
7
|
+
- **CLI `update`.** Reads `platform` and `preset` from each existing `<tool>/.ai-rules-install.json` (`.cursor`, `.claude`, `.mavis`, `.opencode`) and re-runs `init` for those tools only. A tool without a manifest stays uninstalled. The recorded preset is kept; `--preset` and a tool name are rejected. The plan is validated before the first write, so a bad manifest does not partially update.
|
|
8
|
+
- **Slash command `/update`.** Ships on every stack and platform. It runs `npx @bonesofspring/ai-rules update` from the repository root. No extra install record: the per-tool manifest `init` already writes is the source.
|
|
9
|
+
|
|
10
|
+
### Consumers can require an artifact before a pipeline finishes
|
|
11
|
+
|
|
12
|
+
- Optional `.ai.local/pipeline-gates.json` key `requireArtifacts` blocks completion when a listed id has no completed receipt. Absent file, or a missing/invalid key, leaves the hook unchanged.
|
|
13
|
+
- A `light` UI feature does not schedule `mockup-reviewer` unless the prompt contains a `figma.com` URL or required-signal UX acceptance criteria.
|
|
14
|
+
|
|
15
|
+
### `init` activates `router-pages` on static Pages apps
|
|
16
|
+
|
|
17
|
+
- When `next.config.*` sets `output: 'export'` and a Pages `_app` exists, `init` copies `router-pages.md` into `.ai.local/rules/`. An existing file is not overwritten. Other seeds stay in `.ai.local/rules-library/`.
|
|
18
|
+
|
|
19
|
+
### `init` ships the self-learning engine; `run.mjs` gains `--status` / `--strict`
|
|
20
|
+
|
|
21
|
+
- **Every install seeds `.ai.local/scripts/**`.** `init` copies the six engine modules (`run`, `signals`, `lock`, `rule-improver`, `derive-gate-signals`, `efficacy-oracle`) from `presets/_shared/ai-local/scripts/` — one source for all platforms and stacks, so `claude --preset next` no longer receives zero loop files. Skip-if-exists: a consumer-modified module is kept and reported, and there is no `--force`, so a local fork never gets silently clobbered.
|
|
22
|
+
- **Path safety.** The seed refuses a symlinked `.ai.local` / `.ai.local/scripts` (or a resolved path escaping `--cwd`) with a warning and exit 0 — `.ai.local` is the consumer's shared runtime tree, not a tool root, so a refusal must not fail an install. Newly created engine files and the new ignore file are listed in `createdPaths`, so a failed `init` rolls back exactly what it created.
|
|
23
|
+
- **`.ai.local/.gitignore` covers the engine's own files.** `*.lock`, `*.tmp`, `.rollback/` are ignored from inside `.ai.local/` (the engine writes its locks and temp files there, not under `scripts/`); the consumer's root `.gitignore` is never edited.
|
|
24
|
+
- **`node .ai.local/scripts/run.mjs --status`** is a read-only inspection: per signature distinct slugs, tier + next action, last capture, malformed-line count, cohort readiness, the authoring envelope, and how many derivable signals are not captured yet. Missing / empty / malformed / populated stores render four distinguishable states.
|
|
25
|
+
- **`node .ai.local/scripts/run.mjs --strict`** exits 1 only when capture is broken — the last 3 completed tasks produced no signals *and* either the store is absent or one of them carries a mappable gate outcome. Exit codes: `0` ok, `1` broken, `2` usage. Both modes write nothing, and the chain hook never passes `--strict`.
|
|
26
|
+
- **The chain hook runs the loop after every producer receipt** (`chain-team-phases.sh` template tail): one run per completed stop, the child's stdout forwarded to stderr so the hook's own JSON stdout contract is untouched, a 15 s cap, `|| true`, and exactly one `WARNING:` line when the engine is absent. The `light` profile and `spike` intent skip silently.
|
|
27
|
+
- **One loop paragraph.** The stale `rule-improver.mjs` / raw-JSONL / "skip silently" instructions are gone from every carrier (agents, orchestrator rule, commands, retro skill); `check-preset-self-review-contract.sh` now fails on reintroduction and `test-preset-self-review-contract-fixtures.mjs` proves the negative.
|
|
28
|
+
|
|
29
|
+
### OpenCode config: only the schema OpenCode reads (breaking for existing `opencode.json`)
|
|
30
|
+
|
|
31
|
+
- **The deny map is `permission.bash`.** `opencode.ai/docs/permissions` (re-read 2026-10-26) keys the v1 `permission` object by tool name, and the shell-command tool is `bash`. `permission.shell` is not that key. v2 is a separate schema (`permissions[]` with `action: "shell"`); this preset does not emit it. Rules resolve by pattern match with the **last** match winning, so `'*': 'allow'` stays first and the `git commit` / `git push` `deny` rows after it bind.
|
|
32
|
+
- **The top-level `policies` array is removed, not renamed.** `opencode.ai/docs/policies` configures policies at `experimental.policies` and supports exactly one action, `provider.use`, so a `tool.use` hard-deny cannot be expressed at all. A consumer-authored `policies` array is left untouched.
|
|
33
|
+
- **Bare `git commit` / `git push` are denied too.** `git commit *` does not match the argument-less form — the invocation that opens the editor. The rows live in the stack profile, so Claude Code's `settings.json` deny lists gain `Bash(git commit)` and `Bash(git push)`; `scripts/sync-claude-settings.mjs` now runs inside `fix:generated`, which is what stops the two platforms drifting.
|
|
34
|
+
- **The guard rows are sticky.** A pre-existing `"git push *": "allow"` in a consumer's `permission.bash` is re-applied to `deny` on re-init. Every other key keeps consumer-wins, so this is not a global precedence inversion; the guard list is asserted set-equal to the profile by `check:opencode-platform-contract`.
|
|
35
|
+
- **The claim prose is corrected.** `.opencode/AGENTS.md` no longer says the guard is "non-overridable". It states what the deny does guarantee (it survives the `'*': 'allow'` catch-all and `--auto`) and what it does not: an agent-level `permission` block takes precedence over the global map, a command whose parsed form does not match the pattern is not covered, and a user editing their own `opencode.json` can widen it. `commit-hygiene` plus the human commit step remains the control.
|
|
36
|
+
- **Migration.** A file that only has `permission.shell` (the unbound key this package briefly emitted) is folded into `permission.bash` on re-init, and `shell` is removed. A consumer `policies` array is left untouched. `clean` still strips a block recorded under either `added.bash` or `added.shell`. Re-run `init opencode` to pick up `permission.bash`.
|
|
37
|
+
|
|
5
38
|
### Presets: prompt-persistence reachability, core classification, reachability gate, `preset-*` authoring-only
|
|
6
39
|
|
|
7
40
|
- **Prompt persistence is now always-on.** The clause ("every work request — with or without `/task` — writes `.ai.local/team/tasks/<slug>/prompt.md` and appends follow-ups to `prompt-log.md`") rides the root `REPO_AGENTS.md` → `AGENTS.md` entry, so it is reachable without `/task` (the command / orchestrator / intake consumers were all lazy `referenced` rules). `check-preset-prompt-persistence.sh` gains check **E** against `REPO_AGENTS.md`.
|
|
@@ -487,6 +520,254 @@ Cross-cutting preset packaging work (all six presets unless noted **next-only**)
|
|
|
487
520
|
|
|
488
521
|
- **P2 optional (ios-swift):** Remaining polish: feature-delivery matrix enrichment, swift-conventions body cap. (`BUGBOT.md` shipped.)
|
|
489
522
|
|
|
523
|
+
## 0.2.39
|
|
524
|
+
|
|
525
|
+
### A `null` journal line no longer stops the self-learning loop
|
|
526
|
+
|
|
527
|
+
- `JSON.parse("null")` is valid JSON and returns `null`. Reading `.slug` / `.at` on it threw, and one such line aborted derivation, `run.mjs`, and the efficacy oracle.
|
|
528
|
+
- Those readers now require a non-null object that is not an array. A `null`, primitive, or array line is skipped and left in the file. `--status` counts it as malformed. Objects that are missing fields were already skipped.
|
|
529
|
+
|
|
530
|
+
### `task_completed` is written only after `requireArtifacts` passes
|
|
531
|
+
|
|
532
|
+
- `chain-team-phases.sh` used to record `task_completed` and then call completion, which can still write `state: blocked` when `.ai.local/pipeline-gates.json` lists a receipt that is not completed. Metrics then showed a finished task that had failed the last check.
|
|
533
|
+
- The metric is written only on the success branch, after the receipt check, on every platform and stack. A missing receipt still blocks and writes no `task_completed`. A pipeline that completes because no step remains now records the metric too.
|
|
534
|
+
|
|
535
|
+
### Derived signals are deduped inside the lock
|
|
536
|
+
|
|
537
|
+
- Two overlapping `run.mjs` runs could both derive the same `(slug, id, kind)` and both append it. The check now re-reads the journal under the lock before appending. The report's `appended` count includes only the row that was written.
|
|
538
|
+
|
|
539
|
+
### The engine lock is `flock`, and the lock file stays
|
|
540
|
+
|
|
541
|
+
- Reclaiming a stale `.ai.local/scripts` lock by `unlink` could delete a lock a second process had just taken. Ownership is now a POSIX `flock` held by a short-lived `perl` helper (`Fcntl`, `Time::HiRes`). The helper drops the lock when its parent exits, including after a crash. The lock file is not removed: a file on disk does not mean the lock is held. `staleMs` is accepted and ignored.
|
|
542
|
+
- `perl` with those two modules is required. If it is missing, acquire fails with `lock helper unavailable: perl with Fcntl and Time::HiRes`.
|
|
543
|
+
- The metrics lock inside `chain-team-phases.sh` is unchanged (token file plus `unlink`).
|
|
544
|
+
|
|
545
|
+
### Preset-update notice refreshes after one hour
|
|
546
|
+
|
|
547
|
+
- `hooks/check-preset-update.mjs` caches the npm `latest` lookup for 1 hour. `0.2.38` cached it for 12 hours.
|
|
548
|
+
|
|
549
|
+
### Upgrade
|
|
550
|
+
|
|
551
|
+
- `npx @bonesofspring/ai-rules update` replaces the managed hooks, so the `task_completed` order and the one-hour cache land on re-init.
|
|
552
|
+
- `init` / `update` does not overwrite an existing `.ai.local/scripts/*.mjs`. The journal, dedup, and `flock` fixes ship in `run.mjs`, `signals.mjs`, `lock.mjs`, `rule-improver.mjs`, `derive-gate-signals.mjs`, and `efficacy-oracle.mjs`. If those files are still the copies from an older install, replace them with the package copies (a local edit is kept on purpose).
|
|
553
|
+
|
|
554
|
+
## 0.2.38
|
|
555
|
+
|
|
556
|
+
### Presets report a newer package and name the latest version
|
|
557
|
+
|
|
558
|
+
- Cursor `sessionStart` and Claude `SessionStart` run `hooks/check-preset-update.mjs`. Mavis and OpenCode run the same script on the first reply (`## Preset version` in root `AGENTS.md`).
|
|
559
|
+
- When `packageVersion` in `<tool>/.ai-rules-install.json` is older than the npm latest for `@bonesofspring/ai-rules`, the agent tells the user the installed version, the latest version, and to run `/update`. A registry failure stays silent. The registry lookup is cached for 12 hours.
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
### Added
|
|
563
|
+
|
|
564
|
+
- Maintainer coverage: `scripts/test-preset-update-check.mjs` for the preset-update hook. (6023272d)
|
|
565
|
+
|
|
566
|
+
## 0.2.37
|
|
567
|
+
|
|
568
|
+
### Added
|
|
569
|
+
|
|
570
|
+
- Hook body parity and shared-core drift lineage fixture tests (`test-hook-body-parity-fixtures.mjs`, `test-shared-core-drift-lineage-fixtures.mjs`). (e9aea2d6)
|
|
571
|
+
|
|
572
|
+
## 0.2.36
|
|
573
|
+
|
|
574
|
+
### Changed
|
|
575
|
+
|
|
576
|
+
- OpenCode adapter generation and `scripts/lib/stack-platform-profiles.mjs`; extended `test-cli-mcp-merge.mjs`. (29897447)
|
|
577
|
+
|
|
578
|
+
## 0.2.35
|
|
579
|
+
|
|
580
|
+
### Added
|
|
581
|
+
|
|
582
|
+
- Generated-tree test fixtures (`test-generate-claude-fixtures.mjs`, `test-generated-drift-fixtures.mjs`, `test-generated-drift-claude-fixtures.mjs`). (26f438de)
|
|
583
|
+
|
|
584
|
+
## 0.2.34
|
|
585
|
+
|
|
586
|
+
### Added
|
|
587
|
+
|
|
588
|
+
- Chain hook coverage extensions (`test-chain-team-phases-coverage.mjs`, `test-parallel-plan-fixtures.mjs`). (057f6646)
|
|
589
|
+
|
|
590
|
+
## 0.2.33
|
|
591
|
+
|
|
592
|
+
### Added
|
|
593
|
+
|
|
594
|
+
- Preset contract fixture suites (`test-preset-language-policy-fixtures.mjs`, `test-preset-prompt-persistence-fixtures.mjs`, `test-preset-self-review-contract-fixtures.mjs`). (5d214e58)
|
|
595
|
+
|
|
596
|
+
## 0.2.32
|
|
597
|
+
|
|
598
|
+
### Changed
|
|
599
|
+
|
|
600
|
+
- Mavis/OpenCode adapter generators (`scripts/lib/generate-adapter-common.mjs`, `generate-mavis-adapter.mjs`, `generate-opencode-adapter.mjs`). (879ec753)
|
|
601
|
+
|
|
602
|
+
## 0.2.30
|
|
603
|
+
|
|
604
|
+
### Changed
|
|
605
|
+
|
|
606
|
+
- Refreshed Mavis/OpenCode CLI goldens (`scripts/fixtures/cli-golden/mavis/next.json`, `opencode/next.json`). (997c45f8)
|
|
607
|
+
|
|
608
|
+
## 0.2.29
|
|
609
|
+
|
|
610
|
+
### Added
|
|
611
|
+
|
|
612
|
+
- `scripts/sync-dogfood-claude.sh` for Claude dogfood sync from presets. (e22c5b7f)
|
|
613
|
+
|
|
614
|
+
## 0.2.28
|
|
615
|
+
|
|
616
|
+
### Added
|
|
617
|
+
|
|
618
|
+
- `scripts/sync-claude-settings.mjs`; additional `test-cli-mcp-merge.mjs` cases. (cc5ea6a9)
|
|
619
|
+
|
|
620
|
+
## 0.2.27
|
|
621
|
+
|
|
622
|
+
### Changed
|
|
623
|
+
|
|
624
|
+
- Large preset tree refresh under `packages/ai-rules/presets/**` (Mavis/OpenCode/Cursor twins). (f293ba6f)
|
|
625
|
+
|
|
626
|
+
## 0.2.26
|
|
627
|
+
|
|
628
|
+
### Changed
|
|
629
|
+
|
|
630
|
+
- Mass regeneration of Mavis/OpenCode install trees and related preset sources (`presets/mavis/**`, `presets/opencode/**`). (42bc7e13)
|
|
631
|
+
|
|
632
|
+
## 0.2.25
|
|
633
|
+
|
|
634
|
+
### Added
|
|
635
|
+
|
|
636
|
+
- **OpenCode** platform preset (`presets/opencode/**`) and `scripts/test-opencode-context-budget.mjs`. (1a05fffd)
|
|
637
|
+
|
|
638
|
+
## 0.2.24
|
|
639
|
+
|
|
640
|
+
### Changed
|
|
641
|
+
|
|
642
|
+
- Mavis preset review follow-up: `scripts/sync-dogfood-mavis.sh`, CLI golden tweaks. (df44f6f4)
|
|
643
|
+
|
|
644
|
+
## 0.2.23
|
|
645
|
+
|
|
646
|
+
### Added
|
|
647
|
+
|
|
648
|
+
- **Mavis** platform preset (`presets/mavis/**`) with `scripts/test-mavis-orchestration.mjs` and capability probes. (2f4880da)
|
|
649
|
+
|
|
650
|
+
## 0.2.22
|
|
651
|
+
|
|
652
|
+
### Added
|
|
653
|
+
|
|
654
|
+
- `scripts/test-task-router-intents-fixtures.mjs`; extended chain-hook coverage tests. (f7251cef)
|
|
655
|
+
|
|
656
|
+
## 0.2.21
|
|
657
|
+
|
|
658
|
+
### Added
|
|
659
|
+
|
|
660
|
+
- `scripts/test-chain-team-phases-coverage.mjs` for hook/agent handoff coverage. (73c2d788)
|
|
661
|
+
|
|
662
|
+
## 0.2.20
|
|
663
|
+
|
|
664
|
+
### Changed
|
|
665
|
+
|
|
666
|
+
- Preset cleanup and shared-core drift checks across stacks (`check-shared-core-drift.sh` updates). (0cebd54b)
|
|
667
|
+
|
|
668
|
+
## 0.2.19
|
|
669
|
+
|
|
670
|
+
### Added
|
|
671
|
+
|
|
672
|
+
- CLI MCP merge tests in `scripts/test-cli-mcp-merge.mjs`. (9208ab39)
|
|
673
|
+
|
|
674
|
+
## 0.2.18
|
|
675
|
+
|
|
676
|
+
### Added
|
|
677
|
+
|
|
678
|
+
- UX / mockup-review preset stems and routing updates (`feat: ux changes` diff under `presets/**/rules` and agents). (7e9a9040)
|
|
679
|
+
|
|
680
|
+
## 0.2.17
|
|
681
|
+
|
|
682
|
+
### Added
|
|
683
|
+
|
|
684
|
+
- Product specs checker `scripts/check-product-specs.sh` and related preset authoring assets. (97dd9696)
|
|
685
|
+
|
|
686
|
+
## 0.2.16
|
|
687
|
+
|
|
688
|
+
### Added
|
|
689
|
+
|
|
690
|
+
- **android-kotlin** installable preset (`presets/cursor/android-kotlin/**`, `presets/claude/android-kotlin/**`). (1271e4bb)
|
|
691
|
+
|
|
692
|
+
## 0.2.15
|
|
693
|
+
|
|
694
|
+
### Changed
|
|
695
|
+
|
|
696
|
+
- Preset English translation pass; `scripts/sync-shared-core-embeds.sh` and `check-preset-i18n` wiring. (260f29ca)
|
|
697
|
+
|
|
698
|
+
## 0.2.14
|
|
699
|
+
|
|
700
|
+
### Added
|
|
701
|
+
|
|
702
|
+
- **nuxt** and **svelte** installable presets (`presets/cursor/nuxt/**`, `presets/cursor/svelte/**`, Claude twins). (342200c1, 142e3650)
|
|
703
|
+
|
|
704
|
+
## 0.2.13
|
|
705
|
+
|
|
706
|
+
### Changed
|
|
707
|
+
|
|
708
|
+
- **php-laravel** preset follow-up; `scripts/aggregate-agent-task-metrics.mjs` and metrics hook tests extended. (f1da4526)
|
|
709
|
+
|
|
710
|
+
## 0.2.12
|
|
711
|
+
|
|
712
|
+
### Added
|
|
713
|
+
|
|
714
|
+
- **php-hexagonal** and **php-laravel** presets; `scripts/close-agent-task-human-gate.mjs` and `test-agent-task-metrics-hooks.mjs`. (d5057bfc)
|
|
715
|
+
|
|
716
|
+
## 0.2.11
|
|
717
|
+
|
|
718
|
+
### Added
|
|
719
|
+
|
|
720
|
+
- **mcp-ts** installable preset (`presets/cursor/mcp-ts/**`, `presets/claude/mcp-ts/**`). (175c8096)
|
|
721
|
+
|
|
722
|
+
## 0.2.10
|
|
723
|
+
|
|
724
|
+
### Changed
|
|
725
|
+
|
|
726
|
+
- Shared-core embed and token-budget script updates across stacks. (edb4f7eb)
|
|
727
|
+
|
|
728
|
+
## 0.2.9
|
|
729
|
+
|
|
730
|
+
### Added
|
|
731
|
+
|
|
732
|
+
- Requestable `react-next-anti-hallucination` rule (`presets/cursor/next/rules/react-next-anti-hallucination.mdc`). (ec27c49e)
|
|
733
|
+
|
|
734
|
+
## 0.2.8
|
|
735
|
+
|
|
736
|
+
### Changed
|
|
737
|
+
|
|
738
|
+
- Preset structure/leakage gate scripts (`check-preset-leakage.sh`, `check-preset-structure.sh`). (59157110)
|
|
739
|
+
|
|
740
|
+
## 0.2.7
|
|
741
|
+
|
|
742
|
+
### Added
|
|
743
|
+
|
|
744
|
+
- Opt-in rule eval harness `scripts/check-rule-eval.mjs`; team `conventions.md` template under cursor next. (03b4088b)
|
|
745
|
+
|
|
746
|
+
## 0.2.6
|
|
747
|
+
|
|
748
|
+
### Added
|
|
749
|
+
|
|
750
|
+
- Preset CI gates: `check-preset-twin-map.sh`, `check-preset-token-budget.sh`, `check-shared-core-drift.sh`, `sync-dogfood-cursor.sh`; `_shared/core/**` expansion. (5067c91e)
|
|
751
|
+
|
|
752
|
+
## 0.2.5
|
|
753
|
+
|
|
754
|
+
### Changed
|
|
755
|
+
|
|
756
|
+
- `task-router` agent and `agent-team-orchestrator` rule updates; team fixtures adjusted. (789e68a3)
|
|
757
|
+
|
|
758
|
+
## 0.2.4
|
|
759
|
+
|
|
760
|
+
### Added
|
|
761
|
+
|
|
762
|
+
- Cursor `next` MCP config (`presets/cursor/next/mcp.json`) and related orchestrator/team docs. (c4ad5eb4)
|
|
763
|
+
|
|
764
|
+
## 0.2.3
|
|
765
|
+
|
|
766
|
+
### Added
|
|
767
|
+
|
|
768
|
+
- **ios-swift** preset (`presets/cursor/ios-swift/**`, `presets/claude/ios-swift/**`). The same commit added the `## 0.2.2` changelog section; the file already existed. (87d0aed5)
|
|
769
|
+
|
|
770
|
+
|
|
490
771
|
## 0.2.2
|
|
491
772
|
|
|
492
773
|
### Breaking
|
|
@@ -523,4 +804,4 @@ Cross-cutting preset packaging work (all six presets unless noted **next-only**)
|
|
|
523
804
|
|
|
524
805
|
## 0.1.42
|
|
525
806
|
|
|
526
|
-
|
|
807
|
+
No `v0.1.*` git tags exist in this repository; 0.1.x release deltas are not recoverable from tags.
|
package/README.md
CHANGED
|
@@ -4,12 +4,13 @@ Presets for **Cursor**, **Claude Code**, **Mavis** (MiniMax `mcode`), and **Open
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx @bonesofspring/ai-rules init multi --preset next
|
|
7
|
+
npx @bonesofspring/ai-rules update # reinstall tools already recorded in this repo
|
|
7
8
|
npx @bonesofspring/ai-rules clean cursor # never deletes .ai.local/
|
|
8
9
|
```
|
|
9
10
|
|
|
10
11
|
Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `next`. Forms: `init cursor --preset next`, `init cursor next`, `init cursor`. Global: `npm i -g @bonesofspring/ai-rules`.
|
|
11
12
|
|
|
12
|
-
`init` overwrites matching files. MCP is the exception: `mcpServers` is **merged** when the existing file is valid JSON (extra servers kept; shipped keys updated
|
|
13
|
+
`init` overwrites matching files. MCP is the exception: `mcpServers` is **merged** when the existing file is valid JSON (extra servers kept; shipped keys updated). Re-init overwrites preset scalar fields on a shipped server, such as `command`. When the preset entry omits `env` or `headers`, the consumer values are kept; a nested key the preset does define replaces that key. An existing config that is not a valid JSON object fails `init` with exit 1 and is left untouched — nothing is backed up or replaced. `.claude/settings.json` is merged too (permission arrays are append-if-missing, preset hooks added per command). When the preset denies bare `Bash(git commit)` or `Bash(git push)`, re-init forces those stems into `permissions.deny` and removes the same stem from `allow` and `ask`, even if the consumer file already allowed them. Every other permission entry stays consumer-wins and is not inverted. It is the third merged-config path alongside `opencode.json` and `.mcp.json`. Deleting a shipped server is not sticky — the next `init` restores it.
|
|
13
14
|
|
|
14
15
|
## What `init` writes
|
|
15
16
|
|
|
@@ -20,8 +21,24 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
|
|
|
20
21
|
| MCP | `.cursor/mcp.json` (merge) | **`.mcp.json`** (merge) | `.mavis/mcp.json` (merge) | `opencode.json` (merge) |
|
|
21
22
|
| Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all four) | | | |
|
|
22
23
|
| `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
|
|
24
|
+
| Self-learning engine | **`.ai.local/scripts/`** (shared; six modules; existing files never overwritten) | | | |
|
|
23
25
|
| Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
|
|
24
26
|
|
|
27
|
+
The engine is the in-task self-learning loop: `.ai.local/signals.jsonl` → `.ai.local/rule-changes.jsonl` →
|
|
28
|
+
`.ai.local/conventions.md` / `.ai.local/rules-library/`. The chain hook runs it after every producer receipt; run it
|
|
29
|
+
yourself when the hook is disabled:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node .ai.local/scripts/run.mjs # derive → append → improve
|
|
33
|
+
node .ai.local/scripts/run.mjs --status # read-only: per-signature state, last capture, envelope
|
|
34
|
+
node .ai.local/scripts/run.mjs --strict # read-only check: exit 1 when capture is broken
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`init` seeds the engine with **skip-if-exists** — a modified `run.mjs` stays yours and is reported as kept; there is no
|
|
38
|
+
`--force`. Re-running `init` does not update a seeded module, so delete the file to pick up a newer engine. The seeded
|
|
39
|
+
tree is byte-identical to `presets/_shared/ai-local/scripts/`, and `.ai.local/.gitignore` (created only when absent)
|
|
40
|
+
ignores `*.lock`, `*.tmp`, and `.rollback/`; the root `.gitignore` is never edited.
|
|
41
|
+
|
|
25
42
|
Living exceptions: **`.ai.local/rules/`** and **`.ai.local/conventions.md`** (`init` does not overwrite them). Overlay does not load `.ai.local/team/**` as rules.
|
|
26
43
|
|
|
27
44
|
**`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.
|
|
@@ -36,6 +53,10 @@ Mavis never writes `~/.minimax/**`. OpenCode never writes `~/.config/opencode/**
|
|
|
36
53
|
|
|
37
54
|
`init multi --preset <stack>` installs every platform that lists the stack in `releasedStacks` (all 10 stacks on all four platforms). Commit the four trees, root `AGENTS.md`, and `.ai.local/team/` templates if you want them in the clone.
|
|
38
55
|
|
|
56
|
+
`update` reinstalls each tool whose `<tool>/.ai-rules-install.json` is already present, using the `preset` field `init` wrote (`platform` + `preset`). Slash command `/update` runs that CLI. A tool without a manifest stays uninstalled, and the recorded preset stays as stored. To switch preset, run `init <tool> --preset <name>`.
|
|
57
|
+
|
|
58
|
+
On session start (Cursor and Claude hooks; Mavis and OpenCode on the first reply) the preset compares that recorded `packageVersion` with the latest `@bonesofspring/ai-rules` release. When a newer release exists, the agent names the installed version and the latest version and asks the user to run `/update`.
|
|
59
|
+
|
|
39
60
|
## Stacks
|
|
40
61
|
|
|
41
62
|
`next` · `nuxt` · `svelte` · `ios-swift` · `android-kotlin` · `go` · `java` · `mcp-ts` · `php-hexagonal` · `php-laravel`
|
|
@@ -54,7 +75,7 @@ Skills of note: `write-adr` (all except `mcp-ts`); `spec-authoring` / `/spec-sta
|
|
|
54
75
|
|
|
55
76
|
`openspec/**` is a separate tree owned by agent `openspec-author` (all stacks except `mcp-ts`). Not a substitute for `docs/specs/`.
|
|
56
77
|
|
|
57
|
-
Optional check: `yarn check:product-specs <repo-root
|
|
78
|
+
Optional check: `yarn check:product-specs [<repo-root>]` (WARN) or `--strict`. The default root is the repository root; a tree with no `docs/specs/domains/<domain>/<spec>.md` fails under `--strict` rather than passing for having inspected nothing. `yarn check:product-specs:self-test` asserts the parser's three verdicts.
|
|
58
79
|
|
|
59
80
|
## Contributing
|
|
60
81
|
|
package/bin/cli.js
CHANGED
|
@@ -81,6 +81,7 @@ function printHelp() {
|
|
|
81
81
|
Usage:
|
|
82
82
|
ai-rules init <cursor|claude|mavis|opencode|multi> [--preset <name>]
|
|
83
83
|
ai-rules init <cursor|claude|mavis|opencode|multi> <preset-name>
|
|
84
|
+
ai-rules update [--cwd <dir>]
|
|
84
85
|
ai-rules clean <cursor|claude|mavis|opencode> [--cwd <dir>]
|
|
85
86
|
|
|
86
87
|
Options:
|
|
@@ -110,6 +111,7 @@ Notes:
|
|
|
110
111
|
OpenCode init copies into .opencode/ plus REPO_AGENTS.md → <cwd>/AGENTS.md; MCP merges into <cwd>/opencode.json (never ~/.config/opencode/**).
|
|
111
112
|
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).
|
|
112
113
|
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.
|
|
113
115
|
When <cwd>/docs/specs/ is absent, init also seeds INDEX.md stub + _templates/* from package assets (never overwrites an existing INDEX).
|
|
114
116
|
clean removes only files the last init copied and that are unchanged since; consumer files are kept.
|
|
115
117
|
Merged configs are never deleted wholesale: clean strips the entries init added (shipped MCP servers, preset
|
|
@@ -145,6 +147,7 @@ Examples:
|
|
|
145
147
|
npx @bonesofspring/ai-rules init opencode --preset go
|
|
146
148
|
npx @bonesofspring/ai-rules init multi --preset next
|
|
147
149
|
npx @bonesofspring/ai-rules init multi --preset svelte
|
|
150
|
+
npx @bonesofspring/ai-rules update
|
|
148
151
|
npx @bonesofspring/ai-rules clean mavis
|
|
149
152
|
npx @bonesofspring/ai-rules clean opencode
|
|
150
153
|
npx @bonesofspring/ai-rules clean cursor
|
|
@@ -690,6 +693,94 @@ function cmdInitMulti(preset, cwdOption) {
|
|
|
690
693
|
console.log(`\nDone. multi installed ${installed.join(', ')}${skipNote}`);
|
|
691
694
|
}
|
|
692
695
|
|
|
696
|
+
const UPDATE_TARGETS = [
|
|
697
|
+
{ tool: 'cursor', root: '.cursor' },
|
|
698
|
+
{ tool: 'claude', root: '.claude' },
|
|
699
|
+
{ tool: 'mavis', root: '.mavis' },
|
|
700
|
+
{ tool: 'opencode', root: '.opencode' },
|
|
701
|
+
];
|
|
702
|
+
|
|
703
|
+
function updatePresetReady(tool, presetName) {
|
|
704
|
+
const packageRoot = getPackageRoot();
|
|
705
|
+
if (tool === 'cursor' || tool === 'claude') {
|
|
706
|
+
const cfg = PRESETS[tool];
|
|
707
|
+
return presetHasAnySource(path.join(packageRoot, ...cfg.relBase, presetName), cfg);
|
|
708
|
+
}
|
|
709
|
+
const base = path.join(packageRoot, 'presets', tool, presetName);
|
|
710
|
+
if (!fs.existsSync(base) || !fs.statSync(base).isDirectory()) {
|
|
711
|
+
return false;
|
|
712
|
+
}
|
|
713
|
+
const released = loadReleasedStacks(tool);
|
|
714
|
+
return !released || released.length === 0 || released.includes(presetName);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Reinstall every tool that has an install manifest, using the preset recorded there.
|
|
719
|
+
* Validates the whole plan before the first init so a bad manifest does not partially update.
|
|
720
|
+
*/
|
|
721
|
+
function cmdUpdate(cwdOption) {
|
|
722
|
+
const cwd = resolveTargetCwd(cwdOption);
|
|
723
|
+
const errors = [];
|
|
724
|
+
const found = [];
|
|
725
|
+
|
|
726
|
+
for (const { tool, root } of UPDATE_TARGETS) {
|
|
727
|
+
const rel = `${root}/.ai-rules-install.json`;
|
|
728
|
+
const abs = resolveManagedPath(cwd, rel);
|
|
729
|
+
if (!abs) {
|
|
730
|
+
errors.push(`${rel}: unsafe path`);
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
733
|
+
if (!fs.existsSync(abs)) {
|
|
734
|
+
continue;
|
|
735
|
+
}
|
|
736
|
+
let manifest;
|
|
737
|
+
try {
|
|
738
|
+
manifest = JSON.parse(fs.readFileSync(abs, 'utf8'));
|
|
739
|
+
} catch {
|
|
740
|
+
errors.push(`${rel}: invalid JSON`);
|
|
741
|
+
continue;
|
|
742
|
+
}
|
|
743
|
+
if (!isPlainObject(manifest)) {
|
|
744
|
+
errors.push(`${rel}: not a JSON object`);
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
if (manifest.platform !== tool) {
|
|
748
|
+
errors.push(`${rel}: platform is ${JSON.stringify(manifest.platform)}, expected "${tool}"`);
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
if (typeof manifest.preset !== 'string' || validatePresetName(manifest.preset)) {
|
|
752
|
+
errors.push(`${rel}: missing preset. Run init ${tool} --preset <name> once, then update.`);
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
if (!updatePresetReady(tool, manifest.preset)) {
|
|
756
|
+
errors.push(`${rel}: preset "${manifest.preset}" is not installed for ${tool}`);
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
759
|
+
found.push({ tool, preset: manifest.preset });
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
if (errors.length > 0) {
|
|
763
|
+
for (const error of errors) {
|
|
764
|
+
console.error(`update: ${error}`);
|
|
765
|
+
}
|
|
766
|
+
process.exit(1);
|
|
767
|
+
}
|
|
768
|
+
if (found.length === 0) {
|
|
769
|
+
console.error(
|
|
770
|
+
'update: no install manifest found. Run init for the tools you use, then update.',
|
|
771
|
+
);
|
|
772
|
+
process.exit(1);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
const plan = found.map((item) => `${item.tool} (${item.preset})`).join(', ');
|
|
776
|
+
console.log(`update: reinstalling ${plan}`);
|
|
777
|
+
for (const item of found) {
|
|
778
|
+
console.log(`\n=== update ${item.tool} --preset ${item.preset} ===`);
|
|
779
|
+
cmdInit(item.tool, item.preset, cwdOption);
|
|
780
|
+
}
|
|
781
|
+
console.log(`\nDone. update reinstalled ${plan}`);
|
|
782
|
+
}
|
|
783
|
+
|
|
693
784
|
function cmdInit(tool, preset, cwdOption) {
|
|
694
785
|
if (tool === 'mavis') {
|
|
695
786
|
cmdInitMavis({
|
|
@@ -1033,6 +1124,20 @@ function main() {
|
|
|
1033
1124
|
cmdInit(tool, preset, parsed.cwd);
|
|
1034
1125
|
return;
|
|
1035
1126
|
}
|
|
1127
|
+
if (command === 'update') {
|
|
1128
|
+
if (tool) {
|
|
1129
|
+
console.error('update does not take a tool. It reinstalls every tool that has an install manifest.');
|
|
1130
|
+
process.exit(1);
|
|
1131
|
+
}
|
|
1132
|
+
if (preset) {
|
|
1133
|
+
console.error(
|
|
1134
|
+
'update does not take --preset. It keeps the preset recorded for each installed tool.',
|
|
1135
|
+
);
|
|
1136
|
+
process.exit(1);
|
|
1137
|
+
}
|
|
1138
|
+
cmdUpdate(parsed.cwd);
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1036
1141
|
if (command === 'clean') {
|
|
1037
1142
|
if (tool === 'multi') {
|
|
1038
1143
|
console.error('clean multi is not supported. Clean each tool: cursor, claude, mavis, opencode.');
|
|
@@ -1047,7 +1152,7 @@ function main() {
|
|
|
1047
1152
|
}
|
|
1048
1153
|
|
|
1049
1154
|
const got = command === undefined ? 'none' : command;
|
|
1050
|
-
console.error(`Unknown command: ${got}. Use init or clean.`);
|
|
1155
|
+
console.error(`Unknown command: ${got}. Use init, update, or clean.`);
|
|
1051
1156
|
printHelp();
|
|
1052
1157
|
process.exit(1);
|
|
1053
1158
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shipped self-learning engine, declared once.
|
|
3
|
+
*
|
|
4
|
+
* `init` seeds exactly these files into a consumer's `.ai.local/scripts/`, and
|
|
5
|
+
* the monorepo dogfood copy is mirrored from the same source by
|
|
6
|
+
* `scripts/lib/engine-mirror.mjs`. An explicit list — never a glob — keeps the
|
|
7
|
+
* repo-local tooling (the `*.test.mjs` suites and `requirements-*.mjs`) out of
|
|
8
|
+
* the shipped set.
|
|
9
|
+
*/
|
|
10
|
+
const ENGINE_SCRIPTS = [
|
|
11
|
+
'run.mjs',
|
|
12
|
+
'signals.mjs',
|
|
13
|
+
'lock.mjs',
|
|
14
|
+
'rule-improver.mjs',
|
|
15
|
+
'derive-gate-signals.mjs',
|
|
16
|
+
'efficacy-oracle.mjs',
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
/** Preset-root-relative directory holding the engine source of truth. */
|
|
20
|
+
const ENGINE_SOURCE_RELATIVE = '_shared/ai-local/scripts';
|
|
21
|
+
|
|
22
|
+
module.exports = { ENGINE_SCRIPTS, ENGINE_SOURCE_RELATIVE };
|
package/bin/lib/fs-utils.js
CHANGED
|
@@ -6,6 +6,8 @@ const fs = require('fs');
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const { assertSafeDest, lstatOrNull } = require('./safe-path');
|
|
8
8
|
|
|
9
|
+
const ROLLBACK_IGNORE_FILE = '.gitignore';
|
|
10
|
+
|
|
9
11
|
function isPlainObject(value) {
|
|
10
12
|
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
11
13
|
}
|
|
@@ -37,18 +39,47 @@ function renameIntoPlace(tmp, dest) {
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
/**
|
|
43
|
+
* The temp path both atomic writers share. The name is deliberately predictable so a
|
|
44
|
+
* regression test can plant a symlink at it — which is why the path is contained twice:
|
|
45
|
+
* `assertSafeDest` walks every parent component and refuses a symlinked one, and the
|
|
46
|
+
* callers' `O_EXCL` create makes the kernel refuse the leaf itself, dangling links
|
|
47
|
+
* included. Nothing is swept on `EEXIST`: concurrent `init` runs share this name, so
|
|
48
|
+
* deleting what is there would destroy another run's in-flight write.
|
|
49
|
+
*/
|
|
50
|
+
function atomicTempPath(cwd, dest, label) {
|
|
51
|
+
const tmp = `${dest}.ai-rules-tmp`;
|
|
52
|
+
assertSafeDest(cwd, tmp, `${label} (atomic temp)`);
|
|
53
|
+
return tmp;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Run an `O_EXCL` create at the shared temp path, turning `EEXIST` into an actionable refusal. */
|
|
57
|
+
function createTempExclusive(tmp, create) {
|
|
58
|
+
try {
|
|
59
|
+
create();
|
|
60
|
+
} catch (err) {
|
|
61
|
+
if (err.code === 'EEXIST') {
|
|
62
|
+
throw new Error(
|
|
63
|
+
`${tmp} already exists; refusing to write through or overwrite it. `
|
|
64
|
+
+ 'It is left by an interrupted or concurrent run — delete it and re-run.',
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
throw err;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
40
71
|
/** Write via a temp file + rename so an interrupted write cannot corrupt the destination. */
|
|
41
|
-
function writeFileAtomic(dest, content) {
|
|
72
|
+
function writeFileAtomic(cwd, dest, content, label) {
|
|
73
|
+
const tmp = atomicTempPath(cwd, dest, label);
|
|
42
74
|
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
43
|
-
|
|
44
|
-
fs.writeFileSync(tmp, content);
|
|
75
|
+
createTempExclusive(tmp, () => fs.writeFileSync(tmp, content, { flag: 'wx' }));
|
|
45
76
|
renameIntoPlace(tmp, dest);
|
|
46
77
|
}
|
|
47
78
|
|
|
48
|
-
function copyFileAtomic(source, dest) {
|
|
79
|
+
function copyFileAtomic(cwd, source, dest, label) {
|
|
80
|
+
const tmp = atomicTempPath(cwd, dest, label);
|
|
49
81
|
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
50
|
-
|
|
51
|
-
fs.copyFileSync(source, tmp);
|
|
82
|
+
createTempExclusive(tmp, () => fs.copyFileSync(source, tmp, fs.constants.COPYFILE_EXCL));
|
|
52
83
|
if (dest.endsWith('.sh')) {
|
|
53
84
|
fs.chmodSync(tmp, 0o755);
|
|
54
85
|
}
|
|
@@ -120,6 +151,7 @@ function createInstallTransaction(cwd, rollbackRoot) {
|
|
|
120
151
|
const created = new Set();
|
|
121
152
|
const snapshots = new Map();
|
|
122
153
|
const tracked = new Set();
|
|
154
|
+
const rollbackDir = path.dirname(rollbackRoot);
|
|
123
155
|
|
|
124
156
|
const track = (dest, label) => {
|
|
125
157
|
assertSafeDest(cwd, dest, label);
|
|
@@ -143,12 +175,47 @@ function createInstallTransaction(cwd, rollbackRoot) {
|
|
|
143
175
|
|
|
144
176
|
const removeRollbackRoot = () => {
|
|
145
177
|
fs.rmSync(rollbackRoot, { recursive: true, force: true });
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
178
|
+
if (!fs.existsSync(rollbackDir)) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// The self-ignore marker is not a snapshot, so it leaves with the last stamp. A sibling
|
|
182
|
+
// stamp (concurrent run, S-09) keeps the tree and its marker, as today.
|
|
183
|
+
const left = fs.readdirSync(rollbackDir);
|
|
184
|
+
if (left.length === 0) {
|
|
185
|
+
fs.rmdirSync(rollbackDir);
|
|
186
|
+
} else if (left.length === 1 && left[0] === ROLLBACK_IGNORE_FILE) {
|
|
187
|
+
fs.rmSync(rollbackDir, { recursive: true, force: true });
|
|
149
188
|
}
|
|
150
189
|
};
|
|
151
190
|
|
|
191
|
+
/**
|
|
192
|
+
* Make `<toolRoot>/.rollback/` self-ignoring so a consumer cannot commit install
|
|
193
|
+
* snapshots, which carry the merged configs — consumer MCP tokens included. A
|
|
194
|
+
* `.gitignore` inside the tree is used instead of appending to the consumer's root
|
|
195
|
+
* `.gitignore`: the CLI never edits that file, and this works in a repo that has
|
|
196
|
+
* none at all. It sits at the `.rollback/` level, not inside a stamp, so it covers
|
|
197
|
+
* every stamp — including one left behind by a run that is still in flight.
|
|
198
|
+
*/
|
|
199
|
+
const ensureRollbackIgnored = () => {
|
|
200
|
+
const ignoreFile = path.join(rollbackDir, ROLLBACK_IGNORE_FILE);
|
|
201
|
+
if (fs.existsSync(ignoreFile)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
assertSafeDest(cwd, rollbackDir, 'rollback root');
|
|
205
|
+
fs.mkdirSync(rollbackDir, { recursive: true });
|
|
206
|
+
fs.writeFileSync(
|
|
207
|
+
ignoreFile,
|
|
208
|
+
[
|
|
209
|
+
'# Snapshots written by @bonesofspring/ai-rules while it installed.',
|
|
210
|
+
'# Local safety net — never commit.',
|
|
211
|
+
'*',
|
|
212
|
+
'',
|
|
213
|
+
].join('\n'),
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
ensureRollbackIgnored();
|
|
218
|
+
|
|
152
219
|
return {
|
|
153
220
|
track,
|
|
154
221
|
addCreated(abs) {
|
|
@@ -156,11 +223,11 @@ function createInstallTransaction(cwd, rollbackRoot) {
|
|
|
156
223
|
},
|
|
157
224
|
copyFile(source, dest, label) {
|
|
158
225
|
track(dest, label);
|
|
159
|
-
copyFileAtomic(source, dest);
|
|
226
|
+
copyFileAtomic(cwd, source, dest, label);
|
|
160
227
|
},
|
|
161
228
|
writeFile(dest, content, label) {
|
|
162
229
|
track(dest, label);
|
|
163
|
-
writeFileAtomic(dest, content);
|
|
230
|
+
writeFileAtomic(cwd, dest, content, label);
|
|
164
231
|
},
|
|
165
232
|
commit: removeRollbackRoot,
|
|
166
233
|
rollback() {
|