@bonesofspring/ai-rules 0.2.3 → 0.2.4

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 (41) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +4 -3
  3. package/bin/cli.js +29 -3
  4. package/package.json +1 -1
  5. package/presets/claude/ios-swift/CLAUDE.md +1 -1
  6. package/presets/claude/ios-swift/MCP.md +14 -0
  7. package/presets/claude/ios-swift/README.md +2 -0
  8. package/presets/claude/ios-swift/agents/task-router.md +1 -1
  9. package/presets/claude/ios-swift/commands/feature-start.md +1 -1
  10. package/presets/claude/ios-swift/commands/task.md +1 -1
  11. package/presets/claude/ios-swift/mcp.json +12 -0
  12. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  13. package/presets/claude/next/CLAUDE.md +1 -1
  14. package/presets/claude/next/MCP.md +16 -0
  15. package/presets/claude/next/README.md +2 -0
  16. package/presets/claude/next/agents/task-router.md +1 -1
  17. package/presets/claude/next/commands/feature-start.md +1 -1
  18. package/presets/claude/next/commands/task.md +1 -1
  19. package/presets/claude/next/hooks/chain-team-phases.sh +2 -2
  20. package/presets/claude/next/mcp.json +20 -0
  21. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -1
  22. package/presets/cursor/ios-swift/AGENTS.md +1 -1
  23. package/presets/cursor/ios-swift/MCP.md +16 -0
  24. package/presets/cursor/ios-swift/README.md +1 -0
  25. package/presets/cursor/ios-swift/agents/task-router.md +1 -1
  26. package/presets/cursor/ios-swift/commands/feature-start.md +1 -1
  27. package/presets/cursor/ios-swift/commands/task.md +1 -1
  28. package/presets/cursor/ios-swift/mcp.json +11 -0
  29. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +6 -1
  30. package/presets/cursor/ios-swift/team/README.md +4 -0
  31. package/presets/cursor/next/AGENTS.md +1 -1
  32. package/presets/cursor/next/MCP.md +16 -0
  33. package/presets/cursor/next/agents/playwright-test-generator.md +1 -1
  34. package/presets/cursor/next/agents/playwright-test-healer.md +1 -1
  35. package/presets/cursor/next/agents/task-router.md +1 -1
  36. package/presets/cursor/next/commands/feature-start.md +1 -1
  37. package/presets/cursor/next/commands/task.md +1 -1
  38. package/presets/cursor/next/hooks/chain-team-phases.sh +2 -2
  39. package/presets/cursor/next/mcp.json +19 -0
  40. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +6 -0
  41. package/presets/cursor/next/team/README.md +4 -0
package/CHANGELOG.md CHANGED
@@ -9,12 +9,14 @@
9
9
 
10
10
  ### Added
11
11
 
12
+ - **MCP configs in presets** (`next` + `ios-swift`, Cursor + Claude): `mcp.json` + `MCP.md`. Cursor → `.cursor/mcp.json`; Claude → project-root `.mcp.json`. **next:** Context7, Playwright, Chrome DevTools, Figma (remote). **ios-swift:** Context7 + Figma. CLI `init`/`clean` manage these paths.
12
13
  - **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
14
  - **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
15
  - **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
 
16
17
  ### Changed
17
18
 
19
+ - **Agent team slug bootstrap:** `/task` and `/feature-start` (Cursor + Claude, `next` + `ios-swift`) create `.cursor|claude/team/tasks/<slug>/` via **Write**, not Shell `mkdir` — avoids Cursor sandbox `Operation not permitted` (esp. macOS Desktop/Documents). Orchestrator + `team/README` + `task-router` document the rule.
18
20
  - **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
21
  - Claude `next`: `agent-team-orchestrator` and `code-review-mr` use `paths:` (on-demand) — session-start matches the 3-rule budget above.
20
22
  - 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).
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 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.
3
+ Presets for Cursor and Claude Code: rules, commands, plus optional `agents`, `hooks`, `skills`, team artifacts, and MCP configs 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
 
@@ -30,8 +30,8 @@ If `.cursor` does not appear, check the command output for errors and confirm yo
30
30
 
31
31
  - `rules/`, `commands/`
