flower-trellis 0.4.12-beta.2 → 0.5.0-beta.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 (40) hide show
  1. package/enhancements/0.6/.agents/skills/trellis-push/SKILL.md +23 -8
  2. package/enhancements/0.6/.claude/skills/trellis-push/SKILL.md +23 -8
  3. package/enhancements/0.6/overrides/transforms/content/brainstorm-auto-task-create.md +15 -0
  4. package/enhancements/0.6/overrides/transforms/content/brainstorm-planning-authorization.md +1 -0
  5. package/enhancements/0.6/overrides/transforms/content/claude-session-start-no-task.py +6 -0
  6. package/enhancements/0.6/overrides/transforms/content/codex-session-start-no-task.py +6 -0
  7. package/enhancements/0.6/overrides/transforms/content/start-no-task-routing.md +1 -0
  8. package/enhancements/0.6/overrides/transforms/content/workflow-create-task-command.md +11 -0
  9. package/enhancements/0.6/overrides/transforms/content/workflow-create-task-rule.md +1 -0
  10. package/enhancements/0.6/overrides/transforms/content/workflow-customization-intent-invariant.md +1 -0
  11. package/enhancements/0.6/overrides/transforms/content/workflow-no-task-body.md +3 -0
  12. package/enhancements/0.6/overrides/transforms/content/workflow-phase-index-create-task.md +1 -0
  13. package/enhancements/0.6/overrides/transforms/content/workflow-phase-one-goal.md +1 -0
  14. package/enhancements/0.6/overrides/transforms/content/workflow-phase-summary.md +1 -0
  15. package/enhancements/0.6/overrides/transforms/content/workflow-request-triage.md +4 -0
  16. package/enhancements/0.6/overrides/transforms/intent-routing.json +248 -0
  17. package/enhancements/0.6/overrides/transforms/matches/brainstorm-auto-task-create.md +9 -0
  18. package/enhancements/0.6/overrides/transforms/matches/brainstorm-planning-authorization.md +1 -0
  19. package/enhancements/0.6/overrides/transforms/matches/claude-session-start-no-task.py +6 -0
  20. package/enhancements/0.6/overrides/transforms/matches/codex-session-start-no-task.py +5 -0
  21. package/enhancements/0.6/overrides/transforms/matches/start-no-task-routing.md +1 -0
  22. package/enhancements/0.6/overrides/transforms/matches/workflow-create-task-command.md +3 -0
  23. package/enhancements/0.6/overrides/transforms/matches/workflow-create-task-rule.md +1 -0
  24. package/enhancements/0.6/overrides/transforms/matches/workflow-customization-intent-invariant.md +1 -0
  25. package/enhancements/0.6/overrides/transforms/matches/workflow-no-task-body.md +3 -0
  26. package/enhancements/0.6/overrides/transforms/matches/workflow-phase-index-create-task.md +1 -0
  27. package/enhancements/0.6/overrides/transforms/matches/workflow-phase-one-goal.md +1 -0
  28. package/enhancements/0.6/overrides/transforms/matches/workflow-phase-summary.md +1 -0
  29. package/enhancements/0.6/overrides/transforms/matches/workflow-request-triage.md +3 -0
  30. package/enhancements/0.6/overrides/workflow-states/planning-inline.md +1 -0
  31. package/enhancements/0.6/overrides/workflow-states/planning.md +1 -0
  32. package/enhancements/0.6/overrides/workflow.md +28 -6
  33. package/enhancements/0.6/scripts/task_intent.py +465 -0
  34. package/enhancements/MANIFEST.json +34 -3
  35. package/package.json +6 -3
  36. package/src/lib/apply-enhancements.js +42 -9
  37. package/src/lib/copy-scripts.js +8 -0
  38. package/src/lib/enhancement-transform.js +422 -0
  39. package/src/lib/workflow-inject.js +1 -2
  40. package/enhancements/0.6/overrides/workflow-states/no_task.md +0 -9
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: trellis-push
3
- description: "按确认的精确文件范围提交普通变更或完成已就绪的 merge commit;多仓计划可包含已展示的本地生成命令,并在普通推送后同步当前任务进度。"
3
+ description: "按确认的精确文件范围提交普通变更或完成已就绪的 merge commit;多仓计划可包含已展示的本地生成命令,并在普通推送后同步当前任务记录与进度。"
4
4
  ---
5
5
 
6
6
  # Trellis Push
@@ -11,6 +11,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
11
11
 
12
12
  - 普通模式默认 `commit + push`。
13
13
  - 普通多仓计划可以包含本地确定性生成命令;生成后没有新增计划外文件时沿用同一次确认。
14
+ - 普通模式把当前任务产物与更新后的 `task.json` 纳入同一次确认下的独立任务记录提交。
14
15
  - 用户明确要求“只提交不推送”时使用 `commit-only`。
15
16
  - auto-loop 可调用内部 `commit-only`,但必须传入已经校验过的 exact files 与 commit message;本 skill 只执行该提交。
