@mindfoldhq/trellis 0.5.6 → 0.5.8
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 +17 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +88 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +29 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +108 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +22 -14
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +8 -1
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +36 -9
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +71 -12
- package/dist/configurators/shared.js.map +1 -1
- package/dist/migrations/index.d.ts +8 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +23 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/manifests/0.5.7.json +16 -0
- package/dist/migrations/manifests/0.5.8.json +9 -0
- package/dist/templates/codex/agents/trellis-check.toml +39 -0
- package/dist/templates/codex/agents/trellis-implement.toml +39 -0
- package/dist/templates/codex/agents/trellis-research.toml +12 -0
- package/dist/templates/codex/config.toml +7 -4
- package/dist/templates/codex/skills/brainstorm/SKILL.md +8 -0
- package/dist/templates/common/skills/brainstorm.md +10 -0
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +48 -40
- package/dist/templates/kiro/agents/trellis-check.json +15 -8
- package/dist/templates/kiro/agents/trellis-implement.json +15 -8
- package/dist/templates/kiro/agents/trellis-research.json +17 -8
- package/dist/templates/markdown/agents.md +0 -36
- package/dist/templates/shared-hooks/inject-workflow-state.py +51 -5
- package/dist/templates/trellis/config.yaml +11 -0
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/git_context.py +6 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +131 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +15 -0
- package/dist/templates/trellis/workflow.md +25 -3
- package/dist/types/migration.d.ts +30 -0
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +1 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,12 +4,20 @@ description: "Trellis Copilot prompt: Brainstorm - Requirements Discovery (AI Co
|
|
|
4
4
|
|
|
5
5
|
# Brainstorm - Requirements Discovery (AI Coding Enhanced)
|
|
6
6
|
|
|
7
|
+
**CoreRule**: Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
8
|
+
|
|
9
|
+
Ask the questions one at a time.
|
|
10
|
+
|
|
11
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
7
15
|
Guide AI through collaborative requirements discovery **before implementation**, optimized for AI coding workflows:
|
|
8
16
|
|
|
9
17
|
* **Task-first** (capture ideas immediately)
|
|
10
18
|
* **Action-before-asking** (reduce low-value questions)
|
|
11
19
|
* **Research-first** for technical choices (avoid asking users to invent options)
|
|
12
|
-
* **Diverge �?Converge** (expand thinking, then lock MVP)
|
|
20
|
+
* **Diverge �?Converge** (expand thinking, then lock MVP)
|
|
13
21
|
|
|
14
22
|
---
|
|
15
23
|
|
|
@@ -30,19 +38,19 @@ Triggered from `/` when the user describes a development task, especially when:
|
|
|
30
38
|
Always ensure a task exists at the start so the user's ideas are recorded immediately.
|
|
31
39
|
|
|
32
40
|
2. **Action before asking**
|
|
33
|
-
If you can derive the answer from repo code, docs, configs, conventions, or quick research �?do that first.
|
|
41
|
+
If you can derive the answer from repo code, docs, configs, conventions, or quick research �?do that first.
|
|
34
42
|
|
|
35
43
|
3. **One question per message**
|
|
36
44
|
Never overwhelm the user with a list of questions. Ask one, update PRD, repeat.
|
|
37
45
|
|
|
38
46
|
4. **Prefer concrete options**
|
|
39
|
-
For preference/decision questions, present 2�? feasible, specific approaches with trade-offs.
|
|
47
|
+
For preference/decision questions, present 2�? feasible, specific approaches with trade-offs.
|
|
40
48
|
|
|
41
49
|
5. **Research-first for technical choices**
|
|
42
50
|
If the decision depends on industry conventions / similar tools / established patterns, do research first, then propose options.
|
|
43
51
|
|
|
44
|
-
6. **Diverge �?Converge**
|
|
45
|
-
After initial understanding, proactively consider future evolution, related scenarios, and failure/edge cases �?then converge to an MVP with explicit out-of-scope.
|
|
52
|
+
6. **Diverge �?Converge**
|
|
53
|
+
After initial understanding, proactively consider future evolution, related scenarios, and failure/edge cases �?then converge to an MVP with explicit out-of-scope.
|
|
46
54
|
|
|
47
55
|
7. **No meta questions**
|
|
48
56
|
Do not ask "should I search?" or "can you paste the code so I can continue?"
|
|
@@ -55,7 +63,7 @@ Triggered from `/` when the user describes a development task, especially when:
|
|
|
55
63
|
Before any Q&A, ensure a task exists. If none exists, create one immediately.
|
|
56
64
|
|
|
57
65
|
* Use a **temporary working title** derived from the user's message.
|
|
58
|
-
* It's OK if the title is imperfect �?refine later in PRD.
|
|
66
|
+
* It's OK if the title is imperfect �?refine later in PRD.
|
|
59
67
|
|
|
60
68
|
```bash
|
|
61
69
|
TASK_DIR=$(python3 ./.trellis/scripts/task.py create "brainstorm: <short goal>" --slug <auto>)
|
|
@@ -138,8 +146,8 @@ Write findings into PRD:
|
|
|
138
146
|
| Complexity | Criteria | Action |
|
|
139
147
|
| ------------ | ------------------------------------------------------ | ------------------------------------------- |
|
|
140
148
|
| **Trivial** | Single-line fix, typo, obvious change | Skip brainstorm, implement directly |
|
|
141
|
-
| **Simple** | Clear goal, 1�? files, scope well-defined | Ask 1 confirm question, then implement |
|
|
142
|
-
| **Moderate** | Multiple files, some ambiguity | Light brainstorm (2�? high-value questions) |
|
|
149
|
+
| **Simple** | Clear goal, 1�? files, scope well-defined | Ask 1 confirm question, then implement |
|
|
150
|
+
| **Moderate** | Multiple files, some ambiguity | Light brainstorm (2�? high-value questions) |
|
|
143
151
|
| **Complex** | Vague goal, architectural choices, multiple approaches | Full brainstorm |
|
|
144
152
|
|
|
145
153
|
> Note: Task already exists from Step 0. Classification only affects depth of brainstorming.
|
|
@@ -150,7 +158,7 @@ Write findings into PRD:
|
|
|
150
158
|
|
|
151
159
|
Before asking ANY question, run the following gate:
|
|
152
160
|
|
|
153
|
-
### Gate A �?Can I derive this without the user?
|
|
161
|
+
### Gate A �?Can I derive this without the user?
|
|
154
162
|
|
|
155
163
|
If answer is available via:
|
|
156
164
|
|
|
@@ -158,9 +166,9 @@ If answer is available via:
|
|
|
158
166
|
* docs/specs/conventions
|
|
159
167
|
* quick market/OSS research
|
|
160
168
|
|
|
161
|
-
�?**Do not ask.** Fetch it, summarize, update PRD.
|
|
169
|
+
�?**Do not ask.** Fetch it, summarize, update PRD.
|
|
162
170
|
|
|
163
|
-
### Gate B �?Is this a meta/lazy question?
|
|
171
|
+
### Gate B �?Is this a meta/lazy question?
|
|
164
172
|
|
|
165
173
|
Examples:
|
|
166
174
|
|
|
@@ -168,21 +176,21 @@ Examples:
|
|
|
168
176
|
* "Can you paste the code so I can proceed?"
|
|
169
177
|
* "What does the code look like?" (when repo is available)
|
|
170
178
|
|
|
171
|
-
�?**Do not ask.** Take action.
|
|
179
|
+
�?**Do not ask.** Take action.
|
|
172
180
|
|
|
173
|
-
### Gate C �?What type of question is it?
|
|
181
|
+
### Gate C �?What type of question is it?
|
|
174
182
|
|
|
175
183
|
* **Blocking**: cannot proceed without user input
|
|
176
184
|
* **Preference**: multiple valid choices, depends on product/UX/risk preference
|
|
177
185
|
* **Derivable**: should be answered by inspection/research
|
|
178
186
|
|
|
179
|
-
�?Only ask **Blocking** or **Preference**.
|
|
187
|
+
�?Only ask **Blocking** or **Preference**.
|
|
180
188
|
|
|
181
189
|
---
|
|
182
190
|
|
|
183
191
|
## Step 4: Research-first Mode (Mandatory for technical choices)
|
|
184
192
|
|
|
185
|
-
### Trigger conditions (any �?research-first)
|
|
193
|
+
### Trigger conditions (any �?research-first)
|
|
186
194
|
|
|
187
195
|
* The task involves selecting an approach, library, protocol, framework, template system, plugin mechanism, or CLI UX convention
|
|
188
196
|
* The user asks for "best practice", "how others do it", "recommendation"
|
|
@@ -190,10 +198,10 @@ Examples:
|
|
|
190
198
|
|
|
191
199
|
### Research steps
|
|
192
200
|
|
|
193
|
-
1. Identify 2�? comparable tools/patterns
|
|
201
|
+
1. Identify 2�? comparable tools/patterns
|
|
194
202
|
2. Summarize common conventions and why they exist
|
|
195
203
|
3. Map conventions onto our repo constraints
|
|
196
|
-
4. Produce **2�? feasible approaches** for our project
|
|
204
|
+
4. Produce **2�? feasible approaches** for our project
|
|
197
205
|
|
|
198
206
|
### Research output format (PRD)
|
|
199
207
|
|
|
@@ -236,15 +244,15 @@ Then ask **one** preference question:
|
|
|
236
244
|
|
|
237
245
|
---
|
|
238
246
|
|
|
239
|
-
## Step 5: Expansion Sweep (DIVERGE) �?Required after initial understanding
|
|
247
|
+
## Step 5: Expansion Sweep (DIVERGE) �?Required after initial understanding
|
|
240
248
|
|
|
241
249
|
After you can summarize the goal, proactively broaden thinking before converging.
|
|
242
250
|
|
|
243
|
-
### Expansion categories (keep to 1�? bullets each)
|
|
251
|
+
### Expansion categories (keep to 1�? bullets each)
|
|
244
252
|
|
|
245
253
|
1. **Future evolution**
|
|
246
254
|
|
|
247
|
-
* What might this feature become in 1�? months?
|
|
255
|
+
* What might this feature become in 1�? months?
|
|
248
256
|
* What extension points are worth preserving now?
|
|
249
257
|
|
|
250
258
|
2. **Related scenarios**
|
|
@@ -264,9 +272,9 @@ I understand you want to implement: <current goal>.
|
|
|
264
272
|
|
|
265
273
|
Before diving into design, let me quickly diverge to consider three categories (to avoid rework later):
|
|
266
274
|
|
|
267
|
-
1. Future evolution: <1�? bullets>
|
|
268
|
-
2. Related scenarios: <1�? bullets>
|
|
269
|
-
3. Failure/edge cases: <1�? bullets>
|
|
275
|
+
1. Future evolution: <1�? bullets>
|
|
276
|
+
2. Related scenarios: <1�? bullets>
|
|
277
|
+
3. Failure/edge cases: <1�? bullets>
|
|
270
278
|
|
|
271
279
|
For this MVP, which would you like to include (or none)?
|
|
272
280
|
|
|
@@ -278,8 +286,8 @@ For this MVP, which would you like to include (or none)?
|
|
|
278
286
|
|
|
279
287
|
Then update PRD:
|
|
280
288
|
|
|
281
|
-
* What's in MVP �?`Requirements`
|
|
282
|
-
* What's excluded �?`Out of Scope`
|
|
289
|
+
* What's in MVP �?`Requirements`
|
|
290
|
+
* What's excluded �?`Out of Scope`
|
|
283
291
|
|
|
284
292
|
---
|
|
285
293
|
|
|
@@ -292,7 +300,7 @@ Then update PRD:
|
|
|
292
300
|
* After each user answer:
|
|
293
301
|
|
|
294
302
|
* Update PRD immediately
|
|
295
|
-
* Move answered items from `Open Questions` �?`Requirements`
|
|
303
|
+
* Move answered items from `Open Questions` �?`Requirements`
|
|
296
304
|
* Update `Acceptance Criteria` with testable checkboxes
|
|
297
305
|
* Clarify `Out of Scope`
|
|
298
306
|
|
|
@@ -308,20 +316,20 @@ Then update PRD:
|
|
|
308
316
|
```markdown
|
|
309
317
|
For <topic>, which approach do you prefer?
|
|
310
318
|
|
|
311
|
-
1. **Option A** �?<what it means + trade-off>
|
|
312
|
-
2. **Option B** �?<what it means + trade-off>
|
|
313
|
-
3. **Option C** �?<what it means + trade-off>
|
|
314
|
-
4. **Other** �?describe your preference
|
|
319
|
+
1. **Option A** �?<what it means + trade-off>
|
|
320
|
+
2. **Option B** �?<what it means + trade-off>
|
|
321
|
+
3. **Option C** �?<what it means + trade-off>
|
|
322
|
+
4. **Other** �?describe your preference
|
|
315
323
|
```
|
|
316
324
|
|
|
317
325
|
---
|
|
318
326
|
|
|
319
327
|
## Step 7: Propose Approaches + Record Decisions (Complex tasks)
|
|
320
328
|
|
|
321
|
-
After requirements are clear enough, propose 2�? approaches (if not already done via research-first):
|
|
329
|
+
After requirements are clear enough, propose 2�? approaches (if not already done via research-first):
|
|
322
330
|
|
|
323
331
|
```markdown
|
|
324
|
-
Based on current information, here are 2�? feasible approaches:
|
|
332
|
+
Based on current information, here are 2�? feasible approaches:
|
|
325
333
|
|
|
326
334
|
**Approach A: <name>** (Recommended)
|
|
327
335
|
|
|
@@ -465,17 +473,17 @@ After brainstorm completes (Step 8 confirmation approved), the flow continues to
|
|
|
465
473
|
```text
|
|
466
474
|
Brainstorm
|
|
467
475
|
Step 0: Create task directory + seed PRD
|
|
468
|
-
Step 1�?: Discover requirements, research, converge
|
|
469
|
-
Step 8: Final confirmation �?user approves
|
|
470
|
-
�?
|
|
476
|
+
Step 1�?: Discover requirements, research, converge
|
|
477
|
+
Step 8: Final confirmation �?user approves
|
|
478
|
+
�?
|
|
471
479
|
Task Workflow Phase 2 (Prepare for Implementation)
|
|
472
480
|
Code-Spec Depth Check (if applicable)
|
|
473
|
-
�?Research codebase (based on confirmed PRD)
|
|
474
|
-
�?Configure code-spec context (jsonl files)
|
|
475
|
-
�?Activate task
|
|
476
|
-
�?
|
|
481
|
+
�?Research codebase (based on confirmed PRD)
|
|
482
|
+
�?Configure code-spec context (jsonl files)
|
|
483
|
+
�?Activate task
|
|
484
|
+
�?
|
|
477
485
|
Task Workflow Phase 3 (Execute)
|
|
478
|
-
Implement �?Check �?Complete
|
|
486
|
+
Implement �?Check �?Complete
|
|
479
487
|
```
|
|
480
488
|
|
|
481
489
|
The task directory and PRD already exist from brainstorm, so Phase 1 of the Task Workflow is skipped entirely.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis-check",
|
|
3
3
|
"description": "Code quality check expert. Reviews code changes against specs and self-fixes issues.",
|
|
4
|
-
"
|
|
4
|
+
"prompt": "# Check Agent\n\nYou are the Check Agent in the Trellis workflow.\n\n## Recursion Guard\n\nYou are already the `trellis-check` sub-agent that the main session dispatched. Do the review and fixes directly.\n\n- Do NOT spawn another `trellis-check` or `trellis-implement` sub-agent.\n- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.\n- Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.\n\n## Trellis Context Loading Protocol\n\nLook for the `<!-- trellis-hook-injected -->` marker in your input above.\n\n- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the check work directly.\n- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/prd.md` and the spec files listed in `<task-path>/check.jsonl` yourself before doing the work.\n\n## Context\n\nBefore checking, read:\n- `.trellis/spec/` - Development guidelines\n- Pre-commit checklist for quality standards\n\n## Core Responsibilities\n\n1. **Get code changes** - Use git diff to get uncommitted code\n2. **Check against specs** - Verify code follows guidelines\n3. **Self-fix** - Fix issues yourself, not just report them\n4. **Run verification** - typecheck and lint\n\n## Important\n\n**Fix issues yourself**, don't just report them.\n\nYou have write and edit tools, you can modify code directly.\n\n---\n\n## Workflow\n\n### Step 1: Get Changes\n\n```bash\ngit diff --name-only # List changed files\ngit diff # View specific changes\n```\n\n### Step 2: Check Against Specs\n\nRead relevant specs in `.trellis/spec/` to check code:\n\n- Does it follow directory structure conventions\n- Does it follow naming conventions\n- Does it follow code patterns\n- Are there missing types\n- Are there potential bugs\n\n### Step 3: Self-Fix\n\nAfter finding issues:\n\n1. Fix the issue directly (use edit tool)\n2. Record what was fixed\n3. Continue checking other issues\n\n### Step 4: Run Verification\n\nRun project's lint and typecheck commands to verify changes.\n\nIf failed, fix issues and re-run.\n\n---\n\n## Report Format\n\n```markdown\n## Self-Check Complete\n\n### Files Checked\n\n- src/components/Feature.tsx\n- src/hooks/useFeature.ts\n\n### Issues Found and Fixed\n\n1. `<file>:<line>` - <what was fixed>\n2. `<file>:<line>` - <what was fixed>\n\n### Issues Not Fixed\n\n(If there are issues that cannot be self-fixed, list them here with reasons)\n\n### Verification Results\n\n- TypeCheck: Passed\n- Lint: Passed\n\n### Summary\n\nChecked X files, found Y issues, all fixed.\n```",
|
|
5
5
|
"tools": [
|
|
6
6
|
"read",
|
|
7
7
|
"write",
|
|
@@ -9,11 +9,18 @@
|
|
|
9
9
|
"glob",
|
|
10
10
|
"grep"
|
|
11
11
|
],
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]
|
|
12
|
+
"allowedTools": [
|
|
13
|
+
"read",
|
|
14
|
+
"write",
|
|
15
|
+
"shell",
|
|
16
|
+
"glob",
|
|
17
|
+
"grep"
|
|
18
|
+
],
|
|
19
|
+
"hooks": {
|
|
20
|
+
"agentSpawn": [
|
|
21
|
+
{
|
|
22
|
+
"command": "{{PYTHON_CMD}} .kiro/hooks/inject-subagent-context.py"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
19
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis-implement",
|
|
3
3
|
"description": "Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.",
|
|
4
|
-
"
|
|
4
|
+
"prompt": "# Implement Agent\n\nYou are the Implement Agent in the Trellis workflow.\n\n## Recursion Guard\n\nYou are already the `trellis-implement` sub-agent that the main session dispatched. Do the implementation work directly.\n\n- Do NOT spawn another `trellis-implement` or `trellis-check` sub-agent.\n- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.\n- Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.\n\n## Trellis Context Loading Protocol\n\nLook for the `<!-- trellis-hook-injected -->` marker in your input above.\n\n- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the implementation work directly.\n- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/prd.md`, `<task-path>/info.md` (if it exists), and the spec files listed in `<task-path>/implement.jsonl` yourself before doing the work.\n\n## Context\n\nBefore implementing, read:\n- `.trellis/workflow.md` - Project workflow\n- `.trellis/spec/` - Development guidelines\n- Task `prd.md` - Requirements document\n- Task `info.md` - Technical design (if exists)\n\n## Core Responsibilities\n\n1. **Understand specs** - Read relevant spec files in `.trellis/spec/`\n2. **Understand requirements** - Read prd.md and info.md\n3. **Implement features** - Write code following specs and design\n4. **Self-check** - Ensure code quality\n5. **Report results** - Report completion status\n\n## Forbidden Operations\n\n**Do NOT execute these git commands:**\n\n- `git commit`\n- `git push`\n- `git merge`\n\n---\n\n## Workflow\n\n### 1. Understand Specs\n\nRead relevant specs based on task type:\n\n- Spec layers: `.trellis/spec/<package>/<layer>/`\n- Shared guides: `.trellis/spec/guides/`\n\n### 2. Understand Requirements\n\nRead the task's prd.md and info.md:\n\n- What are the core requirements\n- Key points of technical design\n- Which files to modify/create\n\n### 3. Implement Features\n\n- Write code following specs and technical design\n- Follow existing code patterns\n- Only do what's required, no over-engineering\n\n### 4. Verify\n\nRun project's lint and typecheck commands to verify changes.\n\n---\n\n## Report Format\n\n```markdown\n## Implementation Complete\n\n### Files Modified\n\n- `src/components/Feature.tsx` - New component\n- `src/hooks/useFeature.ts` - New hook\n\n### Implementation Summary\n\n1. Created Feature component...\n2. Added useFeature hook...\n\n### Verification Results\n\n- Lint: Passed\n- TypeCheck: Passed\n```\n\n---\n\n## Code Standards\n\n- Follow existing code patterns\n- Don't add unnecessary abstractions\n- Only do what's required, no over-engineering\n- Keep code readable",
|
|
5
5
|
"tools": [
|
|
6
6
|
"read",
|
|
7
7
|
"write",
|
|
@@ -9,11 +9,18 @@
|
|
|
9
9
|
"glob",
|
|
10
10
|
"grep"
|
|
11
11
|
],
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]
|
|
12
|
+
"allowedTools": [
|
|
13
|
+
"read",
|
|
14
|
+
"write",
|
|
15
|
+
"shell",
|
|
16
|
+
"glob",
|
|
17
|
+
"grep"
|
|
18
|
+
],
|
|
19
|
+
"hooks": {
|
|
20
|
+
"agentSpawn": [
|
|
21
|
+
{
|
|
22
|
+
"command": "{{PYTHON_CMD}} .kiro/hooks/inject-subagent-context.py"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
19
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis-research",
|
|
3
3
|
"description": "Code and tech search expert. Persists findings to {TASK_DIR}/research/. No writes outside that directory.",
|
|
4
|
-
"
|
|
4
|
+
"prompt": "# Research Agent\n\nYou are the Research Agent in the Trellis workflow.\n\n## Core Principle\n\n**You do one thing: find, explain, and PERSIST information.**\n\nConversations get compacted; files don't. Every research output MUST end up as a file under `{TASK_DIR}/research/`. Returning findings only through the chat reply is a failure \u2014 the caller cannot read them next session.\n\n---\n\n## Core Responsibilities\n\n1. **Internal Search** \u2014 locate files/components, understand code logic, discover patterns (Glob, Grep, Read)\n2. **External Search** \u2014 library docs, API references, best practices (web search)\n3. **Persist** \u2014 write each research topic to `{TASK_DIR}/research/<topic>.md`\n4. **Report** \u2014 return file paths + one-line summaries to the main agent (not full content)\n\n---\n\n## Workflow\n\n### Step 1: Resolve Current Task\n\nRun `python3 ./.trellis/scripts/task.py current --source` \u2192 active task path. If no active task is set, ask the user where to write output; do NOT guess.\n\nEnsure `{TASK_DIR}/research/` exists:\n\n```bash\nmkdir -p <TASK_DIR>/research\n```\n\n### Step 2: Understand Search Request\n\nClassify: internal / external / mixed. Determine scope (global / specific directory) and expected shape (file list / pattern notes / tech comparison).\n\n### Step 3: Execute Search\n\nRun independent searches in parallel (Glob + Grep + web) for efficiency.\n\n### Step 4: Persist Each Topic\n\nFor each distinct research topic, Write a markdown file at `{TASK_DIR}/research/<topic-slug>.md`. Use the File Format below.\n\n### Step 5: Report to Main Agent\n\nReply with ONLY:\n\n- List of files written (paths relative to repo root)\n- One-line summary per file\n- Any critical caveats that the main agent needs to know right now\n\nDo NOT paste full research content into the reply. The files are the contract.\n\n---\n\n## Scope Limits (Strict)\n\n### Write ALLOWED\n\n- `{TASK_DIR}/research/*.md` \u2014 your own output\n- Creating `{TASK_DIR}/research/` if it doesn't exist (via `mkdir -p`)\n\n### Write FORBIDDEN\n\n- Code files (`src/`, `lib/`, \u2026)\n- Spec files (`.trellis/spec/`) \u2014 main agent should use `update-spec` skill instead\n- `.trellis/scripts/`, `.trellis/workflow.md`, platform config (`.claude/`, `.cursor/`, etc.)\n- Other task directories\n- Any git operation (commit / push / branch / merge)\n\nIf the user asks you to edit code, decline and suggest spawning `implement` instead.\n\n---\n\n## File Format\n\nEach `{TASK_DIR}/research/<topic>.md` should follow:\n\n```markdown\n# Research: <topic>\n\n- **Query**: <original query>\n- **Scope**: <internal / external / mixed>\n- **Date**: <YYYY-MM-DD>\n\n## Findings\n\n### Files Found\n\n| File Path | Description |\n|---|---|\n| `src/services/xxx.ts` | Main implementation |\n| `src/types/xxx.ts` | Type definitions |\n\n### Code Patterns\n\n<describe patterns, cite file:line>\n\n### External References\n\n- [Library X docs](url) \u2014 <why relevant, version constraints>\n\n### Related Specs\n\n- `.trellis/spec/xxx.md` \u2014 <description>\n\n## Caveats / Not Found\n\n<anything incomplete or uncertain>\n```\n\n---\n\n## Guidelines\n\n### DO\n\n- Provide specific file paths and line numbers\n- Quote actual code snippets\n- Persist every topic to its own file\n- Return file paths in your reply, not the full content\n- Mark \"not found\" explicitly when searches come up empty\n\n### DON'T\n\n- Don't write code or modify files outside `{TASK_DIR}/research/`\n- Don't guess uncertain info\n- Don't paste full research text into the reply (files are the deliverable)\n- Don't propose improvements or critique implementation (that's not your role)\n",
|
|
5
5
|
"tools": [
|
|
6
6
|
"read",
|
|
7
7
|
"write",
|
|
@@ -11,11 +11,20 @@
|
|
|
11
11
|
"web_search",
|
|
12
12
|
"web_fetch"
|
|
13
13
|
],
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
"allowedTools": [
|
|
15
|
+
"read",
|
|
16
|
+
"write",
|
|
17
|
+
"glob",
|
|
18
|
+
"grep",
|
|
19
|
+
"bash",
|
|
20
|
+
"web_search",
|
|
21
|
+
"web_fetch"
|
|
22
|
+
],
|
|
23
|
+
"hooks": {
|
|
24
|
+
"agentSpawn": [
|
|
25
|
+
{
|
|
26
|
+
"command": "{{PYTHON_CMD}} .kiro/hooks/inject-subagent-context.py"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
21
30
|
}
|
|
@@ -16,42 +16,6 @@ If you're using Codex or another agent-capable tool, additional project-scoped h
|
|
|
16
16
|
- `.agents/skills/` — reusable Trellis skills
|
|
17
17
|
- `.codex/agents/` — optional custom subagents
|
|
18
18
|
|
|
19
|
-
## Subagents
|
|
20
|
-
|
|
21
|
-
- ALWAYS wait for every spawned subagent to reach a terminal status before yielding, acting on partial results, or spawning followups.
|
|
22
|
-
- On Codex, this means calling the `wait` tool with the subagent's thread id (requires `multi_agent_v2`). Do NOT infer completion from elapsed time.
|
|
23
|
-
- On Claude Code / OpenCode, this means awaiting the Task/agent tool result before continuing.
|
|
24
|
-
- NEVER cancel or re-spawn a subagent that hasn't finished. If a subagent appears stuck, raise the wait timeout (Codex default 30s, max 1h) before judging it broken.
|
|
25
|
-
- Spawn subagents automatically when:
|
|
26
|
-
- Parallelizable work (e.g., install + verify, npm test + typecheck, multiple tasks from plan)
|
|
27
|
-
- Long-running or blocking tasks where a worker can run independently
|
|
28
|
-
- Isolation for risky changes or checks
|
|
29
|
-
|
|
30
|
-
### Codex-only — `spawn_agent` parameters
|
|
31
|
-
|
|
32
|
-
When calling `spawn_agent`, ALWAYS pass `fork_turns="none"`. Without it the child inherits the parent transcript and sees your prior `spawn_agent(...)` records, then applies the "wait for spawned subagents" rule to itself — causing `wait_agent` self-deadlock.
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
spawn_agent(agent_type="trellis-implement", message="...", fork_turns="none")
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Codex-only — multi-subagent close-loop
|
|
39
|
-
|
|
40
|
-
When `wait` returns a `completed` notification, treat it as an event signal — not as "all done". Run this loop:
|
|
41
|
-
|
|
42
|
-
1. Maintain an `expected_agents` set of dispatched sub-agent thread IDs.
|
|
43
|
-
2. After each `wait` update:
|
|
44
|
-
1. Call `list_agents` to inspect ALL live agents' status.
|
|
45
|
-
2. For each agent now in a terminal state:
|
|
46
|
-
- Verify its promised deliverable exists (e.g. `{task_dir}/research/*.md`).
|
|
47
|
-
- Read or summarize as needed.
|
|
48
|
-
- `close_agent` to release the slot.
|
|
49
|
-
- Remove from `expected_agents`.
|
|
50
|
-
3. If `expected_agents` still contains running agents → keep waiting.
|
|
51
|
-
4. If `expected_agents` is empty → continue main flow.
|
|
52
|
-
3. Never `wait` on an agent that has already reported `completed`.
|
|
53
|
-
4. If a `completed` agent is missing its deliverable, treat it as failed — surface that in your report instead of re-waiting.
|
|
54
|
-
|
|
55
19
|
Managed by Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `trellis update`.
|
|
56
20
|
|
|
57
21
|
<!-- TRELLIS:END -->
|
|
@@ -208,11 +208,48 @@ def load_breadcrumbs(root: Path) -> dict[str, str]:
|
|
|
208
208
|
return result
|
|
209
209
|
|
|
210
210
|
|
|
211
|
+
def _read_trellis_config(root: Path) -> dict:
|
|
212
|
+
"""Load .trellis/config.yaml via the bundled trellis_config helper.
|
|
213
|
+
|
|
214
|
+
The helper lives in .trellis/scripts/common; the hook lives outside the
|
|
215
|
+
scripts tree, so we extend sys.path before importing.
|
|
216
|
+
"""
|
|
217
|
+
scripts_dir = root / ".trellis" / "scripts"
|
|
218
|
+
if str(scripts_dir) not in sys.path:
|
|
219
|
+
sys.path.insert(0, str(scripts_dir))
|
|
220
|
+
try:
|
|
221
|
+
from common.trellis_config import read_trellis_config # type: ignore[import-not-found]
|
|
222
|
+
except Exception:
|
|
223
|
+
return {}
|
|
224
|
+
try:
|
|
225
|
+
return read_trellis_config(root)
|
|
226
|
+
except Exception:
|
|
227
|
+
return {}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def resolve_breadcrumb_key(
|
|
231
|
+
status: str, platform: str | None, config: dict
|
|
232
|
+
) -> str:
|
|
233
|
+
"""Pick the breadcrumb tag key based on Codex dispatch_mode.
|
|
234
|
+
|
|
235
|
+
Codex users may opt into ``codex.dispatch_mode: inline`` to have the main
|
|
236
|
+
agent edit code directly. When the opt-in is set, route to the parallel
|
|
237
|
+
``<status>-inline`` tag block so the breadcrumb body matches the inline
|
|
238
|
+
workflow. Other platforms / modes return the plain status unchanged.
|
|
239
|
+
"""
|
|
240
|
+
if platform == "codex" and isinstance(config, dict):
|
|
241
|
+
codex_cfg = config.get("codex")
|
|
242
|
+
if isinstance(codex_cfg, dict) and codex_cfg.get("dispatch_mode") == "inline":
|
|
243
|
+
return f"{status}-inline"
|
|
244
|
+
return status
|
|
245
|
+
|
|
246
|
+
|
|
211
247
|
def build_breadcrumb(
|
|
212
248
|
task_id: Optional[str],
|
|
213
249
|
status: str,
|
|
214
250
|
templates: dict[str, str],
|
|
215
251
|
source: str | None = None,
|
|
252
|
+
breadcrumb_key: str | None = None,
|
|
216
253
|
) -> str:
|
|
217
254
|
"""Build the <workflow-state>...</workflow-state> block.
|
|
218
255
|
|
|
@@ -221,7 +258,10 @@ def build_breadcrumb(
|
|
|
221
258
|
"Refer to workflow.md for current step." line
|
|
222
259
|
- `no_task` pseudo-status (task_id is None) → header omits task info
|
|
223
260
|
"""
|
|
224
|
-
|
|
261
|
+
lookup_key = breadcrumb_key or status
|
|
262
|
+
body = templates.get(lookup_key)
|
|
263
|
+
if body is None and lookup_key != status:
|
|
264
|
+
body = templates.get(status)
|
|
225
265
|
if body is None:
|
|
226
266
|
body = "Refer to workflow.md for current step."
|
|
227
267
|
header = f"Status: {status}" if task_id is None else f"Task: {task_id} ({status})"
|
|
@@ -251,16 +291,22 @@ def main() -> int:
|
|
|
251
291
|
return 0 # not a Trellis project
|
|
252
292
|
|
|
253
293
|
templates = load_breadcrumbs(root)
|
|
294
|
+
platform = _detect_platform(data)
|
|
295
|
+
config = _read_trellis_config(root)
|
|
254
296
|
task = get_active_task(root, data)
|
|
255
297
|
if task is None:
|
|
256
298
|
# No active task — still emit a breadcrumb nudging AI toward
|
|
257
299
|
# trellis-brainstorm + task.py create when user describes real work.
|
|
258
|
-
|
|
300
|
+
no_task_key = resolve_breadcrumb_key("no_task", platform, config)
|
|
301
|
+
breadcrumb = build_breadcrumb(
|
|
302
|
+
None, "no_task", templates, breadcrumb_key=no_task_key
|
|
303
|
+
)
|
|
259
304
|
else:
|
|
260
305
|
task_id, status, source = task
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
306
|
+
status_key = resolve_breadcrumb_key(status, platform, config)
|
|
307
|
+
breadcrumb = build_breadcrumb(
|
|
308
|
+
task_id, status, templates, source, breadcrumb_key=status_key
|
|
309
|
+
)
|
|
264
310
|
if platform == "codex":
|
|
265
311
|
parts: list[str] = [CODEX_SUB_AGENT_NOTICE]
|
|
266
312
|
if task is None:
|
|
@@ -57,3 +57,14 @@ max_journal_lines: 2000
|
|
|
57
57
|
|
|
58
58
|
# Default package used when --package is not specified.
|
|
59
59
|
# default_package: frontend
|
|
60
|
+
|
|
61
|
+
#-------------------------------------------------------------------------------
|
|
62
|
+
# Codex (sub-agent dispatch behavior)
|
|
63
|
+
#-------------------------------------------------------------------------------
|
|
64
|
+
# Opt out of "main session must dispatch trellis-implement / trellis-check
|
|
65
|
+
# sub-agents" and let the main agent edit code inline. Codex-only knob;
|
|
66
|
+
# other platforms ignore it. Default ("sub-agent") preserves existing
|
|
67
|
+
# behavior, so nothing changes unless you uncomment the block below.
|
|
68
|
+
#
|
|
69
|
+
# codex:
|
|
70
|
+
# dispatch_mode: sub-agent # or "inline" to let the main agent edit code directly
|
|
@@ -35,6 +35,7 @@ export declare const commonTaskStore: string;
|
|
|
35
35
|
export declare const commonSessionContext: string;
|
|
36
36
|
export declare const commonPackagesContext: string;
|
|
37
37
|
export declare const commonWorkflowPhase: string;
|
|
38
|
+
export declare const commonTrellisConfig: string;
|
|
38
39
|
export declare const getDeveloperScript: string;
|
|
39
40
|
export declare const initDeveloperScript: string;
|
|
40
41
|
export declare const taskScript: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,YAAY,QAA2C,CAAC;AACrE,eAAO,MAAM,QAAQ,QAAuC,CAAC;AAC7D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,WAAW,QAA0C,CAAC;A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AAW,QAA0C,CAAC;AACnE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,iBAAiB,QAAiD,CAAC;AAChF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AAGF,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AAGvE,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCnD"}
|
|
@@ -45,6 +45,7 @@ export const commonTaskStore = readTemplate("scripts/common/task_store.py");
|
|
|
45
45
|
export const commonSessionContext = readTemplate("scripts/common/session_context.py");
|
|
46
46
|
export const commonPackagesContext = readTemplate("scripts/common/packages_context.py");
|
|
47
47
|
export const commonWorkflowPhase = readTemplate("scripts/common/workflow_phase.py");
|
|
48
|
+
export const commonTrellisConfig = readTemplate("scripts/common/trellis_config.py");
|
|
48
49
|
// Python scripts - main
|
|
49
50
|
export const getDeveloperScript = readTemplate("scripts/get_developer.py");
|
|
50
51
|
export const initDeveloperScript = readTemplate("scripts/init_developer.py");
|
|
@@ -82,6 +83,7 @@ export function getAllScripts() {
|
|
|
82
83
|
scripts.set("common/session_context.py", commonSessionContext);
|
|
83
84
|
scripts.set("common/packages_context.py", commonPackagesContext);
|
|
84
85
|
scripts.set("common/workflow_phase.py", commonWorkflowPhase);
|
|
86
|
+
scripts.set("common/trellis_config.py", commonTrellisConfig);
|
|
85
87
|
// Main
|
|
86
88
|
scripts.set("get_developer.py", getDeveloperScript);
|
|
87
89
|
scripts.set("init_developer.py", initDeveloperScript);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;AAE/D,0BAA0B;AAC1B,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,4BAA4B,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC,6BAA6B,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,+BAA+B,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC,8BAA8B,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC,8BAA8B,CAAC,CAAC;AAC5E,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CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IAEhD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -27,10 +27,12 @@ from .packages_context import (
|
|
|
27
27
|
get_context_packages_text,
|
|
28
28
|
get_context_packages_json,
|
|
29
29
|
)
|
|
30
|
+
from .trellis_config import read_trellis_config
|
|
30
31
|
from .workflow_phase import (
|
|
31
32
|
filter_platform,
|
|
32
33
|
get_phase_index,
|
|
33
34
|
get_step,
|
|
35
|
+
resolve_effective_platform,
|
|
34
36
|
)
|
|
35
37
|
|
|
36
38
|
# Backward-compatible alias — external modules import this name
|
|
@@ -88,7 +90,10 @@ def main() -> None:
|
|
|
88
90
|
else:
|
|
89
91
|
parser.exit(2, "Phase Index section not found in workflow.md\n")
|
|
90
92
|
if args.platform:
|
|
91
|
-
|
|
93
|
+
effective = resolve_effective_platform(
|
|
94
|
+
args.platform, read_trellis_config()
|
|
95
|
+
)
|
|
96
|
+
content = filter_platform(content, effective)
|
|
92
97
|
print(content, end="")
|
|
93
98
|
else:
|
|
94
99
|
if args.json:
|