@mindfoldhq/trellis 0.5.0-beta.1 → 0.5.0-beta.10
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/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +380 -116
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +97 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +10 -8
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/opencode.d.ts +10 -3
- package/dist/configurators/opencode.d.ts.map +1 -1
- package/dist/configurators/opencode.js +58 -32
- package/dist/configurators/opencode.js.map +1 -1
- package/dist/configurators/qoder.d.ts +7 -6
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +17 -9
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/shared.d.ts +3 -1
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +26 -3
- package/dist/configurators/shared.js.map +1 -1
- package/dist/migrations/manifests/0.5.0-beta.0.json +2 -0
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.5.json +222 -0
- package/dist/migrations/manifests/0.5.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.9.json +48 -0
- package/dist/templates/claude/agents/{check.md → trellis-check.md} +1 -2
- package/dist/templates/{cursor/agents/implement.md → claude/agents/trellis-implement.md} +1 -2
- package/dist/templates/{cursor/agents/research.md → claude/agents/trellis-research.md} +1 -2
- package/dist/templates/claude/settings.json +3 -0
- package/dist/templates/{cursor/agents/check.md → codebuddy/agents/trellis-check.md} +1 -2
- package/dist/templates/{claude/agents/implement.md → codebuddy/agents/trellis-implement.md} +1 -2
- package/dist/templates/{droid/droids/research.md → codebuddy/agents/trellis-research.md} +1 -2
- package/dist/templates/codex/agents/trellis-check.toml +38 -0
- package/dist/templates/codex/agents/{implement.toml → trellis-implement.toml} +1 -1
- package/dist/templates/codex/agents/{research.toml → trellis-research.toml} +1 -1
- package/dist/templates/codex/skills/start/SKILL.md +1 -1
- package/dist/templates/common/skills/brainstorm.md +47 -4
- package/dist/templates/copilot/prompts/start.prompt.md +13 -16
- package/dist/templates/{droid/droids/check.md → cursor/agents/trellis-check.md} +1 -2
- package/dist/templates/{codebuddy/agents/implement.md → cursor/agents/trellis-implement.md} +1 -2
- package/dist/templates/{claude/agents/research.md → cursor/agents/trellis-research.md} +1 -2
- package/dist/templates/{codebuddy/agents/check.md → droid/droids/trellis-check.md} +1 -2
- package/dist/templates/droid/droids/{implement.md → trellis-implement.md} +1 -2
- package/dist/templates/{codebuddy/agents/research.md → droid/droids/trellis-research.md} +1 -2
- package/dist/templates/gemini/agents/trellis-check.md +94 -0
- package/dist/templates/gemini/agents/trellis-implement.md +94 -0
- package/dist/templates/gemini/agents/trellis-research.md +137 -0
- package/dist/templates/kiro/agents/{check.json → trellis-check.json} +1 -1
- package/dist/templates/kiro/agents/{implement.json → trellis-implement.json} +1 -1
- package/dist/templates/kiro/agents/{research.json → trellis-research.json} +1 -1
- package/dist/templates/opencode/plugins/inject-subagent-context.js +10 -8
- package/dist/templates/opencode/plugins/inject-workflow-state.js +27 -15
- package/dist/templates/opencode/plugins/session-start.js +5 -7
- package/dist/templates/qoder/agents/trellis-check.md +94 -0
- package/dist/templates/qoder/agents/trellis-implement.md +94 -0
- package/dist/templates/qoder/agents/trellis-research.md +137 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +3 -3
- package/dist/templates/shared-hooks/inject-workflow-state.py +21 -8
- package/dist/templates/shared-hooks/session-start.py +14 -4
- package/dist/templates/trellis/config.yaml +6 -0
- package/dist/templates/trellis/index.d.ts +0 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +0 -2
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/cli_adapter.py +29 -6
- package/dist/templates/trellis/scripts/common/task_context.py +20 -5
- package/dist/templates/trellis/scripts/common/types.py +0 -2
- package/dist/templates/trellis/scripts/task.py +7 -0
- package/dist/templates/trellis/workflow.md +15 -7
- package/dist/types/ai-tools.d.ts +9 -0
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +13 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/project-detector.d.ts +2 -0
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +120 -11
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/task-json.d.ts +46 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +49 -0
- package/dist/utils/task-json.js.map +1 -0
- package/package.json +1 -1
- package/dist/templates/codex/agents/check.toml +0 -23
- package/dist/templates/gemini/agents/check.md +0 -95
- package/dist/templates/gemini/agents/implement.md +0 -95
- package/dist/templates/gemini/agents/research.md +0 -138
- package/dist/templates/markdown/spec/backend/directory-structure.md +0 -292
- package/dist/templates/markdown/spec/backend/index.md +0 -40
- package/dist/templates/markdown/spec/backend/script-conventions.md +0 -742
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +0 -118
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +0 -394
- package/dist/templates/qoder/agents/check.md +0 -95
- package/dist/templates/qoder/agents/implement.md +0 -95
- package/dist/templates/qoder/agents/research.md +0 -138
- package/dist/templates/trellis/scripts/create_bootstrap.py +0 -298
- /package/dist/templates/opencode/agents/{check.md → trellis-check.md} +0 -0
- /package/dist/templates/opencode/agents/{implement.md → trellis-implement.md} +0 -0
- /package/dist/templates/opencode/agents/{research.md → trellis-research.md} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implement
|
|
2
|
+
name: trellis-implement
|
|
3
3
|
description: |
|
|
4
4
|
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Implement Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: research
|
|
2
|
+
name: trellis-research
|
|
3
3
|
description: |
|
|
4
4
|
Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
|
|
5
5
|
tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Research Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: check
|
|
2
|
+
name: trellis-check
|
|
3
3
|
description: |
|
|
4
4
|
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Check Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implement
|
|
2
|
+
name: trellis-implement
|
|
3
3
|
description: |
|
|
4
4
|
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Implement Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: research
|
|
2
|
+
name: trellis-research
|
|
3
3
|
description: |
|
|
4
4
|
Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
|
|
5
5
|
tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Research Agent
|
|
9
8
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name = "trellis-check"
|
|
2
|
+
description = "Workspace-write Trellis reviewer that self-fixes spec drift, lint/type-check failures, and missing tests."
|
|
3
|
+
sandbox_mode = "workspace-write"
|
|
4
|
+
|
|
5
|
+
developer_instructions = """
|
|
6
|
+
You are the Trellis reviewer agent.
|
|
7
|
+
|
|
8
|
+
Your job is to review code changes against specs AND fix issues directly — not just report them. You have write access; use it.
|
|
9
|
+
|
|
10
|
+
Review checklist:
|
|
11
|
+
- Verify behavior against the actual code paths, not assumptions.
|
|
12
|
+
- Look for missing template/update/detection touch points when platform config changes.
|
|
13
|
+
- Check whether tests should be added or updated.
|
|
14
|
+
- Check whether `.trellis/spec/` docs need sync after implementation.
|
|
15
|
+
- Run lint and type-check; fix any failures.
|
|
16
|
+
- Prefer concrete findings over speculative warnings.
|
|
17
|
+
|
|
18
|
+
When you find an issue:
|
|
19
|
+
1. Fix it directly using edit/write tools.
|
|
20
|
+
2. Re-run lint and type-check until green.
|
|
21
|
+
3. Record what you changed and why.
|
|
22
|
+
|
|
23
|
+
Output format:
|
|
24
|
+
## Findings (fixed)
|
|
25
|
+
- File: <path>
|
|
26
|
+
- Issue: <what was wrong>
|
|
27
|
+
- Fix: <what you changed>
|
|
28
|
+
|
|
29
|
+
## Findings (not fixed)
|
|
30
|
+
Only list issues you could not self-fix (e.g. missing product decision, out-of-scope). Explain why.
|
|
31
|
+
|
|
32
|
+
## Verification
|
|
33
|
+
- Lint: pass/fail
|
|
34
|
+
- TypeCheck: pass/fail
|
|
35
|
+
- Tests: pass/fail (if applicable)
|
|
36
|
+
|
|
37
|
+
If no issues are found, say so explicitly after verifying lint/type-check pass.
|
|
38
|
+
"""
|
|
@@ -247,7 +247,7 @@ Use this output format:
|
|
|
247
247
|
Initialize default context:
|
|
248
248
|
|
|
249
249
|
```bash
|
|
250
|
-
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type>
|
|
250
|
+
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type> --platform {{CLI_FLAG}}
|
|
251
251
|
# type: backend | frontend | fullstack
|
|
252
252
|
```
|
|
253
253
|
|
|
@@ -184,18 +184,61 @@ Examples:
|
|
|
184
184
|
* The user asks for "best practice", "how others do it", "recommendation"
|
|
185
185
|
* The user can't reasonably enumerate options
|
|
186
186
|
|
|
187
|
-
###
|
|
187
|
+
### Delegate to `trellis-research` sub-agent (don't research inline)
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
For each research topic, **spawn a `trellis-research` sub-agent via the Task tool** — don't do WebFetch / WebSearch / `gh api` inline in the main conversation.
|
|
190
|
+
|
|
191
|
+
Why:
|
|
192
|
+
- The sub-agent has its own context window → doesn't pollute brainstorm context with raw tool output
|
|
193
|
+
- It persists findings to `{TASK_DIR}/research/<topic>.md` (the contract — see `workflow.md` Phase 1.2)
|
|
194
|
+
- It returns only `{file path, one-line summary}` to the main agent
|
|
195
|
+
- Independent topics can be **parallelized** — spawn multiple sub-agents in one tool call
|
|
196
|
+
|
|
197
|
+
Agent type: `trellis-research`
|
|
198
|
+
Task description template: "Research <specific question>; persist findings to `{TASK_DIR}/research/<topic-slug>.md`."
|
|
199
|
+
|
|
200
|
+
❌ Bad (what you must NOT do):
|
|
201
|
+
```
|
|
202
|
+
Main agent: WebFetch(url-A) → WebFetch(url-B) → Bash(gh api ...)
|
|
203
|
+
→ WebSearch(q1) → WebSearch(q2) → ... (10+ inline calls)
|
|
204
|
+
→ Write(research/topic.md)
|
|
205
|
+
```
|
|
206
|
+
→ Pollutes main context with raw HTML/JSON, burns tokens.
|
|
207
|
+
|
|
208
|
+
✅ Good:
|
|
209
|
+
```
|
|
210
|
+
Main agent: Task(subagent_type="trellis-research",
|
|
211
|
+
prompt="Research topic A; persist to research/topic-a.md")
|
|
212
|
+
+ Task(subagent_type="trellis-research",
|
|
213
|
+
prompt="Research topic B; persist to research/topic-b.md")
|
|
214
|
+
+ Task(subagent_type="trellis-research",
|
|
215
|
+
prompt="Research topic C; persist to research/topic-c.md")
|
|
216
|
+
→ Reads research/topic-{a,b,c}.md after they finish.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Research steps (to pass into each sub-agent prompt)
|
|
220
|
+
|
|
221
|
+
Each `trellis-research` sub-agent should:
|
|
222
|
+
|
|
223
|
+
1. Identify 2–4 comparable tools/patterns for its topic
|
|
190
224
|
2. Summarize common conventions and why they exist
|
|
191
225
|
3. Map conventions onto our repo constraints
|
|
192
|
-
4.
|
|
226
|
+
4. Write findings to `{TASK_DIR}/research/<topic>.md`
|
|
227
|
+
|
|
228
|
+
Main agent then reads the persisted files and produces **2–3 feasible approaches** in PRD.
|
|
193
229
|
|
|
194
230
|
### Research output format (PRD)
|
|
195
231
|
|
|
196
|
-
|
|
232
|
+
The PRD itself should only reference the persisted research files, not duplicate their content. Add a `## Research References` section pointing at `research/*.md`.
|
|
233
|
+
|
|
234
|
+
Optionally, add a convergence section with feasible approaches derived from the research:
|
|
197
235
|
|
|
198
236
|
```markdown
|
|
237
|
+
## Research References
|
|
238
|
+
|
|
239
|
+
* [`research/<topic-a>.md`](research/<topic-a>.md) — <one-line takeaway>
|
|
240
|
+
* [`research/<topic-b>.md`](research/<topic-b>.md) — <one-line takeaway>
|
|
241
|
+
|
|
199
242
|
## Research Notes
|
|
200
243
|
|
|
201
244
|
### What similar tools do
|
|
@@ -54,7 +54,7 @@ cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
|
54
54
|
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
> **Important**: The index files are navigation �?they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
57
|
+
> **Important**: The index files are navigation �?they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
58
58
|
> At this step, just read the indexes to understand what's available.
|
|
59
59
|
> When you start actual development, you MUST go back and read the specific guideline files relevant to your task, as listed in the index's Pre-Development Checklist.
|
|
60
60
|
|
|
@@ -72,8 +72,8 @@ When user describes a task, classify it:
|
|
|
72
72
|
|------|----------|----------|
|
|
73
73
|
| **Question** | User asks about code, architecture, or how something works | Answer directly |
|
|
74
74
|
| **Trivial Fix** | Typo fix, comment update, single-line change | Direct Edit |
|
|
75
|
-
| **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm �?Implement |
|
|
76
|
-
| **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm �?Task Workflow** |
|
|
75
|
+
| **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm �?Implement |
|
|
76
|
+
| **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm �?Task Workflow** |
|
|
77
77
|
|
|
78
78
|
### Classification Signals
|
|
79
79
|
|
|
@@ -128,7 +128,7 @@ For simple, well-defined tasks:
|
|
|
128
128
|
|
|
129
129
|
## Complex Task - Brainstorm First
|
|
130
130
|
|
|
131
|
-
For complex or vague tasks, **automatically start the brainstorm process** �?do NOT skip directly to implementation.
|
|
131
|
+
For complex or vague tasks, **automatically start the brainstorm process** �?do NOT skip directly to implementation.
|
|
132
132
|
|
|
133
133
|
See `/` for the full process. Summary:
|
|
134
134
|
|
|
@@ -167,10 +167,10 @@ See `/` for the full process. Summary:
|
|
|
167
167
|
|
|
168
168
|
```
|
|
169
169
|
From Brainstorm (Complex Task):
|
|
170
|
-
PRD confirmed �?Research �?Configure Context �?Activate �?Implement �?Check �?Complete
|
|
170
|
+
PRD confirmed �?Research �?Configure Context �?Activate �?Implement �?Check �?Complete
|
|
171
171
|
|
|
172
172
|
From Simple Task:
|
|
173
|
-
Confirm �?Create Task �?Write PRD �?Research �?Configure Context �?Activate �?Implement �?Check �?Complete
|
|
173
|
+
Confirm �?Create Task �?Write PRD �?Research �?Configure Context �?Activate �?Implement �?Check �?Complete
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
**Key principle: Research happens AFTER requirements are clear (PRD exists).**
|
|
@@ -248,7 +248,7 @@ Based on the confirmed PRD, call Research Agent to find relevant specs and patte
|
|
|
248
248
|
|
|
249
249
|
```
|
|
250
250
|
Task(
|
|
251
|
-
subagent_type: "research",
|
|
251
|
+
subagent_type: "trellis-research",
|
|
252
252
|
prompt: "Analyze the codebase for this task:
|
|
253
253
|
|
|
254
254
|
Task: <goal from PRD>
|
|
@@ -267,8 +267,7 @@ Task(
|
|
|
267
267
|
- <pattern>: <example file path>
|
|
268
268
|
|
|
269
269
|
## Files to Modify
|
|
270
|
-
- <path>: <what change>"
|
|
271
|
-
model: "opus"
|
|
270
|
+
- <path>: <what change>"
|
|
272
271
|
)
|
|
273
272
|
```
|
|
274
273
|
|
|
@@ -277,7 +276,7 @@ Task(
|
|
|
277
276
|
Initialize default context:
|
|
278
277
|
|
|
279
278
|
```bash
|
|
280
|
-
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type>
|
|
279
|
+
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type> --platform {{CLI_FLAG}}
|
|
281
280
|
# type: backend | frontend | fullstack
|
|
282
281
|
```
|
|
283
282
|
|
|
@@ -307,12 +306,11 @@ Call Implement Agent (code-spec context is auto-injected by hook):
|
|
|
307
306
|
|
|
308
307
|
```
|
|
309
308
|
Task(
|
|
310
|
-
subagent_type: "implement",
|
|
309
|
+
subagent_type: "trellis-implement",
|
|
311
310
|
prompt: "Implement the task described in prd.md.
|
|
312
311
|
|
|
313
312
|
Follow all code-spec files that have been injected into your context.
|
|
314
|
-
Run lint and typecheck before finishing."
|
|
315
|
-
model: "opus"
|
|
313
|
+
Run lint and typecheck before finishing."
|
|
316
314
|
)
|
|
317
315
|
```
|
|
318
316
|
|
|
@@ -322,12 +320,11 @@ Call Check Agent (code-spec context is auto-injected by hook):
|
|
|
322
320
|
|
|
323
321
|
```
|
|
324
322
|
Task(
|
|
325
|
-
subagent_type: "check",
|
|
323
|
+
subagent_type: "trellis-check",
|
|
326
324
|
prompt: "Review all code changes against the code-spec requirements.
|
|
327
325
|
|
|
328
326
|
Fix any issues you find directly.
|
|
329
|
-
Ensure lint and typecheck pass."
|
|
330
|
-
model: "opus"
|
|
327
|
+
Ensure lint and typecheck pass."
|
|
331
328
|
)
|
|
332
329
|
```
|
|
333
330
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: check
|
|
2
|
+
name: trellis-check
|
|
3
3
|
description: |
|
|
4
4
|
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Check Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implement
|
|
2
|
+
name: trellis-implement
|
|
3
3
|
description: |
|
|
4
4
|
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Implement Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: research
|
|
2
|
+
name: trellis-research
|
|
3
3
|
description: |
|
|
4
4
|
Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
|
|
5
5
|
tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Research Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: check
|
|
2
|
+
name: trellis-check
|
|
3
3
|
description: |
|
|
4
4
|
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Check Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implement
|
|
2
|
+
name: trellis-implement
|
|
3
3
|
description: |
|
|
4
4
|
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
5
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Implement Agent
|
|
9
8
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: research
|
|
2
|
+
name: trellis-research
|
|
3
3
|
description: |
|
|
4
4
|
Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
|
|
5
5
|
tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
6
|
-
model: opus
|
|
7
6
|
---
|
|
8
7
|
# Research Agent
|
|
9
8
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-check
|
|
3
|
+
description: |
|
|
4
|
+
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
---
|
|
7
|
+
# Check Agent
|
|
8
|
+
|
|
9
|
+
You are the Check Agent in the Trellis workflow.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
Before checking, read:
|
|
14
|
+
- `.trellis/spec/` - Development guidelines
|
|
15
|
+
- Pre-commit checklist for quality standards
|
|
16
|
+
|
|
17
|
+
## Core Responsibilities
|
|
18
|
+
|
|
19
|
+
1. **Get code changes** - Use git diff to get uncommitted code
|
|
20
|
+
2. **Check against specs** - Verify code follows guidelines
|
|
21
|
+
3. **Self-fix** - Fix issues yourself, not just report them
|
|
22
|
+
4. **Run verification** - typecheck and lint
|
|
23
|
+
|
|
24
|
+
## Important
|
|
25
|
+
|
|
26
|
+
**Fix issues yourself**, don't just report them.
|
|
27
|
+
|
|
28
|
+
You have write and edit tools, you can modify code directly.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
### Step 1: Get Changes
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git diff --name-only # List changed files
|
|
38
|
+
git diff # View specific changes
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Check Against Specs
|
|
42
|
+
|
|
43
|
+
Read relevant specs in `.trellis/spec/` to check code:
|
|
44
|
+
|
|
45
|
+
- Does it follow directory structure conventions
|
|
46
|
+
- Does it follow naming conventions
|
|
47
|
+
- Does it follow code patterns
|
|
48
|
+
- Are there missing types
|
|
49
|
+
- Are there potential bugs
|
|
50
|
+
|
|
51
|
+
### Step 3: Self-Fix
|
|
52
|
+
|
|
53
|
+
After finding issues:
|
|
54
|
+
|
|
55
|
+
1. Fix the issue directly (use edit tool)
|
|
56
|
+
2. Record what was fixed
|
|
57
|
+
3. Continue checking other issues
|
|
58
|
+
|
|
59
|
+
### Step 4: Run Verification
|
|
60
|
+
|
|
61
|
+
Run project's lint and typecheck commands to verify changes.
|
|
62
|
+
|
|
63
|
+
If failed, fix issues and re-run.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Report Format
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## Self-Check Complete
|
|
71
|
+
|
|
72
|
+
### Files Checked
|
|
73
|
+
|
|
74
|
+
- src/components/Feature.tsx
|
|
75
|
+
- src/hooks/useFeature.ts
|
|
76
|
+
|
|
77
|
+
### Issues Found and Fixed
|
|
78
|
+
|
|
79
|
+
1. `<file>:<line>` - <what was fixed>
|
|
80
|
+
2. `<file>:<line>` - <what was fixed>
|
|
81
|
+
|
|
82
|
+
### Issues Not Fixed
|
|
83
|
+
|
|
84
|
+
(If there are issues that cannot be self-fixed, list them here with reasons)
|
|
85
|
+
|
|
86
|
+
### Verification Results
|
|
87
|
+
|
|
88
|
+
- TypeCheck: Passed
|
|
89
|
+
- Lint: Passed
|
|
90
|
+
|
|
91
|
+
### Summary
|
|
92
|
+
|
|
93
|
+
Checked X files, found Y issues, all fixed.
|
|
94
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-implement
|
|
3
|
+
description: |
|
|
4
|
+
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
---
|
|
7
|
+
# Implement Agent
|
|
8
|
+
|
|
9
|
+
You are the Implement Agent in the Trellis workflow.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
Before implementing, read:
|
|
14
|
+
- `.trellis/workflow.md` - Project workflow
|
|
15
|
+
- `.trellis/spec/` - Development guidelines
|
|
16
|
+
- Task `prd.md` - Requirements document
|
|
17
|
+
- Task `info.md` - Technical design (if exists)
|
|
18
|
+
|
|
19
|
+
## Core Responsibilities
|
|
20
|
+
|
|
21
|
+
1. **Understand specs** - Read relevant spec files in `.trellis/spec/`
|
|
22
|
+
2. **Understand requirements** - Read prd.md and info.md
|
|
23
|
+
3. **Implement features** - Write code following specs and design
|
|
24
|
+
4. **Self-check** - Ensure code quality
|
|
25
|
+
5. **Report results** - Report completion status
|
|
26
|
+
|
|
27
|
+
## Forbidden Operations
|
|
28
|
+
|
|
29
|
+
**Do NOT execute these git commands:**
|
|
30
|
+
|
|
31
|
+
- `git commit`
|
|
32
|
+
- `git push`
|
|
33
|
+
- `git merge`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
### 1. Understand Specs
|
|
40
|
+
|
|
41
|
+
Read relevant specs based on task type:
|
|
42
|
+
|
|
43
|
+
- Spec layers: `.trellis/spec/<package>/<layer>/`
|
|
44
|
+
- Shared guides: `.trellis/spec/guides/`
|
|
45
|
+
|
|
46
|
+
### 2. Understand Requirements
|
|
47
|
+
|
|
48
|
+
Read the task's prd.md and info.md:
|
|
49
|
+
|
|
50
|
+
- What are the core requirements
|
|
51
|
+
- Key points of technical design
|
|
52
|
+
- Which files to modify/create
|
|
53
|
+
|
|
54
|
+
### 3. Implement Features
|
|
55
|
+
|
|
56
|
+
- Write code following specs and technical design
|
|
57
|
+
- Follow existing code patterns
|
|
58
|
+
- Only do what's required, no over-engineering
|
|
59
|
+
|
|
60
|
+
### 4. Verify
|
|
61
|
+
|
|
62
|
+
Run project's lint and typecheck commands to verify changes.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Report Format
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
## Implementation Complete
|
|
70
|
+
|
|
71
|
+
### Files Modified
|
|
72
|
+
|
|
73
|
+
- `src/components/Feature.tsx` - New component
|
|
74
|
+
- `src/hooks/useFeature.ts` - New hook
|
|
75
|
+
|
|
76
|
+
### Implementation Summary
|
|
77
|
+
|
|
78
|
+
1. Created Feature component...
|
|
79
|
+
2. Added useFeature hook...
|
|
80
|
+
|
|
81
|
+
### Verification Results
|
|
82
|
+
|
|
83
|
+
- Lint: Passed
|
|
84
|
+
- TypeCheck: Passed
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Code Standards
|
|
90
|
+
|
|
91
|
+
- Follow existing code patterns
|
|
92
|
+
- Don't add unnecessary abstractions
|
|
93
|
+
- Only do what's required, no over-engineering
|
|
94
|
+
- Keep code readable
|