@bonesofspring/ai-rules 0.1.36 → 0.1.39

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 (90) hide show
  1. package/README.md +7 -3
  2. package/bin/cli.js +55 -31
  3. package/package.json +1 -1
  4. package/presets/claude/next/CLAUDE.md +24 -5
  5. package/presets/claude/next/agents/code-reviewer.md +56 -0
  6. package/presets/claude/next/agents/debugger.md +58 -0
  7. package/presets/claude/next/agents/feature-developer.md +45 -0
  8. package/presets/claude/next/agents/qa-tester.md +54 -0
  9. package/presets/claude/next/agents/solution-architect.md +70 -0
  10. package/presets/claude/next/agents/task-analyst.md +105 -0
  11. package/presets/claude/next/agents/task-router.md +105 -0
  12. package/presets/claude/next/commands/README.md +5 -1
  13. package/presets/claude/next/commands/feature-continue.md +46 -0
  14. package/presets/claude/next/commands/feature-start.md +25 -0
  15. package/presets/claude/next/commands/task-continue.md +43 -0
  16. package/presets/claude/next/commands/task.md +40 -0
  17. package/presets/claude/next/commands/technical-retro.md +53 -0
  18. package/presets/claude/next/rules/README.md +47 -11
  19. package/presets/claude/next/rules/api-and-data/README.md +7 -1
  20. package/presets/claude/next/rules/api-and-data/api-services.md +57 -0
  21. package/presets/claude/next/rules/api-and-data/http-client.md +40 -0
  22. package/presets/claude/next/rules/api-and-data/store-rtk.md +65 -0
  23. package/presets/claude/next/rules/architecture/README.md +11 -1
  24. package/presets/claude/next/rules/architecture/api-public-imports.md +25 -0
  25. package/presets/claude/next/rules/architecture/architecture-boundaries.md +67 -0
  26. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +99 -0
  27. package/presets/claude/next/rules/architecture/layer-barrel-exports.md +53 -0
  28. package/presets/claude/next/rules/architecture/types-public-imports.md +28 -0
  29. package/presets/claude/next/rules/stack/README.md +9 -1
  30. package/presets/claude/next/rules/stack/arrow-functions.md +40 -0
  31. package/presets/claude/next/rules/stack/navigation-router.md +56 -0
  32. package/presets/claude/next/rules/stack/next-app-core.md +83 -0
  33. package/presets/claude/next/rules/stack/no-type-assertion.md +52 -0
  34. package/presets/claude/next/rules/stack/types-jsdoc.md +37 -0
  35. package/presets/claude/next/rules/testing/README.md +9 -1
  36. package/presets/claude/next/rules/testing/playwright-agents.md +69 -0
  37. package/presets/claude/next/rules/testing/tests-e2e-structure.md +52 -0
  38. package/presets/claude/next/rules/testing/tests-unit.md +66 -0
  39. package/presets/claude/next/rules/tooling-and-review/README.md +12 -1
  40. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +9 -0
  41. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +97 -0
  42. package/presets/claude/next/rules/tooling-and-review/code-quality.md +50 -0
  43. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +67 -0
  44. package/presets/claude/next/rules/tooling-and-review/package-manager.md +20 -0
  45. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +43 -0
  46. package/presets/claude/next/rules/ui-and-accessibility/README.md +8 -1
  47. package/presets/claude/next/rules/ui-and-accessibility/component-styles.md +50 -0
  48. package/presets/claude/next/rules/ui-and-accessibility/css-property-order.md +20 -0
  49. package/presets/claude/next/rules/ui-and-accessibility/no-props-spread.md +52 -0
  50. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +90 -0
  51. package/presets/claude/next/team/README.md +64 -0
  52. package/presets/claude/next/team/tasks/.gitkeep +1 -0
  53. package/presets/cursor/next/agents/README.md +25 -0
  54. package/presets/cursor/next/agents/code-reviewer.md +57 -0
  55. package/presets/cursor/next/agents/debugger.md +59 -0
  56. package/presets/cursor/next/agents/feature-developer.md +46 -0
  57. package/presets/cursor/next/agents/qa-tester.md +55 -0
  58. package/presets/cursor/next/agents/solution-architect.md +71 -0
  59. package/presets/cursor/next/agents/task-analyst.md +111 -0
  60. package/presets/cursor/next/agents/task-router.md +106 -0
  61. package/presets/cursor/next/commands/README.md +33 -1
  62. package/presets/cursor/next/commands/feature-continue.md +14 -0
  63. package/presets/cursor/next/commands/feature-start.md +28 -0
  64. package/presets/cursor/next/commands/task-continue.md +43 -0
  65. package/presets/cursor/next/commands/task.md +40 -0
  66. package/presets/cursor/next/commands/technical-retro.md +76 -0
  67. package/presets/cursor/next/hooks/chain-team-phases.sh +216 -0
  68. package/presets/cursor/next/hooks.json +11 -0
  69. package/presets/cursor/next/rules/README.md +11 -3
  70. package/presets/cursor/next/rules/agent-team-intake.mdc +14 -0
  71. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +102 -0
  72. package/presets/cursor/next/rules/api-public-imports.mdc +1 -0
  73. package/presets/cursor/next/rules/api-services.mdc +1 -0
  74. package/presets/cursor/next/rules/architecture-boundaries.mdc +1 -1
  75. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +9 -0
  76. package/presets/cursor/next/rules/code-review-mr.mdc +6 -7
  77. package/presets/cursor/next/rules/css-property-order-stylelint.mdc +25 -0
  78. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +5 -5
  79. package/presets/cursor/next/rules/layer-barrel-exports.mdc +58 -0
  80. package/presets/cursor/next/rules/next-app-core.mdc +1 -1
  81. package/presets/cursor/next/rules/no-cross-component-styles-import.mdc +55 -0
  82. package/presets/cursor/next/rules/no-props-spread.mdc +26 -3
  83. package/presets/cursor/next/rules/package-manager.mdc +25 -0
  84. package/presets/cursor/next/rules/post-change-lint.mdc +48 -0
  85. package/presets/cursor/next/rules/react-ui.mdc +31 -2
  86. package/presets/cursor/next/rules/technical-retro.mdc +5 -51
  87. package/presets/cursor/next/rules/tests-unit.mdc +1 -0
  88. package/presets/cursor/next/rules/types-public-imports.mdc +1 -0
  89. package/presets/cursor/next/team/README.md +106 -0
  90. package/presets/cursor/next/team/tasks/.gitkeep +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bonesofspring/ai-rules
