@jahanxu/trellis 0.4.2 → 0.5.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.
Files changed (65) hide show
  1. package/dist/configurators/workflow.d.ts.map +1 -1
  2. package/dist/configurators/workflow.js +58 -1
  3. package/dist/configurators/workflow.js.map +1 -1
  4. package/dist/constants/paths.d.ts +17 -0
  5. package/dist/constants/paths.d.ts.map +1 -1
  6. package/dist/constants/paths.js +19 -0
  7. package/dist/constants/paths.js.map +1 -1
  8. package/dist/templates/claude/commands/trellis/handoff.md +90 -387
  9. package/dist/templates/claude/commands/trellis/pick-task.md +74 -444
  10. package/dist/templates/claude/hooks/inject-subagent-context.py +17 -101
  11. package/dist/templates/claude/hooks/ralph-loop.py +1 -0
  12. package/dist/templates/claude/hooks/session-start.py +170 -54
  13. package/dist/templates/iflow/commands/trellis/handoff.md +148 -0
  14. package/dist/templates/iflow/commands/trellis/pick-task.md +145 -0
  15. package/dist/templates/iflow/hooks/inject-subagent-context.py +1 -0
  16. package/dist/templates/iflow/hooks/ralph-loop.py +1 -0
  17. package/dist/templates/iflow/hooks/session-start.py +171 -0
  18. package/dist/templates/markdown/index.d.ts +9 -0
  19. package/dist/templates/markdown/index.d.ts.map +1 -1
  20. package/dist/templates/markdown/index.js +10 -0
  21. package/dist/templates/markdown/index.js.map +1 -1
  22. package/dist/templates/markdown/spec/roles/designer/index.md.txt +57 -0
  23. package/dist/templates/markdown/spec/roles/designer/mock-data-standards.md.txt +63 -0
  24. package/dist/templates/markdown/spec/roles/designer/prototype-guidelines.md.txt +49 -0
  25. package/dist/templates/markdown/spec/roles/frontend-impl/api-integration.md.txt +63 -0
  26. package/dist/templates/markdown/spec/roles/frontend-impl/index.md.txt +57 -0
  27. package/dist/templates/markdown/spec/roles/frontend-impl/prototype-to-production.md.txt +57 -0
  28. package/dist/templates/markdown/spec/roles/pm/index.md.txt +45 -0
  29. package/dist/templates/markdown/spec/roles/pm/prd-template.md.txt +64 -0
  30. package/dist/templates/markdown/spec/roles/pm/requirement-checklist.md.txt +43 -0
  31. package/dist/templates/trellis/index.d.ts +1 -0
  32. package/dist/templates/trellis/index.d.ts.map +1 -1
  33. package/dist/templates/trellis/index.js +2 -0
  34. package/dist/templates/trellis/index.js.map +1 -1
  35. package/dist/templates/trellis/scripts/add_session.py +3 -2
  36. package/dist/templates/trellis/scripts/common/cli_adapter.py +4 -4
  37. package/dist/templates/trellis/scripts/common/developer.py +4 -4
  38. package/dist/templates/trellis/scripts/common/git_context.py +7 -7
  39. package/dist/templates/trellis/scripts/common/paths.py +64 -14
  40. package/dist/templates/trellis/scripts/common/phase.py +2 -2
  41. package/dist/templates/trellis/scripts/common/registry.py +16 -16
  42. package/dist/templates/trellis/scripts/common/task_queue.py +10 -10
  43. package/dist/templates/trellis/scripts/common/task_utils.py +5 -5
  44. package/dist/templates/trellis/scripts/common/worktree.py +8 -8
  45. package/dist/templates/trellis/scripts/pool.py +214 -265
  46. package/dist/templates/trellis/scripts/task.py +3 -116
  47. package/package.json +3 -3
  48. package/dist/templates/claude/commands/trellis/before-role-work.md +0 -364
  49. package/dist/templates/trellis/VERSION +0 -1
  50. package/dist/templates/trellis/deliverables/README.md +0 -51
  51. package/dist/templates/trellis/paths.README.md +0 -277
  52. package/dist/templates/trellis/paths.yaml +0 -41
  53. package/dist/templates/trellis/pool/implementations.json +0 -5
  54. package/dist/templates/trellis/pool/prototypes.json +0 -5
  55. package/dist/templates/trellis/pool/requirements.json +0 -5
  56. package/dist/templates/trellis/scripts/common/project_paths.py +0 -189
  57. package/dist/templates/trellis/scripts/handoff_generator.py +0 -380
  58. package/dist/templates/trellis/spec/roles/designer/index.md +0 -243
  59. package/dist/templates/trellis/spec/roles/designer/mock-data-standards.md +0 -481
  60. package/dist/templates/trellis/spec/roles/designer/prototype-guidelines.md +0 -429
  61. package/dist/templates/trellis/spec/roles/frontend-impl/api-integration.md +0 -565
  62. package/dist/templates/trellis/spec/roles/frontend-impl/index.md +0 -321
  63. package/dist/templates/trellis/spec/roles/frontend-impl/state-management.md +0 -599
  64. package/dist/templates/trellis/spec/roles/pm/index.md +0 -112
  65. package/dist/templates/trellis/spec/roles/pm/prd-template.md +0 -124
