@bonesofspring/ai-rules 0.2.5 → 0.2.7
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 +68 -4
- package/README.md +21 -3
- package/bin/cli.js +30 -1
- package/package.json +9 -1
- package/presets/_shared/README.md +47 -0
- package/presets/_shared/core/agent-team/agent-team-intake.md +9 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +142 -0
- package/presets/_shared/core/architecture/feature-delivery-workflow.md +46 -0
- package/presets/_shared/core/architecture/reference-features.template.md +43 -0
- package/presets/_shared/core/meta/preset-layering.md +25 -0
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +43 -0
- package/presets/_shared/core/meta/preset-pr-checklist.md +28 -0
- package/presets/_shared/core/meta/preset-token-budget.md +30 -0
- package/presets/_shared/core/meta/preset-twin-sync.md +31 -0
- package/presets/_shared/core/quality/code-quality-and-refactoring.md +69 -0
- package/presets/_shared/core/quality/design-guidance.md +97 -0
- package/presets/_shared/core/review/code-review-mr.md +38 -0
- package/presets/_shared/core/review/technical-retro.md +7 -0
- package/presets/claude/go/CLAUDE.md +14 -0
- package/presets/claude/go/MCP.md +16 -0
- package/presets/claude/go/README.md +38 -0
- package/presets/claude/go/REPO_AGENTS.md +48 -0
- package/presets/claude/go/agents/README.md +32 -0
- package/presets/claude/go/agents/api-contract-reviewer.md +23 -0
- package/presets/claude/go/agents/build-verifier.md +35 -0
- package/presets/claude/go/agents/ci-investigator.md +17 -0
- package/presets/claude/go/agents/code-reviewer.md +40 -0
- package/presets/claude/go/agents/codebase-analyzer.md +28 -0
- package/presets/claude/go/agents/debugger.md +25 -0
- package/presets/claude/go/agents/feature-developer.md +43 -0
- package/presets/claude/go/agents/integration-test-generator.md +22 -0
- package/presets/claude/go/agents/integration-test-healer.md +22 -0
- package/presets/claude/go/agents/integration-test-planner.md +22 -0
- package/presets/claude/go/agents/migration-specialist.md +31 -0
- package/presets/claude/go/agents/performance-auditor.md +22 -0
- package/presets/claude/go/agents/qa-tester.md +24 -0
- package/presets/claude/go/agents/security-reviewer.md +20 -0
- package/presets/claude/go/agents/solution-architect.md +28 -0
- package/presets/claude/go/agents/task-analyst.md +25 -0
- package/presets/claude/go/agents/task-router.md +69 -0
- package/presets/claude/go/agents/tech-writer.md +15 -0
- package/presets/claude/go/agents/unit-test-generator.md +21 -0
- package/presets/claude/go/agents/unit-test-healer.md +13 -0
- package/presets/claude/go/agents/unit-test-planner.md +26 -0
- package/presets/claude/go/commands/README.md +13 -0
- package/presets/claude/go/commands/feature-continue.md +51 -0
- package/presets/claude/go/commands/feature-start.md +30 -0
- package/presets/claude/go/commands/task-continue.md +49 -0
- package/presets/claude/go/commands/task.md +49 -0
- package/presets/claude/go/commands/technical-retro.md +58 -0
- package/presets/claude/go/hooks/README.md +16 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +381 -0
- package/presets/claude/go/hooks/examples/README.md +18 -0
- package/presets/claude/go/hooks/examples/format-edited.example.sh +9 -0
- package/presets/claude/go/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/go/hooks/examples/test-on-save.example.sh +11 -0
- package/presets/claude/go/hooks/guard-shell-command.sh +79 -0
- package/presets/claude/go/mcp.json +12 -0
- package/presets/claude/go/rules/README.md +60 -0
- package/presets/claude/go/rules/api-and-data/README.md +14 -0
- package/presets/claude/go/rules/api-and-data/adapters-driven.md +34 -0
- package/presets/claude/go/rules/api-and-data/adapters-driving.md +35 -0
- package/presets/claude/go/rules/api-and-data/api-grpc.md +27 -0
- package/presets/claude/go/rules/api-and-data/api-http.md +33 -0
- package/presets/claude/go/rules/api-and-data/messaging-adapters.md +21 -0
- package/presets/claude/go/rules/api-and-data/persistence-adapters.md +28 -0
- package/presets/claude/go/rules/architecture/README.md +16 -0
- package/presets/claude/go/rules/architecture/application-usecases.md +29 -0
- package/presets/claude/go/rules/architecture/boundaries.md +29 -0
- package/presets/claude/go/rules/architecture/composition-root.md +28 -0
- package/presets/claude/go/rules/architecture/domain-layer.md +32 -0
- package/presets/claude/go/rules/architecture/feature-delivery.md +51 -0
- package/presets/claude/go/rules/architecture/module-public-api.md +23 -0
- package/presets/claude/go/rules/architecture/ports-interfaces.md +34 -0
- package/presets/claude/go/rules/architecture/reference-features.md +34 -0
- package/presets/claude/go/rules/stack/README.md +10 -0
- package/presets/claude/go/rules/stack/go-app-core.md +31 -0
- package/presets/claude/go/rules/stack/go-conventions.md +51 -0
- package/presets/claude/go/rules/testing/README.md +11 -0
- package/presets/claude/go/rules/testing/e2e.md +18 -0
- package/presets/claude/go/rules/testing/integration.md +23 -0
- package/presets/claude/go/rules/testing/unit.md +24 -0
- package/presets/claude/go/rules/tooling-and-review/README.md +21 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +25 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +161 -0
- package/presets/claude/go/rules/tooling-and-review/code-quality.md +83 -0
- package/presets/claude/go/rules/tooling-and-review/code-review.md +57 -0
- package/presets/claude/go/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/go/rules/tooling-and-review/go-tooling.md +38 -0
- package/presets/claude/go/rules/tooling-and-review/post-change-test.md +32 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +58 -0
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +42 -0
- package/presets/claude/go/rules/tooling-and-review/security-go.md +22 -0
- package/presets/claude/go/rules/tooling-and-review/technical-retro.md +19 -0
- package/presets/claude/go/rules/ui-and-accessibility/README.md +3 -0
- package/presets/claude/go/skills/README.md +5 -0
- package/presets/claude/go/skills/ci-investigation/SKILL.md +11 -0
- package/presets/claude/go/skills/code-review/SKILL.md +25 -0
- package/presets/claude/go/skills/debug-investigation/SKILL.md +15 -0
- package/presets/claude/go/skills/feature-delivery/SKILL.md +30 -0
- package/presets/claude/go/skills/integration-testing/SKILL.md +15 -0
- package/presets/claude/go/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/go/skills/unit-testing/SKILL.md +14 -0
- package/presets/claude/go/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/go/team/README.md +27 -0
- package/presets/claude/go/team/conventions.md +21 -0
- package/presets/claude/go/team/fixtures/bugfix-standard.json +37 -0
- package/presets/claude/go/team/fixtures/feature-full.json +43 -0
- package/presets/claude/go/team/fixtures/feature-light.json +17 -0
- package/presets/claude/ios-swift/CLAUDE.md +4 -1
- package/presets/claude/ios-swift/README.md +12 -1
- package/presets/claude/ios-swift/REPO_AGENTS.md +46 -0
- package/presets/claude/ios-swift/agents/README.md +3 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +23 -8
- package/presets/claude/ios-swift/agents/code-reviewer.md +4 -0
- package/presets/claude/ios-swift/agents/codebase-analyzer.md +28 -0
- package/presets/claude/ios-swift/agents/debugger.md +4 -0
- package/presets/claude/ios-swift/agents/feature-developer.md +17 -0
- package/presets/claude/ios-swift/agents/migration-specialist.md +4 -0
- package/presets/claude/ios-swift/agents/performance-auditor.md +4 -0
- package/presets/claude/ios-swift/agents/qa-tester.md +4 -0
- package/presets/claude/ios-swift/agents/solution-architect.md +4 -0
- package/presets/claude/ios-swift/agents/task-analyst.md +4 -0
- package/presets/claude/ios-swift/agents/unit-test-generator.md +4 -0
- package/presets/claude/ios-swift/agents/unit-test-healer.md +4 -0
- package/presets/claude/ios-swift/agents/unit-test-planner.md +4 -0
- package/presets/claude/ios-swift/hooks/README.md +6 -0
- package/presets/claude/ios-swift/hooks/examples/README.md +18 -0
- package/presets/claude/ios-swift/hooks/examples/format-edited.example.sh +13 -0
- package/presets/claude/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/claude/ios-swift/rules/README.md +24 -2
- package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +5 -0
- package/presets/claude/ios-swift/rules/architecture/reference-features.md +9 -0
- package/presets/claude/ios-swift/rules/stack/swift-conventions.md +12 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +3 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +8 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +64 -20
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +42 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +42 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +5 -3
- package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +8 -0
- package/presets/claude/ios-swift/skills/README.md +1 -0
- package/presets/claude/ios-swift/skills/code-review/SKILL.md +14 -2
- package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +4 -0
- package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +8 -0
- package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +46 -2
- package/presets/claude/ios-swift/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/ios-swift/team/conventions.md +21 -0
- package/presets/claude/next/CLAUDE.md +5 -1
- package/presets/claude/next/README.md +14 -1
- package/presets/claude/next/REPO_AGENTS.md +48 -0
- package/presets/claude/next/agents/README.md +7 -1
- package/presets/claude/next/agents/build-verifier.md +29 -0
- package/presets/claude/next/agents/code-reviewer.md +4 -0
- package/presets/claude/next/agents/codebase-analyzer.md +28 -0
- package/presets/claude/next/agents/debugger.md +4 -0
- package/presets/claude/next/agents/feature-developer.md +17 -0
- package/presets/claude/next/agents/migration-specialist.md +4 -0
- package/presets/claude/next/agents/performance-auditor.md +4 -0
- package/presets/claude/next/agents/qa-tester.md +4 -0
- package/presets/claude/next/agents/security-reviewer.md +4 -2
- package/presets/claude/next/agents/solution-architect.md +4 -0
- package/presets/claude/next/agents/task-analyst.md +4 -0
- package/presets/claude/next/agents/unit-test-generator.md +4 -0
- package/presets/claude/next/agents/unit-test-healer.md +4 -0
- package/presets/claude/next/agents/unit-test-planner.md +4 -0
- package/presets/claude/next/hooks/README.md +6 -0
- package/presets/claude/next/hooks/examples/README.md +18 -0
- package/presets/claude/next/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/next/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/next/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/claude/next/rules/README.md +75 -21
- package/presets/claude/next/rules/api-and-data/api-services.md +22 -0
- package/presets/claude/next/rules/api-and-data/http-client.md +21 -0
- package/presets/claude/next/rules/api-and-data/store-rtk.md +20 -0
- package/presets/claude/next/rules/architecture/architecture-boundaries.md +28 -0
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -0
- package/presets/claude/next/rules/architecture/layer-barrel-exports.md +15 -0
- package/presets/claude/next/rules/architecture/public-imports.md +14 -0
- package/presets/claude/next/rules/architecture/reference-features.md +9 -0
- package/presets/claude/next/rules/stack/arrow-functions.md +13 -28
- package/presets/claude/next/rules/stack/next-app-router.md +13 -1
- package/presets/claude/next/rules/testing/tests-unit.md +13 -0
- package/presets/claude/next/rules/tooling-and-review/README.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +3 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +8 -1
- package/presets/claude/next/rules/tooling-and-review/code-quality.md +58 -20
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +39 -8
- package/presets/claude/next/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +54 -0
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +42 -0
- package/presets/claude/next/rules/tooling-and-review/security-next.md +57 -0
- package/presets/claude/next/rules/tooling-and-review/technical-retro.md +16 -0
- package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +21 -0
- package/presets/claude/next/skills/README.md +2 -0
- package/presets/claude/next/skills/code-review/SKILL.md +14 -2
- package/presets/claude/next/skills/debug-investigation/SKILL.md +4 -0
- package/presets/claude/next/skills/feature-delivery/SKILL.md +8 -0
- package/presets/claude/next/skills/react-performance/SKILL.md +44 -0
- package/presets/claude/next/skills/technical-retro/SKILL.md +19 -5
- package/presets/claude/next/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/next/team/conventions.md +21 -0
- package/presets/cursor/go/AGENTS.md +30 -0
- package/presets/cursor/go/BUGBOT.md +9 -0
- package/presets/cursor/go/MCP.md +16 -0
- package/presets/cursor/go/README.md +39 -0
- package/presets/cursor/go/REPO_AGENTS.md +48 -0
- package/presets/cursor/go/agents/README.md +36 -0
- package/presets/cursor/go/agents/api-contract-reviewer.md +23 -0
- package/presets/cursor/go/agents/build-verifier.md +35 -0
- package/presets/cursor/go/agents/ci-investigator.md +17 -0
- package/presets/cursor/go/agents/code-reviewer.md +40 -0
- package/presets/cursor/go/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/go/agents/debugger.md +25 -0
- package/presets/cursor/go/agents/feature-developer.md +43 -0
- package/presets/cursor/go/agents/integration-test-generator.md +22 -0
- package/presets/cursor/go/agents/integration-test-healer.md +22 -0
- package/presets/cursor/go/agents/integration-test-planner.md +22 -0
- package/presets/cursor/go/agents/migration-specialist.md +31 -0
- package/presets/cursor/go/agents/performance-auditor.md +22 -0
- package/presets/cursor/go/agents/qa-tester.md +24 -0
- package/presets/cursor/go/agents/security-reviewer.md +20 -0
- package/presets/cursor/go/agents/solution-architect.md +28 -0
- package/presets/cursor/go/agents/task-analyst.md +25 -0
- package/presets/cursor/go/agents/task-router.md +69 -0
- package/presets/cursor/go/agents/tech-writer.md +15 -0
- package/presets/cursor/go/agents/unit-test-generator.md +21 -0
- package/presets/cursor/go/agents/unit-test-healer.md +13 -0
- package/presets/cursor/go/agents/unit-test-planner.md +26 -0
- package/presets/cursor/go/commands/README.md +54 -0
- package/presets/cursor/go/commands/feature-continue.md +19 -0
- package/presets/cursor/go/commands/feature-start.md +33 -0
- package/presets/cursor/go/commands/task-continue.md +49 -0
- package/presets/cursor/go/commands/task.md +49 -0
- package/presets/cursor/go/commands/technical-retro.md +81 -0
- package/presets/cursor/go/hooks/README.md +12 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +381 -0
- package/presets/cursor/go/hooks/examples/README.md +18 -0
- package/presets/cursor/go/hooks/examples/format-edited.example.sh +9 -0
- package/presets/cursor/go/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/go/hooks/examples/test-on-save.example.sh +11 -0
- package/presets/cursor/go/hooks/guard-shell-command.sh +79 -0
- package/presets/cursor/go/hooks.json +17 -0
- package/presets/cursor/go/mcp.json +11 -0
- package/presets/cursor/go/rules/README.md +89 -0
- package/presets/cursor/go/rules/adapters-driven.mdc +35 -0
- package/presets/cursor/go/rules/adapters-driving.mdc +36 -0
- package/presets/cursor/go/rules/agent-team-intake.mdc +20 -0
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +156 -0
- package/presets/cursor/go/rules/api-grpc.mdc +28 -0
- package/presets/cursor/go/rules/api-http.mdc +34 -0
- package/presets/cursor/go/rules/application-usecases.mdc +30 -0
- package/presets/cursor/go/rules/architecture-boundaries.mdc +30 -0
- package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +84 -0
- package/presets/cursor/go/rules/code-review-mr.mdc +52 -0
- package/presets/cursor/go/rules/composition-root.mdc +29 -0
- package/presets/cursor/go/rules/design-guidance.mdc +111 -0
- package/presets/cursor/go/rules/domain-layer.mdc +33 -0
- package/presets/cursor/go/rules/feature-delivery-workflow.mdc +46 -0
- package/presets/cursor/go/rules/go-app-core.mdc +32 -0
- package/presets/cursor/go/rules/go-conventions.mdc +52 -0
- package/presets/cursor/go/rules/go-tooling.mdc +33 -0
- package/presets/cursor/go/rules/messaging-adapters.mdc +22 -0
- package/presets/cursor/go/rules/module-public-api.mdc +24 -0
- package/presets/cursor/go/rules/persistence-adapters.mdc +29 -0
- package/presets/cursor/go/rules/ports-interfaces.mdc +35 -0
- package/presets/cursor/go/rules/post-change-test.mdc +27 -0
- package/presets/cursor/go/rules/preset-layering.mdc +36 -0
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +58 -0
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/go/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/go/rules/preset-twin-sync.mdc +42 -0
- package/presets/cursor/go/rules/reference-features.mdc +35 -0
- package/presets/cursor/go/rules/security-go.mdc +23 -0
- package/presets/cursor/go/rules/technical-retro.mdc +14 -0
- package/presets/cursor/go/rules/tests-e2e.mdc +19 -0
- package/presets/cursor/go/rules/tests-integration.mdc +24 -0
- package/presets/cursor/go/rules/tests-unit.mdc +25 -0
- package/presets/cursor/go/skills/README.md +5 -0
- package/presets/cursor/go/skills/ci-investigation/SKILL.md +11 -0
- package/presets/cursor/go/skills/code-review/SKILL.md +25 -0
- package/presets/cursor/go/skills/debug-investigation/SKILL.md +15 -0
- package/presets/cursor/go/skills/feature-delivery/SKILL.md +30 -0
- package/presets/cursor/go/skills/integration-testing/SKILL.md +15 -0
- package/presets/cursor/go/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/go/skills/unit-testing/SKILL.md +14 -0
- package/presets/cursor/go/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/go/team/README.md +31 -0
- package/presets/cursor/go/team/conventions.md +21 -0
- package/presets/cursor/go/team/fixtures/bugfix-standard.json +37 -0
- package/presets/cursor/go/team/fixtures/feature-full.json +43 -0
- package/presets/cursor/go/team/fixtures/feature-light.json +17 -0
- package/presets/cursor/ios-swift/AGENTS.md +5 -2
- package/presets/cursor/ios-swift/README.md +13 -5
- package/presets/cursor/ios-swift/REPO_AGENTS.md +46 -0
- package/presets/cursor/ios-swift/agents/README.md +3 -2
- package/presets/cursor/ios-swift/agents/build-verifier.md +23 -8
- package/presets/cursor/ios-swift/agents/code-reviewer.md +4 -0
- package/presets/cursor/ios-swift/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/ios-swift/agents/debugger.md +4 -0
- package/presets/cursor/ios-swift/agents/feature-developer.md +17 -0
- package/presets/cursor/ios-swift/agents/migration-specialist.md +4 -0
- package/presets/cursor/ios-swift/agents/performance-auditor.md +4 -0
- package/presets/cursor/ios-swift/agents/qa-tester.md +4 -0
- package/presets/cursor/ios-swift/agents/solution-architect.md +4 -0
- package/presets/cursor/ios-swift/agents/task-analyst.md +4 -0
- package/presets/cursor/ios-swift/agents/unit-test-generator.md +4 -0
- package/presets/cursor/ios-swift/agents/unit-test-healer.md +4 -0
- package/presets/cursor/ios-swift/agents/unit-test-planner.md +4 -0
- package/presets/cursor/ios-swift/commands/README.md +1 -1
- package/presets/cursor/ios-swift/hooks/README.md +4 -0
- package/presets/cursor/ios-swift/hooks/examples/README.md +18 -0
- package/presets/cursor/ios-swift/hooks/examples/format-edited.example.sh +13 -0
- package/presets/cursor/ios-swift/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/ios-swift/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/cursor/ios-swift/rules/README.md +23 -2
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +3 -3
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +9 -3
- package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +64 -20
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +41 -0
- package/presets/cursor/ios-swift/rules/design-guidance.mdc +111 -0
- package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +6 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +36 -0
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +54 -0
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +42 -0
- package/presets/cursor/ios-swift/rules/reference-features.mdc +10 -0
- package/presets/cursor/ios-swift/rules/swift-conventions.mdc +12 -2
- package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +8 -0
- package/presets/cursor/ios-swift/rules/technical-retro.mdc +4 -2
- package/presets/cursor/ios-swift/skills/README.md +1 -0
- package/presets/cursor/ios-swift/skills/code-review/SKILL.md +14 -2
- package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +4 -0
- package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +8 -0
- package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +46 -2
- package/presets/cursor/ios-swift/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/ios-swift/team/conventions.md +21 -0
- package/presets/cursor/next/AGENTS.md +5 -2
- package/presets/cursor/next/README.md +47 -0
- package/presets/cursor/next/REPO_AGENTS.md +48 -0
- package/presets/cursor/next/agents/README.md +7 -1
- package/presets/cursor/next/agents/build-verifier.md +29 -0
- package/presets/cursor/next/agents/code-reviewer.md +4 -0
- package/presets/cursor/next/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/next/agents/debugger.md +4 -0
- package/presets/cursor/next/agents/feature-developer.md +17 -0
- package/presets/cursor/next/agents/migration-specialist.md +4 -0
- package/presets/cursor/next/agents/performance-auditor.md +4 -0
- package/presets/cursor/next/agents/qa-tester.md +4 -0
- package/presets/cursor/next/agents/security-reviewer.md +4 -2
- package/presets/cursor/next/agents/solution-architect.md +4 -0
- package/presets/cursor/next/agents/task-analyst.md +4 -0
- package/presets/cursor/next/agents/unit-test-generator.md +4 -0
- package/presets/cursor/next/agents/unit-test-healer.md +4 -0
- package/presets/cursor/next/agents/unit-test-planner.md +4 -0
- package/presets/cursor/next/commands/README.md +1 -1
- package/presets/cursor/next/hooks/README.md +4 -0
- package/presets/cursor/next/hooks/examples/README.md +18 -0
- package/presets/cursor/next/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/next/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/next/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/cursor/next/rules/README.md +24 -3
- package/presets/cursor/next/rules/agent-team-intake.mdc +3 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +9 -3
- package/presets/cursor/next/rules/api-services.mdc +21 -0
- package/presets/cursor/next/rules/architecture-boundaries.mdc +27 -0
- package/presets/cursor/next/rules/arrow-functions.mdc +13 -28
- package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +55 -18
- package/presets/cursor/next/rules/code-review-mr.mdc +39 -9
- package/presets/cursor/next/rules/design-guidance.mdc +111 -0
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +6 -0
- package/presets/cursor/next/rules/http-client.mdc +21 -0
- package/presets/cursor/next/rules/layer-barrel-exports.mdc +15 -0
- package/presets/cursor/next/rules/next-app-router.mdc +13 -1
- package/presets/cursor/next/rules/preset-layering.mdc +36 -0
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +54 -0
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/next/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/next/rules/preset-twin-sync.mdc +42 -0
- package/presets/cursor/next/rules/public-imports.mdc +14 -0
- package/presets/cursor/next/rules/react-ui.mdc +20 -0
- package/presets/cursor/next/rules/reference-features.mdc +10 -0
- package/presets/cursor/next/rules/security-next.mdc +57 -0
- package/presets/cursor/next/rules/store-rtk.mdc +19 -0
- package/presets/cursor/next/rules/technical-retro.mdc +5 -3
- package/presets/cursor/next/rules/tests-unit.mdc +12 -0
- package/presets/cursor/next/skills/README.md +2 -0
- package/presets/cursor/next/skills/code-review/SKILL.md +14 -2
- package/presets/cursor/next/skills/debug-investigation/SKILL.md +4 -0
- package/presets/cursor/next/skills/feature-delivery/SKILL.md +8 -0
- package/presets/cursor/next/skills/react-performance/SKILL.md +44 -0
- package/presets/cursor/next/skills/technical-retro/SKILL.md +19 -5
- package/presets/cursor/next/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/next/team/conventions.md +21 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-continue
|
|
3
|
+
description: Continue an agent-team task after a human gate, pause, or review changes request using pipeline.json and status.json.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task continue — после human gate или паузы
|
|
7
|
+
|
|
8
|
+
Продолжение пайплайна из `pipeline.json`. Алиас по смыслу: `/feature-continue`.
|
|
9
|
+
|
|
10
|
+
## Аргументы
|
|
11
|
+
|
|
12
|
+
`<slug>` — идентификатор задачи.
|
|
13
|
+
|
|
14
|
+
## Preconditions
|
|
15
|
+
|
|
16
|
+
1. Прочитай `.cursor/team/tasks/<slug>/pipeline.json` и `status.json`.
|
|
17
|
+
2. Продолжай если:
|
|
18
|
+
- `awaitingHumanGate: true` или `state: awaiting_approval`, **или**
|
|
19
|
+
- `state: changes_requested` (после review), **или**
|
|
20
|
+
- задача прервана и нужно возобновить с `pipelineIndex`.
|
|
21
|
+
|
|
22
|
+
## Алгоритм
|
|
23
|
+
|
|
24
|
+
1. Запиши `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`.
|
|
25
|
+
2. Сбрось gate: `awaitingHumanGate: false`.
|
|
26
|
+
3. Определи **следующий шаг**:
|
|
27
|
+
- После approval analyst/architect: `pipelineIndex + 1` → следующий agent в `steps`.
|
|
28
|
+
- После `changes_requested`: снова **feature-developer** (тот же index или найди developer в steps).
|
|
29
|
+
4. Обнови `status.json`:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"pipelineIndex": <n>,
|
|
33
|
+
"currentAgent": "<steps[n].agent>",
|
|
34
|
+
"phase": "executing",
|
|
35
|
+
"state": "in_progress",
|
|
36
|
+
"awaitingHumanGate": false
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
5. Вызови subagent для `currentAgent` с контекстом slug и артефактов.
|
|
40
|
+
6. Hook `chain-team-phases.sh` продолжит цепочку по `pipeline.json`, если `autoChain: true`.
|
|
41
|
+
|
|
42
|
+
## Артефакты для handoff
|
|
43
|
+
|
|
44
|
+
| Agent | Прочитать |
|
|
45
|
+
|-------|-----------|
|
|
46
|
+
| feature-developer | brief.md, decomposition.md, validation-report.md (if retry), review.md (if retry), architecture.md |
|
|
47
|
+
| build-verifier | git diff, decomposition.md |
|
|
48
|
+
| code-reviewer | brief.md, validation-report.md, git diff |
|
|
49
|
+
| qa-tester | brief.md, decomposition.md, scope from pipeline step |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task
|
|
3
|
+
description: Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task — единая точка входа (router + pipeline)
|
|
7
|
+
|
|
8
|
+
Главная команда для постановки задачи. Родительский агент = оркестратор (`agent-team-orchestrator.mdc`). Intake для work-запросов без `/task` — `agent-team-intake.mdc`.
|
|
9
|
+
|
|
10
|
+
## Аргументы
|
|
11
|
+
|
|
12
|
+
Всё после `/task` — описание задачи на естественном языке.
|
|
13
|
+
|
|
14
|
+
Примеры:
|
|
15
|
+
|
|
16
|
+
- `/task Добавить use case отмены заказа`
|
|
17
|
+
- `/task Handler падает при пустом body — пофикси`
|
|
18
|
+
- `/task CI упал на go test в PR`
|
|
19
|
+
- `/task Миграция на новый Go / обновление модуля`
|
|
20
|
+
- `/task Покрой unit-тестами OrderService`
|
|
21
|
+
- `/task Напиши changelog для релиза фильтров`
|
|
22
|
+
- `/task Сделай ревью моих изменений в internal/application`
|
|
23
|
+
- `/task Напиши integration tests для persistence adapter`
|
|
24
|
+
|
|
25
|
+
## Алгоритм
|
|
26
|
+
|
|
27
|
+
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/` через **Write** (например сразу `status.json` или пустой placeholder) — **не** через Shell `mkdir` (песочница → `Operation not permitted`).
|
|
28
|
+
2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
|
|
29
|
+
3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
|
|
30
|
+
4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
|
|
31
|
+
5. **Старт** — вызови subagent для `pipeline.steps[0].agent`:
|
|
32
|
+
- передай slug, пути к артефактам, scope из step (если есть);
|
|
33
|
+
- обнови `status.json`: `pipelineIndex: 0`, `currentAgent`, `state: in_progress`.
|
|
34
|
+
6. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
|
|
35
|
+
|
|
36
|
+
## Не делать
|
|
37
|
+
|
|
38
|
+
- Не вызывать developer до router и (если в pipeline) analyst/architect.
|
|
39
|
+
- Не hardcode порядок ролей — только `pipeline.json`.
|
|
40
|
+
- Не пропускать human gate без явного continue.
|
|
41
|
+
|
|
42
|
+
## Если slug занят
|
|
43
|
+
|
|
44
|
+
- `awaitingHumanGate` / `state: awaiting_approval` → предложи ревью артефактов или `/task-continue <slug>`.
|
|
45
|
+
- `in_progress` → спроси: продолжить или новый slug.
|
|
46
|
+
|
|
47
|
+
## Legacy
|
|
48
|
+
|
|
49
|
+
`/feature-start` и `/feature-continue` остаются совместимыми; для новых задач предпочитай `/task`.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-retro
|
|
3
|
+
description: Facilitate a technical retrospective for a period, incident, release, or completed agent-team task slug.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Техническое ретро
|
|
7
|
+
|
|
8
|
+
Агент выступает как **нейтральный фасилитатор технической ретроспективы**, а не как ревьюер кода или оценщик людей. Используй skill **`technical-retro`** как основной сценарий.
|
|
9
|
+
|
|
10
|
+
## Когда включать
|
|
11
|
+
|
|
12
|
+
- Пользователь просит: «ретро», «техническое ретро», «разбор спринта/итерации», «action items после релиза».
|
|
13
|
+
- После завершения пайплайна команды агентов (`/feature-start` → `/feature-continue`).
|
|
14
|
+
- Есть контекст: период, тема (релиз, инцидент), slug задачи, заметки.
|
|
15
|
+
|
|
16
|
+
## Входные данные (собрать, не выдумывать)
|
|
17
|
+
|
|
18
|
+
Запросить при нехватке:
|
|
19
|
+
|
|
20
|
+
- **Период и фокус**.
|
|
21
|
+
- **Slug задачи** (если ретро по работе команды агентов).
|
|
22
|
+
- **Участники/роли** (если важно).
|
|
23
|
+
- **Ограничения**: время, формат (async vs синхрон).
|
|
24
|
+
|
|
25
|
+
### Артефакты команды агентов (если есть slug)
|
|
26
|
+
|
|
27
|
+
Прочитать из репозитория:
|
|
28
|
+
|
|
29
|
+
- `.cursor/team/tasks/<slug>/pipeline.json`
|
|
30
|
+
- `.cursor/team/tasks/<slug>/brief.md`
|
|
31
|
+
- `.cursor/team/tasks/<slug>/decomposition.md`
|
|
32
|
+
- `.cursor/team/tasks/<slug>/status.json`
|
|
33
|
+
- Git diff / `git status` для изменённых файлов
|
|
34
|
+
|
|
35
|
+
Не приписывать факты, которых нет в артефактах, diff или сообщении пользователя.
|
|
36
|
+
|
|
37
|
+
## Принципы фасилитации
|
|
38
|
+
|
|
39
|
+
- **Безопасность**: процесс и система, не «виноватые».
|
|
40
|
+
- **Конкретика**: от абстракций к наблюдаемым событиям.
|
|
41
|
+
- **Баланс**: позитив и зоны роста.
|
|
42
|
+
- **Action items**: владелец и срок у каждого.
|
|
43
|
+
- **Не смешивать с code review** — развести блоки, если запросили оба.
|
|
44
|
+
|
|
45
|
+
## Структура сессии (по умолчанию)
|
|
46
|
+
|
|
47
|
+
1. **Цель и рамки**.
|
|
48
|
+
2. **Сбор фактов**: хорошо / мешало / сюрпризы.
|
|
49
|
+
3. **Группировка тем** (3–7).
|
|
50
|
+
4. **Корневые причины** для 1–2 болезненных тем.
|
|
51
|
+
5. **Эксперименты** (1–3 изменения процесса).
|
|
52
|
+
6. **Action items**: что / владелец / до когда / критерий успеха.
|
|
53
|
+
|
|
54
|
+
## Блок «Работа агентов» (обязателен при slug)
|
|
55
|
+
|
|
56
|
+
Если ретро связано с пайплайном `/feature-start`:
|
|
57
|
+
|
|
58
|
+
| Вопрос | Что фиксировать |
|
|
59
|
+
|--------|-----------------|
|
|
60
|
+
| Router | Ошибка intent, лишние/пропущенные steps в pipeline |
|
|
61
|
+
| Аналитик | Ошибки в assumptions, пропущенные AC, лишние/недостающие таски |
|
|
62
|
+
| Декомпозиция | Неполное покрытие слоёв, неверный порядок, blocked-зависимости |
|
|
63
|
+
| Developer | Scope creep, пропущенные правила, lint/type gaps |
|
|
64
|
+
| Reviewer | Пропущенные дефекты, false positives, качество чеклиста |
|
|
65
|
+
| QA | Покрытие AC тестами, flakiness, пробелы в e2e планах |
|
|
66
|
+
|
|
67
|
+
**Action items** в этом блоке — на улучшение **промптов, subagents и rules** (не только кода).
|
|
68
|
+
|
|
69
|
+
## Формат ответа
|
|
70
|
+
|
|
71
|
+
- Шапка: период, фокус, slug (если есть), допущения.
|
|
72
|
+
- Повестка по этапам.
|
|
73
|
+
- Блок **«Работа агентов»** (если применимо).
|
|
74
|
+
- Темы — буллеты; спорное — **вопросы команде**.
|
|
75
|
+
- **Action items** в конце.
|
|
76
|
+
|
|
77
|
+
## Ограничения
|
|
78
|
+
|
|
79
|
+
- Не приписывать цитаты и факты без входа.
|
|
80
|
+
- Не выдавать HR‑рекомендации.
|
|
81
|
+
- Если просят только шаблон — **шаблон повестки** без выдуманного контента.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `.cursor/hooks` (preset go)
|
|
2
|
+
|
|
3
|
+
| File | Purpose |
|
|
4
|
+
|------|---------|
|
|
5
|
+
| `guard-shell-command.sh` | Destructive git / JS package-manager mismatch; **does not** block `go test` / `go vet` / `golangci-lint` / `staticcheck` |
|
|
6
|
+
| `chain-team-phases.sh` | Auto-chain pipeline steps on `subagentStop` |
|
|
7
|
+
|
|
8
|
+
See root `hooks.json` for registration (`beforeShellExecution`, `subagentStop`).
|
|
9
|
+
|
|
10
|
+
## Optional cookbook
|
|
11
|
+
|
|
12
|
+
See `hooks/examples/README.md` — secret-guard / format-edited / test-on-save. **Not** in default `hooks.json`.
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# preset: go (hexagonal) — chain handoffs use integration-test-* + go test
|
|
3
|
+
# Chains agent team steps from pipeline.json after subagentStop.
|
|
4
|
+
# Falls back to legacy phase-based flow when pipeline.json is absent.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
input=$(cat)
|
|
9
|
+
|
|
10
|
+
INPUT="$input" node <<'NODE'
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
const TEAM_ROOT = path.join(process.cwd(), '.cursor', 'team');
|
|
15
|
+
|
|
16
|
+
const inputRaw = process.env.INPUT || '';
|
|
17
|
+
let hookInput;
|
|
18
|
+
try {
|
|
19
|
+
hookInput = JSON.parse(inputRaw);
|
|
20
|
+
} catch {
|
|
21
|
+
process.stdout.write('{}');
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (hookInput.status !== 'completed') {
|
|
26
|
+
process.stdout.write('{}');
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const activePath = path.join(TEAM_ROOT, 'active-task.json');
|
|
31
|
+
|
|
32
|
+
if (!fs.existsSync(activePath)) {
|
|
33
|
+
process.stdout.write('{}');
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let active;
|
|
38
|
+
try {
|
|
39
|
+
active = JSON.parse(fs.readFileSync(activePath, 'utf8'));
|
|
40
|
+
} catch {
|
|
41
|
+
process.stdout.write('{}');
|
|
42
|
+
process.exit(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const slug = active.slug;
|
|
46
|
+
if (!slug) {
|
|
47
|
+
process.stdout.write('{}');
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const taskDir = path.join(TEAM_ROOT, 'tasks', slug);
|
|
52
|
+
const statusPath = path.join(taskDir, 'status.json');
|
|
53
|
+
const pipelinePath = path.join(taskDir, 'pipeline.json');
|
|
54
|
+
|
|
55
|
+
if (!fs.existsSync(statusPath)) {
|
|
56
|
+
process.stdout.write('{}');
|
|
57
|
+
process.exit(0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let status;
|
|
61
|
+
try {
|
|
62
|
+
status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
|
|
63
|
+
} catch {
|
|
64
|
+
process.stdout.write('{}');
|
|
65
|
+
process.exit(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const now = new Date().toISOString();
|
|
69
|
+
|
|
70
|
+
function writeStatus(next) {
|
|
71
|
+
status = { ...status, ...next, slug, updatedAt: now };
|
|
72
|
+
fs.writeFileSync(statusPath, JSON.stringify(status, null, 2) + '\n');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function out(message) {
|
|
76
|
+
process.stdout.write(JSON.stringify({ followup_message: message }));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function readArtifact(name) {
|
|
80
|
+
const p = path.join(taskDir, name);
|
|
81
|
+
if (!fs.existsSync(p)) return '';
|
|
82
|
+
try {
|
|
83
|
+
return fs.readFileSync(p, 'utf8');
|
|
84
|
+
} catch {
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getStepAgents(step) {
|
|
90
|
+
if (!step) return [];
|
|
91
|
+
return Array.isArray(step.agent) ? step.agent : [step.agent];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function skipIfMatches(skipIf, dir) {
|
|
95
|
+
if (!skipIf) return false;
|
|
96
|
+
if (skipIf === 'debugger.fixed') {
|
|
97
|
+
const text = readArtifact('debug-report.md');
|
|
98
|
+
return /fixApplied:\s*true/i.test(text) || /\*\*Fix applied:\*\*\s*true/i.test(text);
|
|
99
|
+
}
|
|
100
|
+
if (skipIf === 'ci-investigator.resolved') {
|
|
101
|
+
const text = readArtifact('ci-report.md');
|
|
102
|
+
return /fixApplied:\s*true/i.test(text) || /## Verdict\s*\nPASS/i.test(text);
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function findNextExecutableStep(steps, startIdx, dir) {
|
|
108
|
+
for (let i = startIdx; i < steps.length; i++) {
|
|
109
|
+
if (!skipIfMatches(steps[i].skipIf, dir)) {
|
|
110
|
+
return { step: steps[i], index: i };
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const AGENT_HANDOFF = {
|
|
117
|
+
'task-analyst': (s) =>
|
|
118
|
+
`Invoke task-analyst for slug "${s}". Write brief.md and decomposition.md under .cursor/team/tasks/${s}/. ` +
|
|
119
|
+
`Set status.json: phase executing, state awaiting_approval if human gate applies. Do not use legacy phase analysis.`,
|
|
120
|
+
debugger: (s) =>
|
|
121
|
+
`Invoke debugger subagent for slug "${s}". Investigate root cause with go test/logs; write debug-report.md with fixApplied: true/false. ` +
|
|
122
|
+
`Update status.json when done.`,
|
|
123
|
+
'solution-architect': (s) =>
|
|
124
|
+
`Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md for Go hexagonal layers. Update status.json when done.`,
|
|
125
|
+
'migration-specialist': (s) =>
|
|
126
|
+
`Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md for Go module/toolchain. Update status.json when done.`,
|
|
127
|
+
'api-contract-reviewer': (s) =>
|
|
128
|
+
`Invoke api-contract-reviewer (readonly) for slug "${s}". Review OpenAPI/Protobuf vs adapters; write api-contract-review.md. Update status.json when done.`,
|
|
129
|
+
'ci-investigator': (s) =>
|
|
130
|
+
`Invoke ci-investigator for slug "${s}". Diagnose CI failure (go test/vet/lint or preset-structure); write ci-report.md; apply minimal fix. ` +
|
|
131
|
+
`Use ci-investigation skill. Update status.json when done.`,
|
|
132
|
+
'feature-developer': (s) =>
|
|
133
|
+
`Invoke feature-developer for slug "${s}". Read brief.md, decomposition.md, validation-report.md, review.md, architecture.md, migration-plan.md, api-contract-review.md, debug-report.md if present. ` +
|
|
134
|
+
`Follow feature-delivery-workflow.mdc and reference-features.mdc. Prefer internal/domain|application|adapters and cmd/ composition root. ` +
|
|
135
|
+
`Include table-driven go test coverage for domain/use cases before handoff. Update status.json when done.`,
|
|
136
|
+
'build-verifier': (s) =>
|
|
137
|
+
`Invoke build-verifier (readonly) for slug "${s}". Follow go-tooling.mdc and post-change-test.mdc. ` +
|
|
138
|
+
`Run go test ./..., go vet ./..., and golangci-lint/staticcheck if configured — never yarn/ESLint/Stylelint. ` +
|
|
139
|
+
`For preset packaging: yarn check:preset-structure. Write validation-report.md. Set state completed or validation_failed. Do not edit production code.`,
|
|
140
|
+
'performance-auditor': (s) =>
|
|
141
|
+
`Invoke performance-auditor (readonly) for slug "${s}". Audit Go hot paths/allocs/DB N+1/pprof risks; write perf-report.md. Update status.json when done.`,
|
|
142
|
+
'code-reviewer': (s) =>
|
|
143
|
+
`Invoke code-reviewer subagent (readonly) for slug "${s}". Review git diff vs brief.md per code-review-mr.mdc (hexagonal boundaries). ` +
|
|
144
|
+
`Update status.json when done.`,
|
|
145
|
+
'security-reviewer': (s) =>
|
|
146
|
+
`Invoke security-reviewer (readonly) for slug "${s}". Follow security-go.mdc; write security-review.md. Update status.json when done.`,
|
|
147
|
+
'qa-tester': (s, scope) =>
|
|
148
|
+
`Invoke qa-tester for slug "${s}"${scope ? ` (scope: ${scope})` : ''}. ` +
|
|
149
|
+
`Add/update go unit and integration tests per brief. Follow tests-unit.mdc, tests-integration.mdc, and skill integration-testing. Update status.json when done.`,
|
|
150
|
+
'unit-test-planner': (s) =>
|
|
151
|
+
`Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for table-driven go test. Use unit-testing skill. Update status.json when done.`,
|
|
152
|
+
'unit-test-generator': (s) =>
|
|
153
|
+
`Invoke unit-test-generator for slug "${s}". Implement *_test.go from unit-test-plan.md. Use unit-testing skill. Update status.json when done.`,
|
|
154
|
+
'unit-test-healer': (s) =>
|
|
155
|
+
`Invoke unit-test-healer for slug "${s}". Fix failing unit tests. Use unit-testing and debug-investigation skills. Update status.json when done.`,
|
|
156
|
+
'integration-test-planner': (s) =>
|
|
157
|
+
`Invoke integration-test-planner for slug "${s}". Create/update integration test plans (httptest/testcontainers/adapter contracts). ` +
|
|
158
|
+
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Update status.json when done.`,
|
|
159
|
+
'integration-test-generator': (s) =>
|
|
160
|
+
`Invoke integration-test-generator for slug "${s}". Generate/update *_integration_test.go from plans. ` +
|
|
161
|
+
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Update status.json when done.`,
|
|
162
|
+
'integration-test-healer': (s) =>
|
|
163
|
+
`Invoke integration-test-healer for slug "${s}". Fix failing/flaky integration tests while preserving plan assertions. ` +
|
|
164
|
+
`Follow tests-integration.mdc, integration-testing, and debug-investigation. Do not use browser e2e tooling. Update status.json when done.`,
|
|
165
|
+
'tech-writer': (s) =>
|
|
166
|
+
`Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Update status.json when done.`,
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const REVIEW_AGENTS = new Set([
|
|
170
|
+
'code-reviewer',
|
|
171
|
+
'security-reviewer',
|
|
172
|
+
'api-contract-reviewer',
|
|
173
|
+
]);
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
function handoffForAgent(agent, scope) {
|
|
177
|
+
const fn = AGENT_HANDOFF[agent];
|
|
178
|
+
return fn ? fn(slug, scope) : `Invoke ${agent} subagent for slug "${slug}". Update status.json when done.`;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function handoffForParallelStep(step) {
|
|
182
|
+
const agents = getStepAgents(step);
|
|
183
|
+
return (
|
|
184
|
+
`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.`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function hasGateAfter(agent, humanGates) {
|
|
190
|
+
return Array.isArray(humanGates) && humanGates.includes(`after:${agent}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function hasGateAfterStep(step, humanGates) {
|
|
194
|
+
return getStepAgents(step).some((a) => hasGateAfter(a, humanGates));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function legacyFlow() {
|
|
198
|
+
if (status.phase === 'analysis') {
|
|
199
|
+
process.stdout.write('{}');
|
|
200
|
+
process.exit(0);
|
|
201
|
+
}
|
|
202
|
+
if (status.phase === 'development' && (status.state === 'completed' || status.state === 'in_progress')) {
|
|
203
|
+
writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'build-verifier' });
|
|
204
|
+
out(handoffForAgent('build-verifier'));
|
|
205
|
+
process.exit(0);
|
|
206
|
+
}
|
|
207
|
+
if (status.currentAgent === 'build-verifier' && status.state === 'completed') {
|
|
208
|
+
writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'code-reviewer' });
|
|
209
|
+
out(handoffForAgent('code-reviewer'));
|
|
210
|
+
process.exit(0);
|
|
211
|
+
}
|
|
212
|
+
if (status.phase === 'review' && status.state === 'completed') {
|
|
213
|
+
writeStatus({ phase: 'executing', state: 'in_progress', currentAgent: 'qa-tester' });
|
|
214
|
+
out(handoffForAgent('qa-tester'));
|
|
215
|
+
process.exit(0);
|
|
216
|
+
}
|
|
217
|
+
if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
|
|
218
|
+
writeStatus({
|
|
219
|
+
currentAgent: 'feature-developer',
|
|
220
|
+
state: 'in_progress',
|
|
221
|
+
phase: 'executing',
|
|
222
|
+
retryAfterFix: status.currentAgent,
|
|
223
|
+
});
|
|
224
|
+
out(
|
|
225
|
+
handoffForAgent('feature-developer') +
|
|
226
|
+
` After fixes, re-run ${status.currentAgent}.`,
|
|
227
|
+
);
|
|
228
|
+
process.exit(0);
|
|
229
|
+
}
|
|
230
|
+
if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
|
|
231
|
+
writeStatus({
|
|
232
|
+
currentAgent: 'feature-developer',
|
|
233
|
+
state: 'in_progress',
|
|
234
|
+
phase: 'executing',
|
|
235
|
+
retryAfterFix: 'build-verifier',
|
|
236
|
+
});
|
|
237
|
+
out(
|
|
238
|
+
handoffForAgent('feature-developer') +
|
|
239
|
+
` Read validation-report.md. After fixes, re-run build-verifier.`,
|
|
240
|
+
);
|
|
241
|
+
process.exit(0);
|
|
242
|
+
}
|
|
243
|
+
if (status.state === 'completed' && status.retryAfterFix) {
|
|
244
|
+
const retry = status.retryAfterFix;
|
|
245
|
+
writeStatus({ currentAgent: retry, state: 'in_progress', retryAfterFix: null });
|
|
246
|
+
out(handoffForAgent(retry));
|
|
247
|
+
process.exit(0);
|
|
248
|
+
}
|
|
249
|
+
if (status.phase === 'testing' && status.state === 'completed') {
|
|
250
|
+
writeStatus({ phase: 'done', state: 'completed' });
|
|
251
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
252
|
+
process.exit(0);
|
|
253
|
+
}
|
|
254
|
+
process.stdout.write('{}');
|
|
255
|
+
process.exit(0);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (!fs.existsSync(pipelinePath)) {
|
|
259
|
+
legacyFlow();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
let pipeline;
|
|
263
|
+
try {
|
|
264
|
+
pipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
|
|
265
|
+
} catch {
|
|
266
|
+
legacyFlow();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const steps = pipeline.steps || [];
|
|
270
|
+
if (steps.length === 0 || pipeline.autoChain === false) {
|
|
271
|
+
process.stdout.write('{}');
|
|
272
|
+
process.exit(0);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (status.awaitingHumanGate || status.state === 'awaiting_approval') {
|
|
276
|
+
process.stdout.write('{}');
|
|
277
|
+
process.exit(0);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgent)) {
|
|
281
|
+
const reviewer = status.currentAgent;
|
|
282
|
+
writeStatus({
|
|
283
|
+
currentAgent: 'feature-developer',
|
|
284
|
+
state: 'in_progress',
|
|
285
|
+
phase: 'executing',
|
|
286
|
+
retryAfterFix: reviewer,
|
|
287
|
+
});
|
|
288
|
+
out(
|
|
289
|
+
handoffForAgent('feature-developer') +
|
|
290
|
+
` After fixes, re-run ${reviewer}.`,
|
|
291
|
+
);
|
|
292
|
+
process.exit(0);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (status.state === 'validation_failed' && status.currentAgent === 'build-verifier') {
|
|
296
|
+
writeStatus({
|
|
297
|
+
currentAgent: 'feature-developer',
|
|
298
|
+
state: 'in_progress',
|
|
299
|
+
phase: 'executing',
|
|
300
|
+
retryAfterFix: 'build-verifier',
|
|
301
|
+
});
|
|
302
|
+
out(
|
|
303
|
+
handoffForAgent('feature-developer') +
|
|
304
|
+
` Read validation-report.md. After fixes, re-run build-verifier.`,
|
|
305
|
+
);
|
|
306
|
+
process.exit(0);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (status.state === 'completed' && status.retryAfterFix) {
|
|
310
|
+
const retry = status.retryAfterFix;
|
|
311
|
+
writeStatus({ currentAgent: retry, state: 'in_progress', retryAfterFix: null });
|
|
312
|
+
out(handoffForAgent(retry));
|
|
313
|
+
process.exit(0);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
317
|
+
const currentStep = steps[idx];
|
|
318
|
+
if (!currentStep) {
|
|
319
|
+
writeStatus({ phase: 'done', state: 'completed', currentAgent: null });
|
|
320
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
321
|
+
process.exit(0);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const completedAgent = status.currentAgent || getStepAgents(currentStep)[0];
|
|
325
|
+
const stepAgents = getStepAgents(currentStep);
|
|
326
|
+
|
|
327
|
+
if (currentStep.parallel && stepAgents.length > 1) {
|
|
328
|
+
const done = [...(status.parallelCompleted || [])];
|
|
329
|
+
if (completedAgent && !done.includes(completedAgent)) {
|
|
330
|
+
done.push(completedAgent);
|
|
331
|
+
}
|
|
332
|
+
writeStatus({ parallelCompleted: done });
|
|
333
|
+
const remaining = stepAgents.filter((a) => !done.includes(a));
|
|
334
|
+
if (remaining.length > 0) {
|
|
335
|
+
process.stdout.write('{}');
|
|
336
|
+
process.exit(0);
|
|
337
|
+
}
|
|
338
|
+
writeStatus({ parallelCompleted: [] });
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
342
|
+
writeStatus({
|
|
343
|
+
awaitingHumanGate: true,
|
|
344
|
+
state: 'awaiting_approval',
|
|
345
|
+
currentAgent: completedAgent,
|
|
346
|
+
});
|
|
347
|
+
process.stdout.write('{}');
|
|
348
|
+
process.exit(0);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const next = findNextExecutableStep(steps, idx + 1, taskDir);
|
|
352
|
+
if (!next) {
|
|
353
|
+
writeStatus({
|
|
354
|
+
pipelineIndex: steps.length,
|
|
355
|
+
phase: 'done',
|
|
356
|
+
state: 'completed',
|
|
357
|
+
currentAgent: null,
|
|
358
|
+
awaitingHumanGate: false,
|
|
359
|
+
});
|
|
360
|
+
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
361
|
+
process.exit(0);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const { step: nextStep, index: nextIdx } = next;
|
|
365
|
+
const nextAgents = getStepAgents(nextStep);
|
|
366
|
+
|
|
367
|
+
writeStatus({
|
|
368
|
+
pipelineIndex: nextIdx,
|
|
369
|
+
currentAgent: nextAgents[0],
|
|
370
|
+
phase: 'executing',
|
|
371
|
+
state: 'in_progress',
|
|
372
|
+
awaitingHumanGate: false,
|
|
373
|
+
parallelCompleted: [],
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
if (nextStep.parallel && nextAgents.length > 1) {
|
|
377
|
+
out(handoffForParallelStep(nextStep));
|
|
378
|
+
} else {
|
|
379
|
+
out(handoffForAgent(nextAgents[0], nextStep.scope));
|
|
380
|
+
}
|
|
381
|
+
NODE
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Hooks cookbook (examples)
|
|
2
|
+
|
|
3
|
+
Optional scripts under `hooks/examples/`. **Not** referenced from default `hooks.json` (only `guard-shell-command.sh` + `chain-team-phases.sh`).
|
|
4
|
+
|
|
5
|
+
| Script | Purpose |
|
|
6
|
+
|--------|---------|
|
|
7
|
+
| `secret-guard.example.sh` | Fail if staged diff looks like secrets |
|
|
8
|
+
| `format-edited.example.sh` | Stack formatter / linter on edited files |
|
|
9
|
+
| `test-on-save.example.sh` | Scoped tests for the stack |
|
|
10
|
+
|
|
11
|
+
## Wiring (Cursor)
|
|
12
|
+
|
|
13
|
+
1. Copy an example into `hooks/` (drop `.example` suffix), e.g. `cp hooks/examples/secret-guard.example.sh hooks/secret-guard.sh`.
|
|
14
|
+
2. `chmod +x hooks/secret-guard.sh`.
|
|
15
|
+
3. Add a hook entry in `.cursor/hooks.json` (e.g. `beforeShellExecution` or `afterFileEdit` — see Cursor hooks docs).
|
|
16
|
+
4. Keep cookbook scripts **out** of the default preset `hooks.json` when contributing back upstream.
|
|
17
|
+
|
|
18
|
+
Stack: **go** — recipes must stay stack-safe (no cross-stack lint/test commands).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: gofmt / golangci-lint on edited packages.
|
|
3
|
+
# NOT in default hooks.json.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
gofmt -w $(git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.go$' || true) 2>/dev/null || true
|
|
6
|
+
if command -v golangci-lint >/dev/null 2>&1; then
|
|
7
|
+
golangci-lint run ./... 2>/dev/null || true
|
|
8
|
+
fi
|
|
9
|
+
exit 0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional cookbook: block committing likely secrets in staged diffs.
|
|
3
|
+
# NOT wired in default hooks.json — copy to hooks/ and register manually.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
PATTERN='(AKIA[0-9A-Z]{16}|-----BEGIN (RSA |OPENSSH )?PRIVATE KEY-----|api[_-]?key\s*[:=]\s*['\''\"][^'\''\"]{12,})'
|
|
6
|
+
if git diff --cached -U0 2>/dev/null | grep -Eiq "$PATTERN"; then
|
|
7
|
+
echo "secret-guard: possible secret in staged diff — review before commit" >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
exit 0
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: package-scoped go test for changed packages.
|
|
3
|
+
# NOT in default hooks.json.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
pkgs=$(git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.go$' | xargs -n1 dirname 2>/dev/null | sort -u | sed 's|^|./|' || true)
|
|
6
|
+
if [[ -n "${pkgs:-}" ]]; then
|
|
7
|
+
go test $pkgs 2>/dev/null || true
|
|
8
|
+
else
|
|
9
|
+
go test ./... 2>/dev/null || true
|
|
10
|
+
fi
|
|
11
|
+
exit 0
|