@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
|
@@ -51,6 +51,8 @@ if (!slug) {
|
|
|
51
51
|
const taskDir = path.join(TEAM_ROOT, 'tasks', slug);
|
|
52
52
|
const statusPath = path.join(taskDir, 'status.json');
|
|
53
53
|
const pipelinePath = path.join(taskDir, 'pipeline.json');
|
|
54
|
+
const METRICS_PATH = path.join(taskDir, 'metrics.json');
|
|
55
|
+
const METRICS_LOCK = `${METRICS_PATH}.lock`;
|
|
54
56
|
|
|
55
57
|
if (!fs.existsSync(statusPath)) {
|
|
56
58
|
process.stdout.write('{}');
|
|
@@ -58,18 +60,119 @@ if (!fs.existsSync(statusPath)) {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
let status;
|
|
63
|
+
const now = new Date().toISOString();
|
|
64
|
+
const STACK = 'java';
|
|
65
|
+
const PLATFORM = 'claude';
|
|
66
|
+
|
|
67
|
+
function waitForMetricsLock() {
|
|
68
|
+
for (let attempt = 0; attempt < 200; attempt += 1) {
|
|
69
|
+
try { fs.mkdirSync(METRICS_LOCK); return; } catch (error) {
|
|
70
|
+
if (error && error.code !== 'EEXIST') throw error;
|
|
71
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 10);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
throw new Error('metrics lock timeout');
|
|
75
|
+
}
|
|
76
|
+
let taskLockHeld = false;
|
|
77
|
+
function releaseTaskLock() {
|
|
78
|
+
if (!taskLockHeld) return;
|
|
79
|
+
taskLockHeld = false;
|
|
80
|
+
try { fs.rmdirSync(METRICS_LOCK); } catch {}
|
|
81
|
+
}
|
|
82
|
+
waitForMetricsLock();
|
|
83
|
+
taskLockHeld = true;
|
|
84
|
+
process.on('exit', releaseTaskLock);
|
|
61
85
|
try {
|
|
62
86
|
status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
|
|
63
87
|
} catch {
|
|
88
|
+
releaseTaskLock();
|
|
64
89
|
process.stdout.write('{}');
|
|
65
90
|
process.exit(0);
|
|
66
91
|
}
|
|
92
|
+
function mutateMetrics(mutator) {
|
|
93
|
+
const acquiredHere = !taskLockHeld;
|
|
94
|
+
if (acquiredHere) waitForMetricsLock();
|
|
95
|
+
try {
|
|
96
|
+
let metrics;
|
|
97
|
+
try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {
|
|
98
|
+
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
99
|
+
status.metricsRunId = runId;
|
|
100
|
+
metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile: 'unknown' }, events: [] };
|
|
101
|
+
metrics.events.push({ eventId: `${runId}:task_started`, type: 'task_started', at: now, source: 'hook', attributionConfidence: 'high' });
|
|
102
|
+
}
|
|
103
|
+
mutator(metrics);
|
|
104
|
+
const temporary = `${METRICS_PATH}.${process.pid}.${Date.now()}.tmp`;
|
|
105
|
+
fs.writeFileSync(temporary, JSON.stringify(metrics, null, 2) + '\n');
|
|
106
|
+
fs.renameSync(temporary, METRICS_PATH);
|
|
107
|
+
} finally {
|
|
108
|
+
if (acquiredHere) { try { fs.rmdirSync(METRICS_LOCK); } catch {} }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function appendMetric(event) { mutateMetrics((metrics) => metrics.events.push({ eventId: `${metrics.task.runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`, ...event })); }
|
|
112
|
+
function nextAttemptOrdinal(stepIndex, agent) {
|
|
113
|
+
try {
|
|
114
|
+
const metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8'));
|
|
115
|
+
return metrics.events.reduce((highest, event) => event.type === 'attempt_started' && event.stepIndex === stepIndex && event.agent === agent ? Math.max(highest, Number(event.attempt) || 0) : highest, 0) + 1;
|
|
116
|
+
} catch { return 1; }
|
|
117
|
+
}
|
|
118
|
+
function roleFor(agent) {
|
|
119
|
+
if (/analyst|architect|router|migration/.test(agent || '')) return 'planning';
|
|
120
|
+
if (/verifier/.test(agent || '')) return 'validation';
|
|
121
|
+
if (/reviewer|auditor/.test(agent || '')) return 'review';
|
|
122
|
+
if (/test|qa/.test(agent || '')) return 'testing';
|
|
123
|
+
if (/writer/.test(agent || '')) return 'docs';
|
|
124
|
+
return 'implementation';
|
|
125
|
+
}
|
|
126
|
+
function activateAttempts(step, stepIndex) {
|
|
127
|
+
const active = { ...(status.activeAttempts || {}) }; const agents = getStepAgents(step);
|
|
128
|
+
const parallelGroupId = step.parallel && agents.length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
|
|
129
|
+
for (const agent of agents) {
|
|
130
|
+
const attempt = nextAttemptOrdinal(stepIndex, agent); const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
131
|
+
status.metricsRunId = runId; const attemptId = `${runId}:step-${stepIndex}:${agent}:attempt-${attempt}`;
|
|
132
|
+
if (active[attemptId]) continue;
|
|
133
|
+
active[attemptId] = { agent, stepIndex, attempt, startedAt: now, parallelGroupId };
|
|
134
|
+
appendMetric({ type: 'attempt_started', at: now, attemptId, stepIndex, stepLabel: step.label || null, agent, role: roleFor(agent), attempt, parallelGroupId, source: 'hook', attributionConfidence: 'high' });
|
|
135
|
+
}
|
|
136
|
+
status.activeAttempts = active;
|
|
137
|
+
}
|
|
138
|
+
function resolvedAttempt() {
|
|
139
|
+
const active = status.activeAttempts || {}; const entries = Object.entries(active);
|
|
140
|
+
const stableAttemptId = hookInput.attemptId;
|
|
141
|
+
if (stableAttemptId) {
|
|
142
|
+
return active[stableAttemptId] ? { attemptId: stableAttemptId, entry: active[stableAttemptId], confidence: 'high' } : null;
|
|
143
|
+
}
|
|
144
|
+
if (entries.length === 1) return { attemptId: entries[0][0], entry: entries[0][1], confidence: 'high' };
|
|
145
|
+
try { const receipts = JSON.parse(fs.readFileSync(path.join(taskDir, '.metrics-receipts.json'), 'utf8')); const receipt = Array.isArray(receipts) ? receipts.find((item) => active[item.attemptId]) : null; if (receipt) return { attemptId: receipt.attemptId, entry: active[receipt.attemptId], confidence: 'fallback', source: 'agent' }; } catch {}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
function finishActiveAttempt() {
|
|
149
|
+
const resolved = resolvedAttempt(); if (!resolved) return null;
|
|
150
|
+
const durationMs = Date.parse(now) - Date.parse(resolved.entry.startedAt);
|
|
151
|
+
appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome: ['completed', 'changes_requested', 'validation_failed'].includes(status.state) ? status.state : 'unknown', durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence });
|
|
152
|
+
const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return resolved;
|
|
153
|
+
}
|
|
154
|
+
function beginHumanGate() { const eventId = `${status.metricsRunId || slug}:gate:${Date.now()}`; appendMetric({ eventId, type: 'human_gate_started', at: now, source: 'hook', attributionConfidence: 'high' }); status.activeHumanGateEventId = eventId; }
|
|
155
|
+
function endHumanGateIfResumed() {
|
|
156
|
+
if (!status.activeHumanGateEventId || status.awaitingHumanGate || status.state === 'awaiting_approval') return;
|
|
157
|
+
appendMetric({ type: 'human_gate_ended', at: now, gateStartedEventId: status.activeHumanGateEventId, source: 'hook', attributionConfidence: 'high' });
|
|
158
|
+
delete status.activeHumanGateEventId;
|
|
159
|
+
}
|
|
160
|
+
function completeTaskMetrics() { appendMetric({ type: 'task_completed', at: now, outcome: status.state === 'completed' ? 'completed' : 'unknown', source: 'hook', attributionConfidence: 'high' }); }
|
|
161
|
+
function recordSkippedStep(step, stepIndex) {
|
|
162
|
+
for (const agent of getStepAgents(step)) {
|
|
163
|
+
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
164
|
+
status.metricsRunId = runId;
|
|
165
|
+
const attempt = nextAttemptOrdinal(stepIndex, agent);
|
|
166
|
+
appendMetric({ type: 'attempt_skipped', at: now, attemptId: `${runId}:step-${stepIndex}:${agent}:attempt-${attempt}`, stepIndex, stepLabel: step.label || null, agent, role: roleFor(agent), attempt, outcome: 'skipped', source: 'hook', attributionConfidence: 'high' });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
67
169
|
|
|
68
|
-
const now = new Date().toISOString();
|
|
69
170
|
|
|
70
171
|
function writeStatus(next) {
|
|
71
172
|
status = { ...status, ...next, slug, updatedAt: now };
|
|
72
|
-
|
|
173
|
+
const temporary = `${statusPath}.${process.pid}.${Date.now()}.tmp`;
|
|
174
|
+
fs.writeFileSync(temporary, JSON.stringify(status, null, 2) + '\n');
|
|
175
|
+
fs.renameSync(temporary, statusPath);
|
|
73
176
|
}
|
|
74
177
|
|
|
75
178
|
function out(message) {
|
|
@@ -106,9 +209,8 @@ function skipIfMatches(skipIf, dir) {
|
|
|
106
209
|
|
|
107
210
|
function findNextExecutableStep(steps, startIdx, dir) {
|
|
108
211
|
for (let i = startIdx; i < steps.length; i++) {
|
|
109
|
-
if (!skipIfMatches(steps[i].skipIf, dir)) {
|
|
110
|
-
|
|
111
|
-
}
|
|
212
|
+
if (!skipIfMatches(steps[i].skipIf, dir)) return { step: steps[i], index: i };
|
|
213
|
+
recordSkippedStep(steps[i], i);
|
|
112
214
|
}
|
|
113
215
|
return null;
|
|
114
216
|
}
|
|
@@ -173,16 +275,29 @@ const REVIEW_AGENTS = new Set([
|
|
|
173
275
|
]);
|
|
174
276
|
|
|
175
277
|
|
|
278
|
+
function metricsHandoff(agent) {
|
|
279
|
+
const matches = Object.entries(status.activeAttempts || {}).filter(([, entry]) => entry.agent === agent);
|
|
280
|
+
if (matches.length === 1) {
|
|
281
|
+
return ` Metrics attemptId: ${matches[0][0]}; update normal status only. If the hook cannot identify a parallel stop, append a minimal { attemptId, outcome } receipt to .metrics-receipts.json; do not calculate duration.`;
|
|
282
|
+
}
|
|
283
|
+
return ' Metrics: use the supplied attemptId when available; for a parallel completion, write a minimal { attemptId, outcome } receipt to .metrics-receipts.json rather than relying on currentAgent. Do not calculate duration.';
|
|
284
|
+
}
|
|
285
|
+
|
|
176
286
|
function handoffForAgent(agent, scope) {
|
|
177
287
|
const fn = AGENT_HANDOFF[agent];
|
|
178
|
-
|
|
288
|
+
const handoff = fn ? fn(slug, scope) : `Invoke ${agent} subagent for slug "${slug}". Update status.json when done.`;
|
|
289
|
+
return handoff + metricsHandoff(agent);
|
|
179
290
|
}
|
|
180
291
|
|
|
181
292
|
function handoffForParallelStep(step) {
|
|
182
293
|
const agents = getStepAgents(step);
|
|
294
|
+
const attemptIds = Object.entries(status.activeAttempts || {})
|
|
295
|
+
.filter(([, entry]) => agents.includes(entry.agent))
|
|
296
|
+
.map(([attemptId, entry]) => `${entry.agent}=${attemptId}`);
|
|
183
297
|
return (
|
|
184
298
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
|
|
185
|
-
`Each agent writes its artifact and appends itself to status.json parallelCompleted when done
|
|
299
|
+
`Each agent writes its artifact and appends itself to status.json parallelCompleted when done. ` +
|
|
300
|
+
`Metrics attemptIds: ${attemptIds.join('; ')}. If the hook cannot identify a parallel stop, append a minimal { attemptId, outcome } receipt to .metrics-receipts.json; do not calculate duration.`
|
|
186
301
|
);
|
|
187
302
|
}
|
|
188
303
|
|
|
@@ -214,34 +329,38 @@ function legacyFlow() {
|
|
|
214
329
|
out(handoffForAgent('qa-tester'));
|
|
215
330
|
process.exit(0);
|
|
216
331
|
}
|
|
332
|
+
function scheduleLegacyRetry(agent, retryAfterFix) {
|
|
333
|
+
const stepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
334
|
+
const predecessorAttemptId = status.lastCompletedAttempt?.attemptId || null;
|
|
335
|
+
appendMetric({ type: 'retry_scheduled', at: now, attemptId: predecessorAttemptId, nextAgent: agent, retryAfterFix: retryAfterFix || null, source: 'hook', attributionConfidence: 'unknown' });
|
|
336
|
+
activateAttempts({ agent }, stepIndex);
|
|
337
|
+
}
|
|
217
338
|
if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
|
|
339
|
+
const reviewer = status.currentAgent;
|
|
340
|
+
scheduleLegacyRetry('feature-developer', reviewer);
|
|
218
341
|
writeStatus({
|
|
219
342
|
currentAgent: 'feature-developer',
|
|
220
343
|
state: 'in_progress',
|
|
221
344
|
phase: 'executing',
|
|
222
|
-
retryAfterFix:
|
|
345
|
+
retryAfterFix: reviewer,
|
|
223
346
|
});
|
|
224
|
-
out(
|
|
225
|
-
handoffForAgent('feature-developer') +
|
|
226
|
-
` After fixes, re-run ${status.currentAgent}.`,
|
|
227
|
-
);
|
|
347
|
+
out(handoffForAgent('feature-developer') + ` After fixes, re-run ${reviewer}.`);
|
|
228
348
|
process.exit(0);
|
|
229
349
|
}
|
|
230
350
|
if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
|
|
351
|
+
scheduleLegacyRetry('feature-developer', 'build-verifier');
|
|
231
352
|
writeStatus({
|
|
232
353
|
currentAgent: 'feature-developer',
|
|
233
354
|
state: 'in_progress',
|
|
234
355
|
phase: 'executing',
|
|
235
356
|
retryAfterFix: 'build-verifier',
|
|
236
357
|
});
|
|
237
|
-
out(
|
|
238
|
-
handoffForAgent('feature-developer') +
|
|
239
|
-
` Read validation-report.md. After fixes, re-run build-verifier.`,
|
|
240
|
-
);
|
|
358
|
+
out(handoffForAgent('feature-developer') + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
241
359
|
process.exit(0);
|
|
242
360
|
}
|
|
243
361
|
if (status.state === 'completed' && status.retryAfterFix) {
|
|
244
362
|
const retry = status.retryAfterFix;
|
|
363
|
+
scheduleLegacyRetry(retry, null);
|
|
245
364
|
writeStatus({ currentAgent: retry, state: 'in_progress', retryAfterFix: null });
|
|
246
365
|
out(handoffForAgent(retry));
|
|
247
366
|
process.exit(0);
|
|
@@ -255,6 +374,56 @@ function legacyFlow() {
|
|
|
255
374
|
process.exit(0);
|
|
256
375
|
}
|
|
257
376
|
|
|
377
|
+
|
|
378
|
+
if (hookInput.action === 'end_human_gate') {
|
|
379
|
+
status.awaitingHumanGate = false;
|
|
380
|
+
if (status.state === 'awaiting_approval') {
|
|
381
|
+
status.state = 'in_progress';
|
|
382
|
+
status.phase = status.phase === 'human_gate' ? 'executing' : status.phase;
|
|
383
|
+
}
|
|
384
|
+
if (status.activeHumanGateEventId) {
|
|
385
|
+
appendMetric({
|
|
386
|
+
type: 'human_gate_ended',
|
|
387
|
+
at: now,
|
|
388
|
+
gateStartedEventId: status.activeHumanGateEventId,
|
|
389
|
+
source: 'orchestrator',
|
|
390
|
+
attributionConfidence: 'high',
|
|
391
|
+
});
|
|
392
|
+
delete status.activeHumanGateEventId;
|
|
393
|
+
}
|
|
394
|
+
if (hookInput.activateNext && fs.existsSync(pipelinePath)) {
|
|
395
|
+
let resumePipeline = null;
|
|
396
|
+
try { resumePipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8')); } catch {}
|
|
397
|
+
if (resumePipeline) {
|
|
398
|
+
const resumeSteps = resumePipeline.steps || [];
|
|
399
|
+
const resumeStart = (typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0) + 1;
|
|
400
|
+
const resumeNext = findNextExecutableStep(resumeSteps, resumeStart, taskDir);
|
|
401
|
+
if (resumeNext) {
|
|
402
|
+
const resumeAgents = getStepAgents(resumeNext.step);
|
|
403
|
+
activateAttempts(resumeNext.step, resumeNext.index);
|
|
404
|
+
writeStatus({
|
|
405
|
+
pipelineIndex: resumeNext.index,
|
|
406
|
+
currentAgent: resumeAgents[0],
|
|
407
|
+
phase: 'executing',
|
|
408
|
+
state: 'in_progress',
|
|
409
|
+
awaitingHumanGate: false,
|
|
410
|
+
parallelCompleted: [],
|
|
411
|
+
});
|
|
412
|
+
if (resumeNext.step.parallel && resumeAgents.length > 1) out(handoffForParallelStep(resumeNext.step));
|
|
413
|
+
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope));
|
|
414
|
+
process.exit(0);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
writeStatus({
|
|
419
|
+
awaitingHumanGate: false,
|
|
420
|
+
state: status.state,
|
|
421
|
+
phase: status.phase,
|
|
422
|
+
});
|
|
423
|
+
process.stdout.write(JSON.stringify({ ok: true, action: 'end_human_gate', activeHumanGateEventId: status.activeHumanGateEventId || null }));
|
|
424
|
+
process.exit(0);
|
|
425
|
+
}
|
|
426
|
+
|
|
258
427
|
if (!fs.existsSync(pipelinePath)) {
|
|
259
428
|
legacyFlow();
|
|
260
429
|
}
|
|
@@ -267,6 +436,15 @@ try {
|
|
|
267
436
|
}
|
|
268
437
|
|
|
269
438
|
const steps = pipeline.steps || [];
|
|
439
|
+
const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
440
|
+
const initialStep = steps[initialIdx];
|
|
441
|
+
const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
|
|
442
|
+
const finishedAttempt = finishActiveAttempt();
|
|
443
|
+
if (!finishedAttempt && (hookInput.attemptId || activeAttemptCountBeforeFinish > 0)) {
|
|
444
|
+
process.stdout.write('{}');
|
|
445
|
+
process.exit(0);
|
|
446
|
+
}
|
|
447
|
+
endHumanGateIfResumed();
|
|
270
448
|
if (steps.length === 0 || pipeline.autoChain === false) {
|
|
271
449
|
process.stdout.write('{}');
|
|
272
450
|
process.exit(0);
|
|
@@ -277,38 +455,57 @@ if (status.awaitingHumanGate || status.state === 'awaiting_approval') {
|
|
|
277
455
|
process.exit(0);
|
|
278
456
|
}
|
|
279
457
|
|
|
458
|
+
function nearestPrecedingStepIndex(agent, fromIndex, fallback) {
|
|
459
|
+
for (let index = fromIndex - 1; index >= 0; index -= 1) {
|
|
460
|
+
if (getStepAgents(steps[index]).includes(agent)) return index;
|
|
461
|
+
}
|
|
462
|
+
const match = steps.findIndex((step) => getStepAgents(step).includes(agent));
|
|
463
|
+
return match >= 0 ? match : fallback;
|
|
464
|
+
}
|
|
465
|
+
function scheduleRetry(agent, retryAfterFix, predecessor, explicitStepIndex = null) {
|
|
466
|
+
const currentIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
467
|
+
const stepIndex = Number.isInteger(explicitStepIndex) ? explicitStepIndex : nearestPrecedingStepIndex(agent, currentIndex, currentIndex);
|
|
468
|
+
const predecessorAttemptId = predecessor?.attemptId || status.lastCompletedAttempt?.attemptId || null;
|
|
469
|
+
appendMetric({ type: 'retry_scheduled', at: now, attemptId: predecessorAttemptId, nextAgent: agent, retryAfterFix: retryAfterFix || null, source: 'hook', attributionConfidence: predecessor ? predecessor.confidence : 'unknown' });
|
|
470
|
+
activateAttempts(steps[stepIndex] || { agent }, stepIndex);
|
|
471
|
+
return stepIndex;
|
|
472
|
+
}
|
|
473
|
+
|
|
280
474
|
if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
|
|
281
475
|
const reviewer = status.currentAgent;
|
|
476
|
+
const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
477
|
+
const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
|
|
282
478
|
writeStatus({
|
|
479
|
+
pipelineIndex: developerIndex,
|
|
283
480
|
currentAgent: 'feature-developer',
|
|
284
481
|
state: 'in_progress',
|
|
285
482
|
phase: 'executing',
|
|
286
483
|
retryAfterFix: reviewer,
|
|
484
|
+
retryAfterFixStepIndex,
|
|
287
485
|
});
|
|
288
|
-
out(
|
|
289
|
-
handoffForAgent('feature-developer') +
|
|
290
|
-
` After fixes, re-run ${reviewer}.`,
|
|
291
|
-
);
|
|
486
|
+
out(handoffForAgent('feature-developer') + ` After fixes, re-run ${reviewer}.`);
|
|
292
487
|
process.exit(0);
|
|
293
488
|
}
|
|
294
489
|
|
|
295
490
|
if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
|
|
491
|
+
const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
492
|
+
const developerIndex = scheduleRetry('feature-developer', 'build-verifier', finishedAttempt);
|
|
296
493
|
writeStatus({
|
|
494
|
+
pipelineIndex: developerIndex,
|
|
297
495
|
currentAgent: 'feature-developer',
|
|
298
496
|
state: 'in_progress',
|
|
299
497
|
phase: 'executing',
|
|
300
498
|
retryAfterFix: 'build-verifier',
|
|
499
|
+
retryAfterFixStepIndex,
|
|
301
500
|
});
|
|
302
|
-
out(
|
|
303
|
-
handoffForAgent('feature-developer') +
|
|
304
|
-
` Read validation-report.md. After fixes, re-run build-verifier.`,
|
|
305
|
-
);
|
|
501
|
+
out(handoffForAgent('feature-developer') + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
306
502
|
process.exit(0);
|
|
307
503
|
}
|
|
308
504
|
|
|
309
505
|
if (status.state === 'completed' && status.retryAfterFix) {
|
|
310
506
|
const retry = status.retryAfterFix;
|
|
311
|
-
|
|
507
|
+
const retryIndex = scheduleRetry(retry, null, finishedAttempt, status.retryAfterFixStepIndex);
|
|
508
|
+
writeStatus({ pipelineIndex: retryIndex, currentAgent: retry, state: 'in_progress', retryAfterFix: null, retryAfterFixStepIndex: null });
|
|
312
509
|
out(handoffForAgent(retry));
|
|
313
510
|
process.exit(0);
|
|
314
511
|
}
|
|
@@ -321,7 +518,7 @@ if (!currentStep) {
|
|
|
321
518
|
process.exit(0);
|
|
322
519
|
}
|
|
323
520
|
|
|
324
|
-
const completedAgent = status.currentAgent || getStepAgents(currentStep)[0];
|
|
521
|
+
const completedAgent = finishedAttempt?.entry?.agent || status.currentAgent || getStepAgents(currentStep)[0];
|
|
325
522
|
const stepAgents = getStepAgents(currentStep);
|
|
326
523
|
|
|
327
524
|
if (currentStep.parallel && stepAgents.length > 1) {
|
|
@@ -339,6 +536,7 @@ if (currentStep.parallel && stepAgents.length > 1) {
|
|
|
339
536
|
}
|
|
340
537
|
|
|
341
538
|
if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
539
|
+
beginHumanGate();
|
|
342
540
|
writeStatus({
|
|
343
541
|
awaitingHumanGate: true,
|
|
344
542
|
state: 'awaiting_approval',
|
|
@@ -350,6 +548,7 @@ if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
|
350
548
|
|
|
351
549
|
const next = findNextExecutableStep(steps, idx + 1, taskDir);
|
|
352
550
|
if (!next) {
|
|
551
|
+
completeTaskMetrics();
|
|
353
552
|
writeStatus({
|
|
354
553
|
pipelineIndex: steps.length,
|
|
355
554
|
phase: 'done',
|
|
@@ -364,6 +563,7 @@ if (!next) {
|
|
|
364
563
|
const { step: nextStep, index: nextIdx } = next;
|
|
365
564
|
const nextAgents = getStepAgents(nextStep);
|
|
366
565
|
|
|
566
|
+
activateAttempts(nextStep, nextIdx);
|
|
367
567
|
writeStatus({
|
|
368
568
|
pipelineIndex: nextIdx,
|
|
369
569
|
currentAgent: nextAgents[0],
|
|
@@ -59,3 +59,9 @@ Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/java/ru
|
|
|
59
59
|
|
|
60
60
|
`architecture/`, `stack/`, `api-and-data/`, `testing/`, `tooling-and-review/`.
|
|
61
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 |
|
|
@@ -67,6 +67,10 @@ flowchart TD
|
|
|
67
67
|
|
|
68
68
|
**Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
|
|
69
69
|
|
|
70
|
+
## Metrics lifecycle
|
|
71
|
+
|
|
72
|
+
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`.
|
|
73
|
+
|
|
70
74
|
## status.json (pipeline mode)
|
|
71
75
|
|
|
72
76
|
```json
|
|
@@ -24,7 +24,7 @@ paths:
|
|
|
24
24
|
## Куда класть новое правило
|
|
25
25
|
|
|
26
26
|
1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
|
|
27
|
-
2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java`) → **stack-specific** (не в `_shared`).
|
|
27
|
+
2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (не в `_shared`).
|
|
28
28
|
3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
|
|
29
29
|
|
|
30
30
|
## SoT
|
|
@@ -17,7 +17,8 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
19
19
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
20
|
-
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
20
|
+
- `go` / `java` / `php-hexagonal` / `php-laravel` / `mcp-ts` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
21
|
+
- `mcp-ts` must not ship Go tool commands (`go test`, `go vet`, `golangci-lint`) or `integration-test-*` agents as required delivery gates.
|
|
21
22
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
22
23
|
|
|
23
24
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -35,16 +36,28 @@ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild`
|
|
|
35
36
|
- `xcuitest-test-` as handoff stems
|
|
36
37
|
- Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
|
|
37
38
|
|
|
38
|
-
## Forbidden in go / java hooks/agents (FAIL)
|
|
39
|
+
## Forbidden in go / java / php-hexagonal / php-laravel hooks/agents (FAIL)
|
|
39
40
|
|
|
40
|
-
Shared backend-stack bans (
|
|
41
|
+
Shared backend-stack bans (`go`, `java`, `php-hexagonal`, and `php-laravel`):
|
|
41
42
|
|
|
42
43
|
- `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
43
44
|
- Positive yarn recipes `lint:js` / `lint:css`
|
|
44
45
|
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
45
46
|
- Agent file `accessibility-reviewer` (no UI surface)
|
|
46
47
|
|
|
47
|
-
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`)
|
|
48
|
+
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`), `java-tooling` (`mvn test` / `./gradlew test`), or `php-tooling` (`php artisan test` / `composer test` / `vendor/bin/phpunit`).
|
|
49
|
+
|
|
50
|
+
## Forbidden in mcp-ts hooks/agents (FAIL)
|
|
51
|
+
|
|
52
|
+
Same UI/mobile bans as backend stacks, plus:
|
|
53
|
+
|
|
54
|
+
- `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
55
|
+
- Positive yarn recipes `lint:js` / `lint:css` as required gates
|
|
56
|
+
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
57
|
+
- Go tool commands as required MCP delivery gates: `go test`, `go vet`, `golangci-lint`
|
|
58
|
+
- Agent files: `playwright-test-*`, `xcuitest-test-*`, `integration-test-*`, `accessibility-reviewer`
|
|
59
|
+
|
|
60
|
+
Required instead: package-manager–discovered typecheck/test (`mcp-ts-tooling`, `post-change-test`); Phase 1 gates `build-verifier` + `security-reviewer`.
|
|
48
61
|
|
|
49
62
|
## Soft / document
|
|
50
63
|
|
|
@@ -53,4 +66,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` plus
|
|
|
53
66
|
|
|
54
67
|
## Chain fork
|
|
55
68
|
|
|
56
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `
|
|
69
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, `java`, `mcp-ts`, `php-hexagonal`, and `php-laravel` (per platform).
|
|
@@ -17,7 +17,7 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
- [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
|
|
19
19
|
- [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
|
|
20
|
-
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, and
|
|
20
|
+
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel — см. `preset-twin-sync`)
|
|
21
21
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
|
|
22
22
|
- [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
|
|
23
23
|
- [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
@@ -21,6 +21,9 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
21
21
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
22
22
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
23
23
|
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
24
|
+
| `mcp-ts` | `presets/cursor/mcp-ts/rules/*.mdc` | `presets/claude/mcp-ts/rules/<topic>/` | Keep in `claude/mcp-ts/rules/README.md` |
|
|
25
|
+
| `php-hexagonal` | `presets/cursor/php-hexagonal/rules/*.mdc` | `presets/claude/php-hexagonal/rules/<topic>/` | Keep in `claude/php-hexagonal/rules/README.md` |
|
|
26
|
+
| `php-laravel` | `presets/cursor/php-laravel/rules/*.mdc` | `presets/claude/php-laravel/rules/<topic>/` | Keep in `claude/php-laravel/rules/README.md` |
|
|
24
27
|
|
|
25
28
|
## Same-PR checklist
|
|
26
29
|
|
|
@@ -40,5 +43,8 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
40
43
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
41
44
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
42
45
|
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
46
|
+
- **mcp-ts:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java; mapping table required).
|
|
47
|
+
- **php-hexagonal:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts; mapping table required).
|
|
48
|
+
- **php-laravel:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go / java / mcp-ts / php-hexagonal; mapping table required).
|
|
43
49
|
|
|
44
50
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -17,4 +17,6 @@ paths:
|
|
|
17
17
|
|
|
18
18
|
**`commands/technical-retro.md`** → `/technical-retro`
|
|
19
19
|
|
|
20
|
+
When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
|
|
21
|
+
|
|
20
22
|
Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
|
|
@@ -25,3 +25,11 @@
|
|
|
25
25
|
| `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
|
|
26
26
|
|
|
27
27
|
**Never** schedule Playwright/XCUITest-only steps for this preset. Use `integration-test-*` (or QA with `e2e-only` = integration) for adapter-level coverage.
|
|
28
|
+
|
|
29
|
+
## Local metrics ledger
|
|
30
|
+
|
|
31
|
+
`metrics.json` is an append-only schema-v1 event ledger for one task run. It contains only allowlisted IDs, task dimensions, timestamps, outcomes, and attribution confidence—never prompts, secrets, file paths, or contents. The router writes `task_started` / `attempt_started`; the hook records host-clock completion and human-gate edges under a per-task lock with temp-and-rename.
|
|
32
|
+
|
|
33
|
+
`status.json.activeAttempts` is a transient timing bridge keyed by `attemptId`; `lastCompletedAttempt` is diagnostic. For parallel stops, the hook must use a stable payload identity or the sole active attempt. Otherwise an explicit `.metrics-receipts.json` receipt is fallback data marked `source: agent`, `attributionConfidence: fallback`; it must never guess from `currentAgent`.
|
|
34
|
+
|
|
35
|
+
Aggregate with `node packages/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .claude/team`. It reports role/agent count, completed count, total/average duration, distinct completed run IDs, separate human-gate wait, and incomplete artifacts.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# TypeScript MCP (Claude)
|
|
2
|
+
|
|
3
|
+
Preset for authoring TypeScript MCP servers with `@modelcontextprotocol/sdk`.
|
|
4
|
+
|
|
5
|
+
**Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root.
|
|
6
|
+
|
|
7
|
+
- Session-start: `mcp-ts-app-core`, `architecture/mcp-server-boundaries`, `code-quality` (exactly 3).
|
|
8
|
+
- Delivery: `architecture/feature-delivery.md` + skill `feature-delivery`.
|
|
9
|
+
- After TS edits: `tooling-and-review/post-change-test.md`.
|
|
10
|
+
- Contract checks: `mcp-contract-testing` rule (Phase 1: feature-developer owns verification).
|
|
11
|
+
- Never schedule Playwright / XCUITest / `accessibility-reviewer` / `integration-test-*`.
|
|
12
|
+
|
|
13
|
+
Init: `npx @bonesofspring/ai-rules init claude --preset mcp-ts` (also copies `REPO_AGENTS.md` → root `AGENTS.md`).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# MCP (preset `mcp-ts`, Claude)
|
|
2
|
+
|
|
3
|
+
Копируется в **корень проекта** как `.mcp.json` при `ai-rules init claude --preset mcp-ts`.
|
|
4
|
+
|
|
5
|
+
## Servers (active in shipped config)
|
|
6
|
+
|
|
7
|
+
| Name | Package | Зачем |
|
|
8
|
+
|------|---------|--------|
|
|
9
|
+
| `context7` | `@upstash/context7-mcp@3.2.5` (pinned in `mcp.json`) | Versioned docs for `@modelcontextprotocol/sdk` and related libraries |
|
|
10
|
+
|
|
11
|
+
**No** Figma, browser automation, or Playwright MCP in this preset.
|
|
12
|
+
|
|
13
|
+
### Upgrading Context7
|
|
14
|
+
|
|
15
|
+
Shipped `.mcp.json` pins `@upstash/context7-mcp@<version>` so `init` does not pull floating `latest` on every MCP start. To upgrade: bump the pin in both Cursor and Claude `mcp-ts/mcp.json`, note the version here, and smoke-check Context7 after dogfood sync.
|
|
16
|
+
|
|
17
|
+
## Inactive example — local server under development
|
|
18
|
+
|
|
19
|
+
> **INACTIVE — do not add to shipped `mcp.json` / `.mcp.json`.**
|
|
20
|
+
> A server-under-development cannot be valid at preset install time. Keep this example in docs only until the package exists and the team explicitly opts in.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"my-mcp-server": {
|
|
26
|
+
"command": "node",
|
|
27
|
+
"args": ["dist/index.js"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Adjust `command`/`args` to the project's `bin` / `npx` entry after packaging. Prefer stdio for local Cursor/Claude use.
|
|
34
|
+
|
|
35
|
+
Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении.
|
|
36
|
+
|
|
37
|
+
После init: Settings → MCP → включить серверы. `init` перезаписывает одноимённый MCP config.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Preset `mcp-ts` (Claude)
|
|
2
|
+
|
|
3
|
+
Installable guidance for **authoring TypeScript MCP servers** with `@modelcontextprotocol/sdk`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Claude topic rules are derived from Cursor SoT. Mapping: `rules/README.md`.
|
|
10
|
+
|
|
11
|
+
Session-start (exactly 3, no `paths:`): `mcp-ts-app-core`, `mcp-server-boundaries`, `code-quality`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# TypeScript MCP — agent instructions
|
|
2
|
+
|
|
3
|
+
Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md` and `.claude/CLAUDE.md`.
|
|
4
|
+
|
|
5
|
+
## Cross-tool setup
|
|
6
|
+
|
|
7
|
+
- Treat this file as the **shared** entry for any agent (Cursor, Claude Code, or other).
|
|
8
|
+
- Tool maps live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` when that tool is installed.
|
|
9
|
+
- Install:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @bonesofspring/ai-rules init cursor --preset mcp-ts
|
|
13
|
+
npx @bonesofspring/ai-rules init claude --preset mcp-ts
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). Living gotchas belong in `team/conventions.md`, not here.
|
|
17
|
+
|
|
18
|
+
## Commands (test / typecheck / build)
|
|
19
|
+
|
|
20
|
+
Discover the package manager from lockfile / `packageManager` (`mcp-ts-tooling`). Typical gates:
|
|
21
|
+
|
|
22
|
+
| Gate | Typical command |
|
|
23
|
+
|------|-----------------|
|
|
24
|
+
| Typecheck | `tsc --noEmit` or project `typecheck` script |
|
|
25
|
+
| Test | project `test` / `vitest` / `jest` script |
|
|
26
|
+
| Build | project `build` / `tsc` as configured |
|
|
27
|
+
| Package | validate `bin` / package entry for stdio server |
|
|
28
|
+
|
|
29
|
+
After code edits: invoke **`post-change-test`** (requestable). Full gate: agent `build-verifier`.
|
|
30
|
+
|
|
31
|
+
## Security basics
|
|
32
|
+
|
|
33
|
+
- Do not commit secrets (tokens, `.env`, private keys).
|
|
34
|
+
- Review destructive git before running; respect shell hooks.
|
|
35
|
+
- Do not weaken CI or skip hooks unless the user explicitly asks.
|
|
36
|
+
- Tool handlers must not log secrets or widen filesystem/network capability without AC.
|
|
37
|
+
|
|
38
|
+
## Tool entry points
|
|
39
|
+
|
|
40
|
+
| Tool | Map |
|
|
41
|
+
|------|-----|
|
|
42
|
+
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
43
|
+
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
44
|
+
|
|
45
|
+
Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
|
|
46
|
+
|
|
47
|
+
## Living conventions
|
|
48
|
+
|
|
49
|
+
Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init).
|