@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
|
@@ -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 **claude/next**. Defaults in this preset:
|
|
|
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** | `opus` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
|
|
41
42
|
|
|
@@ -26,17 +26,32 @@ Never require yarn/`lint:js`/Playwright for iOS app work.
|
|
|
26
26
|
|
|
27
27
|
## Preset-structure validation (when scope is preset / packages/ai-rules)
|
|
28
28
|
|
|
29
|
-
When validating **ios-swift preset** changes (or `scope: preset-structure-validation`), **also** run these checks
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
When validating **ios-swift preset** changes (or `scope: preset-structure-validation` / `preset-artifacts-only`), **also** run these checks. Skip xcodebuild if there are **no** Swift app changes.
|
|
30
|
+
|
|
31
|
+
### FAIL (all stacks + ios-specific)
|
|
32
|
+
|
|
33
|
+
1. **Token budget:** Cursor `alwaysApply: true` count ≤ **3**; Claude rules without `paths:` === **3** (**exclude `**/README.md`** — Option A). Meta `preset-*` must have `paths:` (not session-start).
|
|
34
|
+
2. **Chain fork check:** `hooks/chain-team-phases.sh` must **not** be byte-identical to next’s chain script.
|
|
35
|
+
3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh`: `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, positive `lint:js` / `lint:css` recipes. See `tooling-and-review/preset-no-cross-stack-leakage.md`.
|
|
36
|
+
4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer); build-verifier mentions `xcodebuild` or `post-change-build` / `xcode-tooling`.
|
|
37
|
+
5. **Roster:** 21 agent stems; no `playwright-test-*` under ios-swift `agents/`.
|
|
38
|
+
6. **Twin presence (hard):** Cursor rule change → Claude twin same PR — **FAIL** if missing (next, ios-swift, and go).
|
|
39
|
+
7. **Mapping / README:** Cursor→Claude mapping table present; core→stack mapping when `_shared` consumers exist.
|
|
40
|
+
8. **shared-core consumers:** if `_shared/core/**` changed, update all `<!-- shared-core: … -->` consumers (or document intentional fork).
|
|
41
|
+
9. **Session-start body budget:** sum of the **3** intended session-start rule bodies ≤ **120** lines (stretch ≤100); do **not** include `**/README.md` — record in report.
|
|
42
|
+
10. **Embed drift (soft by default):** `packages/ai-rules/scripts/check-shared-core-drift.sh`; `AI_RULES_DRIFT_FAIL=1` to enforce.
|
|
43
|
+
11. **Dogfood (monorepo soft):** `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion without migration doc → risk / FAIL for maintainers.
|
|
36
44
|
|
|
37
45
|
### Soft rules (do not FAIL alone)
|
|
38
46
|
|
|
39
|
-
- **
|
|
47
|
+
- **Thin aliases:** `agent-team-intake`, `technical-retro` may be <15 body lines. Enforce ≥15 on **domain** rules.
|
|
48
|
+
- Embed vs lineage: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
10. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
53
|
+
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`.
|
|
54
|
+
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`.
|
|
40
55
|
|
|
41
56
|
## Output
|
|
42
57
|
|
|
@@ -73,3 +73,7 @@ Update `status.json`:
|
|
|
73
73
|
If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
|
|
74
74
|
|
|
75
75
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
76
|
+
|
|
77
|
+
## Design guidance
|
|
78
|
+
|
|
79
|
+
- 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 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.
|
|
@@ -70,3 +70,7 @@ Update `status.json`:
|
|
|
70
70
|
Handoff summary: root cause, recommended fix, files touched (if any), `fixApplied`.
|
|
71
71
|
|
|
72
72
|
Do not perform formal code review or write XCUITest plans — those are separate agents.
|
|
73
|
+
|
|
74
|
+
## Design guidance
|
|
75
|
+
|
|
76
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -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** `tooling-and-review/post-change-build.md` (+ `tooling-and-review/xcode-tooling.md` 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):
|
|
@@ -33,3 +46,7 @@ When copying from `next` into `ios-swift` (or another stack):
|
|
|
33
46
|
## On completion
|
|
34
47
|
|
|
35
48
|
`status.json`: `currentAgent: feature-developer`, `state: completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
|
|
49
|
+
|
|
50
|
+
## Design guidance
|
|
51
|
+
|
|
52
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -70,3 +70,7 @@ Update `status.json`:
|
|
|
70
70
|
For standalone `perf-audit` intent, suggest `/technical-retro` or a follow-up `/task` to implement fixes.
|
|
71
71
|
|
|
72
72
|
Do not modify production code.
|
|
73
|
+
|
|
74
|
+
## Design guidance
|
|
75
|
+
|
|
76
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -15,3 +15,7 @@ You are a solution architect for **iOS Feature modules** (Presentation / Domain
|
|
|
15
15
|
- Alternatives table + chosen design + risks; keep token-light.
|
|
16
16
|
|
|
17
17
|
Handoff: architecture approved or awaiting gate → status update.
|
|
18
|
+
|
|
19
|
+
## Design guidance
|
|
20
|
+
|
|
21
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -23,3 +23,7 @@ Ask only blocking questions (AC gaps, Feature scope, platforms, offline/auth, AP
|
|
|
23
23
|
3. Update `status.json` → `awaiting_approval` if human gate after analyst.
|
|
24
24
|
|
|
25
25
|
Do not invent architecture stacks (TCA, SwiftData, …) — frame «как в репо».
|
|
26
|
+
|
|
27
|
+
## Design guidance (optional)
|
|
28
|
+
|
|
29
|
+
- Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
|
|
@@ -8,3 +8,9 @@
|
|
|
8
8
|
Claude Code may not use Cursor `hooks.json`. Wire scripts per project docs when enabling agent-team auto-chain.
|
|
9
9
|
|
|
10
10
|
**No `hooks.json` in Claude preset** (platform limit — same as next Claude).
|
|
11
|
+
|
|
12
|
+
## Optional cookbook
|
|
13
|
+
|
|
14
|
+
Example scripts live in `hooks/examples/` (secret-guard, format-edited, test-on-save). They are **not** auto-enabled.
|
|
15
|
+
|
|
16
|
+
To wire in Claude Code: copy an `.example.sh` into `hooks/`, make executable, and register per [Claude Code hooks](https://code.claude.com/docs/en/hooks) for your project. Keep stack-safe recipes (this preset: **ios-swift**). Cursor twin examples under `presets/cursor/ios-swift/hooks/examples/` are the same allowlist forks.
|
|
@@ -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
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **SoT** | `presets/cursor/ios-swift/rules/*.mdc` — edit here first |
|
|
10
10
|
| **Derive** | Claude topic `.md` = body + `paths:` (from Cursor `globs:` / requestable triggers) |
|
|
11
11
|
| **Drop** | Cursor-only keys (`alwaysApply`); keep short `description` |
|
|
12
|
-
| **Checklist** | change Cursor → update Claude twin **same PR** |
|
|
12
|
+
| **Checklist** | change Cursor → update Claude twin **same PR** (**FAIL** if missing — next, ios-swift, and go; see `preset-twin-sync` / build-verifier) |
|
|
13
13
|
|
|
14
14
|
## Loading budget
|
|
15
15
|
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
| `tests-unit.mdc` | `testing/unit.md` |
|
|
36
36
|
| `tests-ui.mdc` | `testing/ui.md` |
|
|
37
37
|
| `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
|
|
38
|
+
| `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
|
|
38
39
|
| `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
|
|
39
40
|
| `post-change-build.mdc` | `tooling-and-review/post-change-build.md` |
|
|
40
41
|
| `xcode-tooling.mdc` | `tooling-and-review/xcode-tooling.md` |
|
|
@@ -42,6 +43,27 @@
|
|
|
42
43
|
| `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
|
|
43
44
|
| `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
|
|
44
45
|
| `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
|
|
46
|
+
| `preset-layering.mdc` | `tooling-and-review/preset-layering.md` |
|
|
47
|
+
| `preset-twin-sync.mdc` | `tooling-and-review/preset-twin-sync.md` |
|
|
48
|
+
| `preset-token-budget.mdc` | `tooling-and-review/preset-token-budget.md` |
|
|
49
|
+
| `preset-pr-checklist.mdc` | `tooling-and-review/preset-pr-checklist.md` |
|
|
50
|
+
| `preset-no-cross-stack-leakage.mdc` | `tooling-and-review/preset-no-cross-stack-leakage.md` |
|
|
51
|
+
|
|
52
|
+
## Core → stack mapping
|
|
53
|
+
|
|
54
|
+
| Shared core | Cursor adapter | Notes |
|
|
55
|
+
|-------------|----------------|-------|
|
|
56
|
+
| `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` / `code-quality.md` | + Stack notes (Swift/DesignSystem) |
|
|
57
|
+
| `quality/design-guidance.md` | `design-guidance.mdc` / `design-guidance.md` | requestable smells/GoF |
|
|
58
|
+
| `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles (XCUITest) in Stack notes |
|
|
59
|
+
| `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin alias |
|
|
60
|
+
| `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | iOS Feature checklist |
|
|
61
|
+
| `architecture/reference-features.template.md` | `reference-features.mdc` | Features/** table |
|
|
62
|
+
| `review/code-review-mr.md` | `code-review-mr.mdc` | iOS checklist |
|
|
63
|
+
| `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
|
|
64
|
+
| `meta/preset-*.md` | `preset-*.mdc` | author globs only |
|
|
65
|
+
|
|
66
|
+
Shared taxonomy: `presets/_shared/README.md`. Sync marker: `<!-- shared-core: … -->`.
|
|
45
67
|
|
|
46
68
|
## Folders
|
|
47
69
|
|
|
@@ -52,4 +74,4 @@
|
|
|
52
74
|
| `api-and-data/` | Networking, persistence |
|
|
53
75
|
| `testing/` | XCTest, XCUITest |
|
|
54
76
|
| `ui-and-accessibility/` | SwiftUI, ViewModels, navigation |
|
|
55
|
-
| `tooling-and-review/` | Quality, review, build, security, tooling, agent-team, retro |
|
|
77
|
+
| `tooling-and-review/` | Quality, review, build, security, tooling, agent-team, retro, **preset meta** |
|
|
@@ -10,6 +10,9 @@ paths:
|
|
|
10
10
|
- **/Data/**/*
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
<!-- shared-core: architecture/feature-delivery-workflow.md -->
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
# Доставка фичи (iOS)
|
|
14
17
|
|
|
15
18
|
Типичная фича с данными и UI. Детали слоёв — `architecture/boundaries.md`, `stack/ios-app-core.md`.
|
|
@@ -51,6 +54,8 @@ flowchart LR
|
|
|
51
54
|
- Domain импортирует SwiftUI / UIKit.
|
|
52
55
|
- Deep-import внутренних файлов другой фичи.
|
|
53
56
|
- Сборка DI внутри View.
|
|
57
|
+
- **Ubiquitous language:** имена Domain/типов отражают предметную область фичи — не смешивать транспорт/фреймворк-термины в домен без нужды.
|
|
58
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
54
59
|
|
|
55
60
|
## Матрица: зона → правила
|
|
56
61
|
|
|
@@ -8,10 +8,15 @@ paths:
|
|
|
8
8
|
- "**/DesignSystem/**/*"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
<!-- shared-core: architecture/reference-features.template.md -->
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
# Эталонные фичи (reference features)
|
|
12
15
|
|
|
13
16
|
Перед реализацией найди Feature того же типа и **повтори её структуру**, не изобретая новую организацию файлов.
|
|
14
17
|
|
|
18
|
+
Taxonomy / shared core: [`presets/_shared/README.md`](../../../../_shared/README.md) · [Preset contribution guide](../../../../docs/PRESET-CONTRIBUTION.md).
|
|
19
|
+
|
|
15
20
|
## Таблица эталонов
|
|
16
21
|
|
|
17
22
|
После `ai-rules init` замени примеры на **реальные** пути consumer-репо. Ниже — conventional placeholders для greenfield / dogfood.
|
|
@@ -43,6 +48,10 @@ paths:
|
|
|
43
48
|
4. UI flow — `xcuitest-test-planner` → generator (accessibilityIdentifier).
|
|
44
49
|
5. Auth/Keychain touch — security-reviewer + `security-ios`.
|
|
45
50
|
|
|
51
|
+
## Living conventions
|
|
52
|
+
|
|
53
|
+
Post-init gotchas / patterns / decisions: **`.claude/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.
|
|
54
|
+
|
|
46
55
|
## Связанные правила
|
|
47
56
|
|
|
48
57
|
- `tooling-and-review/code-quality.md` — повторять паттерны.
|
|
@@ -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 (`ui-and-accessibility/swiftui.md`) |
|
|
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` где требует компилятор/линтер проекта).
|
|
@@ -5,14 +5,14 @@ paths:
|
|
|
5
5
|
- .claude/team/**/*
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
<!-- shared-core: agent-team/agent-team-intake.md -->
|
|
9
|
+
|
|
8
10
|
# Agent team intake
|
|
9
11
|
|
|
10
12
|
When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
|
|
11
13
|
|
|
12
14
|
1. Prefer **`/task <their request>`** or invoke **task-router** first.
|
|
13
15
|
2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
|
|
14
|
-
3. Pure questions («как работает X», «объясни») —
|
|
16
|
+
3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
15
17
|
|
|
16
18
|
Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
|
|
17
|
-
|
|
18
|
-
Scope: iOS/Swift Feature modules (`Features/`, Presentation/Domain/Data) — not `app/src` / Playwright.
|
|
@@ -6,6 +6,9 @@ paths:
|
|
|
6
6
|
- .claude/agents/**/*
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
<!-- shared-core: agent-team/agent-team-orchestrator.md -->
|
|
10
|
+
|
|
11
|
+
|
|
9
12
|
# Agent team orchestrator
|
|
10
13
|
|
|
11
14
|
Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.claude/team/tasks/<slug>/`.
|
|
@@ -52,4 +55,8 @@ Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent
|
|
|
52
55
|
|
|
53
56
|
## Skip pipeline when
|
|
54
57
|
|
|
55
|
-
Pure questions
|
|
58
|
+
Pure questions («как работает X») — prefer **`codebase-analyzer`**; trivial one-file; user «без pipeline»; docs-only one-liner.
|
|
59
|
+
|
|
60
|
+
## Preset authoring
|
|
61
|
+
|
|
62
|
+
When editing `packages/ai-rules/presets/**`, follow **`tooling-and-review/preset-pr-checklist.md`** (+ twin-sync / layering / token-budget / leakage).
|
|
@@ -2,37 +2,81 @@
|
|
|
2
2
|
description: Поддержка и улучшение качества кода и архитектуры iOS
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
<!-- shared-core: quality/code-quality-and-refactoring.md -->
|
|
6
|
+
|
|
5
7
|
# Поддержка существующего стиля
|
|
6
8
|
|
|
7
9
|
- Новые изменения должны:
|
|
8
|
-
- следовать существующим паттернам (имена, структура, DI
|
|
9
|
-
- минимизировать «стилистический шум» (
|
|
10
|
-
- Перед
|
|
11
|
-
- искать
|
|
12
|
-
-
|
|
13
|
-
-
|
|
10
|
+
- следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
|
|
11
|
+
- минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
|
|
12
|
+
- Перед добавлением нового решения:
|
|
13
|
+
- искать аналогичное в коде и **повторять подход**, а не изобретать новый;
|
|
14
|
+
- проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
|
|
15
|
+
- использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
|
|
16
|
+
|
|
17
|
+
# Принципы
|
|
18
|
+
|
|
19
|
+
- **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
|
|
20
|
+
- **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения — ошибочная абстракция дороже дублирования.
|
|
21
|
+
- **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
|
|
22
|
+
- **SOLID** (agent-actionable, не эссе):
|
|
23
|
+
- **S** — один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
|
|
24
|
+
- **O** — расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
|
|
25
|
+
- **L** — подтип не ломает контракт базового типа/протокола.
|
|
26
|
+
- **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
|
|
27
|
+
- **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
|
|
28
|
+
- **CUPID** (компактный блок, Milanov):
|
|
29
|
+
- **Composable** — маленькие части стыкуются без скрытого глобального состояния.
|
|
30
|
+
- **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
|
|
31
|
+
- **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
|
|
32
|
+
- **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
|
|
33
|
+
- **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
|
|
34
|
+
- **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
|
|
35
|
+
- **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
|
|
14
36
|
|
|
15
37
|
# Рефакторинг при изменениях
|
|
16
38
|
|
|
17
|
-
-
|
|
39
|
+
- Разрешён лёгкий refactor, если он:
|
|
18
40
|
- уменьшает дублирование;
|
|
19
41
|
- повышает читаемость;
|
|
20
|
-
- не ломает публичные
|
|
21
|
-
-
|
|
22
|
-
- вынести
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- заменить
|
|
26
|
-
-
|
|
42
|
+
- не ломает публичные контракты модулей.
|
|
43
|
+
- Примеры допустимых улучшений (абстрактно):
|
|
44
|
+
- вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
|
|
45
|
+
- сузить небезопасные типы и unsafe-операции стека;
|
|
46
|
+
- разделить слишком крупный модуль на несколько более простых;
|
|
47
|
+
- заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
|
|
48
|
+
- заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
|
|
27
49
|
|
|
28
50
|
# Ограничения
|
|
29
51
|
|
|
30
|
-
- Не
|
|
31
|
-
- не менять структуру
|
|
32
|
-
- не
|
|
33
|
-
-
|
|
52
|
+
- Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
|
|
53
|
+
- не менять структуру директорий / модулей / таргетов без нужды;
|
|
54
|
+
- не менять названия публичных типов/функций/API без явного запроса.
|
|
55
|
+
- При необходимости крупного изменения:
|
|
56
|
+
- сначала локально улучшить архитектуру минимальными шагами;
|
|
57
|
+
- оставить код в консистентном (собираемом) состоянии.
|
|
34
58
|
|
|
35
59
|
# Требование к агенту
|
|
36
60
|
|
|
37
|
-
- **Boy scout rule:** оставлять модуль
|
|
38
|
-
- Не жертвовать слоями ради
|
|
61
|
+
- **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
|
|
62
|
+
- Не жертвовать архитектурой и слоями ради краткости реализации.
|
|
63
|
+
|
|
64
|
+
## Agent discipline (anti-sycophancy)
|
|
65
|
+
|
|
66
|
+
- Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
|
|
67
|
+
- Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
|
|
68
|
+
- Refactor without tests → propose a characterization test first; if declined, label `UNTESTED`.
|
|
69
|
+
- Comments = WHY only when non-obvious; ban self-referential «added for issue Y» comments.
|
|
70
|
+
- Urgency/authority pressure: name the technical trade-off once, then comply — no apology loops.
|
|
71
|
+
- Match verification depth to risk; report status by what was **verified**, not attempted.
|
|
72
|
+
|
|
73
|
+
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.
|
|
74
|
+
|
|
75
|
+
> Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
|
|
76
|
+
## Stack notes
|
|
77
|
+
|
|
78
|
+
- Перед новым UI‑контролом проверять DesignSystem и существующие компоненты.
|
|
79
|
+
- Public API: протоколы и facades между фичами.
|
|
80
|
+
- Примеры: mapper/validation; force unwrap → safe; разбить ViewModel; design tokens; View не зависит от Data напрямую.
|
|
81
|
+
- Post-change: **`tooling-and-review/post-change-build.md`** + `tooling-and-review/xcode-tooling.md`.
|
|
82
|
+
- Style: **SwiftLint** (+ SwiftFormat when configured) — authoritative style gate; do not duplicate linter rules in prose.
|
|
@@ -7,8 +7,49 @@ paths:
|
|
|
7
7
|
- .claude/skills/code-review/**/*
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
<!-- shared-core: review/code-review-mr.md -->
|
|
11
|
+
|
|
10
12
|
# Code review merge requests
|
|
11
13
|
|
|
14
|
+
On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
|
|
15
|
+
|
|
16
|
+
## When to load
|
|
17
|
+
|
|
18
|
+
- User asks for review/MR/diff
|
|
19
|
+
- Pipeline step `code-reviewer`
|
|
20
|
+
- Platform automated review (e.g. BUGBOT) when present
|
|
21
|
+
|
|
22
|
+
## Checklist references (abstract)
|
|
23
|
+
|
|
24
|
+
- Architecture layers and stack core rules
|
|
25
|
+
- Public imports / module boundaries
|
|
26
|
+
- UI conventions of the stack
|
|
27
|
+
- Unit and e2e/UI test conventions
|
|
28
|
+
- Post-change lint/build gate before final report
|
|
29
|
+
- Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
|
|
30
|
+
- Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
|
|
31
|
+
- Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
|
|
32
|
+
|
|
33
|
+
Concrete rule stems — in **Stack notes**.
|
|
34
|
+
|
|
35
|
+
## Constraints
|
|
36
|
+
|
|
37
|
+
- Focus on MR diff, not the whole repo.
|
|
38
|
+
- Use local `git diff` — do not invent hosting metadata.
|
|
39
|
+
- Boy scout rule: suggest fixes feasible within the MR scope.
|
|
40
|
+
- No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
|
|
41
|
+
|
|
42
|
+
## Output contract
|
|
43
|
+
|
|
44
|
+
Procedure details live in skill `code-review`. Required shape:
|
|
45
|
+
|
|
46
|
+
- Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
|
|
47
|
+
- Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
48
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
49
|
+
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
50
|
+
|
|
51
|
+
## Stack notes
|
|
52
|
+
|
|
12
53
|
On-demand правило для review-потоков (не always-on).
|
|
13
54
|
|
|
14
55
|
- **Когда применять**
|
|
@@ -38,7 +79,7 @@ On-demand правило для review-потоков (не always-on).
|
|
|
38
79
|
|
|
39
80
|
- **Глубина и формат**
|
|
40
81
|
- Фокус на **диффе MR**, не на всём проекте.
|
|
41
|
-
-
|
|
82
|
+
- Следовать **Output contract** выше (`path:line`, severity, verdict).
|
|
42
83
|
- Без «больших рефакторингов» без запроса (`tooling-and-review/code-quality.md`).
|
|
43
84
|
|
|
44
85
|
- **Ограничения**
|