@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,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reference paths for Laravel layout (dogfood/php-laravel)
|
|
3
|
+
paths:
|
|
4
|
+
- "**/Http/**/*"
|
|
5
|
+
- "**/Actions/**/*"
|
|
6
|
+
- "**/Models/**/*"
|
|
7
|
+
- "**/routes/**/*"
|
|
8
|
+
---
|
|
9
|
+
<!-- shared-core: architecture/reference-features.template.md -->
|
|
10
|
+
|
|
11
|
+
# Reference features (Laravel)
|
|
12
|
+
|
|
13
|
+
Canonical layout matches `dogfood/php-laravel/` (consumer repos may rename; prefer the same shapes). Default = flat Laravel `app/`.
|
|
14
|
+
|
|
15
|
+
| Area | Example path | Glob hint |
|
|
16
|
+
|------|--------------|-----------|
|
|
17
|
+
| Controllers | `app/Http/Controllers/` | `**/Http/Controllers/**` |
|
|
18
|
+
| Form Requests | `app/Http/Requests/` | `**/Http/Requests/**` |
|
|
19
|
+
| Actions | `app/Actions/` | `**/Actions/**` |
|
|
20
|
+
| Models | `app/Models/` | `**/Models/**` |
|
|
21
|
+
| Policies | `app/Policies/` | `**/Policies/**` |
|
|
22
|
+
| Providers | `app/Providers/` | `**/Providers/**` |
|
|
23
|
+
| Jobs / Events | `app/Jobs/`, `app/Events/` | `**/Jobs/**`, `**/Events/**` |
|
|
24
|
+
| Routes | `routes/api.php` | `**/routes/**` |
|
|
25
|
+
| Feature tests | `tests/Feature/` | `**/tests/Feature/**` |
|
|
26
|
+
| Unit tests | `tests/Unit/` | `**/tests/Unit/**` |
|
|
27
|
+
|
|
28
|
+
## Living conventions
|
|
29
|
+
|
|
30
|
+
Post-init gotchas / patterns / decisions: **`.cursor/team/conventions.md`** (and the twin tool path if both Cursor and Claude are installed). Consumer-owned; not always-on. See root `AGENTS.md` § Living conventions.
|
|
31
|
+
|
|
32
|
+
## Dogfood scenarios
|
|
33
|
+
|
|
34
|
+
1. `/task` new write endpoint — Form Request → Policy → Action → Model → Feature test (`dogfood/php-laravel`).
|
|
35
|
+
2. Validation / 403 mapping — debugger + Feature test on Form Request / Policy.
|
|
36
|
+
3. Async side effect — Job or Event on create with `Bus::fake` / `Event::fake`.
|
|
37
|
+
4. OpenAPI drift — api-contract-reviewer (optional; not a required delivery gate).
|
|
38
|
+
5. Secrets in logs — security-reviewer + `security-php`.
|
|
39
|
+
|
|
40
|
+
Init (maintainer): `node packages/ai-rules/bin/cli.js init cursor --preset php-laravel --cwd dogfood/php-laravel` — do not commit generated `.cursor/` into the sample unless the team decides otherwise.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Laravel Service Providers and container wiring
|
|
3
|
+
paths:
|
|
4
|
+
- "**/Providers/**/*"
|
|
5
|
+
- "**/bootstrap/providers.php"
|
|
6
|
+
---
|
|
7
|
+
# Service Providers
|
|
8
|
+
|
|
9
|
+
- Providers **wire** the container: bindings, singletons, interface → implementation, config publishing — **no business rules**.
|
|
10
|
+
- Prefer constructor injection into Actions/Controllers; bind interfaces only when the repo already uses them.
|
|
11
|
+
- Register policies via `AuthServiceProvider` / `Gate::policy` / auto-discovery as Laravel version + repo already do.
|
|
12
|
+
- Keep `boot()` side effects minimal (observers, macros) and match existing patterns.
|
|
13
|
+
- Laravel 11+: respect `bootstrap/providers.php` / application builder — do not invent a parallel registration path.
|
|
14
|
+
|
|
15
|
+
## Forbidden
|
|
16
|
+
|
|
17
|
+
- Eloquent queries / use-case orchestration inside providers.
|
|
18
|
+
- Hard-coding environment secrets in provider source (use `config()` / env).
|
|
19
|
+
- Registering routes that belong in `routes/*.php` unless the repo already registers package routes that way.
|
|
20
|
+
|
|
21
|
+
## Testing
|
|
22
|
+
|
|
23
|
+
- Prefer Feature tests that resolve bindings via the app container rather than unit-testing provider methods in isolation.
|
|
24
|
+
- When adding an interface binding, assert the concrete resolves in a Feature or container test if neighbors do.
|
|
25
|
+
|
|
26
|
+
## Related
|
|
27
|
+
|
|
28
|
+
- Actions/Services consume bindings: `actions-services`; Policies: `policies-authorization`.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Laravel stack, app layout, artisan, and agent entry points
|
|
3
|
+
---
|
|
4
|
+
# Стек и окружение
|
|
5
|
+
|
|
6
|
+
Версии PHP и Laravel — **из `composer.json` / `composer.lock` целевого репозитория**. Рамка preset:
|
|
7
|
+
|
|
8
|
+
- **Язык / платформа:** PHP **8.2+** + **Composer** + **PSR-4** (`App\…`).
|
|
9
|
+
- **Framework:** **Laravel 11+** baseline in Stack notes; read exact constraint from the target repo.
|
|
10
|
+
- **Архитектура:** Laravel-first (HTTP → Actions/Services → Eloquent); not mandatory hexagonal ports purity.
|
|
11
|
+
- **Тесты:** PHPUnit default; Pest — если уже в репо/CI; gate = `php artisan test` / `composer test`.
|
|
12
|
+
- **Static / format:** Pint / PHPStan / Psalm — только если уже сконфигурированы.
|
|
13
|
+
- **HTTP:** thin controllers; Form Requests; API Resources; Policies for AuthZ.
|
|
14
|
+
|
|
15
|
+
# Структура (default: flat `app/`)
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
app/
|
|
19
|
+
Http/Controllers|Requests|Resources|Middleware/
|
|
20
|
+
Actions/ and/or Services/
|
|
21
|
+
Models/
|
|
22
|
+
Policies/
|
|
23
|
+
Providers/
|
|
24
|
+
Jobs/ Events/ Listeners/
|
|
25
|
+
routes/api.php routes/web.php
|
|
26
|
+
tests/Unit/ tests/Feature/
|
|
27
|
+
artisan composer.json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Modular variant (optional):** `app/Domain/<Module>/` — short requestable note in `domain-layer` only; default remains flat Laravel `app/`.
|
|
31
|
+
|
|
32
|
+
Границы — **`architecture-boundaries.mdc`**. Tooling — requestable **`php-tooling.mdc`**. После правок PHP — **`post-change-test.mdc`**.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Idiomatic Laravel / PHP conventions for this preset
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
---
|
|
6
|
+
# Laravel conventions
|
|
7
|
+
|
|
8
|
+
- Follow PSR-12 / Pint config when present; naming: `PascalCase` classes, `camelCase` methods, namespaces match Composer PSR-4 (`App\…`).
|
|
9
|
+
- Prefer typed properties, return types, and `strict_types=1` when neighboring files use them.
|
|
10
|
+
- Prefer `final` / `readonly` where the repo already uses them; do not invent a new style mid-module.
|
|
11
|
+
- Artisan generators (`php artisan make:…`) OK when they match target layout; tidy generated stubs to repo style.
|
|
12
|
+
- Do not invent Laravel APIs — verify against `composer.json` / framework docs for the installed major (`// VERIFY:` when unsure).
|
|
13
|
+
- Prefer Form Requests, Policies, Actions, Resources — the Laravel toolkit — over inventing hexagonal DTO trees.
|
|
14
|
+
|
|
15
|
+
## Errors / exceptions
|
|
16
|
+
|
|
17
|
+
- Prefer domain/application exceptions or Laravel's HTTP exceptions at the edge (`abort`, `AuthorizationException`).
|
|
18
|
+
- Chain causes; never empty-catch without logging or rethrowing.
|
|
19
|
+
- Map to HTTP statuses in controllers / exception handler — not inside Models.
|
|
20
|
+
|
|
21
|
+
## Container / facades
|
|
22
|
+
|
|
23
|
+
- Constructor injection preferred in new code; Facades OK when neighbors use them (`Route`, `DB`, `Event`).
|
|
24
|
+
- Avoid service-locator `app(Foo::class)` mid-Action when constructor injection fits.
|
|
25
|
+
|
|
26
|
+
## Anti-hallucination
|
|
27
|
+
|
|
28
|
+
| ❌ Avoid | ✅ Prefer |
|
|
29
|
+
|---------|----------|
|
|
30
|
+
| Invented packages not in `composer.json` | Add dependency explicitly or copy existing import |
|
|
31
|
+
| Fat controllers | Thin controller → Action |
|
|
32
|
+
| Blade/Livewire in API tasks | Out of preset scope |
|
|
33
|
+
| Hexagonal folder mandates | Flat `app/` Laravel layout |
|
|
34
|
+
| Empty `catch` | Handle, wrap, or declare |
|
|
35
|
+
|
|
36
|
+
## Agent requirement
|
|
37
|
+
|
|
38
|
+
New PHP code must stay idiomatic Laravel and verifiable against `composer.json` and neighboring `app/` packages.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Optional end-to-end / smoke tests for Laravel APIs
|
|
3
|
+
paths:
|
|
4
|
+
- "**/tests/E2E/**/*"
|
|
5
|
+
- "**/tests/e2e/**/*"
|
|
6
|
+
- "**/*E2ETest.php"
|
|
7
|
+
- "**/*SmokeTest.php"
|
|
8
|
+
---
|
|
9
|
+
# E2E / smoke tests (optional)
|
|
10
|
+
|
|
11
|
+
- Prefer **Feature tests** + `integration-test-*` for API contracts; treat e2e/smoke as a thin optional layer.
|
|
12
|
+
- Smoke may hit a running `php artisan serve` / container when the repo already has that harness.
|
|
13
|
+
- Keep scenarios few and stable: health/ready, one happy-path create — not a second unit suite.
|
|
14
|
+
- Place under `tests/E2E/` or `*SmokeTest.php` when the repo uses those names.
|
|
15
|
+
|
|
16
|
+
## Boundary vs Feature
|
|
17
|
+
|
|
18
|
+
| Layer | Typical scope |
|
|
19
|
+
|-------|----------------|
|
|
20
|
+
| Feature / integration | In-process HTTP kernel + DB — **default** for delivery |
|
|
21
|
+
| E2E / smoke | Process or network boundary — optional |
|
|
22
|
+
|
|
23
|
+
If the repo only has `tests/Unit` + `tests/Feature`, do **not** invent a separate e2e framework.
|
|
24
|
+
|
|
25
|
+
## Non-goals
|
|
26
|
+
|
|
27
|
+
- Playwright browser e2e, XCUITest, Blade/Livewire browser suites, or accessibility-reviewer — **out of this preset**.
|
|
28
|
+
- Mandating Dusk if the repo only has Feature tests.
|
|
29
|
+
|
|
30
|
+
## Related
|
|
31
|
+
|
|
32
|
+
- Feature depth: `tests-integration` + `integration-test-*`.
|
|
33
|
+
- Sample: `dogfood/php-laravel` + `php artisan test`.
|
|
34
|
+
- Gates: `post-change-test` / `php-tooling` — never yarn lint or browser stacks.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Feature/integration testing conventions for Laravel APIs
|
|
3
|
+
paths:
|
|
4
|
+
- "**/tests/Feature/**/*"
|
|
5
|
+
- "**/tests/Integration/**/*"
|
|
6
|
+
- "**/*FeatureTest.php"
|
|
7
|
+
- "**/*IT.php"
|
|
8
|
+
---
|
|
9
|
+
# Feature / integration tests
|
|
10
|
+
|
|
11
|
+
- Laravel **Feature** tests ≈ integration: HTTP kernel + DB (SQLite in-memory / file preferred).
|
|
12
|
+
- Prefer `RefreshDatabase` / repo harness — do not invent a new DB stack.
|
|
13
|
+
- Keep pure Action logic in Unit tests when valuable; Feature proves route → validation → AuthZ → persistence.
|
|
14
|
+
- Agents: `integration-test-planner` → `generator` → `healer`; skill `integration-testing`.
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
- API create/update/delete happy paths + 422/403 envelopes.
|
|
19
|
+
- Policy denial; Form Request validation; Job/Event fakes when async is in scope.
|
|
20
|
+
- Migration + factory fixtures matching production schema.
|
|
21
|
+
|
|
22
|
+
## Forbidden
|
|
23
|
+
|
|
24
|
+
- Requiring Playwright, XCUITest, or yarn `lint:js`/`lint:css` as Laravel gates.
|
|
25
|
+
- Turning every unit case into a full Feature boot when a unit fake suffices.
|
|
26
|
+
|
|
27
|
+
## Related
|
|
28
|
+
|
|
29
|
+
- After edits: `post-change-test` (+ `php-tooling`) → `php artisan test`.
|
|
30
|
+
- Unit: `tests-unit`; optional smoke: `tests-e2e`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Unit testing conventions for Laravel Actions and pure PHP
|
|
3
|
+
paths:
|
|
4
|
+
- "**/tests/Unit/**/*"
|
|
5
|
+
- "**/tests/unit/**/*"
|
|
6
|
+
- "**/*Test.php"
|
|
7
|
+
---
|
|
8
|
+
# Unit tests
|
|
9
|
+
|
|
10
|
+
- Prefer **PHPUnit** (or **Pest** if already in repo/CI); clear arrange/act/assert.
|
|
11
|
+
- Actions/Services: mock collaborators when pure enough — no full HTTP kernel required.
|
|
12
|
+
- Prefer fakes over heavy mocking when simple; Mockery only if the repo already uses it.
|
|
13
|
+
- Prefer data providers / Pest datasets when covering multiple cases.
|
|
14
|
+
- Skip Feature / integration files under `tests/Feature` — those use `tests-integration`.
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
- Action logic with faked Eloquent/repos; pure helpers; custom casts when non-trivial.
|
|
19
|
+
- Do not boot the full application for a pure unit case unless the repo's unit harness already does.
|
|
20
|
+
|
|
21
|
+
## Forbidden smells
|
|
22
|
+
|
|
23
|
+
- Hitting real HTTP routes in Unit tests (use Feature tests).
|
|
24
|
+
- Brittle tests on private controller internals without need.
|
|
25
|
+
- Requiring Playwright / browser stacks.
|
|
26
|
+
|
|
27
|
+
## Naming
|
|
28
|
+
|
|
29
|
+
- `CreateTodoTest` / `TodoPolicyTest` (or Pest `describe`/`it` if that is the repo style).
|
|
30
|
+
- Match PHPUnit/Pest patterns CI already uses.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Suggest /task for PHP backend work requests
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
- "**/composer.json"
|
|
6
|
+
---
|
|
7
|
+
<!-- shared-core: agent-team/agent-team-intake.md -->
|
|
8
|
+
|
|
9
|
+
# Agent team intake
|
|
10
|
+
|
|
11
|
+
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:
|
|
12
|
+
|
|
13
|
+
1. Prefer **`/task <their request>`** or invoke **task-router** first.
|
|
14
|
+
2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
|
|
15
|
+
3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
16
|
+
|
|
17
|
+
Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
18
|
+
|
|
19
|
+
## Stack notes
|
|
20
|
+
|
|
21
|
+
- Scope: Laravel (`app/**`, `routes/**`, `tests/**`) — Controllers, Actions/Services, Eloquent, Policies — not Playwright/XCUITest UI flows.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrates the agent team via task-router and pipeline.json for PHP presets
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
- "**/composer.json"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- shared-core: agent-team/agent-team-orchestrator.md -->
|
|
9
|
+
|
|
10
|
+
# Agent team orchestrator
|
|
11
|
+
|
|
12
|
+
Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/` (Claude: `.claude/team/tasks/<slug>/`).
|
|
13
|
+
|
|
14
|
+
Work request без `/task` — см. **agent-team-intake** (когда предлагать router вместо прямого кодинга).
|
|
15
|
+
|
|
16
|
+
## Entry points
|
|
17
|
+
|
|
18
|
+
| Command | When |
|
|
19
|
+
|---------|------|
|
|
20
|
+
| **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
|
|
21
|
+
| `/task-continue <slug>` | After human gate or pause |
|
|
22
|
+
| `/feature-start <desc>` | Legacy: analyst-only start (no router) |
|
|
23
|
+
| `/feature-continue <slug>` | Alias of task-continue |
|
|
24
|
+
| `/technical-retro [slug]` | Retro with agent team block |
|
|
25
|
+
|
|
26
|
+
## Roles (shared catalog)
|
|
27
|
+
|
|
28
|
+
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:
|
|
29
|
+
|
|
30
|
+
| Kind | Examples (names vary by stack) |
|
|
31
|
+
|------|--------------------------------|
|
|
32
|
+
| Planning | `task-router`, `task-analyst`, `solution-architect`, `migration-specialist` |
|
|
33
|
+
| Implementation | `feature-developer`, `debugger`, `ci-investigator` |
|
|
34
|
+
| Gates / review | `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor` (no `accessibility-reviewer`) |
|
|
35
|
+
| Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
|
|
36
|
+
| Docs | `tech-writer` |
|
|
37
|
+
|
|
38
|
+
**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`.
|
|
39
|
+
|
|
40
|
+
Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`.
|
|
41
|
+
|
|
42
|
+
## Dynamic pipeline
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
flowchart TD
|
|
46
|
+
task["/task prompt"]
|
|
47
|
+
router["task-router"]
|
|
48
|
+
pipeline["pipeline.json"]
|
|
49
|
+
step0["steps 0..N"]
|
|
50
|
+
gate{"humanGates?"}
|
|
51
|
+
hook["subagentStop hook"]
|
|
52
|
+
retro["/technical-retro"]
|
|
53
|
+
|
|
54
|
+
task --> router
|
|
55
|
+
router --> pipeline
|
|
56
|
+
pipeline --> step0
|
|
57
|
+
step0 --> gate
|
|
58
|
+
gate -->|"/task-continue"| step0
|
|
59
|
+
step0 --> hook
|
|
60
|
+
hook --> step0
|
|
61
|
+
step0 --> retro
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
|
|
65
|
+
|
|
66
|
+
## Metrics lifecycle
|
|
67
|
+
|
|
68
|
+
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`.
|
|
69
|
+
|
|
70
|
+
## status.json (pipeline mode)
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"slug": "...",
|
|
75
|
+
"intent": "feature",
|
|
76
|
+
"pipelineIndex": 0,
|
|
77
|
+
"currentAgent": "task-analyst",
|
|
78
|
+
"phase": "executing",
|
|
79
|
+
"state": "in_progress",
|
|
80
|
+
"awaitingHumanGate": false
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
| state | Meaning |
|
|
85
|
+
|-------|---------|
|
|
86
|
+
| `in_progress` | Current step running |
|
|
87
|
+
| `completed` | Current step done; hook advances |
|
|
88
|
+
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
89
|
+
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
90
|
+
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
91
|
+
|
|
92
|
+
## Pipeline step options
|
|
93
|
+
|
|
94
|
+
| Field | Use |
|
|
95
|
+
|-------|-----|
|
|
96
|
+
| `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
|
|
97
|
+
| `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
|
|
98
|
+
| `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
|
|
99
|
+
| `model` | `cheap` \| `standard` \| `strong` — optional tier override |
|
|
100
|
+
|
|
101
|
+
## Rules (strict)
|
|
102
|
+
|
|
103
|
+
1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
|
|
104
|
+
2. Read `pipeline.json` before every subagent invocation.
|
|
105
|
+
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
106
|
+
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
107
|
+
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`).
|
|
108
|
+
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
|
|
109
|
+
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
110
|
+
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
111
|
+
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
112
|
+
|
|
113
|
+
## Team artifact I/O (Cursor Shell sandbox)
|
|
114
|
+
|
|
115
|
+
- 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).
|
|
116
|
+
- If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
|
|
117
|
+
- Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
|
|
118
|
+
|
|
119
|
+
## Invoking agents
|
|
120
|
+
|
|
121
|
+
Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
122
|
+
|
|
123
|
+
### Model when invoking (Task)
|
|
124
|
+
|
|
125
|
+
1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
|
|
126
|
+
2. Map abstract tiers:
|
|
127
|
+
- **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
|
|
128
|
+
- **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
|
|
129
|
+
- **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
|
|
130
|
+
3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
|
|
131
|
+
|
|
132
|
+
After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
|
|
133
|
+
|
|
134
|
+
## Legacy mode
|
|
135
|
+
|
|
136
|
+
If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
|
|
137
|
+
|
|
138
|
+
## Skip pipeline when
|
|
139
|
+
|
|
140
|
+
Do **not** run `/task` + router for:
|
|
141
|
+
|
|
142
|
+
- Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
|
|
143
|
+
- Typo / one-file fix / trivial config with no architecture risk.
|
|
144
|
+
- User explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
145
|
+
- Single-line `docs-only` with no code impact.
|
|
146
|
+
|
|
147
|
+
Borderline work requests — см. **agent-team-intake**.
|
|
148
|
+
|
|
149
|
+
## Auto-detection (optional)
|
|
150
|
+
|
|
151
|
+
When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
|
|
152
|
+
|
|
153
|
+
## Preset authoring
|
|
154
|
+
|
|
155
|
+
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**.
|
|
156
|
+
|
|
157
|
+
## Stack notes
|
|
158
|
+
|
|
159
|
+
### Roles (Laravel — 21 agents)
|
|
160
|
+
|
|
161
|
+
| Kind | Agents | Writes |
|
|
162
|
+
|------|--------|--------|
|
|
163
|
+
| Planning | `task-router`, `task-analyst`, `solution-architect` | team only |
|
|
164
|
+
| Analysis | `codebase-analyzer` | explain-as-is only |
|
|
165
|
+
| Implementation | `feature-developer`, `debugger`, `ci-investigator` | sources / minimal |
|
|
166
|
+
| Gates | `build-verifier` | `validation-report.md` only |
|
|
167
|
+
| Review | `code-reviewer`, `security-reviewer`, `performance-auditor`, `api-contract-reviewer`, `migration-specialist` | team / plans |
|
|
168
|
+
| Docs | `tech-writer` | docs |
|
|
169
|
+
| Unit tests | `unit-test-{planner,generator,healer}`, `qa-tester` | tests |
|
|
170
|
+
| Integration | `integration-test-{planner,generator,healer}` | Feature / HTTP-DB tests |
|
|
171
|
+
|
|
172
|
+
**No** `accessibility-reviewer`, Playwright, or XCUITest. Replace those intents with **`integration-test-*`**.
|
|
173
|
+
|
|
174
|
+
### Handoffs / gates
|
|
175
|
+
|
|
176
|
+
- Scope: Laravel (`app/Http/**`, `app/Actions|Services/**`, `app/Models/**`, `app/Providers/**`, `routes/**`, `tests/**`) — not Next `app/src` or iOS `Features/`.
|
|
177
|
+
- After PHP code changes, pipeline includes **build-verifier** with `php artisan test` / `composer test` + `post-change-test` / `php-tooling` (static analysis only if repo/CI already configures it).
|
|
178
|
+
- **Risk-based security-reviewer:** schedule when the task touches auth/Policies/Gates/middleware, routes/HTTP bootstrap, Form Requests, mass assignment, Jobs/queues, config/secrets, uploads, or PII logging — see `task-router` § Security-reviewer routing. Parallel with `code-reviewer` is OK; document skip with an auditable reason when those surfaces are unaffected.
|
|
179
|
+
- Chain hook handoffs: `integration-test-*`, `post-change-test`, `php-tooling` — never `lint:js`, Playwright, XCUITest, or `xcodebuild`.
|
|
180
|
+
- Skills: `feature-delivery`, `unit-testing`, `integration-testing`, `ci-investigation`, `debug-investigation`, `code-review`, `technical-retro`, `write-adr`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- shared-core: quality/anti-sycophancy-discipline.md -->
|
|
8
|
+
|
|
9
|
+
# Anti-sycophancy discipline (requestable)
|
|
10
|
+
|
|
11
|
+
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`.
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
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.
|
|
15
|
+
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.
|
|
16
|
+
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.
|
|
17
|
+
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.
|
|
18
|
+
6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
|
|
19
|
+
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).
|
|
20
|
+
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.
|
|
21
|
+
9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
|
|
22
|
+
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.
|
|
23
|
+
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.
|
|
24
|
+
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).
|
|
25
|
+
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.
|
|
26
|
+
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.
|
|
27
|
+
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.
|
|
28
|
+
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.
|
|
29
|
+
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,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Code quality and light refactoring for Laravel backends
|
|
3
|
+
---
|
|
4
|
+
<!-- shared-core: quality/code-quality-and-refactoring.md -->
|
|
5
|
+
|
|
6
|
+
# Поддержка существующего стиля
|
|
7
|
+
|
|
8
|
+
- Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
|
|
9
|
+
- Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
|
|
10
|
+
|
|
11
|
+
# Принципы
|
|
12
|
+
|
|
13
|
+
- **KISS:** самое простое изменение в паттернах репозитория.
|
|
14
|
+
- **DRY + Rule of Three:** общее — только после 3-го повторения (ошибочная абстракция дороже дублирования).
|
|
15
|
+
- **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
|
|
16
|
+
- **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
|
|
17
|
+
- **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
|
|
18
|
+
- **Composition over inheritance;** Law of Demeter — без цепочек `a.b.c.d`; через public API / facade.
|
|
19
|
+
|
|
20
|
+
# Рефакторинг при изменениях
|
|
21
|
+
|
|
22
|
+
- Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
|
|
23
|
+
- Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
|
|
24
|
+
- Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
|
|
25
|
+
|
|
26
|
+
# Требование к агенту
|
|
27
|
+
|
|
28
|
+
- **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
|
|
29
|
+
|
|
30
|
+
## Agent discipline (anti-sycophancy)
|
|
31
|
+
|
|
32
|
+
Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
|
|
33
|
+
|
|
34
|
+
- Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
|
|
35
|
+
- Before «is this correct?» — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
|
|
36
|
+
- Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
|
|
37
|
+
- Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
|
|
38
|
+
- Urgency/authority: name the trade-off once, then comply — no apology loops.
|
|
39
|
+
- Match verification to risk; report by what was **verified**, not attempted.
|
|
40
|
+
|
|
41
|
+
Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
|
|
42
|
+
|
|
43
|
+
> Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
|
|
44
|
+
|
|
45
|
+
## Stack notes
|
|
46
|
+
|
|
47
|
+
- **No UI layer in this preset** — ignore shared-core bullets about дизайн‑система / UI‑пакеты / CSS‑токены; apply public-API and boy-scout rules to Laravel Actions/Models/Providers instead.
|
|
48
|
+
- Prefer thin controllers + single-purpose Actions; Services for multi-step orchestration — avoid fat controllers and god Services.
|
|
49
|
+
- Repository interfaces **only when justified** (multiple backends / test seams) — not required for every Eloquent model.
|
|
50
|
+
- Prefer Laravel exceptions + Form Request / Policy mapping at the HTTP edge; do not leak raw persistence exceptions as HTTP bodies.
|
|
51
|
+
- Post-change gate: **`post-change-test.mdc`** + **`php-tooling.mdc`** (`php artisan test` / `composer test` — not yarn lint / xcodebuild / Playwright).
|
|
52
|
+
- Style/static analysis: use **repository/CI** Pint/PHPStan/Psalm — do not invent a parallel bible in rules.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Code review checklist for Laravel merge requests
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.php"
|
|
5
|
+
- "**/composer.json"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- shared-core: review/code-review-mr.md -->
|
|
9
|
+
|
|
10
|
+
# Code review merge requests
|
|
11
|
+
|
|
12
|
+
On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
|
|
13
|
+
|
|
14
|
+
## When to load
|
|
15
|
+
|
|
16
|
+
- User asks for review/MR/diff
|
|
17
|
+
- Pipeline step `code-reviewer`
|
|
18
|
+
- Platform automated review (e.g. BUGBOT) when present
|
|
19
|
+
|
|
20
|
+
## Checklist references (abstract)
|
|
21
|
+
|
|
22
|
+
- Architecture layers and stack core rules
|
|
23
|
+
- Public imports / module boundaries
|
|
24
|
+
- UI conventions of the stack
|
|
25
|
+
- Unit and e2e/UI test conventions
|
|
26
|
+
- Post-change lint/build gate before final report
|
|
27
|
+
- Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
|
|
28
|
+
- Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
|
|
29
|
+
- Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
|
|
30
|
+
|
|
31
|
+
Concrete rule stems — in **Stack notes**.
|
|
32
|
+
|
|
33
|
+
## Constraints
|
|
34
|
+
|
|
35
|
+
- Focus on MR diff, not the whole repo.
|
|
36
|
+
- Use local `git diff` — do not invent hosting metadata.
|
|
37
|
+
- Boy scout rule: suggest fixes feasible within the MR scope.
|
|
38
|
+
- No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
|
|
39
|
+
|
|
40
|
+
## Output contract
|
|
41
|
+
|
|
42
|
+
Procedure details live in skill `code-review`. Required shape:
|
|
43
|
+
|
|
44
|
+
- Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
|
|
45
|
+
- Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
46
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
47
|
+
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
48
|
+
|
|
49
|
+
## Stack notes
|
|
50
|
+
|
|
51
|
+
- Laravel boundaries: `architecture-boundaries` — HTTP → Actions/Services → Eloquent; Policies at the edge; Providers wire only.
|
|
52
|
+
- HTTP edge: `http-layer`, `form-requests`, `routes-api` — thin Controllers, Form Request validation, API Resources.
|
|
53
|
+
- Application + persistence: `actions-services`, `eloquent-persistence`, `policies-authorization`, `service-providers`.
|
|
54
|
+
- Paths: `app/Http/**`, `app/Actions|Services/**`, `app/Models/**`, `app/Policies/**`, `app/Providers/**`, `routes/**`.
|
|
55
|
+
- Tests: `tests-unit` (Actions/pure PHP); `tests-integration` (Feature HTTP/DB); post-change: `post-change-test` / `php-tooling`.
|
|
56
|
+
- Security: secrets/PII/`security-php`; AuthZ via Policies — not ad-hoc role checks in Controllers/Models.
|
|
57
|
+
- Never require Playwright, XCUITest, `lint:js`, or `xcodebuild` for Laravel MRs.
|
|
58
|
+
|