16
17
  - 不发起、终止或解决分支合并;只允许普通模式完成已经开始、冲突已清零且索引完全可归属的 merge commit。
@@ -46,7 +47,13 @@ python3 ./.trellis/scripts/task.py current --source || true
46
47
  python3 ./.trellis/scripts/task_progress.py status --json || true
47
48
  ```
48
49
 
49
- 无活动任务时仍可提交相关代码,但不生成任务进度。存在活动任务时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;不得从旧进度推断 Git 动作。
50
+ 存在活动任务时,必须额外获取文件级任务状态:
51
+
52
+ ```bash
53
+ git status --short --untracked-files=all -- <task-dir>
54
+ ```
55
+
56
+ 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动任务时仍可提交相关代码,但不生成任务进度。存在活动任务时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
50
57
 
51
58
  ## Step 2:预检与文件归属
52
59
 
@@ -75,11 +82,13 @@ git log @{u}..HEAD --oneline 2>/dev/null || true
75
82
  - 无法确定 planned file 是否属于当前请求或活动任务。
76
83
  - 内部 `commit-only` 发现 staged 区非空。
77
84
 
78
- 文件分为两组:
85
+ 业务 Git 文件分为两组;普通模式的当前任务记录 exact files 按下方独立提交规则处理:
79
86
 
80
87
  - `planned`:本轮明确归属且准备提交的 exact files。
81
88
  - `retained`:当前存在、但本次明确不提交并保持原状的 dirty paths,包含计划外 untracked、unstaged、staged 文件。clean files 不进入该集合。
82
89
 
90
+ 普通模式存在活动任务时,当前任务目录中已存在且可归属的 dirty/untracked 产物不进入业务 `planned`,也不进入 `retained`;它们与预计由 helper 更新的 `<task-dir>/task.json` 组成 Step 5 的任务记录 exact files。其他任务目录和无法归属当前任务的文件仍属于 `retained` 或风险,不得顺带提交。
91
+
83
92
  普通 `PUSH` 需要在仓库间运行本地生成命令时,首次计划同时展示命令、工作目录和后续仓预计 exact files。仅在后续仓没有 retained dirty 时使用;命令必须本地、可重复且无外部副作用。
84
93
 
85
94
  `retained` 只是内部集合名。用户可见输出统一写“保留未提交的变更(dirty)”,并逐项标注 `[untracked]`、`[unstaged]`、`[staged]`。unknown ahead、branch/upstream 异常、归属不确定等真正需要处理的事项单独进入“风险”区;普通 retained dirty 不默认视为阻塞。
@@ -121,6 +130,9 @@ Push:<执行 / 跳过(commit-only)>
121
130
  ### 风险(仅数量大于 0 时显示)
122
131
  - <unknown ahead / branch-upstream / attribution risk>
123
132
 
133
+ [任务记录(仅普通模式且存在活动任务时显示):`chore(task): update <task-name> progress` · <N> 个文件]
134
+ [仓库:<repository-name> · 分支:`<branch>` -> `<upstream>`]
135
+ [计划提交:<当前任务 exact files 或分组摘要>]
124
136
  任务进度:completed=<...> | partial=<...> | next=<...>
125
137
  执行:<commit -> push -> progress commit -> progress push>
126
138
 
@@ -131,6 +143,7 @@ Push:<执行 / 跳过(commit-only)>
131
143
 
132
144
  - 单仓 `planned` 不超过 8 个文件时完整列出。
133
145
  - 超过 8 个时按目录归组,最多 12 行;用户要求展开时展示同一 exact set。
146
+ - 顶部仓库/commit/file 总数包含独立任务记录提交所在 Git root、该提交及其 exact files;任务记录文件使用相同的 8 文件展示阈值和展开规则。
134
147
  - 保留未提交的变更始终逐项标注 Git 状态;真正风险在独立“风险”区逐项展示。
135
148
  - 无活动任务或 `commit-only` 时省略进度动作。
136
149
  - 不重复展示检查结果、规范复核、归档或其他阶段信息。
@@ -214,7 +227,7 @@ git push origin <current-branch>
214
227
 
215
228
  写入前确认:
216
229
 
217
- - 当前任务 `task.json` 在业务提交结束后没有计划外 dirty 内容。
230
+ - 当前任务 exact files 与首次确认的路径集合一致,没有新增当前任务路径或无法归属的 dirty 内容。
218
231
  - 父仓分支、upstream 和冲突状态安全。
219
232
  - 推送不会携带无法归属的历史 ahead commits。
220
233
 
@@ -227,15 +240,15 @@ python3 ./.trellis/scripts/task_progress.py write \
227
240
  --json
228
241
  ```
229
242
 
230
- 然后只提交并推送当前任务 `task.json`:
243
+ 然后只提交并推送首次确认的当前任务 exact files;该集合包含 helper 更新后的 `task.json`,以及首次计划时已存在且可归属的当前任务 dirty/untracked 产物:
231
244
 
