flower-trellis 0.3.1-beta.2 → 0.3.1-beta.4

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.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: trellis-diff-brief
3
+ description: "按需读取当前 Trellis 任务与实际 git diff,生成对话内简短改动说明。用于用户想知道“这轮改了啥”、push 前看改动、check 前快速理解实现范围、sub-agent 实现后主对话需要复盘实际变更时。"
4
+ ---
5
+
6
+ # Trellis Diff Brief
7
+
8
+ 按需解释当前任务的实际改动。只读 task artifacts 和 git diff,在对话里输出摘要;不写文件、不修改代码、不做 check、不提交。
9
+
10
+ ## 核心规则
11
+
12
+ - 以真实 git 状态和 diff 为准,不凭记忆总结。
13
+ - 优先关联当前 Trellis 任务;没有当前任务时,也可以只基于 git diff 汇总。
14
+ - 区分任务相关改动、生成/快照/任务文档改动、未识别 dirty 文件。
15
+ - 不替代 `trellis-check` / `trellis-check-all`;只解释改动,不判断质量是否通过。
16
+ - 默认不输出大段 patch。必要时只读取关键文件的局部 diff。
17
+ - 不执行 `git add`、`git commit`、`git push`、`git merge`、格式化、测试或任何写操作。
18
+
19
+ ## 执行步骤
20
+
21
+ 1. 解析任务:
22
+ - 运行 `python3 ./.trellis/scripts/task.py current --source`。
23
+ - 若有当前任务,读取 `prd.md`、`design.md if present`、`implement.md if present`、`brief.md if present` 和 `task.json`。
24
+ 2. 收集父仓状态:
25
+ - `git status --short`
26
+ - `git diff --stat`
27
+ - `git diff --name-only`
28
+ - `git diff --cached --stat`
29
+ - `git diff --cached --name-only`
30
+ - `git log --oneline -5`
31
+ 3. 如 `task.json.base_branch` 存在,补充:
32
+ - `git log <base_branch>..HEAD --oneline`
33
+ - `git diff --stat <base_branch>...HEAD`
34
+ 4. 如父仓状态显示 submodule dirty,或 `.trellis/config.yaml` 中有独立 Git package,按同样方式读取对应 Git root 的状态。
35
+ 5. 只在需要解释行为时读取关键 patch:
36
+ - `git diff -- <file>`
37
+ - `git diff --cached -- <file>`
38
+ - 对大文件或大 diff 只抽取相关片段,不整段粘贴。
39
+
40
+ ## 输出格式
41
+
42
+ ```markdown
43
+ ## Diff Brief
44
+
45
+ ### 任务目标
46
+ - <来自 brief / prd 的一句话;没有任务时写“未绑定当前任务”>
47
+
48
+ ### 实际改动
49
+ - <按行为或模块归纳,不按文件机械罗列>
50
+
51
+ ### 关键文件
52
+ - `<path>`:<改了什么,为什么重要>
53
+
54
+ ### 生成 / 文档 / 快照
55
+ - <如无则写“无明显生成或快照改动”>
56
+
57
+ ### 未识别 dirty
58
+ - <不属于本轮任务或无法判断的 dirty 文件;如无则写“无”>
59
+
60
+ ### 验证状态
61
+ - 已看到:<从对话、任务文档或命令输出能确认的验证>
62
+ - 未确认:<没有证据的检查,不要假装已跑>
63
+
64
+ ### 注意点
65
+ - <风险、需要人工重点看的点;如无则写“无明显风险”>
66
+ ```
67
+
68
+ ## 分类口径
69
+
70
+ - “实际改动”写用户或 workflow 能感知的行为变化。
71
+ - “关键文件”只列会帮助用户理解改动的文件;不要把 `git diff --name-only` 原样全贴。
72
+ - “生成 / 文档 / 快照”用于区分 `enhancements/`、任务文档、manifest、锁文件、生成物等辅助改动。
73
+ - “未识别 dirty”必须如实列出,避免用户以为它们也属于本轮实现。
74
+ - “验证状态”只能写有证据的命令或检查;没跑就写未确认。
75
+
76
+ ## 不要做
77
+
78
+ - 不要创建 `changes.md` 或其它持久文件,除非用户明确要求。
79
+ - 不要修改 `brief.md`、三件套或 `task.json`。
80
+ - 不要把 diff brief 写成 check 报告。
81
+ - 不要为了简短省略会改变用户判断的范围、风险或未识别 dirty。
@@ -5,14 +5,14 @@ description: |
5
5
  Implement can route inline or subagent. Check defaults to check-all inline/subagent; lightweight
6
6
  trellis-check is hidden and only available when the user explicitly requests "light check" / "轻量检查".
7
7
  Invoked from Phase 2.1 target=implement and Phase 2.2 target=check/check-all of the routing-aware workflow.
8
- Same-cycle repair/recheck loops reuse the latest route decision instead of prompting again.
8
+ Current-task repair/recheck loops reuse the latest valid route decision instead of prompting again.
9
9
  Final re-checks return to Phase 2.2 before commit.
10
10
  Skip in non-trellis projects (no .trellis/). Not for other subagents (trellis-research / trellis-debug).
11
11
  ---
12
12
 
13
13
  # Trellis 路由器:implement / check 执行模式选择
14
14
 
15
- 主 agent 进入 Phase 2.1 实现路由或 Phase 2.2 检查路由时调用本 skill。check 失败后的同轮修复/重检复用最近路由,不重新调用本 skill。提交前确实需要最终复查时,回到 Phase 2.2 再执行 check 路由。
15
+ 主 agent 进入 Phase 2.1 实现路由或 Phase 2.2 检查路由时调用本 skill。当前任务内已有合法来源的最近 route 决策时,后续实现、修复、重检默认复用该决策;没有合法决策时才进入本 skill 或同编号 fallback。提交前确实需要最终复查时,回到 Phase 2.2 并复用当前任务的合法 check route,除非用户明确要求重选。
16
16
 
17
17
  个人配置只写入 `.trellis/.route-prefs.tmp`。该文件匹配 `.trellis/.gitignore` 的 `*.tmp` 规则,属于开发者本地偏好,不纳入 git,也不影响其他开发者。
18
18
 
@@ -20,9 +20,11 @@ description: |
20
20
 
21
21
  ## Step 0: 识别目标与用户意图
22
22
 
