@bonesofspring/ai-rules 0.2.6 → 0.2.8
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 +65 -1
- package/README.md +13 -5
- package/bin/cli.js +30 -1
- package/package.json +3 -2
- package/presets/_shared/README.md +1 -1
- package/presets/_shared/core/agent-team/agent-team-intake.md +1 -1
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
- package/presets/_shared/core/architecture/reference-features.template.md +12 -0
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +6 -4
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
- package/presets/_shared/core/quality/code-quality-and-refactoring.md +11 -0
- package/presets/_shared/core/review/code-review-mr.md +9 -0
- package/presets/claude/go/CLAUDE.md +5 -1
- package/presets/claude/go/README.md +5 -1
- package/presets/claude/go/REPO_AGENTS.md +48 -0
- package/presets/claude/go/agents/README.md +19 -2
- package/presets/claude/go/agents/build-verifier.md +6 -1
- package/presets/claude/go/agents/codebase-analyzer.md +28 -0
- package/presets/claude/go/agents/feature-developer.md +13 -0
- package/presets/claude/go/hooks/README.md +6 -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/rules/api-and-data/api-http.md +10 -3
- package/presets/claude/go/rules/architecture/reference-features.md +4 -0
- package/presets/claude/go/rules/stack/go-conventions.md +30 -3
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/code-quality.md +12 -1
- package/presets/claude/go/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -8
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/go/skills/README.md +2 -2
- package/presets/claude/go/skills/code-review/SKILL.md +11 -2
- package/presets/claude/go/skills/feature-delivery/SKILL.md +4 -0
- package/presets/claude/go/skills/technical-retro/SKILL.md +46 -2
- package/presets/claude/go/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/go/team/conventions.md +21 -0
- package/presets/claude/go/team/fixtures/feature-full.json +5 -23
- package/presets/claude/ios-swift/CLAUDE.md +4 -1
- package/presets/claude/ios-swift/README.md +5 -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 +7 -2
- package/presets/claude/ios-swift/agents/codebase-analyzer.md +28 -0
- package/presets/claude/ios-swift/agents/feature-developer.md +13 -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/architecture/reference-features.md +4 -0
- package/presets/claude/ios-swift/rules/stack/ios-app-core.md +5 -28
- 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 +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +12 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +47 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
- 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 +10 -2
- package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +4 -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/java/CLAUDE.md +29 -0
- package/presets/claude/java/MCP.md +13 -0
- package/presets/claude/java/README.md +26 -0
- package/presets/claude/java/REPO_AGENTS.md +45 -0
- package/presets/claude/java/agents/README.md +32 -0
- package/presets/claude/java/agents/api-contract-reviewer.md +23 -0
- package/presets/claude/java/agents/build-verifier.md +45 -0
- package/presets/claude/java/agents/ci-investigator.md +17 -0
- package/presets/claude/java/agents/code-reviewer.md +40 -0
- package/presets/claude/java/agents/codebase-analyzer.md +28 -0
- package/presets/claude/java/agents/debugger.md +25 -0
- package/presets/claude/java/agents/feature-developer.md +43 -0
- package/presets/claude/java/agents/integration-test-generator.md +22 -0
- package/presets/claude/java/agents/integration-test-healer.md +22 -0
- package/presets/claude/java/agents/integration-test-planner.md +22 -0
- package/presets/claude/java/agents/migration-specialist.md +31 -0
- package/presets/claude/java/agents/performance-auditor.md +22 -0
- package/presets/claude/java/agents/qa-tester.md +24 -0
- package/presets/claude/java/agents/security-reviewer.md +20 -0
- package/presets/claude/java/agents/solution-architect.md +28 -0
- package/presets/claude/java/agents/task-analyst.md +25 -0
- package/presets/claude/java/agents/task-router.md +69 -0
- package/presets/claude/java/agents/tech-writer.md +15 -0
- package/presets/claude/java/agents/unit-test-generator.md +21 -0
- package/presets/claude/java/agents/unit-test-healer.md +13 -0
- package/presets/claude/java/agents/unit-test-planner.md +26 -0
- package/presets/claude/java/commands/README.md +13 -0
- package/presets/claude/java/commands/feature-continue.md +51 -0
- package/presets/claude/java/commands/feature-start.md +30 -0
- package/presets/claude/java/commands/task-continue.md +49 -0
- package/presets/claude/java/commands/task.md +49 -0
- package/presets/claude/java/commands/technical-retro.md +58 -0
- package/presets/claude/java/hooks/README.md +16 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +381 -0
- package/presets/claude/java/hooks/examples/README.md +18 -0
- package/presets/claude/java/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/java/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/java/hooks/examples/test-on-save.example.sh +18 -0
- package/presets/claude/java/hooks/guard-shell-command.sh +80 -0
- package/presets/claude/java/mcp.json +11 -0
- package/presets/claude/java/rules/README.md +60 -0
- package/presets/claude/java/rules/api-and-data/README.md +14 -0
- package/presets/claude/java/rules/api-and-data/adapters-driven.md +38 -0
- package/presets/claude/java/rules/api-and-data/adapters-driving.md +38 -0
- package/presets/claude/java/rules/api-and-data/api-grpc.md +29 -0
- package/presets/claude/java/rules/api-and-data/api-http.md +36 -0
- package/presets/claude/java/rules/api-and-data/messaging-adapters.md +24 -0
- package/presets/claude/java/rules/api-and-data/persistence-adapters.md +33 -0
- package/presets/claude/java/rules/architecture/README.md +16 -0
- package/presets/claude/java/rules/architecture/application-usecases.md +32 -0
- package/presets/claude/java/rules/architecture/boundaries.md +29 -0
- package/presets/claude/java/rules/architecture/composition-root.md +31 -0
- package/presets/claude/java/rules/architecture/domain-layer.md +38 -0
- package/presets/claude/java/rules/architecture/feature-delivery.md +52 -0
- package/presets/claude/java/rules/architecture/module-public-api.md +31 -0
- package/presets/claude/java/rules/architecture/ports-interfaces.md +34 -0
- package/presets/claude/java/rules/architecture/reference-features.md +34 -0
- package/presets/claude/java/rules/stack/README.md +10 -0
- package/presets/claude/java/rules/stack/java-app-core.md +32 -0
- package/presets/claude/java/rules/stack/java-conventions.md +52 -0
- package/presets/claude/java/rules/testing/README.md +11 -0
- package/presets/claude/java/rules/testing/e2e.md +22 -0
- package/presets/claude/java/rules/testing/integration.md +27 -0
- package/presets/claude/java/rules/testing/unit.md +33 -0
- package/presets/claude/java/rules/tooling-and-review/README.md +21 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +26 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +179 -0
- package/presets/claude/java/rules/tooling-and-review/code-quality.md +83 -0
- package/presets/claude/java/rules/tooling-and-review/code-review.md +59 -0
- package/presets/claude/java/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/java/rules/tooling-and-review/java-tooling.md +36 -0
- package/presets/claude/java/rules/tooling-and-review/post-change-test.md +32 -0
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +56 -0
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +44 -0
- package/presets/claude/java/rules/tooling-and-review/security-java.md +29 -0
- package/presets/claude/java/rules/tooling-and-review/technical-retro.md +20 -0
- package/presets/claude/java/rules/ui-and-accessibility/README.md +5 -0
- package/presets/claude/java/skills/README.md +5 -0
- package/presets/claude/java/skills/ci-investigation/SKILL.md +11 -0
- package/presets/claude/java/skills/code-review/SKILL.md +25 -0
- package/presets/claude/java/skills/debug-investigation/SKILL.md +15 -0
- package/presets/claude/java/skills/feature-delivery/SKILL.md +30 -0
- package/presets/claude/java/skills/integration-testing/SKILL.md +15 -0
- package/presets/claude/java/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/java/skills/unit-testing/SKILL.md +14 -0
- package/presets/claude/java/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/java/team/README.md +27 -0
- package/presets/claude/java/team/conventions.md +21 -0
- package/presets/claude/java/team/fixtures/bugfix-standard.json +37 -0
- package/presets/claude/java/team/fixtures/feature-full.json +25 -0
- package/presets/claude/java/team/fixtures/feature-light.json +17 -0
- package/presets/claude/next/CLAUDE.md +5 -1
- package/presets/claude/next/README.md +6 -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 +7 -2
- package/presets/claude/next/agents/codebase-analyzer.md +28 -0
- package/presets/claude/next/agents/feature-developer.md +13 -0
- package/presets/claude/next/agents/security-reviewer.md +4 -2
- 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 +2 -1
- 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/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 +4 -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 +1 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/code-quality.md +12 -2
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +22 -0
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +6 -4
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/next/rules/tooling-and-review/security-next.md +57 -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 +10 -2
- package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -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 +6 -0
- package/presets/cursor/go/README.md +6 -5
- package/presets/cursor/go/REPO_AGENTS.md +48 -0
- package/presets/cursor/go/agents/README.md +23 -2
- package/presets/cursor/go/agents/build-verifier.md +6 -1
- package/presets/cursor/go/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/go/agents/feature-developer.md +13 -0
- package/presets/cursor/go/commands/README.md +1 -1
- package/presets/cursor/go/hooks/README.md +4 -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/rules/README.md +2 -2
- package/presets/cursor/go/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/rules/api-http.mdc +10 -3
- package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +12 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/go/rules/go-conventions.mdc +30 -3
- package/presets/cursor/go/rules/preset-layering.mdc +1 -1
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +6 -8
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/go/rules/reference-features.mdc +4 -0
- package/presets/cursor/go/skills/README.md +2 -2
- package/presets/cursor/go/skills/code-review/SKILL.md +10 -1
- package/presets/cursor/go/skills/feature-delivery/SKILL.md +4 -0
- package/presets/cursor/go/skills/technical-retro/SKILL.md +46 -2
- package/presets/cursor/go/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/go/team/conventions.md +21 -0
- package/presets/cursor/go/team/fixtures/feature-full.json +5 -23
- package/presets/cursor/ios-swift/AGENTS.md +5 -2
- package/presets/cursor/ios-swift/README.md +6 -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 +7 -2
- package/presets/cursor/ios-swift/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/ios-swift/agents/feature-developer.md +13 -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/agent-team-intake.mdc +1 -1
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +12 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/ios-swift/rules/ios-app-core.mdc +5 -28
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +6 -4
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/ios-swift/rules/reference-features.mdc +4 -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/skills/README.md +1 -0
- package/presets/cursor/ios-swift/skills/code-review/SKILL.md +10 -2
- package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +4 -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/java/AGENTS.md +37 -0
- package/presets/cursor/java/BUGBOT.md +11 -0
- package/presets/cursor/java/MCP.md +15 -0
- package/presets/cursor/java/README.md +26 -0
- package/presets/cursor/java/REPO_AGENTS.md +45 -0
- package/presets/cursor/java/agents/README.md +36 -0
- package/presets/cursor/java/agents/api-contract-reviewer.md +23 -0
- package/presets/cursor/java/agents/build-verifier.md +45 -0
- package/presets/cursor/java/agents/ci-investigator.md +17 -0
- package/presets/cursor/java/agents/code-reviewer.md +40 -0
- package/presets/cursor/java/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/java/agents/debugger.md +25 -0
- package/presets/cursor/java/agents/feature-developer.md +43 -0
- package/presets/cursor/java/agents/integration-test-generator.md +22 -0
- package/presets/cursor/java/agents/integration-test-healer.md +22 -0
- package/presets/cursor/java/agents/integration-test-planner.md +22 -0
- package/presets/cursor/java/agents/migration-specialist.md +31 -0
- package/presets/cursor/java/agents/performance-auditor.md +22 -0
- package/presets/cursor/java/agents/qa-tester.md +24 -0
- package/presets/cursor/java/agents/security-reviewer.md +20 -0
- package/presets/cursor/java/agents/solution-architect.md +28 -0
- package/presets/cursor/java/agents/task-analyst.md +25 -0
- package/presets/cursor/java/agents/task-router.md +69 -0
- package/presets/cursor/java/agents/tech-writer.md +15 -0
- package/presets/cursor/java/agents/unit-test-generator.md +21 -0
- package/presets/cursor/java/agents/unit-test-healer.md +13 -0
- package/presets/cursor/java/agents/unit-test-planner.md +26 -0
- package/presets/cursor/java/commands/README.md +54 -0
- package/presets/cursor/java/commands/feature-continue.md +19 -0
- package/presets/cursor/java/commands/feature-start.md +33 -0
- package/presets/cursor/java/commands/task-continue.md +49 -0
- package/presets/cursor/java/commands/task.md +49 -0
- package/presets/cursor/java/commands/technical-retro.md +81 -0
- package/presets/cursor/java/hooks/README.md +12 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +381 -0
- package/presets/cursor/java/hooks/examples/README.md +18 -0
- package/presets/cursor/java/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/java/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/java/hooks/examples/test-on-save.example.sh +18 -0
- package/presets/cursor/java/hooks/guard-shell-command.sh +80 -0
- package/presets/cursor/java/hooks.json +17 -0
- package/presets/cursor/java/mcp.json +11 -0
- package/presets/cursor/java/rules/README.md +97 -0
- package/presets/cursor/java/rules/adapters-driven.mdc +40 -0
- package/presets/cursor/java/rules/adapters-driving.mdc +40 -0
- package/presets/cursor/java/rules/agent-team-intake.mdc +20 -0
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +173 -0
- package/presets/cursor/java/rules/api-grpc.mdc +31 -0
- package/presets/cursor/java/rules/api-http.mdc +38 -0
- package/presets/cursor/java/rules/application-usecases.mdc +34 -0
- package/presets/cursor/java/rules/architecture-boundaries.mdc +30 -0
- package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +84 -0
- package/presets/cursor/java/rules/code-review-mr.mdc +54 -0
- package/presets/cursor/java/rules/composition-root.mdc +33 -0
- package/presets/cursor/java/rules/design-guidance.mdc +112 -0
- package/presets/cursor/java/rules/domain-layer.mdc +40 -0
- package/presets/cursor/java/rules/feature-delivery-workflow.mdc +47 -0
- package/presets/cursor/java/rules/java-app-core.mdc +33 -0
- package/presets/cursor/java/rules/java-conventions.mdc +54 -0
- package/presets/cursor/java/rules/java-tooling.mdc +34 -0
- package/presets/cursor/java/rules/messaging-adapters.mdc +26 -0
- package/presets/cursor/java/rules/module-public-api.mdc +33 -0
- package/presets/cursor/java/rules/persistence-adapters.mdc +35 -0
- package/presets/cursor/java/rules/ports-interfaces.mdc +36 -0
- package/presets/cursor/java/rules/post-change-test.mdc +30 -0
- package/presets/cursor/java/rules/preset-layering.mdc +36 -0
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +56 -0
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +39 -0
- package/presets/cursor/java/rules/preset-token-budget.mdc +41 -0
- package/presets/cursor/java/rules/preset-twin-sync.mdc +44 -0
- package/presets/cursor/java/rules/reference-features.mdc +36 -0
- package/presets/cursor/java/rules/security-java.mdc +31 -0
- package/presets/cursor/java/rules/technical-retro.mdc +14 -0
- package/presets/cursor/java/rules/tests-e2e.mdc +24 -0
- package/presets/cursor/java/rules/tests-integration.mdc +29 -0
- package/presets/cursor/java/rules/tests-unit.mdc +35 -0
- package/presets/cursor/java/skills/README.md +5 -0
- package/presets/cursor/java/skills/ci-investigation/SKILL.md +11 -0
- package/presets/cursor/java/skills/code-review/SKILL.md +25 -0
- package/presets/cursor/java/skills/debug-investigation/SKILL.md +15 -0
- package/presets/cursor/java/skills/feature-delivery/SKILL.md +30 -0
- package/presets/cursor/java/skills/integration-testing/SKILL.md +15 -0
- package/presets/cursor/java/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/java/skills/unit-testing/SKILL.md +14 -0
- package/presets/cursor/java/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/java/team/README.md +31 -0
- package/presets/cursor/java/team/conventions.md +21 -0
- package/presets/cursor/java/team/fixtures/bugfix-standard.json +37 -0
- package/presets/cursor/java/team/fixtures/feature-full.json +25 -0
- package/presets/cursor/java/team/fixtures/feature-light.json +17 -0
- package/presets/cursor/next/AGENTS.md +5 -2
- package/presets/cursor/next/README.md +7 -6
- 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 +7 -2
- package/presets/cursor/next/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/next/agents/feature-developer.md +13 -0
- package/presets/cursor/next/agents/security-reviewer.md +4 -2
- 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 +4 -3
- package/presets/cursor/next/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- 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 +12 -2
- package/presets/cursor/next/rules/code-review-mr.mdc +11 -13
- 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 +1 -1
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +6 -4
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
- package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -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 +4 -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/tests-unit.mdc +12 -0
- package/presets/cursor/next/skills/README.md +2 -0
- package/presets/cursor/next/skills/code-review/SKILL.md +10 -2
- package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -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
|
@@ -10,34 +10,16 @@
|
|
|
10
10
|
{ "agent": "build-verifier", "label": "go test / go vet / golangci-lint", "model": "cheap" },
|
|
11
11
|
{ "agent": "security-reviewer", "label": "Security review", "model": "strong" },
|
|
12
12
|
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" },
|
|
13
|
-
{ "agent": "qa-tester", "label": "Integration tests", "scope": "e2e-only" }
|
|
13
|
+
{ "agent": "qa-tester", "label": "Integration tests", "scope": "e2e-only" },
|
|
14
|
+
{ "agent": "integration-test-planner", "label": "Plan integration coverage" },
|
|
15
|
+
{ "agent": "integration-test-generator", "label": "Generate integration tests" }
|
|
14
16
|
],
|
|
15
17
|
"humanGates": ["after:task-analyst"],
|
|
16
18
|
"autoChain": true,
|
|
17
19
|
"skipped": [
|
|
18
20
|
{
|
|
19
|
-
"agent": "
|
|
20
|
-
"reason": "Go backend
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"agent": "playwright-test-generator",
|
|
24
|
-
"reason": "Go backend uses integration-test-*"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"agent": "playwright-test-healer",
|
|
28
|
-
"reason": "Go backend uses integration-test-*"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"agent": "xcuitest-test-planner",
|
|
32
|
-
"reason": "Go backend uses integration-test-* — not XCUITest"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"agent": "xcuitest-test-generator",
|
|
36
|
-
"reason": "Go backend uses integration-test-*"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"agent": "xcuitest-test-healer",
|
|
40
|
-
"reason": "Go backend uses integration-test-*"
|
|
21
|
+
"agent": "accessibility-reviewer",
|
|
22
|
+
"reason": "Go backend has no UI surface"
|
|
41
23
|
}
|
|
42
24
|
]
|
|
43
25
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Краткая точка входа для Cursor. Подробные правила — `.cursor/rules/*.mdc`; сценарии — `.cursor/skills/**`.
|
|
4
4
|
|
|
5
|
+
**Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root (cross-tool setup, commands, security, living conventions pointers).
|
|
6
|
+
|
|
5
7
|
See `.cursor/rules/README.md` for the full catalog and loading strategy.
|
|
6
8
|
|
|
7
9
|
## Quick start
|
|
@@ -17,6 +19,7 @@ See `.cursor/rules/README.md` for the full catalog and loading strategy.
|
|
|
17
19
|
| Code review MR | skill `code-review` + `code-review-mr.mdc` |
|
|
18
20
|
| UI-тесты | skill `xcuitest-e2e` + agents `xcuitest-test-*` |
|
|
19
21
|
| Security / Keychain | `security-ios.mdc` |
|
|
22
|
+
| SwiftUI lifecycle | `swiftui-ui.mdc` (`.task`, ownership) |
|
|
20
23
|
| Валидация перед review | agent `build-verifier` (для preset: ещё проверка chain≠next) |
|
|
21
24
|
| Техническое ретро | `/technical-retro` + skill `technical-retro` |
|
|
22
25
|
|
|
@@ -32,7 +35,7 @@ See `.cursor/rules/README.md` for the full catalog and loading strategy.
|
|
|
32
35
|
|
|
33
36
|
- Реализация, багфикс, миграция, тесты, ревью MR, CI-fix — **предпочтительно через `/task`**.
|
|
34
37
|
- Простой one-liner без архитектурного риска — можно без pipeline, если пользователь явно просит.
|
|
35
|
-
- Вопросы «как работает X» — ответ без `/task`.
|
|
38
|
+
- Вопросы «как работает X» — agent `codebase-analyzer` (explain-as-is) или ответ без `/task`.
|
|
36
39
|
|
|
37
40
|
## Pipeline routing
|
|
38
41
|
|
|
@@ -44,4 +47,4 @@ Intent detection, profiles (`full` / `standard` / `light`), and default steps
|
|
|
44
47
|
npx @bonesofspring/ai-rules init cursor --preset ios-swift
|
|
45
48
|
```
|
|
46
49
|
|
|
47
|
-
Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`.
|
|
50
|
+
Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md` → `.cursor/AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`, плюс `REPO_AGENTS.md` → корневой `AGENTS.md`. Skill: `write-adr` (on-demand).
|
|
@@ -12,14 +12,15 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
|
|
|
12
12
|
|
|
13
13
|
| Path | Содержание |
|
|
14
14
|
|------|------------|
|
|
15
|
-
| `
|
|
15
|
+
| `REPO_AGENTS.md` | → repo-root `AGENTS.md` (cross-tool) |
|
|
16
|
+
| `AGENTS.md` | → `.cursor/AGENTS.md` quick-start |
|
|
16
17
|
| `BUGBOT.md` | Cursor Bugbot review priorities (iOS) |
|
|
17
18
|
| `rules/**` | `.mdc` + README (alwaysApply ≤3) |
|
|
18
|
-
| `agents/**` | **
|
|
19
|
-
| `skills/**` | **
|
|
19
|
+
| `agents/**` | **22** ролей (+ README rename map; includes on-demand `codebase-analyzer`) |
|
|
20
|
+
| `skills/**` | **8** skills (incl. `xcuitest-e2e`, `write-adr`; no `react-performance`) |
|
|
20
21
|
| `commands/**` | task, task-continue, feature-start/continue, technical-retro |
|
|
21
|
-
| `hooks.json` + `hooks/**` | guard-shell + chain-team-phases |
|
|
22
|
-
| `team/**` | fixtures + README |
|
|
22
|
+
| `hooks.json` + `hooks/**` | guard-shell + chain-team-phases; optional `hooks/examples/` |
|
|
23
|
+
| `team/**` | fixtures + `conventions.md` + README |
|
|
23
24
|
| `mcp.json` + `MCP.md` | Context7 + Figma MCP → `.cursor/mcp.json` |
|
|
24
25
|
|
|
25
26
|
## alwaysApply (≤3)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# iOS Swift — 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 ios-swift
|
|
13
|
+
npx @bonesofspring/ai-rules init claude --preset ios-swift
|
|
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
|
+
| Gate | Typical command |
|
|
21
|
+
|------|-----------------|
|
|
22
|
+
| Build | `xcodebuild` (scheme/workspace as in project docs) |
|
|
23
|
+
| Lint | **SwiftLint** (config in repo; see `xcode-tooling` / conventions) |
|
|
24
|
+
| Format | SwiftFormat when configured |
|
|
25
|
+
| Tests | `xcodebuild test` slice for the changed target |
|
|
26
|
+
|
|
27
|
+
After code edits: invoke **`post-change-build`** (requestable). Full gate: agent `build-verifier`.
|
|
28
|
+
|
|
29
|
+
## Security basics
|
|
30
|
+
|
|
31
|
+
- Do not commit secrets (API keys, Keychain dumps, `.env`).
|
|
32
|
+
- Review destructive git before running; respect shell hooks.
|
|
33
|
+
- Do not skip signing / CI gates unless the user explicitly asks.
|
|
34
|
+
|
|
35
|
+
## Tool entry points
|
|
36
|
+
|
|
37
|
+
| Tool | Map |
|
|
38
|
+
|------|-----|
|
|
39
|
+
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
40
|
+
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
41
|
+
|
|
42
|
+
Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
|
|
43
|
+
|
|
44
|
+
## Living conventions
|
|
45
|
+
|
|
46
|
+
Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init).
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
When copying next pipeline templates: put Playwright stems in `skipped` with reason «iOS uses XCUITest» and schedule xcuitest trio instead.
|
|
15
15
|
|
|
16
|
-
## Roster (
|
|
16
|
+
## Roster (22)
|
|
17
17
|
|
|
18
18
|
| Agent | Production-код |
|
|
19
19
|
|-------|----------------|
|
|
20
20
|
| task-router, task-analyst, solution-architect, migration-specialist, api-contract-reviewer | no |
|
|
21
|
+
| codebase-analyzer | no (explain-as-is only) |
|
|
21
22
|
| feature-developer | yes |
|
|
22
23
|
| build-verifier | no |
|
|
23
24
|
| debugger, ci-investigator | minimal |
|
|
@@ -35,7 +36,7 @@ Same tiers as **cursor/next** (see that README for full notes). Defaults in this
|
|
|
35
36
|
|
|
36
37
|
| Tier | Frontmatter | Agents |
|
|
37
38
|
|------|-------------|--------|
|
|
38
|
-
| **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer |
|
|
39
|
+
| **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer, codebase-analyzer |
|
|
39
40
|
| **standard** | `inherit` | developer, debugger, ci-investigator, api-contract, a11y, qa, unit-*, xcuitest-* |
|
|
40
41
|
| **strong** | `claude-opus-4-8[effort=high]` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
|
|
41
42
|
|
|
@@ -35,11 +35,11 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
|
|
|
35
35
|
3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences). See `preset-no-cross-stack-leakage.mdc`.
|
|
36
36
|
4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
|
|
37
37
|
5. **Roster:** 21 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
|
|
38
|
-
6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, ios-swift, and
|
|
38
|
+
6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, ios-swift, go, and java).
|
|
39
39
|
7. **Mapping / README:** `claude/ios-swift/rules/README.md` mapping table present; core→stack mapping documented when `_shared` consumers exist.
|
|
40
40
|
8. **shared-core consumers:** if `_shared/core/**` changed, every matching `<!-- shared-core: … -->` consumer in this PR must be updated (or intentional fork documented).
|
|
41
41
|
9. **Session-start body budget:** sum of the **3** intended always-on / session-start rule bodies ≤ **120** lines (stretch ≤100); do **not** include `**/README.md` — record in report.
|
|
42
|
-
10. **Embed drift (
|
|
42
|
+
10. **Embed drift (hard in `check:preset-structure`):** `packages/ai-rules/scripts/check-shared-core-drift.sh` with `AI_RULES_DRIFT_FAIL=1`.
|
|
43
43
|
11. **Dogfood (monorepo soft):** `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion without migration doc → risk / FAIL for maintainers.
|
|
44
44
|
|
|
45
45
|
### Soft rules (do not FAIL alone)
|
|
@@ -47,6 +47,11 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
|
|
|
47
47
|
- **Thin aliases:** `agent-team-intake`, `technical-retro` may be <15 body lines. Enforce ≥15 on **domain** rules (navigation, persistence, security, modules, networking, UI).
|
|
48
48
|
- Embed vs lineage modes: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
|
|
49
49
|
|
|
50
|
+
12. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
|
|
51
|
+
13. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
52
|
+
14. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, and java → **FAIL** (leakage). Prefer `check:preset-leakage`.
|
|
53
|
+
15. **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`.
|
|
54
|
+
|
|
50
55
|
## Output
|
|
51
56
|
|
|
52
57
|
Write `.cursor/team/tasks/<slug>/validation-report.md`:
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-analyzer
|
|
3
|
+
description: Explains HOW existing iOS Swift/SwiftUI code works as-is. Use when the user asks how something works, to trace Feature layers, 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 iOS codebase 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 (Feature folders, Views, ViewModels, Domain, Data).
|
|
20
|
+
2. Trace Presentation → Domain → Data and composition root in `App/` as applicable.
|
|
21
|
+
3. Summarize: purpose, flow, module/public API boundaries, 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 files, call chains, Feature layers as they exist today.
|
|
27
|
+
|
|
28
|
+
**Will not:** edit production code; open `/task` pipelines; propose PRs or refactors unprompted; require Next/Playwright gates.
|
|
@@ -20,6 +20,19 @@ You are a senior iOS developer (SwiftUI-first, SPM as in repo) with strict layer
|
|
|
20
20
|
- Mark completed WPs in `decomposition.md`.
|
|
21
21
|
- After Swift edits: **invoke** `post-change-build.mdc` (+ `xcode-tooling.mdc` for commands). If next step is `build-verifier`, scoped build/lint on changed targets is enough.
|
|
22
22
|
|
|
23
|
+
## Zero improvisation
|
|
24
|
+
|
|
25
|
+
- Implement **only** what the brief / AC / current decomposition task require.
|
|
26
|
+
- If requirements are ambiguous, conflicting, or multi-way — **ask** before coding; do not guess extras as "best practices".
|
|
27
|
+
- Forbidden without explicit AC/task: unrelated Keychain/security hardening, extra validation, UI polish, logging, drive-by refactors, new config/env.
|
|
28
|
+
- Boy scout / `design-guidance` improvements stay **within** touched files and must not expand task scope.
|
|
29
|
+
|
|
30
|
+
## Will / Will not
|
|
31
|
+
|
|
32
|
+
**Will:** follow Feature layer order and reference Features; add required unit tests; run the post-change build gate; update task artifacts.
|
|
33
|
+
|
|
34
|
+
**Will not:** formal code review; invent AC; pull Next/Playwright gates; auto-continue the next WP when the pipeline expects a human gate or handoff.
|
|
35
|
+
|
|
23
36
|
## Preset / cross-stack fork (when editing agents, skills, hooks)
|
|
24
37
|
|
|
25
38
|
When copying from `next` into `ios-swift` (or another stack):
|
|
@@ -42,7 +42,7 @@ Slash-команды копируются в `.cursor/commands/` при `ai-rule
|
|
|
42
42
|
|
|
43
43
|
## Связанные файлы
|
|
44
44
|
|
|
45
|
-
- Subagents: `../agents/` (
|
|
45
|
+
- Subagents: `../agents/` (22 ролей, включая `task-router.md`, `codebase-analyzer.md`, и `xcuitest-test-{planner,generator,healer}`)
|
|
46
46
|
- Оркестратор: `../rules/agent-team-orchestrator.mdc`
|
|
47
47
|
- Skills: `../skills/` (`feature-delivery`, `code-review`, `debug-investigation`, `ci-investigation`, `unit-testing`, `xcuitest-e2e`, `technical-retro`)
|
|
48
48
|
- Артефакты: `../team/README.md` (`pipeline.json`, `status.json`)
|
|
@@ -6,3 +6,7 @@
|
|
|
6
6
|
| `chain-team-phases.sh` | Auto-chain pipeline steps on `subagentStop` |
|
|
7
7
|
|
|
8
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,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: **ios-swift** — recipes must stay stack-safe (no cross-stack lint/test commands).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: SwiftFormat / SwiftLint on edited .swift files.
|
|
3
|
+
# NOT in default hooks.json.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
if command -v swiftformat >/dev/null 2>&1; then
|
|
6
|
+
git diff --name-only --diff-filter=ACMR HEAD 2>/dev/null | grep '\.swift$' | while read -r f; do
|
|
7
|
+
[[ -f "$f" ]] && swiftformat "$f" || true
|
|
8
|
+
done
|
|
9
|
+
fi
|
|
10
|
+
if command -v swiftlint >/dev/null 2>&1; then
|
|
11
|
+
swiftlint lint --quiet 2>/dev/null || true
|
|
12
|
+
fi
|
|
13
|
+
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,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: xcodebuild test slice for the active scheme (adjust SCHEME/DEST).
|
|
3
|
+
# NOT in default hooks.json. No Playwright / yarn lint.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
SCHEME="${XCODE_SCHEME:-App}"
|
|
6
|
+
DEST="${XCODE_DESTINATION:-platform=iOS Simulator,name=iPhone 16}"
|
|
7
|
+
xcodebuild test -scheme "$SCHEME" -destination "$DEST" -quiet 2>/dev/null || true
|
|
8
|
+
exit 0
|
|
@@ -11,6 +11,6 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
11
11
|
|
|
12
12
|
1. Prefer **`/task <their request>`** or invoke **task-router** first.
|
|
13
13
|
2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
|
|
14
|
-
3. Pure questions («как работает X», «объясни») —
|
|
14
|
+
3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
15
15
|
|
|
16
16
|
Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
@@ -94,6 +94,6 @@ Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent
|
|
|
94
94
|
|
|
95
95
|
## Skip pipeline when
|
|
96
96
|
|
|
97
|
-
- Pure questions
|
|
97
|
+
- Pure questions («как работает X») — prefer **`codebase-analyzer`**; typo / one-file trivial fix; user «без pipeline»; single-line docs-only.
|
|
98
98
|
|
|
99
99
|
Borderline — **`agent-team-intake.mdc`**.
|
|
@@ -62,11 +62,22 @@ alwaysApply: true
|
|
|
62
62
|
- **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
|
|
63
63
|
- Не жертвовать архитектурой и слоями ради краткости реализации.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
## Agent discipline (anti-sycophancy)
|
|
66
|
+
|
|
67
|
+
- Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
|
|
68
|
+
- Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
|
|
69
|
+
- Refactor without tests → propose a characterization test first; if declined, label `UNTESTED`.
|
|
70
|
+
- Comments = WHY only when non-obvious; ban self-referential «added for issue Y» comments.
|
|
71
|
+
- Urgency/authority pressure: name the technical trade-off once, then comply — no apology loops.
|
|
72
|
+
- Match verification depth to risk; report status by what was **verified**, not attempted.
|
|
66
73
|
|
|
74
|
+
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.
|
|
75
|
+
|
|
76
|
+
> Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
|
|
67
77
|
## Stack notes
|
|
68
78
|
|
|
69
79
|
- Перед новым UI‑контролом проверять DesignSystem и существующие компоненты.
|
|
70
80
|
- Public API: протоколы и facades между фичами.
|
|
71
81
|
- Допустимые примеры: общий mapper/validation; заменить force unwrap; разбить перегруженный ViewModel на use cases; design tokens вместо magic numbers/colors; убрать прямую зависимость View от Data в пользу протокола.
|
|
72
82
|
- Post-change gate: **`post-change-build.mdc`** + `xcode-tooling.mdc` (не yarn lint).
|
|
83
|
+
- Style: **SwiftLint** (+ SwiftFormat when configured) — authoritative style gate; do not duplicate linter rules in prose.
|
|
@@ -35,6 +35,15 @@ Concrete rule stems — in **Stack notes**.
|
|
|
35
35
|
- Boy scout rule: suggest fixes feasible within the MR scope.
|
|
36
36
|
- No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
|
|
37
37
|
|
|
38
|
+
## Output contract
|
|
39
|
+
|
|
40
|
+
Procedure details live in skill `code-review`. Required shape:
|
|
41
|
+
|
|
42
|
+
- Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
|
|
43
|
+
- Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
44
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
45
|
+
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
46
|
+
|
|
38
47
|
## Stack notes
|
|
39
48
|
|
|
40
49
|
On-demand правило для review-потоков (не always-on).
|
|
@@ -5,40 +5,17 @@ alwaysApply: true
|
|
|
5
5
|
|
|
6
6
|
# Стек и окружение
|
|
7
7
|
|
|
8
|
-
Версии Swift, iOS
|
|
9
|
-
|
|
10
|
-
- **Язык / платформа:** Swift, iOS (min — из таргета).
|
|
11
|
-
- **UI:** SwiftUI — приоритет для нового кода; UIKit — где уже принято в репо.
|
|
12
|
-
- **Сборка:** Xcode; SPM и/или CocoaPods — как в репозитории.
|
|
13
|
-
- **Concurrency:** `async`/`await`, `Task`, `Actor`; UI — `@MainActor`.
|
|
14
|
-
- **Тесты:** XCTest или Swift Testing; UI — XCUITest.
|
|
15
|
-
- **Сеть:** `URLSession` или клиент репо; DTO через `Codable`.
|
|
16
|
-
- **Дизайн-система:** токены/примитивы из `DesignSystem/` (или аналога); без «магических» значений.
|
|
17
|
-
- **Наблюдаемость:** только если уже в проекте — централизованно.
|
|
8
|
+
Версии — **из Xcode / Package.swift / конфигов репо**. Рамка: Swift, iOS; SwiftUI приоритет (UIKit где принято); Xcode + SPM/CocoaPods как в репо; `async`/`await`, `@MainActor`; XCTest/Swift Testing + XCUITest; сеть — `URLSession`/`Codable`; UI — токены `DesignSystem/`; наблюдаемость — только если уже в проекте.
|
|
18
9
|
|
|
19
10
|
# Структура проекта
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- `App/` — `@main`, composition root, DI, навигация верхнего уровня.
|
|
24
|
-
- `Features/<FeatureName>/` — `Presentation/` (Views, ViewModels), `Domain/` (entities, use cases, протоколы), `Data/` (repos, API, DTO, mappers).
|
|
25
|
-
- `Core/` — общие утилиты, extensions, базовые ошибки.
|
|
26
|
-
- `DesignSystem/` — UI-примитивы без бизнес-логики.
|
|
27
|
-
- `Tests/` / `*Tests/` — unit и UI по конвенции Xcode.
|
|
28
|
-
|
|
29
|
-
Новые файлы — в том же слое/модуле, что и аналогичная функциональность.
|
|
30
|
-
|
|
31
|
-
Границы зависимостей и DI — **`architecture-boundaries.mdc`**.
|
|
12
|
+
Feature-first или слои сверху (как в репо): `App/` (composition root), `Features/<Name>/` (Presentation / Domain / Data), `Core/`, `DesignSystem/`, `Tests/`. Новые файлы — рядом с аналогами. Границы/DI — **`architecture-boundaries.mdc`**.
|
|
32
13
|
|
|
33
14
|
# Swift и качество
|
|
34
15
|
|
|
35
|
-
|
|
36
|
-
- Избегать `!` / `try!` в production; `guard` / `if let` / typed errors.
|
|
37
|
-
- Копировать существующие паттерны фичи/слоя.
|
|
16
|
+
API Design Guidelines + SwiftLint/SwiftFormat репо; без `!`/`try!` в production; `guard` / typed errors; паттерны соседних файлов.
|
|
38
17
|
|
|
39
18
|
# Работа агента
|
|
40
19
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- Доставка фичи — `feature-delivery-workflow.mdc`; после правок Swift — **вызвать** `post-change-build.mdc` (requestable).
|
|
44
|
-
- Toolchain перед сборкой — `xcode-tooling.mdc` (requestable).
|
|
20
|
+
- Слой → паттерн соседей; без `URLSession` во View и DTO во ViewModel (`architecture-boundaries.mdc`).
|
|
21
|
+
- Фичи: `feature-delivery-workflow.mdc`; после Swift — **вызвать** `post-change-build.mdc`; toolchain — `xcode-tooling.mdc`.
|
|
@@ -24,7 +24,7 @@ alwaysApply: false
|
|
|
24
24
|
## Куда класть новое правило
|
|
25
25
|
|
|
26
26
|
1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
|
|
27
|
-
2. Только один из installable стеков (`next` / `ios-swift` / `go`) → **stack-specific** (не в `_shared`).
|
|
27
|
+
2. Только один из installable стеков (`next` / `ios-swift` / `go` / `java`) → **stack-specific** (не в `_shared`).
|
|
28
28
|
3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
|
|
29
29
|
|
|
30
30
|
## SoT
|
|
@@ -17,7 +17,7 @@ alwaysApply: false
|
|
|
17
17
|
|
|
18
18
|
- `next` must not require iOS-only agents/tooling (`xcuitest-*`, `xcodebuild` as required handoff, Keychain-only rules).
|
|
19
19
|
- `ios-swift` must not ship Playwright handoffs or Next lint recipes as required commands.
|
|
20
|
-
- `go` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
20
|
+
- `go` / `java` must not ship Playwright, XCUITest, Next lint recipes, or `xcodebuild`/`SwiftLint` as required handoffs.
|
|
21
21
|
- Shared core must not embed stack paths (`app/src/**`, `Features/**`, `playwright`, `xcodebuild`).
|
|
22
22
|
|
|
23
23
|
## Forbidden in ios-swift hooks/agents (FAIL)
|
|
@@ -35,14 +35,16 @@ Required instead: `xcuitest-test-*` stems; build-verifier mentions `xcodebuild`
|
|
|
35
35
|
- `xcuitest-test-` as handoff stems
|
|
36
36
|
- Requiring `xcodebuild` / SwiftLint as the default post-change gate for Next app work
|
|
37
37
|
|
|
38
|
-
## Forbidden in go hooks/agents (FAIL)
|
|
38
|
+
## Forbidden in go / java hooks/agents (FAIL)
|
|
39
|
+
|
|
40
|
+
Shared backend-stack bans (both `go` and `java`):
|
|
39
41
|
|
|
40
42
|
- `playwright-test-`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`
|
|
41
43
|
- Positive yarn recipes `lint:js` / `lint:css`
|
|
42
44
|
- `xcuitest-test-`, `xcodebuild`, `SwiftLint` as required handoffs
|
|
43
45
|
- Agent file `accessibility-reviewer` (no UI surface)
|
|
44
46
|
|
|
45
|
-
Required instead: `integration-test-*`; build-verifier / `post-change-test`
|
|
47
|
+
Required instead: `integration-test-*`; build-verifier / `post-change-test` plus stack tooling — `go-tooling` (`go test`, `go vet`) or `java-tooling` (`mvn test` / `./gradlew test`).
|
|
46
48
|
|
|
47
49
|
## Soft / document
|
|
48
50
|
|
|
@@ -51,4 +53,4 @@ Required instead: `integration-test-*`; build-verifier / `post-change-test` / `g
|
|
|
51
53
|
|
|
52
54
|
## Chain fork
|
|
53
55
|
|
|
54
|
-
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, and `
|
|
56
|
+
`hooks/chain-team-phases.sh` must differ **byte-wise** pairwise among `next`, `ios-swift`, `go`, and `java` (per platform).
|
|
@@ -17,7 +17,7 @@ alwaysApply: false
|
|
|
17
17
|
|
|
18
18
|
- [ ] **SoT:** правки в `packages/…` (не только root `.cursor/`)
|
|
19
19
|
- [ ] **Core:** если менялся `_shared/core/**` — обновлены все `<!-- shared-core: … -->` consumers (или documented intentional fork)
|
|
20
|
-
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, and
|
|
20
|
+
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, ios-swift, go, and java — см. `preset-twin-sync`)
|
|
21
21
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table актуален
|
|
22
22
|
- [ ] **Token budget:** alwaysApply / session-start ≤ 3; meta rules not always-on
|
|
23
23
|
- [ ] **Leakage:** нет чужих stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
@@ -20,6 +20,7 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
20
20
|
| `next` | `presets/cursor/next/rules/*.mdc` | `presets/claude/next/rules/<topic>/` | **Required** in `claude/next/rules/README.md` |
|
|
21
21
|
| `ios-swift` | `presets/cursor/ios-swift/rules/*.mdc` | `presets/claude/ios-swift/rules/<topic>/` | Keep in `claude/ios-swift/rules/README.md` |
|
|
22
22
|
| `go` | `presets/cursor/go/rules/*.mdc` | `presets/claude/go/rules/<topic>/` | Keep in `claude/go/rules/README.md` |
|
|
23
|
+
| `java` | `presets/cursor/java/rules/*.mdc` | `presets/claude/java/rules/<topic>/` | Keep in `claude/java/rules/README.md` |
|
|
23
24
|
|
|
24
25
|
## Same-PR checklist
|
|
25
26
|
|
|
@@ -38,5 +39,6 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
38
39
|
- **next:** missing Claude twin for a changed Cursor rule → **FAIL** (mapping table required).
|
|
39
40
|
- **ios-swift:** missing Claude twin for a changed Cursor rule → **FAIL**.
|
|
40
41
|
- **go:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift; mapping table required).
|
|
42
|
+
- **java:** missing Claude twin for a changed Cursor rule → **FAIL** (same as next / ios-swift / go; mapping table required).
|
|
41
43
|
|
|
42
44
|
Dogfood: sync packages → root `.cursor/` after Cursor SoT changes (not the reverse). Use `packages/ai-rules/scripts/sync-dogfood-cursor.sh`.
|
|
@@ -52,6 +52,10 @@ Taxonomy / shared core: [`presets/_shared/README.md`](../../../../_shared/README
|
|
|
52
52
|
4. UI flow — `xcuitest-test-planner` → generator (accessibilityIdentifier).
|
|
53
53
|
5. Auth/Keychain touch — security-reviewer + `security-ios.mdc`.
|
|
54
54
|
|
|
55
|
+
## Living conventions
|
|
56
|
+
|
|
57
|
+
Post-init gotchas / patterns / decisions: **`.cursor/team/conventions.md`** (and the twin tool path if both Cursor and Claude are installed). Consumer-owned; not always-on. See root `AGENTS.md` § Living conventions.
|
|
58
|
+
|
|
55
59
|
## Связанные правила
|
|
56
60
|
|
|
57
61
|
- `code-quality-and-refactoring.mdc` — повторять паттерны.
|
|
@@ -27,9 +27,19 @@ guard let name = user?.name else { return }
|
|
|
27
27
|
|
|
28
28
|
- UI types — `@MainActor`.
|
|
29
29
|
- Shared mutable state — `actor` или isolation через queue; document thread expectations.
|
|
30
|
-
- `Task { }` в ViewModel: учитывать cancellation; `[weak self]` в escaping closures при retain cycles.
|
|
30
|
+
- `Task { }` в ViewModel: учитывать cancellation; `[weak self]` в escaping closures при retain cycles (default when capturing `self` in escaping work).
|
|
31
31
|
- Prefer `async/await` over completion handlers для нового кода.
|
|
32
32
|
|
|
33
|
+
## Anti-hallucination (Swift / concurrency)
|
|
34
|
+
|
|
35
|
+
| ❌ Avoid | ✅ Prefer |
|
|
36
|
+
|---------|----------|
|
|
37
|
+
| Force unwrap (`!`) for normal control flow | `guard let` / `if let` / typed throws |
|
|
38
|
+
| Invented Combine/Rx APIs when the feature uses Swift Concurrency | Match neighboring ViewModels (`async/await`, `@MainActor`) |
|
|
39
|
+
| Unstructured `Task {}` without cancellation awareness | Cooperative cancel; prefer `.task` in Views (`swiftui-ui.mdc`) |
|
|
40
|
+
| Global mutable singletons for request state | DI / actors / existing composition root |
|
|
41
|
+
| APIs not available for the project’s Swift / iOS deployment target | Check package / Xcode settings; mark `VERIFY` if unsure |
|
|
42
|
+
|
|
33
43
|
# Access control
|
|
34
44
|
|
|
35
45
|
- Минимально необходимый уровень: `private` / `fileprivate` по умолчанию для implementation details.
|
|
@@ -47,5 +57,5 @@ guard let name = user?.name else { return }
|
|
|
47
57
|
|
|
48
58
|
# Требование к агенту
|
|
49
59
|
|
|
50
|
-
-
|
|
60
|
+
- Style gate: **SwiftLint** (and SwiftFormat when configured) — prefer fixing lint over prose style essays; `// swiftlint:disable` only with an explicit reason.
|
|
51
61
|
- Новый код — Swift Concurrency-ready (`Sendable` где требует компилятор/линтер проекта).
|
|
@@ -20,6 +20,14 @@ alwaysApply: false
|
|
|
20
20
|
- View читает state и вызывает **явные методы** ViewModel (`submit()`, `load()`), а не мутирует внутреннее состояние напрямую.
|
|
21
21
|
- Для навигации — coordinator/router или enum route в ViewModel, не размазанные `NavigationLink` с бизнес-условиями в View.
|
|
22
22
|
|
|
23
|
+
# Lifecycle, ownership, hit testing
|
|
24
|
+
|
|
25
|
+
- Prefer **`.task(id:)`** (auto-cancel) over `.onAppear { Task { … } }` for async loads tied to the view lifetime.
|
|
26
|
+
- `@StateObject` / owned observable — **only where the view owns** the instance; prefer DI / parent-injected ViewModels over `@EnvironmentObject` sprawl.
|
|
27
|
+
- Shared mutable services — `actor` (or existing isolation); default `[weak self]` in escaping closures that capture ViewModel/`self`.
|
|
28
|
+
- Transparent stacks that should receive taps: `.contentShape(Rectangle())`.
|
|
29
|
+
- High-frequency visual updates — prefer `TimelineView` (or repo pattern) over ad-hoc `Timer` in Views.
|
|
30
|
+
|
|
23
31
|
# Структура файлов
|
|
24
32
|
|
|
25
33
|
Для экрана фичи:
|
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
| `debug-investigation` | Runtime evidence before fix |
|
|
10
10
|
| `ci-investigation` | iOS CI red |
|
|
11
11
|
| `technical-retro` | Retro facilitation |
|
|
12
|
+
| `write-adr` | Architecture Decision Record (context / decision / consequences) |
|
|
12
13
|
|
|
13
14
|
Копируется в `.cursor/skills/` при init.
|
|
@@ -18,11 +18,19 @@ Use the local repository as the source of truth: `git status`, `git diff`, task
|
|
|
18
18
|
5. Review Swift concurrency and conventions (`swift-conventions.mdc`): `@MainActor`, typed errors, force unwrap.
|
|
19
19
|
6. Review SwiftUI thinness, Design System usage, accessibility identifiers (`swiftui-ui.mdc`).
|
|
20
20
|
7. Check tests: unit for mapper/domain/VM (`tests-unit.mdc`); XCUITest for user flows (`tests-ui.mdc`).
|
|
21
|
-
8.
|
|
21
|
+
8. **Reuse lens:** flag new helpers that duplicate existing Feature/shared utilities; prefer public module APIs over copy-paste.
|
|
22
|
+
9. **Efficiency lens:** unnecessary work on main thread, redundant network/persistence, hot-path bloat, missing cancellation/cleanup.
|
|
23
|
+
10. Report validation gaps: `xcodebuild`, SwiftLint, or relevant tests not run (`xcode-tooling.mdc`, `post-change-build.mdc`).
|
|
22
24
|
|
|
23
25
|
## Output
|
|
24
26
|
|
|
25
|
-
Lead with findings ordered by severity.
|
|
27
|
+
Lead with findings ordered by severity. Required shape (also in `code-review-mr`):
|
|
28
|
+
|
|
29
|
+
- Each finding: **`path:line`** — problem — impact — concrete fix direction.
|
|
30
|
+
- Severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
31
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding context.
|
|
32
|
+
- End with a verdict line: **`Safe to merge | needs changes | reject`**.
|
|
33
|
+
- If there are no findings, say so and call out remaining test or validation risk.
|
|
26
34
|
|
|
27
35
|
For agent team tasks, write `.cursor/team/tasks/<slug>/review.md` and set `status.json` to `completed` or `changes_requested`.
|
|
28
36
|
|
|
@@ -18,6 +18,10 @@ description: Delivers iOS Swift/SwiftUI features end-to-end across Domain, Data,
|
|
|
18
18
|
- **Don't** introduce TCA/SwiftData/etc. unless the repo already uses them.
|
|
19
19
|
- **Don't** use yarn, Playwright, or `app/src` paths — wrong stack.
|
|
20
20
|
|
|
21
|
+
## Scope discipline
|
|
22
|
+
|
|
23
|
+
Implement only the current AC / decomposition task. Clarify ambiguity before coding; do not add unrelated hardening, polish, or drive-by refactors. See `feature-developer` → **Zero improvisation**.
|
|
24
|
+
|
|
21
25
|
## Preset packaging note
|
|
22
26
|
|
|
23
27
|
When editing **ai-rules ios-swift preset** sources (agents, hooks, rules) rather than an app Feature: keep Cursor and Claude trees in sync where applicable, and **fork / verify hook handoffs** (`hooks/chain-team-phases.sh`, guard scripts, team path conventions) so Cursor (`.cursor/team`) and Claude (`.claude/team`) do not regress against each other or against the next preset templates.
|