@@ -1,515 +1,145 @@
1
- # Pick Task - 从任务池选择上游产出
1
+ # Pick Task - Select Upstream Deliverable and Start Working
2
2
 
3
- 从上游产出池选择一个任务开始开发,自动创建任务目录并注入上游产出。
3
+ Pick a deliverable from an upstream pool, create a task directory, and inject upstream context.
4
4
 
5
5
  ---
6
6
 
7
- ## 使用场景
7
+ ## Usage
8
8
 
9
- | 当前角色 | 从哪个池子选择 | 选择什么 |
10
- |---------|--------------|---------|
11
- | **Designer** | `requirements` | PM 完成的 PRD |
12
- | **Frontend** | `prototypes` | Designer 完成的原型代码 |
13
-
14
- **注意**:PM 不从池子选择任务(PM 是流水线起点)
15
-
16
- ---
17
-
18
- ## 命令格式
19
-
20
- ```bash
21
- /trellis:pick-task <pool-type> <task-id>
22
- ```
23
-
24
- **参数**:
25
- - `pool-type`: `requirements` 或 `prototypes`
26
- - `task-id`: 上游任务的 ID(从池子列表获取)
27
-
28
- **示例**:
29
- ```bash
30
- /trellis:pick-task requirements user-login
31
- /trellis:pick-task prototypes user-login
32
- ```
33
-
34
- ---
35
-
36
- ## 执行流程
37
-
38
- ### Step 1: 检查当前角色
39
-
40
- ```bash
41
- python3 .trellis/scripts/get_developer.py
42
- ```
43
-
44
- **输出示例**:`designer-bob`
45
-
46
- **解析角色**:
47
- ```python
48
- developer = "designer-bob"
49
- role = developer.split('-')[0] # "designer"
50
9
  ```
51
-
52
- **角色验证**:
53
- - ✅ `designer` → 可以 pick `requirements`
54
- - ✅ `frontend` → 可以 pick `prototypes`
55
- - ❌ `pm` → 不允许 pick(PM 是起点)
56
-
57
- **如果角色不匹配**:
10
+ /trellis:pick-task <pool> <id>
58
11
  ```
59
- Error: PM 不能从池子选择任务
60
12
 
61
- PM 应该:
62
- 1. 创建新任务:python3 .trellis/scripts/task.py create "<title>"
63
- 2. 编写 PRD
64
- 3. 执行 /trellis:handoff
65
- ```
66
-
67
- **如果角色与池子不匹配**:
68
- ```
69
- Error: Designer 不能从 prototypes 池选择任务
70
-
71
- Designer 应该从 requirements 池选择:
72
- /trellis:pick-task requirements <task-id>
73
- ```
13
+ - `<pool>`: `requirements` (for Designers) or `prototypes` (for Frontend)
14
+ - `<id>`: deliverable ID to pick (e.g., `user-login`)
74
15
 
75
16
  ---
76
17
 
77
- ### Step 2: 列出可用任务
18
+ ## Process `[AI]`
78
19
 
79
- 调用 pool.py 列出指定池子的任务:
20
+ ### Step 1: Validate Role
80
21
 
81
22
  ```bash
82
- python3 .trellis/scripts/pool.py list <pool-type> --status available
23
+ python3 ./.trellis/scripts/get_context.py
83
24
  ```
84
25
 
