@bonesofspring/ai-rules 0.2.80 → 0.2.86
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 +70 -0
- package/bin/lib/merged-config.js +49 -0
- package/bin/lib/seed-ai-local-team.js +2 -0
- package/bin/mavis-install.js +53 -3
- package/docs/MAVIS-COMPATIBILITY.md +136 -8
- package/docs/PRESET-CONTRIBUTION.md +25 -7
- package/docs/TEAM-DB.md +76 -3
- package/docs/openapi/team-db.v1.json +7069 -5895
- package/package.json +8 -2
- package/presets/_shared/ai-local/scripts/check-task-repositories.mjs +20 -2
- package/presets/_shared/ai-local/scripts/check-verification.mjs +13 -6
- package/presets/_shared/ai-local/scripts/rr-migrate-repositories.mjs +66 -16
- package/presets/_shared/ai-local/scripts/run-compact.mjs +38 -10
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +253 -15
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +310 -4
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +733 -8
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +44 -0
- package/presets/_shared/ai-local/scripts/team-db.mjs +43 -3
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -0
- package/presets/_shared/core/review/code-review-mr.md +19 -4
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +40 -0
- package/presets/_shared/hooks/compact-shell-output.mjs +16 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.md +5 -1
- package/presets/claude/android-kotlin/commands/update.md +1 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/android-kotlin/skills/code-review/SKILL.md +2 -1
- package/presets/claude/go/agents/code-reviewer.md +5 -1
- package/presets/claude/go/commands/update.md +1 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/go/skills/code-review/SKILL.md +2 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +5 -1
- package/presets/claude/ios-swift/commands/update.md +1 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/ios-swift/skills/code-review/SKILL.md +2 -1
- package/presets/claude/java/agents/code-reviewer.md +5 -1
- package/presets/claude/java/commands/update.md +1 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/java/skills/code-review/SKILL.md +2 -1
- package/presets/claude/mcp-ts/commands/update.md +1 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/mol/REPO_AGENTS.md +1 -1
- package/presets/claude/mol/agents/code-reviewer.md +5 -1
- package/presets/claude/mol/agents/task-router.md +1 -1
- package/presets/claude/mol/commands/update.md +1 -0
- package/presets/claude/mol/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/mol/rules/tooling-and-review/code-review-mr.md +19 -4
- package/presets/claude/mol/skills/code-review/SKILL.md +2 -1
- package/presets/claude/next/REPO_AGENTS.md +1 -1
- package/presets/claude/next/agents/build-verifier.md +2 -1
- package/presets/claude/next/agents/code-reviewer.md +5 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/task-router.md +1 -1
- package/presets/claude/next/commands/update.md +1 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +19 -4
- package/presets/claude/next/skills/code-review/SKILL.md +2 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +5 -1
- package/presets/claude/nuxt/agents/task-router.md +1 -1
- package/presets/claude/nuxt/commands/update.md +1 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +19 -4
- package/presets/claude/nuxt/skills/code-review/SKILL.md +2 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +5 -1
- package/presets/claude/php-hexagonal/commands/update.md +1 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +2 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +5 -1
- package/presets/claude/php-laravel/commands/update.md +1 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +19 -4
- package/presets/claude/php-laravel/skills/code-review/SKILL.md +2 -1
- package/presets/claude/svelte/agents/code-reviewer.md +5 -1
- package/presets/claude/svelte/agents/task-router.md +1 -1
- package/presets/claude/svelte/commands/update.md +1 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +40 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +19 -4
- package/presets/claude/svelte/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +5 -1
- package/presets/cursor/android-kotlin/commands/update.md +1 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/android-kotlin/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/go/agents/code-reviewer.md +5 -1
- package/presets/cursor/go/commands/update.md +1 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/go/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/go/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +5 -1
- package/presets/cursor/ios-swift/commands/update.md +1 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/ios-swift/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/ios-swift/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/java/agents/code-reviewer.md +5 -1
- package/presets/cursor/java/commands/update.md +1 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/java/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/java/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/java/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/mcp-ts/commands/update.md +1 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/mcp-ts/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/mol/REPO_AGENTS.md +1 -1
- package/presets/cursor/mol/agents/code-reviewer.md +5 -1
- package/presets/cursor/mol/agents/task-router.md +1 -1
- package/presets/cursor/mol/commands/update.md +1 -0
- package/presets/cursor/mol/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/mol/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/mol/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/mol/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/next/REPO_AGENTS.md +1 -1
- package/presets/cursor/next/agents/build-verifier.md +2 -1
- package/presets/cursor/next/agents/code-reviewer.md +5 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/task-router.md +1 -1
- package/presets/cursor/next/commands/update.md +1 -0
- package/presets/cursor/next/hooks/README.md +2 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/next/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/next/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/nuxt/agents/code-reviewer.md +5 -1
- package/presets/cursor/nuxt/agents/task-router.md +1 -1
- package/presets/cursor/nuxt/commands/update.md +1 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/nuxt/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/nuxt/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +5 -1
- package/presets/cursor/php-hexagonal/commands/update.md +1 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/php-hexagonal/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +5 -1
- package/presets/cursor/php-laravel/commands/update.md +1 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/php-laravel/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/php-laravel/skills/code-review/SKILL.md +2 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +5 -1
- package/presets/cursor/svelte/agents/task-router.md +1 -1
- package/presets/cursor/svelte/commands/update.md +1 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +40 -0
- package/presets/cursor/svelte/hooks/compact-shell-output.mjs +16 -1
- package/presets/cursor/svelte/rules/code-review-mr.mdc +19 -4
- package/presets/cursor/svelte/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/android-kotlin/MAVIS.md +9 -3
- package/presets/mavis/android-kotlin/README.md +3 -1
- package/presets/mavis/android-kotlin/adapter-map.json +104 -44
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +5 -1
- package/presets/mavis/android-kotlin/commands/update.md +1 -0
- package/presets/mavis/android-kotlin/hooks/README.md +29 -7
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/android-kotlin/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/android-kotlin/hooks/run-hook.mjs +103 -0
- package/presets/mavis/android-kotlin/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/android-kotlin/native-skills/README.md +15 -0
- package/presets/mavis/android-kotlin/native-skills/ci-investigation/SKILL.md +53 -0
- package/presets/mavis/android-kotlin/native-skills/code-review/SKILL.md +62 -0
- package/presets/mavis/android-kotlin/native-skills/debug-investigation/SKILL.md +72 -0
- package/presets/mavis/android-kotlin/native-skills/feature-delivery/SKILL.md +51 -0
- package/presets/mavis/android-kotlin/native-skills/instrumentation-ui-e2e/SKILL.md +23 -0
- package/presets/mavis/android-kotlin/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/android-kotlin/native-skills/mockup-review/SKILL.md +34 -0
- package/presets/mavis/android-kotlin/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/android-kotlin/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/android-kotlin/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/android-kotlin/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/android-kotlin/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/android-kotlin/native-skills/task/SKILL.md +79 -0
- package/presets/mavis/android-kotlin/native-skills/task-continue/SKILL.md +74 -0
- package/presets/mavis/android-kotlin/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/android-kotlin/native-skills/unit-testing/SKILL.md +38 -0
- package/presets/mavis/android-kotlin/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/android-kotlin/native-skills/ux-design/SKILL.md +41 -0
- package/presets/mavis/android-kotlin/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +19 -4
- package/presets/mavis/android-kotlin/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/go/MAVIS.md +9 -3
- package/presets/mavis/go/README.md +3 -1
- package/presets/mavis/go/adapter-map.json +94 -40
- package/presets/mavis/go/agents/code-reviewer.md +5 -1
- package/presets/mavis/go/commands/update.md +1 -0
- package/presets/mavis/go/hooks/README.md +29 -7
- package/presets/mavis/go/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/go/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/go/hooks/run-hook.mjs +103 -0
- package/presets/mavis/go/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/go/native-skills/README.md +15 -0
- package/presets/mavis/go/native-skills/ci-investigation/SKILL.md +24 -0
- package/presets/mavis/go/native-skills/code-review/SKILL.md +48 -0
- package/presets/mavis/go/native-skills/debug-investigation/SKILL.md +55 -0
- package/presets/mavis/go/native-skills/feature-delivery/SKILL.md +43 -0
- package/presets/mavis/go/native-skills/integration-testing/SKILL.md +21 -0
- package/presets/mavis/go/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/go/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/go/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/go/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/go/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/go/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/go/native-skills/task/SKILL.md +77 -0
- package/presets/mavis/go/native-skills/task-continue/SKILL.md +72 -0
- package/presets/mavis/go/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/go/native-skills/unit-testing/SKILL.md +20 -0
- package/presets/mavis/go/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/go/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/go/rules/code-review-mr.md +19 -4
- package/presets/mavis/go/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/ios-swift/MAVIS.md +9 -3
- package/presets/mavis/ios-swift/README.md +3 -1
- package/presets/mavis/ios-swift/adapter-map.json +104 -44
- package/presets/mavis/ios-swift/agents/code-reviewer.md +5 -1
- package/presets/mavis/ios-swift/commands/update.md +1 -0
- package/presets/mavis/ios-swift/hooks/README.md +29 -7
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/ios-swift/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/ios-swift/hooks/run-hook.mjs +103 -0
- package/presets/mavis/ios-swift/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/ios-swift/native-skills/README.md +15 -0
- package/presets/mavis/ios-swift/native-skills/ci-investigation/SKILL.md +53 -0
- package/presets/mavis/ios-swift/native-skills/code-review/SKILL.md +62 -0
- package/presets/mavis/ios-swift/native-skills/debug-investigation/SKILL.md +72 -0
- package/presets/mavis/ios-swift/native-skills/feature-delivery/SKILL.md +51 -0
- package/presets/mavis/ios-swift/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/ios-swift/native-skills/mockup-review/SKILL.md +34 -0
- package/presets/mavis/ios-swift/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/ios-swift/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/ios-swift/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/ios-swift/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/ios-swift/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/ios-swift/native-skills/task/SKILL.md +79 -0
- package/presets/mavis/ios-swift/native-skills/task-continue/SKILL.md +74 -0
- package/presets/mavis/ios-swift/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/ios-swift/native-skills/unit-testing/SKILL.md +38 -0
- package/presets/mavis/ios-swift/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/ios-swift/native-skills/ux-design/SKILL.md +41 -0
- package/presets/mavis/ios-swift/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/ios-swift/native-skills/xcuitest-e2e/SKILL.md +39 -0
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/ios-swift/rules/code-review-mr.md +19 -4
- package/presets/mavis/ios-swift/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/java/MAVIS.md +9 -3
- package/presets/mavis/java/README.md +3 -1
- package/presets/mavis/java/adapter-map.json +94 -40
- package/presets/mavis/java/agents/code-reviewer.md +5 -1
- package/presets/mavis/java/commands/update.md +1 -0
- package/presets/mavis/java/hooks/README.md +29 -7
- package/presets/mavis/java/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/java/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/java/hooks/run-hook.mjs +103 -0
- package/presets/mavis/java/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/java/native-skills/README.md +15 -0
- package/presets/mavis/java/native-skills/ci-investigation/SKILL.md +24 -0
- package/presets/mavis/java/native-skills/code-review/SKILL.md +48 -0
- package/presets/mavis/java/native-skills/debug-investigation/SKILL.md +55 -0
- package/presets/mavis/java/native-skills/feature-delivery/SKILL.md +43 -0
- package/presets/mavis/java/native-skills/integration-testing/SKILL.md +21 -0
- package/presets/mavis/java/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/java/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/java/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/java/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/java/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/java/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/java/native-skills/task/SKILL.md +77 -0
- package/presets/mavis/java/native-skills/task-continue/SKILL.md +72 -0
- package/presets/mavis/java/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/java/native-skills/unit-testing/SKILL.md +20 -0
- package/presets/mavis/java/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/java/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/java/rules/code-review-mr.md +19 -4
- package/presets/mavis/java/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/mcp-ts/MAVIS.md +9 -3
- package/presets/mavis/mcp-ts/README.md +3 -1
- package/presets/mavis/mcp-ts/adapter-map.json +77 -32
- package/presets/mavis/mcp-ts/commands/update.md +1 -0
- package/presets/mavis/mcp-ts/hooks/README.md +29 -7
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/mcp-ts/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/mcp-ts/hooks/run-hook.mjs +103 -0
- package/presets/mavis/mcp-ts/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/mcp-ts/native-skills/README.md +15 -0
- package/presets/mavis/mcp-ts/native-skills/code-review/SKILL.md +31 -0
- package/presets/mavis/mcp-ts/native-skills/debug-investigation/SKILL.md +51 -0
- package/presets/mavis/mcp-ts/native-skills/feature-delivery/SKILL.md +42 -0
- package/presets/mavis/mcp-ts/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/mcp-ts/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/mcp-ts/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/mcp-ts/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/mcp-ts/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/mcp-ts/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/mcp-ts/native-skills/task/SKILL.md +77 -0
- package/presets/mavis/mcp-ts/native-skills/task-continue/SKILL.md +72 -0
- package/presets/mavis/mcp-ts/native-skills/technical-retro/SKILL.md +95 -0
- package/presets/mavis/mcp-ts/native-skills/unit-testing/SKILL.md +22 -0
- package/presets/mavis/mcp-ts/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +19 -4
- package/presets/mavis/mol/MAVIS.md +9 -3
- package/presets/mavis/mol/README.md +3 -1
- package/presets/mavis/mol/REPO_AGENTS.md +1 -1
- package/presets/mavis/mol/adapter-map.json +94 -40
- package/presets/mavis/mol/agents/code-reviewer.md +5 -1
- package/presets/mavis/mol/agents/task-router.md +1 -1
- package/presets/mavis/mol/commands/update.md +1 -0
- package/presets/mavis/mol/hooks/README.md +29 -7
- package/presets/mavis/mol/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/mol/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/mol/hooks/run-hook.mjs +103 -0
- package/presets/mavis/mol/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/mol/native-skills/README.md +15 -0
- package/presets/mavis/mol/native-skills/ci-investigation/SKILL.md +49 -0
- package/presets/mavis/mol/native-skills/code-review/SKILL.md +61 -0
- package/presets/mavis/mol/native-skills/debug-investigation/SKILL.md +63 -0
- package/presets/mavis/mol/native-skills/feature-delivery/SKILL.md +44 -0
- package/presets/mavis/mol/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/mol/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/mol/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/mol/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/mol/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/mol/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/mol/native-skills/task/SKILL.md +82 -0
- package/presets/mavis/mol/native-skills/task-continue/SKILL.md +74 -0
- package/presets/mavis/mol/native-skills/task-evil/SKILL.md +89 -0
- package/presets/mavis/mol/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/mol/native-skills/unit-testing/SKILL.md +38 -0
- package/presets/mavis/mol/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/mol/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/mol/rules/code-review-mr.md +19 -4
- package/presets/mavis/mol/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/next/MAVIS.md +9 -3
- package/presets/mavis/next/README.md +3 -1
- package/presets/mavis/next/REPO_AGENTS.md +1 -1
- package/presets/mavis/next/adapter-map.json +128 -53
- package/presets/mavis/next/agents/build-verifier.md +2 -1
- package/presets/mavis/next/agents/code-reviewer.md +5 -1
- package/presets/mavis/next/agents/feature-developer.md +1 -1
- package/presets/mavis/next/agents/task-router.md +1 -1
- package/presets/mavis/next/commands/update.md +1 -0
- package/presets/mavis/next/hooks/README.md +29 -7
- package/presets/mavis/next/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/next/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/next/hooks/run-hook.mjs +103 -0
- package/presets/mavis/next/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/next/native-skills/README.md +15 -0
- package/presets/mavis/next/native-skills/ci-investigation/SKILL.md +50 -0
- package/presets/mavis/next/native-skills/code-review/SKILL.md +62 -0
- package/presets/mavis/next/native-skills/debug-investigation/SKILL.md +64 -0
- package/presets/mavis/next/native-skills/feature-delivery/SKILL.md +45 -0
- package/presets/mavis/next/native-skills/figma-fidelity/SKILL.md +131 -0
- package/presets/mavis/next/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/next/native-skills/mockup-review/SKILL.md +44 -0
- package/presets/mavis/next/native-skills/playwright-e2e/SKILL.md +39 -0
- package/presets/mavis/next/native-skills/react-performance/SKILL.md +49 -0
- package/presets/mavis/next/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/next/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/next/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/next/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/next/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/next/native-skills/task/SKILL.md +88 -0
- package/presets/mavis/next/native-skills/task-continue/SKILL.md +87 -0
- package/presets/mavis/next/native-skills/task-evil/SKILL.md +89 -0
- package/presets/mavis/next/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/next/native-skills/ui-start/SKILL.md +64 -0
- package/presets/mavis/next/native-skills/ui-stop/SKILL.md +48 -0
- package/presets/mavis/next/native-skills/unit-testing/SKILL.md +40 -0
- package/presets/mavis/next/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/next/native-skills/ux-design/SKILL.md +41 -0
- package/presets/mavis/next/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/next/rules/code-review-mr.md +19 -4
- package/presets/mavis/next/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/nuxt/MAVIS.md +9 -3
- package/presets/mavis/nuxt/README.md +3 -1
- package/presets/mavis/nuxt/adapter-map.json +109 -46
- package/presets/mavis/nuxt/agents/code-reviewer.md +5 -1
- package/presets/mavis/nuxt/agents/task-router.md +1 -1
- package/presets/mavis/nuxt/commands/update.md +1 -0
- package/presets/mavis/nuxt/hooks/README.md +29 -7
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/nuxt/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/nuxt/hooks/run-hook.mjs +103 -0
- package/presets/mavis/nuxt/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/nuxt/native-skills/README.md +15 -0
- package/presets/mavis/nuxt/native-skills/ci-investigation/SKILL.md +50 -0
- package/presets/mavis/nuxt/native-skills/code-review/SKILL.md +61 -0
- package/presets/mavis/nuxt/native-skills/debug-investigation/SKILL.md +64 -0
- package/presets/mavis/nuxt/native-skills/feature-delivery/SKILL.md +52 -0
- package/presets/mavis/nuxt/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/nuxt/native-skills/mockup-review/SKILL.md +34 -0
- package/presets/mavis/nuxt/native-skills/playwright-e2e/SKILL.md +43 -0
- package/presets/mavis/nuxt/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/nuxt/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/nuxt/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/nuxt/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/nuxt/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/nuxt/native-skills/task/SKILL.md +79 -0
- package/presets/mavis/nuxt/native-skills/task-continue/SKILL.md +74 -0
- package/presets/mavis/nuxt/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/nuxt/native-skills/unit-testing/SKILL.md +38 -0
- package/presets/mavis/nuxt/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/nuxt/native-skills/ux-design/SKILL.md +41 -0
- package/presets/mavis/nuxt/native-skills/vue-performance/SKILL.md +58 -0
- package/presets/mavis/nuxt/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/nuxt/rules/code-review-mr.md +19 -4
- package/presets/mavis/nuxt/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/php-hexagonal/MAVIS.md +9 -3
- package/presets/mavis/php-hexagonal/README.md +3 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +94 -40
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +5 -1
- package/presets/mavis/php-hexagonal/commands/update.md +1 -0
- package/presets/mavis/php-hexagonal/hooks/README.md +29 -7
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/php-hexagonal/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/php-hexagonal/hooks/run-hook.mjs +103 -0
- package/presets/mavis/php-hexagonal/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/php-hexagonal/native-skills/README.md +15 -0
- package/presets/mavis/php-hexagonal/native-skills/ci-investigation/SKILL.md +24 -0
- package/presets/mavis/php-hexagonal/native-skills/code-review/SKILL.md +48 -0
- package/presets/mavis/php-hexagonal/native-skills/debug-investigation/SKILL.md +55 -0
- package/presets/mavis/php-hexagonal/native-skills/feature-delivery/SKILL.md +43 -0
- package/presets/mavis/php-hexagonal/native-skills/integration-testing/SKILL.md +21 -0
- package/presets/mavis/php-hexagonal/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/php-hexagonal/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/php-hexagonal/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/php-hexagonal/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/php-hexagonal/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/php-hexagonal/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/php-hexagonal/native-skills/task/SKILL.md +77 -0
- package/presets/mavis/php-hexagonal/native-skills/task-continue/SKILL.md +72 -0
- package/presets/mavis/php-hexagonal/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/php-hexagonal/native-skills/unit-testing/SKILL.md +20 -0
- package/presets/mavis/php-hexagonal/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/php-hexagonal/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +19 -4
- package/presets/mavis/php-hexagonal/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/php-laravel/MAVIS.md +9 -3
- package/presets/mavis/php-laravel/README.md +3 -1
- package/presets/mavis/php-laravel/adapter-map.json +94 -40
- package/presets/mavis/php-laravel/agents/code-reviewer.md +5 -1
- package/presets/mavis/php-laravel/commands/update.md +1 -0
- package/presets/mavis/php-laravel/hooks/README.md +29 -7
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/php-laravel/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/php-laravel/hooks/run-hook.mjs +103 -0
- package/presets/mavis/php-laravel/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/php-laravel/native-skills/README.md +15 -0
- package/presets/mavis/php-laravel/native-skills/ci-investigation/SKILL.md +24 -0
- package/presets/mavis/php-laravel/native-skills/code-review/SKILL.md +48 -0
- package/presets/mavis/php-laravel/native-skills/debug-investigation/SKILL.md +55 -0
- package/presets/mavis/php-laravel/native-skills/feature-delivery/SKILL.md +43 -0
- package/presets/mavis/php-laravel/native-skills/integration-testing/SKILL.md +21 -0
- package/presets/mavis/php-laravel/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/php-laravel/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/php-laravel/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/php-laravel/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/php-laravel/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/php-laravel/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/php-laravel/native-skills/task/SKILL.md +77 -0
- package/presets/mavis/php-laravel/native-skills/task-continue/SKILL.md +72 -0
- package/presets/mavis/php-laravel/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/php-laravel/native-skills/unit-testing/SKILL.md +20 -0
- package/presets/mavis/php-laravel/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/php-laravel/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/php-laravel/rules/code-review-mr.md +19 -4
- package/presets/mavis/php-laravel/skills/code-review/SKILL.md +2 -1
- package/presets/mavis/platform-contract.json +18 -5
- package/presets/mavis/svelte/MAVIS.md +9 -3
- package/presets/mavis/svelte/README.md +3 -1
- package/presets/mavis/svelte/adapter-map.json +109 -46
- package/presets/mavis/svelte/agents/code-reviewer.md +5 -1
- package/presets/mavis/svelte/agents/task-router.md +1 -1
- package/presets/mavis/svelte/commands/update.md +1 -0
- package/presets/mavis/svelte/hooks/README.md +29 -7
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +40 -0
- package/presets/mavis/svelte/hooks/mavis-chain-hook.mjs +143 -0
- package/presets/mavis/svelte/hooks/run-hook.mjs +103 -0
- package/presets/mavis/svelte/minimax-hooks/hooks.json +28 -0
- package/presets/mavis/svelte/native-skills/README.md +15 -0
- package/presets/mavis/svelte/native-skills/ci-investigation/SKILL.md +50 -0
- package/presets/mavis/svelte/native-skills/code-review/SKILL.md +61 -0
- package/presets/mavis/svelte/native-skills/debug-investigation/SKILL.md +64 -0
- package/presets/mavis/svelte/native-skills/feature-delivery/SKILL.md +52 -0
- package/presets/mavis/svelte/native-skills/migrate-tasks/SKILL.md +43 -0
- package/presets/mavis/svelte/native-skills/mockup-review/SKILL.md +34 -0
- package/presets/mavis/svelte/native-skills/playwright-e2e/SKILL.md +43 -0
- package/presets/mavis/svelte/native-skills/rr-migrate-repositories/SKILL.md +61 -0
- package/presets/mavis/svelte/native-skills/rr-scheduler-start/SKILL.md +34 -0
- package/presets/mavis/svelte/native-skills/spec-authoring/SKILL.md +31 -0
- package/presets/mavis/svelte/native-skills/spec-discovery/SKILL.md +63 -0
- package/presets/mavis/svelte/native-skills/spec-start/SKILL.md +31 -0
- package/presets/mavis/svelte/native-skills/svelte-performance/SKILL.md +57 -0
- package/presets/mavis/svelte/native-skills/task/SKILL.md +79 -0
- package/presets/mavis/svelte/native-skills/task-continue/SKILL.md +74 -0
- package/presets/mavis/svelte/native-skills/technical-retro/SKILL.md +72 -0
- package/presets/mavis/svelte/native-skills/unit-testing/SKILL.md +38 -0
- package/presets/mavis/svelte/native-skills/update/SKILL.md +44 -0
- package/presets/mavis/svelte/native-skills/ux-design/SKILL.md +41 -0
- package/presets/mavis/svelte/native-skills/write-adr/SKILL.md +46 -0
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -0
- package/presets/mavis/svelte/rules/code-review-mr.md +19 -4
- package/presets/mavis/svelte/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +5 -1
- package/presets/opencode/android-kotlin/commands/update.md +1 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +19 -4
- package/presets/opencode/android-kotlin/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +5 -1
- package/presets/opencode/go/commands/update.md +1 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/go/rules/code-review-mr.md +19 -4
- package/presets/opencode/go/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +5 -1
- package/presets/opencode/ios-swift/commands/update.md +1 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/ios-swift/rules/code-review-mr.md +19 -4
- package/presets/opencode/ios-swift/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +5 -1
- package/presets/opencode/java/commands/update.md +1 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/java/rules/code-review-mr.md +19 -4
- package/presets/opencode/java/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/commands/update.md +1 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +19 -4
- package/presets/opencode/mol/REPO_AGENTS.md +1 -1
- package/presets/opencode/mol/adapter-map.json +1 -1
- package/presets/opencode/mol/agents/code-reviewer.md +5 -1
- package/presets/opencode/mol/agents/task-router.md +1 -1
- package/presets/opencode/mol/commands/update.md +1 -0
- package/presets/opencode/mol/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/mol/rules/code-review-mr.md +19 -4
- package/presets/opencode/mol/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/next/REPO_AGENTS.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/build-verifier.md +2 -1
- package/presets/opencode/next/agents/code-reviewer.md +5 -1
- package/presets/opencode/next/agents/feature-developer.md +1 -1
- package/presets/opencode/next/agents/task-router.md +1 -1
- package/presets/opencode/next/commands/update.md +1 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/next/rules/code-review-mr.md +19 -4
- package/presets/opencode/next/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +5 -1
- package/presets/opencode/nuxt/agents/task-router.md +1 -1
- package/presets/opencode/nuxt/commands/update.md +1 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/nuxt/rules/code-review-mr.md +19 -4
- package/presets/opencode/nuxt/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +5 -1
- package/presets/opencode/php-hexagonal/commands/update.md +1 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +19 -4
- package/presets/opencode/php-hexagonal/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +5 -1
- package/presets/opencode/php-laravel/commands/update.md +1 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/php-laravel/rules/code-review-mr.md +19 -4
- package/presets/opencode/php-laravel/skills/code-review/SKILL.md +2 -1
- package/presets/opencode/plugins/task-status/README.md +4 -3
- package/presets/opencode/plugins/task-status/deepseek.ts +68 -34
- package/presets/opencode/plugins/task-status/task-view.ts +4 -1
- package/presets/opencode/plugins/task-status/tui.tsx +16 -18
- package/presets/opencode/plugins/task-status/types.ts +5 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +5 -1
- package/presets/opencode/svelte/agents/task-router.md +1 -1
- package/presets/opencode/svelte/commands/update.md +1 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +40 -0
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -0
- package/presets/opencode/svelte/rules/code-review-mr.md +19 -4
- package/presets/opencode/svelte/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/android-kotlin/adapter-map.json +1 -1
- package/presets/zcode/android-kotlin/agents/code-reviewer.md +5 -1
- package/presets/zcode/android-kotlin/commands/update.md +1 -0
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/android-kotlin/rules/code-review-mr.md +19 -4
- package/presets/zcode/android-kotlin/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/go/adapter-map.json +1 -1
- package/presets/zcode/go/agents/code-reviewer.md +5 -1
- package/presets/zcode/go/commands/update.md +1 -0
- package/presets/zcode/go/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/go/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/go/rules/code-review-mr.md +19 -4
- package/presets/zcode/go/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/ios-swift/adapter-map.json +1 -1
- package/presets/zcode/ios-swift/agents/code-reviewer.md +5 -1
- package/presets/zcode/ios-swift/commands/update.md +1 -0
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/ios-swift/rules/code-review-mr.md +19 -4
- package/presets/zcode/ios-swift/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/java/adapter-map.json +1 -1
- package/presets/zcode/java/agents/code-reviewer.md +5 -1
- package/presets/zcode/java/commands/update.md +1 -0
- package/presets/zcode/java/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/java/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/java/rules/code-review-mr.md +19 -4
- package/presets/zcode/java/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/mcp-ts/adapter-map.json +1 -1
- package/presets/zcode/mcp-ts/commands/update.md +1 -0
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/mcp-ts/rules/code-review-mr.md +19 -4
- package/presets/zcode/mol/REPO_AGENTS.md +1 -1
- package/presets/zcode/mol/adapter-map.json +1 -1
- package/presets/zcode/mol/agents/code-reviewer.md +5 -1
- package/presets/zcode/mol/agents/task-router.md +1 -1
- package/presets/zcode/mol/commands/update.md +1 -0
- package/presets/zcode/mol/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/mol/rules/code-review-mr.md +19 -4
- package/presets/zcode/mol/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/next/REPO_AGENTS.md +1 -1
- package/presets/zcode/next/adapter-map.json +1 -1
- package/presets/zcode/next/agents/build-verifier.md +2 -1
- package/presets/zcode/next/agents/code-reviewer.md +5 -1
- package/presets/zcode/next/agents/feature-developer.md +1 -1
- package/presets/zcode/next/agents/task-router.md +1 -1
- package/presets/zcode/next/commands/update.md +1 -0
- package/presets/zcode/next/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/next/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/next/rules/code-review-mr.md +19 -4
- package/presets/zcode/next/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/nuxt/adapter-map.json +1 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +5 -1
- package/presets/zcode/nuxt/agents/task-router.md +1 -1
- package/presets/zcode/nuxt/commands/update.md +1 -0
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/nuxt/rules/code-review-mr.md +19 -4
- package/presets/zcode/nuxt/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
- package/presets/zcode/php-hexagonal/agents/code-reviewer.md +5 -1
- package/presets/zcode/php-hexagonal/commands/update.md +1 -0
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/php-hexagonal/rules/code-review-mr.md +19 -4
- package/presets/zcode/php-hexagonal/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/php-laravel/adapter-map.json +1 -1
- package/presets/zcode/php-laravel/agents/code-reviewer.md +5 -1
- package/presets/zcode/php-laravel/commands/update.md +1 -0
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/php-laravel/rules/code-review-mr.md +19 -4
- package/presets/zcode/php-laravel/skills/code-review/SKILL.md +2 -1
- package/presets/zcode/svelte/adapter-map.json +1 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +5 -1
- package/presets/zcode/svelte/agents/task-router.md +1 -1
- package/presets/zcode/svelte/commands/update.md +1 -0
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +40 -0
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +1 -0
- package/presets/zcode/svelte/rules/code-review-mr.md +19 -4
- package/presets/zcode/svelte/skills/code-review/SKILL.md +2 -1
|
@@ -108,6 +108,9 @@ export const TRACKER_QUEUE_BODY_MAX = 1024;
|
|
|
108
108
|
export const REPOSITORY_BODY_MAX = 16384;
|
|
109
109
|
export const REPOSITORY_WRITE_CHILD_TIMEOUT_MS = 10000;
|
|
110
110
|
export const REPOSITORY_DELETE_CHILD_TIMEOUT_MS = 30000;
|
|
111
|
+
export const PROJECT_BODY_MAX = 16384;
|
|
112
|
+
export const PROJECT_WRITE_CHILD_TIMEOUT_MS = 10000;
|
|
113
|
+
export const PROJECT_DELETE_CHILD_TIMEOUT_MS = 30000;
|
|
111
114
|
export const TRACKER_WRITE_CHILD_TIMEOUT_MS = 10000;
|
|
112
115
|
export const TRACKER_DELETE_CHILD_TIMEOUT_MS = 30000;
|
|
113
116
|
export const TRACKER_DEFAULT_LIMIT = 50;
|
|
@@ -156,6 +159,7 @@ const CODE_STATUS_ROWS = [
|
|
|
156
159
|
['E_ACTIVE_TASK', 409],
|
|
157
160
|
['E_CONFLICT', 409],
|
|
158
161
|
['E_REPOSITORY_IN_USE', 409],
|
|
162
|
+
['E_PROJECT_IN_USE', 409],
|
|
159
163
|
['E_SCHEDULER_OFFLINE', 409],
|
|
160
164
|
['E_RANGE', 416],
|
|
161
165
|
['E_DISABLED', 503],
|
|
@@ -206,14 +210,31 @@ const TASK_REPOSITORY_FILTER = `
|
|
|
206
210
|
)
|
|
207
211
|
)`;
|
|
208
212
|
|
|
213
|
+
/**
|
|
214
|
+
* The project filter of the task list (D1 = derive): a task belongs to a
|
|
215
|
+
* project iff it is linked to at least one member repository. A second
|
|
216
|
+
* separate fragment beside the repository one — the twelve statements that
|
|
217
|
+
* share bare `TASK_FILTER` and their nine binds stay untouched, and only
|
|
218
|
+
* `listTasks` / `countTasks` carry this. An empty slot is "no filter"; a
|
|
219
|
+
* well-shaped unknown id filters to an empty page, never an error.
|
|
220
|
+
*/
|
|
221
|
+
const TASK_PROJECT_FILTER = `
|
|
222
|
+
AND (
|
|
223
|
+
?11 = '' OR EXISTS (
|
|
224
|
+
SELECT 1 FROM project_repositories pr
|
|
225
|
+
JOIN task_repositories tr ON tr.repository_id = pr.repository_id
|
|
226
|
+
WHERE pr.project_id = ?11 AND tr.task_slug = t.slug
|
|
227
|
+
)
|
|
228
|
+
)`;
|
|
229
|
+
|
|
209
230
|
const TASK_ORDER = `
|
|
210
231
|
ORDER BY
|
|
211
|
-
CASE ?
|
|
212
|
-
CASE ?
|
|
213
|
-
CASE ?
|
|
214
|
-
CASE ?
|
|
215
|
-
CASE ?
|
|
216
|
-
CASE ?
|
|
232
|
+
CASE ?12 WHEN 'slug' THEN t.slug END ASC NULLS LAST,
|
|
233
|
+
CASE ?12 WHEN '-slug' THEN t.slug END DESC NULLS LAST,
|
|
234
|
+
CASE ?12 WHEN 'updatedAt' THEN t.updated_at END ASC NULLS LAST,
|
|
235
|
+
CASE ?12 WHEN '-updatedAt' THEN t.updated_at END DESC NULLS LAST,
|
|
236
|
+
CASE ?12 WHEN 'startAt' THEN t.start_at END ASC NULLS LAST,
|
|
237
|
+
CASE ?12 WHEN '-startAt' THEN t.start_at END DESC NULLS LAST,
|
|
217
238
|
t.slug ASC`;
|
|
218
239
|
|
|
219
240
|
const ATTEMPT_ORDER = `
|
|
@@ -272,9 +293,9 @@ const SQL = {
|
|
|
272
293
|
(SELECT CASE WHEN json_valid(d.content) THEN json_extract(d.content, '$.task.platform') END
|
|
273
294
|
FROM documents d WHERE d.task_slug = t.slug AND d.path = 'metrics.json') AS platform
|
|
274
295
|
FROM tasks t
|
|
275
|
-
WHERE ${TASK_FILTER}${TASK_REPOSITORY_FILTER}${TASK_ORDER}
|
|
276
|
-
LIMIT ?
|
|
277
|
-
countTasks: `SELECT count(*) AS total FROM tasks t WHERE ${TASK_FILTER}${TASK_REPOSITORY_FILTER}`,
|
|
296
|
+
WHERE ${TASK_FILTER}${TASK_REPOSITORY_FILTER}${TASK_PROJECT_FILTER}${TASK_ORDER}
|
|
297
|
+
LIMIT ?13 OFFSET ?14`,
|
|
298
|
+
countTasks: `SELECT count(*) AS total FROM tasks t WHERE ${TASK_FILTER}${TASK_REPOSITORY_FILTER}${TASK_PROJECT_FILTER}`,
|
|
278
299
|
getTask: `SELECT
|
|
279
300
|
t.slug, t.title, t.intent, t.profile, t.spec_mode, t.state, t.phase,
|
|
280
301
|
t.pipeline_index, t.current_agent, t.awaiting_human_gate, t.updated_at,
|
|
@@ -357,6 +378,15 @@ const SQL = {
|
|
|
357
378
|
getRepository: `SELECT r.*,
|
|
358
379
|
(SELECT count(*) FROM task_repositories tr WHERE tr.repository_id = r.id) AS linked_task_count
|
|
359
380
|
FROM repositories r WHERE r.id = ?1 AND r.absent_at IS NULL`,
|
|
381
|
+
listProjects: `SELECT p.* FROM projects p WHERE p.absent_at IS NULL
|
|
382
|
+
ORDER BY p.status, p.name COLLATE NOCASE, p.id
|
|
383
|
+
LIMIT ?1 OFFSET ?2`,
|
|
384
|
+
countProjects: 'SELECT count(*) AS total FROM projects p WHERE p.absent_at IS NULL',
|
|
385
|
+
getProject: 'SELECT p.* FROM projects p WHERE p.id = ?1 AND p.absent_at IS NULL',
|
|
386
|
+
listProjectRepositories: `SELECT r.id, r.name, r.status
|
|
387
|
+
FROM project_repositories pr JOIN repositories r ON r.id = pr.repository_id
|
|
388
|
+
WHERE pr.project_id = ?1 AND r.absent_at IS NULL
|
|
389
|
+
ORDER BY r.name COLLATE NOCASE, r.id`,
|
|
360
390
|
eventCounts: `SELECT type, count(*) AS count FROM events WHERE task_slug = ?1 GROUP BY type ORDER BY type`,
|
|
361
391
|
attemptsByAgent: `SELECT agent, count(*) AS attempts, COALESCE(SUM(duration_ms), 0) AS duration
|
|
362
392
|
FROM attempts WHERE task_slug = ?1 GROUP BY agent ORDER BY duration DESC, agent ASC`,
|
|
@@ -724,12 +754,14 @@ const taskFilters = (db, query, includeAbsentDefault = false) => {
|
|
|
724
754
|
if (from && to && from > to) fail('E_VALIDATION', 422, 'from must not be later than to', { parameter: 'from' });
|
|
725
755
|
const q = parseQuery(query.get('q'), 'q');
|
|
726
756
|
const repository = parsePattern(query.get('repository'), 'repository', slugPattern, 48);
|
|
757
|
+
const project = parsePattern(query.get('project'), 'project', slugPattern, 48);
|
|
727
758
|
// An active search with no matches is an empty result set, not "no filter".
|
|
728
759
|
const searchActive = q === '' ? 0 : 1;
|
|
729
760
|
const slugs = searchActive === 1 ? searchSlugs(db, q) : [];
|
|
730
761
|
return {
|
|
731
762
|
includeAbsent,
|
|
732
763
|
repository,
|
|
764
|
+
project,
|
|
733
765
|
params: [includeAbsent ? 1 : 0, JSON.stringify(states), agent, intent, profile, from, to, searchActive, JSON.stringify(slugs)],
|
|
734
766
|
};
|
|
735
767
|
};
|
|
@@ -791,11 +823,12 @@ const listTasks = (db, query) => {
|
|
|
791
823
|
const limit = parseInteger(query.get('limit'), 'limit', { min: 1, max: MAX_LIMIT, fallback: DEFAULT_LIMIT });
|
|
792
824
|
const offset = parseInteger(query.get('offset'), 'offset', { min: 0, max: MAX_OFFSET, fallback: 0 });
|
|
793
825
|
const sort = parseEnum(query.get('sort'), 'sort', SORT_VALUE_SET, '-updatedAt');
|
|
794
|
-
const { params, repository } = taskFilters(db, query);
|
|
795
|
-
// Contiguous slots: `?1..?9` filters, `?10` repository, `?11`
|
|
796
|
-
// `?12`/`?
|
|
797
|
-
|
|
798
|
-
const
|
|
826
|
+
const { params, repository, project } = taskFilters(db, query);
|
|
827
|
+
// Contiguous slots: `?1..?9` filters, `?10` repository, `?11` project,
|
|
828
|
+
// `?12` sort, `?13`/`?14` the page. A gap makes `node:sqlite` refuse the
|
|
829
|
+
// statement.
|
|
830
|
+
const rows = db.prepare(SQL.listTasks).all(...params, repository, project, sort, limit, offset);
|
|
831
|
+
const total = Number(db.prepare(SQL.countTasks).get(...params, repository, project).total);
|
|
799
832
|
return page(rows.map(taskRow), total, limit, offset);
|
|
800
833
|
};
|
|
801
834
|
|
|
@@ -2341,7 +2374,180 @@ const deleteRepository = async (context) => {
|
|
|
2341
2374
|
}
|
|
2342
2375
|
fail(mapTeamDbCode(code), mapTeamDbCode(code, true), String(result.message ?? `removing ${id} was refused`));
|
|
2343
2376
|
}
|
|
2344
|
-
return {
|
|
2377
|
+
return {
|
|
2378
|
+
json: {
|
|
2379
|
+
ok: true,
|
|
2380
|
+
id: String(result.id ?? id),
|
|
2381
|
+
linksRemoved: Number(result.linksRemoved ?? 0),
|
|
2382
|
+
// The project-registry cleanup the same write performed (the
|
|
2383
|
+
// resurrection guard): how many memberships named this repository.
|
|
2384
|
+
membersRemoved: Number(result.membersRemoved ?? 0),
|
|
2385
|
+
},
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
|
|
2389
|
+
/* --------------------------------- projects -------------------------------- */
|
|
2390
|
+
|
|
2391
|
+
const parseProjectId = (value) => {
|
|
2392
|
+
if (typeof value !== 'string' || value.length > 48 || !slugPattern.test(value)) {
|
|
2393
|
+
fail('E_VALIDATION', 422, 'the project id has an invalid shape', { parameter: 'id' });
|
|
2394
|
+
}
|
|
2395
|
+
return value;
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2398
|
+
const projectRow = (row) => ({
|
|
2399
|
+
id: row.id,
|
|
2400
|
+
name: row.name,
|
|
2401
|
+
description: row.description ?? null,
|
|
2402
|
+
status: row.status,
|
|
2403
|
+
revision: row.revision,
|
|
2404
|
+
createdAt: row.created_at,
|
|
2405
|
+
updatedAt: row.updated_at,
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* The read/write asymmetry of the repositories block, mirrored: a read answers
|
|
2410
|
+
* `ProjectSummary` — the record plus its member refs — because the list row,
|
|
2411
|
+
* the delete dialog's N and the repository-detail reverse block all read the
|
|
2412
|
+
* member array; a write answers plain `Project`, because membership is not a
|
|
2413
|
+
* property of the stored record.
|
|
2414
|
+
*/
|
|
2415
|
+
const projectSummaryRow = (db, row) => ({
|
|
2416
|
+
...projectRow(row),
|
|
2417
|
+
repositories: db.prepare(SQL.listProjectRepositories).all(row.id).map((ref) => ({
|
|
2418
|
+
id: ref.id,
|
|
2419
|
+
name: ref.name,
|
|
2420
|
+
status: ref.status,
|
|
2421
|
+
})),
|
|
2422
|
+
});
|
|
2423
|
+
|
|
2424
|
+
const listProjects = (db, query) => {
|
|
2425
|
+
const limit = parseInteger(query.get('limit'), 'limit', { min: 1, max: MAX_LIMIT, fallback: DEFAULT_LIMIT });
|
|
2426
|
+
const offset = parseInteger(query.get('offset'), 'offset', { min: 0, max: MAX_OFFSET, fallback: 0 });
|
|
2427
|
+
const rows = db.prepare(SQL.listProjects).all(limit, offset);
|
|
2428
|
+
const total = Number(db.prepare(SQL.countProjects).get().total);
|
|
2429
|
+
return page(rows.map((row) => projectSummaryRow(db, row)), total, limit, offset);
|
|
2430
|
+
};
|
|
2431
|
+
|
|
2432
|
+
const requireProjectRow = (db, id) => {
|
|
2433
|
+
const row = db.prepare(SQL.getProject).get(id);
|
|
2434
|
+
if (!row) fail('E_NOT_FOUND', 404, `no project "${id}" in the projection`);
|
|
2435
|
+
return row;
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
const getProjectDetail = (db, id) => projectSummaryRow(db, requireProjectRow(db, id));
|
|
2439
|
+
|
|
2440
|
+
const projectBody = (context) => {
|
|
2441
|
+
const text = context.body.toString('utf8').trim();
|
|
2442
|
+
if (text === '') fail('E_VALIDATION', 422, 'a project body is required', { parameter: 'body' });
|
|
2443
|
+
let parsed;
|
|
2444
|
+
try {
|
|
2445
|
+
parsed = JSON.parse(text);
|
|
2446
|
+
} catch {
|
|
2447
|
+
fail('E_VALIDATION', 422, 'the project body is not valid JSON', { parameter: 'body' });
|
|
2448
|
+
}
|
|
2449
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
2450
|
+
fail('E_VALIDATION', 422, 'the project body must be an object', { parameter: 'body' });
|
|
2451
|
+
}
|
|
2452
|
+
return parsed;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* `POST` creates the body's `id`; `PUT` refuses a body id that differs from
|
|
2457
|
+
* the path id. Both write one record through the lock-guarded child; the
|
|
2458
|
+
* answer is the child's own record, verbatim.
|
|
2459
|
+
*/
|
|
2460
|
+
const createOrUpdateProject = async (context, mode) => {
|
|
2461
|
+
const parsed = projectBody(context);
|
|
2462
|
+
const pathId = mode === 'update' ? parseProjectId(context.params.id) : null;
|
|
2463
|
+
if (mode === 'update' && parsed.id !== undefined && parsed.id !== pathId) {
|
|
2464
|
+
fail('E_CONFLICT', 409, 'the body id differs from the path id; the id is immutable');
|
|
2465
|
+
}
|
|
2466
|
+
if (mode === 'create') {
|
|
2467
|
+
const existing = parsed.id === undefined ? null : context.db().prepare(SQL.getProject).get(parsed.id);
|
|
2468
|
+
if (existing) fail('E_CONFLICT', 409, `a project with the id "${parsed.id}" already exists`);
|
|
2469
|
+
}
|
|
2470
|
+
const body = JSON.stringify(mode === 'update' ? { ...parsed, id: pathId } : parsed);
|
|
2471
|
+
const result = await runTeamDbChild(['projects', 'put', '--file', '-'], {
|
|
2472
|
+
settings: context.settings,
|
|
2473
|
+
timeoutMs: PROJECT_WRITE_CHILD_TIMEOUT_MS,
|
|
2474
|
+
input: body,
|
|
2475
|
+
label: 'project write',
|
|
2476
|
+
});
|
|
2477
|
+
if (result.ok !== true) {
|
|
2478
|
+
const code = typeof result.code === 'string' ? result.code : 'E_INTERNAL';
|
|
2479
|
+
const details = typeof result.parameter === 'string' ? { parameter: result.parameter } : undefined;
|
|
2480
|
+
fail(mapTeamDbCode(code), mapTeamDbCode(code, true), String(result.message ?? 'the project write was refused'), details);
|
|
2481
|
+
}
|
|
2482
|
+
return { json: result.project, status: mode === 'create' ? 201 : 200 };
|
|
2483
|
+
};
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* The D3 delete guard: `N > 0` without `force` answers 409
|
|
2487
|
+
* `E_PROJECT_IN_USE` with `details.memberRepositories = N`; `force` removes
|
|
2488
|
+
* the record and only its memberships in the same write — the repositories
|
|
2489
|
+
* and their tasks stay.
|
|
2490
|
+
*/
|
|
2491
|
+
const deleteProject = async (context) => {
|
|
2492
|
+
const id = parseProjectId(context.params.id);
|
|
2493
|
+
requireProjectRow(context.db(), id);
|
|
2494
|
+
const force = parseBoolean(context.query.get('force'), 'force', false);
|
|
2495
|
+
const revision = context.query.get('revision') === null
|
|
2496
|
+
? undefined
|
|
2497
|
+
: parseInteger(context.query.get('revision'), 'revision', { min: 1, max: 2_147_483_647, fallback: undefined });
|
|
2498
|
+
const args = ['projects', 'delete', id];
|
|
2499
|
+
if (force) args.push('--force');
|
|
2500
|
+
if (revision !== undefined) args.push('--revision', String(revision));
|
|
2501
|
+
const result = await runTeamDbChild(args, {
|
|
2502
|
+
settings: context.settings,
|
|
2503
|
+
timeoutMs: PROJECT_DELETE_CHILD_TIMEOUT_MS,
|
|
2504
|
+
label: 'project delete',
|
|
2505
|
+
});
|
|
2506
|
+
if (result.ok !== true) {
|
|
2507
|
+
const code = typeof result.code === 'string' ? result.code : 'E_INTERNAL';
|
|
2508
|
+
if (code === 'E_PROJECT_IN_USE') {
|
|
2509
|
+
fail('E_PROJECT_IN_USE', 409, String(result.message ?? `removing ${id} was refused`), {
|
|
2510
|
+
memberRepositories: Number(result.memberRepositories ?? 0),
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
fail(mapTeamDbCode(code), mapTeamDbCode(code, true), String(result.message ?? `removing ${id} was refused`));
|
|
2514
|
+
}
|
|
2515
|
+
return { json: { ok: true, id: String(result.id ?? id), membersRemoved: Number(result.membersRemoved ?? 0) } };
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2518
|
+
/**
|
|
2519
|
+
* One membership write, add or remove, as a bounded child. The route
|
|
2520
|
+
* pre-checks both endpoints and the pair against the projection so the
|
|
2521
|
+
* documented codes are exact (404 unknown endpoint or non-member pair, 409
|
|
2522
|
+
* duplicate pair); the child's own refusals stay the backstop for races.
|
|
2523
|
+
* Both return the updated `ProjectSummary` the child read from the projection,
|
|
2524
|
+
* so the UI updates the section in place without a refetch.
|
|
2525
|
+
*/
|
|
2526
|
+
const membershipProject = async (context, mode) => {
|
|
2527
|
+
const projectId = parseProjectId(context.params.id);
|
|
2528
|
+
const repositoryId = parseRepositoryId(context.params.repositoryId);
|
|
2529
|
+
const db = context.db();
|
|
2530
|
+
requireProjectRow(db, projectId);
|
|
2531
|
+
requireRepositoryRow(db, repositoryId);
|
|
2532
|
+
const pair = db
|
|
2533
|
+
.prepare('SELECT 1 AS member FROM project_repositories WHERE project_id = ?1 AND repository_id = ?2')
|
|
2534
|
+
.get(projectId, repositoryId);
|
|
2535
|
+
if (mode === 'link' && pair) {
|
|
2536
|
+
fail('E_CONFLICT', 409, `"${repositoryId}" is already a member of "${projectId}"`);
|
|
2537
|
+
}
|
|
2538
|
+
if (mode === 'unlink' && !pair) {
|
|
2539
|
+
fail('E_NOT_FOUND', 404, `"${repositoryId}" is not a member of "${projectId}"`);
|
|
2540
|
+
}
|
|
2541
|
+
const result = await runTeamDbChild(['projects', mode, projectId, repositoryId], {
|
|
2542
|
+
settings: context.settings,
|
|
2543
|
+
timeoutMs: PROJECT_WRITE_CHILD_TIMEOUT_MS,
|
|
2544
|
+
label: `project membership ${mode}`,
|
|
2545
|
+
});
|
|
2546
|
+
if (result.ok !== true) {
|
|
2547
|
+
const code = typeof result.code === 'string' ? result.code : 'E_INTERNAL';
|
|
2548
|
+
fail(mapTeamDbCode(code), mapTeamDbCode(code, true), String(result.message ?? 'the membership write was refused'));
|
|
2549
|
+
}
|
|
2550
|
+
return { json: result.project };
|
|
2345
2551
|
};
|
|
2346
2552
|
|
|
2347
2553
|
/**
|
|
@@ -3334,6 +3540,33 @@ export const ROUTES = [
|
|
|
3334
3540
|
route('DELETE', '/api/v1/repositories/{id}', 'deleteRepository', (context) => deleteRepository(context), {
|
|
3335
3541
|
bodyLimit: MAX_REQUEST_BODY_BYTES,
|
|
3336
3542
|
}),
|
|
3543
|
+
// The project entries: three paths, seven operations. Both path parameters
|
|
3544
|
+
// are contract slug ids, so no `pathPatterns` entry is needed.
|
|
3545
|
+
route('GET', '/api/v1/projects', 'listProjects', (context) => ({
|
|
3546
|
+
json: listProjects(context.db(), context.query),
|
|
3547
|
+
})),
|
|
3548
|
+
route('POST', '/api/v1/projects', 'createProject', (context) => createOrUpdateProject(context, 'create'), {
|
|
3549
|
+
bodyLimit: PROJECT_BODY_MAX,
|
|
3550
|
+
requireJson: true,
|
|
3551
|
+
}),
|
|
3552
|
+
route('GET', '/api/v1/projects/{id}', 'getProject', (context) => ({
|
|
3553
|
+
json: getProjectDetail(context.db(), parseProjectId(context.params.id)),
|
|
3554
|
+
})),
|
|
3555
|
+
route('PUT', '/api/v1/projects/{id}', 'updateProject', (context) => createOrUpdateProject(context, 'update'), {
|
|
3556
|
+
bodyLimit: PROJECT_BODY_MAX,
|
|
3557
|
+
requireJson: true,
|
|
3558
|
+
}),
|
|
3559
|
+
route('DELETE', '/api/v1/projects/{id}', 'deleteProject', (context) => deleteProject(context), {
|
|
3560
|
+
bodyLimit: MAX_REQUEST_BODY_BYTES,
|
|
3561
|
+
}),
|
|
3562
|
+
route('POST', '/api/v1/projects/{id}/repositories/{repositoryId}', 'addProjectRepository', (context) =>
|
|
3563
|
+
membershipProject(context, 'link'), {
|
|
3564
|
+
bodyLimit: MAX_REQUEST_BODY_BYTES,
|
|
3565
|
+
}),
|
|
3566
|
+
route('DELETE', '/api/v1/projects/{id}/repositories/{repositoryId}', 'removeProjectRepository', (context) =>
|
|
3567
|
+
membershipProject(context, 'unlink'), {
|
|
3568
|
+
bodyLimit: MAX_REQUEST_BODY_BYTES,
|
|
3569
|
+
}),
|
|
3337
3570
|
// The tracker entries: `/api/v1/tracker/queue` sits before
|
|
3338
3571
|
// `/api/v1/tracker/{id}` so the `{id}` pattern can never shadow the literal
|
|
3339
3572
|
// `queue` segment — the same discipline that keeps `/api/v1/jobs/{id}` from
|
|
@@ -3476,6 +3709,11 @@ const sendError = (req, res, error) => {
|
|
|
3476
3709
|
|
|
3477
3710
|
const mapTeamDbCode = (code, asStatus = false) => {
|
|
3478
3711
|
if (code === 'E_DB_BUSY' || code === 'E_DEADLINE') return asStatus ? 503 : 'E_BUSY';
|
|
3712
|
+
// The projects lock has its own CLI code; the contract maps a busy registry
|
|
3713
|
+
// to one transport refusal, so a held `.project-registry.lock` is a 503
|
|
3714
|
+
// `E_BUSY`, never an internal error. (`E_REPOSITORIES_BUSY` predates this
|
|
3715
|
+
// branch and is deliberately left untouched.)
|
|
3716
|
+
if (code === 'E_PROJECTS_BUSY') return asStatus ? 503 : 'E_BUSY';
|
|
3479
3717
|
if (code === 'E_SQLITE_UNAVAILABLE') return asStatus ? 503 : 'E_DB_MISSING';
|
|
3480
3718
|
if (code === 'E_USAGE') return asStatus ? 500 : 'E_INTERNAL';
|
|
3481
3719
|
if (CODE_STATUS.has(code)) return asStatus ? CODE_STATUS.get(code) : code;
|