@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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write-adr
|
|
3
|
+
description: Author an Architecture Decision Record (ADR) with Context, Decision, Consequences, and Links. Use when capturing a durable technical choice for the team.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Write ADR
|
|
7
|
+
|
|
8
|
+
On-demand skill for durable architecture decisions. Stack-agnostic sections — fill with project-specific paths and links.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- Choosing between non-trivial alternatives (storage, layering, library, API shape).
|
|
13
|
+
- Recording a decision that future agents/humans should not silently reverse.
|
|
14
|
+
- User asks for an ADR, decision log, or “why did we pick X”.
|
|
15
|
+
|
|
16
|
+
## Template
|
|
17
|
+
|
|
18
|
+
Create (or append) a short markdown ADR in the repo’s agreed location (e.g. `docs/adr/`, `.cursor/team/`, wiki). Suggested filename: `NNNN-short-title.md`.
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# ADR NNNN: <Title>
|
|
22
|
+
|
|
23
|
+
## Context
|
|
24
|
+
What problem / constraint / force requires a decision?
|
|
25
|
+
|
|
26
|
+
## Decision
|
|
27
|
+
What we chose (one clear option). Include rejected alternatives briefly if useful.
|
|
28
|
+
|
|
29
|
+
## Consequences
|
|
30
|
+
Positive and negative outcomes; follow-up work; what becomes harder.
|
|
31
|
+
|
|
32
|
+
## Links
|
|
33
|
+
Related PRs, issues, rules, prior ADRs, diagrams.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Guidelines
|
|
37
|
+
|
|
38
|
+
- Prefer one decision per ADR.
|
|
39
|
+
- Keep Context factual; Decision imperative and short.
|
|
40
|
+
- Link living gotchas to `team/conventions.md` when the decision becomes a recurring local pattern.
|
|
41
|
+
- Do not put ADR bodies only in root `AGENTS.md` (overwrite on init).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Agent team artifacts (preset java)
|
|
2
|
+
|
|
3
|
+
Каталог артефактов пайплайна «команда агентов» для Java backend (hexagonal / ports & adapters).
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.claude/team/
|
|
9
|
+
active-task.json
|
|
10
|
+
fixtures/
|
|
11
|
+
tasks/<slug>/
|
|
12
|
+
pipeline.json
|
|
13
|
+
status.json
|
|
14
|
+
brief.md
|
|
15
|
+
decomposition.md
|
|
16
|
+
…
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Fixtures
|
|
20
|
+
|
|
21
|
+
| Fixture | Notes |
|
|
22
|
+
|---------|-------|
|
|
23
|
+
| `feature-full.json` | Full profile; QA scope `e2e-only` = **adapter/integration tests** (not UI e2e); Playwright/XCUITest stems in `skipped` |
|
|
24
|
+
| `feature-light.json` | developer → build-verifier (`mvn test` / `./gradlew test` / configured static analysis) |
|
|
25
|
+
| `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
|
|
26
|
+
|
|
27
|
+
**Never** schedule Playwright/XCUITest-only steps for this preset. Use `integration-test-*` (or QA with `e2e-only` = integration) for adapter-level coverage.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Living conventions (team)
|
|
2
|
+
|
|
3
|
+
Consumer-owned store for post-init gotchas, patterns, and decisions. **Not** always-on. Fill after `ai-rules init`. Root `AGENTS.md` only points here.
|
|
4
|
+
|
|
5
|
+
## Gotchas
|
|
6
|
+
|
|
7
|
+
<!-- e.g. fragile flows, “never do X in this repo” -->
|
|
8
|
+
|
|
9
|
+
-
|
|
10
|
+
|
|
11
|
+
## Patterns
|
|
12
|
+
|
|
13
|
+
<!-- local patterns beyond reference-features table -->
|
|
14
|
+
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
## Decisions
|
|
18
|
+
|
|
19
|
+
<!-- short pointers to ADRs / product choices that affect code -->
|
|
20
|
+
|
|
21
|
+
-
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "example-bugfix-standard",
|
|
3
|
+
"intent": "bugfix",
|
|
4
|
+
"profile": "standard",
|
|
5
|
+
"summary": "Regression fix with review",
|
|
6
|
+
"steps": [
|
|
7
|
+
{
|
|
8
|
+
"agent": "debugger",
|
|
9
|
+
"label": "Root cause"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"agent": "feature-developer",
|
|
13
|
+
"label": "Fix if needed",
|
|
14
|
+
"skipIf": "debugger.fixed"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"agent": "build-verifier",
|
|
18
|
+
"label": "mvn test / ./gradlew test / static analysis"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"agent": "code-reviewer",
|
|
22
|
+
"label": "Code review"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"humanGates": [],
|
|
26
|
+
"autoChain": true,
|
|
27
|
+
"skipped": [
|
|
28
|
+
{
|
|
29
|
+
"agent": "playwright-test-planner",
|
|
30
|
+
"reason": "Java backend uses integration-test-* — not in this bugfix path"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"agent": "xcuitest-test-planner",
|
|
34
|
+
"reason": "Java backend uses integration-test-* — not in this bugfix path"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "example-feature-full",
|
|
3
|
+
"intent": "feature",
|
|
4
|
+
"profile": "full",
|
|
5
|
+
"summary": "Multi-layer Java use case with integration-test coverage",
|
|
6
|
+
"steps": [
|
|
7
|
+
{ "agent": "task-analyst", "label": "Clarify and decompose" },
|
|
8
|
+
{ "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
|
|
9
|
+
{ "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
|
|
10
|
+
{ "agent": "build-verifier", "label": "mvn test / ./gradlew test / static analysis", "model": "cheap" },
|
|
11
|
+
{ "agent": "security-reviewer", "label": "Security review", "model": "strong" },
|
|
12
|
+
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" },
|
|
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" }
|
|
16
|
+
],
|
|
17
|
+
"humanGates": ["after:task-analyst"],
|
|
18
|
+
"autoChain": true,
|
|
19
|
+
"skipped": [
|
|
20
|
+
{
|
|
21
|
+
"agent": "accessibility-reviewer",
|
|
22
|
+
"reason": "Java backend has no UI surface"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "example-feature-light",
|
|
3
|
+
"intent": "feature",
|
|
4
|
+
"profile": "light",
|
|
5
|
+
"summary": "Trivial single-package change with explicit AC",
|
|
6
|
+
"steps": [
|
|
7
|
+
{ "agent": "feature-developer", "label": "Implement", "model": "cheap" },
|
|
8
|
+
{ "agent": "build-verifier", "label": "mvn test / ./gradlew test / static analysis", "model": "cheap" }
|
|
9
|
+
],
|
|
10
|
+
"humanGates": [],
|
|
11
|
+
"autoChain": true,
|
|
12
|
+
"skipped": [
|
|
13
|
+
{ "agent": "task-analyst", "reason": "Explicit AC and single-package scope" },
|
|
14
|
+
{ "agent": "code-reviewer", "reason": "Light profile — non-trivial module/service changes should use standard" },
|
|
15
|
+
{ "agent": "qa-tester", "reason": "No integration-test AC" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Краткая точка входа для Claude Code. Подробные правила — модульные файлы под `rules/` (подпапки по темам).
|
|
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 @rules/README.md for the full catalog and loading strategy.
|
|
6
8
|
|
|
7
9
|
## Conventions
|
|
@@ -24,6 +26,8 @@ See @rules/README.md for the full catalog and loading strategy.
|
|
|
24
26
|
| После правок кода | `rules/tooling-and-review/post-change-lint.md` (**requestable**, обязателен после edits) |
|
|
25
27
|
| Валидация перед review | agent `build-verifier` |
|
|
26
28
|
| Code review MR | skill `code-review` + `rules/tooling-and-review/code-review-mr.md` |
|
|
29
|
+
| Security (auth/forms/env) | `rules/tooling-and-review/security-next.md` + agent `security-reviewer` |
|
|
30
|
+
| Как работает X | agent `codebase-analyzer` (explain-as-is; без `/task`) |
|
|
27
31
|
| Техническое ретро | `commands/technical-retro.md` + skill `technical-retro` |
|
|
28
32
|
|
|
29
33
|
## Install
|
|
@@ -32,4 +36,4 @@ See @rules/README.md for the full catalog and loading strategy.
|
|
|
32
36
|
npx @bonesofspring/ai-rules init claude --preset next
|
|
33
37
|
```
|
|
34
38
|
|
|
35
|
-
Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**`, `MCP.md` в `.claude/`, плюс `mcp.json` → **`.mcp.json`**
|
|
39
|
+
Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**`, `MCP.md` в `.claude/`, плюс `mcp.json` → **`.mcp.json`** и `REPO_AGENTS.md` → корневой **`AGENTS.md`**. Skills: `write-adr`, `react-performance` (on-demand).
|
|
@@ -30,5 +30,10 @@ Cursor-пресет и Claude-пресет используют один и то
|
|
|
30
30
|
|
|
31
31
|
- `/task <desc>` → `task-router` → `pipeline.json`;
|
|
32
32
|
- `/task-continue <slug>` → продолжение после human gate;
|
|
33
|
-
- `.claude/agents/*.md` → **
|
|
33
|
+
- `.claude/agents/*.md` → **22** ролей: planning (router, analyst, architect, migration, api-contract), analysis (`codebase-analyzer`), implementation (debugger, ci-investigator, developer), review (code, a11y, security, perf), testing (QA, unit trio, playwright trio), docs (tech-writer), build (build-verifier);
|
|
34
34
|
- `.claude/team/tasks/<slug>/` → handoff-артефакты (`brief.md`, `decomposition.md`, `review.md`, `migration-plan.md`, `ci-report.md`, `status.json`, …).
|
|
35
|
+
|
|
36
|
+
## Cross-tool root AGENTS
|
|
37
|
+
|
|
38
|
+
`REPO_AGENTS.md` → project-root `AGENTS.md` on init. Living conventions: `team/conventions.md`. Skill `write-adr` on-demand.
|
|
39
|
+
Next also ships `react-performance` skill and Incorrect/Correct samples on golden domain rules.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Next.js — 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 (agent-team tables, slash commands) live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` — use them when that tool is installed.
|
|
9
|
+
- Install:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @bonesofspring/ai-rules init cursor --preset next
|
|
13
|
+
npx @bonesofspring/ai-rules init claude --preset next
|
|
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
|
+
Working directory for app scripts: **`app/`**. Detect the package manager from lockfile / `packageManager` (`package-manager` rule).
|
|
21
|
+
|
|
22
|
+
| Gate | Typical command |
|
|
23
|
+
|------|-----------------|
|
|
24
|
+
| Lint JS | `yarn lint:js` (or project equivalent) from `app/` |
|
|
25
|
+
| Lint CSS | `yarn lint:css` from `app/` |
|
|
26
|
+
| Unit tests | project unit script under `app/` |
|
|
27
|
+
| Build | project `build` under `app/` |
|
|
28
|
+
|
|
29
|
+
After code edits: invoke **`post-change-lint`** (requestable). Full gate: agent `build-verifier`.
|
|
30
|
+
|
|
31
|
+
## Security basics
|
|
32
|
+
|
|
33
|
+
- Do not commit secrets (`.env`, tokens, credentials).
|
|
34
|
+
- Review destructive git (`reset --hard`, force-push) before running; respect shell hooks.
|
|
35
|
+
- Do not weaken CI or skip hooks unless the user explicitly asks.
|
|
36
|
+
|
|
37
|
+
## Tool entry points
|
|
38
|
+
|
|
39
|
+
| Tool | Map |
|
|
40
|
+
|------|-----|
|
|
41
|
+
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
42
|
+
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
43
|
+
|
|
44
|
+
Rules: `.cursor/rules/` or `.claude/rules/`. Skills: `.cursor/skills/` or `.claude/skills/`.
|
|
45
|
+
|
|
46
|
+
## Living conventions
|
|
47
|
+
|
|
48
|
+
Gotchas, local patterns, and team decisions: **`.cursor/team/conventions.md`** and/or **`.claude/team/conventions.md`** (fill after init; not overwritten on every dogfood sync when already present).
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
| Migration planner | `migration-specialist.md` | no |
|
|
13
13
|
| API contract reviewer | `api-contract-reviewer.md` | no |
|
|
14
14
|
|
|
15
|
+
## Analysis (on-demand)
|
|
16
|
+
|
|
17
|
+
| Agent | Файл | Production-код |
|
|
18
|
+
|-------|------|----------------|
|
|
19
|
+
| Codebase analyzer | `codebase-analyzer.md` | no (explain-as-is only) |
|
|
20
|
+
|
|
15
21
|
## Implementation and CI
|
|
16
22
|
|
|
17
23
|
| Agent | Файл | Production-код |
|
|
@@ -56,7 +62,7 @@ SoT по умолчанию — YAML `model` в каждом agent-файле.
|
|
|
56
62
|
|
|
57
63
|
| Tier | Default frontmatter | Agents |
|
|
58
64
|
|------|---------------------|--------|
|
|
59
|
-
| **cheap** | `fast` | `task-router`, `task-analyst`, `build-verifier`, `code-reviewer`, `tech-writer` |
|
|
65
|
+
| **cheap** | `fast` | `task-router`, `task-analyst`, `build-verifier`, `code-reviewer`, `tech-writer`, `codebase-analyzer` |
|
|
60
66
|
| **standard** | `inherit` or `sonnet` | `feature-developer`, `debugger`, `ci-investigator`, `api-contract-reviewer`, `accessibility-reviewer`, `qa-tester`, `unit-test-*`, `playwright-test-*` (`sonnet` where already pinned) |
|
|
61
67
|
| **strong** | `opus` | `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` |
|
|
62
68
|
|
|
@@ -35,11 +35,16 @@ When validating **preset packaging** changes (paths under `packages/ai-rules/pre
|
|
|
35
35
|
2. **Leakage (next):** hooks/agents must not require `xcuitest-test-*` handoffs or `xcodebuild` as the default Next post-change gate. See `tooling-and-review/preset-no-cross-stack-leakage.md`.
|
|
36
36
|
3. **Mapping / README:** `rules/README.md` must include a Cursor→Claude mapping table; document core→stack mapping when `_shared` consumers exist.
|
|
37
37
|
4. **shared-core consumers:** if `_shared/core/**` changed, every file with matching `<!-- shared-core: … -->` in this PR must be updated (or intentional fork documented).
|
|
38
|
-
5. **Twin presence:** Cursor rule change without Claude twin same PR → **FAIL** (next, ios-swift, and
|
|
38
|
+
5. **Twin presence:** Cursor rule change without Claude twin same PR → **FAIL** (next, ios-swift, go, and java). Domain twin body ≥15 lines; thin aliases may be shorter.
|
|
39
39
|
6. **Session-start body budget:** sum body lines of the **3** intended session-start rules ≤ **120** (stretch ≤100); do **not** include `**/README.md` — record in validation-report; FAIL if grossly over.
|
|
40
|
-
7. **Embed drift (
|
|
40
|
+
7. **Embed drift (hard in `check:preset-structure`):** run `packages/ai-rules/scripts/check-shared-core-drift.sh` with `AI_RULES_DRIFT_FAIL=1` (bundled by the structure orchestrator). Lineage stems excluded from body equality.
|
|
41
41
|
8. **Dogfood (monorepo soft):** prefer `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass dogfood deletion without migration doc → risk / FAIL for maintainers.
|
|
42
42
|
|
|
43
|
+
9. **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.
|
|
44
|
+
10. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
45
|
+
11. **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`.
|
|
46
|
+
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`.
|
|
47
|
+
|
|
43
48
|
### Soft notes
|
|
44
49
|
|
|
45
50
|
- Thin aliases may be <15 body lines.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-analyzer
|
|
3
|
+
description: Explains HOW existing code works as-is. Use when the user asks how something works, to trace data flow, 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 Next.js 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 (routes, public barrels `@/api` / `@/types`, feature folders).
|
|
20
|
+
2. Trace calls and data flow across UI → store → API → HTTP as applicable; read each file involved.
|
|
21
|
+
3. Summarize: purpose, flow, contracts between modules, layer placement, conventions observed.
|
|
22
|
+
4. End with open questions only if facts are missing — not with a wishlist of changes.
|
|
23
|
+
|
|
24
|
+
## Will / Will not
|
|
25
|
+
|
|
26
|
+
**Will:** map files, call chains, types/mappers, layer boundaries as they exist today.
|
|
27
|
+
|
|
28
|
+
**Will not:** edit production code; open `/task` pipelines; propose PRs or refactors unprompted.
|
|
@@ -20,6 +20,19 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
|
|
|
20
20
|
- Mark completed tasks in `decomposition.md`.
|
|
21
21
|
- Validation: **`rules/tooling-and-review/post-change-lint.md`**. If pipeline next step is **`build-verifier`**, scoped lint/type-check on **changed files** is enough; full project lint is build-verifier's job.
|
|
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 security hardening, extra validation, UI polish, logging/monitoring, 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 layer order and reference features; add required unit tests; run the post-change gate; update task artifacts.
|
|
33
|
+
|
|
34
|
+
**Will not:** formal code review; start blocked/dependent tasks; invent AC; auto-continue the next WP when the pipeline expects a human gate or handoff.
|
|
35
|
+
|
|
23
36
|
## On completion
|
|
24
37
|
|
|
25
38
|
Update `status.json` (`currentAgent`: `feature-developer`, `state`: `completed`). Handoff: tasks done, files by layer, unit specs, validation result, gaps for build-verifier/reviewer.
|
|
@@ -14,9 +14,11 @@ You are a frontend security reviewer for a Next.js TypeScript application.
|
|
|
14
14
|
|
|
15
15
|
## Review scope
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
Load `tooling-and-review/security-next.md` for coding-time invariants. Focus on:
|
|
18
|
+
|
|
19
|
+
- Secrets, tokens, API keys in source or committed env files; never in `NEXT_PUBLIC_*`.
|
|
18
20
|
- `dangerouslySetInnerHTML`, unsanitized HTML, URL injection.
|
|
19
|
-
- Auth token storage (cookies vs localStorage), refresh flows, 401 handling.
|
|
21
|
+
- Auth token storage (cookies vs localStorage), server-side session verify, refresh flows, 401 handling.
|
|
20
22
|
- CSRF considerations for state-changing requests (as applicable to frontend).
|
|
21
23
|
- Open redirects in navigation/router usage.
|
|
22
24
|
- Sensitive data in client-side logs or error messages.
|
|
@@ -6,3 +6,9 @@
|
|
|
6
6
|
| `guard-shell-command.sh` | Destructive git / package-manager guard |
|
|
7
7
|
|
|
8
8
|
Wire into Claude Code hooks per project documentation when enabling agent team auto-chain.
|
|
9
|
+
|
|
10
|
+
## Optional cookbook
|
|
11
|
+
|
|
12
|
+
Example scripts live in `hooks/examples/` (secret-guard, format-edited, test-on-save). They are **not** auto-enabled.
|
|
13
|
+
|
|
14
|
+
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: **next**). Cursor twin examples under `presets/cursor/next/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: **next** — recipes must stay stack-safe (no cross-stack lint/test commands).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Optional: format/lint edited JS/TS under app/ after save.
|
|
3
|
+
# NOT in default hooks.json. Requires yarn scripts in app/.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
ROOT="${CURSOR_PROJECT_DIR:-.}"
|
|
6
|
+
cd "$ROOT/app" 2>/dev/null || cd "$ROOT"
|
|
7
|
+
# Prefer project scripts; adjust names to match package.json
|
|
8
|
+
if command -v yarn >/dev/null 2>&1; then
|
|
9
|
+
yarn lint:js --fix 2>/dev/null || yarn eslint --fix . 2>/dev/null || true
|
|
10
|
+
fi
|
|
11
|
+
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: scoped unit tests for changed files under app/src.
|
|
3
|
+
# NOT in default hooks.json. No Playwright here.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
ROOT="${CURSOR_PROJECT_DIR:-.}"
|
|
6
|
+
cd "$ROOT/app" 2>/dev/null || exit 0
|
|
7
|
+
yarn test --findRelatedTests --passWithNoTests 2>/dev/null || yarn test --passWithNoTests 2>/dev/null || true
|
|
8
|
+
exit 0
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
## Loading strategy
|
|
16
16
|
|
|
17
17
|
- **Session start (no `paths:`):** ровно **3** — `next-app-core`, `package-manager`, `code-quality`
|
|
18
|
-
- **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
|
|
18
|
+
- **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, `security-next`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
|
|
19
19
|
- **Skills:** long workflows (`feature-delivery`, `code-review`, …)
|
|
20
20
|
|
|
21
21
|
### UI edit bundle (consolidated paths)
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
| `playwright-agents.mdc` | `testing/playwright-agents.md` |
|
|
64
64
|
| `post-change-lint.mdc` | `tooling-and-review/post-change-lint.md` |
|
|
65
65
|
| `code-review-mr.mdc` | `tooling-and-review/code-review-mr.md` |
|
|
66
|
+
| `security-next.mdc` | `tooling-and-review/security-next.md` |
|
|
66
67
|
| `agent-team-intake.mdc` | `tooling-and-review/agent-team-intake.md` |
|
|
67
68
|
| `agent-team-orchestrator.mdc` | `tooling-and-review/agent-team-orchestrator.md` |
|
|
68
69
|
| `technical-retro.mdc` | `tooling-and-review/technical-retro.md` |
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
paths:
|
|
3
3
|
- app/src/api/services/**/*.ts
|
|
4
|
+
impact: HIGH
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Роль API слоя
|
|
@@ -55,3 +56,24 @@ paths:
|
|
|
55
56
|
- компоненты не должны зависеть от DTO;
|
|
56
57
|
- store не должен сам собирать URL/коды эндпоинтов и не обходить сервисы; **транспортный тип ответа** и **контракт ошибки** из `@/types` (как у прикладного клиента) допустимы во thunk при разборе `catch`/payload, если так выстроен сервис (см. `api-and-data/store-rtk.md`, `api-and-data/http-client.md`).
|
|
57
58
|
- При использовании API‑сервисов в UI, store и утилитах **вне** `app/src/api/**` импортировать **только** из `@/api` (корневой barrel), см. **`architecture/public-imports.md`**; внутри слоя API — по относительным путям или `@/api/services/**` / `@/api/clients/**`, не дублируя публичный контракт мимо корневого barrel для внешних потребителей.
|
|
59
|
+
## Incorrect
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// Returning raw DTO to store/UI without mapping
|
|
63
|
+
export const getCard = async (id: string) => {
|
|
64
|
+
const { data } = await cardsClient.get(`/cards/${id}`)
|
|
65
|
+
return data // backend DTO leaked upward
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Correct
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type { TCard } from '@/types'
|
|
73
|
+
import { mapCardResponse } from './cardResponseMappers'
|
|
74
|
+
|
|
75
|
+
export const getCard = async (id: string): Promise<TCard> => {
|
|
76
|
+
const { data } = await cardsClient.get(`/cards/${id}`)
|
|
77
|
+
return mapCardResponse(data)
|
|
78
|
+
}
|
|
79
|
+
```
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
paths:
|
|
3
3
|
- app/src/lib/clients/**/*.ts
|
|
4
4
|
- app/src/api/clients/**/*.ts
|
|
5
|
+
impact: HIGH
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# HTTP-транспорт
|
|
@@ -38,3 +39,23 @@ paths:
|
|
|
38
39
|
|
|
39
40
|
- Меняя реализацию общего клиента — **обновить или добавить behavior‑тесты** рядом с модулем клиента (`testing/tests-unit.md`).
|
|
40
41
|
- Не вводить **второй полноценный HTTP‑стек** без явной задачи и согласования с архитектурой репозитория.
|
|
42
|
+
## Incorrect
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
// Inside api/services — ad-hoc fetch bypasses shared client
|
|
46
|
+
export const getSettings = async () => {
|
|
47
|
+
const res = await fetch('/api/settings')
|
|
48
|
+
return res.json()
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Correct
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { appHttpClient } from '@/api/clients/appHttpClient'
|
|
56
|
+
|
|
57
|
+
export const getSettings = async () => {
|
|
58
|
+
const { data } = await appHttpClient.get('/settings')
|
|
59
|
+
return mapSettingsResponse(data)
|
|
60
|
+
}
|
|
61
|
+
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
paths:
|
|
3
3
|
- app/src/store/**/*.ts
|
|
4
|
+
impact: HIGH
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Общие принципы
|
|
@@ -63,3 +64,22 @@ paths:
|
|
|
63
64
|
- Строго типизировать state и actions.
|
|
64
65
|
- Использовать **единый стиль именования actions и селекторов**, как в существующих слайсах.
|
|
65
66
|
- При работе с ошибками и ответами HTTP опираться на **`api-and-data/http-client.md`** и контракты из `@/types`, а не на типы внешних HTTP‑библиотек вне зависимостей проекта.
|
|
67
|
+
## Incorrect
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
export const loadProfile = createAsyncThunk('profile/load', async () => {
|
|
71
|
+
const res = await fetch('/api/profile')
|
|
72
|
+
return res.json() // raw DTO into slice
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Correct
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
import { profileApi } from '@/api'
|
|
80
|
+
|
|
81
|
+
export const loadProfile = createAsyncThunk('profile/load', async () => {
|
|
82
|
+
// service returns domain model already mapped
|
|
83
|
+
return profileApi.getProfile()
|
|
84
|
+
})
|
|
85
|
+
```
|
|
@@ -4,6 +4,7 @@ paths:
|
|
|
4
4
|
- app/src/store/**/*
|
|
5
5
|
- app/src/types/**/*
|
|
6
6
|
- app/src/lib/**/*
|
|
7
|
+
impact: CRITICAL
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Границы между слоями
|
|
@@ -73,3 +74,30 @@ paths:
|
|
|
73
74
|
- Разместить файлы в **соответствующих слоях**.
|
|
74
75
|
- Проверить существующие фичи с аналогичной структурой и **повторить их организацию**.
|
|
75
76
|
- Не "коротить" слои (например, не вызывать API прямо из компонента только ради упрощения).
|
|
77
|
+
## Incorrect
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
// UI calling HTTP client / deep service path directly
|
|
81
|
+
import { httpClient } from '@/lib/clients/HttpClient'
|
|
82
|
+
import { fetchOrders } from '@/api/services/OrdersApi/orders.service'
|
|
83
|
+
|
|
84
|
+
export const OrdersPage = () => {
|
|
85
|
+
// bypasses store and @/api barrel
|
|
86
|
+
void httpClient.get('/orders')
|
|
87
|
+
return null
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Correct
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { useAppDispatch } from '@/store'
|
|
95
|
+
import { loadOrders } from '@/store/slices/Orders'
|
|
96
|
+
|
|
97
|
+
export const OrdersPage = () => {
|
|
98
|
+
const dispatch = useAppDispatch()
|
|
99
|
+
// UI → store → services from @/api (inside thunk)
|
|
100
|
+
void dispatch(loadOrders())
|
|
101
|
+
return null
|
|
102
|
+
}
|
|
103
|
+
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
paths:
|
|
3
3
|
- app/src/**/index.ts
|
|
4
|
+
impact: MEDIUM
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Barrel-экспорты слоёв с public API
|
|
@@ -56,3 +57,17 @@ paths:
|
|
|
56
57
|
| Core | `app/src/core/index.ts` | ESLint: `@/core/index` |
|
|
57
58
|
|
|
58
59
|
Иллюстрация двух уровней (API): локальный `services/.../<Feature>/index.ts` → фасад `*ApiService.ts` → `app/src/api/index.ts`.
|
|
60
|
+
## Incorrect
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
// app/src/api/index.ts — leaking internals
|
|
64
|
+
export { mapCardResponse } from './services/CardsApi/cardResponseMappers'
|
|
65
|
+
export { rawCardsClient } from './clients/rawCardsClient'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Correct
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
// app/src/api/index.ts — public facade only
|
|
72
|
+
export { cardsApi } from './services/CardsApi'
|
|
73
|
+
```
|
|
@@ -5,6 +5,7 @@ paths:
|
|
|
5
5
|
- app/src/lib/**/*
|
|
6
6
|
- app/src/types/**/*
|
|
7
7
|
- app/src/api/**/*
|
|
8
|
+
impact: HIGH
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# Публичные импорты (`@/types`, `@/api`)
|
|
@@ -44,3 +45,16 @@ import { MedcardApiService } from '@/api/services/MedcardApiService/MedcardApiSe
|
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
Новые публичные символы API — реэкспорт в `app/src/api/index.ts` по **`architecture/layer-barrel-exports.md`**.
|
|
48
|
+
## Incorrect
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import type { TUserProfile } from '@/types/User.types'
|
|
52
|
+
import { OrdersApi } from '@/api/services/OrdersApi'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Correct
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import type { TUserProfile } from '@/types'
|
|
59
|
+
import { ordersApi } from '@/api'
|
|
60
|
+
```
|