85
- **输出示例**:
86
- ```
87
- === Requirements Pool ===
88
-
89
- Available (2):
90
- • user-login: 用户登录功能
91
- Completed by: pm-alice
92
- Path: deliverables/requirements/user-login
26
+ Read the developer name from `.developer` file. Parse role from `{role}-{name}` convention.
93
27
 
94
- payment: 支付功能
95
- Completed by: pm-alice
96
- Path: deliverables/requirements/payment
28
+ Validate role-pool match:
29
+ - `designer` can pick from `requirements`
30
+ - `frontend` / `frontend-impl` can pick from `prototypes`
31
+ - `pm` should NOT pick from pools (PMs create tasks directly)
97
32
 
98
- Consumed (0):
99
- (none)
100
- ```
101
-
102
- **AI 展示给用户**:
103
- ```
104
- 可用的 requirements 任务:
33
+ If role cannot be parsed, warn but continue (soft detection).
105
34
 
106
- 1. user-login - 用户登录功能
107
- 完成人: pm-alice
108
- 路径: deliverables/requirements/user-login
35
+ ### Step 2: Check Pool Availability
109
36
 
110
- 2. payment - 支付功能
111
- 完成人: pm-alice
112
- 路径: deliverables/requirements/payment
113
-
114
- 请选择任务 ID,或使用命令:
115
- /trellis:pick-task requirements <task-id>
116
- ```
117
-
118
- ---
119
-
120
- ### Step 3: 验证任务状态
121
-
122
- **读取任务池数据**:
123
37
  ```bash
124
- cat .trellis/pool/<pool-type>.json
125
- ```
126
-
127
- **查找任务**:
128
- ```python
129
- # 伪代码
130
- pool_data = json.loads(pool_file.read_text())
131
-
132
- task = None
133
- for t in pool_data["available"]:
134
- if t["id"] == task_id:
135
- task = t
136
- break
137
-
138
- if not task:
139
- # 检查是否已被消费
140
- for t in pool_data["consumed"]:
141
- if t["id"] == task_id:
142
- error(f"任务 '{task_id}' 已被消费")
143
- return
144
-
145
- error(f"任务 '{task_id}' 不存在")
146
- return
147
- ```
148
-
149
- **任务状态验证**:
150
- - ✅ `status == "available"` → 可以消费
151
- - ❌ `status == "consumed"` → 拒绝,提示已被谁消费
152
-
153
- **如果任务已被消费**:
154
- ```
155
- Error: 任务 'user-login' 已被消费
156
-
157
- 消费者: designer-bob
158
- 消费时间: 2026-02-28 15:30:00
159
-
160
- 如需重新处理,请联系消费者或创建新任务
38
+ python3 ./.trellis/scripts/pool.py status <pool> <id>
161
39
  ```
162
40
 
163
- ---
164
-
165
- ### Step 4: 读取上游 HANDOFF 文档
166
-
167
- **HANDOFF 文档路径**:
168
- ```python
169
- handoff_path = task["handoff_doc"] # 例如:deliverables/requirements/user-login/HANDOFF.md
170
- ```
171
-
172
- **读取并展示给用户**(可选):
173
- ```
174
- AI 提示:
175
- "即将基于以下上游产出创建任务:
176
-
177
- === 上游交接文档摘要 ===
178
- 功能ID: user-login
179
- 功能名称: 用户登录功能
180
- 完成人: pm-alice
181
-
182
- 核心需求:
183
- - 支持邮箱+密码登录
184
- - 支持第三方登录(微信、GitHub)
185
- ...
41
+ Verify the item:
42
+ - Exists in the pool
43
+ - Status is `available` (not `consumed`)
186
44
 
187
- 是否继续?[Y/n]"
188
-
189
- 如果用户输入 n,中止执行。
190
- ```
191
-
192
- ---
193
-
194
- ### Step 5: 创建任务目录
195
-
196
- **生成任务目录名**:
197
- ```python
198
- from datetime import datetime
199
-
200
- date_prefix = datetime.now().strftime("%m-%d")
201
- dir_name = f"{date_prefix}-{task_id}" # 例如:02-28-user-login
202
- ```
203
-
204
- **任务目录路径**:
205
- ```python
206
- # Designer
207
- task_dir = f".trellis/tasks/designer/{dir_name}"
208
-
209
- # Frontend
210
- task_dir = f".trellis/tasks/frontend/{dir_name}"
45
+ If not available, list what IS available:
46
+ ```bash
47
+ python3 ./.trellis/scripts/pool.py list <pool>
211
48
  ```
212
49
 
213
- **注意**:按角色隔离任务目录
50
+ ### Step 3: Check Current Task
214
51
 
215
- **创建目录**:
216
- ```bash
217
- mkdir -p <task_dir>
218
- ```
52
+ If there is already a current task set, ask:
53
+ > "You have an active task: `<current-task>`. Would you like to finish it first, or switch to the new task?"
219
54
 
220
- ---
55
+ If user wants to continue, proceed.
221
56
 
222
- ### Step 6: 生成 task.json
57
+ ### Step 4: Create Task Directory
223
58
 
224
- **基本信息**:
225
- ```json
226
- {
227
- "id": "<task-id>",
228
- "name": "<task-id>",
229
- "title": "<上游任务的 title>",
230
- "description": "",
231
- "role": "<当前角色>",
232
- "status": "planning",
233
- "dev_type": "frontend",
234
- "scope": null,
235
- "priority": "P2",
236
- "creator": "<当前开发者>",
237
- "assignee": "<当前开发者>",
238
- "createdAt": "<今天日期>",
239
- "completedAt": null,
240
- "branch": null,
241
- "base_branch": "main",
242
- "worktree_path": null,
243
- "current_phase": 0,
244
- "next_action": [],
245
- "commit": null,
246
- "pr_url": null,
247
- "subtasks": [],
248
- "relatedFiles": [],
249
- "notes": ""
250
- }
251
- ```
59
+ Determine task suffix based on pool:
60
+ - `requirements` pool -> `{id}-prototype`
61
+ - `prototypes` pool -> `{id}-impl`
252
62
 
253
- **写入文件**:
254
63
  ```bash