23
- 个人 route 配置只决定“已获准执行后的模式”,不是开工授权。读取 `.trellis/.route-prefs.tmp` 前,必须确认当前 workflow 已允许进入对应 target:implement 需要任务已完成规划确认并处于 `in_progress`;check 用于 Phase 2.2 首次检查执行,或用户明确要求最终复查 / 轻量检查。最终复查只有在 Phase 2.2 结果缺失、check 后代码在同轮修复闭环外发生变化、风险较高或用户明确要求复查时才回到 Phase 2.2 并重新进入 check 路由。如果仍在 planning、等待用户确认,或用户表达“等一下 / 我再想想”,停止,不读取个人配置。
23
+ 个人 route 配置只决定“已获准执行后的模式”,不是开工授权。读取 `.trellis/.route-prefs.tmp` 前,必须确认当前 workflow 已允许进入对应 target:implement 需要任务已完成规划确认并处于 `in_progress`;check 用于 Phase 2.2 检查执行,或用户明确要求最终复查 / 轻量检查。最终复查只有在 Phase 2.2 结果缺失、风险较高或用户明确要求复查时才回到 Phase 2.2;回到 Phase 2.2 后优先复用当前任务的合法 check route,除非用户明确要求重选/临时改/清除默认。如果仍在 planning、等待用户确认,或用户表达“等一下 / 我再想想”,停止,不读取个人配置。
24
24
 
25
- check 刚发现问题或用户指出刚检查过的实现有问题时,同轮修复/重检复用最近 implement/check 路由;除非用户明确要求重选/临时改/清除默认,不再调用本 skill。
25
+ 合法 route 决策必须能追溯到 `trellis-route`、同编号 fallback 选项,或由本 skill 读取到的有效 `.trellis/.route-prefs.tmp` 配置。用户自然语言说过“inline/subagent”、compact summary、SessionStart 摘要、`codex-mode`、空 `.route-prefs.tmp`、旧单值偏好,都不能单独作为有效 route 决策。
26
+
27
+ 当前任务内已有 target 匹配且来源合法的 route 决策时,后续实现、check 发现问题、用户指出刚检查过的实现有问题、修复后重检、提交前复查均默认复用最近 implement/check 路由;除非用户明确要求重选/临时改/清除默认,不再调用本 skill。
26
28
 
27
29
  Codex inline mode 只表示主会话默认直接执行,不是 route 选项过滤器。即使当前上下文出现 `<codex-mode>inline...do not dispatch...</codex-mode>` 或 `workflow-state:in_progress-inline`,也不能推断“只能 inline”或跳过 subagent 选项;仍必须读取 `.trellis/.route-prefs.tmp`,或在无有效配置时展示正常 inline/subagent 选项。若本 skill 的紧邻路由决定是 subagent,本步骤允许主 agent dispatch 对应 implement/check sub-agent;禁止的是绕过 `trellis-route` 直接 dispatch。
28
30
 
@@ -224,6 +226,13 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
224
226
  [来自个人 route 配置:`.trellis/.route-prefs.tmp` (<key>=<value>)。]
225
227
  [说明:用户明确请求轻量检查,使用隐藏逃生口。]
226
228
 
229
+ route_decision:
230
+ target: <implement | check>
231
+ mode: <inline | subagent | check-all-inline | check-all-subagent | check-inline | check-subagent>
232
+ source: <trellis-route | route-prefs | numbered-fallback>
233
+ scope: task
234
+ task: <task.py current 的任务路径或 current>
235
+
227
236
  接下来主 agent 应当:
228
237
  - <路由表里对应的工具调用形式>
229
238
  - [若 implement subagent 且 subagent_skip_compile=true:附加“跳过编译”prompt 段]
@@ -232,7 +241,7 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
232
241
  - <要避免的工具调用>