232
245
  ```bash
233
- git add -- <task-dir>/task.json
234
- git commit --only -m "chore(task): update <task-name> progress" -- <task-dir>/task.json
246
+ git add -- <current-task-exact-files>
247
+ git commit --only -m "chore(task): update <task-name> progress" -- <current-task-exact-files>
235
248
  git push origin <current-branch>
236
249
  ```
237
250
 
238
- 该动作属于用户已确认的普通 push 计划,不增加第二次确认。提交后必须验证 commit 只包含该 `task.json`。如果写入、提交或推送失败,不回滚已成功的业务 Git 动作,并单独报告进度同步失败。
251
+ 该动作属于用户已确认的普通 push 计划,不增加第二次确认。提交后必须验证 commit 只包含首次确认的当前任务 exact files;其他任务和无关 dirty/staged 文件保持原状。如果写入、提交或推送失败,不回滚已成功的业务 Git 动作,并单独报告进度同步失败。
239
252
 
240
253
  ## Step 6:结果
241
254
 
@@ -257,6 +270,7 @@ git push origin <current-branch>
257
270
  ### 任务进度
258
271
 
259
272
  状态:<✓ 已同步 · `<progress-hash>` / · 已跳过 / ❌ 同步失败>
273
+ 记录:<N> 个当前任务文件
260
274
  进度:completed=<...> | partial=<...> | next=<...>
261
275
  [失败时追加:原因和恢复动作]
262
276
 
@@ -271,6 +285,7 @@ git push origin <current-branch>
271
285
  ## 禁止事项
272
286
 
273
287
  - 扩大到计划外文件或要求清理无关工作区。
288
+ - 把普通 push 中可归属当前活动任务的规划产物列为 retained,并以“finish-work 归档时再入库”为由延后首次记录。
274
289
  - 执行首次计划未展示的生成命令,或生成计划外文件后仍沿用旧确认。
275
290
  - 用任务进度决定是否推送代码。
276
291
  - 在本 skill 内发起、终止、解决冲突或改变分支合并目标;只允许完成已就绪的 merge commit。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: trellis-push
3
- description: "按确认的精确文件范围提交普通变更或完成已就绪的 merge commit;多仓计划可包含已展示的本地生成命令,并在普通推送后同步当前任务进度。"
3
+ description: "按确认的精确文件范围提交普通变更或完成已就绪的 merge commit;多仓计划可包含已展示的本地生成命令,并在普通推送后同步当前任务记录与进度。"
4
4
  ---
5
5
 
6
6
  # Trellis Push
@@ -11,6 +11,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
11
11
 
12
12
  - 普通模式默认 `commit + push`。
13
13
  - 普通多仓计划可以包含本地确定性生成命令;生成后没有新增计划外文件时沿用同一次确认。
14
+ - 普通模式把当前任务产物与更新后的 `task.json` 纳入同一次确认下的独立任务记录提交。
14
15
  - 用户明确要求“只提交不推送”时使用 `commit-only`。
15
16
  - auto-loop 可调用内部 `commit-only`,但必须传入已经校验过的 exact files 与 commit message;本 skill 只执行该提交。
16
17
  - 不发起、终止或解决分支合并;只允许普通模式完成已经开始、冲突已清零且索引完全可归属的 merge commit。
@@ -46,7 +47,13 @@ python3 ./.trellis/scripts/task.py current --source || true
46
47
  python3 ./.trellis/scripts/task_progress.py status --json || true
