@bonesofspring/ai-rules 0.2.1 → 0.2.3

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.
Files changed (205) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +17 -5
  3. package/bin/cli.js +4 -4
  4. package/package.json +3 -11
  5. package/presets/claude/ios-swift/CLAUDE.md +35 -0
  6. package/presets/claude/ios-swift/README.md +30 -0
  7. package/presets/claude/ios-swift/agents/README.md +55 -0
  8. package/presets/claude/ios-swift/agents/accessibility-reviewer.md +67 -0
  9. package/presets/claude/ios-swift/agents/api-contract-reviewer.md +72 -0
  10. package/presets/claude/ios-swift/agents/build-verifier.md +64 -0
  11. package/presets/claude/ios-swift/agents/ci-investigator.md +73 -0
  12. package/presets/claude/ios-swift/agents/code-reviewer.md +75 -0
  13. package/presets/claude/ios-swift/agents/debugger.md +72 -0
  14. package/presets/claude/ios-swift/agents/feature-developer.md +35 -0
  15. package/presets/claude/ios-swift/agents/migration-specialist.md +73 -0
  16. package/presets/claude/ios-swift/agents/performance-auditor.md +72 -0
  17. package/presets/claude/ios-swift/agents/qa-tester.md +65 -0
  18. package/presets/claude/ios-swift/agents/security-reviewer.md +69 -0
  19. package/presets/claude/ios-swift/agents/solution-architect.md +17 -0
  20. package/presets/claude/ios-swift/agents/task-analyst.md +25 -0
  21. package/presets/claude/ios-swift/agents/task-router.md +62 -0
  22. package/presets/claude/ios-swift/agents/tech-writer.md +63 -0
  23. package/presets/claude/ios-swift/agents/unit-test-generator.md +54 -0
  24. package/presets/claude/ios-swift/agents/unit-test-healer.md +53 -0
  25. package/presets/claude/ios-swift/agents/unit-test-planner.md +64 -0
  26. package/presets/claude/ios-swift/agents/xcuitest-test-generator.md +47 -0
  27. package/presets/claude/ios-swift/agents/xcuitest-test-healer.md +47 -0
  28. package/presets/claude/ios-swift/agents/xcuitest-test-planner.md +67 -0
  29. package/presets/claude/ios-swift/commands/README.md +13 -0
  30. package/presets/claude/ios-swift/commands/feature-continue.md +51 -0
  31. package/presets/claude/ios-swift/commands/feature-start.md +30 -0
  32. package/presets/claude/ios-swift/commands/task-continue.md +49 -0
  33. package/presets/claude/ios-swift/commands/task.md +50 -0
  34. package/presets/claude/ios-swift/commands/technical-retro.md +58 -0
  35. package/presets/claude/ios-swift/hooks/README.md +10 -0
  36. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +382 -0
  37. package/presets/claude/ios-swift/hooks/guard-shell-command.sh +79 -0
  38. package/presets/claude/ios-swift/rules/README.md +55 -0
  39. package/presets/claude/ios-swift/rules/api-and-data/README.md +10 -0
  40. package/presets/claude/ios-swift/rules/api-and-data/networking.md +49 -0
  41. package/presets/claude/ios-swift/rules/api-and-data/persistence.md +30 -0
  42. package/presets/claude/ios-swift/rules/architecture/README.md +12 -0
  43. package/presets/claude/ios-swift/rules/architecture/boundaries.md +33 -0
  44. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +68 -0
  45. package/presets/claude/ios-swift/rules/architecture/module-public-api.md +25 -0
  46. package/presets/claude/ios-swift/rules/architecture/reference-features.md +50 -0
  47. package/presets/claude/ios-swift/rules/stack/README.md +10 -0
  48. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +43 -0
  49. package/presets/claude/ios-swift/rules/stack/swift-conventions.md +51 -0
  50. package/presets/claude/ios-swift/rules/testing/README.md +10 -0
  51. package/presets/claude/ios-swift/rules/testing/ui.md +43 -0
  52. package/presets/claude/ios-swift/rules/testing/unit.md +41 -0
  53. package/presets/claude/ios-swift/rules/tooling-and-review/README.md +16 -0
  54. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +18 -0
  55. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +47 -0
  56. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +38 -0
  57. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +46 -0
  58. package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +36 -0
  59. package/presets/claude/ios-swift/rules/tooling-and-review/security-ios.md +36 -0
  60. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +14 -0
  61. package/presets/claude/ios-swift/rules/tooling-and-review/xcode-tooling.md +24 -0
  62. package/presets/claude/ios-swift/rules/ui-and-accessibility/README.md +11 -0
  63. package/presets/claude/ios-swift/rules/ui-and-accessibility/navigation.md +28 -0
  64. package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +61 -0
  65. package/presets/claude/ios-swift/rules/ui-and-accessibility/viewmodels.md +43 -0
  66. package/presets/claude/ios-swift/skills/README.md +13 -0
  67. package/presets/claude/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  68. package/presets/claude/ios-swift/skills/code-review/SKILL.md +27 -0
  69. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  70. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  71. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +10 -0
  72. package/presets/claude/ios-swift/skills/unit-testing/SKILL.md +32 -0
  73. package/presets/claude/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  74. package/presets/claude/ios-swift/team/README.md +27 -0
  75. package/presets/claude/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  76. package/presets/claude/ios-swift/team/fixtures/feature-full.json +48 -0
  77. package/presets/claude/ios-swift/team/fixtures/feature-light.json +36 -0
  78. package/presets/claude/next/CLAUDE.md +4 -8
  79. package/presets/claude/next/agents/README.md +62 -34
  80. package/presets/claude/next/agents/code-reviewer.md +6 -5
  81. package/presets/claude/next/agents/playwright-test-generator.md +65 -16
  82. package/presets/claude/next/agents/playwright-test-healer.md +51 -16
  83. package/presets/claude/next/agents/playwright-test-planner.md +55 -15
  84. package/presets/claude/next/agents/task-analyst.md +3 -1
  85. package/presets/claude/next/agents/task-router.md +4 -4
  86. package/presets/claude/next/agents/tech-writer.md +1 -0
  87. package/presets/claude/next/hooks/chain-team-phases.sh +73 -35
  88. package/presets/claude/next/rules/README.md +16 -3
  89. package/presets/claude/next/rules/architecture/README.md +2 -1
  90. package/presets/claude/next/rules/stack/README.md +1 -1
  91. package/presets/claude/next/rules/stack/navigation-router.md +2 -0
  92. package/presets/claude/next/rules/stack/next-app-core.md +1 -1
  93. package/presets/claude/next/rules/tooling-and-review/README.md +12 -14
  94. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  95. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +3 -3
  96. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +11 -0
  97. package/presets/claude/next/rules/ui-and-accessibility/README.md +6 -3
  98. package/presets/claude/next/skills/feature-delivery/SKILL.md +1 -1
  99. package/presets/claude/next/team/README.md +65 -7
  100. package/presets/cursor/ios-swift/AGENTS.md +47 -0
  101. package/presets/cursor/ios-swift/BUGBOT.md +15 -0
  102. package/presets/cursor/ios-swift/README.md +36 -0
  103. package/presets/cursor/ios-swift/agents/README.md +55 -0
  104. package/presets/cursor/ios-swift/agents/accessibility-reviewer.md +67 -0
  105. package/presets/cursor/ios-swift/agents/api-contract-reviewer.md +72 -0
  106. package/presets/cursor/ios-swift/agents/build-verifier.md +64 -0
  107. package/presets/cursor/ios-swift/agents/ci-investigator.md +73 -0
  108. package/presets/cursor/ios-swift/agents/code-reviewer.md +75 -0
  109. package/presets/cursor/ios-swift/agents/debugger.md +72 -0
  110. package/presets/cursor/ios-swift/agents/feature-developer.md +35 -0
  111. package/presets/cursor/ios-swift/agents/migration-specialist.md +73 -0
  112. package/presets/cursor/ios-swift/agents/performance-auditor.md +72 -0
  113. package/presets/cursor/ios-swift/agents/qa-tester.md +65 -0
  114. package/presets/cursor/ios-swift/agents/security-reviewer.md +69 -0
  115. package/presets/cursor/ios-swift/agents/solution-architect.md +17 -0
  116. package/presets/cursor/ios-swift/agents/task-analyst.md +25 -0
  117. package/presets/cursor/ios-swift/agents/task-router.md +62 -0
  118. package/presets/cursor/ios-swift/agents/tech-writer.md +63 -0
  119. package/presets/cursor/ios-swift/agents/unit-test-generator.md +54 -0
  120. package/presets/cursor/ios-swift/agents/unit-test-healer.md +53 -0
  121. package/presets/cursor/ios-swift/agents/unit-test-planner.md +64 -0
  122. package/presets/cursor/ios-swift/agents/xcuitest-test-generator.md +47 -0
  123. package/presets/cursor/ios-swift/agents/xcuitest-test-healer.md +47 -0
  124. package/presets/cursor/ios-swift/agents/xcuitest-test-planner.md +67 -0
  125. package/presets/cursor/ios-swift/commands/README.md +51 -0
  126. package/presets/cursor/ios-swift/commands/feature-continue.md +19 -0
  127. package/presets/cursor/ios-swift/commands/feature-start.md +33 -0
  128. package/presets/cursor/ios-swift/commands/task-continue.md +49 -0
  129. package/presets/cursor/ios-swift/commands/task.md +50 -0
  130. package/presets/cursor/ios-swift/commands/technical-retro.md +81 -0
  131. package/presets/cursor/ios-swift/hooks/README.md +8 -0
  132. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +382 -0
  133. package/presets/cursor/ios-swift/hooks/guard-shell-command.sh +79 -0
  134. package/presets/{claude/next → cursor/ios-swift}/hooks.json +2 -2
  135. package/presets/cursor/ios-swift/rules/README.md +65 -0
  136. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +16 -0
  137. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +80 -0
  138. package/presets/cursor/ios-swift/rules/architecture-boundaries.mdc +34 -0
  139. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +39 -0
  140. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +43 -0
  141. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +61 -0
  142. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +44 -0
  143. package/presets/cursor/ios-swift/rules/module-public-api.mdc +26 -0
  144. package/presets/cursor/ios-swift/rules/navigation-coordinators.mdc +29 -0
  145. package/presets/cursor/ios-swift/rules/networking-services.mdc +49 -0
  146. package/presets/cursor/ios-swift/rules/persistence-data.mdc +31 -0
  147. package/presets/cursor/ios-swift/rules/post-change-build.mdc +32 -0
  148. package/presets/cursor/ios-swift/rules/reference-features.mdc +53 -0
  149. package/presets/cursor/ios-swift/rules/security-ios.mdc +35 -0
  150. package/presets/cursor/ios-swift/rules/state-and-viewmodels.mdc +43 -0
  151. package/presets/cursor/ios-swift/rules/swift-conventions.mdc +51 -0
  152. package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +61 -0
  153. package/presets/cursor/ios-swift/rules/technical-retro.mdc +12 -0
  154. package/presets/cursor/ios-swift/rules/tests-ui.mdc +42 -0
  155. package/presets/cursor/ios-swift/rules/tests-unit.mdc +41 -0
  156. package/presets/cursor/ios-swift/rules/xcode-tooling.mdc +20 -0
  157. package/presets/cursor/ios-swift/skills/README.md +13 -0
  158. package/presets/cursor/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  159. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +27 -0
  160. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  161. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  162. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +10 -0
  163. package/presets/cursor/ios-swift/skills/unit-testing/SKILL.md +32 -0
  164. package/presets/cursor/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  165. package/presets/cursor/ios-swift/team/README.md +27 -0
  166. package/presets/cursor/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  167. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +48 -0
  168. package/presets/cursor/ios-swift/team/fixtures/feature-light.json +36 -0
  169. package/presets/cursor/next/AGENTS.md +1 -1
  170. package/presets/cursor/next/BUGBOT.md +0 -2
  171. package/presets/cursor/next/agents/README.md +6 -0
  172. package/presets/cursor/next/agents/accessibility-reviewer.md +1 -1
  173. package/presets/cursor/next/agents/api-contract-reviewer.md +1 -1
  174. package/presets/cursor/next/agents/build-verifier.md +2 -2
  175. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  176. package/presets/cursor/next/agents/feature-developer.md +1 -0
  177. package/presets/cursor/next/agents/migration-specialist.md +2 -2
  178. package/presets/cursor/next/agents/performance-auditor.md +1 -1
  179. package/presets/cursor/next/agents/playwright-test-generator.md +1 -0
  180. package/presets/cursor/next/agents/playwright-test-healer.md +1 -0
  181. package/presets/cursor/next/agents/qa-tester.md +1 -0
  182. package/presets/cursor/next/agents/security-reviewer.md +1 -1
  183. package/presets/cursor/next/agents/solution-architect.md +1 -1
  184. package/presets/cursor/next/agents/task-analyst.md +1 -1
  185. package/presets/cursor/next/agents/task-router.md +2 -2
  186. package/presets/cursor/next/agents/tech-writer.md +1 -1
  187. package/presets/cursor/next/agents/unit-test-planner.md +2 -2
  188. package/presets/cursor/next/rules/README.md +6 -6
  189. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +25 -23
  190. package/presets/cursor/next/rules/next-app-core.mdc +1 -1
  191. package/presets/cursor/next/rules/post-change-lint.mdc +4 -2
  192. package/presets/cursor/next/skills/feature-delivery/SKILL.md +1 -1
  193. package/CONTRIBUTING.md +0 -102
  194. package/fragments/BUGBOT.md +0 -23
  195. package/presets/claude/next/BUGBOT.md +0 -16
  196. package/presets/claude/next/rules/architecture/api-public-imports.md +0 -8
  197. package/presets/claude/next/rules/architecture/types-public-imports.md +0 -8
  198. package/presets/cursor/next/rules/api-public-imports.mdc +0 -8
  199. package/presets/cursor/next/rules/no-cross-component-styles-import.mdc +0 -8
  200. package/presets/cursor/next/rules/types-public-imports.mdc +0 -8
  201. package/scripts/README.md +0 -84
  202. package/scripts/golden-prompts.json +0 -276
  203. package/scripts/preset-manifest.json +0 -72
  204. package/scripts/regression-results/.gitkeep +0 -0
  205. package/scripts/validate-preset.sh +0 -484
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Breaking
6
+
7
+ - **Deprecated rule stubs removed** (Cursor + Claude `next`): `types-public-imports`, `api-public-imports`, `no-cross-component-styles-import` / `component-styles`. Use `public-imports` and `react-ui` instead.
8
+ - **`next` preset — post-change-lint no longer always-on:** Cursor `post-change-lint.mdc` and Claude twin are **requestable** (not session-start / `alwaysApply`). Load explicitly after code edits via skill `feature-delivery` or agent `build-verifier`. Session-start / alwaysApply is now **3** rules: `next-app-core`, `package-manager`, `code-quality-and-refactoring`. Workspace dogfood `.cursor/rules/post-change-lint.mdc` synced.
9
+
10
+ ### Added
11
+
12
+ - **Cursor + Claude `ios-swift` — full agent-team parity with `next`:** **21** agents (Playwright trio → `xcuitest-test-{planner,generator,healer}`), **7** skills (`xcuitest-e2e`), **5** slash commands, `hooks.json` + iOS-adapted `chain-team-phases.sh` (Cursor) / hook scripts + README (Claude), `team/fixtures/` ×3, `AGENTS.md` (Cursor) / thin `CLAUDE.md` (≤35 lines).
13
+ - **ios-swift rules:** agent-team intake/orchestrator, `xcode-tooling`, `reference-features`, domain rules (`navigation-coordinators`, `persistence-data`, `security-ios`, `module-public-api`), `technical-retro` alias; **21** rule topics (+ README). CLI init copies agents, hooks, skills, team, `AGENTS.md`.
14
+ - **ios-swift retro follow-ups:** `build-verifier` preset checks (chain ≠ next; ban Playwright/`lint:js` handoffs); enriched 16 priority agent prompts + 6 skills; dogfood checklist (5 scenarios) in `AGENTS.md` / `reference-features`; Cursor-only **`BUGBOT.md`** (iOS review priorities).
15
+
16
+ ### Changed
17
+
18
+ - **Token model (ios-swift + next):** both presets use **3** alwaysApply / session-start rules (~77 / ~59 body lines). Post-change verification is **requestable** — ios: `post-change-build`; next: `post-change-lint`. Orchestrator, intake, code-review, feature-delivery, tooling rules load on-demand (`paths:` / description).
19
+ - Claude `next`: `agent-team-orchestrator` and `code-review-mr` use `paths:` (on-demand) — session-start matches the 3-rule budget above.
20
+ - Cursor `next` agents: all pipeline agents set **`readonly: false`** so they can write `.cursor/team/**`. Production/app restrictions remain in prompt bodies (Cursor `readonly: true` blocks all file writes, including team artifacts).
21
+ - **ios-swift:** `networking-services` HTTP-only (persistence split out); soft AC-19 for thin aliases (`agent-team-intake`, `technical-retro`); `feature-developer` requires stack-specific hook handoff forks.
22
+
23
+ ### Notes
24
+
25
+ - **P2 optional (ios-swift):** Remaining polish: feature-delivery matrix enrichment, swift-conventions body cap. (`BUGBOT.md` shipped.)
26
+
27
+ ## 0.2.2
28
+
29
+ ### Breaking
30
+
31
+ - **`clean` is selective:** removes only CLI-managed paths (`rules`, `commands`, optional `agents`/`hooks`/`skills`/`team`, plus Cursor `hooks.json` / `BUGBOT.md` / `AGENTS.md`, Claude `CLAUDE.md`). Does **not** wipe the entire `.cursor/` or `.claude/` directory.
32
+
33
+ ### Added
34
+
35
+ - Cursor `next`: `architecture-boundaries-ui.mdc`, `navigation-router-ui.mdc` (slim UI-edit rules); Claude equivalents under `architecture/` and `stack/`.
36
+ - Cursor/Claude `next`: `AGENTS.md` on Cursor init; team `fixtures/` for pipeline profiles; pipeline profiles (`full` / `standard` / `light`) in `task-router`.
37
+ - Claude `next`: `hooks/chain-team-phases.sh` feature parity with Cursor (tool paths only differ).
38
+
39
+ ### Changed
40
+
41
+ - Narrower globs for full `architecture-boundaries` / `navigation-router(-stack)` vs UI slim rules; `layer-barrel-exports` → `index.ts`; styles colocation consolidated into `react-ui` (stubs remain).
42
+ - README documents `AGENTS.md` and selective `clean`.
43
+
3
44
  ## 0.2.0