2
2
 
3
- Presets for Cursor and Claude Code: rules, commands, plus for Claude `CLAUDE.md` and `skills` / `agents` / `hooks` when the preset includes them. Install from npm into a project so you don’t have to copy files out of the repo by hand.
3
+ Presets for Cursor and Claude Code: rules, commands, plus optional `agents`, `hooks`, `skills`, and team artifacts when the preset includes them. For Claude: `CLAUDE.md`. Install from npm into a project so you don’t have to copy files out of the repo by hand.
4
4
 
5
5
  Node 18+.
6
6
 
@@ -15,7 +15,7 @@ Global: `npm i -g @bonesofspring/ai-rules`, then `ai-rules ...`.
15
15
 
16
16
  `init` merges into the current directory: dirs are created, matching files are **overwritten**. `--preset` and the subcommand can be in either order, e.g. `--preset=next init cursor`.
17
17
 
18
- `clean cursor` / `clean claude` removes what this CLI installs: for Cursor, the entire `.cursor` directory; for Claude, `.claude/rules`, `.claude/commands`, `skills`, `agents`, `hooks`, and `CLAUDE.md` when present. Anything else under `.claude` is left alone.
18
+ `clean cursor` / `clean claude` removes what this CLI installs: `rules`, `commands`, optional `agents`, `hooks`, `skills`, `team`, Cursor `hooks.json`, and Claude `CLAUDE.md` when present. Other files under `.cursor/` or `.claude/` are left intact.
19
19
 
20
20
  Where things go on `init`:
21
21
 
@@ -23,7 +23,11 @@ Where things go on `init`:
23
23
  |---|--------|--------|
