@bonesofspring/ai-rules 0.2.10 → 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 +40 -0
- package/README.md +7 -1
- package/bin/cli.js +6 -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 +18 -5
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +6 -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 +18 -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 +6 -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 +18 -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 +6 -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 +18 -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 +6 -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/CLAUDE.md +13 -0
- package/presets/claude/mcp-ts/MCP.md +37 -0
- package/presets/claude/mcp-ts/README.md +11 -0
- package/presets/claude/mcp-ts/REPO_AGENTS.md +49 -0
- package/presets/claude/mcp-ts/agents/README.md +21 -0
- package/presets/claude/mcp-ts/agents/build-verifier.md +39 -0
- package/presets/claude/mcp-ts/agents/feature-developer.md +47 -0
- package/presets/claude/mcp-ts/agents/security-reviewer.md +21 -0
- package/presets/claude/mcp-ts/agents/solution-architect.md +23 -0
- package/presets/claude/mcp-ts/agents/task-analyst.md +25 -0
- package/presets/claude/mcp-ts/agents/task-router.md +77 -0
- package/presets/claude/mcp-ts/commands/README.md +11 -0
- package/presets/claude/mcp-ts/commands/feature-continue.md +19 -0
- package/presets/claude/mcp-ts/commands/feature-start.md +33 -0
- package/presets/claude/mcp-ts/commands/task-continue.md +50 -0
- package/presets/claude/mcp-ts/commands/task.md +53 -0
- package/presets/claude/mcp-ts/commands/technical-retro.md +85 -0
- package/presets/claude/mcp-ts/hooks/README.md +12 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +546 -0
- package/presets/claude/mcp-ts/hooks/examples/README.md +11 -0
- package/presets/claude/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
- package/presets/claude/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
- package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +79 -0
- package/presets/claude/mcp-ts/mcp.json +11 -0
- package/presets/claude/mcp-ts/rules/README.md +58 -0
- package/presets/claude/mcp-ts/rules/api-and-data/README.md +3 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-auth-secrets.md +44 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-contract-testing.md +42 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-tool-design.md +37 -0
- package/presets/claude/mcp-ts/rules/api-and-data/mcp-transport-packaging.md +43 -0
- package/presets/claude/mcp-ts/rules/architecture/README.md +3 -0
- package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +45 -0
- package/presets/claude/mcp-ts/rules/architecture/mcp-server-boundaries.md +28 -0
- package/presets/claude/mcp-ts/rules/architecture/reference-features.md +33 -0
- package/presets/claude/mcp-ts/rules/stack/README.md +3 -0
- package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +27 -0
- package/presets/claude/mcp-ts/rules/stack/mcp-ts-conventions.md +29 -0
- package/presets/claude/mcp-ts/rules/testing/README.md +3 -0
- package/presets/claude/mcp-ts/rules/testing/unit.md +30 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/README.md +3 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +23 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +165 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +34 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +52 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +51 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/design-guidance.md +109 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-ts-tooling.md +31 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/post-change-test.md +30 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +69 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +50 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/security-mcp.md +52 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +18 -0
- package/presets/claude/mcp-ts/rules/ui-and-accessibility/README.md +3 -0
- package/presets/claude/mcp-ts/skills/README.md +12 -0
- package/presets/claude/mcp-ts/skills/code-review/SKILL.md +10 -0
- package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
- package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
- package/presets/claude/mcp-ts/skills/unit-testing/SKILL.md +16 -0
- package/presets/claude/mcp-ts/team/README.md +25 -0
- package/presets/claude/mcp-ts/team/conventions.md +14 -0
- package/presets/claude/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
- package/presets/claude/mcp-ts/team/fixtures/feature-full.json +33 -0
- package/presets/claude/mcp-ts/team/fixtures/feature-light.json +34 -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 +18 -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 +6 -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 +18 -5
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/rules/preset-twin-sync.mdc +6 -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 +18 -5
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +6 -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 +18 -5
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/java/rules/preset-twin-sync.mdc +6 -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.md +25 -0
- package/presets/cursor/mcp-ts/BUGBOT.md +9 -0
- package/presets/cursor/mcp-ts/MCP.md +37 -0
- package/presets/cursor/mcp-ts/README.md +19 -0
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +49 -0
- package/presets/cursor/mcp-ts/agents/README.md +21 -0
- package/presets/cursor/mcp-ts/agents/build-verifier.md +39 -0
- package/presets/cursor/mcp-ts/agents/feature-developer.md +47 -0
- package/presets/cursor/mcp-ts/agents/security-reviewer.md +21 -0
- package/presets/cursor/mcp-ts/agents/solution-architect.md +23 -0
- package/presets/cursor/mcp-ts/agents/task-analyst.md +25 -0
- package/presets/cursor/mcp-ts/agents/task-router.md +77 -0
- package/presets/cursor/mcp-ts/commands/README.md +11 -0
- package/presets/cursor/mcp-ts/commands/feature-continue.md +19 -0
- package/presets/cursor/mcp-ts/commands/feature-start.md +33 -0
- package/presets/cursor/mcp-ts/commands/task-continue.md +50 -0
- package/presets/cursor/mcp-ts/commands/task.md +53 -0
- package/presets/cursor/mcp-ts/commands/technical-retro.md +85 -0
- package/presets/cursor/mcp-ts/hooks/README.md +12 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +546 -0
- package/presets/cursor/mcp-ts/hooks/examples/README.md +11 -0
- package/presets/cursor/mcp-ts/hooks/examples/format-edited.example.sh +16 -0
- package/presets/cursor/mcp-ts/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/mcp-ts/hooks/examples/test-on-save.example.sh +25 -0
- package/presets/cursor/mcp-ts/hooks/guard-shell-command.sh +79 -0
- package/presets/cursor/mcp-ts/hooks.json +17 -0
- package/presets/cursor/mcp-ts/mcp.json +11 -0
- package/presets/cursor/mcp-ts/rules/README.md +58 -0
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +21 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +163 -0
- package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +35 -0
- package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +53 -0
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +50 -0
- package/presets/cursor/mcp-ts/rules/design-guidance.mdc +108 -0
- package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +43 -0
- package/presets/cursor/mcp-ts/rules/mcp-auth-secrets.mdc +45 -0
- package/presets/cursor/mcp-ts/rules/mcp-contract-testing.mdc +43 -0
- package/presets/cursor/mcp-ts/rules/mcp-server-boundaries.mdc +29 -0
- package/presets/cursor/mcp-ts/rules/mcp-tool-design.mdc +38 -0
- package/presets/cursor/mcp-ts/rules/mcp-transport-packaging.mdc +44 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +28 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-conventions.mdc +30 -0
- package/presets/cursor/mcp-ts/rules/mcp-ts-tooling.mdc +32 -0
- package/presets/cursor/mcp-ts/rules/post-change-test.mdc +26 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +36 -0
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +69 -0
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +50 -0
- package/presets/cursor/mcp-ts/rules/reference-features.mdc +34 -0
- package/presets/cursor/mcp-ts/rules/security-mcp.mdc +53 -0
- package/presets/cursor/mcp-ts/rules/technical-retro.mdc +16 -0
- package/presets/cursor/mcp-ts/rules/tests-unit.mdc +31 -0
- package/presets/cursor/mcp-ts/skills/README.md +12 -0
- package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +10 -0
- package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +11 -0
- package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +29 -0
- package/presets/cursor/mcp-ts/skills/unit-testing/SKILL.md +16 -0
- package/presets/cursor/mcp-ts/team/README.md +25 -0
- package/presets/cursor/mcp-ts/team/conventions.md +14 -0
- package/presets/cursor/mcp-ts/team/fixtures/bugfix-standard.json +32 -0
- package/presets/cursor/mcp-ts/team/fixtures/feature-full.json +33 -0
- package/presets/cursor/mcp-ts/team/fixtures/feature-light.json +34 -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 +18 -5
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/next/rules/preset-twin-sync.mdc +6 -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 Claude Code projects using this preset.
|
|
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,67 @@
|
|
|
1
|
+
# `.claude/rules` (preset php-hexagonal)
|
|
2
|
+
|
|
3
|
+
Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/php-hexagonal/rules/*.mdc`.
|
|
4
|
+
|
|
5
|
+
## SoT sync
|
|
6
|
+
|
|
7
|
+
| Principle | Detail |
|
|
8
|
+
|-----------|--------|
|
|
9
|
+
| **SoT** | `presets/cursor/php-hexagonal/rules/*.mdc` |
|
|
10
|
+
| **Derive** | Claude topic `.md` + `paths:` (drop `alwaysApply`) |
|
|
11
|
+
| **Checklist** | change Cursor → update Claude twin **same PR** (**FAIL** if missing — next, ios-swift, go, java, mcp-ts, and php-hexagonal; see `preset-twin-sync` / build-verifier) |
|
|
12
|
+
|
|
13
|
+
## Loading budget
|
|
14
|
+
|
|
15
|
+
- **Session-start (no `paths:`):** exactly **3** — `php-app-core`, `boundaries`, `code-quality`
|
|
16
|
+
- All others — with `paths:`
|
|
17
|
+
- **Twin depth:** domain rules target ≥15 body lines; thin aliases: `agent-team-intake`, `technical-retro`; **documented stub** (v1): `api-grpc`; `messaging-adapters` is full — see Cursor `presets/cursor/php-hexagonal/rules/README.md` Catalog (Depth column)
|
|
18
|
+
|
|
19
|
+
## Cursor → Claude mapping
|
|
20
|
+
|
|
21
|
+
| Cursor `.mdc` (SoT) | Claude topic |
|
|
22
|
+
|---------------------|--------------|
|
|
23
|
+
| `adapters-driven.mdc` | `api-and-data/adapters-driven.md` |
|
|
24
|
+
| `adapters-driving.mdc` | `api-and-data/adapters-driving.md` |
|
|
25
|
+
| `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
|
|
26
|
+
| `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
|
|
27
|
+
| `api-grpc.mdc` | `api-and-data/api-grpc.md` |
|
|
28
|
+
| `api-http.mdc` | `api-and-data/api-http.md` |
|
|
29
|
+
| `application-usecases.mdc` | `architecture/application-usecases.md` |
|
|
30
|
+
| `architecture-boundaries.mdc` | `architecture/boundaries.md` |
|
|
31
|
+
| `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
|
|
32
|
+
| `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
|
|
33
|
+
| `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
|
|
34
|
+
| `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
|
|
35
|
+
| `composition-root.mdc` | `architecture/composition-root.md` |
|
|
36
|
+
| `domain-layer.mdc` | `architecture/domain-layer.md` |
|
|
37
|
+
| `feature-delivery-workflow.mdc` | `architecture/feature-delivery.md` |
|
|
38
|
+
| `php-app-core.mdc` | `stack/php-app-core.md` |
|
|
39
|
+
| `php-conventions.mdc` | `stack/php-conventions.md` |
|
|
40
|
+
| `php-tooling.mdc` | `tooling-and-review/php-tooling.md` |
|
|
41
|
+
| `messaging-adapters.mdc` | `api-and-data/messaging-adapters.md` |
|
|
42
|
+
| `module-public-api.mdc` | `architecture/module-public-api.md` |
|
|
43
|
+
| `persistence-adapters.mdc` | `api-and-data/persistence-adapters.md` |
|
|
44
|
+
| `ports-interfaces.mdc` | `architecture/ports-interfaces.md` |
|
|
45
|
+
| `post-change-test.mdc` | `tooling-and-review/post-change-test.md` |
|
|
46
|
+
| `preset-layering.mdc` | `tooling-and-review/preset-layering.md` |
|
|
47
|
+
| `preset-no-cross-stack-leakage.mdc` | `tooling-and-review/preset-no-cross-stack-leakage.md` |
|
|
48
|
+
| `preset-pr-checklist.mdc` | `tooling-and-review/preset-pr-checklist.md` |
|
|
49
|
+
| `preset-token-budget.mdc` | `tooling-and-review/preset-token-budget.md` |
|
|
50
|
+
| `preset-twin-sync.mdc` | `tooling-and-review/preset-twin-sync.md` |
|
|
51
|
+
| `reference-features.mdc` | `architecture/reference-features.md` |
|
|
52
|
+
| `security-php.mdc` | `tooling-and-review/security-php.md` |
|
|
53
|
+
| `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
|
|
54
|
+
| `tests-e2e.mdc` | `testing/e2e.md` |
|
|
55
|
+
| `tests-integration.mdc` | `testing/integration.md` |
|
|
56
|
+
| `tests-unit.mdc` | `testing/unit.md` |
|
|
57
|
+
|
|
58
|
+
## Topics
|
|
59
|
+
|
|
60
|
+
`architecture/`, `stack/`, `api-and-data/`, `testing/`, `tooling-and-review/`.
|
|
61
|
+
`ui-and-accessibility/` — README stub only (N/A backend).
|
|
62
|
+
|
|
63
|
+
## Metrics policy mapping
|
|
64
|
+
|
|
65
|
+
| Shared core | Runtime integration | Loading |
|
|
66
|
+
|-------------|---------------------|---------|
|
|
67
|
+
| `agent-team/agent-task-metrics.md` | `agent-team-orchestrator` + `hooks/chain-team-phases.sh` | requestable/on-demand; never session-start |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# API and data
|
|
2
|
+
|
|
3
|
+
Driving/driven adapters. Index only.
|
|
4
|
+
|
|
5
|
+
| File | Cursor SoT |
|
|
6
|
+
|------|------------|
|
|
7
|
+
| [`adapters-driving.md`](./adapters-driving.md) | `adapters-driving.mdc` |
|
|
8
|
+
| [`adapters-driven.md`](./adapters-driven.md) | `adapters-driven.mdc` |
|
|
9
|
+
| [`api-http.md`](./api-http.md) | `api-http.mdc` |
|
|
10
|
+
| [`api-grpc.md`](./api-grpc.md) | `api-grpc.mdc` |
|
|
11
|
+
| [`persistence-adapters.md`](./persistence-adapters.md) | `persistence-adapters.mdc` |
|
|
12
|
+
| [`messaging-adapters.md`](./messaging-adapters.md) | `messaging-adapters.mdc` |
|
|
13
|
+
|
|
14
|
+
Full map: [`../README.md`](../README.md).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Driven adapters (persistence, cache, messaging) for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/adapters/outbound/**/*"
|
|
5
|
+
- "**/adapters/persistence/**/*"
|
|
6
|
+
- "**/adapters/cache/**/*"
|
|
7
|
+
- "**/adapters/messaging/**/*"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Driven adapters
|
|
11
|
+
|
|
12
|
+
- Implement application **outbound ports**.
|
|
13
|
+
- Map storage/broker models → domain at the boundary; never return ORM entities or raw PDO rows to application.
|
|
14
|
+
- Handle retries/timeouts/idempotency here when infrastructure-specific.
|
|
15
|
+
- Wrap driver/ORM exceptions with context; translate to domain/application errors when meaningful.
|
|
16
|
+
- Honor timeouts/cancellation from the application call when the client API supports them.
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
Default: `Adapters/Outbound/Persistence|Messaging|External|Cache/`. Flat `adapters/persistence/` etc. remains valid when already used.
|
|
21
|
+
|
|
22
|
+
## Persistence
|
|
23
|
+
|
|
24
|
+
- See `persistence-adapters.mdc`.
|
|
25
|
+
- Keep SQL/DQL/query builders inside the adapter package; application sees only port methods.
|
|
26
|
+
|
|
27
|
+
## Cache / messaging / external HTTP
|
|
28
|
+
|
|
29
|
+
- Cache keys and serialization are adapter concerns.
|
|
30
|
+
- Publishers implement port `publishX`; consumers that trigger use cases are **driving** adapters.
|
|
31
|
+
- Prefer idempotent publish/consume when brokers may redeliver (see stub `messaging-adapters`).
|
|
32
|
+
- Outbound HTTP clients: per-provider timeouts — do not share one god-client for every vendor.
|
|
33
|
+
|
|
34
|
+
## Forbidden
|
|
35
|
+
|
|
36
|
+
- Calling other driven adapters bypassing application (hidden coupling).
|
|
37
|
+
- Leaking ORM models, PDO types, Redis, or broker client types through port signatures.
|
|
38
|
+
- Embedding business invariants that belong in domain (e.g. discount rules only in SQL).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Driving adapters (HTTP, gRPC, CLI) for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/adapters/inbound/**/*"
|
|
5
|
+
- "**/adapters/http/**/*"
|
|
6
|
+
- "**/adapters/grpc/**/*"
|
|
7
|
+
- "**/*Controller*.php"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Driving adapters
|
|
11
|
+
|
|
12
|
+
- Translate transport → application calls → transport response.
|
|
13
|
+
- Map request/response DTOs at the edge; do **not** pass framework request/security types into use cases.
|
|
14
|
+
- AuthN/AuthZ and wire-format validation belong here (or middleware); domain validation stays in domain.
|
|
15
|
+
- Errors: map domain/application exceptions to status codes once (central exception listener / middleware preferred).
|
|
16
|
+
- Keep controllers/handlers thin: decode → call use case → encode; no multi-step workflows or SQL in the adapter.
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
Default (layer-first): `Adapters/Inbound/Http/` (and `…/Grpc/`, `…/Cli/` as needed). Flat `adapters/http/` is an accepted variant when the repo already uses it.
|
|
21
|
+
|
|
22
|
+
## HTTP
|
|
23
|
+
|
|
24
|
+
- See `api-http.mdc`. Prefer thin controllers/actions; routing in one place.
|
|
25
|
+
- Bind path/query/body into request DTOs and validate at the edge before calling application.
|
|
26
|
+
- Framework choice (Slim, Symfony, Laravel, plain PHP) is optional — match the repo.
|
|
27
|
+
|
|
28
|
+
## gRPC / CLI / messaging consumers
|
|
29
|
+
|
|
30
|
+
- Same mapping rules; see stub `api-grpc.mdc` for protobuf notes; messaging consumers that trigger use cases are driving adapters (`messaging-adapters` stub).
|
|
31
|
+
- CLI entrypoints may call composition root or inbound ports — **no** SQL in `bin/` scripts.
|
|
32
|
+
- Propagate cancellation/timeouts from the transport into use-case calls when the stack supports it.
|
|
33
|
+
|
|
34
|
+
## Forbidden
|
|
35
|
+
|
|
36
|
+
- SQL, DQL, or business invariants inside controllers.
|
|
37
|
+
- Importing persistence packages from HTTP handlers (wire via application ports).
|
|
38
|
+
- Swallowing exceptions without mapping to a transport status / structured log field.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Thin gRPC/protobuf extension notes for PHP hexagonal services (HTTP-first v1)
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.proto"
|
|
5
|
+
- "**/adapters/inbound/grpc/**/*"
|
|
6
|
+
- "**/adapters/grpc/**/*"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# gRPC adapters (documented stub)
|
|
10
|
+
|
|
11
|
+
> **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.
|
|
12
|
+
|
|
13
|
+
HTTP remains the **v1 SoT**. gRPC is an optional driving adapter with the same hexagonal rules.
|
|
14
|
+
|
|
15
|
+
## Requirements when adding gRPC
|
|
16
|
+
|
|
17
|
+
1. Keep protobuf messages in the adapter (or `api/proto`); map to domain/application at the edge.
|
|
18
|
+
2. Implement the same inbound ports / use cases as HTTP — do not fork business logic.
|
|
19
|
+
3. Map gRPC status codes from domain/application errors (parity with HTTP mapper).
|
|
20
|
+
4. Generate code via repo-standard `protoc` / protobuf PHP plugins — do not hand-edit generated stubs unless the repo requires it.
|
|
21
|
+
|
|
22
|
+
## Non-goals (v1)
|
|
23
|
+
|
|
24
|
+
- Full protobuf style guide and streaming patterns — expand this rule when the consumer repo adopts gRPC widely.
|
|
25
|
+
- Mandating gRPC over HTTP.
|
|
26
|
+
|
|
27
|
+
## Ports
|
|
28
|
+
|
|
29
|
+
- Prefer shared application use cases; gRPC service class is a driving adapter only.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: HTTP API adapter conventions for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/adapters/inbound/http/**/*"
|
|
5
|
+
- "**/adapters/http/**/*"
|
|
6
|
+
- "**/*Controller*.php"
|
|
7
|
+
- "**/*handler*.php"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# HTTP API adapters
|
|
11
|
+
|
|
12
|
+
- Controllers/handlers/actions are **thin**: parse input, call one inbound port / use case, map status + body.
|
|
13
|
+
- Use a consistent error envelope; map **domain exceptions** centrally (exception listener / middleware) — do not leak transport types into use cases.
|
|
14
|
+
- Version routes if the repo already versions (`/v1/...`).
|
|
15
|
+
- Framework-agnostic edge by default (Slim / Symfony HttpFoundation / Laravel HTTP / plain PHP) — same mapping rules.
|
|
16
|
+
- DTO validation at the adapter edge; do not put HTTP constraints on domain entities.
|
|
17
|
+
- Map DTO ↔ domain/application at the edge (dedicated mapper or small private methods).
|
|
18
|
+
|
|
19
|
+
## Resilience
|
|
20
|
+
|
|
21
|
+
- Side-effect endpoints (charge, create, enqueue): accept/propagate an **idempotency key** when the domain already uses one; document if intentionally omitted.
|
|
22
|
+
- Outbound HTTP to third parties: prefer **per-provider clients** (separate timeouts) — bulkhead isolation.
|
|
23
|
+
- Provider/ACL adapters return typed results or errors — never raw untyped arrays into the domain.
|
|
24
|
+
- Soft file-size hint: split when a controller grows past ~400 LOC.
|
|
25
|
+
|
|
26
|
+
## Testing
|
|
27
|
+
|
|
28
|
+
- Prefer controller/handler unit tests with a mocked use case.
|
|
29
|
+
- Integration: HTTP kernel + DB fixtures behind driven ports when needed (`integration-test-*`).
|
|
30
|
+
|
|
31
|
+
## Forbidden
|
|
32
|
+
|
|
33
|
+
- Business rules or SQL/DQL in controllers.
|
|
34
|
+
- Ignoring request timeouts / cancel when the framework exposes them.
|
|
35
|
+
- Raising transport-only errors from use cases (keep HTTP mapping at the adapter edge).
|
|
36
|
+
- Returning ORM entities directly as JSON response bodies.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Messaging driven/driving adapters for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/Adapters/Outbound/Messaging/**/*"
|
|
5
|
+
- "**/Adapters/Inbound/Messaging/**/*"
|
|
6
|
+
- "**/adapters/**/messaging/**/*"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Messaging adapters
|
|
10
|
+
|
|
11
|
+
- **Publisher** (driven): implements an outbound port; serializes application/domain events to wire format inside the adapter.
|
|
12
|
+
- **Consumer** (driving): deserializes → maps to application/domain types → calls inbound port / use case; **ack/nack** (and commit) stays in the adapter.
|
|
13
|
+
- Idempotency keys, retry, and DLQ/parking-lot policy are adapter (or infra) concerns — document at-least-once vs exactly-once assumptions at the port.
|
|
14
|
+
- Use the broker client already present in the repo — do not invent a second stack.
|
|
15
|
+
|
|
16
|
+
## Event shapes
|
|
17
|
+
|
|
18
|
+
- Prefer explicit event types in application or a small `Events` namespace used by ports.
|
|
19
|
+
- Map wire DTOs ↔ application events **only** in the adapter; never pass broker payloads (`AMQPMessage`, Kafka records, SQS envelopes) into domain.
|
|
20
|
+
|
|
21
|
+
## Stack notes (PHP)
|
|
22
|
+
|
|
23
|
+
- Prefer the transport already wired: **Symfony Messenger**, enqueue/AMQP clients, php-rdkafka / Kafka clients, or AWS SDK for SQS — follow the repo.
|
|
24
|
+
- Framework bus types (`Envelope`, `MessageBusInterface`, raw AMQP channel) stay in adapters / composition — not in domain or application ports.
|
|
25
|
+
- Outbox / inbox and retry schedules are infra; ports expose intent (`publish`, `handle`) without broker APIs.
|
|
26
|
+
|
|
27
|
+
## Forbidden
|
|
28
|
+
|
|
29
|
+
- Broker client types (`AMQPStreamConnection`, `RdKafka\Producer`, SQS client classes, Messenger `Envelope`) in domain or application signatures.
|
|
30
|
+
- Business rules inside listeners beyond mapping + calling one use case.
|
|
31
|
+
- Silent catch-and-ack that drops poison messages without DLQ/metrics policy.
|
|
32
|
+
|
|
33
|
+
## Tests
|
|
34
|
+
|
|
35
|
+
- Unit-test mapping and idempotency branches with fakes.
|
|
36
|
+
- Integration against embedded broker / Testcontainers **when the repo already has that setup**.
|
|
37
|
+
- After edits: `post-change-test` (+ `php-tooling`); agents `integration-test-*` when adding consumer contracts.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Persistence driven adapters (PDO/ORM/repos) for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/adapters/outbound/persistence/**/*"
|
|
5
|
+
- "**/adapters/persistence/**/*"
|
|
6
|
+
- "**/*Repository*.php"
|
|
7
|
+
- "**/*repository*.php"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Persistence adapters
|
|
11
|
+
|
|
12
|
+
- Implement outbound repository ports from application.
|
|
13
|
+
- Use parameterized queries / query builders / ORM methods — **never** string-concatenated SQL with untrusted input.
|
|
14
|
+
- Map rows / ORM entities → **domain** inside the adapter; entities stay private to the adapter package when possible.
|
|
15
|
+
- Transactions: use cases own the boundary (framework transaction on application services, or a `UnitOfWork` port). Adapters must not start ad-hoc transactions that hide business atomicity.
|
|
16
|
+
- Migrations live with infra (`database/migrations`, Doctrine migrations dirs) — **not** in domain.
|
|
17
|
+
|
|
18
|
+
## Mapping
|
|
19
|
+
|
|
20
|
+
- Eloquent/Doctrine entities / PDO row mappers are adapter-local; do not pass them through port signatures or up into application/domain.
|
|
21
|
+
- Nullability and DB defaults convert to domain values explicitly (no silent nulls into invariants).
|
|
22
|
+
- ORM repositories may be used **inside** the adapter as helpers; the application still depends on the port interface, not on the ORM base class.
|
|
23
|
+
|
|
24
|
+
## Forbidden
|
|
25
|
+
|
|
26
|
+
- Importing persistence from domain, or leaking `EntityManager` / Eloquent models / PDO through port APIs.
|
|
27
|
+
- Building SQL/DQL strings in use cases.
|
|
28
|
+
- Returning ORM entities from HTTP controllers “because lazy loading”.
|
|
29
|
+
|
|
30
|
+
## Tests
|
|
31
|
+
|
|
32
|
+
- Integration tests with test DB / fixtures preferred for repos; unit-test mappers with fixtures.
|
|
33
|
+
- Prefer testing through the port implementation (`integration-test-*`).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Hexagonal boundaries and delivery. Index only.
|
|
4
|
+
|
|
5
|
+
| File | Cursor SoT |
|
|
6
|
+
|------|------------|
|
|
7
|
+
| [`boundaries.md`](./boundaries.md) | `architecture-boundaries.mdc` |
|
|
8
|
+
| [`feature-delivery.md`](./feature-delivery.md) | `feature-delivery-workflow.mdc` |
|
|
9
|
+
| [`reference-features.md`](./reference-features.md) | `reference-features.mdc` |
|
|
10
|
+
| [`domain-layer.md`](./domain-layer.md) | `domain-layer.mdc` |
|
|
11
|
+
| [`application-usecases.md`](./application-usecases.md) | `application-usecases.mdc` |
|
|
12
|
+
| [`ports-interfaces.md`](./ports-interfaces.md) | `ports-interfaces.mdc` |
|
|
13
|
+
| [`composition-root.md`](./composition-root.md) | `composition-root.mdc` |
|
|
14
|
+
| [`module-public-api.md`](./module-public-api.md) | `module-public-api.mdc` |
|
|
15
|
+
|
|
16
|
+
Full map: [`../README.md`](../README.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Application use cases and orchestration in PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "application/**/*"
|
|
5
|
+
- "**/application/**/*"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Application / use cases
|
|
9
|
+
|
|
10
|
+
- One use case ≈ one application service method (command/query).
|
|
11
|
+
- Depend on **outbound ports** (interfaces), not concrete repos, ORM, or HTTP clients.
|
|
12
|
+
- Orchestrate domain; transaction boundaries via ports (`UnitOfWork` / framework transaction on the application service when the repo uses that) — still **no SQL/DQL** here.
|
|
13
|
+
- Keep signatures in domain / application types — never framework request objects, `EntityManager`, or controller DTOs.
|
|
14
|
+
- Framework service attributes on use cases are optional wiring sugar; domain remains framework-free. Plain PHP: plain classes constructed in composition root.
|
|
15
|
+
|
|
16
|
+
## Forbidden
|
|
17
|
+
|
|
18
|
+
- Importing `Adapters\*`, PDO/Doctrine drivers, framework HTTP, ORM entity classes as use-case deps.
|
|
19
|
+
- Embedding Redis/Kafka clients or controller types in use-case fields.
|
|
20
|
+
- Business rules that belong on domain entities/VOs (keep use cases thin orchestrators).
|
|
21
|
+
|
|
22
|
+
## Structure
|
|
23
|
+
|
|
24
|
+
- Prefer `…/Application/<Feature>Service.php` (or `…/<usecase>/`) with ports colocated (`…/Application/Ports/` or `*Port.php` beside the service).
|
|
25
|
+
- Inbound port = interface the driving adapter calls (optional when a concrete use-case class is the only API).
|
|
26
|
+
- Package layout may be layer-first (`Application/`) or feature-first (`<Feature>/Application/`) — same dependency direction.
|
|
27
|
+
|
|
28
|
+
## Tests
|
|
29
|
+
|
|
30
|
+
- Unit-test with fakes/mocks of outbound ports; assert domain outcomes and port interactions — **no** real DB.
|
|
31
|
+
- Prefer simple fakes for narrow ports; PHPUnit mocks only if the repo already uses them.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Hexagonal layer boundaries for PHP backends (domain, application, ports, adapters)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Границы слоёв (hexagonal)
|
|
6
|
+
|
|
7
|
+
- **Domain** (`**/Domain/**`, `**/domain/**`):
|
|
8
|
+
- Может: entities, value objects, domain services, domain errors; PHP stdlib / same BC domain.
|
|
9
|
+
- Не должен: framework HTTP kernels, Eloquent/Doctrine as domain types, broker SDKs, transport DTOs.
|
|
10
|
+
- **Application** (`**/Application/**`, `**/application/**`):
|
|
11
|
+
- Может: use cases; **define ports** (inbound/outbound interfaces) with domain types in signatures.
|
|
12
|
+
- Не должен: concrete adapters, SQL/DQL, controller/framework types as domain input.
|
|
13
|
+
- **Ports**: interfaces only — no adapter implementations in port packages.
|
|
14
|
+
- **Driving adapters** (`Adapters/Inbound/**`, `adapters/inbound/**`): map DTO ↔ application/domain at the edge; no business rules/SQL in controllers.
|
|
15
|
+
- **Driven adapters** (`Adapters/Outbound/**`, `adapters/outbound/**`): implement outbound ports; map rows/messages → domain; do not leak persistence models upward.
|
|
16
|
+
- **Composition** (`Composition/`, `composition/`, bootstrap): wires the graph; no business logic.
|
|
17
|
+
|
|
18
|
+
# Зависимости
|
|
19
|
+
|
|
20
|
+
- Направление: **adapters → application → domain**.
|
|
21
|
+
- Driven adapters implement outbound ports defined by application.
|
|
22
|
+
- Domain never imports adapters or frameworks.
|
|
23
|
+
- Cross-feature access — only via public ports / module API, not deep imports of another feature's internals.
|
|
24
|
+
|
|
25
|
+
# Edit bundles (load on matching paths)
|
|
26
|
+
|
|
27
|
+
- `**/Domain/**` → `domain-layer`; `**/Application/**` → `application-usecases` + `ports-interfaces`
|
|
28
|
+
- Inbound HTTP/gRPC → `adapters-driving` + `api-http` / `api-grpc`; outbound persistence/messaging → `adapters-driven` + matching `*-adapters`
|
|
29
|
+
- `**/Composition/**`, bootstrap → `composition-root`; after `*.php` edits → `post-change-test` (+ `php-tooling`)
|
|
30
|
+
|
|
31
|
+
# Требование к агенту
|
|
32
|
+
|
|
33
|
+
- Класть файлы в правильный слой; не «коротить» слои ради скорости.
|
|
34
|
+
- DI / wiring только в composition / bootstrap.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Composition root and DI wiring for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/Composition/**"
|
|
5
|
+
- "**/Composition/*"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Composition root
|
|
9
|
+
|
|
10
|
+
- Construct adapters, use cases, and servers in `Composition/` (or repo bootstrap / DI container definitions).
|
|
11
|
+
- Wire ports → implementations explicitly (PHP-DI, Symfony DI, Laravel container, or manual factories — match the repo).
|
|
12
|
+
- Load config once; **fail fast** on missing required settings before opening listeners or connections.
|
|
13
|
+
- Lifecycle: graceful shutdown matching the repo (close DB pools / clients in reverse wire order).
|
|
14
|
+
|
|
15
|
+
## Allowed here
|
|
16
|
+
|
|
17
|
+
- Import all layers for **wiring only**.
|
|
18
|
+
- Process-wide loggers, metrics, health providers constructed once and injected.
|
|
19
|
+
|
|
20
|
+
## Forbidden
|
|
21
|
+
|
|
22
|
+
- Business rules, SQL/DQL, HTTP routing tables with domain logic.
|
|
23
|
+
- Global mutable singletons for repos without clear init (prefer constructor injection / explicit bindings).
|
|
24
|
+
- Putting domain types under framework stereotypes unless the repo already does — prefer adapters + application as framework components.
|
|
25
|
+
|
|
26
|
+
## Framework variants (pointer)
|
|
27
|
+
|
|
28
|
+
- Slim / plain PHP: explicit bootstrap in `public/index.php` or `Composition/`.
|
|
29
|
+
- Symfony / Laravel: keep container config / providers thin — no business rules in service providers.
|
|
30
|
+
|
|
31
|
+
## Tests
|
|
32
|
+
|
|
33
|
+
- Optional smoke that the container/bootstrap builds; heavy logic stays in unit/integration tests.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Domain layer invariants for PHP hexagonal services
|
|
3
|
+
paths:
|
|
4
|
+
- "domain/**/*"
|
|
5
|
+
- "**/domain/**/*"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Domain layer
|
|
9
|
+
|
|
10
|
+
- Pure business types and rules; **no I/O**, no framework, no ORM, no HTTP.
|
|
11
|
+
- Prefer small value objects with validation factories (`of` / `from` / private constructors) that throw typed **domain** exceptions.
|
|
12
|
+
- Domain errors are typed (`RuntimeException` subtypes or a small hierarchy); map to HTTP/gRPC statuses **only** in adapters.
|
|
13
|
+
- Domain services orchestrate entities/VOs without calling outbound ports (ports live in **application**).
|
|
14
|
+
- Keep invariants close to the type that owns them; avoid anemic bags of fields with all logic in use cases.
|
|
15
|
+
- Prefer `readonly` / immutable types when the repo already uses them; do not invent a new VO style mid-module.
|
|
16
|
+
|
|
17
|
+
## Forbidden imports
|
|
18
|
+
|
|
19
|
+
- Framework HTTP kernels, PSR-15 request/response types as domain deps, Laravel/Symfony request classes.
|
|
20
|
+
- Eloquent/Doctrine entities as domain types, `EntityManager`, query builders as domain deps.
|
|
21
|
+
- Redis/Kafka/HTTP clients, OpenAPI/JSON serialization attributes that mirror wire contracts.
|
|
22
|
+
- Framework request-scope / security-context plumbing as a substitute for domain deadlines (prefer explicit types).
|
|
23
|
+
|
|
24
|
+
## Allowed
|
|
25
|
+
|
|
26
|
+
- PHP stdlib: `DateTimeImmutable`, arrays/collections used by the repo, custom exceptions, pure utilities.
|
|
27
|
+
- Cross-aggregate references by **ID**, not by loading other aggregates via ports.
|
|
28
|
+
- Deadline/time primitives only when the domain API genuinely needs them (prefer application to pass values).
|
|
29
|
+
|
|
30
|
+
## Plain-PHP / alternate frameworks
|
|
31
|
+
|
|
32
|
+
Same rules: domain stays framework-free whether the edge is Slim, Symfony HttpFoundation, Laravel HTTP, or plain PHP.
|
|
33
|
+
|
|
34
|
+
## Tests
|
|
35
|
+
|
|
36
|
+
- PHPUnit (or Pest) unit tests; **no** DB, HTTP controller harness, or framework kernel.
|
|
37
|
+
- Cover invalid factory inputs and invariant violations explicitly.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: End-to-end delivery checklist for PHP hexagonal features
|
|
3
|
+
paths:
|
|
4
|
+
- .cursor/team/**/*
|
|
5
|
+
- .claude/team/**/*
|
|
6
|
+
- "**/*.php"
|
|
7
|
+
- src/**/*
|
|
8
|
+
- tests/**/*
|
|
9
|
+
- "**/Composition/**"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- shared-core: architecture/feature-delivery-workflow.md -->
|
|
13
|
+
|
|
14
|
+
# Feature delivery (PHP hexagonal)
|
|
15
|
+
|
|
16
|
+
Order of work:
|
|
17
|
+
|
|
18
|
+
1. **Domain** — entities/VOs/errors (`domain-layer`).
|
|
19
|
+
2. **Application + ports** — use case + outbound interfaces (`application-usecases`, `ports-interfaces`).
|
|
20
|
+
3. **Driven adapters** — persistence/cache/messaging implementing ports (`adapters-driven`, `persistence-adapters`).
|
|
21
|
+
4. **Driving adapters** — HTTP/gRPC/CLI mapping DTOs (`adapters-driving`, `api-http`; stubs for gRPC/messaging).
|
|
22
|
+
5. **Composition root** — wire in `Composition/` / `Composition/*` (`composition-root`).
|
|
23
|
+
6. **Tests** — unit (domain/app) → integration (adapters) → optional e2e smoke.
|
|
24
|
+
7. **Gate** — `post-change-test` (+ `php-tooling`).
|
|
25
|
+
|
|
26
|
+
```mermaid
|
|
27
|
+
flowchart LR
|
|
28
|
+
D[Domain] --> A[Application+Ports]
|
|
29
|
+
A --> Drv[Driven adapters]
|
|
30
|
+
Drv --> A
|
|
31
|
+
HTTP[Driving HTTP] --> A
|
|
32
|
+
CR[Composition root] --> HTTP
|
|
33
|
+
CR --> A
|
|
34
|
+
CR --> Drv
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Matrix
|
|
38
|
+
|
|
39
|
+
| Path | Rules |
|
|
40
|
+
|------|-------|
|
|
41
|
+
| `**/domain/**` | `domain-layer`, `architecture-boundaries` |
|
|
42
|
+
| `**/application/**` | `application-usecases`, `ports-interfaces` |
|
|
43
|
+
| `**/adapters/inbound/**`, `**/adapters/http/**` | `adapters-driving`, `api-http` / `api-grpc` |
|
|
44
|
+
| `**/adapters/outbound/**`, `**/adapters/persistence/**` | `adapters-driven`, `persistence-adapters` / `messaging-adapters` |
|
|
45
|
+
| `**/Composition/**`, `**/Composition/*` | `composition-root` |
|
|
46
|
+
| After `*.php` edits | `post-change-test` (+ `php-tooling`) |
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
- Framework types in domain; SQL/DQL in use cases; DI inside controllers; skipping port interfaces “for speed”; returning ORM entities as HTTP bodies.
|
|
51
|
+
- **Ubiquitous language:** Domain names/boundaries reflect the feature domain — do not mix transport/framework terms into domain without need.
|
|
52
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
53
|
+
- PHP framework edge is the default edge; plain PHP / Slim / Symfony HttpFoundation keep the same layer order with different wiring.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Public module API and package boundaries for PHP services
|
|
3
|
+
paths:
|
|
4
|
+
- "**/composer.json"
|
|
5
|
+
- "**/src/**/*.php"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Module public API
|
|
9
|
+
|
|
10
|
+
- Published types under a package's public namespaces are a compatibility surface — change carefully; prefer additive APIs.
|
|
11
|
+
- Service-private code stays in implementation namespaces — do not treat every namespace as public API.
|
|
12
|
+
- Prefer narrow exports; expose only what other modules/features need.
|
|
13
|
+
- Do not deep-import another module's internal namespaces; depend on its published API / facade only.
|
|
14
|
+
- Document breaking PHP API changes in CHANGELOG when the repo publishes libraries.
|
|
15
|
+
|
|
16
|
+
## Single-package default / multi-package variant
|
|
17
|
+
|
|
18
|
+
- **Default:** one Composer package with layer-first namespaces under `src/` (see `dogfood/php-hexagonal`).
|
|
19
|
+
- **Multi-package (Composer path repos / monorepo):** each package exposes a narrow public API; application ports may live in an `*-api` / `*-contracts` package; adapters depend inward. Do not invent multi-package scaffolding unless the repo already uses it.
|
|
20
|
+
- Path repositories / `"repositories": [{"type":"path",...}]` — treat each package's `composer.json` `autoload.psr-4` as that package's boundary SoT.
|
|
21
|
+
|
|
22
|
+
## composer.json
|
|
23
|
+
|
|
24
|
+
- Package name, PHP version, and PSR-4 map are SoT for toolchain/autoload.
|
|
25
|
+
- Prefer minimal direct deps; pin via `composer.lock` the repo already uses.
|
|
26
|
+
- Dev-only tools (PHPUnit, PHPStan) stay in `require-dev` — not runtime public API.
|
|
27
|
+
|
|
28
|
+
## Cross-feature
|
|
29
|
+
|
|
30
|
+
- Inside one package, features communicate via application ports or small public facades — not by importing sibling feature adapter namespaces (`Adapters/Inbound/...` of another feature).
|
|
31
|
+
- Domain and application types may be shared within the package; adapter DTOs stay local to that adapter.
|