233
242
  ```
234
243
 
235
- 中括号内行为条件性出现:仅命中个人配置时显示配置行;仅轻量 check 时显示隐藏逃生口说明;仅 implement subagent + skip_compile=true 时附加“跳过编译”段。
244
+ 中括号内行为条件性出现:仅命中个人配置时显示配置行;仅轻量 check 时显示隐藏逃生口说明;仅 implement subagent + skip_compile=true 时附加“跳过编译”段。`route_decision` 必须保留在回复、交接摘要或 compact summary 中;没有 `source` 的自然语言偏好不能被后续 agent 复用为 route。
236
245
 
237
246
  ---
238
247
 
@@ -241,7 +250,7 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
241
250
  1. **个人配置私有**:`.trellis/.route-prefs.tmp` 是本地偏好,gitignored,不能进入提交计划。
242
251
  2. **正常路由少打断**:命中个人配置时直接输出路由决定,不再重复询问。
243
252
  3. **显式覆盖优先于配置**:用户要求临时改、重新选择或清除默认时,必须重新展示选项,不能让配置优先。
244
- 4. **失败闭环复用路由**:check 发现问题后的同一轮修复/重检沿用最近一次 implement/check 路由,不再次询问模式。
253
+ 4. **当前任务复用路由**:当前任务内已有合法来源的最近 implement/check 路由时,后续实现、修复、重检和复查默认沿用,不再次询问模式。
245
254
  5. **check 默认全面检查**:普通 check 路由只展示 `check-all` inline/subagent,不推荐轻量 `trellis-check`。
246
255
  6. **轻量 check 是隐藏逃生口**:只有用户明确请求 `light check` / `轻量检查` 时才可走轻量 `trellis-check`。
247
256
  7. **决策与执行分离**:本 skill 只输出指令,下一轮由主 agent 调工具。
@@ -259,7 +268,8 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
259
268
  - 没有用户明确请求时,把 check 降级到轻量 `trellis-check`。
260
269
  - `AskUserQuestion` / `request_user_input` 不可用时,记录为 inline 或 subagent 路径并继续。
261
270
  - 没有有效 check 配置、用户选择或最近本轮 check 路由决定时,自动执行 inline check。
262
- - check 发现问题后,把同一轮修复/重检当成新的 route 边界再次询问模式。
271
+ - 没有 `source` 合法的 `route_decision`,就把“用户说过 inline/subagent”或 compact summary 当成已路由。
272
+ - check 发现问题后,把当前任务内已有合法 route 的修复/重检当成新的 route 边界再次询问模式。
263
273
  - 给 check 任何模式附加“跳过编译”指令。
264
274
  - 询问后忽视用户答案默认 subagent。
265
275
  - 因 `<codex-mode>` 或 `in_progress-inline` 提到 inline,就自行把无配置 route 结果改成 inline 或隐藏 subagent 选项。
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: trellis-task-brief
3
+ description: "从最新 prd.md、design.md、implement.md 生成、刷新、校验并在对话中展示 Trellis 任务的 brief.md。用于 Phase 1.4 task.py start 前、planning review、用户要求任务 brief/交接摘要,或 in_progress 任务缺失/过期 brief.md 时。"
4
+ ---
5
+
6
+ # Trellis 任务交接摘要
7
+
8
+ 为当前任务生成或更新 `brief.md`,并把交接摘要展示在对话里。`brief.md` 是从三件套派生的交接视图,不替代 `prd.md`、`design.md`、`implement.md`。
9
+
10
+ ## 核心规则
11
+
12
+ - 每次运行都重新读取最新 `prd.md`、`design.md if present`、`implement.md if present`。
13
+ - 已存在的 `brief.md` 不能作为跳过同步的理由。
14
+ - `brief.md` 必须以三件套为准覆盖旧内容;无法从三件套追溯的旧内容不能保留为事实。
15
+ - 不要在 `brief.md` 里发明三件套没有表达的新需求。缺失字段写“未明确”,并提示应补充三件套。
16
+ - 写回 `brief.md` 后,必须在当前对话中展示 brief 正文;不要只给文件路径。
17
+ - Phase 1.4 前展示完整 brief,并等待用户确认 planning artifacts 和 brief 后,才运行 `task.py start`。
18
+ - `in_progress` 阶段发现缺失 brief 时,不自动生成未经 review 的 brief;先读取三件套并建议回补。只有用户明确要求当场回补并 review 时,才继续写回 `brief.md`。
19
+ - 不要机械限制 brief 或对话展示长度;信息完整优先,不能截掉会影响实现判断的范围、约束、风险或验收条件。
20
+
21
+ ## 执行步骤
22
+
23
+ 1. 确定任务目录:
24
+ - 用户给了任务路径时使用该路径。
25
+ - 否则运行 `python3 ./.trellis/scripts/task.py current --source`,读取 `Current task:`。
26
+ 2. 读取任务状态:
27
+ - 读取 `<task>/task.json` 的 `status`。
28
+ - 如果 `status` 是 `in_progress` 且 `<task>/brief.md` 不存在,并且用户没有明确要求“回补 / backfill / 重新生成并 review brief”,则只读取三件套、说明 brief 缺失、建议回补,不写 `brief.md`。
29
+ 3. 读取任务文件:
30
+ - 必读:`prd.md`。
31
+ - 存在则读:`design.md`、`implement.md`。
32
+ 4. 从最新三件套提取:
33
+ - `Goal`:任务目标一句话。
34
+ - `Scope`:本轮实现范围。
35
+ - `Non-Goals`:明确不做的范围。
36
+ - `Key Context`:关键文件、模块、入口、约束或风险。
37
+ - `Acceptance`:主要验收标准。
38
+ - `Next Step`:进入实现后的下一步。
39
+ 5. 写回 `<task>/brief.md`。如果文件已存在,仍用最新三件套派生内容覆盖旧正文。
40
+ 6. 在对话中展示 brief 正文,并说明来源文件。
41
+
42
+ ## 模板
43
+
44
+ ```markdown
45
+ # Brief — <任务标题>
46
+
47
+ ## Goal
48
+
49
+ - <一句话说明任务目标>
50
+
51
+ ## Scope
52
+
53
+ - <本轮要做的事情>
54
+
55
+ ## Non-Goals
56
+
57
+ - <本轮明确不做的事情>
58
+
59
+ ## Key Context
60
+
61
+ - <关键文件、模块、入口、约束或风险>
62
+
63
+ ## Acceptance
64
+
65
+ - <主要验收标准>
66
+
67
+ ## Next Step
68
+
69
+ - <进入实现后的下一步>
70
+ ```
71
+
72
+ ## 展示格式
73
+
74
+ Phase 1.4 review 前:
75
+
76
+ ```markdown
77
+ 任务交接摘要已更新:<task>/brief.md
78
+
79
+ <brief.md 正文>
80
+
81
+ 请确认 planning artifacts 和上述 brief;确认后才运行 `task.py start <task>`。
82
+ ```
83
+
84
+ 任务已经是 `in_progress` 时,如果 brief 存在,进入 implement route 前重述:
85
+
86
+ ```markdown
87
+ 当前任务 brief:<目标一句话>
88
+ 范围/约束:<不失真的压缩要点>
89
+ 验收:<不失真的压缩要点>
90
+ 完整摘要:<task>/brief.md
91
+
92
+ 下一步:进入 `trellis-route(implement)`。
93
+ ```
94
+
95
+ 压缩重述不能丢掉会影响实现判断的范围、约束、风险和验收条件。
96
+
97
+ ## 不要做
98
+
99
+ - 不要执行 `task.py start`;这仍由主 workflow 在用户确认后执行。
100
+ - 不要修改三件套来迎合 brief。
101
+ - 不要把 `brief.md` 当作第四件套扩写。
102
+ - 不要只因为 `brief.md` 已存在就跳过更新。
103
+ - 不要只输出“已写入 brief.md”而不展示正文。
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: trellis-diff-brief
3
+ description: "按需读取当前 Trellis 任务与实际 git diff,生成对话内简短改动说明。用于用户想知道“这轮改了啥”、push 前看改动、check 前快速理解实现范围、sub-agent 实现后主对话需要复盘实际变更时。"
4
+ ---
5
+
6
+ # Trellis Diff Brief
7
+
8
+ 按需解释当前任务的实际改动。只读 task artifacts 和 git diff,在对话里输出摘要;不写文件、不修改代码、不做 check、不提交。
9
+
10
+ ## 核心规则
11
+
12
+ - 以真实 git 状态和 diff 为准,不凭记忆总结。
13
+ - 优先关联当前 Trellis 任务;没有当前任务时,也可以只基于 git diff 汇总。
14
+ - 区分任务相关改动、生成/快照/任务文档改动、未识别 dirty 文件。
15
+ - 不替代 `trellis-check` / `trellis-check-all`;只解释改动,不判断质量是否通过。
16
+ - 默认不输出大段 patch。必要时只读取关键文件的局部 diff。
17
+ - 不执行 `git add`、`git commit`、`git push`、`git merge`、格式化、测试或任何写操作。
18
+
19
+ ## 执行步骤
20
+
21
+ 1. 解析任务:
22
+ - 运行 `python3 ./.trellis/scripts/task.py current --source`。
23
+ - 若有当前任务,读取 `prd.md`、`design.md if present`、`implement.md if present`、`brief.md if present` 和 `task.json`。
24
+ 2. 收集父仓状态:
25
+ - `git status --short`
26
+ - `git diff --stat`
27
+ - `git diff --name-only`
28
+ - `git diff --cached --stat`
29
+ - `git diff --cached --name-only`
30
+ - `git log --oneline -5`
31
+ 3. 如 `task.json.base_branch` 存在,补充:
32
+ - `git log <base_branch>..HEAD --oneline`
33
+ - `git diff --stat <base_branch>...HEAD`
34
+ 4. 如父仓状态显示 submodule dirty,或 `.trellis/config.yaml` 中有独立 Git package,按同样方式读取对应 Git root 的状态。
35
+ 5. 只在需要解释行为时读取关键 patch:
36
+ - `git diff -- <file>`
37
+ - `git diff --cached -- <file>`
38
+ - 对大文件或大 diff 只抽取相关片段,不整段粘贴。
39
+
40
+ ## 输出格式
41
+
42
+ ```markdown
43
+ ## Diff Brief
44
+
45
+ ### 任务目标
46
+ - <来自 brief / prd 的一句话;没有任务时写“未绑定当前任务”>
47
+
48
+ ### 实际改动
49
+ - <按行为或模块归纳,不按文件机械罗列>
50
+
51
+ ### 关键文件
52
+ - `<path>`:<改了什么,为什么重要>
53
+
54
+ ### 生成 / 文档 / 快照
55
+ - <如无则写“无明显生成或快照改动”>
56
+
57
+ ### 未识别 dirty
58
+ - <不属于本轮任务或无法判断的 dirty 文件;如无则写“无”>
59
+
60
+ ### 验证状态
61
+ - 已看到:<从对话、任务文档或命令输出能确认的验证>
62
+ - 未确认:<没有证据的检查,不要假装已跑>
63
+
64
+ ### 注意点
65
+ - <风险、需要人工重点看的点;如无则写“无明显风险”>
66
+ ```
67
+
68
+ ## 分类口径
69
+
70
+ - “实际改动”写用户或 workflow 能感知的行为变化。
71
+ - “关键文件”只列会帮助用户理解改动的文件;不要把 `git diff --name-only` 原样全贴。
72
+ - “生成 / 文档 / 快照”用于区分 `enhancements/`、任务文档、manifest、锁文件、生成物等辅助改动。
73
+ - “未识别 dirty”必须如实列出,避免用户以为它们也属于本轮实现。
74
+ - “验证状态”只能写有证据的命令或检查;没跑就写未确认。
75
+
76
+ ## 不要做
77
+
78
+ - 不要创建 `changes.md` 或其它持久文件,除非用户明确要求。
79
+ - 不要修改 `brief.md`、三件套或 `task.json`。
80
+ - 不要把 diff brief 写成 check 报告。
81
+ - 不要为了简短省略会改变用户判断的范围、风险或未识别 dirty。
@@ -5,14 +5,14 @@ description: |
5
5
  Implement can route inline or subagent. Check defaults to check-all inline/subagent; lightweight
6
6
  trellis-check is hidden and only available when the user explicitly requests "light check" / "轻量检查".
7
7
  Invoked from Phase 2.1 target=implement and Phase 2.2 target=check/check-all of the routing-aware workflow.
8
- Same-cycle repair/recheck loops reuse the latest route decision instead of prompting again.
8
+ Current-task repair/recheck loops reuse the latest valid route decision instead of prompting again.
9
9
  Final re-checks return to Phase 2.2 before commit.
10
10
  Skip in non-trellis projects (no .trellis/). Not for other subagents (trellis-research / trellis-debug).
11
11
  ---
12
12
 
13
13
  # Trellis 路由器:implement / check 执行模式选择
14
14
 
15
- 主 agent 进入 Phase 2.1 实现路由或 Phase 2.2 检查路由时调用本 skill。check 失败后的同轮修复/重检复用最近路由,不重新调用本 skill。提交前确实需要最终复查时,回到 Phase 2.2 再执行 check 路由。
15
+ 主 agent 进入 Phase 2.1 实现路由或 Phase 2.2 检查路由时调用本 skill。当前任务内已有合法来源的最近 route 决策时,后续实现、修复、重检默认复用该决策;没有合法决策时才进入本 skill 或同编号 fallback。提交前确实需要最终复查时,回到 Phase 2.2 并复用当前任务的合法 check route,除非用户明确要求重选。
16
16
 
17
17
  个人配置只写入 `.trellis/.route-prefs.tmp`。该文件匹配 `.trellis/.gitignore` 的 `*.tmp` 规则,属于开发者本地偏好,不纳入 git,也不影响其他开发者。
18
18
 
@@ -20,9 +20,11 @@ description: |
20
20
 
21
21
  ## Step 0: 识别目标与用户意图
22
22
 
23
- 个人 route 配置只决定“已获准执行后的模式”,不是开工授权。读取 `.trellis/.route-prefs.tmp` 前,必须确认当前 workflow 已允许进入对应 target:implement 需要任务已完成规划确认并处于 `in_progress`;check 用于 Phase 2.2 首次检查执行,或用户明确要求最终复查 / 轻量检查。最终复查只有在 Phase 2.2 结果缺失、check 后代码在同轮修复闭环外发生变化、风险较高或用户明确要求复查时才回到 Phase 2.2 并重新进入 check 路由。如果仍在 planning、等待用户确认,或用户表达“等一下 / 我再想想”,停止,不读取个人配置。
23
+ 个人 route 配置只决定“已获准执行后的模式”,不是开工授权。读取 `.trellis/.route-prefs.tmp` 前,必须确认当前 workflow 已允许进入对应 target:implement 需要任务已完成规划确认并处于 `in_progress`;check 用于 Phase 2.2 检查执行,或用户明确要求最终复查 / 轻量检查。最终复查只有在 Phase 2.2 结果缺失、风险较高或用户明确要求复查时才回到 Phase 2.2;回到 Phase 2.2 后优先复用当前任务的合法 check route,除非用户明确要求重选/临时改/清除默认。如果仍在 planning、等待用户确认,或用户表达“等一下 / 我再想想”,停止,不读取个人配置。
24
24
 
25
- check 刚发现问题或用户指出刚检查过的实现有问题时,同轮修复/重检复用最近 implement/check 路由;除非用户明确要求重选/临时改/清除默认,不再调用本 skill。
25
+ 合法 route 决策必须能追溯到 `trellis-route`、同编号 fallback 选项,或由本 skill 读取到的有效 `.trellis/.route-prefs.tmp` 配置。用户自然语言说过“inline/subagent”、compact summary、SessionStart 摘要、`codex-mode`、空 `.route-prefs.tmp`、旧单值偏好,都不能单独作为有效 route 决策。
26
+
27
+ 当前任务内已有 target 匹配且来源合法的 route 决策时,后续实现、check 发现问题、用户指出刚检查过的实现有问题、修复后重检、提交前复查均默认复用最近 implement/check 路由;除非用户明确要求重选/临时改/清除默认,不再调用本 skill。
26
28
 
27
29
  Codex inline mode 只表示主会话默认直接执行,不是 route 选项过滤器。即使当前上下文出现 `<codex-mode>inline...do not dispatch...</codex-mode>` 或 `workflow-state:in_progress-inline`,也不能推断“只能 inline”或跳过 subagent 选项;仍必须读取 `.trellis/.route-prefs.tmp`,或在无有效配置时展示正常 inline/subagent 选项。若本 skill 的紧邻路由决定是 subagent,本步骤允许主 agent dispatch 对应 implement/check sub-agent;禁止的是绕过 `trellis-route` 直接 dispatch。
28
30
 
@@ -224,6 +226,13 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
224
226
  [来自个人 route 配置:`.trellis/.route-prefs.tmp` (<key>=<value>)。]
225
227
  [说明:用户明确请求轻量检查,使用隐藏逃生口。]
226
228
 
229
+ route_decision:
230
+ target: <implement | check>
231
+ mode: <inline | subagent | check-all-inline | check-all-subagent | check-inline | check-subagent>
232
+ source: <trellis-route | route-prefs | numbered-fallback>
233
+ scope: task
234
+ task: <task.py current 的任务路径或 current>
235
+
227
236
  接下来主 agent 应当:
228
237
  - <路由表里对应的工具调用形式>
229
238
  - [若 implement subagent 且 subagent_skip_compile=true:附加“跳过编译”prompt 段]
@@ -232,7 +241,7 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
232
241
  - <要避免的工具调用>
233
242
  ```
