@mindfoldhq/trellis 0.3.0-rc.5 → 0.3.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/README.md +16 -4
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +29 -15
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +19 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/antigravity.d.ts +8 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +18 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/gemini.d.ts +8 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +52 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +49 -1
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/kilo.d.ts +8 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +51 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kiro.d.ts +8 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +20 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/migrations/manifests/0.3.0-rc.6.json +9 -0
- package/dist/migrations/manifests/0.3.0.json +11 -0
- package/dist/templates/antigravity/index.d.ts +12 -0
- package/dist/templates/antigravity/index.d.ts.map +1 -0
- package/dist/templates/antigravity/index.js +29 -0
- package/dist/templates/antigravity/index.js.map +1 -0
- package/dist/templates/claude/agents/implement.md +1 -1
- package/dist/templates/claude/commands/trellis/brainstorm.md +16 -18
- package/dist/templates/claude/commands/trellis/start.md +73 -48
- package/dist/templates/codex/skills/brainstorm/SKILL.md +16 -18
- package/dist/templates/codex/skills/start/SKILL.md +80 -46
- package/dist/templates/cursor/commands/trellis-brainstorm.md +16 -18
- package/dist/templates/cursor/commands/trellis-start.md +191 -23
- package/dist/templates/extract.d.ts +52 -0
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +90 -0
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/brainstorm.toml +420 -0
- package/dist/templates/gemini/commands/trellis/break-loop.toml +129 -0
- package/dist/templates/gemini/commands/trellis/check-backend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +147 -0
- package/dist/templates/gemini/commands/trellis/check-frontend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/create-command.toml +119 -0
- package/dist/templates/gemini/commands/trellis/finish-work.toml +133 -0
- package/dist/templates/gemini/commands/trellis/integrate-skill.toml +104 -0
- package/dist/templates/gemini/commands/trellis/onboard.toml +111 -0
- package/dist/templates/gemini/commands/trellis/record-session.toml +66 -0
- package/dist/templates/gemini/commands/trellis/start.toml +292 -0
- package/dist/templates/gemini/commands/trellis/update-spec.toml +132 -0
- package/dist/templates/gemini/index.d.ts +21 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +44 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/iflow/agents/implement.md +1 -1
- package/dist/templates/iflow/commands/trellis/brainstorm.md +16 -18
- package/dist/templates/iflow/commands/trellis/finish-work.md +9 -0
- package/dist/templates/iflow/commands/trellis/start.md +108 -50
- package/dist/templates/iflow/index.d.ts +3 -2
- package/dist/templates/iflow/index.d.ts.map +1 -1
- package/dist/templates/iflow/index.js +7 -9
- package/dist/templates/iflow/index.js.map +1 -1
- package/dist/templates/kilo/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/kilo/commands/trellis/break-loop.md +125 -0
- package/dist/templates/kilo/commands/trellis/check-backend.md +13 -0
- package/dist/templates/kilo/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/kilo/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/kilo/commands/trellis/create-command.md +152 -0
- package/dist/templates/kilo/commands/trellis/finish-work.md +129 -0
- package/dist/templates/kilo/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/kilo/commands/trellis/onboard.md +358 -0
- package/dist/templates/kilo/commands/trellis/parallel.md +194 -0
- package/dist/templates/kilo/commands/trellis/record-session.md +62 -0
- package/dist/templates/kilo/commands/trellis/start.md +321 -0
- package/dist/templates/kilo/commands/trellis/update-spec.md +285 -0
- package/dist/templates/kilo/index.d.ts +16 -0
- package/dist/templates/kilo/index.d.ts.map +1 -0
- package/dist/templates/kilo/index.js +39 -0
- package/dist/templates/kilo/index.js.map +1 -0
- package/dist/templates/kiro/index.d.ts +18 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +40 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +479 -0
- package/dist/templates/kiro/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/kiro/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/kiro/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/create-command/SKILL.md +101 -0
- package/dist/templates/kiro/skills/finish-work/SKILL.md +148 -0
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/kiro/skills/onboard/SKILL.md +363 -0
- package/dist/templates/kiro/skills/record-session/SKILL.md +67 -0
- package/dist/templates/kiro/skills/start/SKILL.md +330 -0
- package/dist/templates/kiro/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/opencode/agents/implement.md +1 -1
- package/dist/templates/opencode/agents/research.md +1 -2
- package/dist/templates/opencode/commands/trellis/brainstorm.md +16 -18
- package/dist/templates/opencode/commands/trellis/start.md +71 -48
- package/dist/templates/trellis/scripts/common/cli_adapter.py +100 -12
- package/dist/templates/trellis/scripts/common/registry.py +1 -1
- package/dist/templates/trellis/scripts/task.py +1 -8
- package/dist/types/ai-tools.d.ts +4 -4
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +32 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/package.json +3 -2
|
@@ -448,28 +448,26 @@ Context / Decision / Consequences
|
|
|
448
448
|
|
|
449
449
|
## Integration with Start Workflow
|
|
450
450
|
|
|
451
|
-
|
|
451
|
+
After brainstorm completes (Step 8 confirmation approved), the flow continues to the Task Workflow's **Phase 2: Prepare for Implementation**:
|
|
452
452
|
|
|
453
453
|
```text
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Step
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
↓
|
|
468
|
-
Step 8: Final confirmation + small-PR plan
|
|
469
|
-
↓
|
|
470
|
-
Implement
|
|
454
|
+
Brainstorm
|
|
455
|
+
Step 0: Create task directory + seed PRD
|
|
456
|
+
Step 1–7: Discover requirements, research, converge
|
|
457
|
+
Step 8: Final confirmation → user approves
|
|
458
|
+
↓
|
|
459
|
+
Task Workflow Phase 2 (Prepare for Implementation)
|
|
460
|
+
Code-Spec Depth Check (if applicable)
|
|
461
|
+
→ Research codebase (based on confirmed PRD)
|
|
462
|
+
→ Configure code-spec context (jsonl files)
|
|
463
|
+
→ Activate task
|
|
464
|
+
↓
|
|
465
|
+
Task Workflow Phase 3 (Execute)
|
|
466
|
+
Implement → Check → Complete
|
|
471
467
|
```
|
|
472
468
|
|
|
469
|
+
The task directory and PRD already exist from brainstorm, so Phase 1 of the Task Workflow is skipped entirely.
|
|
470
|
+
|
|
473
471
|
---
|
|
474
472
|
|
|
475
473
|
## Related Commands
|
|
@@ -85,6 +85,16 @@ For questions or trivial fixes, work directly:
|
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
|
+
## Simple Task
|
|
89
|
+
|
|
90
|
+
For simple, well-defined tasks:
|
|
91
|
+
|
|
92
|
+
1. Quick confirm: "I understand you want to [goal]. Ready to proceed?"
|
|
93
|
+
2. If yes, proceed to **Task Workflow Phase 1 Path B** (create task, write PRD, then research)
|
|
94
|
+
3. If no, clarify and confirm again
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
88
98
|
## Complex Task - Brainstorm First
|
|
89
99
|
|
|
90
100
|
For complex or vague tasks, use the brainstorm process to clarify requirements.
|
|
@@ -109,18 +119,72 @@ See `$brainstorm` for the full process. Summary:
|
|
|
109
119
|
- Verify with a separate check pass
|
|
110
120
|
- Result: Code that follows project conventions automatically
|
|
111
121
|
|
|
112
|
-
###
|
|
122
|
+
### Overview: Two Entry Points
|
|
113
123
|
|
|
114
|
-
|
|
124
|
+
```
|
|
125
|
+
From Brainstorm (Complex Task):
|
|
126
|
+
PRD confirmed → Research → Configure Context → Activate → Implement → Check → Complete
|
|
127
|
+
|
|
128
|
+
From Simple Task:
|
|
129
|
+
Confirm → Create Task → Write PRD → Research → Configure Context → Activate → Implement → Check → Complete
|
|
130
|
+
```
|
|
115
131
|
|
|
116
|
-
**
|
|
132
|
+
**Key principle: Research happens AFTER requirements are clear (PRD exists).**
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Phase 1: Establish Requirements
|
|
137
|
+
|
|
138
|
+
#### Path A: From Brainstorm (skip to Phase 2)
|
|
139
|
+
|
|
140
|
+
PRD and task directory already exist from brainstorm. Skip directly to Phase 2.
|
|
141
|
+
|
|
142
|
+
#### Path B: From Simple Task
|
|
143
|
+
|
|
144
|
+
**Step 1: Confirm Understanding** `[AI]`
|
|
145
|
+
|
|
146
|
+
Quick confirm:
|
|
117
147
|
- What is the goal?
|
|
118
148
|
- What type of development? (frontend / backend / fullstack)
|
|
119
149
|
- Any specific requirements or constraints?
|
|
120
150
|
|
|
121
151
|
If unclear, ask clarifying questions.
|
|
122
152
|
|
|
123
|
-
|
|
153
|
+
**Step 2: Create Task Directory** `[AI]`
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title>" --slug <name>)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Step 3: Write PRD** `[AI]`
|
|
160
|
+
|
|
161
|
+
Create `prd.md` in the task directory with:
|
|
162
|
+
|
|
163
|
+
```markdown
|
|
164
|
+
# <Task Title>
|
|
165
|
+
|
|
166
|
+
## Goal
|
|
167
|
+
<What we're trying to achieve>
|
|
168
|
+
|
|
169
|
+
## Requirements
|
|
170
|
+
- <Requirement 1>
|
|
171
|
+
- <Requirement 2>
|
|
172
|
+
|
|
173
|
+
## Acceptance Criteria
|
|
174
|
+
- [ ] <Criterion 1>
|
|
175
|
+
- [ ] <Criterion 2>
|
|
176
|
+
|
|
177
|
+
## Technical Notes
|
|
178
|
+
<Any technical decisions or constraints>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### Phase 2: Prepare for Implementation (shared)
|
|
184
|
+
|
|
185
|
+
> Both paths converge here. PRD and task directory must exist before proceeding.
|
|
186
|
+
|
|
187
|
+
**Step 4: Code-Spec Depth Check** `[AI]`
|
|
124
188
|
|
|
125
189
|
If the task touches infra or cross-layer contracts, do not start implementation until code-spec depth is defined.
|
|
126
190
|
|
|
@@ -130,20 +194,19 @@ Trigger this requirement when the change includes any of:
|
|
|
130
194
|
- Infra integrations (storage, queue, cache, secrets, env contracts)
|
|
131
195
|
- Cross-layer payload transformations
|
|
132
196
|
|
|
133
|
-
Must-have before
|
|
197
|
+
Must-have before proceeding:
|
|
134
198
|
- [ ] Target code-spec files to update are identified
|
|
135
199
|
- [ ] Concrete contract is defined (signature, fields, env keys)
|
|
136
200
|
- [ ] Validation and error matrix is defined
|
|
137
201
|
- [ ] At least one Good/Base/Bad case is defined
|
|
138
202
|
|
|
139
|
-
|
|
203
|
+
**Step 5: Research the Codebase** `[AI]`
|
|
140
204
|
|
|
141
|
-
|
|
205
|
+
Based on the confirmed PRD, run a focused research pass and produce:
|
|
142
206
|
|
|
143
207
|
1. Relevant spec files in `.trellis/spec/`
|
|
144
208
|
2. Existing code patterns to follow (2-3 examples)
|
|
145
209
|
3. Files that will likely need modification
|
|
146
|
-
4. Suggested task slug
|
|
147
210
|
|
|
148
211
|
Use this output format:
|
|
149
212
|
|
|
@@ -156,20 +219,9 @@ Use this output format:
|
|
|
156
219
|
|
|
157
220
|
## Files to Modify
|
|
158
221
|
- <path>: <what change>
|
|
159
|
-
|
|
160
|
-
## Suggested Task Name
|
|
161
|
-
- <short-slug-name>
|
|
162
222
|
```
|
|
163
223
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Based on research results:
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title from research>" --slug <suggested-slug>)
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Step 4: Configure Context `[AI]`
|
|
224
|
+
**Step 6: Configure Context** `[AI]`
|
|
173
225
|
|
|
174
226
|
Initialize default context:
|
|
175
227
|
|
|
@@ -186,29 +238,7 @@ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<
|
|
|
186
238
|
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
187
239
|
```
|
|
188
240
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
Create `prd.md` in the task directory with:
|
|
192
|
-
|
|
193
|
-
```markdown
|
|
194
|
-
# <Task Title>
|
|
195
|
-
|
|
196
|
-
## Goal
|
|
197
|
-
<What we're trying to achieve>
|
|
198
|
-
|
|
199
|
-
## Requirements
|
|
200
|
-
- <Requirement 1>
|
|
201
|
-
- <Requirement 2>
|
|
202
|
-
|
|
203
|
-
## Acceptance Criteria
|
|
204
|
-
- [ ] <Criterion 1>
|
|
205
|
-
- [ ] <Criterion 2>
|
|
206
|
-
|
|
207
|
-
## Technical Notes
|
|
208
|
-
<Any technical decisions or constraints>
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Step 6: Activate Task `[AI]`
|
|
241
|
+
**Step 7: Activate Task** `[AI]`
|
|
212
242
|
|
|
213
243
|
```bash
|
|
214
244
|
python3 ./.trellis/scripts/task.py start "$TASK_DIR"
|
|
@@ -216,7 +246,11 @@ python3 ./.trellis/scripts/task.py start "$TASK_DIR"
|
|
|
216
246
|
|
|
217
247
|
This sets `.current-task` so hooks can inject context.
|
|
218
248
|
|
|
219
|
-
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### Phase 3: Execute (shared)
|
|
252
|
+
|
|
253
|
+
**Step 8: Implement** `[AI]`
|
|
220
254
|
|
|
221
255
|
Implement the task described in `prd.md`.
|
|
222
256
|
|
|
@@ -224,7 +258,7 @@ Implement the task described in `prd.md`.
|
|
|
224
258
|
- Keep changes scoped to requirements
|
|
225
259
|
- Run lint and typecheck before finishing
|
|
226
260
|
|
|
227
|
-
|
|
261
|
+
**Step 9: Check Quality** `[AI]`
|
|
228
262
|
|
|
229
263
|
Run a quality pass against check context:
|
|
230
264
|
|
|
@@ -232,7 +266,7 @@ Run a quality pass against check context:
|
|
|
232
266
|
- Fix issues directly
|
|
233
267
|
- Ensure lint and typecheck pass
|
|
234
268
|
|
|
235
|
-
|
|
269
|
+
**Step 10: Complete** `[AI]`
|
|
236
270
|
|
|
237
271
|
1. Verify lint and typecheck pass
|
|
238
272
|
2. Report what was implemented
|
|
@@ -443,28 +443,26 @@ Context / Decision / Consequences
|
|
|
443
443
|
|
|
444
444
|
## Integration with Start Workflow
|
|
445
445
|
|
|
446
|
-
|
|
446
|
+
After brainstorm completes (Step 8 confirmation approved), the flow continues to the Task Workflow's **Phase 2: Prepare for Implementation**:
|
|
447
447
|
|
|
448
448
|
```text
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
Step
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
↓
|
|
463
|
-
Step 8: Final confirmation + small-PR plan
|
|
464
|
-
↓
|
|
465
|
-
Implement
|
|
449
|
+
Brainstorm
|
|
450
|
+
Step 0: Create task directory + seed PRD
|
|
451
|
+
Step 1–7: Discover requirements, research, converge
|
|
452
|
+
Step 8: Final confirmation → user approves
|
|
453
|
+
↓
|
|
454
|
+
Task Workflow Phase 2 (Prepare for Implementation)
|
|
455
|
+
Code-Spec Depth Check (if applicable)
|
|
456
|
+
→ Research codebase (based on confirmed PRD)
|
|
457
|
+
→ Configure code-spec context (jsonl files)
|
|
458
|
+
→ Activate task
|
|
459
|
+
↓
|
|
460
|
+
Task Workflow Phase 3 (Execute)
|
|
461
|
+
Implement → Check → Complete
|
|
466
462
|
```
|
|
467
463
|
|
|
464
|
+
The task directory and PRD already exist from brainstorm, so Phase 1 of the Task Workflow is skipped entirely.
|
|
465
|
+
|
|
468
466
|
---
|
|
469
467
|
|
|
470
468
|
## Related Commands
|
|
@@ -86,25 +86,135 @@ Ready for your task. What would you like to work on?
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
-
##
|
|
89
|
+
## Task Classification
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
When user describes a task, classify it:
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
| Type | Criteria | Workflow |
|
|
94
|
+
|------|----------|----------|
|
|
95
|
+
| **Question** | User asks about code, architecture, or how something works | Answer directly |
|
|
96
|
+
| **Trivial Fix** | Typo fix, comment update, single-line change, < 5 minutes | Direct Edit |
|
|
97
|
+
| **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm → Task Workflow |
|
|
98
|
+
| **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm → Task Workflow** |
|
|
96
99
|
|
|
97
|
-
###
|
|
100
|
+
### Decision Rule
|
|
101
|
+
|
|
102
|
+
> **If in doubt, use Brainstorm + Task Workflow.**
|
|
103
|
+
>
|
|
104
|
+
> Task Workflow ensures code-specs are injected to the right context, resulting in higher quality code.
|
|
105
|
+
> The overhead is minimal, but the benefit is significant.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Question / Trivial Fix
|
|
110
|
+
|
|
111
|
+
For questions or trivial fixes, work directly:
|
|
112
|
+
|
|
113
|
+
1. Answer question or make the fix
|
|
114
|
+
2. If code was changed, remind user to run `/trellis-finish-work`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Simple Task
|
|
119
|
+
|
|
120
|
+
For simple, well-defined tasks:
|
|
121
|
+
|
|
122
|
+
1. Quick confirm: "I understand you want to [goal]. Ready to proceed?"
|
|
123
|
+
2. If yes, proceed to **Task Workflow Phase 1 Path B** (create task, write PRD, then research)
|
|
124
|
+
3. If no, clarify and confirm again
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Complex Task - Brainstorm First
|
|
98
129
|
|
|
99
130
|
For complex or vague tasks, use `/trellis-brainstorm` first to clarify requirements before implementation.
|
|
100
131
|
|
|
101
|
-
|
|
132
|
+
Summary:
|
|
133
|
+
|
|
134
|
+
1. **Acknowledge and classify** - State your understanding
|
|
135
|
+
2. **Create task directory** - Track evolving requirements in `prd.md`
|
|
136
|
+
3. **Ask questions one at a time** - Update PRD after each answer
|
|
137
|
+
4. **Propose approaches** - For architectural decisions
|
|
138
|
+
5. **Confirm final requirements** - Get explicit approval
|
|
139
|
+
6. **Proceed to Task Workflow** - With clear requirements in PRD
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Task Workflow (Development Tasks)
|
|
144
|
+
|
|
145
|
+
**Why this workflow?**
|
|
146
|
+
- Run a dedicated research pass before coding
|
|
147
|
+
- Configure specs in jsonl context files
|
|
148
|
+
- Implement using injected context
|
|
149
|
+
- Verify with a separate check pass
|
|
150
|
+
- Result: Code that follows project conventions automatically
|
|
151
|
+
|
|
152
|
+
### Overview: Two Entry Points
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
From Brainstorm (Complex Task):
|
|
156
|
+
PRD confirmed → Research → Configure Context → Activate → Implement → Check → Complete
|
|
157
|
+
|
|
158
|
+
From Simple Task:
|
|
159
|
+
Confirm → Create Task → Write PRD → Research → Configure Context → Activate → Implement → Check → Complete
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Key principle: Research happens AFTER requirements are clear (PRD exists).**
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Phase 1: Establish Requirements
|
|
167
|
+
|
|
168
|
+
#### Path A: From Brainstorm (skip to Phase 2)
|
|
169
|
+
|
|
170
|
+
PRD and task directory already exist from brainstorm. Skip directly to Phase 2.
|
|
171
|
+
|
|
172
|
+
#### Path B: From Simple Task
|
|
173
|
+
|
|
174
|
+
**Step 1: Confirm Understanding** `[AI]`
|
|
175
|
+
|
|
176
|
+
Quick confirm:
|
|
177
|
+
- What is the goal?
|
|
178
|
+
- What type of development? (frontend / backend / fullstack)
|
|
179
|
+
- Any specific requirements or constraints?
|
|
180
|
+
|
|
181
|
+
If unclear, ask clarifying questions.
|
|
182
|
+
|
|
183
|
+
**Step 2: Create Task Directory** `[AI]`
|
|
102
184
|
|
|
103
185
|
```bash
|
|
104
|
-
python3 ./.trellis/scripts/task.py create "<title>" --slug <name>
|
|
186
|
+
TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title>" --slug <name>)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Step 3: Write PRD** `[AI]`
|
|
190
|
+
|
|
191
|
+
Create `prd.md` in the task directory with:
|
|
192
|
+
|
|
193
|
+
```markdown
|
|
194
|
+
# <Task Title>
|
|
195
|
+
|
|
196
|
+
## Goal
|
|
197
|
+
<What we're trying to achieve>
|
|
198
|
+
|
|
199
|
+
## Requirements
|
|
200
|
+
- <Requirement 1>
|
|
201
|
+
- <Requirement 2>
|
|
202
|
+
|
|
203
|
+
## Acceptance Criteria
|
|
204
|
+
- [ ] <Criterion 1>
|
|
205
|
+
- [ ] <Criterion 2>
|
|
206
|
+
|
|
207
|
+
## Technical Notes
|
|
208
|
+
<Any technical decisions or constraints>
|
|
105
209
|
```
|
|
106
210
|
|
|
107
|
-
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Phase 2: Prepare for Implementation (shared)
|
|
214
|
+
|
|
215
|
+
> Both paths converge here. PRD and task directory must exist before proceeding.
|
|
216
|
+
|
|
217
|
+
**Step 4: Code-Spec Depth Check** `[AI]`
|
|
108
218
|
|
|
109
219
|
If the task touches infra or cross-layer contracts, do not start implementation until code-spec depth is defined.
|
|
110
220
|
|
|
@@ -114,28 +224,86 @@ Trigger this requirement when the change includes any of:
|
|
|
114
224
|
- Infra integrations (storage, queue, cache, secrets, env contracts)
|
|
115
225
|
- Cross-layer payload transformations
|
|
116
226
|
|
|
117
|
-
Must-have before
|
|
227
|
+
Must-have before proceeding:
|
|
118
228
|
- [ ] Target code-spec files to update are identified
|
|
119
229
|
- [ ] Concrete contract is defined (signature, fields, env keys)
|
|
120
230
|
- [ ] Validation and error matrix is defined
|
|
121
231
|
- [ ] At least one Good/Base/Bad case is defined
|
|
122
232
|
|
|
123
|
-
|
|
233
|
+
**Step 5: Research the Codebase** `[AI]`
|
|
234
|
+
|
|
235
|
+
Based on the confirmed PRD, run a focused research pass and produce:
|
|
236
|
+
|
|
237
|
+
1. Relevant spec files in `.trellis/spec/`
|
|
238
|
+
2. Existing code patterns to follow (2-3 examples)
|
|
239
|
+
3. Files that will likely need modification
|
|
240
|
+
|
|
241
|
+
Use this output format:
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
## Relevant Specs
|
|
245
|
+
- <path>: <why it's relevant>
|
|
246
|
+
|
|
247
|
+
## Code Patterns Found
|
|
248
|
+
- <pattern>: <example file path>
|
|
249
|
+
|
|
250
|
+
## Files to Modify
|
|
251
|
+
- <path>: <what change>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Step 6: Configure Context** `[AI]`
|
|
255
|
+
|
|
256
|
+
Initialize default context:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type>
|
|
260
|
+
# type: backend | frontend | fullstack
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Add specs found in your research pass:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# For each relevant spec and code pattern:
|
|
267
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
|
|
268
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Step 7: Activate Task** `[AI]`
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
python3 ./.trellis/scripts/task.py start "$TASK_DIR"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
This sets `.current-task` so hooks can inject context.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
### Phase 3: Execute (shared)
|
|
282
|
+
|
|
283
|
+
**Step 8: Implement** `[AI]`
|
|
284
|
+
|
|
285
|
+
Implement the task described in `prd.md`.
|
|
286
|
+
|
|
287
|
+
- Follow all specs injected into implement context
|
|
288
|
+
- Keep changes scoped to requirements
|
|
289
|
+
- Run lint and typecheck before finishing
|
|
290
|
+
|
|
291
|
+
**Step 9: Check Quality** `[AI]`
|
|
292
|
+
|
|
293
|
+
Run a quality pass against check context:
|
|
124
294
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
295
|
+
- Review all code changes against the specs
|
|
296
|
+
- Fix issues directly
|
|
297
|
+
- Ensure lint and typecheck pass
|
|
128
298
|
|
|
129
|
-
|
|
299
|
+
**Step 10: Complete** `[AI]`
|
|
130
300
|
|
|
131
|
-
1. Verify
|
|
132
|
-
2.
|
|
133
|
-
3. Remind user to
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
python3 ./.trellis/scripts/task.py archive <task-name>
|
|
138
|
-
```
|
|
301
|
+
1. Verify lint and typecheck pass
|
|
302
|
+
2. Report what was implemented
|
|
303
|
+
3. Remind user to:
|
|
304
|
+
- Test the changes
|
|
305
|
+
- Commit when ready
|
|
306
|
+
- Run `/trellis-record-session` to record this session
|
|
139
307
|
|
|
140
308
|
---
|
|
141
309
|
|
|
@@ -51,6 +51,35 @@ export declare function getIflowTemplatePath(): string;
|
|
|
51
51
|
* @deprecated Use getIflowTemplatePath() instead.
|
|
52
52
|
*/
|
|
53
53
|
export declare function getIflowSourcePath(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Get the path to the kilo templates directory.
|
|
56
|
+
*
|
|
57
|
+
* This reads from src/templates/kilo/ (development) or dist/templates/kilo/ (production).
|
|
58
|
+
* These are GENERIC templates, not the Trellis project's own .kilo/ configuration.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getKiloTemplatePath(): string;
|
|
61
|
+
/**
|
|
62
|
+
* Get the path to the kiro templates directory.
|
|
63
|
+
*
|
|
64
|
+
* This reads from src/templates/kiro/ (development) or dist/templates/kiro/ (production).
|
|
65
|
+
* These are GENERIC templates, not the Trellis project's own .kiro/ configuration.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getKiroTemplatePath(): string;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use getKiroTemplatePath() instead.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getKiroSourcePath(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Get the path to the antigravity templates directory.
|
|
74
|
+
*
|
|
75
|
+
* This reads from src/templates/antigravity/ (development) or dist/templates/antigravity/ (production).
|
|
76
|
+
* These are GENERIC templates, not the Trellis project's own .agent/workflows configuration.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getAntigravityTemplatePath(): string;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use getAntigravityTemplatePath() instead.
|
|
81
|
+
*/
|
|
82
|
+
export declare function getAntigravitySourcePath(): string;
|
|
54
83
|
/**
|
|
55
84
|
* Read a file from the .trellis directory
|
|
56
85
|
* @param relativePath - Path relative to .trellis/ (e.g., 'scripts/task.py')
|
|
@@ -100,6 +129,29 @@ export declare function getOpenCodeSourcePath(): string;
|
|
|
100
129
|
* @returns File content as string
|
|
101
130
|
*/
|
|
102
131
|
export declare function readOpenCodeFile(relativePath: string): string;
|
|
132
|
+
/**
|
|
133
|
+
* Read a file from the .kilo directory (dogfooding)
|
|
134
|
+
* @param relativePath - Path relative to .kilo/ (e.g., 'commands/start.md')
|
|
135
|
+
* @returns File content as string
|
|
136
|
+
*/
|
|
137
|
+
export declare function readKiloFile(relativePath: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* Get the path to the gemini templates directory.
|
|
140
|
+
*
|
|
141
|
+
* This reads from src/templates/gemini/ (development) or dist/templates/gemini/ (production).
|
|
142
|
+
* These are GENERIC templates, not the Trellis project's own .gemini/ configuration.
|
|
143
|
+
*/
|
|
144
|
+
export declare function getGeminiTemplatePath(): string;
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated Use getGeminiTemplatePath() instead.
|
|
147
|
+
*/
|
|
148
|
+
export declare function getGeminiSourcePath(): string;
|
|
149
|
+
/**
|
|
150
|
+
* Read a file from the .gemini directory (dogfooding)
|
|
151
|
+
* @param relativePath - Path relative to .gemini/ (e.g., 'commands/trellis/start.toml')
|
|
152
|
+
* @returns File content as string
|
|
153
|
+
*/
|
|
154
|
+
export declare function readGeminiFile(relativePath: string): string;
|
|
103
155
|
/**
|
|
104
156
|
* Copy a directory from .trellis/ to target, making scripts executable
|
|
105
157
|
* Uses writeFile to handle file conflicts with the global writeMode setting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAQA,KAAK,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAU/C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAS9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAS9C;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAShD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAS7C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,M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