255
- echo '<task-json>' > <task_dir>/task.json
64
+ TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title>" --slug <id>-<suffix>)
256
65
  ```
257
66
 
258
- ---
67
+ ### Step 5: Write source.json
259
68
 
260
- ### Step 7: 生成 source.json
69
+ Create `source.json` in the task directory to reference upstream:
261
70
 
262
- **引用上游产出**:
263
71
  ```json
264
72
  {
265
73
  "based_on": {
266
- "type": "<pool-type-singular>",
267
- "id": "<task-id>",
268
- "path": "<上游产出路径>",
269
- "handoff_doc": "<上游 HANDOFF 路径>"
74
+ "type": "<requirement|prototype>",
75
+ "id": "<id>",
76
+ "path": "<deliverable path>",
77
+ "handoff_doc": "<path>/HANDOFF.md"
270
78
  }
271
79
  }
272
80
  ```
273
81
 
274
- **pool-type 转换**:
275
- - `requirements` → `requirement`
276
- - `prototypes` → `prototype`
277
-
278
- **写入文件**:
82
+ Write this file:
279
83
  ```bash
280
- echo '<source-json>' > <task_dir>/source.json
281
- ```
282
-
283
- ---
284
-
285
- ### Step 8: 初始化上下文配置
286
-
287
- **根据角色创建对应的 .jsonl 文件**:
288
-
289
- #### Designer 角色
290
- 创建 `designer.jsonl`:
291
- ```jsonl
292
- {"file": ".trellis/spec/roles/designer/index.md", "reason": "Designer工作规范"}
293
- {"file": ".trellis/spec/roles/designer/prototype-guidelines.md", "reason": "原型代码规范"}
294
- {"file": ".trellis/spec/frontend/component-guidelines.md", "reason": "组件开发规范"}
295
- {"file": "<上游产出路径>", "type": "directory", "reason": "上游需求文档(自动注入)"}
296
- {"file": "<上游HANDOFF路径>", "reason": "上游交接文档"}
84
+ cat > "$TASK_DIR/source.json" << 'EOF'
85
+ {content}
86
+ EOF
297
87
  ```
298
88
 
299
- #### Frontend 角色
300
- 创建 `frontend.jsonl`:
301
- ```jsonl
302
- {"file": ".trellis/spec/roles/frontend-impl/index.md", "reason": "Frontend工作规范"}
303
- {"file": ".trellis/spec/roles/frontend-impl/api-integration.md", "reason": "API集成指南"}
304
- {"file": ".trellis/spec/frontend/type-safety.md", "reason": "类型安全规范"}
305
- {"file": ".trellis/spec/backend/api-conventions.md", "reason": "API约定(理解后端)"}
306
- {"file": "<上游产出路径>", "type": "directory", "reason": "上游原型代码(自动注入)"}
307
- {"file": "<上游HANDOFF路径>", "reason": "上游交接文档"}
308
- ```
309
-
310
- **注意**:上游产出路径标记为 `"type": "directory"`,Hook 会自动读取目录下所有文件。
311
-
312
- ---
313
-
314
- ### Step 9: 消费任务(更新池子状态)
89
+ ### Step 6: Configure Context (JSONL)
315
90
 
316
- 调用 pool.py 标记任务为已消费:
91
+ Initialize context files for the task:
317
92
 
318
93
  ```bash