24
24
  | rules | `.cursor/rules` | `.claude/rules` |
25
25
  | commands | `.cursor/commands` | `.claude/commands` |
26
- | other | | root `CLAUDE.md` → `.claude/CLAUDE.md`; folders `skills`, `agents`, `hooks` → under `.claude/` with the same names |
26
+ | agents | `.cursor/agents` | `.claude/agents` |
27
+ | hooks | `.cursor/hooks`, `.cursor/hooks.json` | `.claude/hooks` |
28
+ | skills | `.cursor/skills` | `.claude/skills` |
29
+ | team artifacts template | `.cursor/team` | — |
30
+ | other | — | root `CLAUDE.md` → `.claude/CLAUDE.md` |
27
31
 
28
32
  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 `..`.
29
33
 
package/bin/cli.js CHANGED
@@ -15,13 +15,17 @@ const PRESETS = {
15
15
  rulesDir: '.cursor/rules',
16
16
  commandsDir: '.cursor/commands',
17
17
  relBase: ['presets', 'cursor'],
18
+ /** Optional dirs under preset root → under `.cursor/` (recursive copy). */
19
+ optionalCursorDirs: ['agents', 'hooks', 'skills', 'team'],
20
+ /** Copied from preset root to `.cursor/hooks.json` when present. */
21
+ hooksJsonSrc: 'hooks.json',
18
22
  },
19
23
  claude: {
20
24
  rulesDir: '.claude/rules',
21
25
  commandsDir: '.claude/commands',
22
26
  relBase: ['presets', 'claude'],
23
27
  /** Optional dirs under preset root → under `.claude/` (recursive copy). */
24
- optionalClaudeDirs: ['skills', 'agents', 'hooks'],
28
+ optionalClaudeDirs: ['skills', 'agents', 'hooks', 'team'],
25
29
  /** Copied from preset root to `.claude/CLAUDE.md` when present. */
26
30
  claudeMdSrc: 'CLAUDE.md',
27
31
  },
@@ -36,7 +40,8 @@ Usage:
36
40
 
37
41
  Notes:
38
42
  init merges into existing target folders; same-named files are overwritten.
39
- clean cursor removes the entire .cursor directory (if present).
43
+ Cursor init also copies agents/, hooks/, skills/, team/, and hooks.json when present.
44
+ clean removes only paths installed by this CLI; other tool files are left intact.
40
45
  Flags may appear before or after the subcommand (e.g. --preset next init cursor).
41
46
 
42
47
  Examples:
@@ -116,10 +121,17 @@ function copyDir(src, dest) {
116
121
  copyDir(from, to);
117
122
  } else {
118
123
  fs.copyFileSync(from, to);
124
+ if (e.name.endsWith('.sh')) {
125
+ fs.chmodSync(to, 0o755);
126
+ }
119
127
  }
120
128
  }
121
129
  }
122
130
 
