@bonesofspring/ai-rules 0.2.11 → 0.2.12
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 +30 -0
- package/README.md +5 -1
- package/bin/cli.js +4 -0
- package/package.json +1 -1
- package/presets/_shared/README.md +1 -1
- package/presets/_shared/core/agent-team/agent-task-metrics.md +30 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +9 -1
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +5 -5
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +4 -0
- package/presets/_shared/core/review/technical-retro.md +2 -0
- package/presets/claude/go/agents/build-verifier.md +2 -2
- package/presets/claude/go/agents/task-router.md +4 -0
- package/presets/claude/go/commands/task-continue.md +17 -16
- package/presets/claude/go/commands/task.md +4 -0
- package/presets/claude/go/commands/technical-retro.md +4 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +226 -26
- package/presets/claude/go/rules/README.md +6 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +4 -0
- package/presets/claude/go/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/go/team/README.md +8 -0
- package/presets/claude/ios-swift/agents/build-verifier.md +3 -3
- package/presets/claude/ios-swift/agents/task-router.md +4 -0
- package/presets/claude/ios-swift/commands/task-continue.md +17 -16
- package/presets/claude/ios-swift/commands/task.md +4 -0
- package/presets/claude/ios-swift/commands/technical-retro.md +4 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +226 -26
- package/presets/claude/ios-swift/rules/README.md +6 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +4 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/ios-swift/team/README.md +8 -0
- package/presets/claude/java/agents/build-verifier.md +3 -3
- package/presets/claude/java/agents/task-router.md +4 -0
- package/presets/claude/java/commands/task-continue.md +17 -16
- package/presets/claude/java/commands/task.md +4 -0
- package/presets/claude/java/commands/technical-retro.md +4 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +226 -26
- package/presets/claude/java/rules/README.md +6 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +4 -0
- package/presets/claude/java/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/java/team/README.md +8 -0
- package/presets/claude/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/claude/mcp-ts/agents/task-router.md +4 -0
- package/presets/claude/mcp-ts/commands/task-continue.md +21 -20
- package/presets/claude/mcp-ts/commands/task.md +4 -0
- package/presets/claude/mcp-ts/commands/technical-retro.md +4 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +226 -26
- package/presets/claude/mcp-ts/rules/README.md +6 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +4 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +2 -4
- package/presets/claude/mcp-ts/team/README.md +8 -0
- package/presets/claude/next/agents/build-verifier.md +3 -3
- package/presets/claude/next/agents/task-router.md +4 -0
- package/presets/claude/next/commands/task-continue.md +17 -16
- package/presets/claude/next/commands/task.md +4 -0
- package/presets/claude/next/commands/technical-retro.md +4 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +226 -26
- package/presets/claude/next/rules/README.md +6 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +4 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +5 -5
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +4 -0
- package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/next/team/README.md +19 -0
- package/presets/claude/php-hexagonal/CLAUDE.md +31 -0
- package/presets/claude/php-hexagonal/MCP.md +15 -0
- package/presets/claude/php-hexagonal/README.md +26 -0
- package/presets/claude/php-hexagonal/REPO_AGENTS.md +46 -0
- package/presets/claude/php-hexagonal/agents/README.md +32 -0
- package/presets/claude/php-hexagonal/agents/api-contract-reviewer.md +23 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +45 -0
- package/presets/claude/php-hexagonal/agents/ci-investigator.md +21 -0
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +40 -0
- package/presets/claude/php-hexagonal/agents/codebase-analyzer.md +28 -0
- package/presets/claude/php-hexagonal/agents/debugger.md +29 -0
- package/presets/claude/php-hexagonal/agents/feature-developer.md +47 -0
- package/presets/claude/php-hexagonal/agents/integration-test-generator.md +22 -0
- package/presets/claude/php-hexagonal/agents/integration-test-healer.md +22 -0
- package/presets/claude/php-hexagonal/agents/integration-test-planner.md +22 -0
- package/presets/claude/php-hexagonal/agents/migration-specialist.md +31 -0
- package/presets/claude/php-hexagonal/agents/performance-auditor.md +22 -0
- package/presets/claude/php-hexagonal/agents/qa-tester.md +24 -0
- package/presets/claude/php-hexagonal/agents/security-reviewer.md +20 -0
- package/presets/claude/php-hexagonal/agents/solution-architect.md +28 -0
- package/presets/claude/php-hexagonal/agents/task-analyst.md +25 -0
- package/presets/claude/php-hexagonal/agents/task-router.md +73 -0
- package/presets/claude/php-hexagonal/agents/tech-writer.md +15 -0
- package/presets/claude/php-hexagonal/agents/unit-test-generator.md +21 -0
- package/presets/claude/php-hexagonal/agents/unit-test-healer.md +13 -0
- package/presets/claude/php-hexagonal/agents/unit-test-planner.md +26 -0
- package/presets/claude/php-hexagonal/commands/README.md +13 -0
- package/presets/claude/php-hexagonal/commands/feature-continue.md +51 -0
- package/presets/claude/php-hexagonal/commands/feature-start.md +30 -0
- package/presets/claude/php-hexagonal/commands/task-continue.md +50 -0
- package/presets/claude/php-hexagonal/commands/task.md +53 -0
- package/presets/claude/php-hexagonal/commands/technical-retro.md +62 -0
- package/presets/claude/php-hexagonal/hooks/README.md +16 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +582 -0
- package/presets/claude/php-hexagonal/hooks/examples/README.md +18 -0
- package/presets/claude/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
- package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +80 -0
- package/presets/claude/php-hexagonal/mcp.json +11 -0
- package/presets/claude/php-hexagonal/rules/README.md +67 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/README.md +14 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driven.md +38 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/adapters-driving.md +38 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/api-grpc.md +29 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/api-http.md +36 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/messaging-adapters.md +37 -0
- package/presets/claude/php-hexagonal/rules/api-and-data/persistence-adapters.md +33 -0
- package/presets/claude/php-hexagonal/rules/architecture/README.md +16 -0
- package/presets/claude/php-hexagonal/rules/architecture/application-usecases.md +31 -0
- package/presets/claude/php-hexagonal/rules/architecture/boundaries.md +34 -0
- package/presets/claude/php-hexagonal/rules/architecture/composition-root.md +33 -0
- package/presets/claude/php-hexagonal/rules/architecture/domain-layer.md +37 -0
- package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +53 -0
- package/presets/claude/php-hexagonal/rules/architecture/module-public-api.md +31 -0
- package/presets/claude/php-hexagonal/rules/architecture/ports-interfaces.md +34 -0
- package/presets/claude/php-hexagonal/rules/architecture/reference-features.md +39 -0
- package/presets/claude/php-hexagonal/rules/stack/README.md +10 -0
- package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +35 -0
- package/presets/claude/php-hexagonal/rules/stack/php-conventions.md +51 -0
- package/presets/claude/php-hexagonal/rules/testing/README.md +11 -0
- package/presets/claude/php-hexagonal/rules/testing/e2e.md +35 -0
- package/presets/claude/php-hexagonal/rules/testing/integration.md +31 -0
- package/presets/claude/php-hexagonal/rules/testing/unit.md +32 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/README.md +21 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +26 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +183 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +53 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +60 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/design-guidance.md +111 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/php-tooling.md +39 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/post-change-test.md +31 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +50 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/security-php.md +29 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +22 -0
- package/presets/claude/php-hexagonal/rules/ui-and-accessibility/README.md +5 -0
- package/presets/claude/php-hexagonal/skills/README.md +5 -0
- package/presets/claude/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
- package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +25 -0
- package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
- package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
- package/presets/claude/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
- package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
- package/presets/claude/php-hexagonal/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/php-hexagonal/team/README.md +37 -0
- package/presets/claude/php-hexagonal/team/conventions.md +21 -0
- package/presets/claude/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
- package/presets/claude/php-hexagonal/team/fixtures/feature-full.json +25 -0
- package/presets/claude/php-hexagonal/team/fixtures/feature-light.json +17 -0
- package/presets/claude/php-laravel/CLAUDE.md +20 -0
- package/presets/claude/php-laravel/MCP.md +5 -0
- package/presets/claude/php-laravel/README.md +30 -0
- package/presets/claude/php-laravel/REPO_AGENTS.md +47 -0
- package/presets/claude/php-laravel/agents/README.md +32 -0
- package/presets/claude/php-laravel/agents/api-contract-reviewer.md +23 -0
- package/presets/claude/php-laravel/agents/build-verifier.md +45 -0
- package/presets/claude/php-laravel/agents/ci-investigator.md +21 -0
- package/presets/claude/php-laravel/agents/code-reviewer.md +40 -0
- package/presets/claude/php-laravel/agents/codebase-analyzer.md +28 -0
- package/presets/claude/php-laravel/agents/debugger.md +29 -0
- package/presets/claude/php-laravel/agents/feature-developer.md +47 -0
- package/presets/claude/php-laravel/agents/integration-test-generator.md +22 -0
- package/presets/claude/php-laravel/agents/integration-test-healer.md +22 -0
- package/presets/claude/php-laravel/agents/integration-test-planner.md +22 -0
- package/presets/claude/php-laravel/agents/migration-specialist.md +31 -0
- package/presets/claude/php-laravel/agents/performance-auditor.md +22 -0
- package/presets/claude/php-laravel/agents/qa-tester.md +30 -0
- package/presets/claude/php-laravel/agents/security-reviewer.md +32 -0
- package/presets/claude/php-laravel/agents/solution-architect.md +29 -0
- package/presets/claude/php-laravel/agents/task-analyst.md +25 -0
- package/presets/claude/php-laravel/agents/task-router.md +92 -0
- package/presets/claude/php-laravel/agents/tech-writer.md +15 -0
- package/presets/claude/php-laravel/agents/unit-test-generator.md +21 -0
- package/presets/claude/php-laravel/agents/unit-test-healer.md +13 -0
- package/presets/claude/php-laravel/agents/unit-test-planner.md +26 -0
- package/presets/claude/php-laravel/commands/README.md +13 -0
- package/presets/claude/php-laravel/commands/feature-continue.md +51 -0
- package/presets/claude/php-laravel/commands/feature-start.md +30 -0
- package/presets/claude/php-laravel/commands/task-continue.md +50 -0
- package/presets/claude/php-laravel/commands/task.md +53 -0
- package/presets/claude/php-laravel/commands/technical-retro.md +62 -0
- package/presets/claude/php-laravel/hooks/README.md +16 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +582 -0
- package/presets/claude/php-laravel/hooks/examples/README.md +18 -0
- package/presets/claude/php-laravel/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
- package/presets/claude/php-laravel/hooks/guard-shell-command.sh +80 -0
- package/presets/claude/php-laravel/mcp.json +11 -0
- package/presets/claude/php-laravel/rules/README.md +67 -0
- package/presets/claude/php-laravel/rules/api-and-data/README.md +3 -0
- package/presets/claude/php-laravel/rules/api-and-data/eloquent-persistence.md +31 -0
- package/presets/claude/php-laravel/rules/api-and-data/events-listeners.md +31 -0
- package/presets/claude/php-laravel/rules/api-and-data/form-requests.md +29 -0
- package/presets/claude/php-laravel/rules/api-and-data/http-layer.md +32 -0
- package/presets/claude/php-laravel/rules/api-and-data/jobs-queues.md +41 -0
- package/presets/claude/php-laravel/rules/api-and-data/policies-authorization.md +29 -0
- package/presets/claude/php-laravel/rules/api-and-data/routes-api.md +29 -0
- package/presets/claude/php-laravel/rules/architecture/README.md +3 -0
- package/presets/claude/php-laravel/rules/architecture/actions-services.md +30 -0
- package/presets/claude/php-laravel/rules/architecture/boundaries.md +34 -0
- package/presets/claude/php-laravel/rules/architecture/domain-layer.md +24 -0
- package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +51 -0
- package/presets/claude/php-laravel/rules/architecture/module-public-api.md +29 -0
- package/presets/claude/php-laravel/rules/architecture/reference-features.md +40 -0
- package/presets/claude/php-laravel/rules/architecture/service-providers.md +28 -0
- package/presets/claude/php-laravel/rules/stack/README.md +3 -0
- package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +32 -0
- package/presets/claude/php-laravel/rules/stack/laravel-conventions.md +38 -0
- package/presets/claude/php-laravel/rules/testing/README.md +3 -0
- package/presets/claude/php-laravel/rules/testing/e2e.md +34 -0
- package/presets/claude/php-laravel/rules/testing/integration.md +30 -0
- package/presets/claude/php-laravel/rules/testing/unit.md +30 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/README.md +3 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +21 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +180 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +52 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +58 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/design-guidance.md +111 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/php-tooling.md +37 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/post-change-test.md +29 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +33 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +66 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +36 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +38 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +47 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/security-php.md +58 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +17 -0
- package/presets/claude/php-laravel/rules/ui-and-accessibility/README.md +3 -0
- package/presets/claude/php-laravel/skills/README.md +5 -0
- package/presets/claude/php-laravel/skills/ci-investigation/SKILL.md +11 -0
- package/presets/claude/php-laravel/skills/code-review/SKILL.md +25 -0
- package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +15 -0
- package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +30 -0
- package/presets/claude/php-laravel/skills/integration-testing/SKILL.md +15 -0
- package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/php-laravel/skills/unit-testing/SKILL.md +14 -0
- package/presets/claude/php-laravel/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/php-laravel/team/README.md +17 -0
- package/presets/claude/php-laravel/team/conventions.md +21 -0
- package/presets/claude/php-laravel/team/fixtures/bugfix-standard.json +12 -0
- package/presets/claude/php-laravel/team/fixtures/feature-full.json +15 -0
- package/presets/claude/php-laravel/team/fixtures/feature-light.json +8 -0
- package/presets/cursor/go/agents/build-verifier.md +2 -2
- package/presets/cursor/go/agents/task-router.md +4 -0
- package/presets/cursor/go/commands/task-continue.md +17 -16
- package/presets/cursor/go/commands/task.md +4 -0
- package/presets/cursor/go/commands/technical-retro.md +4 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +226 -26
- package/presets/cursor/go/rules/README.md +6 -0
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +4 -0
- package/presets/cursor/go/rules/preset-layering.mdc +1 -1
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +5 -5
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/rules/preset-twin-sync.mdc +4 -0
- package/presets/cursor/go/rules/technical-retro.mdc +2 -0
- package/presets/cursor/go/team/README.md +8 -0
- package/presets/cursor/ios-swift/agents/build-verifier.md +3 -3
- package/presets/cursor/ios-swift/agents/task-router.md +4 -0
- package/presets/cursor/ios-swift/commands/task-continue.md +17 -16
- package/presets/cursor/ios-swift/commands/task.md +4 -0
- package/presets/cursor/ios-swift/commands/technical-retro.md +4 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +226 -26
- package/presets/cursor/ios-swift/rules/README.md +6 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +4 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +5 -5
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +4 -0
- package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
- package/presets/cursor/ios-swift/team/README.md +8 -0
- package/presets/cursor/java/agents/build-verifier.md +3 -3
- package/presets/cursor/java/agents/task-router.md +4 -0
- package/presets/cursor/java/commands/task-continue.md +17 -16
- package/presets/cursor/java/commands/task.md +4 -0
- package/presets/cursor/java/commands/technical-retro.md +4 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +226 -26
- package/presets/cursor/java/rules/README.md +6 -0
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +4 -0
- package/presets/cursor/java/rules/preset-layering.mdc +1 -1
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +5 -5
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/java/rules/preset-twin-sync.mdc +4 -0
- package/presets/cursor/java/rules/technical-retro.mdc +2 -0
- package/presets/cursor/java/team/README.md +8 -0
- package/presets/cursor/mcp-ts/agents/build-verifier.md +2 -2
- package/presets/cursor/mcp-ts/agents/task-router.md +4 -0
- package/presets/cursor/mcp-ts/commands/task-continue.md +19 -18
- package/presets/cursor/mcp-ts/commands/task.md +4 -0
- package/presets/cursor/mcp-ts/commands/technical-retro.md +4 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +226 -26
- package/presets/cursor/mcp-ts/rules/README.md +6 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +4 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +5 -5
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +4 -0
- package/presets/cursor/mcp-ts/rules/technical-retro.mdc +2 -4
- package/presets/cursor/mcp-ts/team/README.md +8 -0
- package/presets/cursor/next/agents/build-verifier.md +3 -3
- package/presets/cursor/next/agents/task-router.md +4 -0
- package/presets/cursor/next/commands/task-continue.md +17 -16
- package/presets/cursor/next/commands/task.md +4 -0
- package/presets/cursor/next/commands/technical-retro.md +4 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +230 -26
- package/presets/cursor/next/rules/README.md +6 -0
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -0
- package/presets/cursor/next/rules/preset-layering.mdc +1 -1
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +5 -5
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/next/rules/preset-twin-sync.mdc +4 -0
- package/presets/cursor/next/rules/technical-retro.mdc +2 -0
- package/presets/cursor/next/team/README.md +19 -0
- package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/cursor/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/cursor/next/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/php-hexagonal/AGENTS.md +39 -0
- package/presets/cursor/php-hexagonal/BUGBOT.md +11 -0
- package/presets/cursor/php-hexagonal/MCP.md +15 -0
- package/presets/cursor/php-hexagonal/README.md +26 -0
- package/presets/cursor/php-hexagonal/REPO_AGENTS.md +46 -0
- package/presets/cursor/php-hexagonal/agents/README.md +36 -0
- package/presets/cursor/php-hexagonal/agents/api-contract-reviewer.md +23 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +45 -0
- package/presets/cursor/php-hexagonal/agents/ci-investigator.md +21 -0
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +40 -0
- package/presets/cursor/php-hexagonal/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/php-hexagonal/agents/debugger.md +29 -0
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +47 -0
- package/presets/cursor/php-hexagonal/agents/integration-test-generator.md +22 -0
- package/presets/cursor/php-hexagonal/agents/integration-test-healer.md +22 -0
- package/presets/cursor/php-hexagonal/agents/integration-test-planner.md +22 -0
- package/presets/cursor/php-hexagonal/agents/migration-specialist.md +31 -0
- package/presets/cursor/php-hexagonal/agents/performance-auditor.md +22 -0
- package/presets/cursor/php-hexagonal/agents/qa-tester.md +24 -0
- package/presets/cursor/php-hexagonal/agents/security-reviewer.md +20 -0
- package/presets/cursor/php-hexagonal/agents/solution-architect.md +28 -0
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +25 -0
- package/presets/cursor/php-hexagonal/agents/task-router.md +73 -0
- package/presets/cursor/php-hexagonal/agents/tech-writer.md +15 -0
- package/presets/cursor/php-hexagonal/agents/unit-test-generator.md +21 -0
- package/presets/cursor/php-hexagonal/agents/unit-test-healer.md +13 -0
- package/presets/cursor/php-hexagonal/agents/unit-test-planner.md +26 -0
- package/presets/cursor/php-hexagonal/commands/README.md +54 -0
- package/presets/cursor/php-hexagonal/commands/feature-continue.md +19 -0
- package/presets/cursor/php-hexagonal/commands/feature-start.md +33 -0
- package/presets/cursor/php-hexagonal/commands/task-continue.md +50 -0
- package/presets/cursor/php-hexagonal/commands/task.md +53 -0
- package/presets/cursor/php-hexagonal/commands/technical-retro.md +85 -0
- package/presets/cursor/php-hexagonal/hooks/README.md +12 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +582 -0
- package/presets/cursor/php-hexagonal/hooks/examples/README.md +18 -0
- package/presets/cursor/php-hexagonal/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/php-hexagonal/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/php-hexagonal/hooks/examples/test-on-save.example.sh +19 -0
- package/presets/cursor/php-hexagonal/hooks/guard-shell-command.sh +80 -0
- package/presets/cursor/php-hexagonal/hooks.json +17 -0
- package/presets/cursor/php-hexagonal/mcp.json +11 -0
- package/presets/cursor/php-hexagonal/rules/README.md +106 -0
- package/presets/cursor/php-hexagonal/rules/adapters-driven.mdc +41 -0
- package/presets/cursor/php-hexagonal/rules/adapters-driving.mdc +42 -0
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +20 -0
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +177 -0
- package/presets/cursor/php-hexagonal/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/php-hexagonal/rules/api-grpc.mdc +31 -0
- package/presets/cursor/php-hexagonal/rules/api-http.mdc +40 -0
- package/presets/cursor/php-hexagonal/rules/application-usecases.mdc +33 -0
- package/presets/cursor/php-hexagonal/rules/architecture-boundaries.mdc +36 -0
- package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +54 -0
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +54 -0
- package/presets/cursor/php-hexagonal/rules/composition-root.mdc +37 -0
- package/presets/cursor/php-hexagonal/rules/design-guidance.mdc +112 -0
- package/presets/cursor/php-hexagonal/rules/domain-layer.mdc +39 -0
- package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +47 -0
- package/presets/cursor/php-hexagonal/rules/messaging-adapters.mdc +38 -0
- package/presets/cursor/php-hexagonal/rules/module-public-api.mdc +32 -0
- package/presets/cursor/php-hexagonal/rules/persistence-adapters.mdc +35 -0
- package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +37 -0
- package/presets/cursor/php-hexagonal/rules/php-conventions.mdc +53 -0
- package/presets/cursor/php-hexagonal/rules/php-tooling.mdc +38 -0
- package/presets/cursor/php-hexagonal/rules/ports-interfaces.mdc +37 -0
- package/presets/cursor/php-hexagonal/rules/post-change-test.mdc +30 -0
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +36 -0
- package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +69 -0
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +50 -0
- package/presets/cursor/php-hexagonal/rules/reference-features.mdc +40 -0
- package/presets/cursor/php-hexagonal/rules/security-php.mdc +33 -0
- package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +16 -0
- package/presets/cursor/php-hexagonal/rules/tests-e2e.mdc +36 -0
- package/presets/cursor/php-hexagonal/rules/tests-integration.mdc +33 -0
- package/presets/cursor/php-hexagonal/rules/tests-unit.mdc +35 -0
- package/presets/cursor/php-hexagonal/skills/README.md +5 -0
- package/presets/cursor/php-hexagonal/skills/ci-investigation/SKILL.md +11 -0
- package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +25 -0
- package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +15 -0
- package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +30 -0
- package/presets/cursor/php-hexagonal/skills/integration-testing/SKILL.md +15 -0
- package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/php-hexagonal/skills/unit-testing/SKILL.md +14 -0
- package/presets/cursor/php-hexagonal/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/php-hexagonal/team/README.md +41 -0
- package/presets/cursor/php-hexagonal/team/conventions.md +21 -0
- package/presets/cursor/php-hexagonal/team/fixtures/bugfix-standard.json +37 -0
- package/presets/cursor/php-hexagonal/team/fixtures/feature-full.json +25 -0
- package/presets/cursor/php-hexagonal/team/fixtures/feature-light.json +17 -0
- package/presets/cursor/php-laravel/AGENTS.md +39 -0
- package/presets/cursor/php-laravel/BUGBOT.md +9 -0
- package/presets/cursor/php-laravel/MCP.md +5 -0
- package/presets/cursor/php-laravel/README.md +33 -0
- package/presets/cursor/php-laravel/REPO_AGENTS.md +47 -0
- package/presets/cursor/php-laravel/agents/README.md +36 -0
- package/presets/cursor/php-laravel/agents/api-contract-reviewer.md +23 -0
- package/presets/cursor/php-laravel/agents/build-verifier.md +45 -0
- package/presets/cursor/php-laravel/agents/ci-investigator.md +21 -0
- package/presets/cursor/php-laravel/agents/code-reviewer.md +40 -0
- package/presets/cursor/php-laravel/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/php-laravel/agents/debugger.md +29 -0
- package/presets/cursor/php-laravel/agents/feature-developer.md +47 -0
- package/presets/cursor/php-laravel/agents/integration-test-generator.md +22 -0
- package/presets/cursor/php-laravel/agents/integration-test-healer.md +22 -0
- package/presets/cursor/php-laravel/agents/integration-test-planner.md +22 -0
- package/presets/cursor/php-laravel/agents/migration-specialist.md +31 -0
- package/presets/cursor/php-laravel/agents/performance-auditor.md +22 -0
- package/presets/cursor/php-laravel/agents/qa-tester.md +30 -0
- package/presets/cursor/php-laravel/agents/security-reviewer.md +32 -0
- package/presets/cursor/php-laravel/agents/solution-architect.md +29 -0
- package/presets/cursor/php-laravel/agents/task-analyst.md +25 -0
- package/presets/cursor/php-laravel/agents/task-router.md +92 -0
- package/presets/cursor/php-laravel/agents/tech-writer.md +15 -0
- package/presets/cursor/php-laravel/agents/unit-test-generator.md +21 -0
- package/presets/cursor/php-laravel/agents/unit-test-healer.md +13 -0
- package/presets/cursor/php-laravel/agents/unit-test-planner.md +26 -0
- package/presets/cursor/php-laravel/commands/README.md +54 -0
- package/presets/cursor/php-laravel/commands/feature-continue.md +19 -0
- package/presets/cursor/php-laravel/commands/feature-start.md +33 -0
- package/presets/cursor/php-laravel/commands/task-continue.md +50 -0
- package/presets/cursor/php-laravel/commands/task.md +53 -0
- package/presets/cursor/php-laravel/commands/technical-retro.md +85 -0
- package/presets/cursor/php-laravel/hooks/README.md +12 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +582 -0
- package/presets/cursor/php-laravel/hooks/examples/README.md +18 -0
- package/presets/cursor/php-laravel/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/php-laravel/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/php-laravel/hooks/examples/test-on-save.example.sh +19 -0
- package/presets/cursor/php-laravel/hooks/guard-shell-command.sh +80 -0
- package/presets/cursor/php-laravel/hooks.json +17 -0
- package/presets/cursor/php-laravel/mcp.json +11 -0
- package/presets/cursor/php-laravel/rules/README.md +111 -0
- package/presets/cursor/php-laravel/rules/actions-services.mdc +33 -0
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +20 -0
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +178 -0
- package/presets/cursor/php-laravel/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/php-laravel/rules/architecture-boundaries.mdc +37 -0
- package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +54 -0
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +56 -0
- package/presets/cursor/php-laravel/rules/design-guidance.mdc +112 -0
- package/presets/cursor/php-laravel/rules/domain-layer.mdc +27 -0
- package/presets/cursor/php-laravel/rules/eloquent-persistence.mdc +34 -0
- package/presets/cursor/php-laravel/rules/events-listeners.mdc +34 -0
- package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +50 -0
- package/presets/cursor/php-laravel/rules/form-requests.mdc +32 -0
- package/presets/cursor/php-laravel/rules/http-layer.mdc +35 -0
- package/presets/cursor/php-laravel/rules/jobs-queues.mdc +44 -0
- package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +35 -0
- package/presets/cursor/php-laravel/rules/laravel-conventions.mdc +41 -0
- package/presets/cursor/php-laravel/rules/module-public-api.mdc +31 -0
- package/presets/cursor/php-laravel/rules/php-tooling.mdc +39 -0
- package/presets/cursor/php-laravel/rules/policies-authorization.mdc +32 -0
- package/presets/cursor/php-laravel/rules/post-change-test.mdc +31 -0
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +36 -0
- package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +69 -0
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +50 -0
- package/presets/cursor/php-laravel/rules/reference-features.mdc +42 -0
- package/presets/cursor/php-laravel/rules/routes-api.mdc +32 -0
- package/presets/cursor/php-laravel/rules/security-php.mdc +61 -0
- package/presets/cursor/php-laravel/rules/service-providers.mdc +31 -0
- package/presets/cursor/php-laravel/rules/technical-retro.mdc +16 -0
- package/presets/cursor/php-laravel/rules/tests-e2e.mdc +36 -0
- package/presets/cursor/php-laravel/rules/tests-integration.mdc +33 -0
- package/presets/cursor/php-laravel/rules/tests-unit.mdc +33 -0
- package/presets/cursor/php-laravel/skills/README.md +5 -0
- package/presets/cursor/php-laravel/skills/ci-investigation/SKILL.md +11 -0
- package/presets/cursor/php-laravel/skills/code-review/SKILL.md +25 -0
- package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +15 -0
- package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +30 -0
- package/presets/cursor/php-laravel/skills/integration-testing/SKILL.md +15 -0
- package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/php-laravel/skills/unit-testing/SKILL.md +14 -0
- package/presets/cursor/php-laravel/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/php-laravel/team/README.md +17 -0
- package/presets/cursor/php-laravel/team/conventions.md +21 -0
- package/presets/cursor/php-laravel/team/fixtures/bugfix-standard.json +12 -0
- package/presets/cursor/php-laravel/team/fixtures/feature-full.json +15 -0
- package/presets/cursor/php-laravel/team/fixtures/feature-light.json +8 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lightweight shell guard for PHP hexagonal preset projects.
|
|
3
|
+
# PHP: do NOT blanket-block composer test / vendor/bin/phpunit / compiler/IDE inspections / configured static analysis / repo static analysis.
|
|
4
|
+
# Package-manager mismatch checks apply only when a JS lockfile/package.json exists.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
# PHP_PRESET_GUARD: allow composer/composer test; no Playwright/XCUITest assumptions
|
|
8
|
+
|
|
9
|
+
input=$(cat)
|
|
10
|
+
|
|
11
|
+
INPUT="$input" node <<'NODE'
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
|
|
14
|
+
const raw = process.env.INPUT || '';
|
|
15
|
+
let event;
|
|
16
|
+
try {
|
|
17
|
+
event = JSON.parse(raw);
|
|
18
|
+
} catch {
|
|
19
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const command = String(event.command || event.input?.command || '');
|
|
24
|
+
if (!command.trim()) {
|
|
25
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function out(permission, userMessage, agentMessage) {
|
|
30
|
+
process.stdout.write(JSON.stringify({
|
|
31
|
+
permission,
|
|
32
|
+
user_message: userMessage,
|
|
33
|
+
agent_message: agentMessage || userMessage,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const dangerousGit = /\bgit\s+(reset\s+--hard|clean\s+-[^\n]*f|push\s+--force|push\s+-f|checkout\s+--\s+)/;
|
|
38
|
+
if (dangerousGit.test(command)) {
|
|
39
|
+
out(
|
|
40
|
+
'ask',
|
|
41
|
+
'This command looks destructive for git state. Review it before continuing.',
|
|
42
|
+
'A project hook flagged a destructive git command. Ask the user before running it.',
|
|
43
|
+
);
|
|
44
|
+
process.exit(0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const managerByFile = [
|
|
48
|
+
['yarn.lock', 'yarn'],
|
|
49
|
+
['pnpm-lock.yaml', 'pnpm'],
|
|
50
|
+
['package-lock.json', 'npm'],
|
|
51
|
+
].find(([file]) => fs.existsSync(file));
|
|
52
|
+
|
|
53
|
+
let expected = managerByFile?.[1];
|
|
54
|
+
if (!expected && fs.existsSync('package.json')) {
|
|
55
|
+
try {
|
|
56
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
57
|
+
const pm = typeof pkg.packageManager === 'string' ? pkg.packageManager : '';
|
|
58
|
+
expected = pm.split('@')[0] || undefined;
|
|
59
|
+
} catch {
|
|
60
|
+
// Ignore invalid package.json in the hook; the agent can diagnose it later.
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!expected) {
|
|
65
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
66
|
+
process.exit(0);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const used = command.match(/(^|[;&|]\s*)(npm|yarn|pnpm)\s+/)?.[2];
|
|
70
|
+
if (used && used !== expected) {
|
|
71
|
+
out(
|
|
72
|
+
'ask',
|
|
73
|
+
`This repository appears to use ${expected}, but the command uses ${used}. Confirm before continuing.`,
|
|
74
|
+
`Use ${expected} for package scripts and installs unless the user explicitly approves ${used}.`,
|
|
75
|
+
);
|
|
76
|
+
process.exit(0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
process.stdout.write('{ "permission": "allow" }');
|
|
80
|
+
NODE
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"hooks": {
|
|
4
|
+
"beforeShellExecution": [
|
|
5
|
+
{
|
|
6
|
+
"command": ".cursor/hooks/guard-shell-command.sh",
|
|
7
|
+
"failClosed": true
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"subagentStop": [
|
|
11
|
+
{
|
|
12
|
+
"command": ".cursor/hooks/chain-team-phases.sh",
|
|
13
|
+
"loop_limit": 15
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Rules (preset php-hexagonal)
|
|
2
|
+
|
|
3
|
+
## alwaysApply (3)
|
|
4
|
+
|
|
5
|
+
| Rule | Role |
|
|
6
|
+
|------|------|
|
|
7
|
+
| `php-app-core` | Stack + layout (PSR / Composer hexagonal) |
|
|
8
|
+
| `architecture-boundaries` | Hexagonal invariants |
|
|
9
|
+
| `code-quality-and-refactoring` | Shared quality + PHP notes |
|
|
10
|
+
|
|
11
|
+
**Session-start body budget:** sum of the 3 always-on bodies ≤ **140** lines (stretch ≤120).
|
|
12
|
+
|
|
13
|
+
## Twin depth (Cursor↔Claude)
|
|
14
|
+
|
|
15
|
+
- **Domain** rules: target ≥15 non-empty body lines (FAIL soft when undocumented stubs).
|
|
16
|
+
- **Thin aliases** (may be shorter): `agent-team-intake`, `technical-retro`.
|
|
17
|
+
- **Documented stubs** (v1): `api-grpc` — catalog Depth=`stub`; body carries stub banner + when-to-use. `messaging-adapters` is **full** (java parity; go may still mark sibling stems stub — intentional).
|
|
18
|
+
|
|
19
|
+
## Loading strategy
|
|
20
|
+
|
|
21
|
+
- **`alwaysApply: true`** (Cursor) / **без `paths:`** (Claude) — только базовые инварианты (**3**): `php-app-core`, `architecture-boundaries`, `code-quality-and-refactoring`
|
|
22
|
+
- **On-demand / requestable** — `post-change-test`, `php-tooling`, `agent-team-intake`, `agent-team-orchestrator`, hexagonal domain/adapters, tests, feature-delivery-workflow, reference-features, `design-guidance`, `anti-sycophancy-discipline`, `technical-retro`
|
|
23
|
+
- **Preset author meta** (globs `packages/ai-rules/presets/**`, never alwaysApply): `preset-layering`, `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`
|
|
24
|
+
- **Skills** — `feature-delivery`, `code-review`, `integration-testing`, `unit-testing`, …
|
|
25
|
+
|
|
26
|
+
### Hexagonal edit bundles
|
|
27
|
+
|
|
28
|
+
| When editing | Load |
|
|
29
|
+
|--------------|------|
|
|
30
|
+
| `**/Domain/**` / `**/domain/**` | `domain-layer` + `architecture-boundaries` |
|
|
31
|
+
| `**/Application/**` / `**/application/**` | `application-usecases` + `ports-interfaces` |
|
|
32
|
+
| `**/Adapters/Inbound/**` or `**/adapters/http|grpc/**` | `adapters-driving` + `api-http` / `api-grpc` + `architecture-boundaries` |
|
|
33
|
+
| `**/Adapters/Outbound/**` or `**/adapters/persistence|messaging/**` | `adapters-driven` + `persistence-adapters` / `messaging-adapters` |
|
|
34
|
+
| `**/Composition/**`, bootstrap | `composition-root` |
|
|
35
|
+
| After `*.php` edits | `post-change-test` (+ `php-tooling`) |
|
|
36
|
+
|
|
37
|
+
## Shared core → stack mapping
|
|
38
|
+
|
|
39
|
+
SoT prose: `packages/ai-rules/presets/_shared/core/**` (see `_shared/README.md`). Adapters carry `<!-- shared-core: … -->`.
|
|
40
|
+
|
|
41
|
+
| Shared core | This stack adapter | Mode | Delta |
|
|
42
|
+
|-------------|--------------------|------|-------|
|
|
43
|
+
| `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` | embed | Stack notes: PHP packages/ports, exceptions, `post-change-test` |
|
|
44
|
+
| `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` | embed | requestable full VERIFY/discipline set |
|
|
45
|
+
| `quality/design-guidance.md` | `design-guidance.mdc` | embed | requestable smells/GoF; PHP Stack notes |
|
|
46
|
+
| `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | lineage | Roles (`integration-test-*`); preset PR pointer |
|
|
47
|
+
| `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | embed | thin alias |
|
|
48
|
+
| `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | lineage | PHP hexagonal checklist |
|
|
49
|
+
| `architecture/reference-features.template.md` | `reference-features.mdc` | lineage | `dogfood/php-hexagonal` path table + scenarios |
|
|
50
|
+
| `review/code-review-mr.md` | `code-review-mr.mdc` | embed | PHP checklist |
|
|
51
|
+
| `review/technical-retro.md` | `technical-retro.mdc` | embed | thin alias |
|
|
52
|
+
| `meta/preset-*.md` | `preset-*.mdc` | embed | author-only globs (incl. `preset-no-cross-stack-leakage`) |
|
|
53
|
+
|
|
54
|
+
Claude twins + Cursor→Claude map: `presets/claude/php-hexagonal/rules/README.md`. Cross-stack leakage policy: `preset-no-cross-stack-leakage`.
|
|
55
|
+
|
|
56
|
+
## Catalog
|
|
57
|
+
|
|
58
|
+
| Stem | Depth | Notes |
|
|
59
|
+
|------|-------|-------|
|
|
60
|
+
| `php-app-core` | full | always-on |
|
|
61
|
+
| `architecture-boundaries` | full | always-on |
|
|
62
|
+
| `code-quality-and-refactoring` | full | always-on + shared embed |
|
|
63
|
+
| `anti-sycophancy-discipline` | full | requestable embed (~17 procedural rules) |
|
|
64
|
+
| `design-guidance` | full | requestable embed; PHP Stack notes |
|
|
65
|
+
| `feature-delivery-workflow` | full | PHP hexagonal checklist + matrix |
|
|
66
|
+
| `reference-features` | full | PHP path table (prose scenarios) |
|
|
67
|
+
| `agent-team-orchestrator` | full | Roles table (21) + PHP handoffs / `integration-test-*` |
|
|
68
|
+
| `code-review-mr` | full | PHP Stack notes checklist |
|
|
69
|
+
| `preset-*` (×5) | full | author meta |
|
|
70
|
+
| `agent-team-intake` | thin-alias | |
|
|
71
|
+
| `technical-retro` | thin-alias | |
|
|
72
|
+
| `api-grpc` | stub | optional transport; stub banner + when-to-use |
|
|
73
|
+
| `messaging-adapters` | full | publisher/consumer; Symfony Messenger / AMQP / Kafka notes |
|
|
74
|
+
| `domain-layer` | full | framework-free domain |
|
|
75
|
+
| `application-usecases` | full | |
|
|
76
|
+
| `ports-interfaces` | full | |
|
|
77
|
+
| `adapters-driven` | full | outbound persistence/cache/messaging |
|
|
78
|
+
| `adapters-driving` | full | inbound HTTP/gRPC/CLI |
|
|
79
|
+
| `composition-root` | full | DI / bootstrap wiring |
|
|
80
|
+
| `api-http` | full | thin HTTP controllers; DTO validation/mapping |
|
|
81
|
+
| `persistence-adapters` | full | PDO/ORM; entities do not leak upward |
|
|
82
|
+
| `module-public-api` | full | package/module boundaries |
|
|
83
|
+
| `php-conventions` | full | PSR naming, exceptions, no invented APIs |
|
|
84
|
+
| `php-tooling` | full | requestable Composer/PHPUnit/Pest/PHPStan discovery |
|
|
85
|
+
| `post-change-test` | full | requestable gate |
|
|
86
|
+
| `security-php` | full | secrets, validation; framework security pointer only |
|
|
87
|
+
| `tests-unit` | full | PHPUnit / Pest; port fakes |
|
|
88
|
+
| `tests-integration` | full | DB/HTTP contracts; integration-test-* |
|
|
89
|
+
| `tests-e2e` | full | optional smoke; prefer integration-test-* |
|
|
90
|
+
|
|
91
|
+
**Всего topic `.mdc`:** 29 domain + 5 preset-meta (без README) = 34.
|
|
92
|
+
|
|
93
|
+
## Defaults (human-locked)
|
|
94
|
+
|
|
95
|
+
- PSR / hexagonal / Composer-first; Laravel & Symfony = documented variants only (not Laravel-first)
|
|
96
|
+
- Layer-first single-package = default; feature-first = documented variant
|
|
97
|
+
- gRPC = **documented stub** in v1; messaging = full (java parity). Catalog Depth may lead go on some stems (`tests-unit`, `module-public-api`, `messaging-adapters`) — intentional; do not thin PHP to match go stubs.
|
|
98
|
+
- Dogfood sample: `dogfood/php-hexagonal`
|
|
99
|
+
- MCP = Context7 only
|
|
100
|
+
- Static analysis / format = discover from repo/CI (no mandated PHPStan/Psalm/Pint)
|
|
101
|
+
|
|
102
|
+
## Metrics policy mapping
|
|
103
|
+
|
|
104
|
+
| Shared core | Runtime integration | Loading |
|
|
105
|
+
|-------------|---------------------|---------|
|
|
106
|
+
| `agent-team/agent-task-metrics.md` | `agent-team-orchestrator` + `hooks/chain-team-phases.sh` | requestable/on-demand; never session-start |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Driven adapters (persistence, cache, messaging) for PHP hexagonal services
|
|
3
|
+
globs:
|
|
4
|
+
- "**/Adapters/Outbound/**/*"
|
|
5
|
+
- "**/adapters/outbound/**/*"
|
|
6
|
+
- "**/adapters/persistence/**/*"
|
|
7
|
+
- "**/adapters/cache/**/*"
|
|
8
|
+
- "**/adapters/messaging/**/*"
|
|
9
|
+
alwaysApply: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Driven adapters
|
|
14
|
+
|
|
15
|
+
- Implement application **outbound ports**.
|
|
16
|
+
- Map storage/broker models → domain at the boundary; never return ORM entities or raw PDO rows to application.
|
|
17
|
+
- Handle retries/timeouts/idempotency here when infrastructure-specific.
|
|
18
|
+
- Wrap driver/ORM exceptions with context; translate to domain/application errors when meaningful.
|
|
19
|
+
- Honor timeouts/cancellation from the application call when the client API supports them.
|
|
20
|
+
|
|
21
|
+
## Layout
|
|
22
|
+
|
|
23
|
+
Default: `Adapters/Outbound/Persistence|Messaging|External|Cache/`. Flat `adapters/persistence/` etc. remains valid when already used.
|
|
24
|
+
|
|
25
|
+
## Persistence
|
|
26
|
+
|
|
27
|
+
- See `persistence-adapters.mdc`.
|
|
28
|
+
- Keep SQL/DQL/query builders inside the adapter package; application sees only port methods.
|
|
29
|
+
|
|
30
|
+
## Cache / messaging / external HTTP
|
|
31
|
+
|
|
32
|
+
- Cache keys and serialization are adapter concerns.
|
|
33
|
+
- Publishers implement port `publishX`; consumers that trigger use cases are **driving** adapters.
|
|
34
|
+
- Prefer idempotent publish/consume when brokers may redeliver (see stub `messaging-adapters`).
|
|
35
|
+
- Outbound HTTP clients: per-provider timeouts — do not share one god-client for every vendor.
|
|
36
|
+
|
|
37
|
+
## Forbidden
|
|
38
|
+
|
|
39
|
+
- Calling other driven adapters bypassing application (hidden coupling).
|
|
40
|
+
- Leaking ORM models, PDO types, Redis, or broker client types through port signatures.
|
|
41
|
+
- Embedding business invariants that belong in domain (e.g. discount rules only in SQL).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Driving adapters (HTTP, gRPC, CLI) for PHP hexagonal services
|
|
3
|
+
globs:
|
|
4
|
+
- "**/Adapters/Inbound/**/*"
|
|
5
|
+
- "**/adapters/inbound/**/*"
|
|
6
|
+
- "**/adapters/http/**/*"
|
|
7
|
+
- "**/adapters/grpc/**/*"
|
|
8
|
+
- "**/*Controller*.php"
|
|
9
|
+
- "**/*Action*.php"
|
|
10
|
+
alwaysApply: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Driving adapters
|
|
15
|
+
|
|
16
|
+
- Translate transport → application calls → transport response.
|
|
17
|
+
- Map request/response DTOs at the edge; do **not** pass framework request/security types into use cases.
|
|
18
|
+
- AuthN/AuthZ and wire-format validation belong here (or middleware); domain validation stays in domain.
|
|
19
|
+
- Errors: map domain/application exceptions to status codes once (central exception listener / middleware preferred).
|
|
20
|
+
- Keep controllers/handlers thin: decode → call use case → encode; no multi-step workflows or SQL in the adapter.
|
|
21
|
+
|
|
22
|
+
## Layout
|
|
23
|
+
|
|
24
|
+
Default (layer-first): `Adapters/Inbound/Http/` (and `…/Grpc/`, `…/Cli/` as needed). Flat `adapters/http/` is an accepted variant when the repo already uses it.
|
|
25
|
+
|
|
26
|
+
## HTTP
|
|
27
|
+
|
|
28
|
+
- See `api-http.mdc`. Prefer thin controllers/actions; routing in one place.
|
|
29
|
+
- Bind path/query/body into request DTOs and validate at the edge before calling application.
|
|
30
|
+
- Framework choice (Slim, Symfony, Laravel, plain PHP) is optional — match the repo.
|
|
31
|
+
|
|
32
|
+
## gRPC / CLI / messaging consumers
|
|
33
|
+
|
|
34
|
+
- Same mapping rules; see stub `api-grpc.mdc` for protobuf notes; messaging consumers that trigger use cases are driving adapters (`messaging-adapters` stub).
|
|
35
|
+
- CLI entrypoints may call composition root or inbound ports — **no** SQL in `bin/` scripts.
|
|
36
|
+
- Propagate cancellation/timeouts from the transport into use-case calls when the stack supports it.
|
|
37
|
+
|
|
38
|
+
## Forbidden
|
|
39
|
+
|
|
40
|
+
- SQL, DQL, or business invariants inside controllers.
|
|
41
|
+
- Importing persistence packages from HTTP handlers (wire via application ports).
|
|
42
|
+
- Swallowing exceptions without mapping to a transport status / structured log field.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Suggest /task for PHP backend work requests
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: agent-team/agent-team-intake.md -->
|
|
7
|
+
|
|
8
|
+
# Agent team intake
|
|
9
|
+
|
|
10
|
+
When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
|
|
11
|
+
|
|
12
|
+
1. Prefer **`/task <their request>`** or invoke **task-router** first.
|
|
13
|
+
2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
|
|
14
|
+
3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
15
|
+
|
|
16
|
+
Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
17
|
+
|
|
18
|
+
## Stack notes
|
|
19
|
+
|
|
20
|
+
- Scope: PHP services (`src/**`, `Composition/`, `Composition/*`) — hexagonal ports/adapters — not Playwright/XCUITest UI flows.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrates the agent team via task-router and pipeline.json for PHP presets
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: agent-team/agent-team-orchestrator.md -->
|
|
7
|
+
|
|
8
|
+
# Agent team orchestrator
|
|
9
|
+
|
|
10
|
+
Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
|
|
11
|
+
|
|
12
|
+
Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
|
|
13
|
+
|
|
14
|
+
## Entry points
|
|
15
|
+
|
|
16
|
+
| Command | When |
|
|
17
|
+
|---------|------|
|
|
18
|
+
| **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
|
|
19
|
+
| `/task-continue <slug>` | After human gate or pause |
|
|
20
|
+
| `/feature-start <desc>` | Legacy: analyst-only start (no router) |
|
|
21
|
+
| `/feature-continue <slug>` | Alias of task-continue |
|
|
22
|
+
| `/technical-retro [slug]` | Retro with agent team block |
|
|
23
|
+
|
|
24
|
+
## Roles (shared catalog)
|
|
25
|
+
|
|
26
|
+
Roster of specialists is **stack-specific** (agent names and write scopes differ). See **Stack notes** in the stack adapter for the live Roles table. Common patterns:
|
|
27
|
+
|
|
28
|
+
| Kind | Examples (names vary by stack) |
|
|
29
|
+
|------|--------------------------------|
|
|
30
|
+
| Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
|
|
31
|
+
| Implementation | `feature-developer`, `debugger`, `ci-investigator` |
|
|
32
|
+
| Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
|
|
33
|
+
| Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
|
|
34
|
+
| Docs | `tech-writer` |
|
|
35
|
+
|
|
36
|
+
**Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
|
|
37
|
+
|
|
38
|
+
Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
|
|
39
|
+
|
|
40
|
+
## Dynamic pipeline
|
|
41
|
+
|
|
42
|
+
```mermaid
|
|
43
|
+
flowchart TD
|
|
44
|
+
task["/task prompt"]
|
|
45
|
+
router["task-router"]
|
|
46
|
+
pipeline["pipeline.json"]
|
|
47
|
+
step0["steps 0..N"]
|
|
48
|
+
gate{"humanGates?"}
|
|
49
|
+
hook["subagentStop hook"]
|
|
50
|
+
retro["/technical-retro"]
|
|
51
|
+
|
|
52
|
+
task --> router
|
|
53
|
+
router --> pipeline
|
|
54
|
+
pipeline --> step0
|
|
55
|
+
step0 --> gate
|
|
56
|
+
gate -->|"/task-continue"| step0
|
|
57
|
+
step0 --> hook
|
|
58
|
+
hook --> step0
|
|
59
|
+
step0 --> retro
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
|
|
63
|
+
|
|
64
|
+
## Metrics lifecycle
|
|
65
|
+
|
|
66
|
+
Use the local `metrics.json` ledger described by **agent-task-metrics**: initialize attempts before invocation, let hooks record host-clock ends, and never guess a parallel completion from `currentAgent`.
|
|
67
|
+
|
|
68
|
+
## status.json (pipeline mode)
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"slug": "...",
|
|
73
|
+
"intent": "feature",
|
|
74
|
+
"pipelineIndex": 0,
|
|
75
|
+
"currentAgent": "task-analyst",
|
|
76
|
+
"phase": "executing",
|
|
77
|
+
"state": "in_progress",
|
|
78
|
+
"awaitingHumanGate": false
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| state | Meaning |
|
|
83
|
+
|-------|---------|
|
|
84
|
+
| `in_progress` | Current step running |
|
|
85
|
+
| `completed` | Current step done; hook advances |
|
|
86
|
+
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
87
|
+
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
88
|
+
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
89
|
+
|
|
90
|
+
## Pipeline step options
|
|
91
|
+
|
|
92
|
+
| Field | Use |
|
|
93
|
+
|-------|-----|
|
|
94
|
+
| `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
|
|
95
|
+
| `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
|
|
96
|
+
| `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
|
|
97
|
+
| `model` | `cheap` \| `standard` \| `strong` — optional tier override |
|
|
98
|
+
|
|
99
|
+
## Rules (strict)
|
|
100
|
+
|
|
101
|
+
1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
|
|
102
|
+
2. Read `pipeline.json` before every subagent invocation.
|
|
103
|
+
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
104
|
+
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
105
|
+
5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`).
|
|
106
|
+
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
|
|
107
|
+
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
108
|
+
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
109
|
+
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
110
|
+
|
|
111
|
+
## Team artifact I/O (Cursor Shell sandbox)
|
|
112
|
+
|
|
113
|
+
- Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
|
|
114
|
+
- If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
|
|
115
|
+
- Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
|
|
116
|
+
|
|
117
|
+
## Invoking agents
|
|
118
|
+
|
|
119
|
+
Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
120
|
+
|
|
121
|
+
### Model when invoking (Task)
|
|
122
|
+
|
|
123
|
+
1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
|
|
124
|
+
2. Map abstract tiers:
|
|
125
|
+
- **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
|
|
126
|
+
- **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
|
|
127
|
+
- **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
|
|
128
|
+
3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
|
|
129
|
+
|
|
130
|
+
After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
|
|
131
|
+
|
|
132
|
+
## Legacy mode
|
|
133
|
+
|
|
134
|
+
If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
|
|
135
|
+
|
|
136
|
+
## Skip pipeline when
|
|
137
|
+
|
|
138
|
+
Do **not** run `/task` + router for:
|
|
139
|
+
|
|
140
|
+
- Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
|
|
141
|
+
- Typo / one-file fix / trivial config with no architecture risk.
|
|
142
|
+
- User explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
143
|
+
- Single-line `docs-only` with no code impact.
|
|
144
|
+
|
|
145
|
+
Borderline work requests — см. **agent-team-intake**.
|
|
146
|
+
|
|
147
|
+
## Auto-detection (optional)
|
|
148
|
+
|
|
149
|
+
When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
|
|
150
|
+
|
|
151
|
+
## Preset authoring
|
|
152
|
+
|
|
153
|
+
When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
|
|
154
|
+
|
|
155
|
+
## Stack notes
|
|
156
|
+
|
|
157
|
+
### Roles (PHP hexagonal — 21 agents)
|
|
158
|
+
|
|
159
|
+
| Kind | Agents | Writes |
|
|
160
|
+
|------|--------|--------|
|
|
161
|
+
| Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
|
|
162
|
+
| Analysis | `codebase-analyzer` | explain-as-is only |
|
|
163
|
+
| Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
|
|
164
|
+
| Gates | `build-verifier` | `validation-report.md` only |
|
|
165
|
+
| Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
|
|
166
|
+
| Docs | `tech-writer` | docs |
|
|
167
|
+
| Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
|
|
168
|
+
| Integration | `integration-test-{planner,generator,healer}` | adapter/IT tests |
|
|
169
|
+
|
|
170
|
+
**No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
|
|
171
|
+
|
|
172
|
+
### Handoffs / gates
|
|
173
|
+
|
|
174
|
+
- Scope: PHP hexagonal (`src` domain|application|adapters, `Composition/` / `Composition/*`) — not Next `app/src` or iOS `Features/`.
|
|
175
|
+
- After PHP code changes, pipeline includes **build-verifier** with `composer test` / `vendor/bin/phpunit` + `post-change-test` / `php-tooling` (static analysis only if repo/CI already configures it).
|
|
176
|
+
- Chain hook handoffs: `integration-test-*`, `post-change-test`, `php-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
|
|
177
|
+
- Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- shared-core: quality/anti-sycophancy-discipline.md -->
|
|
9
|
+
|
|
10
|
+
# Anti-sycophancy discipline (requestable)
|
|
11
|
+
|
|
12
|
+
Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
|
|
13
|
+
|
|
14
|
+
1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
|
|
15
|
+
2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
|
|
16
|
+
3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
|
|
17
|
+
4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
|
|
18
|
+
5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
|
|
19
|
+
6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
|
|
20
|
+
7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
|
|
21
|
+
8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
|
|
22
|
+
9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
|
|
23
|
+
10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
|
|
24
|
+
11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
|
|
25
|
+
12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
|
|
26
|
+
13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
|
|
27
|
+
14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
|
|
28
|
+
15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
|
|
29
|
+
16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
|
|
30
|
+
17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Thin gRPC/protobuf extension notes for PHP hexagonal services (HTTP-first v1)
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*.proto"
|
|
5
|
+
- "**/Adapters/Inbound/Grpc/**/*"
|
|
6
|
+
- "**/adapters/**/grpc/**/*"
|
|
7
|
+
alwaysApply: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# gRPC adapters (documented stub)
|
|
12
|
+
|
|
13
|
+
> **Stub (v1):** HTTP is the preset SoT (`api-http`). This rule is a light placeholder — do not pretend full protobuf/streaming depth. **When to use:** editing `*.proto` or `Adapters/**/Grpc/**` in a repo that already (or newly) adopts gRPC.
|
|
14
|
+
|
|
15
|
+
HTTP remains the **v1 SoT**. gRPC is an optional driving adapter with the same hexagonal rules.
|
|
16
|
+
|
|
17
|
+
## Requirements when adding gRPC
|
|
18
|
+
|
|
19
|
+
1. Keep protobuf messages in the adapter (or `api/proto`); map to domain/application at the edge.
|
|
20
|
+
2. Implement the same inbound ports / use cases as HTTP — do not fork business logic.
|
|
21
|
+
3. Map gRPC status codes from domain/application errors (parity with HTTP mapper).
|
|
22
|
+
4. Generate code via repo-standard `protoc` / protobuf PHP plugins — do not hand-edit generated stubs unless the repo requires it.
|
|
23
|
+
|
|
24
|
+
## Non-goals (v1)
|
|
25
|
+
|
|
26
|
+
- Full protobuf style guide and streaming patterns — expand this rule when the consumer repo adopts gRPC widely.
|
|
27
|
+
- Mandating gRPC over HTTP.
|
|
28
|
+
|
|
29
|
+
## Ports
|
|
30
|
+
|
|
31
|
+
- Prefer shared application use cases; gRPC service class is a driving adapter only.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: HTTP API adapter conventions for PHP hexagonal services
|
|
3
|
+
globs:
|
|
4
|
+
- "**/Adapters/Inbound/Http/**/*"
|
|
5
|
+
- "**/adapters/inbound/http/**/*"
|
|
6
|
+
- "**/adapters/http/**/*"
|
|
7
|
+
- "**/*Controller*.php"
|
|
8
|
+
- "**/*Handler*.php"
|
|
9
|
+
- "**/*Action*.php"
|
|
10
|
+
alwaysApply: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# HTTP API adapters
|
|
15
|
+
|
|
16
|
+
- Controllers/handlers/actions are **thin**: parse input, call one inbound port / use case, map status + body.
|
|
17
|
+
- Use a consistent error envelope; map **domain exceptions** centrally (exception listener / middleware) — do not leak transport types into use cases.
|
|
18
|
+
- Version routes if the repo already versions (`/v1/...`).
|
|
19
|
+
- Framework-agnostic edge by default (Slim / Symfony HttpFoundation / Laravel HTTP / plain PHP) — same mapping rules.
|
|
20
|
+
- DTO validation at the adapter edge; do not put HTTP constraints on domain entities.
|
|
21
|
+
- Map DTO ↔ domain/application at the edge (dedicated mapper or small private methods).
|
|
22
|
+
|
|
23
|
+
## Resilience
|
|
24
|
+
|
|
25
|
+
- Side-effect endpoints (charge, create, enqueue): accept/propagate an **idempotency key** when the domain already uses one; document if intentionally omitted.
|
|
26
|
+
- Outbound HTTP to third parties: prefer **per-provider clients** (separate timeouts) — bulkhead isolation.
|
|
27
|
+
- Provider/ACL adapters return typed results or errors — never raw untyped arrays into the domain.
|
|
28
|
+
- Soft file-size hint: split when a controller grows past ~400 LOC.
|
|
29
|
+
|
|
30
|
+
## Testing
|
|
31
|
+
|
|
32
|
+
- Prefer controller/handler unit tests with a mocked use case.
|
|
33
|
+
- Integration: HTTP kernel + DB fixtures behind driven ports when needed (`integration-test-*`).
|
|
34
|
+
|
|
35
|
+
## Forbidden
|
|
36
|
+
|
|
37
|
+
- Business rules or SQL/DQL in controllers.
|
|
38
|
+
- Ignoring request timeouts / cancel when the framework exposes them.
|
|
39
|
+
- Raising transport-only errors from use cases (keep HTTP mapping at the adapter edge).
|
|
40
|
+
- Returning ORM entities directly as JSON response bodies.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Application use cases and orchestration in PHP hexagonal services
|
|
3
|
+
globs:
|
|
4
|
+
- "**/Application/**/*"
|
|
5
|
+
- "**/application/**/*"
|
|
6
|
+
alwaysApply: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Application / use cases
|
|
11
|
+
|
|
12
|
+
- One use case ≈ one application service method (command/query).
|
|
13
|
+
- Depend on **outbound ports** (interfaces), not concrete repos, ORM, or HTTP clients.
|
|
14
|
+
- Orchestrate domain; transaction boundaries via ports (`UnitOfWork` / framework transaction on the application service when the repo uses that) — still **no SQL/DQL** here.
|
|
15
|
+
- Keep signatures in domain / application types — never framework request objects, `EntityManager`, or controller DTOs.
|
|
16
|
+
- Framework service attributes on use cases are optional wiring sugar; domain remains framework-free. Plain PHP: plain classes constructed in composition root.
|
|
17
|
+
|
|
18
|
+
## Forbidden
|
|
19
|
+
|
|
20
|
+
- Importing `Adapters\*`, PDO/Doctrine drivers, framework HTTP, ORM entity classes as use-case deps.
|
|
21
|
+
- Embedding Redis/Kafka clients or controller types in use-case fields.
|
|
22
|
+
- Business rules that belong on domain entities/VOs (keep use cases thin orchestrators).
|
|
23
|
+
|
|
24
|
+
## Structure
|
|
25
|
+
|
|
26
|
+
- Prefer `…/Application/<Feature>Service.php` (or `…/<usecase>/`) with ports colocated (`…/Application/Ports/` or `*Port.php` beside the service).
|
|
27
|
+
- Inbound port = interface the driving adapter calls (optional when a concrete use-case class is the only API).
|
|
28
|
+
- Package layout may be layer-first (`Application/`) or feature-first (`<Feature>/Application/`) — same dependency direction.
|
|
29
|
+
|
|
30
|
+
## Tests
|
|
31
|
+
|
|
32
|
+
- Unit-test with fakes/mocks of outbound ports; assert domain outcomes and port interactions — **no** real DB.
|
|
33
|
+
- Prefer simple fakes for narrow ports; PHPUnit mocks only if the repo already uses them.
|