@codyswann/lisa 1.37.0 → 1.39.0
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/all/copy-overwrite/.claude/README.md +11 -5
- package/all/copy-overwrite/.claude/agents/agent-architect.md +0 -1
- package/all/copy-overwrite/.claude/agents/{architecture-planner.md → architecture-specialist.md} +7 -12
- package/all/copy-overwrite/.claude/agents/debug-specialist.md +204 -0
- package/all/copy-overwrite/.claude/agents/implementer.md +35 -23
- package/all/copy-overwrite/.claude/agents/learner.md +0 -1
- package/all/copy-overwrite/.claude/agents/performance-specialist.md +95 -0
- package/all/copy-overwrite/.claude/agents/{product-planner.md → product-specialist.md} +19 -14
- package/all/copy-overwrite/.claude/agents/{tech-reviewer.md → quality-specialist.md} +9 -11
- package/all/copy-overwrite/.claude/agents/{security-planner.md → security-specialist.md} +8 -13
- package/all/copy-overwrite/.claude/agents/{test-strategist.md → test-specialist.md} +20 -15
- package/all/copy-overwrite/.claude/agents/verification-specialist.md +189 -0
- package/all/copy-overwrite/.claude/commands/plan/create.md +1 -1
- package/all/copy-overwrite/.claude/commands/plan/execute.md +7 -0
- package/all/copy-overwrite/.claude/hooks/README.md +2 -2
- package/all/copy-overwrite/.claude/hooks/setup-jira-cli.sh +2 -2
- package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +3 -0
- package/all/copy-overwrite/.claude/hooks/ticket-sync-reminder.sh +3 -0
- package/all/copy-overwrite/.claude/hooks/track-plan-sessions.sh +3 -0
- package/all/copy-overwrite/.claude/rules/lisa.md +2 -4
- package/all/copy-overwrite/.claude/rules/verfication.md +104 -1
- package/all/copy-overwrite/.claude/settings.json +219 -26
- package/all/copy-overwrite/.claude/skills/agent-design-best-practices/SKILL.md +219 -0
- package/all/copy-overwrite/.claude/skills/plan-add-test-coverage/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-execute/SKILL.md +89 -0
- package/all/copy-overwrite/.claude/skills/plan-fix-linter-error/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-lower-code-complexity/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines-per-function/SKILL.md +1 -1
- package/all/copy-overwrite/CLAUDE.md +1 -0
- package/all/copy-overwrite/README.md +6 -2
- package/dist/utils/fibonacci.d.ts +30 -22
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +40 -34
- package/dist/utils/fibonacci.js.map +1 -1
- package/package.json +1 -1
- package/rails/copy-overwrite/.claude/rules/lisa.md +5 -1
- package/rails/copy-overwrite/.claude/skills/action-controller-best-practices/SKILL.md +374 -0
- package/rails/copy-overwrite/.claude/skills/action-view-best-practices/SKILL.md +335 -0
- package/rails/copy-overwrite/.claude/skills/active-record-model-best-practices/SKILL.md +166 -0
- package/rails/copy-overwrite/.claude/skills/plan-add-test-coverage/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-fix-linter-error/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-lower-code-complexity/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-reduce-max-lines/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-reduce-max-lines-per-function/SKILL.md +1 -1
- package/rails/copy-overwrite/.versionrc +48 -0
- package/rails/copy-overwrite/CLAUDE.md +1 -0
- package/rails/copy-overwrite/config/initializers/version.rb +5 -0
- package/rails/create-only/.github/workflows/quality.yml +22 -1
- package/rails/create-only/.github/workflows/release.yml +94 -0
- package/rails/create-only/.reek.yml +3 -0
- package/rails/create-only/.rubocop.local.yml +17 -4
- package/rails/create-only/VERSION +1 -0
- package/typescript/copy-contents/.husky/pre-push +1 -5
- package/typescript/copy-overwrite/.claude/settings.json +112 -78
- package/typescript/copy-overwrite/.github/workflows/quality.yml +1 -5
- package/all/copy-overwrite/.claude/REFERENCE.md +0 -519
- package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +0 -146
- package/all/copy-overwrite/.claude/agents/codebase-locator.md +0 -125
- package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +0 -237
- package/all/copy-overwrite/.claude/agents/consistency-checker.md +0 -58
- package/all/copy-overwrite/.claude/agents/product-reviewer.md +0 -47
- package/all/copy-overwrite/.claude/agents/spec-analyst.md +0 -41
- package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +0 -17
- package/all/copy-overwrite/.claude/commands/plan/implement.md +0 -6
- package/all/copy-overwrite/.claude/rules/plan-governance.md +0 -96
- package/all/copy-overwrite/.claude/rules/plan.md +0 -79
- package/all/copy-overwrite/.claude/skills/plan-create/SKILL.md +0 -238
- package/all/copy-overwrite/.claude/skills/plan-implement/SKILL.md +0 -114
- /package/typescript/copy-overwrite/.claude/hooks/{install_pkgs.sh → install-pkgs.sh} +0 -0
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
+
"attribution": {
|
|
3
|
+
"commit": "🤖 Generated with Claude Code\n\nCo-Authored-By: Claude",
|
|
4
|
+
"pr": "🤖 Generated with Claude Code"
|
|
5
|
+
},
|
|
6
|
+
"enabledPlugins": {
|
|
7
|
+
"typescript-lsp@claude-plugins-official": true,
|
|
8
|
+
"safety-net@cc-marketplace": true,
|
|
9
|
+
"code-simplifier@claude-plugins-official": true,
|
|
10
|
+
"code-review@claude-plugins-official": true,
|
|
11
|
+
"playwright@claude-plugins-official": true,
|
|
12
|
+
"coderabbit@claude-plugins-official": true
|
|
13
|
+
},
|
|
14
|
+
"env": {
|
|
15
|
+
"BASH_DEFAULT_TIMEOUT_MS": "1800000",
|
|
16
|
+
"BASH_MAX_TIMEOUT_MS": "7200000",
|
|
17
|
+
"CLAUDE_DEBUG": "0",
|
|
18
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
19
|
+
},
|
|
2
20
|
"hooks": {
|
|
3
|
-
"
|
|
21
|
+
"Notification": [
|
|
4
22
|
{
|
|
5
|
-
"matcher": "",
|
|
23
|
+
"matcher": "permission_prompt|idle_prompt",
|
|
6
24
|
"hooks": [
|
|
7
25
|
{
|
|
8
26
|
"type": "command",
|
|
9
|
-
"command": "
|
|
10
|
-
"timeout":
|
|
27
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh",
|
|
28
|
+
"timeout": 5
|
|
11
29
|
}
|
|
12
30
|
]
|
|
13
31
|
},
|
|
@@ -16,68 +34,174 @@
|
|
|
16
34
|
"hooks": [
|
|
17
35
|
{
|
|
18
36
|
"type": "command",
|
|
19
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
37
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
20
38
|
"timeout": 5
|
|
21
39
|
}
|
|
22
40
|
]
|
|
23
|
-
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"PermissionRequest": [
|
|
24
44
|
{
|
|
25
45
|
"matcher": "",
|
|
26
46
|
"hooks": [
|
|
27
47
|
{
|
|
28
48
|
"type": "command",
|
|
29
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
49
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
30
50
|
"timeout": 5
|
|
31
51
|
}
|
|
32
52
|
]
|
|
33
53
|
}
|
|
34
54
|
],
|
|
35
|
-
"
|
|
55
|
+
"PostToolUse": [
|
|
56
|
+
{
|
|
57
|
+
"matcher": "Write|Edit",
|
|
58
|
+
"hooks": [
|
|
59
|
+
{
|
|
60
|
+
"type": "command",
|
|
61
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-on-edit.sh"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "command",
|
|
65
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/sg-scan-on-edit.sh"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"matcher": "TaskCreate|TaskUpdate",
|
|
71
|
+
"hooks": [
|
|
72
|
+
{
|
|
73
|
+
"type": "command",
|
|
74
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/sync-tasks.sh"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"matcher": "",
|
|
80
|
+
"hooks": [
|
|
81
|
+
{
|
|
82
|
+
"type": "command",
|
|
83
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"matcher": "Task",
|
|
89
|
+
"hooks": [
|
|
90
|
+
{
|
|
91
|
+
"type": "command",
|
|
92
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code post-task || true"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"matcher": "TodoWrite",
|
|
98
|
+
"hooks": [
|
|
99
|
+
{
|
|
100
|
+
"type": "command",
|
|
101
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code post-todo || true"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"PostToolUseFailure": [
|
|
36
107
|
{
|
|
37
108
|
"matcher": "",
|
|
38
109
|
"hooks": [
|
|
39
110
|
{
|
|
40
111
|
"type": "command",
|
|
41
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
112
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
42
113
|
"timeout": 5
|
|
43
114
|
}
|
|
44
115
|
]
|
|
45
116
|
}
|
|
46
117
|
],
|
|
47
|
-
"
|
|
118
|
+
"PreCompact": [
|
|
48
119
|
{
|
|
49
|
-
"matcher": "
|
|
120
|
+
"matcher": "",
|
|
50
121
|
"hooks": [
|
|
51
122
|
{
|
|
52
123
|
"type": "command",
|
|
53
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
124
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
54
125
|
"timeout": 5
|
|
55
126
|
}
|
|
56
127
|
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"PreToolUse": [
|
|
131
|
+
{
|
|
132
|
+
"matcher": "",
|
|
133
|
+
"hooks": [
|
|
134
|
+
{
|
|
135
|
+
"type": "command",
|
|
136
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
57
139
|
},
|
|
58
140
|
{
|
|
59
|
-
"matcher": "
|
|
141
|
+
"matcher": "Task",
|
|
142
|
+
"hooks": [
|
|
143
|
+
{
|
|
144
|
+
"type": "command",
|
|
145
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code pre-task || true"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"SessionEnd": [
|
|
151
|
+
{
|
|
152
|
+
"matcher": "",
|
|
60
153
|
"hooks": [
|
|
61
154
|
{
|
|
62
155
|
"type": "command",
|
|
63
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
64
|
-
"timeout": 10
|
|
156
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
65
157
|
},
|
|
66
158
|
{
|
|
67
159
|
"type": "command",
|
|
68
|
-
"command": "
|
|
69
|
-
"timeout": 5
|
|
160
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code session-end || true"
|
|
70
161
|
}
|
|
71
162
|
]
|
|
72
163
|
}
|
|
73
164
|
],
|
|
74
|
-
"
|
|
165
|
+
"SessionStart": [
|
|
75
166
|
{
|
|
76
|
-
"matcher": "
|
|
167
|
+
"matcher": "startup",
|
|
77
168
|
"hooks": [
|
|
78
169
|
{
|
|
79
170
|
"type": "command",
|
|
80
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
171
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/install-pkgs.sh"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"matcher": "",
|
|
177
|
+
"hooks": [
|
|
178
|
+
{
|
|
179
|
+
"type": "command",
|
|
180
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/setup-jira-cli.sh"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "command",
|
|
184
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code session-start || true"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"matcher": "",
|
|
190
|
+
"hooks": [
|
|
191
|
+
{
|
|
192
|
+
"type": "command",
|
|
193
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"Setup": [
|
|
199
|
+
{
|
|
200
|
+
"matcher": "",
|
|
201
|
+
"hooks": [
|
|
202
|
+
{
|
|
203
|
+
"type": "command",
|
|
204
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
81
205
|
"timeout": 5
|
|
82
206
|
}
|
|
83
207
|
]
|
|
@@ -89,17 +213,86 @@
|
|
|
89
213
|
"hooks": [
|
|
90
214
|
{
|
|
91
215
|
"type": "command",
|
|
92
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh"
|
|
216
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "command",
|
|
220
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code stop || true"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"matcher": "",
|
|
226
|
+
"hooks": [
|
|
227
|
+
{
|
|
228
|
+
"type": "command",
|
|
229
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"SubagentStart": [
|
|
235
|
+
{
|
|
236
|
+
"matcher": "",
|
|
237
|
+
"hooks": [
|
|
238
|
+
{
|
|
239
|
+
"type": "command",
|
|
240
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
241
|
+
"timeout": 5
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"SubagentStop": [
|
|
247
|
+
{
|
|
248
|
+
"matcher": "",
|
|
249
|
+
"hooks": [
|
|
250
|
+
{
|
|
251
|
+
"type": "command",
|
|
252
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
|
|
93
253
|
"timeout": 5
|
|
94
254
|
}
|
|
95
255
|
]
|
|
96
256
|
}
|
|
257
|
+
],
|
|
258
|
+
"UserPromptSubmit": [
|
|
259
|
+
{
|
|
260
|
+
"matcher": "",
|
|
261
|
+
"hooks": [
|
|
262
|
+
{
|
|
263
|
+
"type": "command",
|
|
264
|
+
"command": "echo 'REMINDER: Start your response with \"I'\\''m tired boss\" as required by CLAUDE.md.'"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "command",
|
|
268
|
+
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code user-prompt-submit || true"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"matcher": "",
|
|
274
|
+
"hooks": [
|
|
275
|
+
{
|
|
276
|
+
"type": "command",
|
|
277
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/enforce-plan-rules.sh"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"matcher": "",
|
|
283
|
+
"hooks": [
|
|
284
|
+
{
|
|
285
|
+
"type": "command",
|
|
286
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
97
290
|
]
|
|
98
291
|
},
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
292
|
+
"permissions": {
|
|
293
|
+
"deny": [
|
|
294
|
+
"Read(./.entire/metadata/**)"
|
|
295
|
+
]
|
|
102
296
|
},
|
|
103
|
-
"includeCoAuthoredBy": true,
|
|
104
297
|
"plansDirectory": "./plans"
|
|
105
|
-
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-design-best-practices
|
|
3
|
+
description: Best practices for designing Claude Code agent files (.claude/agents/*.md). This skill should be used when writing or reviewing agent markdown files to ensure proper design with focused domains, correct tool access, reusable definitions, and separation of capabilities from lifecycle. Combines Anthropic's official guidance with battle-tested patterns from agent team usage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Design Best Practices
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill defines best practices for designing Claude Code agent files (`.claude/agents/*.md`). Agent files define reusable roles that can be spawned as subagents or teammates. The core principle is that **agent files define capabilities, not lifecycle** -- the team lead's spawn prompt controls when and how the agent runs.
|
|
11
|
+
|
|
12
|
+
## Principles
|
|
13
|
+
|
|
14
|
+
### 1. Define Capabilities, Not Lifecycle
|
|
15
|
+
|
|
16
|
+
Agent files describe *what* an agent can do. The spawn prompt from the team lead controls *when* it runs and *what to focus on*.
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
<!-- Wrong: Hardcodes workflow phase and interaction pattern -->
|
|
20
|
+
# Security Planner Agent
|
|
21
|
+
|
|
22
|
+
You are a security specialist in a plan-create Agent Team.
|
|
23
|
+
Given a Research Brief from the team lead, identify security
|
|
24
|
+
considerations for the planned changes.
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
Send your sub-plan to the team lead via `SendMessage` with this structure:
|
|
29
|
+
...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
<!-- Correct: Defines domain expertise, team lead controls usage -->
|
|
34
|
+
# Security Specialist Agent
|
|
35
|
+
|
|
36
|
+
You are a security specialist who identifies vulnerabilities,
|
|
37
|
+
evaluates threats, and recommends mitigations for code changes.
|
|
38
|
+
|
|
39
|
+
## Analysis Process
|
|
40
|
+
1. Read affected files
|
|
41
|
+
2. STRIDE analysis
|
|
42
|
+
3. Check input validation
|
|
43
|
+
...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The wrong version is coupled to one workflow ("plan-create Agent Team", "Given a Research Brief", "Send via SendMessage"). The correct version works in any context -- planning, review, ad-hoc analysis -- because the team lead's spawn prompt provides the specific instructions.
|
|
47
|
+
|
|
48
|
+
### 2. One Agent Per Domain, Not Per Phase
|
|
49
|
+
|
|
50
|
+
Prefer a single agent that covers a domain over multiple agents split by workflow phase. The team lead specializes the agent per phase via the spawn prompt.
|
|
51
|
+
|
|
52
|
+
| Wrong | Right |
|
|
53
|
+
|-------|-------|
|
|
54
|
+
| `security-planner` + `security-reviewer` | `security-specialist` |
|
|
55
|
+
| `test-strategist` + `test-coverage-agent` | `test-specialist` |
|
|
56
|
+
| `architecture-planner` + `architecture-reviewer` | `architecture-specialist` |
|
|
57
|
+
|
|
58
|
+
The same agent type can be spawned multiple times with different prompts for different phases. A `security-specialist` spawned during planning gets "evaluate this plan for security risks" while the same type spawned during review gets "review these code changes for vulnerabilities."
|
|
59
|
+
|
|
60
|
+
### 3. Design Focused Domains
|
|
61
|
+
|
|
62
|
+
Each agent should excel at one specific domain. The domain should be broad enough to avoid workflow coupling but narrow enough to provide real expertise.
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
# Too narrow (coupled to one workflow step)
|
|
66
|
+
description: Performs STRIDE analysis on Research Briefs during plan-create Phase 2
|
|
67
|
+
|
|
68
|
+
# Too broad (no clear expertise)
|
|
69
|
+
description: General-purpose agent that can do anything
|
|
70
|
+
|
|
71
|
+
# Just right (focused domain, reusable across workflows)
|
|
72
|
+
description: Security specialist. Performs threat modeling (STRIDE), reviews code for OWASP Top 10 vulnerabilities, checks auth/validation/secrets handling.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Write Detailed Descriptions
|
|
76
|
+
|
|
77
|
+
Claude uses the `description` field in YAML frontmatter to decide when to delegate tasks. Be specific about what the agent does and when it adds value.
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
# Bad: Vague, Claude can't decide when to use it
|
|
81
|
+
description: Reviews code
|
|
82
|
+
|
|
83
|
+
# Good: Specific domain, clear trigger conditions
|
|
84
|
+
description: Security specialist. Performs threat modeling (STRIDE), reviews code for OWASP Top 10 vulnerabilities, checks auth/validation/secrets handling, and recommends mitigations.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 5. Limit Tool Access
|
|
88
|
+
|
|
89
|
+
Grant only the tools necessary for the agent's domain. This enforces focus and prevents agents from exceeding their intended scope.
|
|
90
|
+
|
|
91
|
+
| Agent Type | Appropriate Tools | Rationale |
|
|
92
|
+
|-----------|-------------------|-----------|
|
|
93
|
+
| Researcher / Reviewer | `Read, Grep, Glob, Bash` | Read-only analysis, no file modifications |
|
|
94
|
+
| Implementer | `Read, Write, Edit, Bash, Grep, Glob` | Needs to modify code |
|
|
95
|
+
| Planner | `Read, Grep, Glob` | Research only, no execution |
|
|
96
|
+
|
|
97
|
+
Read-only agents cannot implement code. Do not assign implementation tasks to agents without `Write` and `Edit` tools.
|
|
98
|
+
|
|
99
|
+
### 6. No Hardcoded Interaction Patterns
|
|
100
|
+
|
|
101
|
+
Do not prescribe how the agent communicates or what input format it expects. The team lead's spawn prompt handles interaction patterns.
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
<!-- Wrong: Hardcodes communication protocol -->
|
|
105
|
+
## Input
|
|
106
|
+
You receive a **Research Brief** from the team lead containing...
|
|
107
|
+
|
|
108
|
+
## Output Format
|
|
109
|
+
Send your sub-plan to the team lead via `SendMessage` with this structure:
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
<!-- Correct: Defines output structure without prescribing delivery mechanism -->
|
|
114
|
+
## Output Format
|
|
115
|
+
Structure your findings as:
|
|
116
|
+
|
|
117
|
+
### Threat Model (STRIDE)
|
|
118
|
+
| Threat | Applies? | Description | Mitigation |
|
|
119
|
+
...
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The output format itself is fine to define -- it provides structure. But how the agent receives input and delivers output should be left to the team lead.
|
|
123
|
+
|
|
124
|
+
### 7. Context Window Isolation
|
|
125
|
+
|
|
126
|
+
Each teammate has its own context window. Teammates do not share context and cannot see what other teammates have done. Account for this in agent design:
|
|
127
|
+
|
|
128
|
+
- Do not assume the agent has seen previous analysis from other agents
|
|
129
|
+
- Include enough domain knowledge in the agent file for independent operation
|
|
130
|
+
- The team lead bridges context between agents via spawn prompts and messages
|
|
131
|
+
|
|
132
|
+
### 8. File Ownership in Teams
|
|
133
|
+
|
|
134
|
+
When agents work in teams, each teammate should own distinct files or directories. Two teammates editing the same file leads to conflicts and lost work.
|
|
135
|
+
|
|
136
|
+
Design agent domains so their file ownership naturally separates:
|
|
137
|
+
|
|
138
|
+
| Agent | Owns |
|
|
139
|
+
|-------|------|
|
|
140
|
+
| `implementer` | Source files (`src/`) |
|
|
141
|
+
| `test-specialist` | Test files (`tests/`) |
|
|
142
|
+
| `quality-specialist` | No files (read-only) |
|
|
143
|
+
|
|
144
|
+
## Agent File Structure
|
|
145
|
+
|
|
146
|
+
### Required Frontmatter
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
---
|
|
150
|
+
name: agent-name # lowercase with hyphens
|
|
151
|
+
description: When and why to use this agent. Be specific.
|
|
152
|
+
tools: Read, Grep, Glob # comma-separated, minimal set
|
|
153
|
+
---
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Optional Frontmatter
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
model: sonnet # sonnet, opus, haiku, or inherit (default)
|
|
160
|
+
permissionMode: default # default, acceptEdits, plan, bypassPermissions, etc.
|
|
161
|
+
maxTurns: 50 # limit agentic turns
|
|
162
|
+
skills: # skills to preload
|
|
163
|
+
- skill-name
|
|
164
|
+
memory: user # persistent memory: user, project, or local
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Body Structure
|
|
168
|
+
|
|
169
|
+
The markdown body becomes the agent's system prompt. Structure it as:
|
|
170
|
+
|
|
171
|
+
1. **Role statement** -- one sentence describing what the agent is
|
|
172
|
+
2. **Analysis/workflow process** -- numbered steps for the agent's approach
|
|
173
|
+
3. **Output format** -- structure for findings (without prescribing delivery mechanism)
|
|
174
|
+
4. **Rules/constraints** -- guardrails for the agent's behavior
|
|
175
|
+
|
|
176
|
+
## Anti-Patterns
|
|
177
|
+
|
|
178
|
+
### Don't Create Phase-Specific Agents
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
<!-- Wrong: Two agents for the same domain, split by phase -->
|
|
182
|
+
# Pre-Implementation Security Planner
|
|
183
|
+
...
|
|
184
|
+
# Post-Implementation Security Reviewer
|
|
185
|
+
...
|
|
186
|
+
|
|
187
|
+
<!-- Correct: One agent, team lead controls timing -->
|
|
188
|
+
# Security Specialist
|
|
189
|
+
...
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Don't Hardcode Workflow Dependencies
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
<!-- Wrong: Agent assumes specific workflow context -->
|
|
196
|
+
You are part of the plan-create Phase 2 team.
|
|
197
|
+
Wait for the Research Brief from Phase 1.
|
|
198
|
+
After your analysis, the Consistency Checker will validate your output.
|
|
199
|
+
|
|
200
|
+
<!-- Correct: Agent is self-contained -->
|
|
201
|
+
You are a security specialist who identifies vulnerabilities
|
|
202
|
+
and recommends mitigations for code changes.
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Don't Over-Specify the Model
|
|
206
|
+
|
|
207
|
+
Only set `model` when there's a clear reason. Most agents work well with `inherit` (the default), which uses the same model as the parent session. Use `haiku` for fast, simple tasks (exploration, search). Use `sonnet` or `opus` only when the domain requires stronger reasoning.
|
|
208
|
+
|
|
209
|
+
## Verification Checklist
|
|
210
|
+
|
|
211
|
+
Before committing an agent file, verify:
|
|
212
|
+
|
|
213
|
+
1. **Description is specific** -- Claude can determine when to delegate from the description alone
|
|
214
|
+
2. **Tools are minimal** -- only the tools the agent actually needs
|
|
215
|
+
3. **No workflow coupling** -- no references to specific team structures, phases, or input formats
|
|
216
|
+
4. **No hardcoded communication** -- no "send via SendMessage" or "given a Research Brief"
|
|
217
|
+
5. **Domain is reusable** -- the agent works in planning, review, and ad-hoc contexts
|
|
218
|
+
6. **Role statement is clear** -- first line of body explains what the agent is
|
|
219
|
+
7. **Output format is defined** -- structured output without prescribing delivery
|
|
@@ -41,4 +41,4 @@ Configuration: [config file path], update thresholds to $ARGUMENTS%
|
|
|
41
41
|
Verification: `bun run test:cov` → Expected: All thresholds pass at $ARGUMENTS%
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Invoke `/plan-
|
|
44
|
+
Invoke `/plan-execute` with this brief to create the implementation plan.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-execute
|
|
3
|
+
description: This skill should be used for any non-trivial request — features, bugs, stories, epics, spikes, or multi-step tasks. It accepts a ticket URL (Jira, Linear, GitHub), a file path containing a spec, or a plain-text prompt. It assembles an agent team, breaks the work into structured tasks, and manages the full lifecycle from research through implementation, code review, deploy, and empirical verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS is either a url to a ticket containing the request, a pointer to a file containing the request or the request in text format.
|
|
8
|
+
|
|
9
|
+
If it's a ticket, use either the Jira CLI (if it's a jira ticket), the Linear CLI (if it's a linear ticket) or the Github CLI (if it's a github ticket) to read and fully understand the request, including any comments or meta data associated with the ticket.
|
|
10
|
+
|
|
11
|
+
If it's a file, read the entire file without offset or limit to understand the request.
|
|
12
|
+
|
|
13
|
+
Is this a simple request? Just execute it as usual and ignore the rest...
|
|
14
|
+
|
|
15
|
+
Otherwise:
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Review all available agent types listed in the Task tool's `subagent_type` options. This includes built-in agents (like `Explore`, `general-purpose`), custom agents (from `.claude/agents/`), and plugin agents (from `.claude/settings.json` `enabledPlugins`). For each agent, explain in one sentence why it IS or IS NOT relevant to this task. Then select all agents that are relevant. You MUST justify excluding an agent — inclusion is the default.
|
|
19
|
+
|
|
20
|
+
When deciding the agents to use, consider:
|
|
21
|
+
* Before any task is implemented, the agent team must explore the codebase for relevant research (documentation, code, git history, etc) and update each task's `metadata.relevant_documentation` with the findings.
|
|
22
|
+
* Each task must be reviewed by the team to make sure their verification passes.
|
|
23
|
+
* Each task must have their learnings reviewed by the learner subagent.
|
|
24
|
+
|
|
25
|
+
NOTE: Every team must include the Explore agent
|
|
26
|
+
|
|
27
|
+
Create an agent team composed of the selected agents. Spawn every agent with `mode: "plan"` so they must submit their plan for team lead approval before making any file changes.
|
|
28
|
+
|
|
29
|
+
Use the TeamCreate tool to create the team before doing anything else.
|
|
30
|
+
|
|
31
|
+
Using the general-purpose agent in Team Lead session, Determine the name of this plan
|
|
32
|
+
|
|
33
|
+
Using the general-purpose agent in Team Lead session, Determine what branch to use:
|
|
34
|
+
1. Are we already on a feature branch with an open pull request? Use that and set the target branch to the existing target of the pull request
|
|
35
|
+
2. Are we on a feature branch without an open pull request? Use the branch, but ask the human what branch to target for the PR
|
|
36
|
+
3. Are we on an environment branch (dev, staging, main, prod, production)? Check out a feature branch named for this plan and set the target branch of the PR to the environment branch
|
|
37
|
+
|
|
38
|
+
Using the general-purpose agent in Team Lead session, Determine what type of request this is for:
|
|
39
|
+
1. Informational/Spike
|
|
40
|
+
2. Task
|
|
41
|
+
3. Bug
|
|
42
|
+
4. Feature/Story
|
|
43
|
+
5. Epic
|
|
44
|
+
|
|
45
|
+
IF it's a bug, Using the general-purpose agent in Team Lead session, determine how you will replicate the bug empirically:
|
|
46
|
+
1. Examples:
|
|
47
|
+
1. Write a simple API client and call the offending API
|
|
48
|
+
2. Start the server on localhost and Use the Playwright CLI or Chrome DevTools
|
|
49
|
+
|
|
50
|
+
Using the general-purpose agent in Team Lead session, determine how you will know that the task is fully complete
|
|
51
|
+
1. Examples
|
|
52
|
+
1. Direct deploy the changes to dev and then Write a simple API client and call the offending API
|
|
53
|
+
2. Start the server on localhost and then Use the Playwright CLI or Chrome DevTools
|
|
54
|
+
|
|
55
|
+
Using the general-purpose agent in Team Lead session, create tasks needed to complete the request.
|
|
56
|
+
|
|
57
|
+
Every task MUST include this JSON metadata block. Do NOT omit `skills` (use `[]` if none), `learnings` (use `[]` if none) or `verification`.
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"plan": "<plan-name>",
|
|
62
|
+
"type": "spike|bug|task|epic|story",
|
|
63
|
+
"acceptance_criteria": ["..."],
|
|
64
|
+
"relevant_documentation": "",
|
|
65
|
+
"testing_requirements": ["..."],
|
|
66
|
+
"skills": ["..."],
|
|
67
|
+
"learnings": ["..."],
|
|
68
|
+
"verification": {
|
|
69
|
+
"type": "test|ui-recording|test-coverage|api-test|manual-check|documentation",
|
|
70
|
+
"command": "the proof command",
|
|
71
|
+
"expected": "what success looks like"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Before any task is implemented, the agent team must explore the codebase for relevant research (documentation, code, git history, etc) and update each task's `metadata.relevant_documentation` with the findings.
|
|
77
|
+
|
|
78
|
+
Each task must be reviewed by the team to make sure their verification passes.
|
|
79
|
+
Each task must have their learnings reviewed by the learner subagent.
|
|
80
|
+
|
|
81
|
+
Before shutting down the team:
|
|
82
|
+
|
|
83
|
+
1. Commit ALL outstanding changes in logical batches on the branch (minus sensitive data/information) — not just changes made by the agent team. This includes pre-existing uncommitted changes that were on the branch before the plan started. Do NOT filter commits to only "task-related" files. If it shows up in git status, it gets committed (unless it contains secrets).
|
|
84
|
+
2. Push the changes - if any pre-push hook blocks you, create a task for the agent team to fix the error/problem whether it was pre-existing or not
|
|
85
|
+
3. Open a pull request with auto-merge on
|
|
86
|
+
4. Monitor the PR. Create a task for the agent team to resolve any code review comments by either implementing the suggestions or commenting why they should not be implemented and close the comment. Fix any failing checks and repush. Continue all checks pass
|
|
87
|
+
5. Monitor the deploy action that triggers automatically from the successful merge
|
|
88
|
+
6. If it fails, create a task for the agent team to fix the failure, open a new PR and then go back to step 4
|
|
89
|
+
7. Execute empirical verification. If empirical verification succeeds, you're finished, otherwise, create a task for the agent team to find out why it failed, fix it and return to step 1 (repeat this until you get all the way through)
|
|
@@ -42,4 +42,4 @@ Fix strategies: extract functions, early returns, apply formatting, add types
|
|
|
42
42
|
Verification: `bun run lint 2>&1 | grep -E "($ARGUMENTS)" | wc -l` → Expected: 0
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Invoke `/plan-
|
|
45
|
+
Invoke `/plan-execute` with this brief to create the implementation plan.
|
|
@@ -41,4 +41,4 @@ Refactoring strategies: extract functions, early returns, extract conditions, us
|
|
|
41
41
|
Verification: `bun run lint 2>&1 | grep "cognitive-complexity" | wc -l` → Expected: 0
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Invoke `/plan-
|
|
44
|
+
Invoke `/plan-execute` with this brief to create the implementation plan.
|
|
@@ -42,4 +42,4 @@ Refactoring strategies: extract modules, remove duplication, delete dead code, s
|
|
|
42
42
|
Verification: `bun run lint 2>&1 | grep "max-lines" | wc -l` → Expected: 0
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Invoke `/plan-
|
|
45
|
+
Invoke `/plan-execute` with this brief to create the implementation plan.
|
|
@@ -43,4 +43,4 @@ Refactoring strategies: extract functions, early returns, extract conditions, us
|
|
|
43
43
|
Verification: `bun run lint 2>&1 | grep "max-lines-per-function" | wc -l` → Expected: 0
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Invoke `/plan-
|
|
46
|
+
Invoke `/plan-execute` with this brief to create the implementation plan.
|
|
@@ -46,6 +46,7 @@ Never delete anything outside of this project's directory
|
|
|
46
46
|
Never add "BREAKING CHANGE" to a commit message unless there is actually a breaking change
|
|
47
47
|
Never stash changes you can't commit. Either fix whatever is prevening the commit or fail out and let the human know why.
|
|
48
48
|
Never lower thresholds for tests to pass a pre-push hook. You must increase test coverage to make it pass
|
|
49
|
+
Never handle tasks yourself when working in a team of agents. Always delegate to a specialied agent.
|
|
49
50
|
|
|
50
51
|
ONLY use eslint-disable as a last resort and confirm with human before doing so
|
|
51
52
|
ONLY use eslint-disable for test file max-lines when comprehensive test coverage requires extensive test cases (must include matching eslint-enable)
|