@bonesofspring/ai-rules 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -3
- package/bin/cli.js +29 -3
- package/package.json +1 -1
- package/presets/claude/ios-swift/CLAUDE.md +1 -1
- package/presets/claude/ios-swift/MCP.md +14 -0
- package/presets/claude/ios-swift/README.md +2 -0
- package/presets/claude/ios-swift/agents/README.md +16 -2
- package/presets/claude/ios-swift/agents/migration-specialist.md +1 -1
- package/presets/claude/ios-swift/agents/performance-auditor.md +1 -1
- package/presets/claude/ios-swift/agents/security-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/solution-architect.md +1 -1
- package/presets/claude/ios-swift/agents/task-router.md +10 -1
- package/presets/claude/ios-swift/commands/feature-start.md +1 -1
- package/presets/claude/ios-swift/commands/task.md +1 -1
- package/presets/claude/ios-swift/mcp.json +12 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +9 -1
- package/presets/claude/ios-swift/team/fixtures/feature-full.json +8 -25
- package/presets/claude/ios-swift/team/fixtures/feature-light.json +5 -20
- package/presets/claude/next/CLAUDE.md +1 -1
- package/presets/claude/next/MCP.md +16 -0
- package/presets/claude/next/README.md +2 -0
- package/presets/claude/next/agents/README.md +38 -4
- package/presets/claude/next/agents/migration-specialist.md +1 -1
- package/presets/claude/next/agents/performance-auditor.md +1 -1
- package/presets/claude/next/agents/security-reviewer.md +1 -1
- package/presets/claude/next/agents/solution-architect.md +1 -1
- package/presets/claude/next/agents/task-router.md +16 -2
- package/presets/claude/next/commands/feature-start.md +1 -1
- package/presets/claude/next/commands/task.md +1 -1
- package/presets/claude/next/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/next/mcp.json +20 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +16 -2
- package/presets/claude/next/team/fixtures/feature-full.json +4 -2
- package/presets/claude/next/team/fixtures/feature-light.json +2 -2
- package/presets/cursor/ios-swift/AGENTS.md +1 -1
- package/presets/cursor/ios-swift/MCP.md +16 -0
- package/presets/cursor/ios-swift/README.md +1 -0
- package/presets/cursor/ios-swift/agents/README.md +16 -2
- package/presets/cursor/ios-swift/agents/migration-specialist.md +1 -1
- package/presets/cursor/ios-swift/agents/performance-auditor.md +1 -1
- package/presets/cursor/ios-swift/agents/security-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/solution-architect.md +1 -1
- package/presets/cursor/ios-swift/agents/task-router.md +10 -1
- package/presets/cursor/ios-swift/commands/feature-start.md +1 -1
- package/presets/cursor/ios-swift/commands/task.md +1 -1
- package/presets/cursor/ios-swift/mcp.json +11 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +14 -1
- package/presets/cursor/ios-swift/team/README.md +4 -0
- package/presets/cursor/ios-swift/team/fixtures/feature-full.json +8 -25
- package/presets/cursor/ios-swift/team/fixtures/feature-light.json +6 -25
- package/presets/cursor/next/AGENTS.md +1 -1
- package/presets/cursor/next/MCP.md +16 -0
- package/presets/cursor/next/agents/README.md +39 -4
- package/presets/cursor/next/agents/migration-specialist.md +1 -1
- package/presets/cursor/next/agents/performance-auditor.md +1 -1
- package/presets/cursor/next/agents/playwright-test-generator.md +1 -1
- package/presets/cursor/next/agents/playwright-test-healer.md +1 -1
- package/presets/cursor/next/agents/security-reviewer.md +1 -1
- package/presets/cursor/next/agents/solution-architect.md +1 -1
- package/presets/cursor/next/agents/task-router.md +16 -2
- package/presets/cursor/next/commands/feature-start.md +1 -1
- package/presets/cursor/next/commands/task.md +1 -1
- package/presets/cursor/next/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/next/mcp.json +19 -0
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +16 -0
- package/presets/cursor/next/team/README.md +4 -0
- package/presets/cursor/next/team/fixtures/feature-full.json +4 -2
- package/presets/cursor/next/team/fixtures/feature-light.json +2 -2
|
@@ -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
|
+
}
|
|
@@ -102,6 +102,7 @@ flowchart TD
|
|
|
102
102
|
| `skipIf` | `debugger.fixed` / `ci-investigator.resolved` |
|
|
103
103
|
| `parallel: true` | `agent` array — invoke all in one parent turn |
|
|
104
104
|
| `scope` | e.g. `unit-in-dev`, `e2e-only` |
|
|
105
|
+
| `model` | `cheap` \| `standard` \| `strong` — optional tier override |
|
|
105
106
|
|
|
106
107
|
## Rules (strict)
|
|
107
108
|
|
|
@@ -109,15 +110,28 @@ flowchart TD
|
|
|
109
110
|
2. Read `pipeline.json` before every subagent invocation.
|
|
110
111
|
3. One role per subagent call — **except** parallel steps.
|
|
111
112
|
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
112
|
-
5. Persist handoffs including `validation-report.md
|
|
113
|
+
5. Persist handoffs including `validation-report.md` (write files; do not rely on Shell `mkdir` alone).
|
|
113
114
|
6. On `changes_requested`: hook sets `retryAfterFix` → developer → same reviewer.
|
|
114
115
|
7. On `validation_failed`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
115
116
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
116
117
|
9. If `autoChain: false`, manual step only.
|
|
117
118
|
|
|
119
|
+
## Team artifact I/O
|
|
120
|
+
|
|
121
|
+
Create `.claude/team/tasks/<slug>/**` by writing files (Write/Edit). Avoid Shell-only `mkdir` as the bootstrap step.
|
|
122
|
+
|
|
118
123
|
## Invoking agents
|
|
119
124
|
|
|
120
|
-
Use the available Claude Code subagent
|
|
125
|
+
Use the available Claude Code subagent / Agent tool. Pass: slug, artifact paths, step `scope` if set.
|
|
126
|
+
|
|
127
|
+
### Model when invoking
|
|
128
|
+
|
|
129
|
+
1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
|
|
130
|
+
2. Map abstract tiers for the Agent tool `model` param:
|
|
131
|
+
- **`cheap`** → `haiku` (or rely on frontmatter `fast`).
|
|
132
|
+
- **`standard`** → omit / `sonnet` / inherit.
|
|
133
|
+
- **`strong`** → `opus` (matches strong-agent frontmatter). Prefer explicit per-invocation `model` when frontmatter pins are flaky.
|
|
134
|
+
3. Parallel steps: apply the step-level `model` to each agent (or omit → each frontmatter).
|
|
121
135
|
|
|
122
136
|
After each agent completes, ensure `status.json` has `state: completed` (or `awaiting_approval` if gate applies).
|
|
123
137
|
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
"summary": "Multi-layer feature with e2e coverage",
|
|
6
6
|
"steps": [
|
|
7
7
|
{ "agent": "task-analyst", "label": "Clarify and decompose" },
|
|
8
|
+
{ "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
|
|
8
9
|
{ "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
|
|
9
|
-
{ "agent": "build-verifier", "label": "Validation gate" },
|
|
10
|
-
{ "agent": "
|
|
10
|
+
{ "agent": "build-verifier", "label": "Validation gate", "model": "cheap" },
|
|
11
|
+
{ "agent": "security-reviewer", "label": "Security review", "model": "strong" },
|
|
12
|
+
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" },
|
|
11
13
|
{ "agent": "qa-tester", "label": "E2E", "scope": "e2e-only" }
|
|
12
14
|
],
|
|
13
15
|
"humanGates": ["after:task-analyst"],
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"profile": "light",
|
|
5
5
|
"summary": "Trivial single-file change with explicit AC",
|
|
6
6
|
"steps": [
|
|
7
|
-
{ "agent": "feature-developer", "label": "Implement" },
|
|
8
|
-
{ "agent": "build-verifier", "label": "Validation gate" }
|
|
7
|
+
{ "agent": "feature-developer", "label": "Implement", "model": "cheap" },
|
|
8
|
+
{ "agent": "build-verifier", "label": "Validation gate", "model": "cheap" }
|
|
9
9
|
],
|
|
10
10
|
"humanGates": [],
|
|
11
11
|
"autoChain": true,
|
|
@@ -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
|
|
|
@@ -29,6 +29,18 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
|
|
|
29
29
|
|
|
30
30
|
Все agents — **`readonly: false`** (нужна запись в `.cursor/team/**`). Ограничения production — в теле промпта.
|
|
31
31
|
|
|
32
|
+
## Model matrix (frontmatter `model`)
|
|
33
|
+
|
|
34
|
+
Same tiers as **cursor/next** (see that README for full notes). Defaults in this preset:
|
|
35
|
+
|
|
36
|
+
| Tier | Frontmatter | Agents |
|
|
37
|
+
|------|-------------|--------|
|
|
38
|
+
| **cheap** | `fast` | router, analyst, build-verifier, code-reviewer, tech-writer |
|
|
39
|
+
| **standard** | `inherit` | developer, debugger, ci-investigator, api-contract, a11y, qa, unit-*, xcuitest-* |
|
|
40
|
+
| **strong** | `claude-opus-4-8[effort=high]` | solution-architect, migration-specialist, security-reviewer, performance-auditor |
|
|
41
|
+
|
|
42
|
+
Optional `steps[].model`: `cheap` \| `standard` \| `strong` (router/orchestrator policy — same as next).
|
|
43
|
+
|
|
32
44
|
## Pipeline routing
|
|
33
45
|
|
|
34
46
|
**SoT:** intent table / profiles — **`task-router.md`**. Schema — ниже (same as next).
|
|
@@ -43,8 +55,8 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
|
|
|
43
55
|
"steps": [
|
|
44
56
|
{ "agent": "task-analyst", "label": "Clarify and decompose" },
|
|
45
57
|
{ "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" }
|
|
58
|
+
{ "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" },
|
|
59
|
+
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" }
|
|
48
60
|
],
|
|
49
61
|
"humanGates": ["after:task-analyst"],
|
|
50
62
|
"autoChain": true,
|
|
@@ -52,4 +64,6 @@ When copying next pipeline templates: put Playwright stems in `skipped` with rea
|
|
|
52
64
|
}
|
|
53
65
|
```
|
|
54
66
|
|
|
67
|
+
`steps[].model` optional: `cheap` \| `standard` \| `strong`.
|
|
68
|
+
|
|
55
69
|
Копируется в `.cursor/agents/` при `ai-rules init cursor --preset ios-swift`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: migration-specialist
|
|
3
3
|
description: Migration planning specialist for Xcode/iOS/SPM upgrades, dependency swaps, and phased refactors with rollback. Writes migration-plan.md and team status; never writes production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a migration specialist for an **iOS Swift** codebase with Feature-module layer boundaries.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: performance-auditor
|
|
3
3
|
description: Performance audit specialist. Reviews launch path, main-thread work, SwiftUI body churn, list scrolling, image decoding, and Instruments-oriented risks. Readonly — writes perf-report.md only; never edits production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are an iOS performance auditor for a Swift/SwiftUI application.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: security-reviewer
|
|
3
3
|
description: Security review specialist. Audits Keychain/token handling, ATS, PII in logs, secrets in diff, and unsafe URL/deep-link handling. Readonly — writes security-review.md only; never edits production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are an iOS security reviewer for a Swift/SwiftUI application.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: solution-architect
|
|
3
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. Readonly — produces design docs, not production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a solution architect for **iOS Feature modules** (Presentation / Domain / Data). Write `architecture.md` under `.cursor/team/tasks/<slug>/`. No production code.
|
|
@@ -40,6 +40,15 @@ You are a task router for an **iOS Swift/SwiftUI** agent team. You **do not** im
|
|
|
40
40
|
|
|
41
41
|
**Never skip `build-verifier`** after developer when Swift/Xcode sources changed.
|
|
42
42
|
|
|
43
|
+
## Model tiers (`steps[].model`)
|
|
44
|
+
|
|
45
|
+
Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as **cursor/next** `task-router.md`:
|
|
46
|
+
|
|
47
|
+
- `light` → `cheap` on all steps (debugger unclear root cause → `strong`)
|
|
48
|
+
- `full` / `spike` / security|perf specialists → `strong` on architect, migration, security, perf steps
|
|
49
|
+
- never `strong` on build-verifier / tech-writer / task-router
|
|
50
|
+
- omit on `standard` → agent frontmatter (`fast` / `inherit` / `claude-opus-4-8[effort=high]`)
|
|
51
|
+
|
|
43
52
|
Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard).
|
|
44
53
|
|
|
45
54
|
## humanGates (defaults)
|
|
@@ -55,7 +64,7 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
55
64
|
|
|
56
65
|
## Output
|
|
57
66
|
|
|
58
|
-
Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json
|
|
67
|
+
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
68
|
|
|
60
69
|
## Handoff
|
|
61
70
|
|
|
@@ -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. Создай
|
|
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` и **остановись**.
|
|
@@ -67,12 +67,25 @@ 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
|
+
## Model when invoking (Task)
|
|
77
|
+
|
|
78
|
+
Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent frontmatter (matrix in `agents/README.md`).
|
|
79
|
+
|
|
80
|
+
- `cheap` → Task `model: "fast"` when accepted.
|
|
81
|
+
- `standard` → omit Task model.
|
|
82
|
+
- `strong` → never pass `fast`; use agent pin `claude-opus-4-8[effort=high]` / parent Max.
|
|
83
|
+
|
|
84
|
+
## Team artifact I/O (Cursor Shell sandbox)
|
|
85
|
+
|
|
86
|
+
- 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).
|
|
87
|
+
- If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`.
|
|
88
|
+
|
|
76
89
|
## Skip pipeline when
|
|
77
90
|
|
|
78
91
|
- 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).
|
|
@@ -4,32 +4,15 @@
|
|
|
4
4
|
"profile": "full",
|
|
5
5
|
"summary": "Multi-layer Feature with XCUITest coverage",
|
|
6
6
|
"steps": [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"scope": "unit-in-dev"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"agent": "build-verifier",
|
|
18
|
-
"label": "xcodebuild + lint + unit smoke"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"agent": "code-reviewer",
|
|
22
|
-
"label": "Code review"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"agent": "qa-tester",
|
|
26
|
-
"label": "XCUITest",
|
|
27
|
-
"scope": "e2e-only"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"humanGates": [
|
|
31
|
-
"after:task-analyst"
|
|
7
|
+
{ "agent": "task-analyst", "label": "Clarify and decompose" },
|
|
8
|
+
{ "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
|
|
9
|
+
{ "agent": "feature-developer", "label": "Implement + unit tests", "scope": "unit-in-dev" },
|
|
10
|
+
{ "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" },
|
|
11
|
+
{ "agent": "security-reviewer", "label": "Security review", "model": "strong" },
|
|
12
|
+
{ "agent": "code-reviewer", "label": "Code review", "model": "cheap" },
|
|
13
|
+
{ "agent": "qa-tester", "label": "XCUITest", "scope": "e2e-only" }
|
|
32
14
|
],
|
|
15
|
+
"humanGates": ["after:task-analyst"],
|
|
33
16
|
"autoChain": true,
|
|
34
17
|
"skipped": [
|
|
35
18
|
{
|
|
@@ -2,35 +2,16 @@
|
|
|
2
2
|
"slug": "example-feature-light",
|
|
3
3
|
"intent": "feature",
|
|
4
4
|
"profile": "light",
|
|
5
|
-
"summary": "Trivial single-file
|
|
5
|
+
"summary": "Trivial single-file change with explicit AC",
|
|
6
6
|
"steps": [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
"label": "Implement"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"agent": "build-verifier",
|
|
13
|
-
"label": "Validation gate"
|
|
14
|
-
}
|
|
7
|
+
{ "agent": "feature-developer", "label": "Implement", "model": "cheap" },
|
|
8
|
+
{ "agent": "build-verifier", "label": "xcodebuild + lint + unit smoke", "model": "cheap" }
|
|
15
9
|
],
|
|
16
10
|
"humanGates": [],
|
|
17
11
|
"autoChain": true,
|
|
18
12
|
"skipped": [
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"agent": "code-reviewer",
|
|
25
|
-
"reason": "Light profile"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"agent": "qa-tester",
|
|
29
|
-
"reason": "No XCUITest AC"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"agent": "playwright-test-planner",
|
|
33
|
-
"reason": "iOS uses XCUITest; not needed for light"
|
|
34
|
-
}
|
|
13
|
+
{ "agent": "task-analyst", "reason": "Explicit AC and single-file scope" },
|
|
14
|
+
{ "agent": "code-reviewer", "reason": "Light profile — non-trivial app changes should use standard" },
|
|
15
|
+
{ "agent": "qa-tester", "reason": "No e2e AC" }
|
|
35
16
|
]
|
|
36
17
|
}
|
|
@@ -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`.
|
|
@@ -56,6 +56,23 @@
|
|
|
56
56
|
|
|
57
57
|
Ограничение «не трогать production / `app/**`» задаётся **в теле промпта**, не флагом `readonly`. В Cursor `readonly: true` блокирует *любые* file edits (включая team) — для team-агентов это ломает пайплайн.
|
|
58
58
|
|
|
59
|
+
## Model matrix (frontmatter `model`)
|
|
60
|
+
|
|
61
|
+
SoT по умолчанию — YAML `model` в каждом agent-файле. Опциональный `steps[].model` (`cheap` \| `standard` \| `strong`) переопределяет тир на шаге пайплайна (см. `task-router.md`, `agent-team-orchestrator.mdc`).
|
|
62
|
+
|
|
63
|
+
| Tier | Default frontmatter | Agents |
|
|
64
|
+
|------|---------------------|--------|
|
|
65
|
+
| **cheap** | `fast` | `task-router`, `task-analyst`, `build-verifier`, `code-reviewer`, `tech-writer` |
|
|
66
|
+
| **standard** | `inherit` | `feature-developer`, `debugger`, `ci-investigator`, `api-contract-reviewer`, `accessibility-reviewer`, `qa-tester`, `unit-test-*`, `playwright-test-*` |
|
|
67
|
+
| **strong** | `claude-opus-4-8[effort=high]` | `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` |
|
|
68
|
+
|
|
69
|
+
**Notes**
|
|
70
|
+
|
|
71
|
+
- `inherit` = модель parent-чата (обычно сильнее `fast`).
|
|
72
|
+
- Strong pin uses Cursor bracket options (`[effort=high]`). If the ID is blocked by plan/admin, Cursor falls back to a compatible model.
|
|
73
|
+
- Alternate strong pin when Opus unavailable: `composer-2.5[fast=false]` (edit frontmatter locally).
|
|
74
|
+
- Never put `strong` on `build-verifier` / `tech-writer` / `task-router`.
|
|
75
|
+
|
|
59
76
|
## Оркестрация
|
|
60
77
|
|
|
61
78
|
| Command | Назначение |
|
|
@@ -94,6 +111,7 @@
|
|
|
94
111
|
| `scope` | no | e.g. `unit-in-dev`, `e2e-only`, `regression`, `full` |
|
|
95
112
|
| `skipIf` | no | `debugger.fixed` \| `ci-investigator.resolved` |
|
|
96
113
|
| `parallel` | no | When `true` and `agent` is array — invoke all in one turn |
|
|
114
|
+
| `model` | no | `cheap` \| `standard` \| `strong` — pipeline tier override; omit → agent frontmatter |
|
|
97
115
|
|
|
98
116
|
### Minimal template
|
|
99
117
|
|
|
@@ -114,26 +132,43 @@
|
|
|
114
132
|
}
|
|
115
133
|
```
|
|
116
134
|
|
|
117
|
-
### Example: parallel reviewers
|
|
135
|
+
### Example: parallel reviewers + model tiers
|
|
118
136
|
|
|
119
137
|
```json
|
|
120
138
|
{
|
|
121
139
|
"intent": "feature",
|
|
140
|
+
"profile": "full",
|
|
122
141
|
"steps": [
|
|
123
142
|
{ "agent": "task-analyst", "label": "Clarify" },
|
|
143
|
+
{ "agent": "solution-architect", "label": "Design boundaries", "model": "strong" },
|
|
124
144
|
{ "agent": "feature-developer", "label": "Implement", "scope": "unit-in-dev" },
|
|
125
|
-
{ "agent": "build-verifier", "label": "Validation gate" },
|
|
145
|
+
{ "agent": "build-verifier", "label": "Validation gate", "model": "cheap" },
|
|
126
146
|
{
|
|
127
147
|
"agent": ["accessibility-reviewer", "security-reviewer"],
|
|
128
148
|
"parallel": true,
|
|
129
|
-
"label": "A11y and security"
|
|
149
|
+
"label": "A11y and security",
|
|
150
|
+
"model": "strong"
|
|
130
151
|
},
|
|
131
|
-
{ "agent": "code-reviewer", "label": "Review" }
|
|
152
|
+
{ "agent": "code-reviewer", "label": "Review", "model": "cheap" }
|
|
132
153
|
],
|
|
133
154
|
"humanGates": ["after:task-analyst"]
|
|
134
155
|
}
|
|
135
156
|
```
|
|
136
157
|
|
|
158
|
+
### Example: light profile with cheap models
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"intent": "feature",
|
|
163
|
+
"profile": "light",
|
|
164
|
+
"steps": [
|
|
165
|
+
{ "agent": "feature-developer", "label": "Implement", "model": "cheap" },
|
|
166
|
+
{ "agent": "build-verifier", "label": "Validation gate", "model": "cheap" }
|
|
167
|
+
],
|
|
168
|
+
"humanGates": []
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
137
172
|
### Example: bugfix skipIf
|
|
138
173
|
|
|
139
174
|
```json
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: migration-specialist
|
|
3
3
|
description: Migration planning specialist for library upgrades, Next.js major versions, HTTP client swaps, and phased refactors with rollback. Writes migration-plan.md and team status; never writes production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a migration specialist for a Next.js frontend with strict layer boundaries.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: performance-auditor
|
|
3
3
|
description: Performance audit specialist. Reviews bundle size, lazy loading, render patterns, data fetching waterfalls, and Core Web Vitals risks. Readonly — writes perf-report.md only; never edits production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a frontend performance auditor for a Next.js React application.
|
|
@@ -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 `
|
|
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 `
|
|
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
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: security-reviewer
|
|
3
3
|
description: Security review specialist. Audits auth flows, token handling, XSS risks, secrets in diff, and unsafe DOM/API usage. Readonly — writes security-review.md only; never edits production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a frontend security reviewer for a Next.js TypeScript application.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: solution-architect
|
|
3
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. Readonly — produces design docs, not production code.
|
|
4
4
|
readonly: false
|
|
5
|
-
model:
|
|
5
|
+
model: claude-opus-4-8[effort=high]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are a solution architect for a Next.js frontend with strict layer boundaries (types, api, store, ui).
|
|
@@ -65,7 +65,21 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
65
65
|
- Add **tech-writer** when docs/changelog requested.
|
|
66
66
|
- **Always build-verifier** after developer (or after ci-investigator/debugger if they changed code) for `feature`, `bugfix`, `refactor`, `migration`, `a11y`.
|
|
67
67
|
- **skipIf:** `debugger.fixed` on developer (bugfix); `ci-investigator.resolved` (ci-fix).
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
## Model tiers (`steps[].model`)
|
|
70
|
+
|
|
71
|
+
Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit → agent frontmatter default (see **Model matrix** in `agents/README.md`).
|
|
72
|
+
|
|
73
|
+
| When | What to write |
|
|
74
|
+
|------|----------------|
|
|
75
|
+
| `profile: light` | set `cheap` on **all** steps (exception: unclear bug root cause on `debugger` → `strong`) |
|
|
76
|
+
| `profile: standard` | omit (frontmatter defaults) |
|
|
77
|
+
| `profile: full` | set `strong` on `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` when present; omit others |
|
|
78
|
+
| `intent: spike` | set `strong` on `solution-architect` (and analyst may stay default/`cheap`) |
|
|
79
|
+
| `intent: perf-audit` / security-heavy feature | `strong` on auditor/reviewer step |
|
|
80
|
+
| Always | **never** `strong` on `build-verifier`, `tech-writer`, `task-router` |
|
|
81
|
+
|
|
82
|
+
Cursor mapping when orchestrator invokes Task: `cheap` → pass `model: "fast"` if the tool accepts it; `standard`/`strong` → **do not** pass `fast` (rely on agent frontmatter pin / inherit).
|
|
69
83
|
|
|
70
84
|
## humanGates (defaults)
|
|
71
85
|
|
|
@@ -82,7 +96,7 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
82
96
|
|
|
83
97
|
## Output
|
|
84
98
|
|
|
85
|
-
Write `.cursor/team/tasks/<slug>/pipeline.json` and initial `status.json
|
|
99
|
+
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
100
|
|
|
87
101
|
## Handoff to orchestrator
|
|
88
102
|
|
|
@@ -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. Создай
|
|
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
|
|
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
|
|
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
|
};
|