@bonesofspring/ai-rules 0.2.37 → 0.2.38
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 +38 -0
- 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 +173 -0
- package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +576 -0
- package/presets/_shared/ai-local/scripts/lock.mjs +118 -0
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +795 -0
- package/presets/_shared/ai-local/scripts/run.mjs +309 -0
- package/presets/_shared/ai-local/scripts/signals.mjs +256 -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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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 +107 -18
- 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
|
@@ -432,6 +432,34 @@ function finishActiveAttempt(forced) {
|
|
|
432
432
|
appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome, durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence });
|
|
433
433
|
const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return { ...resolved, outcome };
|
|
434
434
|
}
|
|
435
|
+
function missingConsumerArtifacts() {
|
|
436
|
+
const file = path.join(process.cwd(), '.ai.local', 'pipeline-gates.json');
|
|
437
|
+
if (!fs.existsSync(file)) return [];
|
|
438
|
+
let parsed;
|
|
439
|
+
try { parsed = JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return []; }
|
|
440
|
+
const required = Array.isArray(parsed && parsed.requireArtifacts) ? parsed.requireArtifacts : [];
|
|
441
|
+
const ids = required.filter((id) => typeof id === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(id));
|
|
442
|
+
if (ids.length === 0) return [];
|
|
443
|
+
let manifest = { artifacts: [] };
|
|
444
|
+
try { manifest = JSON.parse(fs.readFileSync(path.join(taskDir, 'artifact-manifest.json'), 'utf8')); } catch {}
|
|
445
|
+
const done = new Set(
|
|
446
|
+
(manifest.artifacts || [])
|
|
447
|
+
.filter((artifact) => artifact && artifact.status === 'completed' && ids.includes(artifact.id))
|
|
448
|
+
.map((artifact) => artifact.id),
|
|
449
|
+
);
|
|
450
|
+
return ids.filter((id) => !done.has(id));
|
|
451
|
+
}
|
|
452
|
+
function completePipeline(statusPatch) {
|
|
453
|
+
const missing = missingConsumerArtifacts();
|
|
454
|
+
if (missing.length > 0) {
|
|
455
|
+
writeStatus({ ...statusPatch, phase: 'blocked', state: 'blocked', currentAgent: null, awaitingHumanGate: false });
|
|
456
|
+
out(`Pipeline blocked for "${slug}": .ai.local/pipeline-gates.json requireArtifacts missing completed receipt(s): ${missing.join(', ')}.`);
|
|
457
|
+
process.exit(0);
|
|
458
|
+
}
|
|
459
|
+
writeStatus(statusPatch);
|
|
460
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
461
|
+
process.exit(0);
|
|
462
|
+
}
|
|
435
463
|
function beginHumanGate() { const eventId = `${status.metricsRunId || slug}:gate:${Date.now()}`; appendMetric({ eventId, type: 'human_gate_started', at: now, source: 'hook', attributionConfidence: 'high' }); status.activeHumanGateEventId = eventId; }
|
|
436
464
|
function endHumanGateIfResumed() {
|
|
437
465
|
if (!status.activeHumanGateEventId || status.awaitingHumanGate || status.state === 'awaiting_approval') return;
|
|
@@ -940,9 +968,7 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
940
968
|
if (pendingStepIndexes().length === 0) {
|
|
941
969
|
status.state = 'completed';
|
|
942
970
|
completeTaskMetrics();
|
|
943
|
-
|
|
944
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
945
|
-
process.exit(0);
|
|
971
|
+
completePipeline({ pipelineIndex: resumeSteps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
|
|
946
972
|
}
|
|
947
973
|
out(noProgressNotice());
|
|
948
974
|
process.exit(0);
|
|
@@ -968,15 +994,13 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
968
994
|
// pipeline instead of leaving it in_progress forever.
|
|
969
995
|
status.state = 'completed';
|
|
970
996
|
completeTaskMetrics();
|
|
971
|
-
|
|
997
|
+
completePipeline({
|
|
972
998
|
pipelineIndex: resumeSteps.length,
|
|
973
999
|
phase: 'done',
|
|
974
1000
|
state: 'completed',
|
|
975
1001
|
currentAgent: null,
|
|
976
1002
|
awaitingHumanGate: false,
|
|
977
1003
|
});
|
|
978
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
979
|
-
process.exit(0);
|
|
980
1004
|
}
|
|
981
1005
|
}
|
|
982
1006
|
// A2 (retro §8): if gate closes the final human gate of the pipeline
|
|
@@ -1281,9 +1305,7 @@ if (waveIndexes) {
|
|
|
1281
1305
|
}
|
|
1282
1306
|
if (pendingStepIndexes().length === 0) {
|
|
1283
1307
|
completeTaskMetrics();
|
|
1284
|
-
|
|
1285
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
1286
|
-
process.exit(0);
|
|
1308
|
+
completePipeline({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
|
|
1287
1309
|
}
|
|
1288
1310
|
out(noProgressNotice());
|
|
1289
1311
|
process.exit(0);
|
|
@@ -1375,9 +1397,7 @@ if (status.state === 'completed' && status.retryAfterFix) {
|
|
|
1375
1397
|
}
|
|
1376
1398
|
|
|
1377
1399
|
if (!currentStep) {
|
|
1378
|
-
|
|
1379
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
1380
|
-
process.exit(0);
|
|
1400
|
+
completePipeline({ phase: 'done', state: 'completed', currentAgent: null });
|
|
1381
1401
|
}
|
|
1382
1402
|
|
|
1383
1403
|
if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
@@ -1399,9 +1419,7 @@ if (isGraphMode()) {
|
|
|
1399
1419
|
if (dispatchReadyWave()) process.exit(0);
|
|
1400
1420
|
if (pendingStepIndexes().length === 0) {
|
|
1401
1421
|
completeTaskMetrics();
|
|
1402
|
-
|
|
1403
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
1404
|
-
process.exit(0);
|
|
1422
|
+
completePipeline({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
|
|
1405
1423
|
}
|
|
1406
1424
|
out(noProgressNotice());
|
|
1407
1425
|
process.exit(0);
|
|
@@ -1410,15 +1428,13 @@ if (isGraphMode()) {
|
|
|
1410
1428
|
const next = findNextExecutableStep(steps, idx + 1, taskDir);
|
|
1411
1429
|
if (!next) {
|
|
1412
1430
|
completeTaskMetrics();
|
|
1413
|
-
|
|
1431
|
+
completePipeline({
|
|
1414
1432
|
pipelineIndex: steps.length,
|
|
1415
1433
|
phase: 'done',
|
|
1416
1434
|
state: 'completed',
|
|
1417
1435
|
currentAgent: null,
|
|
1418
1436
|
awaitingHumanGate: false,
|
|
1419
1437
|
});
|
|
1420
|
-
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
1421
|
-
process.exit(0);
|
|
1422
1438
|
}
|
|
1423
1439
|
|
|
1424
1440
|
const { step: nextStep, index: nextIdx } = next;
|
|
@@ -1440,3 +1456,76 @@ if (nextStep.parallel && nextAgents.length > 1) {
|
|
|
1440
1456
|
out(handoffForAgent(nextAgents[0], nextStep.scope, nextStep));
|
|
1441
1457
|
}
|
|
1442
1458
|
NODE
|
|
1459
|
+
|
|
1460
|
+
# --- In-task self-learning postflight ----------------------------------------
|
|
1461
|
+
# One loop run per completed stop, as a second process: capture must not depend
|
|
1462
|
+
# on an agent remembering to run it. The child's stdout is forwarded to stderr
|
|
1463
|
+
# so the hook's own stdout contract (the JSON above) is untouched; `|| true`
|
|
1464
|
+
# plus an unconditional exit 0 keep a loop failure from failing the task; and
|
|
1465
|
+
# `--strict` is never passed — a gate must not live in a hook.
|
|
1466
|
+
INPUT="$input" node <<'POSTFLIGHT' || true
|
|
1467
|
+
const fs = require('fs');
|
|
1468
|
+
const path = require('path');
|
|
1469
|
+
const { spawnSync } = require('child_process');
|
|
1470
|
+
|
|
1471
|
+
let input;
|
|
1472
|
+
try {
|
|
1473
|
+
input = JSON.parse(process.env.INPUT || '');
|
|
1474
|
+
} catch {
|
|
1475
|
+
process.exit(0);
|
|
1476
|
+
}
|
|
1477
|
+
if (!input || input.status !== 'completed') {
|
|
1478
|
+
process.exit(0);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// Ratchet: off for `light` pipelines and `spike` intents. A policy skip is
|
|
1482
|
+
// silent on purpose — a warning on every light receipt would make the
|
|
1483
|
+
// containment warnings below unreadable.
|
|
1484
|
+
let pipeline = null;
|
|
1485
|
+
try {
|
|
1486
|
+
const teamRoot = path.join(process.cwd(), '.ai.local', 'team');
|
|
1487
|
+
const active = JSON.parse(fs.readFileSync(path.join(teamRoot, 'active-task.json'), 'utf8'));
|
|
1488
|
+
const pipelineSlug = typeof active.slug === 'string' ? active.slug : '';
|
|
1489
|
+
// Same pattern as `SLUG_RE` at the top of this file: `tasks/<slug>` is
|
|
1490
|
+
// re-derived from `active-task.json` here too, so an unchecked slug could
|
|
1491
|
+
// escape the tree on this path exactly as it could there.
|
|
1492
|
+
const POSTFLIGHT_SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
1493
|
+
if (pipelineSlug.length <= 48 && POSTFLIGHT_SLUG_RE.test(pipelineSlug)) {
|
|
1494
|
+
pipeline = JSON.parse(fs.readFileSync(path.join(teamRoot, 'tasks', pipelineSlug, 'pipeline.json'), 'utf8'));
|
|
1495
|
+
}
|
|
1496
|
+
} catch {
|
|
1497
|
+
pipeline = null;
|
|
1498
|
+
}
|
|
1499
|
+
if (pipeline && (pipeline.profile === 'light' || pipeline.intent === 'spike')) {
|
|
1500
|
+
process.exit(0);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
if (!fs.existsSync(path.join(process.cwd(), '.ai.local', 'scripts', 'run.mjs'))) {
|
|
1504
|
+
process.stderr.write(
|
|
1505
|
+
'WARNING: self-learning loop skipped: .ai.local/scripts/run.mjs is missing (install it with `npx @bonesofspring/ai-rules init <tool> --preset <stack>`)\n',
|
|
1506
|
+
);
|
|
1507
|
+
process.exit(0);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
// Relative argv[1] + `cwd` keeps `run.mjs`'s own entry guard (pathToFileURL
|
|
1511
|
+
// comparison) satisfied even when the project path traverses a symlink.
|
|
1512
|
+
// SIGKILL, not the SIGTERM default: a child that ignores SIGTERM would hold the
|
|
1513
|
+
// hook for its whole runtime while the warning below still reported 15 s.
|
|
1514
|
+
const result = spawnSync(process.execPath, ['.ai.local/scripts/run.mjs'], {
|
|
1515
|
+
cwd: process.cwd(),
|
|
1516
|
+
encoding: 'utf8',
|
|
1517
|
+
timeout: 15000,
|
|
1518
|
+
killSignal: 'SIGKILL',
|
|
1519
|
+
});
|
|
1520
|
+
if (result.stdout) process.stderr.write(result.stdout);
|
|
1521
|
+
if (result.stderr) process.stderr.write(result.stderr);
|
|
1522
|
+
if (result.error) {
|
|
1523
|
+
const timedOut = result.error.code === 'ETIMEDOUT';
|
|
1524
|
+
process.stderr.write(
|
|
1525
|
+
`WARNING: self-learning loop ${timedOut ? 'timed out after 15s' : `failed: ${result.error.message}`}\n`,
|
|
1526
|
+
);
|
|
1527
|
+
} else if (result.status !== 0) {
|
|
1528
|
+
process.stderr.write(`WARNING: self-learning loop exited ${result.status}\n`);
|
|
1529
|
+
}
|
|
1530
|
+
process.exit(0);
|
|
1531
|
+
POSTFLIGHT
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Shared preset hook. Edit this file only; `yarn fix:generated` copies it into every stack.
|
|
3
|
+
|
|
4
|
+
import crypto from 'node:crypto';
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import os from 'node:os';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
|
+
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
|
+
export const CACHE_TTL_MS = 12 * 60 * 60 * 1000;
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
14
|
+
|
|
15
|
+
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
|
+
|
|
17
|
+
export function isReleaseVersion(value) {
|
|
18
|
+
return typeof value === 'string' && RELEASE_VERSION.test(value);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function versionParts(value) {
|
|
22
|
+
const core = String(value).trim().replace(/^v/, '').split('-')[0];
|
|
23
|
+
const parts = core.split('.').map((part) => {
|
|
24
|
+
const parsed = Number.parseInt(part, 10);
|
|
25
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
26
|
+
});
|
|
27
|
+
while (parts.length < 3) parts.push(0);
|
|
28
|
+
return parts.slice(0, 3);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Negative when `left` is older than `right`. */
|
|
32
|
+
export function compareVersions(left, right) {
|
|
33
|
+
const a = versionParts(left);
|
|
34
|
+
const b = versionParts(right);
|
|
35
|
+
for (let index = 0; index < 3; index += 1) {
|
|
36
|
+
if (a[index] !== b[index]) return a[index] < b[index] ? -1 : 1;
|
|
37
|
+
}
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function readInstalls(root) {
|
|
42
|
+
const installs = [];
|
|
43
|
+
for (const tool of TOOL_ROOTS) {
|
|
44
|
+
const file = path.join(root, tool, '.ai-rules-install.json');
|
|
45
|
+
if (!fs.existsSync(file)) continue;
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
49
|
+
} catch {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (!parsed || typeof parsed !== 'object') continue;
|
|
53
|
+
const version = typeof parsed.packageVersion === 'string' ? parsed.packageVersion.trim() : '';
|
|
54
|
+
installs.push({ tool, version: version || null });
|
|
55
|
+
}
|
|
56
|
+
return installs;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function formatInstalled(installs) {
|
|
60
|
+
const byVersion = new Map();
|
|
61
|
+
for (const item of installs) {
|
|
62
|
+
const label = item.version ?? 'not recorded';
|
|
63
|
+
const tools = byVersion.get(label) ?? [];
|
|
64
|
+
tools.push(item.tool);
|
|
65
|
+
byVersion.set(label, tools);
|
|
66
|
+
}
|
|
67
|
+
return [...byVersion.entries()]
|
|
68
|
+
.map(([version, tools]) => `${version} (${tools.join(', ')})`)
|
|
69
|
+
.join('; ');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function buildNotice(installs, latest) {
|
|
73
|
+
if (!isReleaseVersion(latest) || installs.length === 0) return '';
|
|
74
|
+
const behind = installs.filter(
|
|
75
|
+
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
|
+
);
|
|
77
|
+
if (behind.length === 0) return '';
|
|
78
|
+
return [
|
|
79
|
+
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
+
`Installed: ${formatInstalled(behind)}.`,
|
|
81
|
+
`Latest: ${latest}.`,
|
|
82
|
+
'Tell the user once in their native language before other work.',
|
|
83
|
+
'Name the installed version and the latest version, and ask them to run /update.',
|
|
84
|
+
'Do not run the update unless they ask.',
|
|
85
|
+
].join(' ');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function formatOutput(notice, format) {
|
|
89
|
+
if (format === 'cursor') {
|
|
90
|
+
return notice ? `${JSON.stringify({ additional_context: notice })}\n` : '{}\n';
|
|
91
|
+
}
|
|
92
|
+
if (format === 'claude') {
|
|
93
|
+
return notice
|
|
94
|
+
? `${JSON.stringify({
|
|
95
|
+
hookSpecificOutput: {
|
|
96
|
+
hookEventName: 'SessionStart',
|
|
97
|
+
additionalContext: notice,
|
|
98
|
+
},
|
|
99
|
+
additional_context: notice,
|
|
100
|
+
})}\n`
|
|
101
|
+
: '{}\n';
|
|
102
|
+
}
|
|
103
|
+
return notice ? `${notice}\n` : '';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function cacheFile(root, tmp) {
|
|
107
|
+
let resolved = path.resolve(root);
|
|
108
|
+
try {
|
|
109
|
+
resolved = fs.realpathSync(resolved);
|
|
110
|
+
} catch {
|
|
111
|
+
// Keep the unresolved path when the directory is not on disk yet.
|
|
112
|
+
}
|
|
113
|
+
const key = crypto.createHash('sha256').update(resolved).digest('hex').slice(0, 16);
|
|
114
|
+
return path.join(tmp, 'ai-rules-update-check', key, 'latest.json');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function resolveLatest({
|
|
118
|
+
root,
|
|
119
|
+
now = Date.now(),
|
|
120
|
+
fetchLatest,
|
|
121
|
+
tmp = os.tmpdir(),
|
|
122
|
+
ttl = CACHE_TTL_MS,
|
|
123
|
+
}) {
|
|
124
|
+
const file = cacheFile(root, tmp);
|
|
125
|
+
try {
|
|
126
|
+
const cached = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
127
|
+
if (
|
|
128
|
+
isReleaseVersion(cached.version) &&
|
|
129
|
+
typeof cached.checkedAt === 'number' &&
|
|
130
|
+
now - cached.checkedAt < ttl
|
|
131
|
+
) {
|
|
132
|
+
return cached.version;
|
|
133
|
+
}
|
|
134
|
+
} catch {
|
|
135
|
+
// Missing or unreadable cache is a miss.
|
|
136
|
+
}
|
|
137
|
+
const version = await fetchLatest();
|
|
138
|
+
if (!isReleaseVersion(version)) {
|
|
139
|
+
throw new Error('registry version missing');
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
143
|
+
fs.writeFileSync(file, `${JSON.stringify({ version, checkedAt: now })}\n`);
|
|
144
|
+
} catch {
|
|
145
|
+
// The check still returns the version when the cache directory is not writable.
|
|
146
|
+
}
|
|
147
|
+
return version;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export async function fetchRegistryLatest(url = REGISTRY_URL, timeoutMs = 2500) {
|
|
151
|
+
const response = await fetch(url, {
|
|
152
|
+
headers: { accept: 'application/json', 'user-agent': 'ai-rules-update-check' },
|
|
153
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
154
|
+
redirect: 'follow',
|
|
155
|
+
});
|
|
156
|
+
if (!response.ok) {
|
|
157
|
+
throw new Error(`registry status ${response.status}`);
|
|
158
|
+
}
|
|
159
|
+
const body = await response.json();
|
|
160
|
+
if (!isReleaseVersion(body?.version)) {
|
|
161
|
+
throw new Error('registry version missing');
|
|
162
|
+
}
|
|
163
|
+
return body.version;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function parseFormat(argv) {
|
|
167
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
168
|
+
const arg = argv[index];
|
|
169
|
+
if (arg === '--format') {
|
|
170
|
+
const next = argv[index + 1];
|
|
171
|
+
if (next === 'cursor' || next === 'claude' || next === 'text') return next;
|
|
172
|
+
} else if (arg.startsWith('--format=')) {
|
|
173
|
+
const value = arg.slice('--format='.length);
|
|
174
|
+
if (value === 'cursor' || value === 'claude' || value === 'text') return value;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return 'text';
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function projectRoot() {
|
|
181
|
+
const fromEnv = process.env.CURSOR_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR;
|
|
182
|
+
if (fromEnv) return path.resolve(fromEnv);
|
|
183
|
+
return process.cwd();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export async function runCheck({
|
|
187
|
+
root,
|
|
188
|
+
format = 'text',
|
|
189
|
+
now,
|
|
190
|
+
fetchLatest,
|
|
191
|
+
tmp,
|
|
192
|
+
ttl,
|
|
193
|
+
}) {
|
|
194
|
+
try {
|
|
195
|
+
const installs = readInstalls(root);
|
|
196
|
+
if (installs.length === 0) return formatOutput('', format);
|
|
197
|
+
const latest = await resolveLatest({ root, now, fetchLatest, tmp, ttl });
|
|
198
|
+
return formatOutput(buildNotice(installs, latest), format);
|
|
199
|
+
} catch {
|
|
200
|
+
return formatOutput('', format);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
async function main() {
|
|
205
|
+
const format = parseFormat(process.argv.slice(2));
|
|
206
|
+
const text = await runCheck({
|
|
207
|
+
root: projectRoot(),
|
|
208
|
+
format,
|
|
209
|
+
fetchLatest: () => fetchRegistryLatest(),
|
|
210
|
+
});
|
|
211
|
+
process.stdout.write(text);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const isDirect =
|
|
215
|
+
process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
216
|
+
|
|
217
|
+
if (isDirect) {
|
|
218
|
+
main()
|
|
219
|
+
.then(() => {
|
|
220
|
+
process.exitCode = 0;
|
|
221
|
+
})
|
|
222
|
+
.catch(() => {
|
|
223
|
+
const format = parseFormat(process.argv.slice(2));
|
|
224
|
+
process.stdout.write(format === 'text' ? '' : '{}\n');
|
|
225
|
+
process.exitCode = 0;
|
|
226
|
+
});
|
|
227
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Hooks cookbook (examples)
|
|
2
2
|
|
|
3
|
-
Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh
|
|
3
|
+
Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh`, `chain-team-phases.sh`, and `check-preset-update.mjs`).
|
|
4
4
|
|
|
5
5
|
| Script | Purpose |
|
|
6
6
|
|--------|---------|
|
|
@@ -132,7 +132,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
|
|
|
132
132
|
|
|
133
133
|
- **Context loss vs excess/noise.** *Loss* = a dropped/misattributed AC or constraint, a stale plan vs the current request, a forgotten prior decision. *Excess/noise* = irrelevant/tangent reads, scope creep beyond the frame, duplicated or bloated artifacts, chat state that belongs on disk.
|
|
134
134
|
- **Re-anchor.** On detected drift, return the run to the framed task: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Re-anchor is a **trigger source of the existing `plan-graph` `replan`** — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
135
|
-
- **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract — including the optional
|
|
135
|
+
- **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract — including the optional loop. In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
136
136
|
|
|
137
137
|
## status.json (pipeline mode)
|
|
138
138
|
|
|
@@ -3,11 +3,24 @@
|
|
|
3
3
|
"permissions": {
|
|
4
4
|
"deny": [
|
|
5
5
|
"Bash(git commit *)",
|
|
6
|
-
"Bash(git
|
|
6
|
+
"Bash(git commit)",
|
|
7
|
+
"Bash(git push *)",
|
|
8
|
+
"Bash(git push)"
|
|
7
9
|
],
|
|
8
10
|
"ask": []
|
|
9
11
|
},
|
|
10
12
|
"hooks": {
|
|
13
|
+
"SessionStart": [
|
|
14
|
+
{
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "node \"${CLAUDE_PROJECT_DIR}/.claude/hooks/check-preset-update.mjs\" --format claude",
|
|
19
|
+
"timeout": 8
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
11
24
|
"PreToolUse": [
|
|
12
25
|
{
|
|
13
26
|
"matcher": "Bash",
|
|
@@ -63,3 +63,5 @@ human-promote set: move a `.ai.local/rules-library/<stem>.md` seed to `.ai.local
|
|
|
63
63
|
and record the promotion in `.ai.local/rule-changes.jsonl`.
|
|
64
64
|
|
|
65
65
|
Do not apply preset or conventions changes without user approval.
|
|
66
|
+
|
|
67
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
@@ -49,4 +49,4 @@ Copies `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `skills/**`, `hooks/
|
|
|
49
49
|
`git commit/push deny`; JS stacks also `npx jest* deny` and `npm/npx/pnpm/bun`
|
|
50
50
|
ask). Re-init overwrites the file (consumer can edit afterwards); mirror
|
|
51
51
|
with root `AGENTS.md` if you change the harness.
|
|
52
|
-
- **Pipeline hooks:** `.claude/settings.json` `hooks` wires `guard-shell-command.sh` (`PreToolUse` / `Bash`, `permissionDecision` `ask` or `allow`) and `chain-team-phases.sh` (`SubagentStop` for kebab-case `agent_type`). See `hooks/README.md`. No `hooks.json`.
|
|
52
|
+
- **Pipeline hooks:** `.claude/settings.json` `hooks` wires `check-preset-update.mjs` (`SessionStart`; names the latest version and asks the user to run `/update` when the install is older), `guard-shell-command.sh` (`PreToolUse` / `Bash`, `permissionDecision` `ask` or `allow`) and `chain-team-phases.sh` (`SubagentStop` for kebab-case `agent_type`). See `hooks/README.md`. No `hooks.json`.
|
|
@@ -16,6 +16,12 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
|
|
|
16
16
|
npx @bonesofspring/ai-rules init multi --preset ios-swift
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Refresh tools already installed in this repository, keeping each recorded preset (`/update` runs the same command):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @bonesofspring/ai-rules update
|
|
23
|
+
```
|
|
24
|
+
|
|
19
25
|
Per-tool: `init cursor|claude|mavis|opencode --preset ios-swift`. `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves this file if another tool install remains. Living gotchas belong in `.ai.local/conventions.md`, not here.
|
|
20
26
|
|
|
21
27
|
## Presence-based load
|
|
@@ -48,6 +54,14 @@ For **every** work request — with or without `/task` — persist the user's **
|
|
|
48
54
|
|
|
49
55
|
After code edits: invoke **`post-change-build`** (requestable). Full gate: agent `build-verifier`.
|
|
50
56
|
|
|
57
|
+
## Preset version
|
|
58
|
+
|
|
59
|
+
On the first reply of a session, run `node .cursor/hooks/check-preset-update.mjs` when it exists, otherwise the copy under `.claude/hooks/`, `.mavis/hooks/`, or `.opencode/hooks/`.
|
|
60
|
+
Cursor `sessionStart` and Claude `SessionStart` run the same script.
|
|
61
|
+
When it prints a notice, tell the user once in their native language: the installed version, the latest version, and to run `/update`.
|
|
62
|
+
Do not run the update unless they ask.
|
|
63
|
+
Empty output or a failed run stays silent.
|
|
64
|
+
|
|
51
65
|
## Security basics
|
|
52
66
|
|
|
53
67
|
- Do not commit secrets (API keys, Keychain dumps, `.env`).
|
|
@@ -57,7 +57,7 @@ Before you run the project gate and write the terminal validation receipt, self-
|
|
|
57
57
|
|
|
58
58
|
**Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
59
59
|
|
|
60
|
-
Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop:
|
|
60
|
+
Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
61
61
|
|
|
62
62
|
## Output
|
|
63
63
|
|
|
@@ -62,7 +62,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
|
|
|
62
62
|
|
|
63
63
|
**Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
64
64
|
|
|
65
|
-
Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop:
|
|
65
|
+
Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
66
66
|
|
|
67
67
|
## Review artifact
|
|
68
68
|
|
|
@@ -102,7 +102,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
|
|
|
102
102
|
|
|
103
103
|
**Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
104
104
|
|
|
105
|
-
Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop:
|
|
105
|
+
Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
106
106
|
|
|
107
107
|
## MCP usage
|
|
108
108
|
|
|
@@ -99,7 +99,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
|
|
|
99
99
|
|
|
100
100
|
**Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
101
101
|
|
|
102
|
-
Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop:
|
|
102
|
+
Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
103
103
|
|
|
104
104
|
## UX design (behavioral)
|
|
105
105
|
|
|
@@ -60,7 +60,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
|
|
|
60
60
|
|
|
61
61
|
**Re-anchor.** On detected drift: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Bound to the existing `plan-graph` `replan` — no second orchestrator, no `status.json`/`metrics.json` field.
|
|
62
62
|
|
|
63
|
-
Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop:
|
|
63
|
+
Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
64
64
|
|
|
65
65
|
## Clarification cycle
|
|
66
66
|
|
|
@@ -9,6 +9,7 @@ Slash commands are copied to `.claude/commands/` on `ai-rules init claude --pres
|
|
|
9
9
|
| **`/task <description>`** | **Main entry point:** router → pipeline.json → roles in order |
|
|
10
10
|
| `/task-continue <slug>` | After a human gate or pause |
|
|
11
11
|
| `/technical-retro [slug]` | Retro; with slug — “Agent work” block |
|
|
12
|
+
| `update.md` | Reinstall each installed tool with the preset recorded at init |
|
|
12
13
|
|
|
13
14
|
## `/task` examples
|
|
14
15
|
|
|
@@ -45,6 +45,15 @@ Plan revision during execution is a named, auditable operation: an evaluation or
|
|
|
45
45
|
|
|
46
46
|
A producer-side **re-anchor** (detected context loss / excess against the framed goal) is recorded append-only in `.memlog.md` (`event:` line, or `decision: replan rev N → N+1` when the plan changes); resume reads that line with the checkpoint and does not re-derive the correction from chat.
|
|
47
47
|
|
|
48
|
+
## Self-learning loop (optional)
|
|
49
|
+
|
|
50
|
+
The chain hook runs the loop after every producer receipt; with the hook disabled or no auto-chain, run it yourself:
|
|
51
|
+
|
|
52
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
53
|
+
|
|
54
|
+
Never pass `--strict` from this path — it exits 1 when capture is broken and would fail a healthy resume. The
|
|
55
|
+
store deduplicates, so a second run appends nothing.
|
|
56
|
+
|
|
48
57
|
## Artifacts for handoff
|
|
49
58
|
|
|
50
59
|
| Agent | Read |
|
|
@@ -83,3 +83,11 @@ If the retro relates to an agent-team pipeline:
|
|
|
83
83
|
### Metrics evidence
|
|
84
84
|
|
|
85
85
|
When `metrics.json` exists, run the local aggregation script and report the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not treat gate wait or malformed ledgers as agent duration.
|
|
86
|
+
|
|
87
|
+
### Self-learning loop
|
|
88
|
+
|
|
89
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
90
|
+
|
|
91
|
+
Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
|
|
92
|
+
appends nothing (dedup).
|
|
93
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update
|
|
3
|
+
description: Reinstall the preset recorded for each tool that is already installed.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Update
|
|
7
|
+
|
|
8
|
+
Reinstall every tool that already has an install manifest, using the `preset` recorded in that manifest.
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
1. From the repository root, run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @bonesofspring/ai-rules update
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. Report the CLI summary to the user. It names each tool and the preset it kept.
|
|
19
|
+
3. On a non-zero exit, stop and report stderr.
|
|
20
|
+
|
|
21
|
+
## Record
|
|
22
|
+
|
|
23
|
+
`init` writes `platform` and `preset` into `<tool>/.ai-rules-install.json`:
|
|
24
|
+
|
|
25
|
+
- `.cursor/.ai-rules-install.json`
|
|
26
|
+
- `.claude/.ai-rules-install.json`
|
|
27
|
+
- `.mavis/.ai-rules-install.json`
|
|
28
|
+
- `.opencode/.ai-rules-install.json`
|
|
29
|
+
|
|
30
|
+
`update` reads those files. A tool without that file stays uninstalled. Report the result in the user's native language (`language-policy`).
|
|
31
|
+
|
|
32
|
+
## Version check
|
|
33
|
+
|
|
34
|
+
See `## Preset version` in `REPO_AGENTS.md`. That check names the installed version and the latest version, then asks the user to run this command.
|
|
35
|
+
|
|
36
|
+
## Do not
|
|
37
|
+
|
|
38
|
+
- Pass `--preset` or a tool name. To switch preset, run `init <tool> --preset <name>`.
|
|
39
|
+
- Delete `.ai.local/`.
|
|
@@ -12,6 +12,7 @@ No `hooks.json`. Default chain and shell guard are registered in `.claude/settin
|
|
|
12
12
|
`.claude/settings.json` `hooks` (https://code.claude.com/docs/en/hooks) registers:
|
|
13
13
|
|
|
14
14
|
- `PreToolUse` matcher `Bash` → `guard-shell-command.sh` (reads `tool_input.command`; emits `permissionDecision` `ask` or `allow`)
|
|
15
|
+
- `SessionStart` → `check-preset-update.mjs` (names the latest version and asks the user to run `/update` when the install is older; a registry failure stays silent)
|
|
15
16
|
- `SubagentStop` → `chain-team-phases.sh` (kebab-case `agent_type` maps to `status: completed`; empty or non-kebab types are ignored; `stop_hook_active` does not recurse)
|
|
16
17
|
|
|
17
18
|
There is no `hooks.json`. Cookbook scripts under `hooks/examples/` stay unwired. A hook crash is not a deny (Cursor `failClosed` has no Claude field); `ask` is the supported review decision.
|