sequant 2.0.1 → 2.1.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/dist/bin/cli.js +2 -1
- package/dist/marketplace/external_plugins/sequant/.claude-plugin/plugin.json +1 -1
- package/dist/marketplace/external_plugins/sequant/.mcp.json +6 -0
- package/dist/marketplace/external_plugins/sequant/README.md +58 -8
- package/dist/marketplace/external_plugins/sequant/hooks/post-tool.sh +19 -8
- package/dist/marketplace/external_plugins/sequant/hooks/pre-tool.sh +36 -49
- package/dist/marketplace/external_plugins/sequant/skills/_shared/references/subagent-types.md +158 -48
- package/dist/marketplace/external_plugins/sequant/skills/assess/SKILL.md +354 -352
- package/dist/marketplace/external_plugins/sequant/skills/exec/SKILL.md +1155 -33
- package/dist/marketplace/external_plugins/sequant/skills/fullsolve/SKILL.md +35 -4
- package/dist/marketplace/external_plugins/sequant/skills/qa/SKILL.md +2157 -104
- package/dist/marketplace/external_plugins/sequant/skills/qa/scripts/quality-checks.sh +1 -1
- package/dist/marketplace/external_plugins/sequant/skills/setup/SKILL.md +386 -0
- package/dist/marketplace/external_plugins/sequant/skills/solve/SKILL.md +38 -664
- package/dist/marketplace/external_plugins/sequant/skills/spec/SKILL.md +505 -120
- package/dist/marketplace/external_plugins/sequant/skills/test/SKILL.md +246 -1
- package/dist/marketplace/external_plugins/sequant/skills/testgen/SKILL.md +138 -1
- package/dist/src/commands/dashboard.js +1 -1
- package/dist/src/commands/doctor.js +1 -1
- package/dist/src/commands/init.js +10 -10
- package/dist/src/commands/logs.js +1 -1
- package/dist/src/commands/run.js +49 -39
- package/dist/src/commands/state.js +3 -3
- package/dist/src/commands/status.js +5 -5
- package/dist/src/commands/sync.js +8 -8
- package/dist/src/commands/update.js +16 -16
- package/dist/src/lib/cli-ui.js +20 -19
- package/dist/src/lib/mcp-config.js +1 -1
- package/dist/src/lib/merge-check/index.js +2 -2
- package/dist/src/lib/settings.d.ts +8 -0
- package/dist/src/lib/settings.js +1 -0
- package/dist/src/lib/shutdown.js +1 -1
- package/dist/src/lib/templates.js +2 -0
- package/dist/src/lib/wizard.js +6 -4
- package/dist/src/lib/workflow/batch-executor.js +1 -1
- package/dist/src/lib/workflow/log-writer.js +6 -6
- package/dist/src/lib/workflow/metrics-writer.js +5 -3
- package/dist/src/lib/workflow/phase-executor.js +5 -1
- package/dist/src/lib/workflow/platforms/github.js +5 -1
- package/dist/src/lib/workflow/state-cleanup.js +1 -1
- package/dist/src/lib/workflow/state-manager.js +15 -13
- package/dist/src/lib/workflow/state-rebuild.js +2 -2
- package/dist/src/lib/workflow/types.d.ts +11 -0
- package/dist/src/lib/workflow/worktree-manager.js +40 -41
- package/dist/src/lib/worktree-isolation.d.ts +130 -0
- package/dist/src/lib/worktree-isolation.js +310 -0
- package/package.json +8 -8
- package/templates/agents/sequant-explorer.md +23 -0
- package/templates/agents/sequant-implementer.md +18 -0
- package/templates/agents/sequant-qa-checker.md +24 -0
- package/templates/agents/sequant-testgen.md +25 -0
- package/templates/scripts/cleanup-worktree.sh +18 -0
- package/templates/skills/_shared/references/subagent-types.md +158 -48
- package/templates/skills/exec/SKILL.md +72 -6
- package/templates/skills/qa/SKILL.md +8 -217
- package/templates/skills/spec/SKILL.md +446 -120
- package/templates/skills/testgen/SKILL.md +138 -1
package/dist/marketplace/external_plugins/sequant/skills/_shared/references/subagent-types.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Claude Code Subagent Types
|
|
2
2
|
|
|
3
|
-
Reference for valid subagent types when spawning agents via the `
|
|
3
|
+
Reference for valid subagent types when spawning agents via the `Agent` tool.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Built-in Types
|
|
6
6
|
|
|
7
|
-
Claude Code supports exactly **4 subagent types**:
|
|
7
|
+
Claude Code supports exactly **4 built-in subagent types**:
|
|
8
8
|
|
|
9
9
|
| Type | Purpose | Tools Available |
|
|
10
10
|
|------|---------|-----------------|
|
|
@@ -13,55 +13,122 @@ Claude Code supports exactly **4 subagent types**:
|
|
|
13
13
|
| `Explore` | Codebase exploration, file search, pattern finding | Read-only tools |
|
|
14
14
|
| `Plan` | Architecture planning, implementation design | Read-only tools |
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Custom Agents (Sequant)
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Sequant defines **4 custom agents** in `.claude/agents/`. These centralize model, permissions, effort, and tool restrictions that were previously duplicated inline.
|
|
19
|
+
|
|
20
|
+
| Agent Name | Based On | Model | Permission Mode | Used By |
|
|
21
|
+
|------------|----------|-------|-----------------|---------|
|
|
22
|
+
| `sequant-explorer` | Explore | haiku | (default) | `/spec` |
|
|
23
|
+
| `sequant-qa-checker` | general-purpose | haiku | bypassPermissions | `/qa` |
|
|
24
|
+
| `sequant-implementer` | general-purpose | (inherits) | bypassPermissions | `/exec` |
|
|
25
|
+
| `sequant-testgen` | general-purpose | haiku | (default) | `/testgen` |
|
|
26
|
+
|
|
27
|
+
### sequant-explorer
|
|
28
|
+
|
|
29
|
+
Read-only codebase exploration for the `/spec` phase. No Bash, Edit, or Write access.
|
|
20
30
|
|
|
21
31
|
```
|
|
22
|
-
|
|
32
|
+
Agent(subagent_type="sequant-explorer",
|
|
33
|
+
prompt="Find similar features in components/. Report patterns.")
|
|
23
34
|
```
|
|
24
35
|
|
|
25
|
-
###
|
|
26
|
-
|
|
36
|
+
### sequant-qa-checker
|
|
37
|
+
|
|
38
|
+
Quality check agent for the `/qa` phase. Has `bypassPermissions` for Bash access (git diff, npm test). Effort: low.
|
|
27
39
|
|
|
28
40
|
```
|
|
29
|
-
|
|
41
|
+
Agent(subagent_type="sequant-qa-checker",
|
|
30
42
|
prompt="Run type safety checks on the diff. Report: type issues, verdict.")
|
|
31
43
|
```
|
|
32
44
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
45
|
+
### sequant-implementer
|
|
46
|
+
|
|
47
|
+
Implementation agent for `/exec` parallel groups. Inherits model from parent (user-configurable). Has `bypassPermissions` for full tool access.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Agent(subagent_type="sequant-implementer",
|
|
51
|
+
prompt="Implement the UserCard component in components/admin/...")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### sequant-testgen
|
|
37
55
|
|
|
38
|
-
|
|
39
|
-
Best for: Codebase search, pattern discovery, schema inspection
|
|
56
|
+
Test stub generator for the `/testgen` phase. Has Write access but no Bash access.
|
|
40
57
|
|
|
41
58
|
```
|
|
42
|
-
|
|
43
|
-
prompt="
|
|
59
|
+
Agent(subagent_type="sequant-testgen",
|
|
60
|
+
prompt="Generate test stubs for AC-1: User authentication...")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Agent Definition Location
|
|
64
|
+
|
|
65
|
+
Custom agents are defined in `.claude/agents/*.md` with YAML frontmatter:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
---
|
|
69
|
+
name: sequant-qa-checker
|
|
70
|
+
description: Quality check agent for sequant QA phase.
|
|
71
|
+
model: haiku
|
|
72
|
+
permissionMode: bypassPermissions
|
|
73
|
+
effort: low
|
|
74
|
+
maxTurns: 15
|
|
75
|
+
tools:
|
|
76
|
+
- Read
|
|
77
|
+
- Grep
|
|
78
|
+
- Glob
|
|
79
|
+
- Bash
|
|
80
|
+
- Edit
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
[Agent behavioral instructions here]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Agent Resolution Priority
|
|
87
|
+
|
|
88
|
+
Claude Code resolves agent names in this order:
|
|
89
|
+
1. Managed settings
|
|
90
|
+
2. `--agents` CLI flag
|
|
91
|
+
3. `.claude/agents/` (project-level) — sequant's agents live here
|
|
92
|
+
4. `~/.claude/agents/` (user-level) — users can override here
|
|
93
|
+
5. Plugin agents
|
|
94
|
+
|
|
95
|
+
## When to Use Each
|
|
96
|
+
|
|
97
|
+
### Built-in `Bash`
|
|
98
|
+
Best for: Single command execution, git operations, build commands
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Agent(subagent_type="Bash", prompt="Run npm test and report results")
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Built-in `general-purpose`
|
|
105
|
+
Best for: Custom tasks that don't fit a sequant agent profile
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Agent(subagent_type="general-purpose",
|
|
109
|
+
prompt="Analyze the error logs and suggest fixes.")
|
|
44
110
|
```
|
|
45
111
|
|
|
46
112
|
**Use cases:**
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- Understanding codebase structure
|
|
50
|
-
- Schema and database inspection
|
|
113
|
+
- One-off tasks outside the sequant workflow
|
|
114
|
+
- Tasks needing a specific model/permission combination
|
|
51
115
|
|
|
52
|
-
### `
|
|
116
|
+
### Built-in `Explore`
|
|
117
|
+
Best for: Ad-hoc codebase search outside the `/spec` workflow
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Agent(subagent_type="Explore",
|
|
121
|
+
prompt="Find all API routes in the project.")
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Built-in `Plan`
|
|
53
125
|
Best for: Designing implementation approaches, architectural decisions
|
|
54
126
|
|
|
55
127
|
```
|
|
56
|
-
|
|
128
|
+
Agent(subagent_type="Plan",
|
|
57
129
|
prompt="Design the implementation approach for adding user auth.")
|
|
58
130
|
```
|
|
59
131
|
|
|
60
|
-
**Use cases:**
|
|
61
|
-
- Creating implementation plans
|
|
62
|
-
- Evaluating architectural trade-offs
|
|
63
|
-
- Breaking down complex features
|
|
64
|
-
|
|
65
132
|
## Model Selection
|
|
66
133
|
|
|
67
134
|
| Model | When to Use | Cost |
|
|
@@ -72,60 +139,103 @@ Task(subagent_type="Plan",
|
|
|
72
139
|
|
|
73
140
|
**Default:** Use `haiku` unless the task requires deep reasoning.
|
|
74
141
|
|
|
142
|
+
Custom agents set their model in the agent definition, so you don't need to specify it inline:
|
|
143
|
+
|
|
75
144
|
```
|
|
76
|
-
|
|
77
|
-
|
|
145
|
+
# Model comes from .claude/agents/sequant-qa-checker.md (haiku)
|
|
146
|
+
Agent(subagent_type="sequant-qa-checker",
|
|
78
147
|
prompt="...")
|
|
79
148
|
```
|
|
80
149
|
|
|
81
150
|
## Common Patterns
|
|
82
151
|
|
|
83
|
-
### Parallel Quality Checks
|
|
152
|
+
### Parallel Quality Checks (via /qa)
|
|
84
153
|
```
|
|
85
|
-
|
|
154
|
+
Agent(subagent_type="sequant-qa-checker",
|
|
86
155
|
prompt="Check type safety on diff vs main. Report issues count.")
|
|
87
156
|
|
|
88
|
-
|
|
157
|
+
Agent(subagent_type="sequant-qa-checker",
|
|
89
158
|
prompt="Check for deleted tests in diff. Report count.")
|
|
90
159
|
|
|
91
|
-
|
|
160
|
+
Agent(subagent_type="sequant-qa-checker",
|
|
92
161
|
prompt="Run security scan on changed files. Report findings.")
|
|
93
162
|
```
|
|
94
163
|
|
|
95
|
-
### Context Gathering (
|
|
164
|
+
### Context Gathering (via /spec)
|
|
96
165
|
```
|
|
97
|
-
|
|
166
|
+
Agent(subagent_type="sequant-explorer",
|
|
98
167
|
prompt="Find similar features in components/. Report patterns.")
|
|
99
168
|
|
|
100
|
-
|
|
169
|
+
Agent(subagent_type="sequant-explorer",
|
|
101
170
|
prompt="Explore database schema for user tables. Report structure.")
|
|
102
171
|
```
|
|
103
172
|
|
|
104
|
-
### Background Execution
|
|
173
|
+
### Background Execution (via /exec)
|
|
105
174
|
```
|
|
106
|
-
|
|
107
|
-
model="haiku",
|
|
175
|
+
Agent(subagent_type="sequant-implementer",
|
|
108
176
|
run_in_background=true,
|
|
109
177
|
prompt="Implement the UserCard component...")
|
|
110
178
|
```
|
|
111
179
|
|
|
112
180
|
Use `TaskOutput(task_id="...", block=true)` to wait for completion.
|
|
113
181
|
|
|
182
|
+
**IMPORTANT: Background agents and permissions**
|
|
183
|
+
|
|
184
|
+
Background agents cannot prompt for permission interactively. Custom agents with
|
|
185
|
+
`permissionMode: bypassPermissions` in their definition handle this automatically.
|
|
186
|
+
For built-in types, set `mode` explicitly when spawning background agents.
|
|
187
|
+
|
|
188
|
+
### Permission Mode Reference
|
|
189
|
+
|
|
190
|
+
| Mode | Edit/Write | Bash | When to Use |
|
|
191
|
+
|------|------------|------|-------------|
|
|
192
|
+
| `"acceptEdits"` | ✅ Auto-approved | ❌ **Denied** (prompts) | File-editing agents that don't need Bash |
|
|
193
|
+
| `"bypassPermissions"` | ✅ Auto-approved | ✅ Auto-approved | **Agents that need Bash** (quality checks, git commands) |
|
|
194
|
+
| (omitted) | ❌ Prompts | ❌ Prompts | Only if parent already auto-approves |
|
|
195
|
+
|
|
196
|
+
**Note:** Sequant's custom agents (`sequant-qa-checker`, `sequant-implementer`) have
|
|
197
|
+
`permissionMode` set in their agent definitions, so you don't need to specify `mode`
|
|
198
|
+
inline when spawning them.
|
|
199
|
+
|
|
200
|
+
### Choosing the Right Agent
|
|
201
|
+
|
|
202
|
+
| Task | Recommended Agent | Why |
|
|
203
|
+
|------|-------------------|-----|
|
|
204
|
+
| Quality checks (git diff, npm test) | `sequant-qa-checker` | bypassPermissions + haiku + effort:low |
|
|
205
|
+
| Codebase exploration | `sequant-explorer` | Read-only, haiku, focused tools |
|
|
206
|
+
| Implementation subtask | `sequant-implementer` | Full access, inherits model |
|
|
207
|
+
| Test stub generation | `sequant-testgen` | Write access, no Bash, haiku |
|
|
208
|
+
| One-off custom task | `general-purpose` | Flexible, specify model/mode inline |
|
|
209
|
+
|
|
210
|
+
**CRITICAL:** If your background agent runs `git diff`, `npm test`, `git status`, or any shell command, use `sequant-qa-checker` or `sequant-implementer` (both have bypassPermissions). Do NOT use `general-purpose` without `mode="bypassPermissions"` — Bash calls will silently fail.
|
|
211
|
+
|
|
212
|
+
### Security Considerations
|
|
213
|
+
|
|
214
|
+
`bypassPermissions` is safe when:
|
|
215
|
+
- Agent only reads/analyzes (quality checks, security scans)
|
|
216
|
+
- Agent runs in an isolated worktree
|
|
217
|
+
- Agent output is reviewed before any further action
|
|
218
|
+
|
|
219
|
+
`bypassPermissions` requires caution when:
|
|
220
|
+
- Agent could write to production files
|
|
221
|
+
- Agent could push to remote repositories
|
|
222
|
+
- Agent has access to secrets or credentials
|
|
223
|
+
|
|
114
224
|
## Invalid Types (Do Not Use)
|
|
115
225
|
|
|
116
226
|
These types do **not exist** and will cause silent failures:
|
|
117
227
|
|
|
118
|
-
- ~~`quality-checker`~~ → Use `general-purpose`
|
|
119
|
-
- ~~`pattern-scout`~~ → Use `Explore`
|
|
120
|
-
- ~~`schema-inspector`~~ → Use `Explore`
|
|
121
|
-
- ~~`code-reviewer`~~ → Use `general-purpose`
|
|
122
|
-
- ~~`implementation`~~ → Use `general-purpose`
|
|
228
|
+
- ~~`quality-checker`~~ → Use `sequant-qa-checker` or `general-purpose`
|
|
229
|
+
- ~~`pattern-scout`~~ → Use `sequant-explorer` or `Explore`
|
|
230
|
+
- ~~`schema-inspector`~~ → Use `sequant-explorer` or `Explore`
|
|
231
|
+
- ~~`code-reviewer`~~ → Use `sequant-qa-checker` or `general-purpose`
|
|
232
|
+
- ~~`implementation`~~ → Use `sequant-implementer` or `general-purpose`
|
|
123
233
|
|
|
124
234
|
See issue #170 for context on this fix.
|
|
125
235
|
|
|
126
236
|
## References
|
|
127
237
|
|
|
128
|
-
- [Claude Code
|
|
129
|
-
-
|
|
238
|
+
- [Claude Code Custom Subagents](https://code.claude.com/docs/en/sub-agents)
|
|
239
|
+
- Agent definitions: `.claude/agents/*.md`
|
|
130
240
|
- `/exec` skill parallel execution: `templates/skills/exec/SKILL.md`
|
|
131
241
|
- `/qa` skill quality checks: `templates/skills/qa/SKILL.md`
|