@bonesofspring/ai-rules 0.2.60 → 0.2.63
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 +102 -0
- package/README.md +62 -29
- package/bin/cli.js +368 -59
- package/bin/lib/ai-local-drift.js +18 -0
- package/bin/lib/engine-scripts.js +22 -5
- package/bin/lib/engine-upgrade.js +279 -0
- package/bin/lib/mcp/catalog.js +66 -5
- package/bin/lib/mcp/clients.js +4 -4
- package/bin/lib/mcp/credentials.js +88 -0
- package/bin/lib/mcp/doctor.js +100 -8
- package/bin/lib/mcp/npx.js +17 -0
- package/bin/lib/mcp/registry.js +2 -0
- package/bin/lib/merged-config.js +38 -0
- package/bin/lib/seed-ai-local-team.js +32 -14
- package/bin/mavis-install.js +3 -1
- package/bin/opencode-install.js +3 -1
- package/bin/zcode-install.js +3 -1
- package/docs/MAVIS.md +5 -2
- package/docs/MCP-CATALOG.md +30 -2
- package/docs/MCP-SETUP.md +30 -6
- package/docs/OPENCODE.md +27 -4
- package/docs/PLATFORMS.md +38 -0
- package/docs/PRESET-CONTRIBUTION.md +27 -14
- package/docs/TEAM-DB.md +194 -21
- package/docs/openapi/team-db.v1.json +4443 -2083
- package/mcp/defectdojo-mcp.mjs +353 -0
- package/mcp/gitlab.mjs +5 -1
- package/mcp/lib/defectdojo.mjs +249 -0
- package/mcp/lib/yandex.mjs +39 -15
- package/package.json +11 -5
- package/presets/_shared/ai-local/scripts/check-write-scope.mjs +176 -28
- package/presets/_shared/ai-local/scripts/lock.mjs +128 -69
- package/presets/_shared/ai-local/scripts/signals.mjs +17 -1
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +496 -67
- package/presets/_shared/ai-local/scripts/team-db-dashboard.mjs +816 -5
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +761 -6
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +10 -0
- package/presets/_shared/ai-local/scripts/team-db-scheduler.mjs +2360 -0
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +87 -0
- package/presets/_shared/ai-local/scripts/team-db.mjs +151 -9
- package/presets/_shared/ai-local/scripts/upstream-research.mjs +2961 -0
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +17 -0
- package/presets/_shared/core/agent-team/agent-team-intake.md +1 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -2
- package/presets/_shared/core/meta/preset-pr-checklist.md +4 -4
- package/presets/_shared/core/meta/preset-twin-sync.md +1 -1
- package/presets/_shared/hooks/README.md +23 -3
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +57 -3
- package/presets/_shared/hooks/check-preset-update.mjs +4 -3
- package/presets/{claude/nuxt/hooks/guard-shell-command.sh → _shared/hooks/guard-shell-command.mjs.tmpl} +29 -35
- package/presets/_shared/hooks/run-hook.mjs +102 -0
- package/presets/claude/android-kotlin/hooks/README.md +4 -3
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/android-kotlin/hooks/examples/README.md +2 -2
- package/presets/claude/android-kotlin/hooks/guard-shell-command.mjs +96 -0
- package/presets/claude/android-kotlin/hooks/run-hook.mjs +102 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/android-kotlin/settings.json +2 -2
- package/presets/claude/android-kotlin/team/README.md +5 -0
- package/presets/claude/go/hooks/README.md +4 -3
- package/presets/claude/go/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/go/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/go/hooks/examples/README.md +2 -2
- package/presets/claude/go/hooks/guard-shell-command.mjs +95 -0
- package/presets/claude/go/hooks/run-hook.mjs +102 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/go/settings.json +2 -2
- package/presets/claude/go/team/README.md +5 -0
- package/presets/claude/ios-swift/hooks/README.md +4 -3
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/ios-swift/hooks/examples/README.md +2 -2
- package/presets/claude/ios-swift/hooks/guard-shell-command.mjs +95 -0
- package/presets/claude/ios-swift/hooks/run-hook.mjs +102 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/ios-swift/settings.json +2 -2
- package/presets/claude/ios-swift/team/README.md +5 -0
- package/presets/claude/java/hooks/README.md +4 -3
- package/presets/claude/java/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/java/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/java/hooks/examples/README.md +2 -2
- package/presets/claude/java/hooks/{guard-shell-command.sh → guard-shell-command.mjs} +31 -38
- package/presets/claude/java/hooks/run-hook.mjs +102 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/java/settings.json +2 -2
- package/presets/claude/java/team/README.md +5 -0
- package/presets/claude/mcp-ts/hooks/README.md +4 -3
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/mcp-ts/hooks/examples/README.md +1 -1
- package/presets/claude/mcp-ts/hooks/guard-shell-command.mjs +95 -0
- package/presets/claude/mcp-ts/hooks/run-hook.mjs +102 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/mcp-ts/settings.json +2 -2
- package/presets/claude/mcp-ts/team/README.md +5 -0
- package/presets/claude/mol/hooks/README.md +20 -0
- package/presets/claude/mol/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/{svelte/hooks/guard-shell-command.sh → mol/hooks/guard-shell-command.mjs} +29 -35
- package/presets/claude/mol/hooks/run-hook.mjs +102 -0
- package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/mol/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/mol/settings.json +2 -2
- package/presets/claude/mol/team/README.md +5 -0
- package/presets/claude/next/agents/build-verifier.md +18 -3
- package/presets/claude/next/agents/code-reviewer.md +2 -0
- package/presets/claude/next/agents/feature-developer.md +3 -1
- package/presets/claude/next/agents/task-analyst.md +6 -0
- package/presets/claude/next/agents/task-router.md +5 -3
- package/presets/claude/next/commands/README.md +1 -0
- package/presets/claude/next/commands/task-continue.md +1 -1
- package/presets/claude/next/commands/upstream-research.md +23 -0
- package/presets/claude/next/hooks/README.md +4 -3
- package/presets/claude/next/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/next/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/next/hooks/examples/README.md +2 -2
- package/presets/claude/next/hooks/guard-shell-command.mjs +94 -0
- package/presets/claude/next/hooks/run-hook.mjs +102 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/next/settings.json +2 -2
- package/presets/claude/next/team/README.md +23 -0
- package/presets/claude/next/team/upstream/config.json +31 -0
- package/presets/claude/next/team/upstream/digest-template.md +55 -0
- package/presets/claude/next/team/upstream/opencode.json +34 -0
- package/presets/claude/next/team/upstream/projects.json +4 -0
- package/presets/claude/next/team/upstream/prompt.md +77 -0
- package/presets/claude/next/team/upstream/signatures.json +9 -0
- package/presets/claude/nuxt/hooks/README.md +4 -3
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/nuxt/hooks/examples/README.md +2 -2
- package/presets/claude/{ios-swift/hooks/guard-shell-command.sh → nuxt/hooks/guard-shell-command.mjs} +29 -37
- package/presets/claude/nuxt/hooks/run-hook.mjs +102 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/nuxt/settings.json +2 -2
- package/presets/claude/nuxt/team/README.md +5 -0
- package/presets/claude/php-hexagonal/hooks/README.md +4 -3
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/php-hexagonal/hooks/examples/README.md +2 -2
- package/presets/claude/php-hexagonal/hooks/guard-shell-command.mjs +96 -0
- package/presets/claude/php-hexagonal/hooks/run-hook.mjs +102 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/php-hexagonal/settings.json +2 -2
- package/presets/claude/php-hexagonal/team/README.md +5 -0
- package/presets/claude/php-laravel/hooks/README.md +4 -3
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/php-laravel/hooks/examples/README.md +2 -2
- package/presets/claude/php-laravel/hooks/guard-shell-command.mjs +96 -0
- package/presets/claude/php-laravel/hooks/run-hook.mjs +102 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/php-laravel/settings.json +2 -2
- package/presets/claude/php-laravel/team/README.md +5 -0
- package/presets/claude/svelte/hooks/README.md +4 -3
- package/presets/claude/svelte/hooks/chain-team-phases.sh +57 -3
- package/presets/claude/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/svelte/hooks/examples/README.md +2 -2
- package/presets/claude/svelte/hooks/guard-shell-command.mjs +94 -0
- package/presets/claude/svelte/hooks/run-hook.mjs +102 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/svelte/settings.json +2 -2
- package/presets/claude/svelte/team/README.md +5 -0
- package/presets/cursor/android-kotlin/hooks/README.md +2 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/android-kotlin/hooks/examples/README.md +1 -1
- package/presets/cursor/android-kotlin/hooks/guard-shell-command.mjs +96 -0
- package/presets/cursor/android-kotlin/hooks/run-hook.mjs +102 -0
- package/presets/cursor/android-kotlin/hooks.json +2 -2
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/android-kotlin/team/README.md +5 -0
- package/presets/cursor/go/hooks/README.md +2 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/go/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/go/hooks/examples/README.md +1 -1
- package/presets/cursor/go/hooks/guard-shell-command.mjs +95 -0
- package/presets/cursor/go/hooks/run-hook.mjs +102 -0
- package/presets/cursor/go/hooks.json +2 -2
- package/presets/cursor/go/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/go/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/go/team/README.md +5 -0
- package/presets/cursor/ios-swift/hooks/README.md +2 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/ios-swift/hooks/examples/README.md +1 -1
- package/presets/cursor/ios-swift/hooks/guard-shell-command.mjs +95 -0
- package/presets/cursor/ios-swift/hooks/run-hook.mjs +102 -0
- package/presets/cursor/ios-swift/hooks.json +2 -2
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/ios-swift/team/README.md +5 -0
- package/presets/cursor/java/hooks/README.md +2 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/java/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/java/hooks/examples/README.md +1 -1
- package/presets/cursor/java/hooks/guard-shell-command.mjs +96 -0
- package/presets/cursor/java/hooks/run-hook.mjs +102 -0
- package/presets/cursor/java/hooks.json +2 -2
- package/presets/cursor/java/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/java/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/java/team/README.md +5 -0
- package/presets/cursor/mcp-ts/hooks/README.md +2 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/mcp-ts/hooks/guard-shell-command.mjs +95 -0
- package/presets/cursor/mcp-ts/hooks/run-hook.mjs +102 -0
- package/presets/cursor/mcp-ts/hooks.json +2 -2
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/mcp-ts/team/README.md +5 -0
- package/presets/cursor/mol/hooks/README.md +2 -1
- package/presets/cursor/mol/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/mol/hooks/examples/README.md +1 -1
- package/presets/{claude/next/hooks/guard-shell-command.sh → cursor/mol/hooks/guard-shell-command.mjs} +29 -35
- package/presets/cursor/mol/hooks/run-hook.mjs +102 -0
- package/presets/cursor/mol/hooks.json +2 -2
- package/presets/cursor/mol/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/mol/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/mol/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/mol/team/README.md +5 -0
- package/presets/cursor/next/agents/build-verifier.md +18 -3
- package/presets/cursor/next/agents/code-reviewer.md +2 -0
- package/presets/cursor/next/agents/feature-developer.md +3 -1
- package/presets/cursor/next/agents/task-analyst.md +6 -0
- package/presets/cursor/next/agents/task-router.md +5 -3
- package/presets/cursor/next/commands/README.md +1 -0
- package/presets/cursor/next/commands/task-continue.md +1 -1
- package/presets/cursor/next/commands/upstream-research.md +23 -0
- package/presets/cursor/next/hooks/README.md +2 -1
- package/presets/cursor/next/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/next/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/next/hooks/examples/README.md +1 -1
- package/presets/cursor/next/hooks/guard-shell-command.mjs +94 -0
- package/presets/cursor/next/hooks/run-hook.mjs +102 -0
- package/presets/cursor/next/hooks.json +2 -2
- package/presets/cursor/next/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/next/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/next/team/README.md +23 -0
- package/presets/cursor/next/team/upstream/config.json +31 -0
- package/presets/cursor/next/team/upstream/digest-template.md +55 -0
- package/presets/cursor/next/team/upstream/opencode.json +34 -0
- package/presets/cursor/next/team/upstream/projects.json +4 -0
- package/presets/cursor/next/team/upstream/prompt.md +77 -0
- package/presets/cursor/next/team/upstream/signatures.json +9 -0
- package/presets/cursor/nuxt/hooks/README.md +2 -1
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/nuxt/hooks/examples/README.md +1 -1
- package/presets/cursor/nuxt/hooks/guard-shell-command.mjs +94 -0
- package/presets/cursor/nuxt/hooks/run-hook.mjs +102 -0
- package/presets/cursor/nuxt/hooks.json +2 -2
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/nuxt/team/README.md +5 -0
- package/presets/cursor/php-hexagonal/hooks/README.md +2 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/php-hexagonal/hooks/examples/README.md +1 -1
- package/presets/cursor/php-hexagonal/hooks/guard-shell-command.mjs +96 -0
- package/presets/cursor/php-hexagonal/hooks/run-hook.mjs +102 -0
- package/presets/cursor/php-hexagonal/hooks.json +2 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/php-hexagonal/team/README.md +5 -0
- package/presets/cursor/php-laravel/hooks/README.md +2 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/php-laravel/hooks/examples/README.md +1 -1
- package/presets/cursor/php-laravel/hooks/guard-shell-command.mjs +96 -0
- package/presets/cursor/php-laravel/hooks/run-hook.mjs +102 -0
- package/presets/cursor/php-laravel/hooks.json +2 -2
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/php-laravel/team/README.md +5 -0
- package/presets/cursor/svelte/hooks/README.md +2 -1
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +57 -3
- package/presets/cursor/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/svelte/hooks/examples/README.md +1 -1
- package/presets/cursor/svelte/hooks/guard-shell-command.mjs +94 -0
- package/presets/cursor/svelte/hooks/run-hook.mjs +102 -0
- package/presets/cursor/svelte/hooks.json +2 -2
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/svelte/team/README.md +5 -0
- package/presets/mavis/android-kotlin/adapter-map.json +11 -3
- package/presets/mavis/android-kotlin/hooks/README.md +2 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/android-kotlin/team/README.md +5 -0
- package/presets/mavis/go/adapter-map.json +11 -3
- package/presets/mavis/go/hooks/README.md +2 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/go/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/go/rules/agent-team-intake.md +1 -0
- package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/go/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/go/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/go/team/README.md +5 -0
- package/presets/mavis/ios-swift/adapter-map.json +11 -3
- package/presets/mavis/ios-swift/hooks/README.md +2 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/ios-swift/team/README.md +5 -0
- package/presets/mavis/java/adapter-map.json +11 -3
- package/presets/mavis/java/hooks/README.md +2 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/java/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/java/rules/agent-team-intake.md +1 -0
- package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/java/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/java/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/java/team/README.md +5 -0
- package/presets/mavis/mcp-ts/adapter-map.json +11 -3
- package/presets/mavis/mcp-ts/hooks/README.md +2 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/mcp-ts/team/README.md +5 -0
- package/presets/mavis/mol/adapter-map.json +11 -3
- package/presets/mavis/mol/hooks/README.md +2 -1
- package/presets/mavis/mol/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/mol/rules/agent-team-intake.md +1 -0
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/mol/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/mol/team/README.md +5 -0
- package/presets/mavis/next/adapter-map.json +67 -3
- package/presets/mavis/next/agents/build-verifier.md +18 -3
- package/presets/mavis/next/agents/code-reviewer.md +2 -0
- package/presets/mavis/next/agents/feature-developer.md +3 -1
- package/presets/mavis/next/agents/task-analyst.md +6 -0
- package/presets/mavis/next/agents/task-router.md +5 -3
- package/presets/mavis/next/commands/README.md +1 -0
- package/presets/mavis/next/commands/task-continue.md +1 -1
- package/presets/mavis/next/commands/upstream-research.md +18 -0
- package/presets/mavis/next/hooks/README.md +2 -1
- package/presets/mavis/next/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/next/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/next/rules/agent-team-intake.md +1 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/next/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/next/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/next/team/README.md +23 -0
- package/presets/mavis/next/team/upstream/config.json +31 -0
- package/presets/mavis/next/team/upstream/digest-template.md +55 -0
- package/presets/mavis/next/team/upstream/opencode.json +34 -0
- package/presets/mavis/next/team/upstream/projects.json +4 -0
- package/presets/mavis/next/team/upstream/prompt.md +77 -0
- package/presets/mavis/next/team/upstream/signatures.json +9 -0
- package/presets/mavis/nuxt/adapter-map.json +11 -3
- package/presets/mavis/nuxt/hooks/README.md +2 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/nuxt/team/README.md +5 -0
- package/presets/mavis/php-hexagonal/adapter-map.json +11 -3
- package/presets/mavis/php-hexagonal/hooks/README.md +2 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/php-hexagonal/team/README.md +5 -0
- package/presets/mavis/php-laravel/adapter-map.json +11 -3
- package/presets/mavis/php-laravel/hooks/README.md +2 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/php-laravel/team/README.md +5 -0
- package/presets/mavis/svelte/adapter-map.json +11 -3
- package/presets/mavis/svelte/hooks/README.md +2 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +57 -3
- package/presets/mavis/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/svelte/rules/agent-team-intake.md +1 -0
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/svelte/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/svelte/team/README.md +5 -0
- package/presets/opencode/android-kotlin/OPENCODE.md +1 -1
- package/presets/opencode/android-kotlin/README.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +11 -3
- package/presets/opencode/android-kotlin/hooks/README.md +3 -2
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/android-kotlin/team/README.md +5 -0
- package/presets/opencode/go/OPENCODE.md +1 -1
- package/presets/opencode/go/README.md +1 -1
- package/presets/opencode/go/adapter-map.json +11 -3
- package/presets/opencode/go/hooks/README.md +3 -2
- package/presets/opencode/go/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/go/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/go/rules/agent-team-intake.md +1 -0
- package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/go/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/go/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/go/team/README.md +5 -0
- package/presets/opencode/ios-swift/OPENCODE.md +1 -1
- package/presets/opencode/ios-swift/README.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +11 -3
- package/presets/opencode/ios-swift/hooks/README.md +3 -2
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/ios-swift/team/README.md +5 -0
- package/presets/opencode/java/OPENCODE.md +1 -1
- package/presets/opencode/java/README.md +1 -1
- package/presets/opencode/java/adapter-map.json +11 -3
- package/presets/opencode/java/hooks/README.md +3 -2
- package/presets/opencode/java/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/java/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/java/rules/agent-team-intake.md +1 -0
- package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/java/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/java/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/java/team/README.md +5 -0
- package/presets/opencode/mcp-ts/OPENCODE.md +1 -1
- package/presets/opencode/mcp-ts/README.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +11 -3
- package/presets/opencode/mcp-ts/hooks/README.md +3 -2
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/mcp-ts/team/README.md +5 -0
- package/presets/opencode/mol/OPENCODE.md +1 -1
- package/presets/opencode/mol/README.md +1 -1
- package/presets/opencode/mol/adapter-map.json +11 -3
- package/presets/opencode/mol/hooks/README.md +3 -2
- package/presets/opencode/mol/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/mol/rules/agent-team-intake.md +1 -0
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/mol/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/mol/team/README.md +5 -0
- package/presets/opencode/next/OPENCODE.md +1 -1
- package/presets/opencode/next/README.md +1 -1
- package/presets/opencode/next/adapter-map.json +67 -3
- package/presets/opencode/next/agents/build-verifier.md +18 -3
- package/presets/opencode/next/agents/code-reviewer.md +2 -0
- package/presets/opencode/next/agents/feature-developer.md +3 -1
- package/presets/opencode/next/agents/task-analyst.md +6 -0
- package/presets/opencode/next/agents/task-router.md +5 -3
- package/presets/opencode/next/commands/README.md +1 -0
- package/presets/opencode/next/commands/task-continue.md +1 -1
- package/presets/opencode/next/commands/upstream-research.md +26 -0
- package/presets/opencode/next/hooks/README.md +3 -2
- package/presets/opencode/next/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/next/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/next/rules/agent-team-intake.md +1 -0
- package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/next/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/next/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/next/team/README.md +23 -0
- package/presets/opencode/next/team/upstream/config.json +31 -0
- package/presets/opencode/next/team/upstream/digest-template.md +55 -0
- package/presets/opencode/next/team/upstream/opencode.json +34 -0
- package/presets/opencode/next/team/upstream/projects.json +4 -0
- package/presets/opencode/next/team/upstream/prompt.md +77 -0
- package/presets/opencode/next/team/upstream/signatures.json +9 -0
- package/presets/opencode/nuxt/OPENCODE.md +1 -1
- package/presets/opencode/nuxt/README.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +11 -3
- package/presets/opencode/nuxt/hooks/README.md +3 -2
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/nuxt/team/README.md +5 -0
- package/presets/opencode/php-hexagonal/OPENCODE.md +1 -1
- package/presets/opencode/php-hexagonal/README.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +11 -3
- package/presets/opencode/php-hexagonal/hooks/README.md +3 -2
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/php-hexagonal/team/README.md +5 -0
- package/presets/opencode/php-laravel/OPENCODE.md +1 -1
- package/presets/opencode/php-laravel/README.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +11 -3
- package/presets/opencode/php-laravel/hooks/README.md +3 -2
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/php-laravel/team/README.md +5 -0
- package/presets/opencode/svelte/OPENCODE.md +1 -1
- package/presets/opencode/svelte/README.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +11 -3
- package/presets/opencode/svelte/hooks/README.md +3 -2
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +57 -3
- package/presets/opencode/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/svelte/rules/agent-team-intake.md +1 -0
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/svelte/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/svelte/team/README.md +5 -0
- package/presets/zcode/android-kotlin/adapter-map.json +11 -3
- package/presets/zcode/android-kotlin/hooks/README.md +2 -1
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/android-kotlin/team/README.md +5 -0
- package/presets/zcode/go/adapter-map.json +11 -3
- package/presets/zcode/go/hooks/README.md +2 -1
- package/presets/zcode/go/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/go/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/go/rules/agent-team-intake.md +1 -0
- package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/go/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/go/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/go/team/README.md +5 -0
- package/presets/zcode/ios-swift/adapter-map.json +11 -3
- package/presets/zcode/ios-swift/hooks/README.md +2 -1
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/ios-swift/team/README.md +5 -0
- package/presets/zcode/java/adapter-map.json +11 -3
- package/presets/zcode/java/hooks/README.md +2 -1
- package/presets/zcode/java/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/java/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/java/rules/agent-team-intake.md +1 -0
- package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/java/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/java/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/java/team/README.md +5 -0
- package/presets/zcode/mcp-ts/adapter-map.json +11 -3
- package/presets/zcode/mcp-ts/hooks/README.md +2 -1
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/mcp-ts/team/README.md +5 -0
- package/presets/zcode/mol/adapter-map.json +11 -3
- package/presets/zcode/mol/hooks/README.md +2 -1
- package/presets/zcode/mol/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/mol/rules/agent-team-intake.md +1 -0
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/mol/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/mol/team/README.md +5 -0
- package/presets/zcode/next/adapter-map.json +67 -3
- package/presets/zcode/next/agents/build-verifier.md +18 -3
- package/presets/zcode/next/agents/code-reviewer.md +2 -0
- package/presets/zcode/next/agents/feature-developer.md +3 -1
- package/presets/zcode/next/agents/task-analyst.md +6 -0
- package/presets/zcode/next/agents/task-router.md +5 -3
- package/presets/zcode/next/commands/README.md +1 -0
- package/presets/zcode/next/commands/task-continue.md +1 -1
- package/presets/zcode/next/commands/upstream-research.md +26 -0
- package/presets/zcode/next/hooks/README.md +2 -1
- package/presets/zcode/next/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/next/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/next/rules/agent-team-intake.md +1 -0
- package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/next/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/next/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/next/team/README.md +23 -0
- package/presets/zcode/next/team/upstream/config.json +31 -0
- package/presets/zcode/next/team/upstream/digest-template.md +55 -0
- package/presets/zcode/next/team/upstream/opencode.json +34 -0
- package/presets/zcode/next/team/upstream/projects.json +4 -0
- package/presets/zcode/next/team/upstream/prompt.md +77 -0
- package/presets/zcode/next/team/upstream/signatures.json +9 -0
- package/presets/zcode/nuxt/adapter-map.json +11 -3
- package/presets/zcode/nuxt/hooks/README.md +2 -1
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/nuxt/team/README.md +5 -0
- package/presets/zcode/php-hexagonal/adapter-map.json +11 -3
- package/presets/zcode/php-hexagonal/hooks/README.md +2 -1
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/php-hexagonal/team/README.md +5 -0
- package/presets/zcode/php-laravel/adapter-map.json +11 -3
- package/presets/zcode/php-laravel/hooks/README.md +2 -1
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/php-laravel/team/README.md +5 -0
- package/presets/zcode/svelte/adapter-map.json +11 -3
- package/presets/zcode/svelte/hooks/README.md +2 -1
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +57 -3
- package/presets/zcode/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/svelte/rules/agent-team-intake.md +1 -0
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/svelte/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/svelte/team/README.md +5 -0
- package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +0 -103
- package/presets/claude/go/hooks/guard-shell-command.sh +0 -102
- package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +0 -102
- package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +0 -103
- package/presets/claude/php-laravel/hooks/guard-shell-command.sh +0 -103
- package/presets/cursor/android-kotlin/hooks/guard-shell-command.sh +0 -80
- package/presets/cursor/go/hooks/guard-shell-command.sh +0 -79
- package/presets/cursor/ios-swift/hooks/guard-shell-command.sh +0 -79
- package/presets/cursor/java/hooks/guard-shell-command.sh +0 -80
- package/presets/cursor/mcp-ts/hooks/guard-shell-command.sh +0 -79
- package/presets/cursor/mol/hooks/guard-shell-command.sh +0 -77
- package/presets/cursor/next/hooks/guard-shell-command.sh +0 -77
- package/presets/cursor/nuxt/hooks/guard-shell-command.sh +0 -77
- package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +0 -80
- package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +0 -80
- package/presets/cursor/svelte/hooks/guard-shell-command.sh +0 -77
package/bin/lib/mcp/doctor.js
CHANGED
|
@@ -10,12 +10,14 @@ const { resolveManagedPath } = require('../safe-path');
|
|
|
10
10
|
const { isPlainObject } = require('../fs-utils');
|
|
11
11
|
const { TOOL_INSTALL_MARKERS } = require('../tool-installs');
|
|
12
12
|
const { assertNodeFloor, resolveProjectRootDetailed } = require('./run');
|
|
13
|
+
const { npxInvocation, npmInvocation } = require('./npx');
|
|
13
14
|
const { detectClientIds, readClientConfig, containerAt } = require('./clients');
|
|
14
15
|
const {
|
|
15
16
|
checkIgnored,
|
|
16
17
|
CREDENTIALS_REL,
|
|
17
18
|
CONFIG_REL,
|
|
18
19
|
GITHUB_CREDENTIALS_REL,
|
|
20
|
+
DEFECTDOJO_CREDENTIALS_REL,
|
|
19
21
|
githubProjectRoot,
|
|
20
22
|
} = require('./credentials');
|
|
21
23
|
const { ownsEntry, registeredPin, tokenFinding, clientById } = require('./registry');
|
|
@@ -28,17 +30,18 @@ function oneLine(text) {
|
|
|
28
30
|
|
|
29
31
|
let npxCached = null;
|
|
30
32
|
|
|
33
|
+
function versionResolves(invocation) {
|
|
34
|
+
return spawnSync(invocation.command, ['--version'], {
|
|
35
|
+
stdio: 'ignore',
|
|
36
|
+
shell: invocation.shell,
|
|
37
|
+
}).status === 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
function npxResolves() {
|
|
32
41
|
if (npxCached !== null) {
|
|
33
42
|
return npxCached;
|
|
34
43
|
}
|
|
35
|
-
|
|
36
|
-
if (spawnSync(npx, ['--version'], { stdio: 'ignore' }).status === 0) {
|
|
37
|
-
npxCached = true;
|
|
38
|
-
return npxCached;
|
|
39
|
-
}
|
|
40
|
-
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
41
|
-
npxCached = spawnSync(npm, ['--version'], { stdio: 'ignore' }).status === 0;
|
|
44
|
+
npxCached = versionResolves(npxInvocation()) || versionResolves(npmInvocation());
|
|
42
45
|
return npxCached;
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -176,6 +179,77 @@ async function checkGithubUpstream(config, github) {
|
|
|
176
179
|
return { status: 'fail', detail: probe.detail, next: `check network access to ${host}` };
|
|
177
180
|
}
|
|
178
181
|
|
|
182
|
+
function checkDefectdojoCredentials(root, config) {
|
|
183
|
+
if (!config.token) {
|
|
184
|
+
return {
|
|
185
|
+
status: 'fail',
|
|
186
|
+
detail: `DEFECTDOJO_TOKEN is not set in ${DEFECTDOJO_CREDENTIALS_REL} or the environment`,
|
|
187
|
+
next: `add DEFECTDOJO_URL and DEFECTDOJO_TOKEN to ${DEFECTDOJO_CREDENTIALS_REL} in the project root, then rerun ai-rules mcp setup defectdojo`,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (!config.baseUrl) {
|
|
191
|
+
return {
|
|
192
|
+
status: 'fail',
|
|
193
|
+
detail: `DEFECTDOJO_URL is not set in ${DEFECTDOJO_CREDENTIALS_REL} or the environment`,
|
|
194
|
+
next: `add DEFECTDOJO_URL to ${DEFECTDOJO_CREDENTIALS_REL} in the project root, then rerun ai-rules mcp setup defectdojo`,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const origin = config.tokenOrigin === DEFECTDOJO_CREDENTIALS_REL ? DEFECTDOJO_CREDENTIALS_REL : 'the environment';
|
|
199
|
+
const details = [`token from ${origin}`];
|
|
200
|
+
|
|
201
|
+
if (config.fileHasToken) {
|
|
202
|
+
const ignored = checkIgnored(root, DEFECTDOJO_CREDENTIALS_REL);
|
|
203
|
+
if (ignored.status === 'fail') {
|
|
204
|
+
return {
|
|
205
|
+
status: 'fail',
|
|
206
|
+
detail: `${DEFECTDOJO_CREDENTIALS_REL} is not ignored`,
|
|
207
|
+
next: `add ${DEFECTDOJO_CREDENTIALS_REL} to .gitignore, then rerun ai-rules mcp setup defectdojo`,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
details.push(ignored.status === 'warn' ? 'ignore rule not provable (not a git repository)' : 'ignored');
|
|
211
|
+
if (process.platform !== 'win32') {
|
|
212
|
+
const mode = fs.statSync(config.credentialsPath).mode & 0o777;
|
|
213
|
+
if (mode !== 0o600) {
|
|
214
|
+
details.push(`mode 0${mode.toString(8)} (0600 is safer)`);
|
|
215
|
+
return { status: 'warn', detail: details.join(', ') };
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
} else if (config.hasCredentialsFile) {
|
|
219
|
+
details.push(`${DEFECTDOJO_CREDENTIALS_REL} holds no token`);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return { status: 'ok', detail: details.join(', ') };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
async function checkDefectdojoUpstream(config, defectdojo) {
|
|
226
|
+
const probe = await defectdojo.probeDefectDojoUpstream({
|
|
227
|
+
baseUrl: config.baseUrl,
|
|
228
|
+
token: config.token,
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
if (probe.ok) {
|
|
232
|
+
return { status: 'ok', detail: probe.detail };
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (probe.status === 401 || probe.status === 403) {
|
|
236
|
+
return {
|
|
237
|
+
status: 'fail',
|
|
238
|
+
detail: probe.detail,
|
|
239
|
+
next: `replace DEFECTDOJO_TOKEN in ${DEFECTDOJO_CREDENTIALS_REL} with a valid token, then rerun ai-rules mcp setup defectdojo`,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
let host = config.baseUrl;
|
|
244
|
+
try {
|
|
245
|
+
host = new URL(config.baseUrl).host;
|
|
246
|
+
} catch {
|
|
247
|
+
// keep the raw value
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return { status: 'fail', detail: probe.detail, next: `check network access to ${host}` };
|
|
251
|
+
}
|
|
252
|
+
|
|
179
253
|
async function checkRegistration(server, cwd, version) {
|
|
180
254
|
const clients = detectClientIds(cwd, TOOL_INSTALL_MARKERS);
|
|
181
255
|
if (clients.length === 0) {
|
|
@@ -376,7 +450,7 @@ function checkRuntime(server, cwd, packageRoot, version) {
|
|
|
376
450
|
/**
|
|
377
451
|
* @returns {Promise<{ servers: object[], exitCode: 0|1|2 }>}
|
|
378
452
|
*/
|
|
379
|
-
async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex, github, options = {} }) {
|
|
453
|
+
async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex, github, defectdojo, options = {} }) {
|
|
380
454
|
const { serversFor } = require('./registry');
|
|
381
455
|
const servers = [];
|
|
382
456
|
const failures = [];
|
|
@@ -393,6 +467,13 @@ async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex,
|
|
|
393
467
|
return { check: checkGithubCredentials(root, config), config };
|
|
394
468
|
})()
|
|
395
469
|
: null;
|
|
470
|
+
const defectdojoState = providers.has('defectdojo')
|
|
471
|
+
? (() => {
|
|
472
|
+
const root = githubProjectRoot(cwd);
|
|
473
|
+
const config = defectdojo.resolveDefectDojoConfig({ root });
|
|
474
|
+
return { check: checkDefectdojoCredentials(root, config), config };
|
|
475
|
+
})()
|
|
476
|
+
: null;
|
|
396
477
|
|
|
397
478
|
for (const server of serversFor(provider)) {
|
|
398
479
|
const checks = {};
|
|
@@ -441,6 +522,17 @@ async function runDoctor({ cwd, provider, packageRoot, version, envfile, yandex,
|
|
|
441
522
|
} else {
|
|
442
523
|
put('upstream', await checkGithubUpstream(githubState.config, github));
|
|
443
524
|
}
|
|
525
|
+
} else if (server.provider === 'defectdojo') {
|
|
526
|
+
put('credentials', defectdojoState.check);
|
|
527
|
+
if (
|
|
528
|
+
defectdojoState.check.status === 'fail'
|
|
529
|
+
|| !defectdojoState.config.token
|
|
530
|
+
|| !defectdojoState.config.baseUrl
|
|
531
|
+
) {
|
|
532
|
+
checks.upstream = { status: 'skipped', detail: 'credentials not ready' };
|
|
533
|
+
} else {
|
|
534
|
+
put('upstream', await checkDefectdojoUpstream(defectdojoState.config, defectdojo));
|
|
535
|
+
}
|
|
444
536
|
} else {
|
|
445
537
|
put('credentials', yandexState.check);
|
|
446
538
|
if (yandexState.check.status === 'fail' || !yandexState.token) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How to launch npm's CLI on this platform.
|
|
3
|
+
*
|
|
4
|
+
* On Windows `npx` and `npm` are `.cmd` shims, and current Node refuses to
|
|
5
|
+
* spawn a `.cmd`/`.bat` without a shell (post-CVE-2024-27980). The flag travels
|
|
6
|
+
* with the command so every spawn site uses the same resolution, while the
|
|
7
|
+
* registered MCP client entry keeps the bare `npx` name the goldens encode.
|
|
8
|
+
*/
|
|
9
|
+
function invocation(name, platform) {
|
|
10
|
+
return { command: name, shell: platform === 'win32' };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const npxInvocation = (platform = process.platform) => invocation('npx', platform);
|
|
14
|
+
|
|
15
|
+
const npmInvocation = (platform = process.platform) => invocation('npm', platform);
|
|
16
|
+
|
|
17
|
+
module.exports = { npxInvocation, npmInvocation };
|
package/bin/lib/mcp/registry.js
CHANGED
|
@@ -29,6 +29,7 @@ const SERVERS = [
|
|
|
29
29
|
entry: 'mcp/yandex-mcp-proxy.mjs',
|
|
30
30
|
argv: ['wiki'],
|
|
31
31
|
},
|
|
32
|
+
{ id: 'defectdojo', slug: 'defectdojo', provider: 'defectdojo', entry: 'mcp/defectdojo-mcp.mjs', argv: [] },
|
|
32
33
|
];
|
|
33
34
|
|
|
34
35
|
const CLIENTS = [
|
|
@@ -116,6 +117,7 @@ function isLegacyEntry(entry, server) {
|
|
|
116
117
|
const markers = {
|
|
117
118
|
gitlab: 'gitlab-mcp.mjs',
|
|
118
119
|
yandex: 'yandex-mcp-proxy.mjs',
|
|
120
|
+
defectdojo: 'defectdojo-mcp.mjs',
|
|
119
121
|
};
|
|
120
122
|
const marker = markers[server.provider];
|
|
121
123
|
if (!marker) {
|
package/bin/lib/merged-config.js
CHANGED
|
@@ -272,6 +272,42 @@ function mergeMcpConfig(presetObj, existingObj) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Migration: earlier releases registered the guard and the chain hook as `.sh`
|
|
277
|
+
* files. Re-init only adds hook commands, so a consumer `.claude/settings.json`
|
|
278
|
+
* would keep the dead bash command next to the new Node one. These two commands
|
|
279
|
+
* are dropped from every event group before the preset hooks are merged; no
|
|
280
|
+
* other consumer command is touched.
|
|
281
|
+
*/
|
|
282
|
+
const LEGACY_CLAUDE_HOOK_COMMANDS = new Set([
|
|
283
|
+
'${CLAUDE_PROJECT_DIR}/.claude/hooks/guard-shell-command.sh',
|
|
284
|
+
'${CLAUDE_PROJECT_DIR}/.claude/hooks/chain-team-phases.sh',
|
|
285
|
+
]);
|
|
286
|
+
|
|
287
|
+
function dropLegacyClaudeHooks(hooks) {
|
|
288
|
+
if (!isPlainObject(hooks)) return;
|
|
289
|
+
for (const event of ownKeys(hooks)) {
|
|
290
|
+
const groups = hooks[event];
|
|
291
|
+
if (!Array.isArray(groups) || groups.length === 0) continue;
|
|
292
|
+
const keptGroups = [];
|
|
293
|
+
for (const group of groups) {
|
|
294
|
+
if (!isPlainObject(group) || !Array.isArray(group.hooks)) {
|
|
295
|
+
keptGroups.push(group);
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
const keptHooks = group.hooks.filter(
|
|
299
|
+
(hook) => !(isPlainObject(hook) && LEGACY_CLAUDE_HOOK_COMMANDS.has(hook.command)),
|
|
300
|
+
);
|
|
301
|
+
if (keptHooks.length === 0) continue;
|
|
302
|
+
keptGroups.push(
|
|
303
|
+
keptHooks.length === group.hooks.length ? group : { ...group, hooks: keptHooks },
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
if (keptGroups.length === 0) delete hooks[event];
|
|
307
|
+
else hooks[event] = keptGroups;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
275
311
|
/**
|
|
276
312
|
* Union `permissions.*` arrays and add preset hooks by event (deduped by `command`).
|
|
277
313
|
* Every other consumer key wins. Bare `Bash(git commit)` and `Bash(git push)` are
|
|
@@ -283,6 +319,8 @@ function mergeClaudeSettings(presetObj, existingObj) {
|
|
|
283
319
|
const merged = structuredClone(isPlainObject(existingObj) ? existingObj : {});
|
|
284
320
|
const added = { keys: [], permissions: {}, hooks: {} };
|
|
285
321
|
|
|
322
|
+
dropLegacyClaudeHooks(merged.hooks);
|
|
323
|
+
|
|
286
324
|
for (const key of ownKeys(preset)) {
|
|
287
325
|
if (key !== 'permissions' && key !== 'hooks' && !Object.hasOwn(merged, key)) {
|
|
288
326
|
merged[key] = structuredClone(preset[key]);
|
|
@@ -10,7 +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,
|
|
13
|
+
const { ENGINE_SCRIPTS, engineSourceDir } = require('./engine-scripts');
|
|
14
14
|
const { runTemplateDrift } = require('./ai-local-drift');
|
|
15
15
|
|
|
16
16
|
const LEGACY_TOOLS = ['cursor', 'claude', 'mavis', 'opencode', 'zcode'];
|
|
@@ -19,6 +19,7 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
19
19
|
'# Files written by the in-task self-learning engine and by legacy-team',
|
|
20
20
|
'# migration backups. Local safety net — never commit.',
|
|
21
21
|
'*.lock',
|
|
22
|
+
'*.lock.d/',
|
|
22
23
|
'*.tmp',
|
|
23
24
|
'.rollback/',
|
|
24
25
|
'.template-base.json',
|
|
@@ -31,6 +32,14 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
31
32
|
'team.db-wal',
|
|
32
33
|
'team.db-shm',
|
|
33
34
|
'team-db-errors.log',
|
|
35
|
+
'# Per-session slug bindings for the chain hook; runtime state, never commit.',
|
|
36
|
+
'team/.session-leases/',
|
|
37
|
+
'# Scheduler runtime state; jobs.json stays tracked (jobs as code).',
|
|
38
|
+
'team/scheduler/runs/',
|
|
39
|
+
'team/scheduler/state.json',
|
|
40
|
+
'# Per-step write-scope baselines; derived from git, never a project input.',
|
|
41
|
+
'team/.write-scope/',
|
|
42
|
+
'team/upstream/cursor.json',
|
|
34
43
|
'',
|
|
35
44
|
].join('\n');
|
|
36
45
|
const POINTER_README = `# Agent team artifacts moved
|
|
@@ -262,17 +271,6 @@ function ensureAiLocalIgnored(aiLocalRoot) {
|
|
|
262
271
|
return true;
|
|
263
272
|
}
|
|
264
273
|
|
|
265
|
-
/**
|
|
266
|
-
* Preset-root-relative directory holding the shipped engine scripts.
|
|
267
|
-
* `presetTeamSrc` is `<presetBase>/team`, so three levels up is the preset root.
|
|
268
|
-
*/
|
|
269
|
-
function engineSourceDir(presetTeamSrc) {
|
|
270
|
-
if (!presetTeamSrc) {
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
return path.resolve(presetTeamSrc, '..', '..', '..', ...ENGINE_SOURCE_RELATIVE.split('/'));
|
|
274
|
-
}
|
|
275
|
-
|
|
276
274
|
/**
|
|
277
275
|
* Seed the shipped self-learning engine (`presets/_shared/ai-local/scripts/`)
|
|
278
276
|
* into `<cwd>/.ai.local/scripts/`. Skip-if-exists: a consumer edit is never
|
|
@@ -284,7 +282,8 @@ function seedEngineScripts({ cwd, presetTeamSrc }) {
|
|
|
284
282
|
if (!presetTeamSrc) {
|
|
285
283
|
return result;
|
|
286
284
|
}
|
|
287
|
-
|
|
285
|
+
// `presetTeamSrc` is `<presetBase>/team`; three levels up is the `presets/` root.
|
|
286
|
+
const sourceDir = engineSourceDir(path.resolve(presetTeamSrc, '..', '..', '..'));
|
|
288
287
|
if (!fs.existsSync(sourceDir) || !fs.statSync(sourceDir).isDirectory()) {
|
|
289
288
|
return result;
|
|
290
289
|
}
|
|
@@ -339,6 +338,25 @@ function copyTemplates(presetTeamSrc, dest) {
|
|
|
339
338
|
written.push(`.ai.local/team/fixtures/${rel}`);
|
|
340
339
|
}
|
|
341
340
|
}
|
|
341
|
+
// Preset-owned upstream templates refresh on every init/update: a consumer edit
|
|
342
|
+
// to the permission map or the prompt must not silently defeat the contract.
|
|
343
|
+
const upstreamSrc = path.join(presetTeamSrc, 'upstream');
|
|
344
|
+
for (const name of ['prompt.md', 'digest-template.md', 'opencode.json']) {
|
|
345
|
+
const source = path.join(upstreamSrc, name);
|
|
346
|
+
if (!fs.existsSync(source)) continue;
|
|
347
|
+
copyFile(source, path.join(dest, 'upstream', name));
|
|
348
|
+
written.push(`.ai.local/team/upstream/${name}`);
|
|
349
|
+
}
|
|
350
|
+
// Consumer-owned research data seeds only when absent: the registry is the
|
|
351
|
+
// source of truth and a re-init must never overwrite it.
|
|
352
|
+
for (const name of ['projects.json', 'config.json', 'signatures.json']) {
|
|
353
|
+
const source = path.join(upstreamSrc, name);
|
|
354
|
+
if (!fs.existsSync(source)) continue;
|
|
355
|
+
const target = path.join(dest, 'upstream', name);
|
|
356
|
+
if (fs.existsSync(target)) continue;
|
|
357
|
+
copyFile(source, target);
|
|
358
|
+
written.push(`.ai.local/team/upstream/${name}`);
|
|
359
|
+
}
|
|
342
360
|
const gitkeepSrc = path.join(presetTeamSrc, 'tasks', '.gitkeep');
|
|
343
361
|
if (fs.existsSync(gitkeepSrc) && !hasConsumerTaskSlugs(path.join(dest, 'tasks'))) {
|
|
344
362
|
copyFile(gitkeepSrc, path.join(dest, 'tasks', '.gitkeep'));
|
|
@@ -671,7 +689,7 @@ function templateEntries(presetTeamSrc) {
|
|
|
671
689
|
// preset keeps precedence because it is added after this line.
|
|
672
690
|
addFile('.ai.local/rules/router-pages.md', path.join(libraryDir, 'router-pages.md'));
|
|
673
691
|
addDir('.ai.local/rules/', path.join(presetBase, 'ai-local', 'rules'), (name) => name.endsWith('.md'));
|
|
674
|
-
const engineDir = engineSourceDir(presetTeamSrc);
|
|
692
|
+
const engineDir = engineSourceDir(path.resolve(presetTeamSrc, '..', '..', '..'));
|
|
675
693
|
if (engineDir) {
|
|
676
694
|
for (const name of ENGINE_SCRIPTS) {
|
|
677
695
|
addFile(`.ai.local/scripts/${name}`, path.join(engineDir, name));
|
package/bin/mavis-install.js
CHANGED
|
@@ -269,7 +269,9 @@ function cmdInitMavis({ preset, cwdOption, helpers }) {
|
|
|
269
269
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
270
270
|
}
|
|
271
271
|
const manifest = {
|
|
272
|
-
|
|
272
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
273
|
+
// files, so `doctor` and update pruning can trust it.
|
|
274
|
+
schemaVersion: 2,
|
|
273
275
|
packageVersion: packageVersion(packageRoot),
|
|
274
276
|
platform: 'mavis',
|
|
275
277
|
preset: stack,
|
package/bin/opencode-install.js
CHANGED
|
@@ -466,7 +466,9 @@ function cmdInitOpencode({ preset, cwdOption, helpers }) {
|
|
|
466
466
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
467
467
|
}
|
|
468
468
|
const manifest = {
|
|
469
|
-
|
|
469
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
470
|
+
// files, so `doctor` and update pruning can trust it.
|
|
471
|
+
schemaVersion: 2,
|
|
470
472
|
packageVersion: packageVersion(packageRoot),
|
|
471
473
|
platform: 'opencode',
|
|
472
474
|
preset: stack,
|
package/bin/zcode-install.js
CHANGED
|
@@ -366,7 +366,9 @@ function cmdInitZcode({ preset, cwdOption, helpers }) {
|
|
|
366
366
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
367
367
|
}
|
|
368
368
|
const manifest = {
|
|
369
|
-
|
|
369
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
370
|
+
// files, so `doctor` and update pruning can trust it.
|
|
371
|
+
schemaVersion: 2,
|
|
370
372
|
packageVersion: packageVersion(packageRoot),
|
|
371
373
|
platform: 'zcode',
|
|
372
374
|
preset: stack,
|
package/docs/MAVIS.md
CHANGED
|
@@ -115,15 +115,18 @@ Desktop/CLI versions in the compatibility doc are **operator snapshots**, not pa
|
|
|
115
115
|
| [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md) | Probe evidence and go/no-go |
|
|
116
116
|
| [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
|
|
117
117
|
|
|
118
|
-
Validate after preset edits:
|
|
118
|
+
Validate after preset edits (loop):
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
121
|
cd packages/ai-rules
|
|
122
|
-
|
|
122
|
+
yarn check:changed
|
|
123
|
+
yarn check:fast
|
|
123
124
|
node scripts/check-mavis-platform-contract.mjs --self-test
|
|
124
125
|
node scripts/check-mavis-adapter-map.mjs --self-test
|
|
125
126
|
```
|
|
126
127
|
|
|
128
|
+
The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
|
|
129
|
+
|
|
127
130
|
## Released stacks
|
|
128
131
|
|
|
129
132
|
`init mavis --preset <stack>` and `init multi --preset <stack>` install Mavis for every stack in `presets/mavis/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-mavis.mjs --stack <stack>` from Cursor SoT — never from Claude.
|
package/docs/MCP-CATALOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Project MCP catalog: `init mcp`
|
|
2
2
|
|
|
3
|
-
`init mcp` writes the
|
|
3
|
+
`init mcp` writes the MCP servers this package and its `next` presets use: Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep, Sentry, Figma Desktop/Cloud, Storybook, DefectDojo, GitLab, GitHub, Yandex Tracker, and Yandex Wiki.
|
|
4
|
+
|
|
5
|
+
Three kinds of entry:
|
|
6
|
+
|
|
7
|
+
- **static stdio** — a pinned `npx` package or a local binary (Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep);
|
|
8
|
+
- **remote** — a URL the client connects to (Figma, Storybook, Sentry);
|
|
9
|
+
- **runtime** — `npx -y @bonesofspring/ai-rules@<version> mcp run <slug>` (DefectDojo, GitLab, GitHub, Yandex). These need credentials from the `mcp setup` namespace; see [Credentials](#credentials).
|
|
4
10
|
|
|
5
11
|
```bash
|
|
6
12
|
npx @bonesofspring/ai-rules@latest init mcp context7
|
|
@@ -16,12 +22,21 @@ npx @bonesofspring/ai-rules@latest init mcp --all --tools cursor,claude
|
|
|
16
22
|
| `context7` | `npx -y @upstash/context7-mcp@4.5.0` | |
|
|
17
23
|
| `playwright` | `npx -y @playwright/mcp@0.0.84` | Claude Code stores it as `playwright-test` |
|
|
18
24
|
| `chrome-devtools` | `npx -y chrome-devtools-mcp@1.12.0` | |
|
|
25
|
+
| `next-devtools` | `npx -y next-devtools-mcp@0.4.0` | Needs a running `next dev` on Next.js 16+; exposes errors, routes, logs, compilation issues |
|
|
26
|
+
| `semgrep` | `semgrep mcp` | Needs the Semgrep CLI (`brew install semgrep`); `SEMGREP_APP_TOKEN` is optional |
|
|
27
|
+
| `sentry` | `https://mcp.sentry.dev/mcp` | OAuth; scope to one org/project by editing the URL. A client without OAuth support can use the stdio form `sentry mcp` after `sentry auth login` |
|
|
19
28
|
| `figma-desktop` | `http://127.0.0.1:3845/mcp` | Alias `figma`; needs the Figma desktop app and a Dev/Full seat |
|
|
20
29
|
| `figma-cloud` | `https://mcp.figma.com/mcp` | Remote Figma server; the client handles OAuth |
|
|
30
|
+
| `storybook` | `http://localhost:6200/mcp` | Needs Storybook running; 6200 is the catalog default (edit the entry if yours is 6006) |
|
|
31
|
+
| `defectdojo` | runtime `defectdojo` | Needs `DEFECTDOJO_URL` / `DEFECTDOJO_TOKEN` in `.env.defectdojo` |
|
|
32
|
+
| `gitlab` | runtime `gitlab` | Needs `mcp setup gitlab` |
|
|
33
|
+
| `github` | runtime `github` | Needs `mcp setup github` |
|
|
34
|
+
| `yandex-tracker` | runtime `yandex-tracker` | Needs `mcp setup yandex` |
|
|
35
|
+
| `yandex-wiki` | runtime `yandex-wiki` | Needs `mcp setup yandex` |
|
|
21
36
|
|
|
22
37
|
`--all` selects every row. `figma` and `figma-desktop` resolve to the same entry.
|
|
23
38
|
|
|
24
|
-
|
|
39
|
+
For the servers the `next` presets also ship (Context7, Playwright, Chrome DevTools, Figma Desktop), pins mirror `presets/<tool>/next/mcp.json`; bump both together — `scripts/test-cli-mcp-catalog.mjs` fails when the two drift.
|
|
25
40
|
|
|
26
41
|
## What it writes
|
|
27
42
|
|
|
@@ -35,6 +50,19 @@ Pins mirror the shipped `next` presets; bump the catalog and `presets/<tool>/nex
|
|
|
35
50
|
|
|
36
51
|
Only clients detected in the project are written (`mcp.json` exists, or the install marker does). `--tools <list>` narrows the set and warns when a named client is not installed.
|
|
37
52
|
|
|
53
|
+
## Credentials
|
|
54
|
+
|
|
55
|
+
`init mcp` registers the runtime entries without credentials, so one `--all` is enough to wire every client. It prints one `next:` line per provider that has no local configuration yet:
|
|
56
|
+
|
|
57
|
+
| Provider | Where the credential comes from | Setup |
|
|
58
|
+
|----------|---------------------------------|-------|
|
|
59
|
+
| GitLab | `.ai-rules/mcp/credentials.env` (0600) or `GITLAB_TOKEN` | `ai-rules mcp setup gitlab` |
|
|
60
|
+
| GitHub | `.env.github` (project root, ignored) or `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | `ai-rules mcp setup github` |
|
|
61
|
+
| Yandex | `.ai-rules/mcp/config.env` or `YANDEX_ORG_ID` | `ai-rules mcp setup yandex` |
|
|
62
|
+
| DefectDojo | `.env.defectdojo` (project root, ignored) or `DEFECTDOJO_TOKEN` | `ai-rules mcp setup defectdojo` |
|
|
63
|
+
|
|
64
|
+
The DefectDojo token is never written by the package. `.env.defectdojo` holds `DEFECTDOJO_URL` and `DEFECTDOJO_TOKEN`; the file must be gitignored. `mcp setup defectdojo` proves the pair with `GET /api/v2/findings/` before registering.
|
|
65
|
+
|
|
38
66
|
## Merge rules
|
|
39
67
|
|
|
40
68
|
`init mcp` merges like `init`:
|
package/docs/MCP-SETUP.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# MCP setup: GitLab, GitHub, Yandex Tracker, Yandex Wiki
|
|
1
|
+
# MCP setup: GitLab, GitHub, Yandex Tracker, Yandex Wiki, DefectDojo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Four sequences. Nothing here stores a token in a client config.
|
|
4
4
|
`mcp setup` writes the exact installed version pin into the client config; the runtime is pinned even though setup runs `@latest`.
|
|
5
5
|
It registers only the clients already installed in the repository.
|
|
6
|
-
GitLab credentials live in `.ai-rules/mcp/credentials.env`; Yandex keeps only non-secret settings in `.ai-rules/mcp/config.env`; the GitHub token is read from the shell or from `.env.github` in the project root and is never written by the package.
|
|
6
|
+
GitLab credentials live in `.ai-rules/mcp/credentials.env`; Yandex keeps only non-secret settings in `.ai-rules/mcp/config.env`; the GitHub token is read from the shell or from `.env.github` in the project root and is never written by the package; the DefectDojo URL and token are read from the shell or from `.env.defectdojo` and are never written by the package.
|
|
7
7
|
All sequences are idempotent: rerun a step instead of editing a client config by hand.
|
|
8
8
|
Run the `mcp` commands below from the repository root.
|
|
9
9
|
Behind a corporate proxy, set `HTTPS_PROXY` and `NO_PROXY` for `yc` before `yc init`.
|
|
10
|
-
Prerequisites: Node 20+, an MCP client, network to your GitLab instance, to GitHub and to
|
|
10
|
+
Prerequisites: Node 20+, an MCP client, network to your GitLab instance, to GitHub, to Yandex and to DefectDojo.
|
|
11
11
|
If no MCP client is installed yet, run `npx @bonesofspring/ai-rules@latest init cursor --preset next` (or your client/stack) first; `mcp setup` registers only installed clients.
|
|
12
12
|
|
|
13
|
-
Third-party servers that need no credentials — Context7, Playwright, Chrome DevTools, Figma Desktop, Figma Cloud — are installed with `init mcp`; see [`MCP-CATALOG.md`](MCP-CATALOG.md).
|
|
13
|
+
Third-party servers that need no credentials — Context7, Playwright, Chrome DevTools, Next.js DevTools, Semgrep, Sentry (OAuth), Figma Desktop, Figma Cloud, Storybook — are installed with `init mcp`; see [`MCP-CATALOG.md`](MCP-CATALOG.md).
|
|
14
14
|
|
|
15
15
|
## 1. GitLab
|
|
16
16
|
|
|
@@ -89,6 +89,30 @@ Optional overrides in `.env.github` (or the shell): `GITHUB_MCP_URL` for a GitHu
|
|
|
89
89
|
`npx @bonesofspring/ai-rules@latest mcp refresh yandex`
|
|
90
90
|
→ expected: `Yandex IAM token refreshed` and exit 0; no token is stored.
|
|
91
91
|
|
|
92
|
+
## 4. DefectDojo
|
|
93
|
+
|
|
94
|
+
1. **Create an API token.** Open your DefectDojo profile and copy the **API v2 Key**.
|
|
95
|
+
→ expected: the key is shown once; keep it for the next step.
|
|
96
|
+
|
|
97
|
+
2. **Put the endpoint and the token in `.env.defectdojo` in the project root.**
|
|
98
|
+
`DEFECTDOJO_URL=https://defectdojo.example.com` and `DEFECTDOJO_TOKEN=<the key>`.
|
|
99
|
+
Add the file to `.gitignore`; the package never edits your root `.gitignore` and refuses to register the server while the file is not ignored.
|
|
100
|
+
An exported `DEFECTDOJO_URL` / `DEFECTDOJO_TOKEN` in the shell wins over the file.
|
|
101
|
+
For an internal CA, point `NODE_EXTRA_CA_CERTS` at the PEM bundle.
|
|
102
|
+
→ expected: the file exists with both values and is ignored by git.
|
|
103
|
+
|
|
104
|
+
3. **Register the server and run the doctor.**
|
|
105
|
+
`npx @bonesofspring/ai-rules@latest mcp setup defectdojo`
|
|
106
|
+
→ expected: `ok credentials` with `GET /api/v2/findings/ → 200`, `ok registration` per client, then `ok` doctor lines.
|
|
107
|
+
|
|
108
|
+
4. **Reconnect the client** with the client action from GitLab step 3 (`opencode reload` in OpenCode).
|
|
109
|
+
→ expected: `defectdojo` is connected and lists the `dd_*` tools.
|
|
110
|
+
|
|
111
|
+
5. **Rotate the token.** Create a new key and replace the value in `.env.defectdojo`.
|
|
112
|
+
Rerun the setup; nothing is registered until the new token validates.
|
|
113
|
+
`npx @bonesofspring/ai-rules@latest mcp setup defectdojo`
|
|
114
|
+
→ expected: the new token is validated; the server reconnects with it.
|
|
115
|
+
|
|
92
116
|
## Diagnostics
|
|
93
117
|
|
|
94
|
-
`mcp doctor` without a provider covers **every** managed-pack provider (GitLab, GitHub, Yandex Tracker, Yandex Wiki) and exits non-zero while any of them is not ready — a provider you registered but never configured fails the report with one actionable next step. Scope it with `mcp doctor <gitlab|github|yandex>` when you want one provider only.
|
|
118
|
+
`mcp doctor` without a provider covers **every** managed-pack provider (GitLab, GitHub, Yandex Tracker, Yandex Wiki, DefectDojo) and exits non-zero while any of them is not ready — a provider you registered but never configured fails the report with one actionable next step. Scope it with `mcp doctor <gitlab|github|yandex|defectdojo>` when you want one provider only.
|
package/docs/OPENCODE.md
CHANGED
|
@@ -75,7 +75,7 @@ File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
|
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
printf '%s\n' '{"status":"completed","attemptId":"<from-status.json>"}' \
|
|
78
|
-
| bash .opencode/hooks/chain-team-phases.sh
|
|
78
|
+
| TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Human gates pause with `awaitingHumanGate: true`. Resume with `/task-continue`. There is **no** shipped `hooks.json` or OpenCode plugin in v1.
|
|
@@ -101,11 +101,31 @@ Labels from official OpenCode docs (live CLI probe not yet run). Full matrix: [`
|
|
|
101
101
|
| `.opencode/agents` / `skills` / `commands` | **confirmed** (docs) | Native discovery |
|
|
102
102
|
| `opencode.json` MCP | **confirmed** (docs) | Merge `mcp` |
|
|
103
103
|
| Glob / alwaysApply rules | **no-equivalent** | Lazy Read catalog under `.opencode/rules/` |
|
|
104
|
-
| `hooks.json` / subagentStop | **manual** | `bash .opencode/hooks/chain-team-phases.sh` after receipts; no plugin in v1 |
|
|
104
|
+
| `hooks.json` / subagentStop | **manual** | `TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh` after receipts; no plugin in v1 |
|
|
105
105
|
| Native Team lifecycle | **partial** | File pipeline is SoT; hook is single lifecycle writer |
|
|
106
106
|
|
|
107
107
|
Do not pin OpenCode CLI or TUI versions in the contract.
|
|
108
108
|
|
|
109
|
+
## Upstream research agent
|
|
110
|
+
|
|
111
|
+
The `next` preset ships a read-only agent for the `upstream-research` job at
|
|
112
|
+
`.ai.local/team/upstream/opencode.json` (source:
|
|
113
|
+
`presets/cursor/next/team/upstream/opencode.json`). It is refreshed on every `init`/`update`,
|
|
114
|
+
so a consumer cannot widen it by editing the installed copy.
|
|
115
|
+
|
|
116
|
+
- `agent.upstream-researcher` has `mode: "subagent"`.
|
|
117
|
+
- `permission` starts with `"*": "deny"`, so the agent has no tool at all: MCP servers installed by the same project (`chrome-devtools`, `playwright`, `context7`, `figma`) and custom tools resolve as `<server>_<tool>` and are denied by the same wildcard. The named rows stay as a second line of defence: `edit`/`bash`/`read`/`glob`/`grep`/`list` are `{"*": "deny"}`; `webfetch`, `websearch`, `task`, and `external_directory` are `deny`. The shell deny stops a write around the edit deny; the wildcard and the read/fetch/subagent denies keep untrusted upstream content from reaching a secret or a network destination. The agent needs no tool: the prompt arrives as an attached `--file` message and the runner verifies evidence itself.
|
|
118
|
+
- Before phase 1 the runner resolves the installed agent with `opencode debug agents` and refuses to start a project unless the global `*` and every named action still resolve to `deny` on resource `*` under last-match-wins (`E_AGENT_CONFIG_INVALID`, exit 12). The probe also asserts a synthetic non-built-in name, so a config that enumerates only the ten built-ins fails. A discovered config that appends an allow after the preset deny is caught here, not by a file grep.
|
|
119
|
+
- The job invokes `opencode run --agent upstream-researcher --format json --archived --auto`
|
|
120
|
+
with the child `cwd` set to the team `upstream/` directory; that nested config is the only
|
|
121
|
+
selector, because this build has no `--dir`.
|
|
122
|
+
- `--worktree` is never passed: the research is read-only.
|
|
123
|
+
- `--auto` cannot widen an explicit `deny`; the runner also compares `git status --porcelain`
|
|
124
|
+
in the repository before and after each call (`E_WORKTREE_CHANGED`) and inside the reviewed
|
|
125
|
+
clone (`E_UPSTREAM_DIRTY`).
|
|
126
|
+
|
|
127
|
+
The agent is not a first-class preset agent: it has no `agents/**` mirror and no adapter-map
|
|
128
|
+
row; the job asserts its resolved rules with `opencode debug agents` before the first project.
|
|
109
129
|
## Local overlay
|
|
110
130
|
|
|
111
131
|
`.ai.local/rules/*.md` at repo root (or monorepo parents) override preset rules. See [`LOCAL-OVERLAY.md`](./LOCAL-OVERLAY.md).
|
|
@@ -119,15 +139,18 @@ Do not pin OpenCode CLI or TUI versions in the contract.
|
|
|
119
139
|
| [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md) | Evidence and go/no-go |
|
|
120
140
|
| [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
|
|
121
141
|
|
|
122
|
-
Validate after preset edits:
|
|
142
|
+
Validate after preset edits (loop):
|
|
123
143
|
|
|
124
144
|
```bash
|
|
125
145
|
cd packages/ai-rules
|
|
126
|
-
|
|
146
|
+
yarn check:changed
|
|
147
|
+
yarn check:fast
|
|
127
148
|
node scripts/check-opencode-platform-contract.mjs --self-test
|
|
128
149
|
node scripts/check-opencode-adapter-map.mjs --self-test
|
|
129
150
|
```
|
|
130
151
|
|
|
152
|
+
The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
|
|
153
|
+
|
|
131
154
|
## Released stacks
|
|
132
155
|
|
|
133
156
|
`init opencode --preset <stack>` and `init multi --preset <stack>` install OpenCode for every stack in `presets/opencode/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules and `permission.edit` allow-lists live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-opencode.mjs --stack <stack>` from Cursor SoT — never from Claude.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Platform support
|
|
2
|
+
|
|
3
|
+
Scope: `@bonesofspring/ai-rules` — the `ai-rules` CLI, the presets it installs (rules, agents, commands, hook registrations), and the self-learning engine seeded into `.ai.local/scripts/`.
|
|
4
|
+
|
|
5
|
+
macOS and Linux are fully supported. Windows is supported with the prerequisites below. The GitHub Actions full gate runs on ubuntu; the `platform-smoke` workflow adds a macOS and a Windows leg for the CLI, the engine suites, and the line-ending and bash-syntax gate.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
| Tool | Status | Notes |
|
|
10
|
+
|------|--------|-------|
|
|
11
|
+
| Node.js | required, **>= 20** | The whole package declares `engines.node: ">=20"`. The `mcp` command already refuses older runtimes, and the install doctor reports the floor. |
|
|
12
|
+
| Node.js for the `team-db` SQLite projection | **>= 22.13** | `team-db.mjs` uses `node:sqlite`. Below 22.13 the projection degrades to file-only with one diagnostic line; the rest of the engine keeps working. |
|
|
13
|
+
| `git` | required | Install state, generated-file drift, and every gate read the work tree through `git`. |
|
|
14
|
+
| `bash` | required for the chain hook only | The Cursor/Claude guard and the hook resolver run through Node. `chain-team-phases.sh` itself is still a bash script. |
|
|
15
|
+
| `perl` | not required | The engine lock is a sibling directory `<lock>.d` (`mkdir` + `owner.json`), so the same path excludes every process on a shared checkout. No `flock` helper and no shell, so a runtime without `perl` is not a slower path. |
|
|
16
|
+
|
|
17
|
+
### Windows `bash`
|
|
18
|
+
|
|
19
|
+
Install **Git Bash**. The installer puts `bash.exe` in `Git\bin`, which is **not** added to the default Windows `PATH` (`Git\cmd` is). A consumer shell that runs the chain hook may need `C:\Program Files\Git\bin` on `PATH`; the hook resolver also probes the standard Git install locations. Git Bash is the documented prerequisite for contributors running the repository gates.
|
|
20
|
+
|
|
21
|
+
## Feature matrix
|
|
22
|
+
|
|
23
|
+
| Feature | macOS | Linux | Windows |
|
|
24
|
+
|---------|-------|-------|---------|
|
|
25
|
+
| `init`, `update`, `clean`, `doctor` | yes | yes | yes |
|
|
26
|
+
| Cursor / Claude guard hook (Node `.mjs` registered through `node`) | yes | yes | yes |
|
|
27
|
+
| `chain-team-phases.sh` | yes (bash) | yes (bash) | yes (Git Bash) |
|
|
28
|
+
| Self-learning engine — `run.mjs`, `signals.mjs`, `manifest.mjs`, `rule-improver.mjs` | yes | yes | yes |
|
|
29
|
+
| `team-db` projection | SQLite on Node 22.13+; file-only below | SQLite on Node 22.13+; file-only below | SQLite on Node 22.13+; file-only below |
|
|
30
|
+
| `team-db` scheduler | POSIX process groups: a timeout terminates the whole group | POSIX process groups: a timeout terminates the whole group | Single process only — no group kill; a child that spawns its own children may outlive a timeout. A `.cmd` job is launched through `cmd.exe` with minimal argument quoting; avoid embedded double quotes in `jobs.json` argv |
|
|
31
|
+
|
|
32
|
+
## Contributors
|
|
33
|
+
|
|
34
|
+
The repository gates (`packages/ai-rules/scripts/*.sh`, `yarn check:preset-structure`) require `bash` and `python3`. On Windows, run them from Git Bash, which provides `bash`; `python3` is a separate install — Git for Windows does not bundle it. The Node suites (`node --test`, the `test:*` scripts) run on any supported Node version on all three systems.
|
|
35
|
+
|
|
36
|
+
## Upgrading from a bash guard
|
|
37
|
+
|
|
38
|
+
Cursor and Claude stacks previously registered `.cursor/hooks/guard-shell-command.sh` and `.claude/hooks/guard-shell-command.sh`. The guard now ships as a Node `.mjs` file, so those old bash files are no longer registered. `init` does not delete a path it no longer manages, so an upgraded consumer tree keeps the orphaned `.sh` file. It is inert; delete it manually after upgrading.
|