47
48
  ```
48
49
 
49
- 无活动任务时仍可提交相关代码,但不生成任务进度。存在活动任务时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;不得从旧进度推断 Git 动作。
50
+ 存在活动任务时,必须额外获取文件级任务状态:
51
+
52
+ ```bash
53
+ git status --short --untracked-files=all -- <task-dir>
54
+ ```
55
+
56
+ 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动任务时仍可提交相关代码,但不生成任务进度。存在活动任务时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
50
57
 
51
58
  ## Step 2:预检与文件归属
52
59
 
@@ -75,11 +82,13 @@ git log @{u}..HEAD --oneline 2>/dev/null || true
75
82
  - 无法确定 planned file 是否属于当前请求或活动任务。
76
83
  - 内部 `commit-only` 发现 staged 区非空。
77
84
 
78
- 文件分为两组:
85
+ 业务 Git 文件分为两组;普通模式的当前任务记录 exact files 按下方独立提交规则处理:
79
86
 
80
87
  - `planned`:本轮明确归属且准备提交的 exact files。
81
88
  - `retained`:当前存在、但本次明确不提交并保持原状的 dirty paths,包含计划外 untracked、unstaged、staged 文件。clean files 不进入该集合。
82
89
 
90
+ 普通模式存在活动任务时,当前任务目录中已存在且可归属的 dirty/untracked 产物不进入业务 `planned`,也不进入 `retained`;它们与预计由 helper 更新的 `<task-dir>/task.json` 组成 Step 5 的任务记录 exact files。其他任务目录和无法归属当前任务的文件仍属于 `retained` 或风险,不得顺带提交。
91
+
83
92
  普通 `PUSH` 需要在仓库间运行本地生成命令时,首次计划同时展示命令、工作目录和后续仓预计 exact files。仅在后续仓没有 retained dirty 时使用;命令必须本地、可重复且无外部副作用。
84
93
 
85
94
  `retained` 只是内部集合名。用户可见输出统一写“保留未提交的变更(dirty)”,并逐项标注 `[untracked]`、`[unstaged]`、`[staged]`。unknown ahead、branch/upstream 异常、归属不确定等真正需要处理的事项单独进入“风险”区;普通 retained dirty 不默认视为阻塞。
@@ -121,6 +130,9 @@ Push:<执行 / 跳过(commit-only)>
121
130
  ### 风险(仅数量大于 0 时显示)
122
131
  - <unknown ahead / branch-upstream / attribution risk>
123
132
 
133
+ [任务记录(仅普通模式且存在活动任务时显示):`chore(task): update <task-name> progress` · <N> 个文件]
134
+ [仓库:<repository-name> · 分支:`<branch>` -> `<upstream>`]
135
+ [计划提交:<当前任务 exact files 或分组摘要>]
124
136
  任务进度:completed=<...> | partial=<...> | next=<...>
125
137
  执行:<commit -> push -> progress commit -> progress push>
126
138
 
@@ -131,6 +143,7 @@ Push:<执行 / 跳过(commit-only)>
131
143
 
132
144
  - 单仓 `planned` 不超过 8 个文件时完整列出。
133
145
  - 超过 8 个时按目录归组,最多 12 行;用户要求展开时展示同一 exact set。
146
+ - 顶部仓库/commit/file 总数包含独立任务记录提交所在 Git root、该提交及其 exact files;任务记录文件使用相同的 8 文件展示阈值和展开规则。
134
147
  - 保留未提交的变更始终逐项标注 Git 状态;真正风险在独立“风险”区逐项展示。
135
148
  - 无活动任务或 `commit-only` 时省略进度动作。
136
149
  - 不重复展示检查结果、规范复核、归档或其他阶段信息。
@@ -214,7 +227,7 @@ git push origin <current-branch>
214
227
 
215
228
  写入前确认:
216
229
 
217
- - 当前任务 `task.json` 在业务提交结束后没有计划外 dirty 内容。
230
+ - 当前任务 exact files 与首次确认的路径集合一致,没有新增当前任务路径或无法归属的 dirty 内容。
218
231
  - 父仓分支、upstream 和冲突状态安全。
219
232
  - 推送不会携带无法归属的历史 ahead commits。
220
233
 
@@ -227,15 +240,15 @@ python3 ./.trellis/scripts/task_progress.py write \
227
240
  --json
228
241
  ```
229
242
 
230
- 然后只提交并推送当前任务 `task.json`:
243
+ 然后只提交并推送首次确认的当前任务 exact files;该集合包含 helper 更新后的 `task.json`,以及首次计划时已存在且可归属的当前任务 dirty/untracked 产物:
231
244
 
232
245
  ```bash
233
- git add -- <task-dir>/task.json
234
- git commit --only -m "chore(task): update <task-name> progress" -- <task-dir>/task.json
246
+ git add -- <current-task-exact-files>
247
+ git commit --only -m "chore(task): update <task-name> progress" -- <current-task-exact-files>
235
248
  git push origin <current-branch>
236
249
  ```
237
250
 
238
- 该动作属于用户已确认的普通 push 计划,不增加第二次确认。提交后必须验证 commit 只包含该 `task.json`。如果写入、提交或推送失败,不回滚已成功的业务 Git 动作,并单独报告进度同步失败。
251
+ 该动作属于用户已确认的普通 push 计划,不增加第二次确认。提交后必须验证 commit 只包含首次确认的当前任务 exact files;其他任务和无关 dirty/staged 文件保持原状。如果写入、提交或推送失败,不回滚已成功的业务 Git 动作,并单独报告进度同步失败。
239
252
 
240
253
  ## Step 6:结果
241
254
 
@@ -257,6 +270,7 @@ git push origin <current-branch>
257
270
  ### 任务进度
258
271
 
259
272
  状态:<✓ 已同步 · `<progress-hash>` / · 已跳过 / ❌ 同步失败>
273
+ 记录:<N> 个当前任务文件
260
274
  进度:completed=<...> | partial=<...> | next=<...>
261
275
  [失败时追加:原因和恢复动作]
262
276
 
@@ -271,6 +285,7 @@ git push origin <current-branch>
271
285
  ## 禁止事项
272
286
 
273
287
  - 扩大到计划外文件或要求清理无关工作区。
288
+ - 把普通 push 中可归属当前活动任务的规划产物列为 retained,并以“finish-work 归档时再入库”为由延后首次记录。
274
289
  - 执行首次计划未展示的生成命令,或生成计划外文件后仍沿用旧确认。
275
290
  - 用任务进度决定是否推送代码。
276
291
  - 在本 skill 内发起、终止、解决冲突或改变分支合并目标;只允许完成已就绪的 merge commit。