234
243
 
235
- 中括号内行为条件性出现:仅命中个人配置时显示配置行;仅轻量 check 时显示隐藏逃生口说明;仅 implement subagent + skip_compile=true 时附加“跳过编译”段。
244
+ 中括号内行为条件性出现:仅命中个人配置时显示配置行;仅轻量 check 时显示隐藏逃生口说明;仅 implement subagent + skip_compile=true 时附加“跳过编译”段。`route_decision` 必须保留在回复、交接摘要或 compact summary 中;没有 `source` 的自然语言偏好不能被后续 agent 复用为 route。
236
245
 
237
246
  ---
238
247
 
@@ -241,7 +250,7 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
241
250
  1. **个人配置私有**:`.trellis/.route-prefs.tmp` 是本地偏好,gitignored,不能进入提交计划。
242
251
  2. **正常路由少打断**:命中个人配置时直接输出路由决定,不再重复询问。
243
252
  3. **显式覆盖优先于配置**:用户要求临时改、重新选择或清除默认时,必须重新展示选项,不能让配置优先。
244
- 4. **失败闭环复用路由**:check 发现问题后的同一轮修复/重检沿用最近一次 implement/check 路由,不再次询问模式。
253
+ 4. **当前任务复用路由**:当前任务内已有合法来源的最近 implement/check 路由时,后续实现、修复、重检和复查默认沿用,不再次询问模式。
245
254
  5. **check 默认全面检查**:普通 check 路由只展示 `check-all` inline/subagent,不推荐轻量 `trellis-check`。