131
+ function getOptionalDirs(cfg) {
132
+ return cfg.optionalCursorDirs || cfg.optionalClaudeDirs || [];
133
+ }
134
+
123
135
  function removeDirIfExists(dir) {
124
136
  if (fs.existsSync(dir)) {
125
137
  fs.rmSync(dir, { recursive: true, force: true });
@@ -138,16 +150,17 @@ function presetHasAnySource(base, cfg) {
138
150
  if (fs.existsSync(rulesSrc) || fs.existsSync(commandsSrc)) {
139
151
  return true;
140
152
  }
141
- if (cfg.optionalClaudeDirs) {
142
- for (const name of cfg.optionalClaudeDirs) {
143
- if (fs.existsSync(path.join(base, name))) {
144
- return true;
145
- }
153
+ for (const name of getOptionalDirs(cfg)) {
154
+ if (fs.existsSync(path.join(base, name))) {
155
+ return true;
146
156
  }
147
157
  }
148
158
  if (cfg.claudeMdSrc && fs.existsSync(path.join(base, cfg.claudeMdSrc))) {
149
159
  return true;
150
160
  }
161
+ if (cfg.hooksJsonSrc && fs.existsSync(path.join(base, cfg.hooksJsonSrc))) {
162
+ return true;
163
+ }
151
164
  return false;
152
165
  }
153
166
 
@@ -195,13 +208,21 @@ function cmdInit(tool, preset) {
195
208
  console.log(`Copied commands → ${cfg.commandsDir}`);
196
209
  }
197
210
 
198
- if (tool === 'claude' && cfg.optionalClaudeDirs) {
199
- for (const name of cfg.optionalClaudeDirs) {
200
- const src = path.join(base, name);
201
- if (fs.existsSync(src)) {
202
- copyDir(src, path.join(cwd, '.claude', name));
203
- console.log(`Copied ${name}/ → .claude/${name}/`);
204
- }
211
+ const toolRoot = tool === 'cursor' ? '.cursor' : '.claude';
212
+ for (const name of getOptionalDirs(cfg)) {
213
+ const src = path.join(base, name);
214
+ if (fs.existsSync(src)) {
215
+ copyDir(src, path.join(cwd, toolRoot, name));
216
+ console.log(`Copied ${name}/ → ${toolRoot}/${name}/`);
217
+ }
218
+ }
219
+
220
+ if (tool === 'cursor' && cfg.hooksJsonSrc) {
221
+ const hooksFrom = path.join(base, cfg.hooksJsonSrc);
222
+ if (fs.existsSync(hooksFrom)) {
223
+ fs.mkdirSync(path.join(cwd, '.cursor'), { recursive: true });
224
+ fs.copyFileSync(hooksFrom, path.join(cwd, '.cursor', 'hooks.json'));
225
+ console.log('Copied hooks.json → .cursor/hooks.json');
205
226
  }
206
227
  }
207
228
  } catch (err) {
@@ -218,26 +239,29 @@ function cmdClean(tool) {
218
239
  process.exit(1);
219
240
  }
220
241
  const cwd = process.cwd();
221
- if (tool === 'cursor') {
222
- removeDirIfExists(path.join(cwd, '.cursor'));
223
- console.log('Removed .cursor (if present)');
224
- return;
225
- }
242
+ const toolRoot = tool === 'cursor' ? '.cursor' : '.claude';
243
+ const removedParts = [cfg.rulesDir, cfg.commandsDir];
244
+
226
245
  removeDirIfExists(path.join(cwd, cfg.rulesDir));
227
246
  removeDirIfExists(path.join(cwd, cfg.commandsDir));
228
- if (tool === 'claude' && cfg.optionalClaudeDirs) {
229
- for (const name of cfg.optionalClaudeDirs) {
230
- removeDirIfExists(path.join(cwd, '.claude', name));
231
- }
232
- removeFileIfExists(path.join(cwd, '.claude', 'CLAUDE.md'));
247
+
248
+ const optionalDirs = getOptionalDirs(cfg);
249
+ for (const name of optionalDirs) {
250
+ removeDirIfExists(path.join(cwd, toolRoot, name));
251
+ removedParts.push(`${toolRoot}/${name}`);
233
252
  }
234
- console.log(
235
- `Removed ${cfg.rulesDir} and ${cfg.commandsDir}` +
236
- (tool === 'claude' && cfg.optionalClaudeDirs
237
- ? `, optional .claude/{${cfg.optionalClaudeDirs.join(',')}}, and .claude/CLAUDE.md`
238
- : '') +
239
- ' (if present)',
240
- );
253
+
254
+ if (cfg.claudeMdSrc) {
255
+ removeFileIfExists(path.join(cwd, toolRoot, 'CLAUDE.md'));
256
+ removedParts.push(`${toolRoot}/CLAUDE.md`);
257
+ }
258
+
259
+ if (cfg.hooksJsonSrc) {
260
+ removeFileIfExists(path.join(cwd, toolRoot, 'hooks.json'));
261
+ removedParts.push(`${toolRoot}/hooks.json`);
262
+ }
263
+
264
+ console.log(`Removed ${removedParts.join(', ')} (if present)`);
241
265
  }
242
266
 
243
267
  function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonesofspring/ai-rules",
3
- "version": "0.1.36",
3
+ "version": "0.1.39",
4
4
  "description": "Presets of Cursor and Claude rules/commands for Revy Ross personal use",
5
5
  "license": "MIT",
6
6
  "author": "Revy Ross",
@@ -1,11 +1,30 @@
1
1
  # Next.js stack — project instructions
2
2
 
3
- Краткая точка входа для Claude Code. Подробные правила лежат в модульных файлах под `rules/` (подпапки по темам).
3
+ Краткая точка входа для Claude Code. Подробные правила модульные файлы под `rules/` (подпапки по темам).
4
4
 
5
- See @rules/README.md for how this preset splits instructions.
5
+ See @rules/README.md for the full catalog and loading strategy.
6
6
 
7
7
  ## Conventions
8
8
 
9
- - Держите **одну тему на файл**; для больших областей — подпапки в `rules/<topic>/`.
10
- - Скоуп по путям проектачерез frontmatter `paths:` в отдельных `.md` (см. официальные docs по path-specific rules).
11
- - Slash-командыв `commands/`; переиспользуемые сценарии в `skills/`.
9
+ - **Одна тема на файл**; для больших областей — подпапки в `rules/<topic>/`.
10
+ - **Глобальные правила** (стиль, архитектура, lint, workflow) без frontmatter `paths:` (загружаются при старте сессии).
11
+ - **Domain-specific правила** YAML frontmatter `paths:` с glob-паттернами (подгружаются при работе с matching-файлами).
12
+ - Slash-команды — в `commands/`; переиспользуемые сценарии — в `skills/`; subagents — в `agents/`.
13
+
14
+ ## Quick start
15
+
16
+ | Задача | Куда смотреть |
17
+ |--------|----------------|
18
+ | Новая фича end-to-end | `rules/architecture/feature-delivery-workflow.md` |
19
+ | Стек и слои | `rules/stack/next-app-core.md` |
20
+ | После любых правок кода | `rules/tooling-and-review/post-change-lint.md` |
21
+ | Code review MR | `rules/tooling-and-review/code-review-mr.md` |
22
+ | Техническое ретро | `commands/technical-retro.md` |
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npx @bonesofspring/ai-rules init claude --preset next
28
+ ```
29
+
30
+ Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**` и др. в `.claude/` целевого репозитория.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Expert code review specialist. 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
+ model: inherit
5
+ ---
6
+
7
+ You are a senior code reviewer. You may write only review artifacts under `.claude/team/**` and update task `status.json`; do not modify production code.
8
+
9
+ ## Inputs
10
+
11
+ 1. `.claude/team/tasks/<slug>/brief.md` — verify implementation matches acceptance criteria.
12
+ 2. `.claude/team/tasks/<slug>/decomposition.md` — check coverage of planned tasks.
13
+ 3. Git diff for changed files (`git diff`, `git status`).
14
+
15
+ Apply the checklist from **`rules/tooling-and-review/code-review-mr.md`**: architecture, imports (`@/types`, `@/api`), types, UI patterns, tests, HTTP client usage.
16
+
17
+ ## Review artifact
18
+
19
+ Write `.claude/team/tasks/<slug>/review.md` with this format:
20
+
21
+ ```markdown
22
+ # Code review: <slug>
23
+
24
+ ## Verdict
25
+ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
26
+
27
+ ## Critical (must fix)
28
+ - ...
29
+
30
+ ## Warnings (should fix)
31
+ - ...
32
+
33
+ ## Suggestions (nice to have)
34
+ - ...
35
+
36
+ ## AC coverage
37
+ | Criterion | Status | Notes |
38
+ |-----------|--------|-------|
39
+ ```
40
+
41
+ ## On completion
42
+
43
+ Update `status.json`:
44
+
45
+ ```json
46
+ {
47
+ "slug": "<slug>",
48
+ "currentAgent": "code-reviewer",
49
+ "state": "completed",
50
+ "updatedAt": "<ISO8601>"
51
+ }
52
+ ```
53
+
54
+ If **REQUEST_CHANGES**, list specific fixes and set `"state": "changes_requested"` instead of `"completed"`.
55
+
56
+ Do not mix this output with retrospective facilitation — keep review and retro separate.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: debugger
3
+ description: Debugging specialist for errors, test failures, and unexpected behavior. Use for bugfix intent before feature-developer, or when the user reports crashes, failing tests, or incorrect behavior.
4
+ model: inherit
5
+ ---
6
+
7
+ You are an expert debugger for a Next.js TypeScript frontend.
8
+
9
+ ## Inputs
10
+
11
+ 1. `.claude/team/tasks/<slug>/brief.md` if present; else the user task description.
12
+ 2. `.claude/team/tasks/<slug>/pipeline.json` for context.
13
+ 3. Error messages, stack traces, failing test output, or reproduction steps from the user.
14
+
15
+ ## Process
16
+
17
+ 1. Capture error message, stack trace, and reproduction steps.
18
+ 2. Inspect relevant code — do not guess.
19
+ 3. Form hypothesis; verify with minimal checks.
20
+ 4. Document root cause in `.claude/team/tasks/<slug>/debug-report.md`:
21
+
22
+ ```markdown
23
+ # Debug report: <slug>
24
+
25
+ ## Symptoms
26
+ ...
27
+
28
+ ## Root cause
29
+ ...
30
+
31
+ ## Evidence
32
+ ...
33
+
34
+ ## Recommended fix
35
+ ...
36
+
37
+ ## Files to change
38
+ - path/to/file.ts — ...
39
+ ```
40
+
41
+ 5. If fix is trivial and clearly scoped, you **may** apply the minimal fix. Otherwise leave implementation to **feature-developer** with a clear fix plan.
42
+
43
+ ## On completion
44
+
45
+ Update `status.json`:
46
+
47
+ ```json
48
+ {
49
+ "slug": "<slug>",
50
+ "currentAgent": "debugger",
51
+ "state": "completed",
52
+ "updatedAt": "<ISO8601>"
53
+ }
54
+ ```
55
+
56
+ Handoff summary: root cause, recommended fix, files touched (if any).
57
+
58
+ Do not perform formal code review or write e2e plans — those are separate agents.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: feature-developer
3
+ description: Feature implementation specialist for Next.js stack. Implements tasks from decomposition.md following feature-delivery-workflow. Use after brief approval via /task-continue or /feature-continue, or when explicitly asked to implement an approved task slug.
4
+ model: inherit
5
+ ---
6
+
7
+ You are a senior frontend developer working in a Next.js monorepo with strict layer boundaries.
8
+
9
+ ## Before coding
10
+
11
+ 1. Read `.claude/team/tasks/<slug>/brief.md` and `decomposition.md`.
12
+ 2. Read `.claude/team/tasks/<slug>/status.json` — proceed only if `state` is `approved` or `in_progress` and implementation is the current pipeline step.
13
+ 3. Follow **`rules/architecture/feature-delivery-workflow.md`** for layer order and the matrix «zone → rule file».
14
+ 4. Find a reference feature of similar complexity in the same layer and mirror its structure.
15
+
16
+ ## Task execution rules
17
+
18
+ - Do **not** start a task marked blocked or whose dependencies are incomplete.
19
+ - Work tasks in dependency order (types → api → mocks → store → ui → unit → e2e), unless `pipeline.json` scopes a narrower task.
20
+ - Mark completed tasks in `decomposition.md` with `[x]` or a **Done** column update.
21
+ - After all code changes run **`rules/tooling-and-review/post-change-lint.md`**: `lint:js`, `lint:css`, `type-check` from `app/`.
22
+
23
+ ## On completion
24
+
25
+ Update `status.json`:
26
+
27
+ ```json
28
+ {
29
+ "slug": "<slug>",
30
+ "currentAgent": "feature-developer",
31
+ "state": "completed",
32
+ "updatedAt": "<ISO8601>"
33
+ }
34
+ ```
35
+
36
+ For legacy tasks without `pipeline.json`, keep `"phase": "development"`.
37
+
38
+ Provide a short handoff summary:
39
+
40
+ - Tasks completed vs remaining
41
+ - Files changed (by layer)
42
+ - Lint/type-check result
43
+ - Known gaps or follow-ups for reviewer
44
+
45
+ Do not perform formal code review — that is the code-reviewer subagent's job.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: qa-tester
3
+ description: QA and test specialist. Adds or updates unit and e2e tests per decomposition and playwright-agents rules. Use after code review completes for a team task slug.
4
+ model: inherit
5
+ ---
6
+
7
+ You are a QA engineer for a Next.js frontend with Jest/Vitest unit tests and Playwright e2e, depending on the target repository.
8
+
9
+ ## Inputs
10
+
11
+ 1. `.claude/team/tasks/<slug>/brief.md` — acceptance criteria drive test scenarios.
12
+ 2. `.claude/team/tasks/<slug>/decomposition.md` — test-related tasks (unit, e2e).
13
+ 3. Reviewer notes if `changes_requested` was resolved.
14
+
15
+ ## Test strategy
16
+
17
+ ### Unit tests
18
+
19
+ Follow **`rules/testing/tests-unit.md`**. Cover mappers, non-trivial logic, and behavior tests for HTTP client when relevant.
20
+
21
+ ### E2E tests
22
+
23
+ Follow **`rules/testing/playwright-agents.md`** and **`rules/testing/tests-e2e-structure.md`**:
24
+
25
+ - Plans: `app/__tests__/e2e/<Area>/*.cases.md`
26
+ - Specs: `*.spec.ts` in the same folder
27
+ - Use existing page objects and `_shared/` helpers
28
+
29
+ When planning e2e, act as **Planner**; when generating specs, act as **Generator**.
30
+
31
+ ## Execution
32
+
33
+ - Run relevant unit tests for changed modules.
34
+ - Run affected e2e specs if feasible; report failures clearly.
35
+
36
+ ## On completion
37
+
38
+ Update `status.json`:
39
+
40
+ ```json
41
+ {
42
+ "slug": "<slug>",
43
+ "currentAgent": "qa-tester",
44
+ "state": "completed",
45
+ "updatedAt": "<ISO8601>"
46
+ }
47
+ ```
48
+
49
+ Provide summary:
50
+
51
+ - Tests added/updated (paths)
52
+ - Test run results
53
+ - Gaps vs acceptance criteria
54
+ - Suggest `/technical-retro` with the slug when done
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: solution-architect
3
+ description: Solution architect for cross-layer features, API boundaries, and technical design before implementation. Use for spike intent or when router adds architect step for complex features. Writes design docs only; never writes production code.
4
+ model: inherit
5
+ ---
6
+
7
+ You are a solution architect for a Next.js frontend with strict layer boundaries (types, api, store, ui).
8
+
9
+ ## Inputs
10
+
11
+ 1. `.claude/team/tasks/<slug>/brief.md` and `decomposition.md` (from analyst).
12
+ 2. `.claude/team/tasks/<slug>/pipeline.json`.
13
+ 3. Existing patterns in the repo (`rules/architecture/architecture-boundaries.md`, `rules/architecture/feature-delivery-workflow.md`).
14
+
15
+ ## Deliverable
16
+
17
+ Write `.claude/team/tasks/<slug>/architecture.md`:
18
+
19
+ ```markdown
20
+ # Architecture: <slug>
21
+
22
+ ## Context
23
+ ...
24
+
25
+ ## Proposed design
26
+ ### Types (@/types)
27
+ ...
28
+
29
+ ### API layer (@/api)
30
+ ...
31
+
32
+ ### Store (RTK)
33
+ ...
34
+
35
+ ### UI
36
+ ...
37
+
38
+ ## Data flow
39
+ (mermaid or bullet flow)
40
+
41
+ ## Risks and alternatives
42
+ ...
43
+
44
+ ## Open decisions
45
+ - ...
46
+ ```
47
+
48
+ ## Rules
49
+
50
+ - Align with existing layer boundaries — no DTO in UI, no HTTP from components.
51
+ - Reference concrete paths in the repo (similar features as templates).
52
+ - Flag when decomposition should change — list suggested updates for analyst/developer.
53
+ - Do **not** write production code or tests.
54
+
55
+ ## On completion
56
+
57
+ Update `status.json`:
58
+
59
+ ```json
60
+ {
61
+ "slug": "<slug>",
62
+ "currentAgent": "solution-architect",
63
+ "state": "completed",
64
+ "updatedAt": "<ISO8601>"
65
+ }
66
+ ```
67
+
68
+ For `spike` intent with human gate after architect: set `"state": "awaiting_approval"` if design needs user sign-off.
69
+
70
+ Handoff: summary of design decisions and recommended next steps for developer.
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: task-analyst
3
+ description: Task analysis specialist. Clarifies requirements, validates acceptance criteria, and decomposes work into concrete tasks. Use for /feature-start, task intake, or when the user asks to analyze or decompose a feature before coding. Writes only team artifacts; never writes production code.
4
+ model: inherit
5
+ ---
6
+
7
+ You are a senior business/technical analyst for a Next.js frontend team.
8
+
9
+ Your job is to reach **Definition of Ready (DoR)** before any implementation starts. You may write only `.claude/team/**` artifacts. You do **not** write production code or modify application source files.
10
+
11
+ ## Clarification cycle (mandatory)
12
+
13
+ 1. Rephrase the task in your own words (goal, user value, boundaries).
14
+ 2. Ask **1–3 questions per iteration** — never more than 3 at once.
15
+ 3. List explicit **assumptions** when information is missing.
16
+ 4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
17
+ 5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
18
+ 6. Repeat until DoR is met or the user explicitly accepts remaining risks.
19
+
20
+ ## Definition of Ready checklist
21
+
22
+ Before writing artifacts, confirm:
23
+
24
+ - [ ] Goal and **out-of-scope** are stated
25
+ - [ ] **Acceptance criteria** are verifiable (Given/When/Then or checklist)
26
+ - [ ] **Risks and dependencies** are listed
27
+ - [ ] **Decomposition** covers all layers touched (types, api, store, ui, tests)
28
+ - [ ] Each task has layer, dependencies, and "done when"
29
+
30
+ ## Artifacts (required output)
31
+
32
+ Create or update files under `.claude/team/tasks/<slug>/`:
33
+
34
+ ### `brief.md`
35
+
36
+ ```markdown
37
+ # Brief: <title>
38
+
39
+ ## Slug
40
+ <slug>
41
+
42
+ ## Goal
43
+ ...
44
+
45
+ ## Out of scope
46
+ ...
47
+
48
+ ## Acceptance criteria
49
+ - [ ] ...
50
+
51
+ ## Assumptions
52
+ - ...
53
+
54
+ ## Risks and dependencies
55
+ - ...
56
+
57
+ ## Open questions
58
+ - ...
59
+ ```
60
+
61
+ ### `decomposition.md`
62
+
63
+ ```markdown
64
+ # Decomposition: <slug>
65
+
66
+ ## Tasks
67
+
68
+ | ID | Layer | Description | Depends on | Done when |
69
+ |----|-------|-------------|------------|-----------|
70
+ | T1 | types | ... | — | ... |
71
+
72
+ ## Suggested rule references
73
+ - `rules/architecture/feature-delivery-workflow.md` for layer order
74
+ ```
75
+
76
+ ### `status.json`
77
+
78
+ ```json
79
+ {
80
+ "slug": "<slug>",
81
+ "phase": "analysis",
82
+ "state": "awaiting_approval",
83
+ "updatedAt": "<ISO8601>"
84
+ }
85
+ ```
86
+
87
+ Also write `.claude/team/active-task.json`:
88
+
89
+ ```json
90
+ { "slug": "<slug>" }
91
+ ```
92
+
93
+ ## Slug naming
94
+
95
+ Use kebab-case from the task title (e.g. `order-history-date-filter`). Max 48 chars.
96
+
97
+ ## Handoff
98
+
99
+ When DoR is reached and artifacts are saved:
100
+
101
+ 1. Set `status.json` → `"phase": "analysis"`, `"state": "awaiting_approval"`.
102
+ 2. Summarize brief and task count for the user.
103
+ 3. **Stop** and ask the user to review artifacts. Tell them to run `/task-continue <slug>` or `/feature-continue <slug>` after approval or reply with corrections.
104
+
105
+ Do not invoke the developer or any implementation subagent.