@@ -0,0 +1,15 @@
1
+ If no task exists yet, choose the creator from the authorization source.
2
+
3
+ For inferred high-confidence complex implementation intent, create an auto-routed planning task:
4
+
5
+ ```bash
6
+ python3 ./.trellis/scripts/task_intent.py create --title "<short task title>" --slug <slug>
7
+ ```
8
+
9
+ For explicit user-requested task planning or a manually maintained task, use:
10
+
11
+ ```bash
12
+ python3 ./.trellis/scripts/task.py create "<short task title>" --slug <slug>
13
+ ```
14
+
15
+ Use a concise title from the user's request and a slug without a date prefix. Both paths create the default `prd.md`; update it with the current understanding before asking follow-up questions.
@@ -0,0 +1 @@
1
+ Use this skill after the user explicitly requests task planning, or after clear complex implementation intent authorizes creating a planning workspace. This authorization covers planning only; it never authorizes `task.py start` or implementation.
@@ -0,0 +1,6 @@
1
+ return (
2
+ "Status: NO ACTIVE TASK\n"
3
+ "Next-Action: Infer discuss, inspect, direct_edit, task_plan, or workflow_action. "
4
+ "Proceed with high-confidence reversible routing; ask only for material ambiguity "
5
+ "or independent safety gates."
6
+ )
@@ -0,0 +1,6 @@
1
+ return (
2
+ "Status: NO ACTIVE TASK\n"
3
+ "Next: Infer discuss, inspect, direct_edit, task_plan, or workflow_action. "
4
+ "Proceed with high-confidence reversible routing; ask only for material ambiguity "
5
+ "or independent safety gates."
6
+ )
@@ -0,0 +1 @@
1
+ - **No active task** → infer `discuss`, `inspect`, `direct_edit`, `task_plan`, or `workflow_action`. Proceed with high-confidence reversible routing; inferred complex implementation uses `task_intent.py create`, explicit task planning uses `task.py create`, and material ambiguity or independent safety boundaries still require one focused question.
@@ -0,0 +1,11 @@
1
+ For inferred high-confidence complex implementation intent, preserve request scope and the dirty baseline:
2
+
3
+ ```bash
4
+ python3 ./.trellis/scripts/task_intent.py create --title "<task title>" --slug <name>
5
+ ```
6
+
7
+ For explicit user-requested task planning or a manually maintained task, use the ordinary creator:
8
+
9
+ ```bash
10
+ python3 ./.trellis/scripts/task.py create "<task title>" --slug <name>
11
+ ```
@@ -0,0 +1 @@
1
+ Create the task directory after explicit task intent or high-confidence complex implementation intent authorizes planning. Auto-routed creation should use `task_intent.py create` so request scope and the pre-planning dirty baseline are recorded. The task remains `planning`, writes `task.json`, creates a default `prd.md`, and targets the current session when identity is available:
@@ -0,0 +1 @@
1
+ - No active task must infer the current request intent first; high-confidence reversible routing proceeds directly, while material ambiguity and independent safety boundaries still require confirmation.
@@ -0,0 +1,3 @@
1
+ No active task. Infer the current request intent before acting.
2
+ Handle `discuss` and `inspect` silently. For `workflow_action`, load the named Trellis capability directly. For non-destructive `direct_edit`, state once that task/progress will not be recorded and proceed.
3
+ For high-confidence complex implementation, create an auto-routed planning task through `task_intent.py create`, show one non-blocking switch hint, and enter `trellis-brainstorm`. Ask only for material ambiguity or independent safety gates.
@@ -0,0 +1 @@
1
+ - 1.0 Create task `[required · once]` (when `task_plan` is explicit or inferred from clear complex implementation intent)
@@ -0,0 +1 @@
1
+ Goal: infer the request intent, enter planning automatically when authorized by explicit or high-confidence complex implementation intent, and produce the artifacts required before implementation.
@@ -0,0 +1 @@
1
+ Phase 1: Plan → infer intent, take the authorized reversible next step, and write planning artifacts when needed
@@ -0,0 +1,4 @@
1
+ - Infer `discuss`, `inspect`, `direct_edit`, `task_plan`, or `workflow_action` from the current request, its scope, risk, side effects, active-task state, and the latest explicit switch. Do not classify from one keyword alone.
2
+ - High-confidence reversible steps proceed without a mechanical task-creation question. Explicit complex implementation intent authorizes creating a planning task and entering `trellis-brainstorm`; it does not authorize `task.py start` or implementation.
3
+ - Ask one question only when ambiguity changes material side effects, or when destructive, production, database, credential, external-system, or permission boundaries require confirmation.
4
+ - The latest explicit `走任务` / `不要任务` / `先讨论` / `直接做` / `先别做` style instruction wins for the current request. New unrelated requests return to automatic inference.
@@ -0,0 +1,248 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "intent-routing",
4
+ "aliases": [
5
+ "workflow-enhancement",
6
+ "task-intent",
7
+ "intent-routing"
8
+ ],
9
+ "operations": [
10
+ {
11
+ "id": "workflow-phase-summary",
12
+ "operation": "replace",
13
+ "required": true,
14
+ "targets": [
15
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
16
+ ],
17
+ "selector": {
18
+ "source": "matches/workflow-phase-summary.md",
19
+ "expectedMatches": 1
20
+ },
21
+ "content": {
22
+ "source": "content/workflow-phase-summary.md"
23
+ }
24
+ },
25
+ {
26
+ "id": "workflow-request-triage",
27
+ "operation": "replace",
28
+ "required": true,
29
+ "targets": [
30
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
31
+ ],
32
+ "selector": {
33
+ "source": "matches/workflow-request-triage.md",
34
+ "expectedMatches": 1
35
+ },
36
+ "content": {
37
+ "source": "content/workflow-request-triage.md"
38
+ }
39
+ },
40
+ {
41
+ "id": "workflow-no-task-body",
42
+ "operation": "replace",
43
+ "required": true,
44
+ "targets": [
45
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
46
+ ],
47
+ "selector": {
48
+ "source": "matches/workflow-no-task-body.md",
49
+ "expectedMatches": 1
50
+ },
51
+ "content": {
52
+ "source": "content/workflow-no-task-body.md"
53
+ }
54
+ },
55
+ {
56
+ "id": "workflow-phase-index-create-task",
57
+ "operation": "replace",
58
+ "required": true,
59
+ "targets": [
60
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
61
+ ],
62
+ "selector": {
63
+ "source": "matches/workflow-phase-index-create-task.md",
64
+ "expectedMatches": 1
65
+ },
66
+ "content": {
67
+ "source": "content/workflow-phase-index-create-task.md"
68
+ }
69
+ },
70
+ {
71
+ "id": "workflow-phase-one-goal",
72
+ "operation": "replace",
73
+ "required": true,
74
+ "targets": [
75
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
76
+ ],
77
+ "selector": {
78
+ "source": "matches/workflow-phase-one-goal.md",
79
+ "expectedMatches": 1
80
+ },
81
+ "content": {
82
+ "source": "content/workflow-phase-one-goal.md"
83
+ }
84
+ },
85
+ {
86
+ "id": "workflow-create-task-rule",
87
+ "operation": "replace",
88
+ "required": true,
89
+ "targets": [
90
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
91
+ ],
92
+ "selector": {
93
+ "source": "matches/workflow-create-task-rule.md",
94
+ "expectedMatches": 1
95
+ },
96
+ "content": {
97
+ "source": "content/workflow-create-task-rule.md"
98
+ }
99
+ },
100
+ {
101
+ "id": "workflow-create-task-command",
102
+ "operation": "replace",
103
+ "required": true,
104
+ "targets": [
105
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
106
+ ],
107
+ "selector": {
108
+ "source": "matches/workflow-create-task-command.md",
109
+ "expectedMatches": 1
110
+ },
111
+ "content": {
112
+ "source": "content/workflow-create-task-command.md"
113
+ }
114
+ },
115
+ {
116
+ "id": "workflow-customization-intent-invariant",
117
+ "operation": "replace",
118
+ "required": true,
119
+ "targets": [
120
+ { "kind": "workflow", "path": ".trellis/workflow.md" }
121
+ ],
122
+ "selector": {
123
+ "source": "matches/workflow-customization-intent-invariant.md",
124
+ "expectedMatches": 1
125
+ },
126
+ "content": {
127
+ "source": "content/workflow-customization-intent-invariant.md"
128
+ }
129
+ },
130
+ {
131
+ "id": "codex-session-start-no-task",
132
+ "operation": "replace",
133
+ "required": true,
134
+ "targets": [
135
+ { "kind": "hook", "path": ".codex/hooks/session-start.py", "markerStyle": "hash" }
136
+ ],
137
+ "selector": {
138
+ "source": "matches/codex-session-start-no-task.py",
139
+ "expectedMatches": 1
140
+ },
141
+ "content": {
142
+ "source": "content/codex-session-start-no-task.py"
143
+ }
144
+ },
145
+ {
146
+ "id": "claude-session-start-no-task",
147
+ "operation": "replace",
148
+ "required": true,
149
+ "targets": [
150
+ { "kind": "hook", "path": ".claude/hooks/session-start.py", "markerStyle": "hash" }
151
+ ],
152
+ "selector": {
153
+ "source": "matches/claude-session-start-no-task.py",
154
+ "expectedMatches": 1
155
+ },
156
+ "content": {
157
+ "source": "content/claude-session-start-no-task.py"
158
+ }
159
+ },
160
+ {
161
+ "id": "start-no-task-routing",
162
+ "operation": "replace",
163
+ "required": true,
164
+ "targets": [
165
+ { "kind": "skill", "path": ".agents/skills/trellis-start/SKILL.md" },
166
+ { "kind": "command", "path": ".agent/workflows/start.md" },
167
+ { "kind": "command", "path": ".claude/commands/trellis/start.md" },
168
+ { "kind": "command", "path": ".codebuddy/commands/trellis/start.md" },
169
+ { "kind": "command", "path": ".cursor/commands/trellis/start.md" },
170
+ { "kind": "command", "path": ".devin/workflows/trellis-start.md" },
171
+ { "kind": "command", "path": ".github/prompts/start.prompt.md" },
172
+ { "kind": "command", "path": ".kilocode/workflows/start.md" },
173
+ { "kind": "command", "path": ".opencode/commands/trellis/start.md" },
174
+ { "kind": "command", "path": ".pi/prompts/trellis-start.md" },
175
+ { "kind": "command", "path": ".qoder/commands/trellis/start.md" },
176
+ { "kind": "skill", "path": ".reasonix/skills/trellis-start/SKILL.md" },
177
+ { "kind": "command", "path": ".zcode/commands/trellis/start.md" }
178
+ ],
179
+ "selector": {
180
+ "source": "matches/start-no-task-routing.md",
181
+ "expectedMatches": 1
182
+ },
183
+ "content": {
184
+ "source": "content/start-no-task-routing.md"
185
+ }
186
+ },
187
+ {
188
+ "id": "brainstorm-planning-authorization",
189
+ "operation": "replace",
190
+ "required": true,
191
+ "targets": [
192
+ { "kind": "skill", "path": ".agent/skills/trellis-brainstorm/SKILL.md" },
193
+ { "kind": "skill", "path": ".agents/skills/trellis-brainstorm/SKILL.md" },
194
+ { "kind": "skill", "path": ".claude/skills/trellis-brainstorm/SKILL.md" },
195
+ { "kind": "skill", "path": ".codebuddy/skills/trellis-brainstorm/SKILL.md" },
196
+ { "kind": "skill", "path": ".cursor/skills/trellis-brainstorm/SKILL.md" },
197
+ { "kind": "skill", "path": ".devin/skills/trellis-brainstorm/SKILL.md" },
198
+ { "kind": "skill", "path": ".factory/skills/trellis-brainstorm/SKILL.md" },
199
+ { "kind": "skill", "path": ".github/skills/trellis-brainstorm/SKILL.md" },
200
+ { "kind": "skill", "path": ".kilocode/skills/trellis-brainstorm/SKILL.md" },
201
+ { "kind": "skill", "path": ".kiro/skills/trellis-brainstorm/SKILL.md" },
202
+ { "kind": "skill", "path": ".opencode/skills/trellis-brainstorm/SKILL.md" },
203
+ { "kind": "skill", "path": ".pi/skills/trellis-brainstorm/SKILL.md" },
204
+ { "kind": "skill", "path": ".qoder/skills/trellis-brainstorm/SKILL.md" },
205
+ { "kind": "skill", "path": ".reasonix/skills/trellis-brainstorm/SKILL.md" },
206
+ { "kind": "skill", "path": ".trae/skills/trellis-brainstorm/SKILL.md" },
207
+ { "kind": "skill", "path": ".zcode/skills/trellis-brainstorm/SKILL.md" }
208
+ ],
209
+ "selector": {
210
+ "source": "matches/brainstorm-planning-authorization.md",
211
+ "expectedMatches": 1
212
+ },
213
+ "content": {
214
+ "source": "content/brainstorm-planning-authorization.md"
215
+ }
216
+ },
217
+ {
218
+ "id": "brainstorm-auto-task-create",
219
+ "operation": "replace",
220
+ "required": true,
221
+ "targets": [
222
+ { "kind": "skill", "path": ".agent/skills/trellis-brainstorm/SKILL.md" },
223
+ { "kind": "skill", "path": ".agents/skills/trellis-brainstorm/SKILL.md" },
224
+ { "kind": "skill", "path": ".claude/skills/trellis-brainstorm/SKILL.md" },
225
+ { "kind": "skill", "path": ".codebuddy/skills/trellis-brainstorm/SKILL.md" },
226
+ { "kind": "skill", "path": ".cursor/skills/trellis-brainstorm/SKILL.md" },
227
+ { "kind": "skill", "path": ".devin/skills/trellis-brainstorm/SKILL.md" },
228
+ { "kind": "skill", "path": ".factory/skills/trellis-brainstorm/SKILL.md" },
229
+ { "kind": "skill", "path": ".github/skills/trellis-brainstorm/SKILL.md" },
230
+ { "kind": "skill", "path": ".kilocode/skills/trellis-brainstorm/SKILL.md" },
231
+ { "kind": "skill", "path": ".kiro/skills/trellis-brainstorm/SKILL.md" },
232
+ { "kind": "skill", "path": ".opencode/skills/trellis-brainstorm/SKILL.md" },
233
+ { "kind": "skill", "path": ".pi/skills/trellis-brainstorm/SKILL.md" },
234
+ { "kind": "skill", "path": ".qoder/skills/trellis-brainstorm/SKILL.md" },
235
+ { "kind": "skill", "path": ".reasonix/skills/trellis-brainstorm/SKILL.md" },
236
+ { "kind": "skill", "path": ".trae/skills/trellis-brainstorm/SKILL.md" },
237
+ { "kind": "skill", "path": ".zcode/skills/trellis-brainstorm/SKILL.md" }
238
+ ],
239
+ "selector": {
240
+ "source": "matches/brainstorm-auto-task-create.md",
241
+ "expectedMatches": 1
242
+ },
243
+ "content": {
244
+ "source": "content/brainstorm-auto-task-create.md"
245
+ }
246
+ }
247
+ ]
248
+ }
@@ -0,0 +1,9 @@
1
+ If no task exists yet, create one:
2
+
3
+ ```bash
4
+ TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
5
+ ```
6
+
7
+ Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
8
+
9
+ `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
@@ -0,0 +1 @@
1
+ Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
@@ -0,0 +1,6 @@
1
+ return (
2
+ "Status: NO ACTIVE TASK\n"
3
+ "Next-Action: Classify the current turn before creating any Trellis task. "
4
+ "Simple conversation / small task asks only whether this turn should create a Trellis task. "
5
+ "Complex task asks whether task creation and planning are allowed."
6
+ )
@@ -0,0 +1,5 @@
1
+ return (
2
+ "Status: NO ACTIVE TASK\n"
3
+ "Next: Classify the current turn and ask for task-creation consent "
4
+ "before creating any Trellis task."
5
+ )
@@ -0,0 +1 @@
1
+ - **No active task** → classify first. For simple conversation / small task, ask only whether this turn should create a Trellis task. For complex work, ask whether you may create a Trellis task and enter planning. If the user says no, skip Trellis for this session.
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ python3 ./.trellis/scripts/task.py create "<task title>" --slug <name>
3
+ ```
@@ -0,0 +1 @@
1
+ Create the task directory only after task-creation consent. The command sets status to `planning`, writes `task.json`, creates a default `prd.md`, and auto-targets the new task when session identity is available:
@@ -0,0 +1 @@
1
+ - No active task must triage first and ask for task-creation consent before creating a Trellis task.
@@ -0,0 +1,3 @@
1
+ No active task. First classify the current turn and ask for task-creation consent before creating any Trellis task.
2
+ Simple conversation / small task: ask only whether this turn should create a Trellis task. If the user says no, skip Trellis for this session.
3
+ Complex task: ask the user if you can create a Trellis task and enter the planning phase. If the user says no, explain, clarify scope, or suggest a smaller split.
@@ -0,0 +1 @@
1
+ - 1.0 Create task `[required · once]` (only after task-creation consent)
@@ -0,0 +1 @@
1
+ Goal: classify the request, get task-creation consent when a task is needed, and produce the planning artifacts required before implementation.
@@ -0,0 +1 @@
1
+ Phase 1: Plan → classify, get task-creation consent, then write planning artifacts
@@ -0,0 +1,3 @@
1
+ - Simple conversation or small task: ask only whether this turn should create a Trellis task. If the user says no, skip Trellis for this session.
2
+ - Complex task: ask whether you may create a Trellis task and enter planning. If the user says no, do not do broad inline implementation; explain, clarify scope, or suggest a smaller split.
3
+ - User approval to create a task is not approval to start implementation. Planning still happens first.
@@ -3,6 +3,7 @@ HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (planning-inline):
3
3
  Planning is not implementation permission.