246
255
  6. **轻量 check 是隐藏逃生口**:只有用户明确请求 `light check` / `轻量检查` 时才可走轻量 `trellis-check`。
247
256
  7. **决策与执行分离**:本 skill 只输出指令,下一轮由主 agent 调工具。
@@ -259,7 +268,8 @@ OLD_CHECK=$(awk -F= '$1=="check"{print $2}' "$PREF_FILE" 2>/dev/null | tail -n 1
259
268
  - 没有用户明确请求时,把 check 降级到轻量 `trellis-check`。
260
269
  - `AskUserQuestion` / `request_user_input` 不可用时,记录为 inline 或 subagent 路径并继续。
261
270
  - 没有有效 check 配置、用户选择或最近本轮 check 路由决定时,自动执行 inline check。
262
- - check 发现问题后,把同一轮修复/重检当成新的 route 边界再次询问模式。
271
+ - 没有 `source` 合法的 `route_decision`,就把“用户说过 inline/subagent”或 compact summary 当成已路由。
272
+ - check 发现问题后,把当前任务内已有合法 route 的修复/重检当成新的 route 边界再次询问模式。
263
273
  - 给 check 任何模式附加“跳过编译”指令。
264
274
  - 询问后忽视用户答案默认 subagent。
265
275
  - 因 `<codex-mode>` 或 `in_progress-inline` 提到 inline,就自行把无配置 route 结果改成 inline 或隐藏 subagent 选项。
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: trellis-task-brief
3
+ description: "从最新 prd.md、design.md、implement.md 生成、刷新、校验并在对话中展示 Trellis 任务的 brief.md。用于 Phase 1.4 task.py start 前、planning review、用户要求任务 brief/交接摘要,或 in_progress 任务缺失/过期 brief.md 时。"
4
+ ---
5
+
6
+ # Trellis 任务交接摘要
7
+
8
+ 为当前任务生成或更新 `brief.md`,并把交接摘要展示在对话里。`brief.md` 是从三件套派生的交接视图,不替代 `prd.md`、`design.md`、`implement.md`。
9
+
10
+ ## 核心规则
11
+
12
+ - 每次运行都重新读取最新 `prd.md`、`design.md if present`、`implement.md if present`。
13
+ - 已存在的 `brief.md` 不能作为跳过同步的理由。
14
+ - `brief.md` 必须以三件套为准覆盖旧内容;无法从三件套追溯的旧内容不能保留为事实。
15
+ - 不要在 `brief.md` 里发明三件套没有表达的新需求。缺失字段写“未明确”,并提示应补充三件套。
16
+ - 写回 `brief.md` 后,必须在当前对话中展示 brief 正文;不要只给文件路径。
17
+ - Phase 1.4 前展示完整 brief,并等待用户确认 planning artifacts 和 brief 后,才运行 `task.py start`。
18
+ - `in_progress` 阶段发现缺失 brief 时,不自动生成未经 review 的 brief;先读取三件套并建议回补。只有用户明确要求当场回补并 review 时,才继续写回 `brief.md`。
19
+ - 不要机械限制 brief 或对话展示长度;信息完整优先,不能截掉会影响实现判断的范围、约束、风险或验收条件。
20
+
21
+ ## 执行步骤
22
+
23
+ 1. 确定任务目录:
24
+ - 用户给了任务路径时使用该路径。
25
+ - 否则运行 `python3 ./.trellis/scripts/task.py current --source`,读取 `Current task:`。
26
+ 2. 读取任务状态:
27
+ - 读取 `<task>/task.json` 的 `status`。
28
+ - 如果 `status` 是 `in_progress` 且 `<task>/brief.md` 不存在,并且用户没有明确要求“回补 / backfill / 重新生成并 review brief”,则只读取三件套、说明 brief 缺失、建议回补,不写 `brief.md`。
29
+ 3. 读取任务文件:
30
+ - 必读:`prd.md`。
31
+ - 存在则读:`design.md`、`implement.md`。
32
+ 4. 从最新三件套提取:
33
+ - `Goal`:任务目标一句话。
34
+ - `Scope`:本轮实现范围。
35
+ - `Non-Goals`:明确不做的范围。
36
+ - `Key Context`:关键文件、模块、入口、约束或风险。
37
+ - `Acceptance`:主要验收标准。
38
+ - `Next Step`:进入实现后的下一步。
39
+ 5. 写回 `<task>/brief.md`。如果文件已存在,仍用最新三件套派生内容覆盖旧正文。
40
+ 6. 在对话中展示 brief 正文,并说明来源文件。
41
+
42
+ ## 模板
43
+
44
+ ```markdown
45
+ # Brief — <任务标题>
46
+
47
+ ## Goal
48
+
49
+ - <一句话说明任务目标>
50
+
51
+ ## Scope
52
+
53
+ - <本轮要做的事情>
54
+
55
+ ## Non-Goals
56
+
57
+ - <本轮明确不做的事情>
58
+
59
+ ## Key Context
60
+
61
+ - <关键文件、模块、入口、约束或风险>
62
+
63
+ ## Acceptance
64
+
65
+ - <主要验收标准>
66
+
67
+ ## Next Step
68
+
69
+ - <进入实现后的下一步>
70
+ ```
71
+
72
+ ## 展示格式
73
+
74
+ Phase 1.4 review 前:
75
+
76
+ ```markdown
77
+ 任务交接摘要已更新:<task>/brief.md
78
+
79
+ <brief.md 正文>
80
+
81
+ 请确认 planning artifacts 和上述 brief;确认后才运行 `task.py start <task>`。
82
+ ```
83
+
84
+ 任务已经是 `in_progress` 时,如果 brief 存在,进入 implement route 前重述:
85
+
86
+ ```markdown
87
+ 当前任务 brief:<目标一句话>
88
+ 范围/约束:<不失真的压缩要点>
89
+ 验收:<不失真的压缩要点>
90
+ 完整摘要:<task>/brief.md
91
+
92
+ 下一步:进入 `trellis-route(implement)`。
93
+ ```
94
+
95
+ 压缩重述不能丢掉会影响实现判断的范围、约束、风险和验收条件。
96
+
97
+ ## 不要做
98
+
99
+ - 不要执行 `task.py start`;这仍由主 workflow 在用户确认后执行。
100
+ - 不要修改三件套来迎合 brief。
101
+ - 不要把 `brief.md` 当作第四件套扩写。
102
+ - 不要只因为 `brief.md` 已存在就跳过更新。
103
+ - 不要只输出“已写入 brief.md”而不展示正文。
@@ -1,8 +1,11 @@
1
1
  <!-- BEGIN skill-garden workflow-state in_progress_inline v0.6 -->
2
2
  HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (in_progress-inline):
3
- Inline mode does not skip or constrain route: Phase 2.1 routes `implement`; Phase 2.2 routes `check` before check/check-all.
4
- On check failure or a user-reported issue in the just-checked work, reuse the latest implement/check route; reroute only on explicit reselect/override or a new independent check stage.
5
- No valid check route/preference -> ask numbered route choices and wait; inline mode is not permission to default to inline check.
3
+ This state block is a breadcrumb; the top-level skill-garden hub is the source of truth for route details.
4
+ Before the first implement route, read `<task>/brief.md` if present and restate the task brief in chat. If it is missing, read the task artifacts and suggest backfilling brief; do not silently rely on memory.
5
+ Inline workflow-state is not an inline route decision. At Phase 2.1/2.2, reuse a valid current-task `route_decision` for the target when it exists; otherwise run `trellis-route(implement|check)` or ask the numbered fallback choices and wait.
6
+ A valid route decision must come from `trellis-route`, `numbered-fallback`, or `route-prefs` read by `trellis-route`; prose, compact/SessionStart summaries, `codex-mode`, empty prefs, and old single-value prefs are not enough.
7
+ Reuse the valid current-task route through later implementation, repair, recheck, and final re-check; reroute only on explicit reselect/override/use-X-this-time/clear-default or when no valid target decision exists.
8
+ Do not default to inline just because this state is inline or the helper is unavailable. Dispatch subagents only when the valid route decision selected subagent; otherwise execute inline in the main session.
6
9
  After `trellis-check` / `trellis-check-all`, stop and report; point the user to Phase 3.4 `trellis-push` (or commit-only when needed). Do not run `/trellis:finish-work` unless the user explicitly asks after Phase 3.4 is complete.
7
10
  This guard overrides any lower `Flow: ... -> /trellis:finish-work` line in this state block.
8
11
  At Phase 3.4, code commit/push still goes through `trellis-push` (commit-only for commit-without-push); never bare `git commit`/`git push` on code (hub: Code Commit Confirmation Gate).
@@ -1,10 +1,11 @@
1
1
  <!-- BEGIN skill-garden workflow-state in_progress v0.6 -->
2
2
  HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (in_progress):
3
- Phase 2.1: run `trellis-route(implement)` first.
4
- Phase 2.2: run `trellis-route(check)` before check/check-all.
5
- On check failure or a user-reported issue in the just-checked work, reuse the latest implement/check route; reroute only on explicit reselect/override or a new independent check stage.
6
- Do not spawn `trellis-implement` or `trellis-check*` unless route selected subagent, including a reused same-cycle subagent route.
7
- If the helper is unavailable, ask numbered route choices and wait; do not default to inline check.
3
+ This state block is a breadcrumb; the top-level skill-garden hub is the source of truth for route details.
4
+ Before the first implement route, read `<task>/brief.md` if present and restate the task brief in chat. If it is missing, read the task artifacts and suggest backfilling brief; do not silently rely on memory.
5
+ At Phase 2.1/2.2, use the valid current-task `route_decision` for the target when it exists; otherwise run `trellis-route(implement|check)` or ask the numbered fallback choices and wait.
6
+ A valid route decision must come from `trellis-route`, `numbered-fallback`, or `route-prefs` read by `trellis-route`; prose, compact/SessionStart summaries, `codex-mode`, empty prefs, and old single-value prefs are not enough.
7
+ Reuse the valid current-task route through later implementation, repair, recheck, and final re-check; reroute only on explicit reselect/override/use-X-this-time/clear-default or when no valid target decision exists.
8
+ Do not spawn `trellis-implement` or `trellis-check*` unless the valid route decision selected subagent. If the helper is unavailable, do not default to inline; ask the numbered route choices and wait.
8
9
  After `trellis-check` / `trellis-check-all`, stop and report; point the user to Phase 3.4 `trellis-push` (or commit-only when needed). Do not run `/trellis:finish-work` unless the user explicitly asks after Phase 3.4 is complete.
9
10
  This guard overrides any lower `Flow: ... -> /trellis:finish-work` line in this state block.
10
11
  At Phase 3.4, code commit/push goes through `trellis-push` (commit-only mode for commit-without-push); never bare `git commit`/`git push` on code (hub: Code Commit Confirmation Gate).
@@ -1,8 +1,8 @@
1
1
  <!-- BEGIN skill-garden workflow-state no_task v0.6 -->
2
2
  HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (no_task):
3
- Creating/resuming a task is not implementation permission.
4
- After PRD ready and task started, next implementation action = `trellis-route(implement)`.
5
- If no active task exists, scan `.trellis/tasks/*/task.json` once per session for in-progress tasks with `last_push_snapshot`; surface completed_steps + next_step and suggest rebinding the active task before resuming.
6
- Do NOT use the harness built-in plan mode (`EnterPlanMode` / `ExitPlanMode`) as a substitute for this gate. Planning is Trellis-only: classify the turn, ask for task-creation consent, then `trellis-brainstorm` for complex work.
7
- If the turn is a meta edit to Trellis itself (Trellis tracking would be overkill), say so and ask to skip Trellis never silently swap built-in plan mode in for the consent gate.
3
+ Creating or resuming a task is not implementation permission.
4
+ After PRD is ready and the task is started, the next implementation action is Phase 2.1 `trellis-route(implement)` unless a valid current-task implement route decision already exists.
5
+ If no active task exists, scan `.trellis/tasks/*/task.json` once per session for in-progress tasks with `last_push_snapshot`; surface `completed_steps` + `next_step` and suggest rebinding the active task before resuming.
6
+ Do NOT call the harness built-in plan mode (`EnterPlanMode` / `ExitPlanMode`) for Trellis planning. It is not a substitute for Trellis task-creation consent, Trellis planning, or the route gate. For complex work, classify the turn, ask for task-creation consent, then use `trellis-brainstorm`.
7
+ If the turn is a meta edit to Trellis itself and Trellis tracking would be overkill, say so and ask to skip Trellis; never silently swap built-in plan mode in for the consent gate.
8
8
  <!-- END skill-garden workflow-state no_task v0.6 -->
@@ -0,0 +1,7 @@
1
+ <!-- BEGIN skill-garden workflow-state planning_inline v0.6 -->
2
+ HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (planning-inline):
3
+ Planning is not implementation permission.
4
+ Complete prd.md + required context first.
5
+ Before `task.py start`, use `trellis-task-brief` to refresh `brief.md` from the latest task artifacts and display it in chat for review.
6
+ After status becomes in_progress, next action = `trellis-route(implement)`, not direct edits.
7
+ <!-- END skill-garden workflow-state planning_inline v0.6 -->
@@ -2,5 +2,6 @@
2
2
  HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (planning):
3
3
  Planning is not implementation permission.
4
4
  Complete prd.md + required context first.
5
+ Before `task.py start`, use `trellis-task-brief` to refresh `brief.md` from the latest task artifacts and display it in chat for review.
5
6
  After status becomes in_progress, next action = `trellis-route(implement)`, not direct edits.
6
7
  <!-- END skill-garden workflow-state planning v0.6 -->
@@ -6,38 +6,45 @@
6
6
 
7
7
  **Priority**: This hub overrides any conflicting Trellis workflow, skill, or command text for the scoped behaviors below.
8
8
 
9
- **Scope**: Phase 2.1 implement routing, Phase 2.2 check/check-all routing, same-cycle repair/recheck route reuse, post-check stop, Phase 3.4 trellis-push, explicit Phase 3.5 finish-work bookkeeping, and push-progress recovery. State blocks should keep one short skill-garden sentinel; long-form rules live here.
9
+ **Scope**: Phase 1.4 task brief handoff, Phase 2.1 implement routing, Phase 2.2 check/check-all routing, current-task route reuse, post-check stop, Phase 3.4 trellis-push, explicit Phase 3.5 finish-work bookkeeping, and push-progress recovery. State blocks should keep one short skill-garden sentinel; long-form rules live here.
10
10
 
11
11
  **Mechanical rule**: use this hub as the source of truth. Do not add separate top-level skill-garden override sections or multiple skill-garden sentinels inside the same `workflow-state:*` block.
12
12
 
13
+ #### Task Brief Handoff
14
+
15
+ Before Phase 1.4 `task.py start`, use `trellis-task-brief` to refresh `<task>/brief.md` from latest task artifacts, display it in chat, and wait for user confirmation.
16
+
17
+ `brief.md` is derived; `prd.md` / `design.md` / `implement.md` remain authoritative.
18
+
19
+ Before the first implement route, restate existing `<task>/brief.md` in chat. If missing, read task artifacts and suggest backfilling brief; do not invent one from memory.
20
+
13
21
  #### Routing Gate
14
22
 
15
- Before the initial Phase 2.1 implement route or initial Phase 2.2 check/check-all route, the immediately preceding routing decision must come from `trellis-route` or the same numbered fallback choices.
23
+ A route decision is valid only when it is a current-task decision for the requested target (`implement` or `check`) and its structured `route_decision.source` is one of: `trellis-route`, `numbered-fallback`, or `route-prefs`.
16
24
 
17
- Phase 2.2 is the normal check execution point. Dispatch `trellis-check` / `trellis-check-all` only when `trellis-route(target=check)` selected subagent for this check cycle.
25
+ `route-prefs` is valid only when read by `trellis-route` after the workflow has already reached Phase 2.1 or Phase 2.2. The gitignored personal preference file `.trellis/.route-prefs.tmp` is developer-local execution-mode state; it must never be staged or committed, and it is never authorization to start work.
18
26
 
19
- On check failure or a user-reported issue in the just-checked work, stay in the same repair/recheck loop and reuse the latest implement/check route. Do not rerun `trellis-route` just because check failed.
27
+ Before Phase 2.1 implement or Phase 2.2 check/check-all execution, use this order:
20
28
 
21
- Rerun `trellis-route(check)` only for a new independent check stage: missing 2.2 result, code changed outside the same repair loop, high risk, explicit final re-check, or explicit route reselect/override/clear.
29
+ 1. Reuse the valid current-task route decision for the requested target when one exists.
30
+ 2. If the user explicitly asks to reselect, override, use another mode this time, or clear the default, ignore stored preferences for this decision and rerun `trellis-route` / the numbered fallback.
31
+ 3. If no valid current-task decision exists for the target, run `trellis-route(target=implement|check)`. If the helper cannot ask through `AskUserQuestion` / `request_user_input`, ask the same numbered choices in normal chat and wait.
22
32
 
23
- `trellis-route` may use the gitignored personal preference file `.trellis/.route-prefs.tmp` to skip repeated prompts. This file is developer-local state and must never be staged or committed.
33
+ These are not valid route decisions by themselves: user prose such as "inline" or "I choose inline"; compact summaries; SessionStart summaries; `codex-mode`; empty `.trellis/.route-prefs.tmp`; old single-value prefs; and any remembered or summarized prior choice that does not carry a valid structured `route_decision`.
24
34
 
25
- Personal route preferences are execution-mode preferences only, never authorization to start work; `trellis-route` may read them only after the workflow already permits the requested target.
35
+ When a valid current-task implement/check decision exists, reuse it for later implementation in the same task, check failures, user-reported issues in the just-checked work, repair, recheck, and final re-check. Do not rerun `trellis-route` merely because check failed, code was repaired, or a final re-check is needed.
26
36
 
27
- `trellis-route` returns 2 normal modes for `target=implement` (inline/subagent) and 2 normal modes for `target=check` (check-all inline/check-all subagent). Lightweight `trellis-check` is a hidden escape hatch only when the user explicitly asks for `light check` / `轻量检查`; it is not shown in normal check options.
37
+ Phase 2.2 is the normal check execution point. Normal check routing returns only `trellis-check-all` paths: check-all inline or check-all subagent. Lightweight `trellis-check` is a hidden escape hatch only when the user explicitly asks for `light check` / `轻量检查`; it is not shown in normal check options.
28
38
 
29
- If `AskUserQuestion` / `request_user_input` is unavailable, ask the same numbered choices in normal chat and wait. Tool unavailability is not permission to choose inline/subagent, dispatch directly, or run inline check by default.
39
+ `trellis-route` returns 2 normal modes for `target=implement` (inline/subagent) and 2 normal modes for `target=check` (check-all inline/check-all subagent).
40
+ Dispatch `trellis-implement`, `trellis-check`, or `trellis-check-all` only when the valid route decision selected subagent. If the valid route decision selected inline, execute inline in the main session.
30
41
 
31
42
  Before invoking the skill, never:
32
43
  - write pre-questions ("ready to start? / shall I proceed?")
33
44
  - state "I lean towards X" or preview the inline/subagent options
34
45
  - surface route options ahead of time
35
46
 
36
- At initial Phase 2.1/2.2 boundaries, do not ask meta continuation questions. Invoke `trellis-route(implement|check)` first, or ask the numbered route choices if the helper is unavailable. Inside same-cycle repair/recheck, reuse the existing route.
37
-
38
- If the user says "temporary override", "reselect", "use X this time", "clear route default", or equivalent, the personal preference file must not take priority. `trellis-route` must show the override options again and let the user choose whether the choice is one-time, saved as the new default, or clears the default.
39
-
40
- For normal check routing, default to `trellis-check-all` paths. Do not route to lightweight `trellis-check` unless the user explicitly asks for the hidden light-check escape hatch.
47
+ At Phase 2.1/2.2 boundaries, do not ask meta continuation questions. Either reuse the valid current-task route decision for the target, or obtain a new valid decision through `trellis-route` / numbered fallback.
41
48
 
42
49
  #### Post-Check Stop Gate
43
50
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "syncedAt": "2026-06-25T10:31:30.060Z",
2
+ "syncedAt": "2026-06-25T18:38:19.361Z",
3
3
  "syncedFrom": "vendor/skill-garden/.trellis",
4
- "sourceCommit": "884cfbda179eec60c3481356c0abe0c9dc9e4f15",
4
+ "sourceCommit": "c00e63a517927bfbbca56b6b3223a27a1c9fbd01",
5
5
  "variants": {
6
6
  "old": {
7
7
  "claudeSkills": [],
@@ -77,6 +77,7 @@
77
77
  "claudeSkills": [
78
78
  "trellis-check-all",
79
79
  "trellis-create-command",
80
+ "trellis-diff-brief",
80
81
  "trellis-draw-uml",
81
82
  "trellis-extract-prd",
82
83
  "trellis-plan-version",
@@ -84,11 +85,13 @@
84
85
  "trellis-release",
85
86
  "trellis-route",
86
87
  "trellis-run-full-chain",
88
+ "trellis-task-brief",
87
89
  "trellis-verify-task"
88
90
  ],
89
91
  "agentsSkills": [
90
92
  "trellis-check-all",
91
93
  "trellis-create-command",
94
+ "trellis-diff-brief",
92
95
  "trellis-draw-uml",
93
96
  "trellis-extract-prd",
94
97
  "trellis-plan-version",
@@ -96,6 +99,7 @@
96
99
  "trellis-release",
97
100
  "trellis-route",
98
101
  "trellis-run-full-chain",
102
+ "trellis-task-brief",
99
103
  "trellis-verify-task"
100
104
  ],
101
105
  "commands": [],
@@ -106,6 +110,7 @@
106
110
  "in_progress-inline.md",
107
111
  "in_progress.md",
108
112
  "no_task.md",
113
+ "planning-inline.md",
109
114
  "planning.md"
110
115
  ],
111
116
  "skillOverrides": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.3.1-beta.2",
3
+ "version": "0.3.1-beta.4",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,9 +13,9 @@ import {
13
13
  *
14
14
  * 纯 JS 移植 skill-garden install.sh 362-557 的内嵌 Python:
15
15
  * 1. 首次注入前备份 .bak(已存在则保留);
16
- * 2. 先清掉所有旧的 skill-garden 段(3 个 SECTION + 12 个 sentinel),保证可重复升级;
16
+ * 2. 先清掉所有旧的 skill-garden 段(3 个 SECTION + 13 个 sentinel),保证可重复升级;
17
17
  * 3. 把 hub(0.6)/ route(0.5)块注入到 `## Phase Index` 之后(找不到则顶部 fallback);
18
- * 4. 替换 4 个 workflow-state 块的内容(0.6 读 overrides 文件,0.5 用 legacy 常量);
18
+ * 4. 替换 5 个 workflow-state 块的内容(0.6 读 overrides 文件,0.5 用 legacy 常量);
19
19
  * 5. 处理后内容与原文件相同则不写盘(幂等)。
20
20
  *
21
21
  * Python re.DOTALL|re.MULTILINE → JS 用 `[\s\S]` 代替 `.`(免 s flag)+ `m` flag;
@@ -41,7 +41,7 @@ const SECTION_PATTERNS = [
41
41
  ];
42
42
  const SECTION_RES = SECTION_PATTERNS.map((p) => new RegExp(p, "gm"));
43
43
 
44
- // 12 个 sentinel 名(每个对应一对 BEGIN/END 注释块)
44
+ // 13 个 sentinel 名(每个对应一对 BEGIN/END 注释块)
45
45
  const SENTINEL_NAMES = [
46
46
  "skill-garden overrides",
47
47
  "skill-garden enhancement",
@@ -53,6 +53,7 @@ const SENTINEL_NAMES = [
53
53
  "skill-garden workflow-state in-progress-push-snapshot",
54
54
  "skill-garden workflow-state no_task",
55
55
  "skill-garden workflow-state planning",
56
+ "skill-garden workflow-state planning_inline",
56
57
  "skill-garden workflow-state in_progress",
57
58
  "skill-garden workflow-state in_progress_inline",
58
59
  ];
@@ -169,6 +170,7 @@ export function injectWorkflow(target, variantDir, variant) {
169
170
  ? [
170
171
  ["no_task", readStateBlock(stateDir, "no_task.md")],
171
172
  ["planning", readStateBlock(stateDir, "planning.md")],
173
+ ["planning-inline", readStateBlock(stateDir, "planning-inline.md")],
172
174
  ["in_progress", readStateBlock(stateDir, "in_progress.md")],
173
175
  ["in_progress-inline", readStateBlock(stateDir, "in_progress-inline.md")],
174
176
  ]