@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
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
const fs = require('fs');
|
|
11
11
|
const path = require('path');
|
|
12
12
|
const { assertSafeDest } = require('./safe-path');
|
|
13
|
+
const { ENGINE_SCRIPTS, ENGINE_SOURCE_RELATIVE } = require('./engine-scripts');
|
|
13
14
|
|
|
14
15
|
const LEGACY_TOOLS = ['cursor', 'claude', 'mavis', 'opencode'];
|
|
15
16
|
const POINTER_README = `# Agent team artifacts moved
|
|
@@ -216,6 +217,80 @@ function ensureRollbackIgnored(rollbackRoot) {
|
|
|
216
217
|
);
|
|
217
218
|
}
|
|
218
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Make `.ai.local/` cover the files the self-learning engine writes beside its
|
|
222
|
+
* scripts (`*.lock`, `*.tmp`) and the migration backups (`.rollback/`). A
|
|
223
|
+
* `.gitignore` inside `.ai.local/` is used instead of appending to the
|
|
224
|
+
* consumer's root `.gitignore`: the CLI never edits that file, and this works
|
|
225
|
+
* even in a repo that has no `.gitignore` at all. Created only when absent.
|
|
226
|
+
*/
|
|
227
|
+
function ensureAiLocalIgnored(aiLocalRoot) {
|
|
228
|
+
const ignoreFile = path.join(aiLocalRoot, '.gitignore');
|
|
229
|
+
if (fs.existsSync(ignoreFile)) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
fs.mkdirSync(aiLocalRoot, { recursive: true });
|
|
233
|
+
fs.writeFileSync(
|
|
234
|
+
ignoreFile,
|
|
235
|
+
[
|
|
236
|
+
'# Files written by the in-task self-learning engine and by legacy-team',
|
|
237
|
+
'# migration backups. Local safety net — never commit.',
|
|
238
|
+
'*.lock',
|
|
239
|
+
'*.tmp',
|
|
240
|
+
'.rollback/',
|
|
241
|
+
'',
|
|
242
|
+
].join('\n'),
|
|
243
|
+
);
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Seed the shipped self-learning engine (`presets/_shared/ai-local/scripts/`)
|
|
249
|
+
* into `<cwd>/.ai.local/scripts/`. Skip-if-exists: a consumer edit is never
|
|
250
|
+
* overwritten and there is no `--force`. Returns the absolute paths this call
|
|
251
|
+
* created so an init rollback removes exactly those.
|
|
252
|
+
*/
|
|
253
|
+
function seedEngineScripts({ cwd, presetTeamSrc }) {
|
|
254
|
+
const result = { seeded: 0, skipped: 0, created: [] };
|
|
255
|
+
if (!presetTeamSrc) {
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
258
|
+
const sourceDir = path.resolve(presetTeamSrc, '..', '..', '..', ...ENGINE_SOURCE_RELATIVE.split('/'));
|
|
259
|
+
if (!fs.existsSync(sourceDir) || !fs.statSync(sourceDir).isDirectory()) {
|
|
260
|
+
return result;
|
|
261
|
+
}
|
|
262
|
+
const destDir = path.join(cwd, '.ai.local', 'scripts');
|
|
263
|
+
assertSafeDest(cwd, destDir, '.ai.local/scripts');
|
|
264
|
+
const destExisted = fs.existsSync(destDir);
|
|
265
|
+
for (const name of ENGINE_SCRIPTS) {
|
|
266
|
+
const source = path.join(sourceDir, name);
|
|
267
|
+
const dest = path.join(destDir, name);
|
|
268
|
+
if (!fs.existsSync(source)) {
|
|
269
|
+
warn(`.ai.local/scripts: engine source ${name} is missing from the preset; skipped`);
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
if (fs.existsSync(dest)) {
|
|
273
|
+
result.skipped += 1;
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
copyFile(source, dest);
|
|
277
|
+
result.seeded += 1;
|
|
278
|
+
result.created.push(dest);
|
|
279
|
+
}
|
|
280
|
+
if (!destExisted && result.created.length > 0) {
|
|
281
|
+
result.created.unshift(destDir);
|
|
282
|
+
}
|
|
283
|
+
if (result.seeded > 0) {
|
|
284
|
+
console.log(`Seeded .ai.local/scripts/ (${result.seeded} engine modules)`);
|
|
285
|
+
}
|
|
286
|
+
if (result.skipped > 0) {
|
|
287
|
+
console.log(
|
|
288
|
+
`Kept ${result.skipped} existing .ai.local/scripts/ module(s) (consumer-modified files are never overwritten)`,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
return result;
|
|
292
|
+
}
|
|
293
|
+
|
|
219
294
|
function copyTemplates(presetTeamSrc, dest) {
|
|
220
295
|
if (!presetTeamSrc || !fs.existsSync(presetTeamSrc)) {
|
|
221
296
|
return;
|
|
@@ -289,9 +364,39 @@ function seedAiLocalRules(presetTeamSrc, cwd) {
|
|
|
289
364
|
if (copied > 0) {
|
|
290
365
|
console.log(`Seeded .ai.local/rules-library/ (${copied} rules; ${skipped} already present)`);
|
|
291
366
|
}
|
|
367
|
+
activateRouterPagesSeed(cwd, libraryDir);
|
|
292
368
|
return copied > 0;
|
|
293
369
|
}
|
|
294
370
|
|
|
371
|
+
function hasStaticExport(cwd) {
|
|
372
|
+
const names = ['next.config.js', 'next.config.mjs', 'next.config.cjs', 'next.config.ts'];
|
|
373
|
+
const files = names.flatMap((name) => [name, path.join('app', name)]);
|
|
374
|
+
return files.some((rel) => {
|
|
375
|
+
const file = path.join(cwd, rel);
|
|
376
|
+
return fs.existsSync(file) && /output:\s*['"]export['"]/.test(fs.readFileSync(file, 'utf8'));
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function hasPagesApp(cwd) {
|
|
381
|
+
return [
|
|
382
|
+
'app/src/pages/_app.tsx',
|
|
383
|
+
'app/src/pages/_app.ts',
|
|
384
|
+
'app/src/pages/_app.jsx',
|
|
385
|
+
'src/pages/_app.tsx',
|
|
386
|
+
'pages/_app.tsx',
|
|
387
|
+
].some((rel) => fs.existsSync(path.join(cwd, rel)));
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function activateRouterPagesSeed(cwd, libraryDir) {
|
|
391
|
+
const seed = path.join(libraryDir, 'router-pages.md');
|
|
392
|
+
if (!fs.existsSync(seed) || !hasStaticExport(cwd) || !hasPagesApp(cwd)) return;
|
|
393
|
+
const dest = path.join(cwd, '.ai.local', 'rules', 'router-pages.md');
|
|
394
|
+
assertSafeDest(cwd, dest, '.ai.local/rules/router-pages.md');
|
|
395
|
+
if (fs.existsSync(dest)) return;
|
|
396
|
+
copyFile(seed, dest);
|
|
397
|
+
console.log('Activated .ai.local/rules/router-pages.md (static export + Pages Router)');
|
|
398
|
+
}
|
|
399
|
+
|
|
295
400
|
/**
|
|
296
401
|
* Resolve a legacy `.<tool>/team` directory, refusing symlinks and anything whose
|
|
297
402
|
* real path escapes the resolved `cwd`. `rmSync` through a link would delete the
|
|
@@ -429,16 +534,36 @@ function migrateLegacyTeams(cwd, dest) {
|
|
|
429
534
|
|
|
430
535
|
/**
|
|
431
536
|
* @param {{ cwd: string, presetTeamSrc?: string }} options
|
|
432
|
-
* `createdPaths`
|
|
433
|
-
*
|
|
434
|
-
*
|
|
537
|
+
* `createdPaths` lists what an init rollback may remove: the fresh-seed tree
|
|
538
|
+
* plus every engine module / ignore file this call created (never a path that
|
|
539
|
+
* already existed, never a consumer-modified file).
|
|
540
|
+
* @returns {{ created: boolean, createdPaths: string[], migrated: boolean, refreshed: boolean, conventionsSeeded: boolean, rulesLibrarySeeded: boolean, engineSeeded: boolean }}
|
|
435
541
|
*/
|
|
436
542
|
function seedAiLocalTeam({ cwd, presetTeamSrc }) {
|
|
437
543
|
const dest = destTeamRoot(cwd);
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
544
|
+
const aiLocalRoot = path.join(cwd, '.ai.local');
|
|
545
|
+
const empty = {
|
|
546
|
+
created: false,
|
|
547
|
+
createdPaths: [],
|
|
548
|
+
migrated: false,
|
|
549
|
+
refreshed: false,
|
|
550
|
+
conventionsSeeded: false,
|
|
551
|
+
rulesLibrarySeeded: false,
|
|
552
|
+
engineSeeded: false,
|
|
553
|
+
};
|
|
554
|
+
// `.ai.local` is the shared runtime tree: a symlinked component or a path that
|
|
555
|
+
// escapes `--cwd` must never be seeded through. Refuse with a warning instead
|
|
556
|
+
// of failing the install — `.ai.local` is not the tool root the CLI owns.
|
|
557
|
+
try {
|
|
558
|
+
assertSafeDest(cwd, dest, '.ai.local/team');
|
|
559
|
+
assertSafeDest(cwd, path.join(cwd, '.ai.local', 'conventions.md'), '.ai.local/conventions.md');
|
|
560
|
+
assertSafeDest(cwd, path.join(aiLocalRoot, '.gitignore'), '.ai.local/.gitignore');
|
|
561
|
+
assertSafeDest(cwd, path.join(aiLocalRoot, 'scripts'), '.ai.local/scripts');
|
|
562
|
+
assertSafeDest(cwd, path.join(aiLocalRoot, 'rules-library'), '.ai.local/rules-library');
|
|
563
|
+
} catch (error) {
|
|
564
|
+
warn(`${error instanceof Error ? error.message : String(error)}; skipped .ai.local seeding`);
|
|
565
|
+
return empty;
|
|
566
|
+
}
|
|
442
567
|
const destExisted = fs.existsSync(dest);
|
|
443
568
|
const destHasSlugs = hasConsumerTaskSlugs(path.join(dest, 'tasks'));
|
|
444
569
|
const hadLegacy = LEGACY_TOOLS.some((tool) =>
|
|
@@ -447,10 +572,9 @@ function seedAiLocalTeam({ cwd, presetTeamSrc }) {
|
|
|
447
572
|
|
|
448
573
|
if (!destExisted && !hadLegacy && (!presetTeamSrc || !fs.existsSync(presetTeamSrc))) {
|
|
449
574
|
console.log('Skipped .ai.local/team seed (preset team/ missing)');
|
|
450
|
-
return
|
|
575
|
+
return empty;
|
|
451
576
|
}
|
|
452
577
|
|
|
453
|
-
const aiLocalRoot = path.join(cwd, '.ai.local');
|
|
454
578
|
const freshPaths = [
|
|
455
579
|
aiLocalRoot,
|
|
456
580
|
dest,
|
|
@@ -458,6 +582,13 @@ function seedAiLocalTeam({ cwd, presetTeamSrc }) {
|
|
|
458
582
|
path.join(aiLocalRoot, 'rules-library'),
|
|
459
583
|
].filter((target) => !fs.existsSync(target));
|
|
460
584
|
fs.mkdirSync(dest, { recursive: true });
|
|
585
|
+
const ignoreCreated = ensureAiLocalIgnored(aiLocalRoot);
|
|
586
|
+
const engine = seedEngineScripts({ cwd, presetTeamSrc });
|
|
587
|
+
const createdPaths = [
|
|
588
|
+
...freshPaths,
|
|
589
|
+
...(ignoreCreated ? [path.join(aiLocalRoot, '.gitignore')] : []),
|
|
590
|
+
...engine.created,
|
|
591
|
+
];
|
|
461
592
|
const migrated = migrateLegacyTeams(cwd, dest);
|
|
462
593
|
copyTemplates(presetTeamSrc, dest);
|
|
463
594
|
const conventionsSeeded = seedConventions(presetTeamSrc, cwd);
|
|
@@ -471,11 +602,12 @@ function seedAiLocalTeam({ cwd, presetTeamSrc }) {
|
|
|
471
602
|
console.log('Seeded .ai.local/team/');
|
|
472
603
|
return {
|
|
473
604
|
created: true,
|
|
474
|
-
createdPaths
|
|
605
|
+
createdPaths,
|
|
475
606
|
migrated: false,
|
|
476
607
|
refreshed: false,
|
|
477
608
|
conventionsSeeded,
|
|
478
609
|
rulesLibrarySeeded,
|
|
610
|
+
engineSeeded: engine.seeded > 0,
|
|
479
611
|
};
|
|
480
612
|
}
|
|
481
613
|
|
|
@@ -485,10 +617,26 @@ function seedAiLocalTeam({ cwd, presetTeamSrc }) {
|
|
|
485
617
|
? 'Refreshed .ai.local/team templates (tasks preserved)'
|
|
486
618
|
: 'Refreshed .ai.local/team (no consumer task slugs)',
|
|
487
619
|
);
|
|
488
|
-
return {
|
|
620
|
+
return {
|
|
621
|
+
created: false,
|
|
622
|
+
createdPaths,
|
|
623
|
+
migrated,
|
|
624
|
+
refreshed: true,
|
|
625
|
+
conventionsSeeded,
|
|
626
|
+
rulesLibrarySeeded,
|
|
627
|
+
engineSeeded: engine.seeded > 0,
|
|
628
|
+
};
|
|
489
629
|
}
|
|
490
630
|
|
|
491
|
-
return {
|
|
631
|
+
return {
|
|
632
|
+
created: false,
|
|
633
|
+
createdPaths,
|
|
634
|
+
migrated,
|
|
635
|
+
refreshed: false,
|
|
636
|
+
conventionsSeeded,
|
|
637
|
+
rulesLibrarySeeded,
|
|
638
|
+
engineSeeded: engine.seeded > 0,
|
|
639
|
+
};
|
|
492
640
|
}
|
|
493
641
|
|
|
494
642
|
module.exports = { seedAiLocalTeam, destTeamRoot };
|
package/bin/opencode-install.js
CHANGED
|
@@ -197,6 +197,15 @@ function mergeInstructionList(existingInstructions, presetInstructions) {
|
|
|
197
197
|
return merged;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Universal "human commits" guards. Source of truth is
|
|
202
|
+
* `scripts/lib/stack-platform-profiles.mjs` (`UNIVERSAL_BASH_PERMISSION`); the
|
|
203
|
+
* published `files` allowlist does not ship `scripts/`, so the list is duplicated
|
|
204
|
+
* and set-equality is asserted by `scripts/check-opencode-platform-contract.mjs`.
|
|
205
|
+
* The bare forms are listed because `git commit *` does not match `git commit`.
|
|
206
|
+
*/
|
|
207
|
+
const UNIVERSAL_GUARD_PATTERNS = ['git commit', 'git commit *', 'git push', 'git push *'];
|
|
208
|
+
|
|
200
209
|
function mergePermission(existingPermission, presetPermission) {
|
|
201
210
|
const presetPerm = isPlainObject(presetPermission) ? presetPermission : null;
|
|
202
211
|
const presetBash = presetPerm && isPlainObject(presetPerm.bash) ? presetPerm.bash : null;
|
|
@@ -208,53 +217,31 @@ function mergePermission(existingPermission, presetPermission) {
|
|
|
208
217
|
return existingPermission;
|
|
209
218
|
}
|
|
210
219
|
const merged = { ...existingPermission };
|
|
211
|
-
|
|
212
|
-
|
|
220
|
+
// v1 keys the object by tool name `bash` (https://opencode.ai/docs/permissions/).
|
|
221
|
+
// `permission.shell` is not that key and is not the v2 `permissions[]` shape.
|
|
222
|
+
// A file that only has the unbound `shell` map is folded into `bash`.
|
|
223
|
+
const bashMissing = merged.bash == null;
|
|
224
|
+
if (!bashMissing && !isPlainObject(merged.bash)) {
|
|
213
225
|
return merged;
|
|
214
226
|
}
|
|
215
|
-
|
|
227
|
+
const foldedShell = bashMissing && isPlainObject(merged.shell);
|
|
228
|
+
const prior = isPlainObject(merged.bash) ? merged.bash : foldedShell ? merged.shell : null;
|
|
229
|
+
if (prior == null) {
|
|
230
|
+
merged.bash = { ...presetBash };
|
|
216
231
|
return merged;
|
|
217
232
|
}
|
|
218
|
-
merged.bash = { ...presetBash, ...
|
|
233
|
+
merged.bash = { ...presetBash, ...prior };
|
|
234
|
+
// The universal guards are the exception to consumer-wins: a pre-existing
|
|
235
|
+
// `"git push *": "allow"` must not defeat them. Scoped to these rows only —
|
|
236
|
+
// every other key, including the package-manager `ask` guards, stays
|
|
237
|
+
// consumer-wins, so this is not a global precedence inversion.
|
|
238
|
+
for (const pattern of UNIVERSAL_GUARD_PATTERNS) {
|
|
239
|
+
if (presetBash[pattern] === 'deny') merged.bash[pattern] = 'deny';
|
|
240
|
+
}
|
|
241
|
+
if (foldedShell) delete merged.shell;
|
|
219
242
|
return merged;
|
|
220
243
|
}
|
|
221
244
|
|
|
222
|
-
function policyKey(statement) {
|
|
223
|
-
const action = isPlainObject(statement) && typeof statement.action === 'string' ? statement.action : '';
|
|
224
|
-
const resource = isPlainObject(statement) && typeof statement.resource === 'string' ? statement.resource : '';
|
|
225
|
-
return `${action}\u0000${resource}`;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Merge preset `policies` (V2 `tool.use` hard-denies) into existing statements.
|
|
230
|
-
* Mirrors `mergePermission`: preset statements fill gaps; consumer statements
|
|
231
|
-
* with the same `action:resource` override. Returns `undefined` when there is
|
|
232
|
-
* nothing to add.
|
|
233
|
-
*/
|
|
234
|
-
function mergePolicies(existingPolicies, presetPolicies) {
|
|
235
|
-
const preset = Array.isArray(presetPolicies) ? presetPolicies : [];
|
|
236
|
-
const existing = Array.isArray(existingPolicies) ? existingPolicies : [];
|
|
237
|
-
if (preset.length === 0) return existing.length > 0 ? existing : undefined;
|
|
238
|
-
if (existing.length === 0) return preset;
|
|
239
|
-
const byKey = new Map();
|
|
240
|
-
for (const statement of preset) byKey.set(policyKey(statement), statement);
|
|
241
|
-
for (const statement of existing) byKey.set(policyKey(statement), statement);
|
|
242
|
-
return [...byKey.values()];
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Preset policy `action:resource` keys absent from `existing` — the subset init
|
|
247
|
-
* introduced, so `clean` can strip exactly those. Stored as strings so the
|
|
248
|
-
* merged-record `unionAdded` deduplicates them correctly.
|
|
249
|
-
*/
|
|
250
|
-
function addedPolicyKeys(existingPolicies, presetPolicies) {
|
|
251
|
-
const existing = Array.isArray(existingPolicies) ? existingPolicies : [];
|
|
252
|
-
const keys = new Set(existing.map(policyKey));
|
|
253
|
-
return (Array.isArray(presetPolicies) ? presetPolicies : [])
|
|
254
|
-
.map(policyKey)
|
|
255
|
-
.filter((key) => !keys.has(key));
|
|
256
|
-
}
|
|
257
|
-
|
|
258
245
|
/**
|
|
259
246
|
* @returns {{ merged: object, extrasKept: string[], added: object }} `added` is what this
|
|
260
247
|
* merge introduced (see lib/merged-config.js) so clean can strip exactly that.
|
|
@@ -269,7 +256,7 @@ function mergeOpencodeConfig(presetObj, existingObj) {
|
|
|
269
256
|
for (const key of ownKeys(presetMcp)) {
|
|
270
257
|
mergedMcp[key] = mergeServerEntry(existingMcp[key], presetMcp[key]);
|
|
271
258
|
}
|
|
272
|
-
const added = { keys: [], instructions: [], bash: {}
|
|
259
|
+
const added = { keys: [], instructions: [], bash: {} };
|
|
273
260
|
const merged = { ...existing };
|
|
274
261
|
if (!merged.$schema && preset.$schema) {
|
|
275
262
|
merged.$schema = preset.$schema;
|
|
@@ -280,7 +267,8 @@ function mergeOpencodeConfig(presetObj, existingObj) {
|
|
|
280
267
|
}
|
|
281
268
|
merged.mcp = mergedMcp;
|
|
282
269
|
// Re-init re-asserts preset instruction paths and missing bash keys so an
|
|
283
|
-
// upgrade is picked up. Consumer extras and same-key
|
|
270
|
+
// upgrade is picked up. Consumer extras and same-key overrides stay, except the
|
|
271
|
+
// universal guard rows, which mergePermission re-applies as `deny`.
|
|
284
272
|
// A non-array `instructions` or non-object `permission` is left untouched.
|
|
285
273
|
const prevInstructions = merged.instructions;
|
|
286
274
|
const instructions = mergeInstructionList(prevInstructions, preset.instructions);
|
|
@@ -302,7 +290,13 @@ function mergeOpencodeConfig(presetObj, existingObj) {
|
|
|
302
290
|
added.keys.push('permission');
|
|
303
291
|
}
|
|
304
292
|
if (permission !== prevPermission && isPlainObject(permission.bash)) {
|
|
305
|
-
const prevBash = isPlainObject(prevPermission)
|
|
293
|
+
const prevBash = isPlainObject(prevPermission)
|
|
294
|
+
? isPlainObject(prevPermission.bash)
|
|
295
|
+
? prevPermission.bash
|
|
296
|
+
: prevPermission.bash == null && isPlainObject(prevPermission.shell)
|
|
297
|
+
? prevPermission.shell
|
|
298
|
+
: undefined
|
|
299
|
+
: undefined;
|
|
306
300
|
if (prevBash == null) {
|
|
307
301
|
added.keys.push('permission.bash');
|
|
308
302
|
}
|
|
@@ -314,15 +308,6 @@ function mergeOpencodeConfig(presetObj, existingObj) {
|
|
|
314
308
|
}
|
|
315
309
|
merged.permission = permission;
|
|
316
310
|
}
|
|
317
|
-
const prevPolicies = merged.policies;
|
|
318
|
-
const policies = mergePolicies(prevPolicies, preset.policies);
|
|
319
|
-
if (policies !== undefined) {
|
|
320
|
-
if (prevPolicies == null) {
|
|
321
|
-
added.keys.push('policies');
|
|
322
|
-
}
|
|
323
|
-
added.policies = addedPolicyKeys(prevPolicies, preset.policies);
|
|
324
|
-
merged.policies = policies;
|
|
325
|
-
}
|
|
326
311
|
return { merged, extrasKept, added };
|
|
327
312
|
}
|
|
328
313
|
|
package/docs/OPENCODE.md
CHANGED
|
@@ -31,7 +31,7 @@ Remove only what this install owns:
|
|
|
31
31
|
npx @bonesofspring/ai-rules clean opencode
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`clean opencode` is **manifest-owned**: unchanged hashes are removed; files you edited stay. Without a valid `.opencode/.ai-rules-install.json`, clean is fail-safe (nothing removed). Extra keys in `opencode.json` (models, user MCP servers, extra instruction paths) are preserved. Re-init still unions preset instruction paths and
|
|
34
|
+
`clean opencode` is **manifest-owned**: unchanged hashes are removed; files you edited stay. Without a valid `.opencode/.ai-rules-install.json`, clean is fail-safe (nothing removed). Extra keys in `opencode.json` (models, user MCP servers, extra instruction paths) are preserved. Re-init still unions preset instruction paths, fills missing `permission.bash` keys, and re-applies the universal `git commit` / `git push` denies. Other bash keys the file already sets stay. A lone `permission.shell` map is folded into `bash` and removed: v1 does not read that key.
|
|
35
35
|
|
|
36
36
|
The CLI **never** writes `~/.config/opencode/**`.
|
|
37
37
|
|
|
@@ -47,7 +47,7 @@ OpenCode has **no** `.mdc` `alwaysApply` / `globs` engine. The preset uses three
|
|
|
47
47
|
| `opencode.json` `instructions` | Compact hedge (`alwaysOn` paths + `.opencode/AGENTS.md`) for the **parent**; re-init unions preset paths into the consumer list | V1 yes, V2 uncertain (kept narrow) |
|
|
48
48
|
| `## Rules to load (subagent context)` block in every `.opencode/agents/*.md` | Authoritative for **subagents** (`Task`/`@name`); alwaysOn + stack zone rules filtered to existing stems | yes |
|
|
49
49
|
|
|
50
|
-
`bin/opencode-install.js` `mergeOpencodeConfig` on re-init **unions** preset `instructions` paths into the existing list
|
|
50
|
+
`bin/opencode-install.js` `mergeOpencodeConfig` on re-init **unions** preset `instructions` paths into the existing list, **fills missing** `permission.bash` keys, and re-applies the universal `git commit` / `git push` deny rows even when the consumer file already set that key. Other bash keys stay consumer-wins. An empty `instructions: []` receives the preset paths. A non-array `instructions` value is left as-is. A top-level `policies` array is not a tool deny; re-init leaves it untouched. The v1 tool key is `bash` ([permissions](https://opencode.ai/docs/permissions/)). v2 is a different document: a `permissions` array whose action is `shell`. This preset emits the v1 object, not `permission.shell`.
|
|
51
51
|
|
|
52
52
|
| Kind | How it loads |
|
|
53
53
|
|------|----------------|
|
|
@@ -55,7 +55,7 @@ OpenCode has **no** `.mdc` `alwaysApply` / `globs` engine. The preset uses three
|
|
|
55
55
|
| Other rules | Lazy `Read` of `.opencode/rules/<stem>.md` when the task matches |
|
|
56
56
|
| Agents | Native `.opencode/agents/*.md` (`@name` / Task). `mode: subagent`. Each ships the **rules-to-load block** so subagents see the always-on + zone set |
|
|
57
57
|
| MCP | `opencode.json` `mcp` — preset ships context7 / playwright / chrome-devtools / figma; merge keeps extras |
|
|
58
|
-
| Harness enforcement | `opencode.json` `permission.bash` — universal `git commit/push deny` + JS-stack `npm/npx/pnpm/bun ask` + `npx jest* deny` |
|
|
58
|
+
| Harness enforcement | `opencode.json` `permission.bash` — universal `git commit/push deny` + JS-stack `npm/npx/pnpm/bun ask` + `npx jest* deny`. An agent-level `permission` block can override the global map |
|
|
59
59
|
| Skills | Native `.opencode/skills/<name>/SKILL.md` (`skill` tool) |
|
|
60
60
|
| Commands | Native `/task`, `/task-continue`, `/technical-retro`, `/spec-start` |
|
|
61
61
|
| MCP | `opencode.json` → `mcp` |
|
|
@@ -89,7 +89,7 @@ Preset servers merge into project **`opencode.json`** `mcp`:
|
|
|
89
89
|
- Cursor `command` + `args` → `{ "type": "local", "command": [...] }`
|
|
90
90
|
- Cursor `url` → `{ "type": "remote", "url": "..." }`
|
|
91
91
|
|
|
92
|
-
Extra local servers survive re-init when the file is valid JSON. See `.opencode/MCP.md` and rule `mcp-usage.md`.
|
|
92
|
+
Extra local servers survive re-init when the file is valid JSON. Re-init overwrites preset scalar fields on a shipped server, such as `command`. When the preset entry omits `env`, `headers`, or `environment`, the consumer object is kept. See `.opencode/MCP.md` and rule `mcp-usage.md`.
|
|
93
93
|
|
|
94
94
|
## Capability summary
|
|
95
95
|
|
package/docs/specs/INDEX.md
CHANGED
|
@@ -4,6 +4,9 @@ Discovery table for `docs/specs/**`. Agents start here when the file exists.
|
|
|
4
4
|
|
|
5
5
|
| id | type | domain | title | path | routes | aliases | status |
|
|
6
6
|
|----|------|--------|-------|------|--------|---------|--------|
|
|
7
|
-
| <!-- example-row: example-page | page | example | Example page | docs/specs/domains/example/example-page.md | /example | ExamplePage | draft --> |
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
```text
|
|
9
|
+
<!-- example-row: example-page | page | example | Example page | docs/specs/domains/example/example-page.md | /example | ExamplePage | draft -->
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
<!-- Add one row per page/feature spec. Keep `id` and `path` in sync with frontmatter. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonesofspring/ai-rules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38",
|
|
4
4
|
"description": "Presets of Cursor, Claude, Mavis, and OpenCode rules/commands for Revy Ross personal use",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Revy Ross",
|
|
@@ -51,8 +51,10 @@
|
|
|
51
51
|
"check:frontmatter": "node scripts/check-frontmatter.mjs",
|
|
52
52
|
"check:shared-core-drift": "bash scripts/check-shared-core-drift.sh",
|
|
53
53
|
"check:product-specs": "bash scripts/check-product-specs.sh",
|
|
54
|
+
"check:product-specs:self-test": "bash scripts/check-product-specs.sh --self-test",
|
|
54
55
|
"check:product-specs:dogfood": "bash scripts/check-product-specs.sh ../../dogfood/mcp-ts-sample",
|
|
55
56
|
"check:rule-eval": "node scripts/check-rule-eval.mjs",
|
|
57
|
+
"check:next-attached-budget": "node scripts/check-next-attached-budget.mjs",
|
|
56
58
|
"check:generated-drift": "node scripts/check-generated-drift.mjs",
|
|
57
59
|
"check:hook-body-parity": "node scripts/check-hook-body-parity.mjs",
|
|
58
60
|
"test:hook-body-parity-fixtures": "node scripts/test-hook-body-parity-fixtures.mjs",
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
"test:generated-drift-claude-fixtures": "node scripts/test-generated-drift-claude-fixtures.mjs",
|
|
63
65
|
"test:cli-mcp-merge": "node scripts/test-cli-mcp-merge.mjs",
|
|
64
66
|
"test:cli-init-clean": "node scripts/test-cli-init-clean.mjs",
|
|
67
|
+
"test:cli-update": "node scripts/test-cli-update.mjs",
|
|
65
68
|
"test:chain-coverage": "node scripts/test-chain-team-phases-coverage.mjs",
|
|
66
69
|
"test:agent-task-metrics-hooks": "node scripts/test-agent-task-metrics-hooks.mjs",
|
|
67
70
|
"check:mavis-platform-contract": "node scripts/check-mavis-platform-contract.mjs --self-test",
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gate-signal derivation — the metrics→signal edge of the loop (O1b/O7a).
|
|
3
|
+
*
|
|
4
|
+
* Reads `metrics.json` `attempt_finished` outcomes and derives `source: gate`
|
|
5
|
+
* signals **only from the closed signature map** (never from free-form metric
|
|
6
|
+
* strings). Derived signals are deduped by `(slug, attemptId, kind)` against
|
|
7
|
+
* the existing store (idempotent re-runs) and every text surface passes
|
|
8
|
+
* `isDenied` before it is emitted (a denied derivation is skipped + reported,
|
|
9
|
+
* never appended).
|
|
10
|
+
*
|
|
11
|
+
* Read-only over metrics: this module never writes `signals.jsonl`; the run
|
|
12
|
+
* entrypoint (`run.mjs`) owns the append. Schema pinned by D-3 (see the slug
|
|
13
|
+
* brief): `id = attemptId`, `at = attempt_finished.at`, `agent` correlated from
|
|
14
|
+
* the sharing `attempt_started` (fallback `gate-derivation`), `severity: high`,
|
|
15
|
+
* `status: proposed`, `confidence: 80` fixed, `stem` = signature body.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import fs from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
|
|
21
|
+
import { isDenied as defaultIsDenied } from './rule-improver.mjs';
|
|
22
|
+
|
|
23
|
+
export const DEFAULT_BASE_DIR = path.join(process.cwd(), '.ai.local');
|
|
24
|
+
|
|
25
|
+
// Closed gate-signature map (brief D-3 / architecture O1b/O7a). Only these two
|
|
26
|
+
// `metrics.json` outcomes derive a signal; every other outcome is ignored.
|
|
27
|
+
export const GATE_SIGNATURE_MAP = {
|
|
28
|
+
changes_requested: { kind: 'correction', signature: 'correction:gate-changes-requested' },
|
|
29
|
+
validation_failed: { kind: 'reversal', signature: 'reversal:gate-validation-failed' },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const DERIVED_TARGET = '.ai.local/conventions.md';
|
|
33
|
+
export const DERIVED_CONFIDENCE = 80;
|
|
34
|
+
export const DERIVED_AGENT_FALLBACK = 'gate-derivation';
|
|
35
|
+
|
|
36
|
+
function dedupKey(slug, attemptId, kind) {
|
|
37
|
+
return `${slug}\u0000${attemptId}\u0000${kind}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function humanize(stem) {
|
|
41
|
+
return stem.replace(/-/g, ' ');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Existing `(slug, id, kind)` keys already captured in the store — the D-4
|
|
45
|
+
// dedup surface that makes derivation idempotent. Read-only.
|
|
46
|
+
function readExistingKeys(signalsPath) {
|
|
47
|
+
const keys = new Set();
|
|
48
|
+
let raw = '';
|
|
49
|
+
try {
|
|
50
|
+
raw = fs.readFileSync(signalsPath, 'utf8');
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (!error || error.code !== 'ENOENT') throw error;
|
|
53
|
+
return keys;
|
|
54
|
+
}
|
|
55
|
+
for (const line of raw.split('\n')) {
|
|
56
|
+
const trimmed = line.trim();
|
|
57
|
+
if (trimmed === '') continue;
|
|
58
|
+
let signal;
|
|
59
|
+
try { signal = JSON.parse(trimmed); } catch { continue; }
|
|
60
|
+
if (typeof signal.slug === 'string' && typeof signal.id === 'string' && typeof signal.kind === 'string') {
|
|
61
|
+
keys.add(dedupKey(signal.slug, signal.id, signal.kind));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return keys;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Derive `source: gate` signals from every `metrics.json` under
|
|
69
|
+
* `baseDir/team/tasks/*`. Returns `{ signals, skipped, errors }`.
|
|
70
|
+
*
|
|
71
|
+
* - `signals` — derived signals ready to append (closed map only, deduped).
|
|
72
|
+
* - `skipped` — `{ slug, attemptId, kind, reason }` for denied (`denylist`)
|
|
73
|
+
* and already-captured (`dedup: already captured`) derivations.
|
|
74
|
+
* - `errors` — unparseable metrics / malformed events (never a crash).
|
|
75
|
+
*
|
|
76
|
+
* Read-only: no `signals.jsonl` write happens here.
|
|
77
|
+
*/
|
|
78
|
+
export function deriveGateSignals({ baseDir = DEFAULT_BASE_DIR, isDenied = defaultIsDenied } = {}) {
|
|
79
|
+
const tasksDir = path.join(baseDir, 'team', 'tasks');
|
|
80
|
+
const signalsPath = path.join(baseDir, 'signals.jsonl');
|
|
81
|
+
const existingKeys = readExistingKeys(signalsPath);
|
|
82
|
+
|
|
83
|
+
const signals = [];
|
|
84
|
+
const skipped = [];
|
|
85
|
+
const errors = [];
|
|
86
|
+
|
|
87
|
+
let names = [];
|
|
88
|
+
try {
|
|
89
|
+
names = fs.readdirSync(tasksDir);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
if (!error || error.code !== 'ENOENT') throw error;
|
|
92
|
+
return { signals, skipped, errors };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for (const name of names) {
|
|
96
|
+
const metricsPath = path.join(tasksDir, name, 'metrics.json');
|
|
97
|
+
let raw;
|
|
98
|
+
try {
|
|
99
|
+
raw = fs.readFileSync(metricsPath, 'utf8');
|
|
100
|
+
} catch (error) {
|
|
101
|
+
// A task dir without metrics.json yet is normal (in-flight); any other
|
|
102
|
+
// read error is real and reported.
|
|
103
|
+
if (error && error.code === 'ENOENT') continue;
|
|
104
|
+
errors.push({ task: name, reason: error instanceof Error ? error.message : String(error) });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
let data;
|
|
108
|
+
try {
|
|
109
|
+
data = JSON.parse(raw);
|
|
110
|
+
} catch (error) {
|
|
111
|
+
errors.push({ task: name, reason: `metrics.json parse error: ${error instanceof Error ? error.message : String(error)}` });
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const slug = typeof data?.task?.slug === 'string' && data.task.slug.length > 0 ? data.task.slug : name;
|
|
116
|
+
const events = Array.isArray(data?.events) ? data.events : [];
|
|
117
|
+
|
|
118
|
+
// `attempt_finished` carries no `agent`; correlate from the `attempt_started`
|
|
119
|
+
// event sharing the same attemptId (fallback to the fixed sentinel).
|
|
120
|
+
const agentById = new Map();
|
|
121
|
+
for (const event of events) {
|
|
122
|
+
if (event?.type === 'attempt_started' && typeof event.attemptId === 'string') {
|
|
123
|
+
agentById.set(event.attemptId, typeof event.agent === 'string' && event.agent.length > 0 ? event.agent : null);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
for (const event of events) {
|
|
128
|
+
if (event?.type !== 'attempt_finished') continue;
|
|
129
|
+
const mapped = Object.hasOwn(GATE_SIGNATURE_MAP, event.outcome) ? GATE_SIGNATURE_MAP[event.outcome] : undefined;
|
|
130
|
+
if (!mapped) continue; // completed / blocked / unknown → never mapped
|
|
131
|
+
const attemptId = typeof event.attemptId === 'string' && event.attemptId.length > 0 ? event.attemptId : null;
|
|
132
|
+
if (attemptId === null) { errors.push({ task: name, reason: 'attempt_finished missing attemptId' }); continue; }
|
|
133
|
+
const at = typeof event.at === 'string' ? event.at : null;
|
|
134
|
+
if (at === null || Number.isNaN(Date.parse(at))) { errors.push({ task: name, reason: 'attempt_finished missing/invalid at' }); continue; }
|
|
135
|
+
|
|
136
|
+
const { kind, signature } = mapped;
|
|
137
|
+
const stem = signature.slice(signature.indexOf(':') + 1);
|
|
138
|
+
const agent = agentById.get(attemptId) || DERIVED_AGENT_FALLBACK;
|
|
139
|
+
const phrase = humanize(stem);
|
|
140
|
+
|
|
141
|
+
// D-5: every derived text surface must pass isDenied; a denied derivation
|
|
142
|
+
// is skipped + reported, never appended.
|
|
143
|
+
if ([signature, stem, DERIVED_TARGET, phrase].some((text) => isDenied(text))) {
|
|
144
|
+
skipped.push({ slug, attemptId, kind, reason: 'denylist' });
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const key = dedupKey(slug, attemptId, kind);
|
|
149
|
+
if (existingKeys.has(key)) {
|
|
150
|
+
skipped.push({ slug, attemptId, kind, reason: 'dedup: already captured' });
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
existingKeys.add(key);
|
|
154
|
+
|
|
155
|
+
signals.push({
|
|
156
|
+
id: attemptId,
|
|
157
|
+
at,
|
|
158
|
+
slug,
|
|
159
|
+
agent,
|
|
160
|
+
kind,
|
|
161
|
+
severity: 'high',
|
|
162
|
+
confidence: DERIVED_CONFIDENCE,
|
|
163
|
+
signature,
|
|
164
|
+
target: DERIVED_TARGET,
|
|
165
|
+
stem,
|
|
166
|
+
source: 'gate',
|
|
167
|
+
status: 'proposed',
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return { signals, skipped, errors };
|
|
173
|
+
}
|