4
4
  `trellis-brainstorm` is the default next action while requirements are still unclear.
5
5
  A created task or existing `prd.md` is not enough to start implementation.
6
+ If the latest current-request switch says no task/direct edit, call `task_intent.py discard --task <current-task>` only for a task auto-created by intent routing; leave that task only on `status=discarded`. Keep manual or historical tasks unchanged and route the current request as untracked under the Active Task Scope Guard.
6
7
  Complete prd.md + required context first.
7
8
  If the active workflow later routes to sub-agent execution, required context includes real curated entries in both `implement.jsonl` and `check.jsonl`; the seed `_example` row alone is not ready.
8
9
  Before `task.py start`, use `trellis-task-brief` to refresh `brief.md` from the latest task artifacts and display it in chat for review.
@@ -3,6 +3,7 @@ HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (planning):
3
3
  Planning is not implementation permission.
4
4
  `trellis-brainstorm` is the default next action while requirements are still unclear.
5
5
  A created task or existing `prd.md` is not enough to start implementation.
6
+ If the latest current-request switch says no task/direct edit, call `task_intent.py discard --task <current-task>` only for a task auto-created by intent routing; leave that task only on `status=discarded`. Keep manual or historical tasks unchanged and route the current request as untracked under the Active Task Scope Guard.
6
7
  Complete prd.md + required context first.
7
8
  For sub-agent-dispatch platforms, required context includes real curated entries in both `implement.jsonl` and `check.jsonl`; the seed `_example` row alone is not ready.
8
9
  Before `task.py start`, use `trellis-task-brief` to refresh `brief.md` from the latest task artifacts and display it in chat for review.