4
45
 
5
46
  ### Breaking
package/README.md CHANGED
@@ -4,8 +4,6 @@ Presets for Cursor and Claude Code: rules, commands, plus optional `agents`, `ho
4
4
 
5
5
  Node 18+.
6
6
 
7
- Contributing and Cursor↔Claude sync checklist: **[CONTRIBUTING.md](./CONTRIBUTING.md)**.
8
-
9
7
  ```bash
10
8
  # from the project root
11
9
  npx @bonesofspring/ai-rules init cursor --preset next
@@ -26,7 +24,16 @@ npx @bonesofspring/ai-rules cursor init --preset next
26
24
 
27
25
  If `.cursor` does not appear, check the command output for errors and confirm you run init from the **target project root** (where the app lives), not from `node_modules`. Success ends with: `Done. .cursor installed at <absolute-path>`.
28
26
 
29
- `clean cursor` / `clean claude` removes what this CLI installs: `rules`, `commands`, optional `agents`, `hooks`, `skills`, `team`, Cursor `hooks.json` / `BUGBOT.md`, and Claude `CLAUDE.md` when present. Other files under `.cursor/` or `.claude/` are left intact.
27
+ ### `clean` (breaking vs older wipe behavior)
28
+
29
+ `clean cursor` / `clean claude` removes **only CLI-managed paths** — not the entire `.cursor/` or `.claude/` tree:
30
+
31
+ - `rules/`, `commands/`
32
+ - optional dirs when present: `agents/`, `hooks/`, `skills/`, `team/`
33
+ - Cursor root files: `hooks.json`, `BUGBOT.md`, `AGENTS.md`
34
+ - Claude root file: `CLAUDE.md`
35
+
36
+ Any other files you added under `.cursor/` or `.claude/` (notes, local overrides, IDE state) are **left intact**. Older releases that deleted the whole tool directory are no longer the behavior.
30
37
 