32
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`
33
+ - Cursor root files: `hooks.json`, `BUGBOT.md`, `AGENTS.md`, `MCP.md`, `mcp.json`
34
+ - Claude: `CLAUDE.md`, `MCP.md` under `.claude/`; project `.mcp.json` at repo root
35
35
 
36
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.
37
37
 
@@ -45,6 +45,7 @@ Where things go on `init`:
45
45
  | hooks | `.cursor/hooks`, `.cursor/hooks.json` | `.claude/hooks` |
46
46
  | skills | `.cursor/skills` | `.claude/skills` |
47
47
  | team artifacts template | `.cursor/team` | `.claude/team` |
48
+ | MCP | `mcp.json` → `.cursor/mcp.json`, `MCP.md` → `.cursor/` | `mcp.json` → **`.mcp.json`** (project root), `MCP.md` → `.claude/` |
48
49
  | other | `BUGBOT.md`, `AGENTS.md` → `.cursor/` | `CLAUDE.md` → `.claude/CLAUDE.md` |
49
50
 
50
51
  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 `..`.
package/bin/cli.js CHANGED
@@ -17,7 +17,10 @@ const PRESETS = {
17
17
  relBase: ['presets', 'cursor'],
18
18
  optionalCursorDirs: ['agents', 'hooks', 'skills', 'team'],
19
19
  hooksJsonSrc: 'hooks.json',
20
- toolRootFiles: ['BUGBOT.md', 'AGENTS.md'],
20
+ /** Project MCP → `.cursor/mcp.json` */
21
+ mcpJsonSrc: 'mcp.json',
22
+ mcpJsonDest: '.cursor/mcp.json',
23
+ toolRootFiles: ['BUGBOT.md', 'AGENTS.md', 'MCP.md'],
21
24
  },
22
25
  claude: {
23
26
  rulesDir: '.claude/rules',
@@ -25,6 +28,10 @@ const PRESETS = {
25
28
  relBase: ['presets', 'claude'],
26
29
  optionalClaudeDirs: ['skills', 'agents', 'hooks', 'team'],
27
30
  claudeMdSrc: 'CLAUDE.md',
31
+ /** Project MCP lives at repo root (Claude Code project scope), not under `.claude/`. */
32
+ mcpJsonSrc: 'mcp.json',
33
+ mcpJsonDest: '.mcp.json',
34
+ toolRootFiles: ['MCP.md'],
28
35
  },
29
36
  };
30
37
 
@@ -50,8 +57,8 @@ Options:
50
57
 
51
58
  Notes:
52
59
  init merges into the target directory; same-named files are overwritten.
53
- Cursor init copies rules, commands, agents, hooks, skills, team, hooks.json, BUGBOT.md, AGENTS.md.
54
- Claude init copies rules, commands, skills, agents, hooks, team, and CLAUDE.md when present.
60
+ Cursor init copies rules, commands, agents, hooks, skills, team, hooks.json, BUGBOT.md, AGENTS.md, MCP.md, mcp.json → .cursor/mcp.json.
61
+ Claude init copies rules, commands, skills, agents, hooks, team, CLAUDE.md, MCP.md, and mcp.json → .mcp.json (project root).
55
62
  Command forms: "init cursor --preset next", "init cursor next", "--preset next init cursor", "cursor init --preset next".
56
63
 
57
64
  Examples:
@@ -238,6 +245,9 @@ function presetHasAnySource(base, cfg) {
238
245
  if (cfg.hooksJsonSrc && fs.existsSync(path.join(base, cfg.hooksJsonSrc))) {
239
246
  return true;
240
247
  }
248
+ if (cfg.mcpJsonSrc && fs.existsSync(path.join(base, cfg.mcpJsonSrc))) {
249
+ return true;
250
+ }
241
251
  for (const name of cfg.toolRootFiles || []) {
242
252
  if (fs.existsSync(path.join(base, name))) {
243
253
  return true;
@@ -355,6 +365,17 @@ function cmdInit(tool, preset, cwdOption) {
355
365
  }
356
366
  }
357
367
 
368
+ if (cfg.mcpJsonSrc && cfg.mcpJsonDest) {
369
+ const mcpFrom = path.join(base, cfg.mcpJsonSrc);
370
+ if (fs.existsSync(mcpFrom)) {
371
+ const mcpDestAbs = path.join(cwd, cfg.mcpJsonDest);
372
+ fs.mkdirSync(path.dirname(mcpDestAbs), { recursive: true });
373
+ fs.copyFileSync(mcpFrom, mcpDestAbs);
374
+ console.log(`Copied ${cfg.mcpJsonSrc} → ${cfg.mcpJsonDest}`);
375
+ copiedSteps++;
376
+ }
377
+ }
378
+
358
379
  for (const name of cfg.toolRootFiles || []) {
359
380
  const from = path.join(base, name);
360
381
  if (fs.existsSync(from)) {
@@ -411,6 +432,11 @@ function cmdClean(tool, cwdOption) {
411
432
  removedParts.push(`${toolRoot}/hooks.json`);
412
433
  }
413
434
 
435
+ if (cfg.mcpJsonDest) {
436
+ removeFileIfExists(path.join(cwd, cfg.mcpJsonDest));
437
+ removedParts.push(cfg.mcpJsonDest);
438
+ }
439
+
414
440
  for (const name of cfg.toolRootFiles || []) {
415
441
  removeFileIfExists(path.join(cwd, toolRoot, name));
416
442
  removedParts.push(`${toolRoot}/${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonesofspring/ai-rules",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Presets of Cursor and Claude rules/commands for Revy Ross personal use",
5
5
  "license": "MIT",
6
6
  "author": "Revy Ross",
@@ -32,4 +32,4 @@ See @rules/README.md for mapping and loading strategy.
32
32
  npx @bonesofspring/ai-rules init claude --preset ios-swift
33
33
  ```
34
34
 
35
- Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `skills/**`, `hooks/**`, `team/**`.
35
+ Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `skills/**`, `hooks/**`, `team/**`, `MCP.md` в `.claude/`, плюс `mcp.json` → **`.mcp.json`** в корне.
@@ -0,0 +1,14 @@
1
+ # MCP (preset `ios-swift`, Claude Code)
2
+
3
+ Копируется в **корень проекта** как `.mcp.json` при `ai-rules init claude --preset ios-swift`.
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Зачем |
8
+ |------|---------|--------|
9
+ | `context7` | `@upstash/context7-mcp` | Актуальная документация Swift / SwiftUI / Apple frameworks |
10
+ | `figma` | remote `https://mcp.figma.com/mcp` | Design context → SwiftUI; OAuth при первом подключении |
11
+
12
+ Playwright / Chrome DevTools не входят в ios-пресет.
13
+
14
+ Секреты не коммитим. Опционально: `CONTEXT7_API_KEY`. Figma — OAuth. Approve project MCP через `/mcp`.
@@ -13,6 +13,8 @@
13
13
  | `agents/**` | `.claude/agents/**` (**21**, XCUITest trio) |
14
14
  | `hooks/**` | `.claude/hooks/**` (scripts + README; **нет** `hooks.json`) |
15
15
  | `team/**` | `.claude/team/**` |
16
+ | `mcp.json` | **`.mcp.json`** в корне (Context7 + Figma) |
17
+ | `MCP.md` | `.claude/MCP.md` |
16
18
 
17
19
  ```bash
18
20
  npx @bonesofspring/ai-rules init claude --preset ios-swift
@@ -55,7 +55,7 @@ Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard
55
55
 
56
56
  ## Output
57
57
 
58
- Write `.claude/team/tasks/<slug>/pipeline.json` and initial `status.json`; set `.claude/team/active-task.json`.
58
+ Write `.claude/team/tasks/<slug>/pipeline.json` and initial `status.json` (write files; do not Shell-`mkdir` alone); set `.claude/team/active-task.json`.
59
59
 
60
60
  ## Handoff
61
61
 
@@ -11,7 +11,7 @@ description: Legacy analyst-only feature intake. Prefer /task for new work becau
11
11
 
12
12
  1. Извлеки описание задачи из аргументов команды (всё после `/feature-start`).
13
13
  2. Сгенерируй **slug** (kebab-case, до 48 символов) из заголовка задачи.
14
- 3. Создай каталог `.claude/team/tasks/<slug>/` если его ещё нет.
14
+ 3. Создай `.claude/team/tasks/<slug>/` если его ещё нет — через запись файла (Write / Edit), не через Shell `mkdir`.
15
15
  4. Запиши `.claude/team/active-task.json` → `{ "slug": "<slug>" }`.
16
16
  5. Вызови subagent **task-analyst** с полным описанием задачи и путём к артефактам.
17
17
  6. Дождись завершения аналитика. **Не вызывай developer** на этом этапе.
@@ -25,7 +25,7 @@ description: Route a natural-language task through the agent-team pipeline: task
25
25
 
26
26
  ## Алгоритм
27
27
 
28
- 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/`.
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit) — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
29
29
  2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
30
  3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
31
  4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": ["-y", "@upstash/context7-mcp"]
6
+ },
7
+ "figma": {
8
+ "type": "http",
9
+ "url": "https://mcp.figma.com/mcp"
10
+ }
11
+ }
12
+ }
@@ -38,7 +38,7 @@ Full prompts: `.claude/agents/*.md`. Artifacts: `.claude/team/README.md`.
38
38
  2. Read `pipeline.json` before every subagent invocation.
39
39
  3. One role per invocation — except parallel steps.
40
40
  4. **Never** skip `humanGates` without continue/approval.
41
- 5. Persist handoffs under `.claude/team/tasks/<slug>/`.
41
+ 5. Persist handoffs under `.claude/team/tasks/<slug>/` by writing files (not Shell-only `mkdir`).
42
42
  6. On `validation_failed`: developer → build-verifier.
43
43
  7. When complete, suggest `/technical-retro <slug>`.
44
44
 
@@ -32,4 +32,4 @@ See @rules/README.md for the full catalog and loading strategy.
32
32
  npx @bonesofspring/ai-rules init claude --preset next
33
33
  ```
34
34
 
35
- Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**` и др. в `.claude/` целевого репозитория.
35
+ Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**`, `MCP.md` в `.claude/`, плюс `mcp.json` → **`.mcp.json`** в корне проекта.
@@ -0,0 +1,16 @@
1
+ # MCP (preset `next`, Claude Code)
2
+
3
+ Копируется в **корень проекта** как `.mcp.json` при `ai-rules init claude --preset next` (не в `.claude/` — так устроен project scope Claude Code).
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Зачем |
8
+ |------|---------|--------|
9
+ | `context7` | `@upstash/context7-mcp` | Актуальная документация Next/React/TS |
10
+ | `playwright-test` | `@playwright/mcp` | Browser MCP; имя сервера совпадает с `mcp__playwright-test__*` в agents |
11
+ | `chrome-devtools` | `chrome-devtools-mcp` | Live DOM/network/performance |
12
+ | `figma` | remote `https://mcp.figma.com/mcp` | Design context → код; OAuth при первом подключении |
13
+
14
+ Секреты не коммитим. Опционально: `CONTEXT7_API_KEY`. Figma — OAuth (токен в файл не пишем). После clone/init Claude Code попросит approve project MCP (`/mcp`).
15
+
16
+ Для полного Playwright Test Agents loop (`planner_*` / `generator_*` / `test_*`) дополнительно: `npx playwright init-agents --loop=claude` в приложении с `@playwright/test`.
@@ -11,6 +11,8 @@
11
11
  | `agents/**` | `.claude/agents/**` (если папка есть) |
12
12
  | `hooks/**` | `.claude/hooks/**` (если папка есть) |
13
13
  | `team/**` | `.claude/team/**` (шаблон артефактов agent team) |
14
+ | `mcp.json` | **`.mcp.json`** в корне проекта (Claude project MCP) |
15
+ | `MCP.md` | `.claude/MCP.md` |
14
16
 
15
17
  Файлы правил — обычный Markdown с опциональным YAML frontmatter (`paths:` для скоупа по путям), не формат `.mdc` Cursor.
16
18
 
@@ -81,7 +81,7 @@ Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard
81
81
 
82
82
  ## Output
83
83
 
84
- Write `.claude/team/tasks/<slug>/pipeline.json` and initial `status.json`; set `.claude/team/active-task.json` → `{ "slug": "<slug>" }`. Minimal template — см. **`agents/README.md`**.
84
+ Write `.claude/team/tasks/<slug>/pipeline.json` and initial `status.json` (write files; do not Shell-`mkdir` alone); set `.claude/team/active-task.json` → `{ "slug": "<slug>" }`. Minimal template — см. **`agents/README.md`**.
85
85
 
86
86
  ## Handoff to orchestrator
87
87
 
@@ -11,7 +11,7 @@ description: Legacy analyst-only feature intake. Prefer /task for new work becau
11
11
 
12
12
  1. Извлеки описание задачи из аргументов команды (всё после `/feature-start`).
13
13
  2. Сгенерируй **slug** (kebab-case, до 48 символов) из заголовка задачи.
14
- 3. Создай каталог `.claude/team/tasks/<slug>/` если его ещё нет.
14
+ 3. Создай `.claude/team/tasks/<slug>/` если его ещё нет — через запись файла (Write / Edit), не через Shell `mkdir`.
15
15
  4. Запиши `.claude/team/active-task.json` → `{ "slug": "<slug>" }`.
16
16
  5. Вызови subagent **task-analyst** с полным описанием задачи и путём к артефактам.
17
17
  6. Дождись завершения аналитика. **Не вызывай developer** на этом этапе.
@@ -25,7 +25,7 @@ description: Route a natural-language task through the agent-team pipeline: task
25
25
 
26
26
  ## Алгоритм
27
27
 
28
- 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/`.
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit) — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
29
29
  2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
30
  3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
31
  4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
@@ -157,10 +157,10 @@ const AGENT_HANDOFF = {
157
157
  `Follow testing/playwright-agents.md and the playwright-e2e skill. Update status.json when done.`,
158
158
  'playwright-test-generator': (s) =>
159
159
  `Invoke playwright-test-generator for slug "${s}". Generate/update *.spec.ts from matching *.cases.md. ` +
160
- `Use user-playwright MCP when available. Follow testing/playwright-agents.md and the playwright-e2e skill. Update status.json when done.`,
160
+ `Use playwright MCP when available. Follow testing/playwright-agents.md and the playwright-e2e skill. Update status.json when done.`,
161
161
  'playwright-test-healer': (s) =>
162
162
  `Invoke playwright-test-healer for slug "${s}". Fix failing/flaky e2e while preserving cases.md assertions. ` +
163
- `Use user-playwright MCP when available. Follow testing/playwright-agents.md and debug-investigation. Update status.json when done.`,
163
+ `Use playwright MCP when available. Follow testing/playwright-agents.md and debug-investigation. Update status.json when done.`,
164
164
  'tech-writer': (s) =>
165
165
  `Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Update status.json when done.`,
166
166
  };
@@ -0,0 +1,20 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": ["-y", "@upstash/context7-mcp"]
6
+ },
7
+ "playwright-test": {
8
+ "command": "npx",
9
+ "args": ["-y", "@playwright/mcp@latest"]
10
+ },
11
+ "chrome-devtools": {
12
+ "command": "npx",
13
+ "args": ["-y", "chrome-devtools-mcp@latest"]
14
+ },
15
+ "figma": {
16
+ "type": "http",
17
+ "url": "https://mcp.figma.com/mcp"
18
+ }
19
+ }
20
+ }
@@ -109,12 +109,16 @@ flowchart TD
109
109
  2. Read `pipeline.json` before every subagent invocation.
110
110
  3. One role per subagent call — **except** parallel steps.
111
111
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
112
- 5. Persist handoffs including `validation-report.md`.
112
+ 5. Persist handoffs including `validation-report.md` (write files; do not rely on Shell `mkdir` alone).
113
113
  6. On `changes_requested`: hook sets `retryAfterFix` → developer → same reviewer.
114
114
  7. On `validation_failed`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
115
115
  8. When all steps complete, suggest `/technical-retro <slug>`.
116
116
  9. If `autoChain: false`, manual step only.
117
117
 
118
+ ## Team artifact I/O
119
+
120
+ Create `.claude/team/tasks/<slug>/**` by writing files (Write/Edit). Avoid Shell-only `mkdir` as the bootstrap step.
121
+
118
122
  ## Invoking agents
119
123
 
120
124
  Use the available Claude Code subagent mechanism. Pass: slug, artifact paths, step `scope` if set.
@@ -44,4 +44,4 @@ Intent detection, profiles (`full` / `standard` / `light`), and default steps
44
44
  npx @bonesofspring/ai-rules init cursor --preset ios-swift
45
45
  ```
46
46
 
47
- Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`.
47
+ Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`.
@@ -0,0 +1,16 @@
1
+ # MCP (preset `ios-swift`, Cursor)
2
+
3
+ Копируется в `.cursor/mcp.json` при `ai-rules init cursor --preset ios-swift`.
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Зачем |
8
+ |------|---------|--------|
9
+ | `context7` | `@upstash/context7-mcp` | Актуальная документация Swift / SwiftUI / Apple frameworks |
10
+ | `figma` | remote `https://mcp.figma.com/mcp` | Design context → SwiftUI; OAuth в Cursor |
11
+
12
+ Playwright / Chrome DevTools **не** входят в ios-пресет (browser e2e запрещены agent team).
13
+
14
+ Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении. Figma — OAuth (токен не коммитим).
15
+
16
+ После init: Settings → MCP → включить серверы. `init` перезаписывает одноимённый `mcp.json`.
@@ -20,6 +20,7 @@ npx @bonesofspring/ai-rules init cursor --preset ios-swift
20
20
  | `commands/**` | task, task-continue, feature-start/continue, technical-retro |
21
21
  | `hooks.json` + `hooks/**` | guard-shell + chain-team-phases |
22
22
  | `team/**` | fixtures + README |
23
+ | `mcp.json` + `MCP.md` | Context7 + Figma MCP → `.cursor/mcp.json` |
23
24
 
24
25
  ## alwaysApply (≤3)
25
26
 
@@ -55,7 +55,7 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
55
55
 
56
56
  ## Output
57
57
 
58
- Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json`; set `.cursor/team/active-task.json`.
58
+ Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json` via the **Write** tool (creates parents; do not Shell-`mkdir`); set `.cursor/team/active-task.json`.
59
59
 
60
60
  ## Handoff
61
61
 
@@ -13,7 +13,7 @@ description: Legacy analyst-only feature intake. Prefer /task for new work becau
13
13
 
14
14
  1. Извлеки описание задачи из аргументов команды (всё после `/feature-start`).
15
15
  2. Сгенерируй **slug** (kebab-case, до 48 символов) из заголовка задачи.
16
- 3. Создай каталог `.cursor/team/tasks/<slug>/` если его ещё нет.
16
+ 3. Создай `.cursor/team/tasks/<slug>/` если его ещё нет — через **Write** артефакта (не Shell `mkdir`).
17
17
  4. Запиши `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`.
18
18
  5. Опционально: минимальный `pipeline.json` с фиксированными steps (analyst → developer → reviewer → qa-tester).
19
19
  6. Вызови subagent **task-analyst** (Task tool) с полным описанием задачи и путём к артефактам.
@@ -25,7 +25,7 @@ description: Route a natural-language task through the agent-team pipeline: task
25
25
 
26
26
  ## Алгоритм
27
27
 
28
- 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/`.
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/` через **Write** (например сразу `status.json` или пустой placeholder) — **не** через Shell `mkdir` (песочница → `Operation not permitted`).
29
29
  2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
30
  3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
31
  4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": ["-y", "@upstash/context7-mcp"]
6
+ },
7
+ "figma": {
8
+ "url": "https://mcp.figma.com/mcp"
9
+ }
10
+ }
11
+ }
@@ -67,12 +67,17 @@ Full prompts: `.cursor/agents/*.md`. Artifacts: `.cursor/team/README.md`.
67
67
  2. Read `pipeline.json` before every subagent invocation.
68
68
  3. One role per Task call — except parallel steps.
69
69
  4. **Never** skip `humanGates` without `/task-continue` or explicit approval.
70
- 5. Persist handoffs to disk under `.cursor/team/tasks/<slug>/`.
70
+ 5. Persist handoffs to disk under `.cursor/team/tasks/<slug>/` via **Write** (not Shell `mkdir`).
71
71
  6. On `changes_requested`: developer → same reviewer.
72
72
  7. On `validation_failed`: developer → build-verifier.
73
73
  8. When all steps complete, suggest `/technical-retro <slug>`.
74
74
  9. If `autoChain: false`, do not rely on hook.
75
75
 
76
+ ## Team artifact I/O (Cursor Shell sandbox)
77
+
78
+ - Create/update `.cursor/team/tasks/<slug>/**` with the **Write** tool. Do **not** bootstrap slug dirs with Shell `mkdir -p` — sandbox → `Operation not permitted` (esp. macOS Desktop/Documents + TCC).
79
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`.
80
+
76
81
  ## Skip pipeline when
77
82
 
78
83
  - Pure questions; typo / one-file trivial fix; user «без pipeline»; single-line docs-only.
@@ -25,3 +25,7 @@
25
25
  | `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
26
26
 
27
27
  **Never** schedule Playwright-only steps without skip rationale. Use `xcuitest-test-*` for UI-test-only intents.
28
+
29
+ ## Creating task dirs
30
+
31
+ Bootstrap `tasks/<slug>/` by **writing** artifacts (Write tool), not Shell `mkdir`. Cursor sandbox → `Operation not permitted` otherwise (worse on Desktop/Documents).
@@ -33,4 +33,4 @@ Intent detection, profiles (`full` / `standard` / `light`), and default steps
33
33
  npx @bonesofspring/ai-rules init cursor --preset next
34
34
  ```
35
35
 
36
- Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`.
36
+ Копирует rules, commands, agents, hooks, skills, team, `hooks.json`, `BUGBOT.md`, `AGENTS.md`, `MCP.md`, `mcp.json` → `.cursor/mcp.json`.
@@ -0,0 +1,16 @@
1
+ # MCP (preset `next`, Cursor)
2
+
3
+ Копируется в `.cursor/mcp.json` при `ai-rules init cursor --preset next`.
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Зачем |
8
+ |------|---------|--------|
9
+ | `context7` | `@upstash/context7-mcp` | Актуальная документация Next/React/TS и библиотек (меньше устаревших API в ответах агента) |
10
+ | `playwright` | `@playwright/mcp` | Browser automation для e2e агентов (`playwright-test-*`) и проверки селекторов |
11
+ | `chrome-devtools` | `chrome-devtools-mcp` | Live DOM/network/performance при отладке UI |
12
+ | `figma` | remote `https://mcp.figma.com/mcp` | Design context → код (макеты, токены, Code Connect); OAuth в Cursor |
13
+
14
+ Секреты в файл не кладём. Опционально: `CONTEXT7_API_KEY` в окружении — выше rate limits у Context7. Figma — OAuth при первом подключении (токен в конфиг не пишем).
15
+
16
+ После init: Settings → MCP → включить серверы (или перезапустить Cursor). Локально можно дополнять/переопределять; `init` перезаписывает одноимённый `mcp.json`.
@@ -19,7 +19,7 @@ You generate Playwright tests from project test plans.
19
19
  2. Write specs under `app/__tests__/e2e/**`, next to the plan.
20
20
  3. Match `test.describe` and `test(...)` names to the plan sections and scenario names.
21
21
  4. Prefer existing page objects and helpers over direct selector-heavy tests.
22
- 5. **Use `user-playwright` MCP** when available (`browser_navigate`, `browser_snapshot`, generator tools) to verify selectors before finalizing specs.
22
+ 5. **Use `playwright` MCP** when available (`browser_navigate`, `browser_snapshot`, generator tools; may appear as `user-playwright` if installed globally) to verify selectors before finalizing specs.
23
23
  6. Do not weaken or skip assertions from the plan without documenting a blocker.
24
24
 
25
25
  ## Completion
@@ -18,7 +18,7 @@ You debug and fix failing Playwright e2e tests.
18
18
  1. Follow **`playwright-agents.mdc`**, **`tests-e2e-structure.mdc`**, and the **`debug-investigation`** and **`playwright-e2e`** skills.
19
19
  2. Treat `*.cases.md` as the behavior contract.
20
20
  3. Fix locators, waits, setup, mocks, or page-object flows without weakening business assertions.
21
- 4. **Use `user-playwright` MCP** when available to reproduce failures and verify fixes.
21
+ 4. **Use `playwright` MCP** when available (or `user-playwright` if installed globally) to reproduce failures and verify fixes.
22
22
  5. Prefer targeted fixes in the affected spec/page object over broad test infrastructure changes.
23
23
  6. Re-run the affected spec when feasible.
24
24
 
@@ -82,7 +82,7 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
82
82
 
83
83
  ## Output
84
84
 
85
- Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json`; set `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`. Minimal template — см. **`agents/README.md`**.
85
+ Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json` via the **Write** tool (creates parents; do not Shell-`mkdir`); set `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`. Minimal template — см. **`agents/README.md`**.
86
86
 
87
87
  ## Handoff to orchestrator
88
88
 
@@ -13,7 +13,7 @@ description: Legacy analyst-only feature intake. Prefer /task for new work becau
13
13
 
14
14
  1. Извлеки описание задачи из аргументов команды (всё после `/feature-start`).
15
15
  2. Сгенерируй **slug** (kebab-case, до 48 символов) из заголовка задачи.
16
- 3. Создай каталог `.cursor/team/tasks/<slug>/` если его ещё нет.
16
+ 3. Создай `.cursor/team/tasks/<slug>/` если его ещё нет — через **Write** артефакта (не Shell `mkdir`).
17
17
  4. Запиши `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`.
18
18
  5. Опционально: минимальный `pipeline.json` с фиксированными steps (analyst → developer → reviewer → qa-tester).
19
19
  6. Вызови subagent **task-analyst** (Task tool) с полным описанием задачи и путём к артефактам.
@@ -25,7 +25,7 @@ description: Route a natural-language task through the agent-team pipeline: task
25
25
 
26
26
  ## Алгоритм
27
27
 
28
- 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/`.
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/` через **Write** (например сразу `status.json` или пустой placeholder) — **не** через Shell `mkdir` (песочница → `Operation not permitted`).
29
29
  2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
30
  3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
31
  4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
@@ -157,10 +157,10 @@ const AGENT_HANDOFF = {
157
157
  `Follow playwright-agents.mdc and the playwright-e2e skill. Update status.json when done.`,
158
158
  'playwright-test-generator': (s) =>
159
159
  `Invoke playwright-test-generator for slug "${s}". Generate/update *.spec.ts from matching *.cases.md. ` +
160
- `Use user-playwright MCP when available. Follow playwright-agents.mdc and the playwright-e2e skill. Update status.json when done.`,
160
+ `Use playwright MCP when available. Follow playwright-agents.mdc and the playwright-e2e skill. Update status.json when done.`,
161
161
  'playwright-test-healer': (s) =>
162
162
  `Invoke playwright-test-healer for slug "${s}". Fix failing/flaky e2e while preserving cases.md assertions. ` +
163
- `Use user-playwright MCP when available. Follow playwright-agents.mdc and debug-investigation. Update status.json when done.`,
163
+ `Use playwright MCP when available. Follow playwright-agents.mdc and debug-investigation. Update status.json when done.`,
164
164
  'tech-writer': (s) =>
165
165
  `Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Update status.json when done.`,
166
166
  };
@@ -0,0 +1,19 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": ["-y", "@upstash/context7-mcp"]
6
+ },
7
+ "playwright": {
8
+ "command": "npx",
9
+ "args": ["-y", "@playwright/mcp@latest"]
10
+ },
11
+ "chrome-devtools": {
12
+ "command": "npx",
13
+ "args": ["-y", "chrome-devtools-mcp@latest"]
14
+ },
15
+ "figma": {
16
+ "url": "https://mcp.figma.com/mcp"
17
+ }
18
+ }
19
+ }
@@ -115,6 +115,12 @@ flowchart TD
115
115
  8. When all steps complete, suggest `/technical-retro <slug>`.
116
116
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
117
117
 
118
+ ## Team artifact I/O (Cursor Shell sandbox)
119
+
120
+ - Create/update `.cursor/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
121
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
122
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
123
+
118
124
  ## Invoking agents
119
125
 
120
126
  Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
@@ -100,6 +100,10 @@ Prefer **`executing`** for pipeline mode. Legacy: `analysis`, `development`, `re
100
100
 
101
101
  Legacy: `/feature-start`, `/feature-continue`.
102
102
 
103
+ ## Creating task dirs
104
+
105
+ Bootstrap `<slug>/` by **writing** `pipeline.json` / `status.json` (Write tool). Do **not** use Shell `mkdir -p` — Cursor’s default sandbox returns `Operation not permitted` (especially for repos on macOS Desktop/Documents).
106
+
103
107
  ## Git
104
108
 
105
109
  Commit task artifacts if you want them to survive `ai-rules clean cursor`. Or copy finished tasks to `docs/agent-workflow/tasks/<slug>/`.