319
- python3 .trellis/scripts/pool.py consume <pool-type> <task-id> <当前开发者>
94
+ python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" frontend
320
95
  ```
321
96
 
322
- **池子状态变化**:
323
- - 任务从 `available` 列表移动到 `consumed` 列表
324
- - 添加 `consumed_by` 和 `consumed_at` 字段
325
-
326
- ---
327
-
328
- ### Step 10: 设置为当前任务
97
+ Add upstream deliverable files and role specs to context:
329
98
 
330
99
  ```bash
331
- python3 .trellis/scripts/task.py start <task_dir>
332
- ```
100
+ # Add role spec
101
+ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement ".trellis/spec/roles/<role>/index.md" "Role guidelines"
333
102
 
334
- **效果**:
335
- - 更新 `.trellis/.current-task` 为新任务路径
336
- - Hook 会自动注入上游产出
103
+ # Add upstream HANDOFF doc
104
+ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<handoff_doc>" "Upstream handoff document"
337
105
 
338
- ---
339
-
340
- ### Step 11: 输出通知信息
341
-
342
- ```
343
- ✅ 任务已选择并创建!
344
-
345
- 任务目录: <task_dir>
346
- 基于上游: <pool-type>/<task-id>
347
-
348
- 已注入上游产出:
349
- - HANDOFF: <上游HANDOFF路径>
350
- - 产出文件: <上游产出路径>
351
-
352
- 下一步:
353
- 1. 查看上游交接文档:cat <task_dir>/source.json
354
- 2. 阅读角色规范:cat .trellis/spec/roles/<role>/index.md
355
- 3. 开始开发
356
- 4. 完成后执行:/trellis:handoff
357
- ```
358
-
359
- ---
360
-
361
- ## 错误处理
362
-
363
- ### 错误场景1:PM 尝试 pick 任务
364
- ```
365
- Error: PM 不能从池子选择任务
366
-
367
- PM 是流水线起点,应该:
368
- 1. 创建新任务:python3 .trellis/scripts/task.py create "<title>"
369
- 2. 设置角色:python3 .trellis/scripts/task.py set-role <dir> pm
370
- 3. 编写 PRD
371
- 4. 执行 /trellis:handoff
106
+ # Add upstream deliverable directory files
107
+ # (add each significant file from the upstream output)
108
+ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<upstream_file>" "Upstream deliverable"
372
109
  ```
373
110
 
374
- ### 错误场景2:角色与池子不匹配
375
- ```
376
- Error: Frontend 不能从 requirements 池选择任务
377
-
378
- Frontend 应该从 prototypes 池选择:
379
- /trellis:pick-task prototypes <task-id>
380
-
381
- 流程说明:
382
- requirements → Designer → prototypes → Frontend
383
- ```
384
-
385
- ### 错误场景3:任务不存在
386
- ```
387
- Error: 任务 'user-login' 不存在于 requirements 池
388
-
389
- 可用任务:
390
- /trellis:pick-task requirements payment
391
- /trellis:pick-task requirements shopping-cart
392
-
393
- 或查看完整列表:
394
- python3 .trellis/scripts/pool.py list requirements
395
- ```
396
-
397
- ### 错误场景4:任务已被消费
398
- ```
399
- Error: 任务 'user-login' 已被消费
400
-
401
- 消费者: designer-bob
402
- 消费时间: 2026-02-28 15:30:00
403
-
404
- 如需重新处理:
405
- 1. 联系 designer-bob 确认状态
406
- 2. 或创建新任务基于相同需求
407
- ```
408
-
409
- ### 错误场景5:上游 HANDOFF 缺失
410
- ```
411
- Warning: 上游 HANDOFF 文档缺失
412
-
413
- 路径: deliverables/requirements/user-login/HANDOFF.md
414
-
415
- 将继续创建任务,但上游交接信息可能不完整。
416
-
417
- 是否继续?[y/N]
418
- ```
419
-
420
- ### 错误场景6:任务目录已存在
421
- ```
422
- Error: 任务目录已存在:.trellis/tasks/designer/02-28-user-login
423
-
424
- 可能原因:
425
- - 之前创建过相同任务
426
- - 日期和任务ID重复
427
-
428
- 解决方案:
429
- 1. 删除旧目录:rm -rf <task_dir>
430
- 2. 或使用不同的任务ID
431
- ```
432
-
433
- ---
434
-
435
- ## 示例执行流程
436
-
437
- ### Designer 选择 PM 的需求
111
+ ### Step 7: Consume from Pool
438
112
 
439
113
  ```bash