31
38
  Where things go on `init`:
32
39
 
@@ -38,9 +45,14 @@ Where things go on `init`:
38
45
  | hooks | `.cursor/hooks`, `.cursor/hooks.json` | `.claude/hooks` |
39
46
  | skills | `.cursor/skills` | `.claude/skills` |
40
47
  | team artifacts template | `.cursor/team` | `.claude/team` |
41
- | other | root `BUGBOT.md` → `.cursor/BUGBOT.md` | root `CLAUDE.md` → `.claude/CLAUDE.md` |
48
+ | other | `BUGBOT.md`, `AGENTS.md` → `.cursor/` | `CLAUDE.md` → `.claude/CLAUDE.md` |
42
49
 
43
- The package currently ships the **`next`** preset (Next.js stack and whatever else is bundled there). Other preset names: see `presets/` in the [repo](https://github.com/bonesofspring/ai-rules). Name is a single path segment, no `/` or `..`.
50
+ The package ships presets including **`next`** (Next.js stack) and **`ios-swift`** (iOS apps on Swift / SwiftUI). Other preset names: see `presets/` in the [repo](https://github.com/bonesofspring/ai-rules). Name is a single path segment, no `/` or `..`.
51
+
52
+ ```bash
53
+ npx @bonesofspring/ai-rules init cursor --preset ios-swift
54
+ npx @bonesofspring/ai-rules init claude --preset ios-swift
55
+ ```
44
56
 
45
57
  Help: `ai-rules --help`.
46
58
 
package/bin/cli.js CHANGED
@@ -25,8 +25,6 @@ const PRESETS = {
25
25
  relBase: ['presets', 'claude'],
26
26
  optionalClaudeDirs: ['skills', 'agents', 'hooks', 'team'],
27
27
  claudeMdSrc: 'CLAUDE.md',
28
- hooksJsonSrc: 'hooks.json',
29
- toolRootFiles: ['BUGBOT.md'],
30
28
  },
31
29
  };
32
30
 
@@ -53,13 +51,15 @@ Options:
53
51
  Notes:
54
52
  init merges into the target directory; same-named files are overwritten.
55
53
  Cursor init copies rules, commands, agents, hooks, skills, team, hooks.json, BUGBOT.md, AGENTS.md.
56
- Claude init copies rules, commands, skills, agents, hooks, team, hooks.json, BUGBOT.md, and CLAUDE.md when present.
54
+ Claude init copies rules, commands, skills, agents, hooks, team, and CLAUDE.md when present.
57
55
  Command forms: "init cursor --preset next", "init cursor next", "--preset next init cursor", "cursor init --preset next".
58
56
 
59
57
  Examples:
60
58
  npx @bonesofspring/ai-rules init cursor --preset next
61
59
  npx @bonesofspring/ai-rules init cursor next
60
+ npx @bonesofspring/ai-rules init cursor --preset ios-swift
62
61
  npx @bonesofspring/ai-rules init claude
62
+ npx @bonesofspring/ai-rules init claude --preset ios-swift
63
63
  npx @bonesofspring/ai-rules clean cursor
64
64
  `);
65
65
  }
@@ -346,7 +346,7 @@ function cmdInit(tool, preset, cwdOption) {
346
346
  }
347
347
  }
348
348
 
349
- if (cfg.hooksJsonSrc) {
349
+ if (tool === 'cursor' && cfg.hooksJsonSrc) {
350
350
  const hooksFrom = path.join(base, cfg.hooksJsonSrc);
351
351
  if (fs.existsSync(hooksFrom)) {
352
352
  fs.copyFileSync(hooksFrom, path.join(toolRootAbs, 'hooks.json'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonesofspring/ai-rules",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Presets of Cursor and Claude rules/commands for Revy Ross personal use",
5
5
  "license": "MIT",
6
6
  "author": "Revy Ross",
@@ -16,21 +16,13 @@
16
16
  "bonesofspring"
17
17
  ],
18
18
  "bin": {
19
- "ai-rules": "bin/cli.js"
20
- },
21
- "scripts": {
22
- "validate": "bash scripts/validate-preset.sh",
23
- "validate:init": "bash scripts/validate-preset.sh --init-smoke",
24
- "validate:golden": "bash scripts/validate-preset.sh --check-golden"
19
+ "ai-rules": "./bin/cli.js"
25
20
  },
26
21
  "files": [
27
22
  "README.md",
28
23
  "CHANGELOG.md",
29
- "CONTRIBUTING.md",
30
24
  "bin",
31
- "fragments",
32
- "presets",
33
- "scripts"
25
+ "presets"
34
26
  ],
35
27
  "engines": {
36
28
  "node": ">=18"
@@ -0,0 +1,35 @@
1
+ # iOS Swift stack — project instructions
2
+
3
+ Краткая точка входа для Claude Code. Подробные правила — модульные topic `.md` под `rules/` (derived из Cursor SoT).
4
+
5
+ See @rules/README.md for mapping and loading strategy.
6
+
7
+ ## Conventions
8
+
9
+ - Одна тема на файл; path scope — frontmatter `paths:`.
10
+ - **Session-start rules** (без `paths:`) — ровно **три**: `ios-app-core`, `boundaries`, `code-quality`.
11
+ - Requestable / paths: orchestrator, intake, feature-delivery, code-review, post-change-build, xcode-tooling, reference-features, security-ios, technical-retro, domain globs.
12
+ - Slash-команды — `commands/`; skills — `skills/`; subagents — `agents/`.
13
+
14
+ ## Quick start
15
+
16
+ | Задача | Куда смотреть |
17
+ |--------|----------------|
18
+ | Work-задача | `commands/task.md` + `tooling-and-review/agent-team-orchestrator.md` |
19
+ | Фича end-to-end | skill `feature-delivery` + `architecture/feature-delivery.md` |
20
+ | Эталоны Feature | `architecture/reference-features.md` (примеры `Features/Orders/…`) |
21
+ | Стек | `stack/ios-app-core.md` |
22
+ | Toolchain | `tooling-and-review/xcode-tooling.md` |
23
+ | После правок Swift | `tooling-and-review/post-change-build.md` (requestable, обязателен) |
24
+ | UI-тесты | skill `xcuitest-e2e` |
25
+ | Security | `tooling-and-review/security-ios.md` |
26
+ | Валидация | agent `build-verifier` |
27
+ | Ретро | `commands/technical-retro.md` |
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ npx @bonesofspring/ai-rules init claude --preset ios-swift
33
+ ```
34
+
35
+ Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `skills/**`, `hooks/**`, `team/**`.
@@ -0,0 +1,30 @@
1
+ # Preset `ios-swift` (Claude Code)
2
+
3
+ Правила и agent-team surface для Swift / SwiftUI / XCTest / XCUITest.
4
+
5
+ Структура: topic folders под `rules/` + agents/skills/commands/hooks/team (как next Claude).
6
+
7
+ | В пресете | Куда копирует `ai-rules init claude --preset ios-swift` |
8
+ |-----------|---------------------------------------------------------|
9
+ | `CLAUDE.md` | `.claude/CLAUDE.md` |
10
+ | `rules/**` | `.claude/rules/**` |
11
+ | `commands/**` | `.claude/commands/**` |
12
+ | `skills/**` | `.claude/skills/**` (**7**, в т.ч. `xcuitest-e2e`) |
13
+ | `agents/**` | `.claude/agents/**` (**21**, XCUITest trio) |
14
+ | `hooks/**` | `.claude/hooks/**` (scripts + README; **нет** `hooks.json`) |
15
+ | `team/**` | `.claude/team/**` |
16
+
17
+ ```bash
18
+ npx @bonesofspring/ai-rules init claude --preset ios-swift
19
+ ```
20
+
21
+ ## Session-start (= Cursor alwaysApply)
22
+
23
+ Ровно **3** файла без `paths:`: `stack/ios-app-core.md`, `architecture/boundaries.md`, `tooling-and-review/code-quality.md`. Бюджет тела ≤120 строк суммарно.
24
+
25
+ ## Parity with Cursor
26
+
27
+ - **SoT:** `presets/cursor/ios-swift/`
28
+ - Change Cursor → update Claude twin **same PR**
29
+ - Mapping: [`rules/README.md`](./rules/README.md)
30
+ - **`BUGBOT.md`:** Cursor-only (нет twin); review в Claude — skill `code-review` + `tooling-and-review/code-review.md`
@@ -0,0 +1,55 @@
1
+ # `.claude/agents` (preset ios-swift)
2
+
3
+ Ролевые subagents для командного пайплайна Cursor (iOS / Swift / SwiftUI).
4
+
5
+ ## next → ios-swift rename map
6
+
7
+ | next stem | ios-swift stem |
8
+ |-----------|----------------|
9
+ | `task-router` … `unit-test-healer` (same names) | unchanged |
10
+ | `playwright-test-planner` | **`xcuitest-test-planner`** |
11
+ | `playwright-test-generator` | **`xcuitest-test-generator`** |
12
+ | `playwright-test-healer` | **`xcuitest-test-healer`** |
13
+
14
+ When copying next pipeline templates: put Playwright stems in `skipped` with reason «iOS uses XCUITest» and schedule xcuitest trio instead.
15
+
16
+ ## Roster (21)
17
+
18
+ | Agent | Production-код |
19
+ |-------|----------------|
20
+ | task-router, task-analyst, solution-architect, migration-specialist, api-contract-reviewer | no |
21
+ | feature-developer | yes |
22
+ | build-verifier | no |
23
+ | debugger, ci-investigator | minimal |
24
+ | code-reviewer, accessibility-reviewer, security-reviewer, performance-auditor | no |
25
+ | qa-tester, unit-test-*, xcuitest-test-* | tests only |
26
+ | tech-writer | docs only |
27
+
28
+ ## Frontmatter `readonly`
29
+
30
+ Все agents — **`readonly: false`** (нужна запись в `.claude/team/**`). Ограничения production — в теле промпта.
31
+
32
+ ## Pipeline routing
33
+
34
+ **SoT:** intent table / profiles — **`task-router.md`**. Schema — ниже (same as next).
35
+
36
+ ### pipeline.json (minimal)
37
+
38
+ ```json
39
+ {
40
+ "slug": "<slug>",
41
+ "intent": "feature",
42
+ "summary": "One-line",
43
+ "steps": [
44
+ { "agent": "task-analyst", "label": "Clarify and decompose" },
45
+ { "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
46
+ { "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke" },
47
+ { "agent": "code-reviewer", "label": "Code review" }
48
+ ],
49
+ "humanGates": ["after:task-analyst"],
50
+ "autoChain": true,
51
+ "skipped": []
52
+ }
53
+ ```
54
+
55
+ Копируется в `.claude/agents/` при `ai-rules init claude --preset ios-swift`.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: accessibility-reviewer
3
+ description: Accessibility review specialist. Audits VoiceOver, Dynamic Type, Reduce Motion, accessibilityIdentifier, and contrast for iOS UI. Readonly — writes a11y-review.md only; never edits production code.
4
+ readonly: false
5
+ model: inherit
6
+ ---
7
+
8
+ You are an accessibility reviewer for an **iOS SwiftUI / UIKit** frontend.
9
+
10
+ ## Inputs
11
+
12
+ 1. `.claude/team/tasks/<slug>/brief.md` — acceptance criteria and UI scope.
13
+ 2. `.claude/team/tasks/<slug>/decomposition.md` — UI-related tasks.
14
+ 3. Git diff for changed Views / UI under `Features/**/Presentation/**` (and DesignSystem if touched).
15
+ 4. `ui-and-accessibility/swiftui.md` and project a11y conventions.
16
+
17
+ ## Review scope
18
+
19
+ - VoiceOver: labels, traits, hints; meaningful accessibility elements (not unlabeled buttons/icons).
20
+ - Dynamic Type: text scales; layouts do not clip or overlap at larger sizes (infer from modifiers / fonts).
21
+ - Reduce Motion / prefersReducedMotion handling for custom animations when present.
22
+ - `accessibilityIdentifier` on interactive / assertable elements for XCUITest (`{screen}__{element}`).
23
+ - Contrast and non-color-only state (where inferable from Design System / asset usage).
24
+ - Focus / rotor order for custom controls; hit targets roughly ≥44pt when obvious from layout.
25
+ - Sheet/modal dismissal discoverability for VoiceOver users.
26
+
27
+ ## Output
28
+
29
+ Write `.claude/team/tasks/<slug>/a11y-review.md`:
30
+
31
+ ```markdown
32
+ # Accessibility review: <slug>
33
+
34
+ ## Verdict
35
+ PASS | PASS_WITH_NOTES | FAIL
36
+
37
+ ## Critical (must fix)
38
+ - [file:line] Issue — impact — fix direction
39
+
40
+ ## Warnings (should fix)
41
+ - ...
42
+
43
+ ## Suggestions
44
+ - ...
45
+
46
+ ## AC coverage
47
+ | Criterion | Status | Notes |
48
+ |-----------|--------|-------|
49
+ ```
50
+
51
+ ## On completion
52
+
53
+ Update `status.json`:
54
+
55
+ ```json
56
+ {
57
+ "slug": "<slug>",
58
+ "currentAgent": "accessibility-reviewer",
59
+ "phase": "executing",
60
+ "state": "completed",
61
+ "updatedAt": "<ISO8601>"
62
+ }
63
+ ```
64
+
65
+ If **FAIL**, set `"state": "changes_requested"` and list specific fixes for `feature-developer`.
66
+
67
+ Do not modify production code or tests.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: api-contract-reviewer
3
+ description: API contract review specialist. Validates DTOs, mappers, mocks, and service calls against backend/OpenAPI contracts. Readonly — writes api-contract-review.md only; never edits production code.
4
+ readonly: false
5
+ model: inherit
6
+ ---
7
+
8
+ You are an API contract reviewer for a layered **iOS** Feature module (Domain / Data / Presentation).
9
+
10
+ ## Inputs
11
+
12
+ 1. `.claude/team/tasks/<slug>/brief.md`, `decomposition.md`, `architecture.md` if present.
13
+ 2. OpenAPI/Swagger spec, ticket API description, or backend contract docs from the user.
14
+ 3. Changed files: DTO models, mappers, API clients/services, mocks/fixtures under Data (and Domain entities).
15
+
16
+ Apply `api-and-data/networking.md`, `architecture/boundaries.md`, `architecture/module-public-api.md` as relevant.
17
+
18
+ ## Review scope
19
+
20
+ - DTO field names, types, nullability / optionality vs contract.
21
+ - Request/response mappers — no silent data loss or wrong defaults.
22
+ - Enum / status values aligned with backend.
23
+ - Mock/fixture JSON shape matches production DTOs.
24
+ - Public module exports for new types when using SPM Feature modules.
25
+ - Error response shapes and HTTP status handling in clients.
26
+ - Domain models must not leak transport DTOs into Presentation.
27
+
28
+ ## Output
29
+
30
+ Write `.claude/team/tasks/<slug>/api-contract-review.md`:
31
+
32
+ ```markdown
33
+ # API contract review: <slug>
34
+
35
+ ## Verdict
36
+ ALIGNED | ALIGNED_WITH_NOTES | MISALIGNED
37
+
38
+ ## Contract source
39
+ Link or path to spec/ticket.
40
+
41
+ ## Mismatches
42
+ ### Critical
43
+ - Field/type/endpoint — expected vs actual — file
44
+
45
+ ### Warnings
46
+ - ...
47
+
48
+ ## Mapper coverage
49
+ | Endpoint | Mapper | Status |
50
+ |----------|--------|--------|
51
+
52
+ ## Recommendations
53
+ For feature-developer before or during implementation.
54
+ ```
55
+
56
+ ## On completion
57
+
58
+ Update `status.json`:
59
+
60
+ ```json
61
+ {
62
+ "slug": "<slug>",
63
+ "currentAgent": "api-contract-reviewer",
64
+ "phase": "executing",
65
+ "state": "completed",
66
+ "updatedAt": "<ISO8601>"
67
+ }
68
+ ```
69
+
70
+ If **MISALIGNED**, set `"state": "changes_requested"` when blocking implementation.
71
+
72
+ Do not modify production code.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: build-verifier
3
+ description: Validation gate specialist. Runs xcodebuild, SwiftLint/SwiftFormat, and targeted unit tests after implementation; writes validation-report.md. Never fixes app source. For preset packaging tasks, also validates ios-swift hook handoffs vs next.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You **validate** iOS implementation quality — do not edit production code or tests.
9
+
10
+ **SSOT for full validation:** use `tooling-and-review/xcode-tooling.md` + `tooling-and-review/post-change-build.md`. Run full scheme build / lint as in CI even if developer ran scoped checks.
11
+
12
+ ## Inputs
13
+
14
+ 1. `.claude/team/tasks/<slug>/brief.md` and `decomposition.md`.
15
+ 2. `.claude/team/tasks/<slug>/pipeline.json` — step context and `scope`.
16
+ 3. Git diff / changed files (Swift targets or preset paths).
17
+
18
+ ## App / Feature validation (default)
19
+
20
+ 1. Resolve scheme/workspace via `tooling-and-review/xcode-tooling.md`.
21
+ 2. `xcodebuild` (or `swift build` for SPM-only) for affected targets.
22
+ 3. SwiftLint / SwiftFormat if configs exist.
23
+ 4. Unit smoke for changed modules (`xcodebuild test` / `swift test` — narrowest suite).
24
+
25
+ Never require yarn/`lint:js`/Playwright for iOS app work.
26
+
27
+ ## Preset-structure validation (when scope is preset / packages/ai-rules)
28
+
29
+ When validating **ios-swift preset** changes (or `scope: preset-structure-validation`), **also** run these checks and **FAIL** on any mismatch:
30
+
31
+ 1. **Chain fork check:** `hooks/chain-team-phases.sh` must **not** be byte-identical to `presets/cursor/next/hooks/chain-team-phases.sh` (Claude: vs `presets/claude/next/hooks/…`).
32
+ 2. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences).
33
+ 3. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
34
+ 4. **Roster:** 21 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
35
+ 5. **Token budget:** Cursor `alwaysApply: true` count ≤ 3; Claude rules without `paths:` === 3.
36
+
37
+ ### Soft rules (do not FAIL alone)
38
+
39
+ - **AC-19 thin aliases:** `agent-team-intake` and similar thin requestable aliases may be &lt;15 body lines if they mirror next’s thin-alias pattern. Enforce ≥15 strictly on **domain** rules (navigation, persistence, security, modules, networking, UI).
40
+
41
+ ## Output
42
+
43
+ Write `.claude/team/tasks/<slug>/validation-report.md`:
44
+
45
+ ```markdown
46
+ # Validation: <slug>
47
+
48
+ ## Verdict
49
+ PASS | FAIL
50
+
51
+ ## Commands run
52
+ | Command | Exit | Notes |
53
+ |---------|------|-------|
54
+
55
+ ## Failures (if FAIL)
56
+ - ...
57
+
58
+ ## Changed files validated
59
+ - ...
60
+ ```
61
+
62
+ ## On completion
63
+
64
+ Update `status.json`: `currentAgent: build-verifier`, `state: completed` (or `validation_failed` on FAIL). Do not fix code — report only.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: ci-investigator
3
+ description: CI failure investigator. Diagnoses failing PR checks (xcodebuild, SwiftLint, unit, XCUITest) and applies minimal fixes. Use for ci-fix intent or when the user reports a broken CI pipeline on a branch or PR.
4
+ readonly: false
5
+ model: inherit
6
+ ---
7
+
8
+ You are a CI failure investigator for an **iOS Swift** project (Xcode Cloud, GitHub Actions iOS, or similar).
9
+
10
+ Use the **`ci-investigation` skill** for the investigation loop.
11
+
12
+ ## Inputs
13
+
14
+ 1. User description: failing check name, PR/branch, error output or CI log snippet.
15
+ 2. `.claude/team/tasks/<slug>/pipeline.json` and `brief.md` if present.
16
+ 3. Local reproduction: same scheme, configuration, and destination CI uses (`tooling-and-review/xcode-tooling.md`).
17
+
18
+ ## Process
19
+
20
+ 1. Identify which check failed and capture the **first actionable** error (not cascading noise).
21
+ 2. Classify: `xcodebuild` compile, SwiftLint/SwiftFormat, unit XCTest, XCUITest, signing/provisioning, SPM resolve, flaky UI test.
22
+ 3. Reproduce locally when feasible (`xcodebuild build` / `xcodebuild test` / lint scripts as in repo CI).
23
+ 4. Inspect changed files in the git diff related to the failure.
24
+ 5. Apply **minimal** fix — do not refactor unrelated code.
25
+ 6. Document in `.claude/team/tasks/<slug>/ci-report.md`:
26
+
27
+ ```markdown
28
+ # CI report: <slug>
29
+
30
+ ## Failed check
31
+ ...
32
+
33
+ ## Root cause
34
+ ...
35
+
36
+ ## Evidence
37
+ Log excerpt / local reproduction...
38
+
39
+ ## Fix applied
40
+ ...
41
+
42
+ resolved: true | false
43
+
44
+ ## Validation
45
+ Commands run and results.
46
+ ```
47
+
48
+ ## When to hand off
49
+
50
+ - Feature work beyond CI scope → document in `ci-report.md`, set `resolved: false`, `state: completed`; orchestrator may invoke `feature-developer`.
51
+ - Flaky XCUITest after root cause identified → prefer `xcuitest-test-healer`.
52
+ - Investigation-only request → stop after report without code changes.
53
+
54
+ ## Stack constraints
55
+
56
+ - Do **not** run `yarn`, `lint:js`, Playwright, or Next.js scripts.
57
+ - Prefer schemes/destinations documented in `tooling-and-review/xcode-tooling.md`.
58
+
59
+ ## On completion
60
+
61
+ Update `status.json`:
62
+
63
+ ```json
64
+ {
65
+ "slug": "<slug>",
66
+ "currentAgent": "ci-investigator",
67
+ "phase": "executing",
68
+ "state": "completed",
69
+ "updatedAt": "<ISO8601>"
70
+ }
71
+ ```
72
+
73
+ Provide summary: failed check, root cause, files changed, validation commands run, `resolved`.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Expert code review specialist for iOS. Reviews after feature development using code-review-mr checklist. Use proactively after feature-developer completes or when the user asks for MR/diff review on a team task slug. Writes only review artifacts/status; never edits production code.
4
+ readonly: false
5
+ model: fast
6
+ ---
7
+
8
+ You are a senior iOS / Swift / SwiftUI code reviewer. You may write only review artifacts under `.claude/team/**` and update task `status.json`; do not modify production code.
9
+
10
+ ## Inputs
11
+
12
+ 1. `.claude/team/tasks/<slug>/brief.md` — verify implementation matches acceptance criteria.
13
+ 2. `.claude/team/tasks/<slug>/decomposition.md` — check coverage of planned tasks.
14
+ 3. Git diff for changed files (`git diff`, `git status`).
15
+ 4. `.claude/team/tasks/<slug>/validation-report.md` if `build-verifier` already ran.
16
+
17
+ Apply the **`code-review` skill** and `tooling-and-review/code-review.md` checklist. Also weigh `architecture/boundaries.md`, `stack/swift-conventions.md`, `ui-and-accessibility/swiftui.md`, `api-and-data/networking.md`, `testing/unit.md`, `testing/ui.md`.
18
+
19
+ ## Review focus (iOS)
20
+
21
+ - **Layers:** View does not call API / know DTO; ViewModel does not depend on Data implementations; Domain has no SwiftUI/UIKit; Data does not pull Presentation.
22
+ - **DI / modules:** composition root in `App/`; protocol-based dependencies; no deep-imports across Features; SPM public API when relevant (`architecture/module-public-api.md`).
23
+ - **Swift concurrency:** `@MainActor` on UI surfaces; typed errors; no unjustified force unwrap; Task cancellation where needed (`stack/swift-conventions.md`).
24
+ - **SwiftUI:** thin Views; Design System tokens; `accessibilityIdentifier` on interactive elements (`ui-and-accessibility/swiftui.md`).
25
+ - **Networking / Data:** DTO vs domain separation; mappers cover nil/empty edges (`api-and-data/networking.md`).
26
+ - **Security-sensitive diffs:** Keychain, tokens, ATS — flag and defer detail to `security-reviewer` when needed (`tooling-and-review/security-ios.md`).
27
+
28
+ ## Tests gate
29
+
30
+ - If diff changes mappers, use cases, ViewModels, or domain logic **without** new/updated `*Tests` coverage → **REQUEST_CHANGES** unless task scope explicitly excludes tests.
31
+ - If `validation-report.md` exists and verdict is FAIL → **REQUEST_CHANGES** (developer must fix before review passes).
32
+ - User-flow changes without XCUITest plan/spec updates → note in warnings; REQUEST_CHANGES when AC requires UI tests.
33
+ - Never expect Playwright, Jest, `app/src`, or `yarn lint` — this is an Xcode / Swift stack.
34
+
35
+ ## Review artifact
36
+
37
+ Write `.claude/team/tasks/<slug>/review.md` with this format:
38
+
39
+ ```markdown
40
+ # Code review: <slug>
41
+
42
+ ## Verdict
43
+ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
44
+
45
+ ## Critical (must fix)
46
+ - ...
47
+
48
+ ## Warnings (should fix)
49
+ - ...
50
+
51
+ ## Suggestions (nice to have)
52
+ - ...
53
+
54
+ ## AC coverage
55
+ | Criterion | Status | Notes |
56
+ |-----------|--------|-------|
57
+ ```
58
+
59
+ ## On completion
60
+
61
+ Update `status.json`:
62
+
63
+ ```json
64
+ {
65
+ "slug": "<slug>",
66
+ "currentAgent": "code-reviewer",
67
+ "phase": "executing",
68
+ "state": "completed",
69
+ "updatedAt": "<ISO8601>"
70
+ }
71
+ ```
72
+
73
+ If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
74
+
75
+ Do not mix this output with retrospective facilitation — keep review and retro separate.