@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,28 @@
|
|
|
1
|
+
# Preset PR checklist
|
|
2
|
+
|
|
3
|
+
Чеклист для PR, затрагивающих `packages/ai-rules/presets/**` (и dogfood `.cursor/` sync).
|
|
4
|
+
|
|
5
|
+
## Before merge
|
|
6
|
+
|
|
7
|
+
- [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
|
|
8
|
+
- [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
|
|
9
|
+
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, and go — см. `preset-twin-sync`)
|
|
10
|
+
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
|
|
11
|
+
- [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
|
|
12
|
+
- [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
13
|
+
- [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
|
|
14
|
+
- [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
|
|
15
|
+
- [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
|
|
16
|
+
- [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
|
|
17
|
+
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
18
|
+
|
|
19
|
+
## Pointers
|
|
20
|
+
|
|
21
|
+
- Layering: `preset-layering`
|
|
22
|
+
- Sync: `preset-twin-sync`
|
|
23
|
+
- Budget: `preset-token-budget`
|
|
24
|
+
- Leakage: `preset-no-cross-stack-leakage`
|
|
25
|
+
- Validation: stack `agents/build-verifier.md` → preset-structure section
|
|
26
|
+
- Dogfood script: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`
|
|
27
|
+
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
28
|
+
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Preset token budget
|
|
2
|
+
|
|
3
|
+
Инварианты загрузки правил в **установленном** пресете (consumer app).
|
|
4
|
+
|
|
5
|
+
## Hard caps
|
|
6
|
+
|
|
7
|
+
| Platform | Always-on | Cap |
|
|
8
|
+
|----------|-----------|-----|
|
|
9
|
+
| Cursor | `alwaysApply: true` | **≤ 3** |
|
|
10
|
+
| Claude | rules **without** `paths:` | **ровно 3** |
|
|
11
|
+
|
|
12
|
+
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
|
|
13
|
+
|
|
14
|
+
Session-start body budget (где задокументировано): ≤120 строк суммарно (stretch ≤100).
|
|
15
|
+
|
|
16
|
+
## Meta / author rules
|
|
17
|
+
|
|
18
|
+
Rules for preset authors (`preset-layering`, `preset-twin-sync`, …):
|
|
19
|
+
|
|
20
|
+
- **Never** `alwaysApply: true` on consumer installs.
|
|
21
|
+
- Cursor: `globs` limited to `packages/ai-rules/presets/**` (and dogfood `.cursor/**` where useful).
|
|
22
|
+
- Claude: `paths:` limited to `packages/ai-rules/presets/**` (and `.claude/**` dogfood if present).
|
|
23
|
+
|
|
24
|
+
## Heavy workflows
|
|
25
|
+
|
|
26
|
+
Orchestrator, feature-delivery, code-review, post-change gates, domain globs — **requestable / paths**, not always-on.
|
|
27
|
+
|
|
28
|
+
## Verifier
|
|
29
|
+
|
|
30
|
+
build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Preset twin sync
|
|
2
|
+
|
|
3
|
+
Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
4
|
+
|
|
5
|
+
## Matrix
|
|
6
|
+
|
|
7
|
+
| Stack | Cursor SoT | Claude derive | Mapping table |
|
|
8
|
+
|-------|------------|---------------|---------------|
|
|
9
|
+
| `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
|
|
10
|
+
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
11
|
+
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
12
|
+
|
|
13
|
+
## Same-PR checklist
|
|
14
|
+
|
|
15
|
+
1. Edit Cursor rule first (body + frontmatter).
|
|
16
|
+
2. Update Claude twin: body + `paths:` (from Cursor `globs:` / requestable triggers); drop `alwaysApply`.
|
|
17
|
+
3. Update mapping table row if stem/path changed.
|
|
18
|
+
4. If body embeds core (`<!-- shared-core: … -->`), sync core consumers across stacks when core changed.
|
|
19
|
+
|
|
20
|
+
## Twin depth
|
|
21
|
+
|
|
22
|
+
- **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
|
|
23
|
+
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
24
|
+
|
|
25
|
+
## Severity (build-verifier)
|
|
26
|
+
|
|
27
|
+
- **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
|
|
28
|
+
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
29
|
+
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
30
|
+
|
|
31
|
+
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Поддержка существующего стиля
|
|
2
|
+
|
|
3
|
+
- Новые изменения должны:
|
|
4
|
+
- следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
|
|
5
|
+
- минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
|
|
6
|
+
- Перед добавлением нового решения:
|
|
7
|
+
- искать аналогичное в коде и **повторять подход**, а не изобретать новый;
|
|
8
|
+
- проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
|
|
9
|
+
- использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
|
|
10
|
+
|
|
11
|
+
# Принципы
|
|
12
|
+
|
|
13
|
+
- **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
|
|
14
|
+
- **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения — ошибочная абстракция дороже дублирования.
|
|
15
|
+
- **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
|
|
16
|
+
- **SOLID** (agent-actionable, не эссе):
|
|
17
|
+
- **S** — один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
|
|
18
|
+
- **O** — расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
|
|
19
|
+
- **L** — подтип не ломает контракт базового типа/протокола.
|
|
20
|
+
- **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
|
|
21
|
+
- **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
|
|
22
|
+
- **CUPID** (компактный блок, Milanov):
|
|
23
|
+
- **Composable** — маленькие части стыкуются без скрытого глобального состояния.
|
|
24
|
+
- **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
|
|
25
|
+
- **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
|
|
26
|
+
- **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
|
|
27
|
+
- **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
|
|
28
|
+
- **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
|
|
29
|
+
- **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
|
|
30
|
+
|
|
31
|
+
# Рефакторинг при изменениях
|
|
32
|
+
|
|
33
|
+
- Разрешён лёгкий refactor, если он:
|
|
34
|
+
- уменьшает дублирование;
|
|
35
|
+
- повышает читаемость;
|
|
36
|
+
- не ломает публичные контракты модулей.
|
|
37
|
+
- Примеры допустимых улучшений (абстрактно):
|
|
38
|
+
- вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
|
|
39
|
+
- сузить небезопасные типы и unsafe-операции стека;
|
|
40
|
+
- разделить слишком крупный модуль на несколько более простых;
|
|
41
|
+
- заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
|
|
42
|
+
- заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
|
|
43
|
+
|
|
44
|
+
# Ограничения
|
|
45
|
+
|
|
46
|
+
- Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
|
|
47
|
+
- не менять структуру директорий / модулей / таргетов без нужды;
|
|
48
|
+
- не менять названия публичных типов/функций/API без явного запроса.
|
|
49
|
+
- При необходимости крупного изменения:
|
|
50
|
+
- сначала локально улучшить архитектуру минимальными шагами;
|
|
51
|
+
- оставить код в консистентном (собираемом) состоянии.
|
|
52
|
+
|
|
53
|
+
# Требование к агенту
|
|
54
|
+
|
|
55
|
+
- **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
|
|
56
|
+
- Не жертвовать архитектурой и слоями ради краткости реализации.
|
|
57
|
+
|
|
58
|
+
## Agent discipline (anti-sycophancy)
|
|
59
|
+
|
|
60
|
+
- Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
|
|
61
|
+
- Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
|
|
62
|
+
- Refactor without tests → propose a characterization test first; if declined, label `UNTESTED`.
|
|
63
|
+
- Comments = WHY only when non-obvious; ban self-referential «added for issue Y» comments.
|
|
64
|
+
- Urgency/authority pressure: name the technical trade-off once, then comply — no apology loops.
|
|
65
|
+
- Match verification depth to risk; report status by what was **verified**, not attempted.
|
|
66
|
+
|
|
67
|
+
Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**; do not invent a parallel style bible in this core body.
|
|
68
|
+
|
|
69
|
+
> Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Design guidance (smells & patterns)
|
|
2
|
+
|
|
3
|
+
Словарь **code smells** (Fowler) и **design patterns** (GoF) для агентов при implement / review / debug.
|
|
4
|
+
|
|
5
|
+
Применять только в scope задачи или MR. Лёгкий refactor — да; «большой» rewrite без явного запроса — нет.
|
|
6
|
+
|
|
7
|
+
Называть паттерн **только если** репозиторий уже так делает или это минимальный match. Иначе — extract/split/move без ярлыка GoF.
|
|
8
|
+
|
|
9
|
+
Не заменяет always-on Principles в `code-quality-and-refactoring` (KISS, DRY + Rule of Three, YAGNI, SOLID, CUPID, composition, Demeter).
|
|
10
|
+
|
|
11
|
+
## When to load
|
|
12
|
+
|
|
13
|
+
- **Feature delivery / implement** — оценка структуры модулей, границ и дублирования.
|
|
14
|
+
- **Code review** — smells и pattern fit **в диффе MR**, не по всему репо.
|
|
15
|
+
- **Debug** — root-cause похож на wrong abstraction, Feature Envy, Message Chains, Shotgun Surgery.
|
|
16
|
+
- **Light refactor only** — улучшения в рамках boy-scout / MR scope; не расширять задачу ради каталога.
|
|
17
|
+
|
|
18
|
+
Агенты и skills подгружают stem по one-liner wiring — не копировать этот каталог в промпт агента.
|
|
19
|
+
|
|
20
|
+
## How to use (agent rules of thumb)
|
|
21
|
+
|
|
22
|
+
1. Сначала сверить с Principles (always-on): проще ли решение, нет ли ранней абстракции, соблюдён ли public API.
|
|
23
|
+
2. Затем отметить smells **в изменённых файлах** задачи/MR; предложить fix только если он укладывается в light refactor.
|
|
24
|
+
3. Паттерн GoF — опциональный ярлык после того, как структура уже ясна; не начинать дизайн с выбора паттерна.
|
|
25
|
+
4. Если smell и паттерн конфликтуют с границами слоёв стека — побеждают stack boundaries и existing repo patterns.
|
|
26
|
+
5. Не требовать переименования «под GoF», если поведение уже корректно и читаемо.
|
|
27
|
+
|
|
28
|
+
## Code smells (Fowler, curated ≤12)
|
|
29
|
+
|
|
30
|
+
Таблица: smell → detect hint → fix hint (одна линия каждый). Без механических меню рефакторинга.
|
|
31
|
+
|
|
32
|
+
| # | Smell | Detect | Fix hint |
|
|
33
|
+
|---|-------|--------|----------|
|
|
34
|
+
| 1 | Duplicate Code | одинаковая логика в ≥2 местах | dedupe после Rule of Three |
|
|
35
|
+
| 2 | Long Method / Long Module | единица делает слишком много | extract в рамках scope; без big rewrite |
|
|
36
|
+
| 3 | Feature Envy | метод чаще трогает чужие данные, чем свои | сдвинуть логику к данным / public API |
|
|
37
|
+
| 4 | Data Clumps | одни и те же группы аргументов кочуют вместе | сгруппировать в type / value object |
|
|
38
|
+
| 5 | Primitive Obsession | сырые string/int вместо доменных понятий | typed ids / value objects при нужде домена |
|
|
39
|
+
| 6 | Speculative Generality | неиспользуемые хуки, флаги, абстракции «на будущее» | удалить (YAGNI) |
|
|
40
|
+
| 7 | Message Chains | цепочки `a.b.c.d` | Demeter; facade / public API модуля |
|
|
41
|
+
| 8 | Middle Man | класс почти только прокидывает вызовы | убрать pass-through **или** оставить как boundary |
|
|
42
|
+
| 9 | Divergent Change | один модуль меняется по разным причинам | split по поводам изменения |
|
|
43
|
+
| 10 | Shotgun Surgery | одно смысловое изменение разъезжается по многим файлам | consolidate ответственность |
|
|
44
|
+
| 11 | Inappropriate Intimacy | доступ к чужим internals / private деталям | только public API / ports / facades |
|
|
45
|
+
| 12 | Refused Bequest / Parallel Inheritance | подтип игнорирует базу; зеркальные иерархии классов | composition; не плодить параллельные деревья |
|
|
46
|
+
|
|
47
|
+
**Skip Fowler (не в core):** Lazy Class, Incomplete Library Class, Comments-as-smell dogma, полный каталог 70+, пошаговые recipe-меню.
|
|
48
|
+
|
|
49
|
+
Приоритет при конфликте smells: Inappropriate Intimacy и Message Chains (границы модулей) > Duplicate Code (после Rule of Three) > Long Method внутри уже правильного модуля.
|
|
50
|
+
|
|
51
|
+
## Design patterns (GoF, curated ≤8)
|
|
52
|
+
|
|
53
|
+
Suggest only when repo already uses the shape or the match is minimal. Prefer extract-function over naming Strategy ради ярлыка.
|
|
54
|
+
|
|
55
|
+
Паттерны ниже — **разрешённый минимум** для агентов; остальной GoF по умолчанию в Skip.
|
|
56
|
+
|
|
57
|
+
| Pattern | When to suggest | Anti-trigger |
|
|
58
|
+
|---------|-----------------|--------------|
|
|
59
|
+
| Strategy | взаимозаменяемые алгоритмы уже (или явно скоро) выбираются политикой | один алгоритм без ветвления политики |
|
|
60
|
+
| Adapter | обернуть внешний / чужой API под локальный port | лишняя обёртка вокруг своего же API |
|
|
61
|
+
| Facade | упростить multi-step subsystem за public API | facade превращается в god-object |
|
|
62
|
+
| Factory Method | полиморфное создание уже принято в стиле репо | factory на каждый тривиальный `new` |
|
|
63
|
+
| Decorator | аддитивное поведение без взрыва subclass-иерархий | decorator «для слоёв» без реальной нужды |
|
|
64
|
+
| Observer | events / subscriptions уже есть в архитектуре | самодельный pub/sub без прецедента в репо |
|
|
65
|
+
| Template Method | общий algorithm skeleton + вариативные hooks | наследование ради пары отличающихся строк |
|
|
66
|
+
| Composite | дерево однородных узлов (UI/domain), как уже в репо | Composite на плоский список без иерархии |
|
|
67
|
+
|
|
68
|
+
Если сомневаешься между двумя паттернами — выбери более простой extract/compose без имени; ярлык можно добавить на review, если репо уже так говорит.
|
|
69
|
+
|
|
70
|
+
## Skip / avoid by default
|
|
71
|
+
|
|
72
|
+
| Catalog | Skip |
|
|
73
|
+
|---------|------|
|
|
74
|
+
| GoF | Singleton, Abstract Factory, Flyweight, Memento, Interpreter, Visitor, Bridge, Prototype |
|
|
75
|
+
| GoF (conditional) | Command, Chain of Responsibility, State — упоминать **только если** репо уже использует |
|
|
76
|
+
| Fowler | всё сверх 12 smells выше |
|
|
77
|
+
| DDD | Aggregates, bounded-context maps, event sourcing, CQRS — **не в core** |
|
|
78
|
+
| DDD (pointer) | ubiquitous language anti-pattern — расширять в `feature-delivery-workflow`, не здесь |
|
|
79
|
+
| GRASP | список Larman как отдельные правила — skip (перекрывается SOLID/CUPID) |
|
|
80
|
+
| Clean Code dogma | жёсткие caps на строки функции / «ровно один assert» — skip |
|
|
81
|
+
|
|
82
|
+
Не вводить второй stem (`refactoring-smells` / `design-patterns-for-agents`) — один каталог: `design-guidance`.
|
|
83
|
+
|
|
84
|
+
## Out of scope for this stem
|
|
85
|
+
|
|
86
|
+
- Полный GoF (23) и полный Fowler catalog.
|
|
87
|
+
- Stack-specific рецепты (пути модулей, lint-команды) — только в **Stack notes** адаптера.
|
|
88
|
+
- Security, a11y, perf — отдельные review-правила; здесь только структурные smells/patterns.
|
|
89
|
+
- Четвёртое always-on правило — запрещено; этот stem только requestable / agent-load.
|
|
90
|
+
|
|
91
|
+
## Cross-refs
|
|
92
|
+
|
|
93
|
+
- Always-on Principles: `code-quality-and-refactoring`.
|
|
94
|
+
- DIP / ports vs adapters: stack `architecture-boundaries` (детали стека — в Stack notes адаптеров).
|
|
95
|
+
- Ubiquitous language: `feature-delivery-workflow` (lineage).
|
|
96
|
+
- MR checklist (smells in scope; pattern name only if repo uses it): `code-review-mr`.
|
|
97
|
+
- Token / twin policy for authors: `preset-token-budget`, `preset-twin-sync` (meta, not consumer always-on).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Code review merge requests
|
|
2
|
+
|
|
3
|
+
On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
|
|
4
|
+
|
|
5
|
+
## When to load
|
|
6
|
+
|
|
7
|
+
- User asks for review/MR/diff
|
|
8
|
+
- Pipeline step `code-reviewer`
|
|
9
|
+
- Platform automated review (e.g. BUGBOT) when present
|
|
10
|
+
|
|
11
|
+
## Checklist references (abstract)
|
|
12
|
+
|
|
13
|
+
- Architecture layers and stack core rules
|
|
14
|
+
- Public imports / module boundaries
|
|
15
|
+
- UI conventions of the stack
|
|
16
|
+
- Unit and e2e/UI test conventions
|
|
17
|
+
- Post-change lint/build gate before final report
|
|
18
|
+
- Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
|
|
19
|
+
- Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
|
|
20
|
+
- Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
|
|
21
|
+
|
|
22
|
+
Concrete rule stems — in **Stack notes**.
|
|
23
|
+
|
|
24
|
+
## Constraints
|
|
25
|
+
|
|
26
|
+
- Focus on MR diff, not the whole repo.
|
|
27
|
+
- Use local `git diff` — do not invent hosting metadata.
|
|
28
|
+
- Boy scout rule: suggest fixes feasible within the MR scope.
|
|
29
|
+
- No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
|
|
30
|
+
|
|
31
|
+
## Output contract
|
|
32
|
+
|
|
33
|
+
Procedure details live in skill `code-review`. Required shape:
|
|
34
|
+
|
|
35
|
+
- Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
|
|
36
|
+
- Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
37
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
38
|
+
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Техническое ретро — rule alias
|
|
2
|
+
|
|
3
|
+
Полный сценарий (включая блок **«Работа агентов»** для slug из team tasks) — в slash-команде:
|
|
4
|
+
|
|
5
|
+
**`commands/technical-retro.md`** → `/technical-retro`
|
|
6
|
+
|
|
7
|
+
Используй rule только если command недоступен. Не дублируй содержимое command в ответе — следуй command-файлу и skill `technical-retro`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Go hexagonal (Claude)
|
|
2
|
+
|
|
3
|
+
Preset for Go backends using ports & adapters.
|
|
4
|
+
|
|
5
|
+
**Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root.
|
|
6
|
+
|
|
7
|
+
- Session-start: `go-app-core`, `architecture/boundaries`, `code-quality` (exactly 3).
|
|
8
|
+
- Delivery: `architecture/feature-delivery.md` + skill `feature-delivery`.
|
|
9
|
+
- After Go edits: `tooling-and-review/post-change-test.md`.
|
|
10
|
+
- Integration tests: agents `integration-test-*` (never Playwright/XCUITest).
|
|
11
|
+
- ADR: skill `write-adr` (on-demand).
|
|
12
|
+
- How does X work: agent `codebase-analyzer` (explain-as-is; no `/task`).
|
|
13
|
+
|
|
14
|
+
Init: `npx @bonesofspring/ai-rules init claude --preset go` (also copies `REPO_AGENTS.md` → root `AGENTS.md`).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# MCP (preset `go`, Claude)
|
|
2
|
+
|
|
3
|
+
Копируется в `.mcp.json` при `ai-rules init claude --preset go`.
|
|
4
|
+
|
|
5
|
+
## Servers
|
|
6
|
+
|
|
7
|
+
| Name | Package | Зачем |
|
|
8
|
+
|------|---------|--------|
|
|
9
|
+
| `context7` | `@upstash/context7-mcp` | Актуальная документация Go / stdlib / популярных библиотек |
|
|
10
|
+
| `figma` | remote `https://mcp.figma.com/mcp` | Design context при необходимости; OAuth в Claude |
|
|
11
|
+
|
|
12
|
+
Browser e2e MCP (Playwright / Chrome DevTools) **не** входят в go-пресет.
|
|
13
|
+
|
|
14
|
+
Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении. Figma — OAuth (токен не коммитим).
|
|
15
|
+
|
|
16
|
+
После init: Claude Code MCP → включить серверы. `init` перезаписывает одноимённый `mcp.json`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Go hexagonal preset (Claude)
|
|
2
|
+
|
|
3
|
+
Derived twin of `presets/cursor/go/`. Mapping: [`rules/README.md`](./rules/README.md).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @bonesofspring/ai-rules init claude --preset go
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
| Path | Содержание |
|
|
12
|
+
|------|------------|
|
|
13
|
+
| `CLAUDE.md` | Thin session entry |
|
|
14
|
+
| `rules/**` | Topic `.md` + `paths:` (session-start = 3) |
|
|
15
|
+
| `agents/**` | **21** ролей (+ `codebase-analyzer`) |
|
|
16
|
+
| `skills/**` | **7** skills (в т.ч. `integration-testing`) |
|
|
17
|
+
| `commands/**` | task, task-continue, feature-start/continue, technical-retro |
|
|
18
|
+
| `hooks/**` | guard-shell + chain-team-phases |
|
|
19
|
+
| `team/**` | fixtures + README |
|
|
20
|
+
| `mcp.json` + `MCP.md` | Context7 + Figma → project-root `.mcp.json` |
|
|
21
|
+
|
|
22
|
+
## Session-start (exactly 3, no `paths:`)
|
|
23
|
+
|
|
24
|
+
`stack/go-app-core`, `architecture/boundaries`, `tooling-and-review/code-quality`.
|
|
25
|
+
|
|
26
|
+
## Preset taxonomy & contributing
|
|
27
|
+
|
|
28
|
+
- **Layers:** Core → Stack → Platform — [`../../_shared/README.md`](../../_shared/README.md)
|
|
29
|
+
- **Contribution guide:** [`../../../docs/PRESET-CONTRIBUTION.md`](../../../docs/PRESET-CONTRIBUTION.md)
|
|
30
|
+
- **Core→stack / Cursor map:** [`rules/README.md`](./rules/README.md)
|
|
31
|
+
|
|
32
|
+
## Sync with Cursor
|
|
33
|
+
|
|
34
|
+
SoT = `presets/cursor/go/`. Update this twin **in the same PR** when Cursor changes.
|
|
35
|
+
|
|
36
|
+
## Cross-tool root AGENTS
|
|
37
|
+
|
|
38
|
+
`REPO_AGENTS.md` → project-root `AGENTS.md` on init. Living conventions: `team/conventions.md`. Skill `write-adr` on-demand.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Go — 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 go
|
|
13
|
+
npx @bonesofspring/ai-rules init claude --preset go
|
|
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 / lint / build)
|
|
19
|
+
|
|
20
|
+
Prefer hexagonal / ports-and-adapters layout from stack rules (`go-app-core`, `architecture-boundaries`).
|
|
21
|
+
|
|
22
|
+
| Gate | Typical command |
|
|
23
|
+
|------|-----------------|
|
|
24
|
+
| Test | `go test ./...` (or package-scoped) |
|
|
25
|
+
| Vet | `go vet ./...` |
|
|
26
|
+
| Lint | **golangci-lint** when configured |
|
|
27
|
+
| Format | `gofmt` / `goimports` |
|
|
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
|
+
|
|
37
|
+
## Tool entry points
|
|
38
|
+
|
|
39
|
+
| Tool | Map |
|
|
40
|
+
|------|-----|
|
|
41
|
+
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
42
|
+
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
43
|
+
|
|
44
|
+
Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
|
|
45
|
+
|
|
46
|
+
## Living conventions
|
|
47
|
+
|
|
48
|
+
Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `.claude/agents` (preset go)
|
|
2
|
+
|
|
3
|
+
Ролевые subagents для командного пайплайна Claude Code (Go hexagonal).
|
|
4
|
+
|
|
5
|
+
## Analysis (on-demand)
|
|
6
|
+
|
|
7
|
+
| Agent | Файл | Production-код |
|
|
8
|
+
|-------|------|----------------|
|
|
9
|
+
| Codebase analyzer | `codebase-analyzer.md` | no (explain-as-is only) |
|
|
10
|
+
|
|
11
|
+
## Roster (21)
|
|
12
|
+
|
|
13
|
+
| Agent | Production writes |
|
|
14
|
+
|-------|-------------------|
|
|
15
|
+
| task-router, task-analyst, solution-architect | team only |
|
|
16
|
+
| codebase-analyzer | no (explain-as-is only) |
|
|
17
|
+
| feature-developer | yes (Go sources) |
|
|
18
|
+
| build-verifier | no (report only) |
|
|
19
|
+
| debugger, ci-investigator | minimal |
|
|
20
|
+
| code-reviewer, security-reviewer, performance-auditor | team only |
|
|
21
|
+
| migration-specialist, api-contract-reviewer, tech-writer | team / docs |
|
|
22
|
+
| qa-tester, unit-test-*, integration-test-* | tests |
|
|
23
|
+
|
|
24
|
+
**No** `accessibility-reviewer`, Playwright, or XCUITest stems. Replace those intents with **`integration-test-*`**.
|
|
25
|
+
|
|
26
|
+
## Model matrix
|
|
27
|
+
|
|
28
|
+
| Tier | Agents |
|
|
29
|
+
|------|--------|
|
|
30
|
+
| **cheap** | router, analyst, build-verifier, code-reviewer, tech-writer, codebase-analyzer |
|
|
31
|
+
| **standard** | developer, debugger, ci-investigator, api-contract, qa, unit-*, integration-* |
|
|
32
|
+
| **strong** | solution-architect, migration-specialist, security-reviewer, performance-auditor |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-contract-reviewer
|
|
3
|
+
description: API contract review specialist. Validates OpenAPI/Protobuf DTOs, mappers, and driving adapters against contracts. Readonly — writes api-contract-review.md only; never edits production code.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Review **HTTP/gRPC contract alignment** for Go hexagonal services.
|
|
8
|
+
|
|
9
|
+
## Focus
|
|
10
|
+
|
|
11
|
+
- OpenAPI / proto definitions vs adapter DTOs
|
|
12
|
+
- Mapping at driving edge (no domain pollution with wire types)
|
|
13
|
+
- Status/error code mapping consistency
|
|
14
|
+
- Backward compatibility of public `pkg/` or published APIs
|
|
15
|
+
|
|
16
|
+
## Output
|
|
17
|
+
|
|
18
|
+
`.claude/team/tasks/<slug>/api-contract-review.md` — gaps, severity, suggested fixes (no code edits).
|
|
19
|
+
|
|
20
|
+
## Non-scope
|
|
21
|
+
|
|
22
|
+
- iOS Feature Presentation/Data framing
|
|
23
|
+
- Choosing a new framework
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-verifier
|
|
3
|
+
description: Validation gate specialist. Runs go test/vet/lint-if-present after implementation; writes validation-report.md. Never fixes app source. For preset packaging tasks, also validates go preset structure gates.
|
|
4
|
+
readonly: false
|
|
5
|
+
model: fast
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the build verifier for **Go hexagonal** services (and for **ai-rules preset packaging** when scope says so).
|
|
9
|
+
|
|
10
|
+
## Consumer Go repos
|
|
11
|
+
|
|
12
|
+
1. Run from module root: `go test ./...`, `go vet ./...`.
|
|
13
|
+
2. If present: `golangci-lint` / `staticcheck` per repo docs (`go-tooling`, `post-change-test`).
|
|
14
|
+
3. Optional `-race` when concurrency touched.
|
|
15
|
+
4. Write `.cursor/team/tasks/<slug>/validation-report.md` with commands + results.
|
|
16
|
+
5. On failure: set status `validation_failed` — do **not** patch production code (developer retries).
|
|
17
|
+
|
|
18
|
+
**Never** require Playwright, XCUITest, `lint:js`/`lint:css`, or `xcodebuild`/`SwiftLint` as the Go gate.
|
|
19
|
+
|
|
20
|
+
## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
|
|
21
|
+
|
|
22
|
+
From `packages/ai-rules/`:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn check:preset-structure
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Hard gates: twin-map (stacks include **go**), token-budget (alwaysApply/session-start = 3), leakage (`GO_FORBIDDEN_*`, chain forks go≠next≠ios-swift).
|
|
29
|
+
|
|
30
|
+
Document PASS/FAIL in `validation-report.md`.
|
|
31
|
+
|
|
32
|
+
9. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
|
|
33
|
+
10. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
34
|
+
11. **No react-performance on ios/go:** skill directory / required handoff must be absent under ios-swift and go → **FAIL** (leakage). Prefer `check:preset-leakage`.
|
|
35
|
+
12. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-investigator
|
|
3
|
+
description: Investigates failing CI checks on PRs and branches — go test, vet, golangci-lint, integration jobs — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Triage red CI for Go repos (and ai-rules preset-structure when relevant).
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Identify failing job/logs.
|
|
12
|
+
2. Reproduce locally (`go test`, `go vet`, lint-if-present, or `yarn check:preset-structure` for preset PRs).
|
|
13
|
+
3. Minimal fix or document blocker; update `debug-report.md` / status.
|
|
14
|
+
|
|
15
|
+
## Never
|
|
16
|
+
|
|
17
|
+
- Never treat `lint:js` / Playwright / xcodebuild as the Go default gate.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Expert code review specialist for Go hexagonal services. Reviews after feature development using code-review-mr checklist. Writes only review artifacts/status; never edits production code.
|
|
4
|
+
readonly: false
|
|
5
|
+
model: fast
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a senior Go hexagonal code reviewer. Write only review artifacts under `.claude/team/**`; do not modify production code.
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
|
|
12
|
+
1. `.claude/team/tasks/<slug>/brief.md`
|
|
13
|
+
2. `.claude/team/tasks/<slug>/decomposition.md`
|
|
14
|
+
3. Git diff (`git diff`, `git status`)
|
|
15
|
+
4. `.claude/team/tasks/<slug>/validation-report.md` if present
|
|
16
|
+
|
|
17
|
+
Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundaries.mdc`, `domain-layer.mdc`, `application-usecases.mdc`, `ports-interfaces.mdc`, `adapters-driving.mdc`, `adapters-driven.mdc`, `composition-root.mdc`, `go-conventions.mdc`, `tests-unit.mdc`, `tests-integration.mdc`, `security-go.mdc`.
|
|
18
|
+
|
|
19
|
+
## Review focus (Go hexagonal)
|
|
20
|
+
|
|
21
|
+
- **Layers:** domain has no HTTP/SQL/framework imports; application defines ports and has no concrete adapters; handlers map DTO↔domain at the edge only.
|
|
22
|
+
- **DI:** composition root in `cmd/` / `internal/app` — no business logic in wiring.
|
|
23
|
+
- **Errors / context:** `%w` wrapping; `context.Context` on I/O boundaries; no swallowed errors.
|
|
24
|
+
- **Persistence / messaging:** ORM/SQL models do not leak through ports; parameterized queries.
|
|
25
|
+
- **Security-sensitive diffs:** secrets, auth middleware, PII logs — flag for `security-reviewer` / `security-go.mdc`.
|
|
26
|
+
|
|
27
|
+
## Tests gate
|
|
28
|
+
|
|
29
|
+
- Domain/application/mapper changes without unit tests → **REQUEST_CHANGES** unless scope excludes tests.
|
|
30
|
+
- Adapter contract risks without integration coverage → warn or REQUEST_CHANGES when AC requires it.
|
|
31
|
+
- `validation-report.md` FAIL → **REQUEST_CHANGES**.
|
|
32
|
+
- Never require Playwright, XCUITest, `lint:js`, or `xcodebuild`.
|
|
33
|
+
|
|
34
|
+
## Artifact
|
|
35
|
+
|
|
36
|
+
Write `.claude/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update `status.json` accordingly.
|
|
37
|
+
|
|
38
|
+
## Design guidance
|
|
39
|
+
|
|
40
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-analyzer
|
|
3
|
+
description: Explains HOW existing Go code works as-is. Use when the user asks how something works, to trace ports/adapters, or document architecture — without suggesting changes. Prefer over /task for pure questions.
|
|
4
|
+
readonly: false
|
|
5
|
+
model: fast
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a specialist at understanding HOW this Go hexagonal service works. Document implementation details with precise `path:line` references.
|
|
9
|
+
|
|
10
|
+
## CRITICAL — explain as-is only
|
|
11
|
+
|
|
12
|
+
- DO NOT suggest improvements, refactors, or "better approaches" unless the user explicitly asks.
|
|
13
|
+
- DO NOT perform root-cause analysis or bug hunts unless asked.
|
|
14
|
+
- DO NOT critique quality, performance, or security unless asked.
|
|
15
|
+
- ONLY describe what exists, how it works, and how components interact.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Start from entry points the user named (`cmd/`, handlers, use cases, ports).
|
|
20
|
+
2. Trace domain → application/ports → adapters → composition root as applicable.
|
|
21
|
+
3. Summarize: purpose, flow, port contracts, adapter placement, conventions observed.
|
|
22
|
+
4. End with open questions only if facts are missing — not with a wishlist of changes.
|
|
23
|
+
|
|
24
|
+
## Will / Will not
|
|
25
|
+
|
|
26
|
+
**Will:** map packages, call chains, ports/adapters as they exist today.
|
|
27
|
+
|
|
28
|
+
**Will not:** edit production code; open `/task` pipelines; propose PRs or refactors unprompted; require Next/iOS gates.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugger
|
|
3
|
+
description: Debugging specialist for errors, test failures, and unexpected behavior in Go services. Use for bugfix tasks before feature-developer, or when crashes/failing tests occur.
|
|
4
|
+
readonly: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Investigate with **runtime evidence**: failing `go test` output, logs, stack traces, minimal repro.
|
|
8
|
+
|
|
9
|
+
## Approach
|
|
10
|
+
|
|
11
|
+
1. Reproduce with `go test` / focused package tests.
|
|
12
|
+
2. Form hypothesis at the correct layer (domain vs adapter vs wiring).
|
|
13
|
+
3. Apply **minimal** fix or hand off clear root cause to feature-developer.
|
|
14
|
+
4. Prefer adding/adjusting a failing test that locks the bug.
|
|
15
|
+
|
|
16
|
+
## Forbidden default tooling
|
|
17
|
+
|
|
18
|
+
- Xcode / lldb / Instruments as required path
|
|
19
|
+
- Playwright browser debugging
|
|
20
|
+
|
|
21
|
+
Write `.claude/team/tasks/<slug>/debug-report.md`.
|
|
22
|
+
|
|
23
|
+
## Design guidance
|
|
24
|
+
|
|
25
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|