440
- # 1. 查看可用需求
441
- /trellis:pick-task requirements
442
-
443
- AI 输出:
444
- "可用的 requirements 任务:
445
- 1. user-login - 用户登录功能 (完成人: pm-alice)
446
- 2. payment - 支付功能 (完成人: pm-alice)"
447
-
448
- # 2. 选择任务
449
- /trellis:pick-task requirements user-login
450
-
451
- AI 执行流程:
452
- 1. 检查角色:designer-bob → role=designer ✅
453
- 2. 验证池子匹配:designer + requirements ✅
454
- 3. 读取任务:user-login (status=available) ✅
455
- 4. 读取 HANDOFF:deliverables/requirements/user-login/HANDOFF.md
456
- 5. 创建目录:.trellis/tasks/designer/02-28-user-login/
457
- 6. 生成 task.json (role=designer)
458
- 7. 生成 source.json (based_on=requirement/user-login)
459
- 8. 创建 designer.jsonl (包含上游产出)
460
- 9. 消费任务:pool.py consume requirements user-login designer-bob
461
- 10. 设置当前:task.py start .trellis/tasks/designer/02-28-user-login
462
- 11. 输出通知
463
-
464
- AI 输出:
465
- "✅ 任务已选择并创建!
466
-
467
- 任务目录: .trellis/tasks/designer/02-28-user-login
468
- 基于上游: requirement/user-login
469
-
470
- 下一步:
471
- 1. 查看需求:cat deliverables/requirements/user-login/HANDOFF.md
472
- 2. 阅读规范:cat .trellis/spec/roles/designer/index.md
473
- 3. 开始创建原型
474
- 4. 完成后执行:/trellis:handoff"
114
+ python3 ./.trellis/scripts/pool.py consume <pool> <id> <developer>
475
115
  ```
476
116
 
477
- ---
478
-
479
- ## 高级功能(可选)
117
+ ### Step 8: Activate Task
480
118
 
481
- ### 批量查看任务
482
119
  ```bash
483
- # 用户可以不指定任务ID,先查看列表
484
- /trellis:pick-task requirements
485
-
486
- AI 展示列表,等待用户选择
120
+ python3 ./.trellis/scripts/task.py start "$TASK_DIR"
487
121
  ```
488
122
 
489
- ### 任务预览
490
- ```bash
491
- # 在选择任务前预览 HANDOFF 内容
492
- /trellis:pick-task requirements user-login --preview
493
-
494
- AI 只展示 HANDOFF 摘要,不创建任务
495
- ```
123
+ ### Step 9: Read Upstream Context
496
124
 
497
- ---
125
+ Read and summarize the upstream deliverables for the user:
498
126
 
499
- ## 注意事项
127
+ 1. Read the HANDOFF.md document
128
+ 2. List all upstream files
129
+ 3. Summarize key points the user should know
500
130
 
501
- 1. **角色隔离**:任务目录按角色隔离(`.trellis/tasks/{role}/`)
502
- 2. **上游注入**:`source.json` 确保 Hook 能找到上游产出
503
- 3. **池子状态**:成功 pick 后,任务从 `available` 变为 `consumed`
504
- 4. **防重复**:如果任务目录已存在,拒绝创建(或提示用户确认覆盖)
131
+ ### Step 10: Report
505
132
 
506
- ---
133
+ ```
134
+ Task picked and ready!
135
+ - Task: <task-dir>
136
+ - Based on: <pool>/<id>
137
+ - Upstream: <deliverable-path>
138
+ - Role specs loaded: .trellis/spec/roles/<role>/
507
139
 
508
- ## 命令别名(可选)
140
+ Key points from upstream HANDOFF:
141
+ - (summary point 1)
142
+ - (summary point 2)
509
143
 
510
- 用户可能使用以下变体,AI 应识别并执行相同逻辑:
511
- - `/trellis:pick-task`
512
- - `/pick-task`
513
- - `/pick`
514
- - "从需求池选择任务"
515
- - "选择原型任务"
144
+ What would you like to work on first?
145
+ ```