flower-trellis 0.6.0-beta.0 → 0.6.0-beta.1

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 (38) hide show
  1. package/enhancements/0.6/.agents/skills/trellis-check-all/SKILL.md +1 -1
  2. package/enhancements/0.6/.agents/skills/trellis-check-all/references/depth-routing.md +2 -2
  3. package/enhancements/0.6/.agents/skills/trellis-check-all/references/full-profile.md +1 -1
  4. package/enhancements/0.6/.agents/skills/trellis-check-all/references/reporting-and-disposition.md +1 -1
  5. package/enhancements/0.6/.agents/skills/trellis-push/SKILL.md +3 -3
  6. package/enhancements/0.6/.agents/skills/trellis-route/SKILL.md +1 -1
  7. package/enhancements/0.6/.claude/skills/trellis-check-all/SKILL.md +1 -1
  8. package/enhancements/0.6/.claude/skills/trellis-check-all/references/depth-routing.md +2 -2
  9. package/enhancements/0.6/.claude/skills/trellis-check-all/references/full-profile.md +1 -1
  10. package/enhancements/0.6/.claude/skills/trellis-check-all/references/reporting-and-disposition.md +1 -1
  11. package/enhancements/0.6/.claude/skills/trellis-push/SKILL.md +3 -3
  12. package/enhancements/0.6/.claude/skills/trellis-route/SKILL.md +1 -1
  13. package/enhancements/0.6/overrides/conflicts.json +9 -7
  14. package/enhancements/0.6/overrides/patches/agents/untracked-context/codex-content.md +1 -1
  15. package/enhancements/0.6/overrides/patches/agents/untracked-context/markdown-content.md +1 -1
  16. package/enhancements/0.6/overrides/patches/hooks/inject-workflow-state/shared-runtime/main-content.py +3 -2
  17. package/enhancements/0.6/overrides/patches/hooks/inject-workflow-state/shared-runtime/untracked-helper-content.py +0 -1
  18. package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/owner-routing-content.md +2 -2
  19. package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/workflow-change-map-content.md +1 -1
  20. package/enhancements/0.6/overrides/patches/skills/trellis-start/no-task-routing/content.md +1 -1
  21. package/enhancements/0.6/overrides/patches/skills/trellis-update-spec/autonomous-evaluation/content.md +2 -2
  22. package/enhancements/0.6/overrides/patches/workflow/hub/content.md +2 -2
  23. package/enhancements/0.6/overrides/patches/workflow/phase-ownership/phase-2-check-content.md +1 -1
  24. package/enhancements/0.6/overrides/patches/workflow/phase-ownership/phase-2-implement-content.md +2 -2
  25. package/enhancements/0.6/overrides/patches/workflow/phase-ownership/phase-3-commit-content.md +1 -1
  26. package/enhancements/0.6/overrides/patches/workflow/phase-ownership/phase-3-update-spec-content.md +1 -1
  27. package/enhancements/0.6/overrides/patches/workflow/runtime-contract-reference/customizing-trellis-managed-baseline.md +1 -1
  28. package/enhancements/0.6/overrides/patches/workflow/runtime-contract-reference/runtime-reference-content.md +1 -1
  29. package/enhancements/0.6/overrides/patches/workflow/runtime-contract-reference/state-contract-comment-content.md +2 -2
  30. package/enhancements/0.6/overrides/patches/workflow/state-no-task/content.md +1 -1
  31. package/enhancements/0.6/overrides/patches/workflow/state-untracked/content.md +18 -6
  32. package/enhancements/0.6/scripts/pre_check_state.py +2 -2
  33. package/enhancements/0.6/scripts/task_intent.py +6 -7
  34. package/enhancements/0.6/scripts/untracked_flow.py +52 -370
  35. package/enhancements/MANIFEST.json +2 -2
  36. package/package.json +3 -3
  37. package/src/builtin-plugins/skill-garden/content-adapter.js +1 -3
  38. package/src/lib/copy-scripts.js +0 -8
@@ -18,7 +18,7 @@ description: "统一 Check-All 入口:确认范围与运行上下文,按 req
18
18
  4. 全程收集普通问题到 `CHK-*`,收集低风险文档漂移到 `DOC-*`。
19
19
  5. 在最终报告前处理允许自动修复的文档漂移,并把修复内容展示在报告里。
20
20
  6. 根据 interactive / validated auto-loop 边界输出下一步或完成 runner `record + next`。
21
- 7. untracked 上下文在最终 diff 稳定后调用 `untracked_flow.py record-check`;只有严格通过且 disposition 确认继续时才 `advance --stage spec`。
21
+ 7. untracked helper 只保存流程游标:findings 或新编辑设回 `implement`;只有严格通过且 disposition 确认继续时才 `advance --stage spec`。
22
22
 
23
23
  ---
24
24
 
@@ -37,9 +37,9 @@ git log --oneline -10
37
37
 
38
38
  没有当前 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`:
39
39
 
40
- - `hit`:读取 work id、summary、stage、scope、baseline/current fingerprint 和已有验证证据;三件套实现维度标记 `N/A`,其余维度仍对实际 diff 与相关 spec 负责。
40
+ - `hit`:读取 work id、summary 和 stage;三件套实现维度标记 `N/A`,其余维度仍对实际 diff、相关 spec 和本轮可验证证据负责。
41
41
  - `miss`:仅当用户明确要求检查一个无状态的已知 diff 时继续,并把工作上下文缺失列为风险;否则停止并回到 Request Triage。
42
- - `error` 或 workspace drift:按阻塞报告,禁止用聊天摘要恢复或覆盖状态。
42
+ - `error`:按损坏状态阻塞报告,禁止用聊天摘要恢复或覆盖游标。
43
43
 
44
44
  untracked 检查必须处于 `stage=check`,且只读取个人 check 偏好,不创建 task-scoped route decision。
45
45
 
@@ -6,7 +6,7 @@ Full 是完整验收映射和全影响面审查。只有 `check_profile.effectiv
6
6
 
7
7
  ## Step 1:对照规划三件套检查实现
8
8
 
9
- untracked 上下文没有 task artifacts,本 Step 标记 `N/A`;不得把 summary、scope 或聊天记录当成 PRD。仍须完整执行 Step 2 与 Step 3,并对实际 diff、相关 spec、状态机证据和多仓分发边界负责。
9
+ untracked 上下文没有 task artifacts,本 Step 标记 `N/A`;不得把 summary、stage 或聊天记录当成 PRD。仍须完整执行 Step 2 与 Step 3,并对实际 diff、相关 spec、当前验证证据和多仓分发边界负责。
10
10
 
11
11
  ### 1.1 验收依据
12
12
 
@@ -125,7 +125,7 @@ interactive 模式完成所有可继续检查和允许的 `DOC-*` 自动修复
125
125
 
126
126
  检查通过后的动作由下方 `Interactive Post-Check Stop Gate` 判断:普通交互停止等待,符合 direct Git 严格通过条件时同轮进入 Phase 3.3 `trellis-update-spec`,再到 Phase 3.4 `trellis-push`。仍有 `CHK-*` 时停留在修复/重检循环。
127
127
 
128
- untracked 在最终报告前调用 `untracked_flow.py record-check`:严格通过记录 `pass`,有问题记录 `findings`,部分验证记录 `partial`,真正阻塞记录 `blocked`。普通严格通过但尚未继续时保持 `stage=check`;只有 direct Git 同轮继续或用户后续明确继续时才 `advance --stage spec`。任何报告后的新编辑先回到 `prepare-edit`,旧检查证据随 fingerprint 失效。
128
+ untracked helper 不记录 Check-All 证据。普通严格通过但尚未继续时保持 `stage=check`;只有 direct Git 同轮继续或用户后续明确继续时才 `advance --stage spec`。有 findings、部分验证、阻塞或报告后的新编辑时,先 `advance --stage implement` 再返回实现。
129
129
 
130
130
  ---
131
131
 
@@ -17,7 +17,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
17
17
  - 不发起、终止或解决分支合并;只允许普通模式完成已经开始、冲突已清零且索引完全可归属的 merge commit。
18
18
  - 不处理上线核对、任务归档、会话日志或自动任务队列状态。
19
19
  - 不使用 `git add .`、`git add -A`,不要求工作区整体干净,也不提交计划外文件。
20
- - untracked 上下文只接受 `stage=push` 且 Check-All / Update-Spec 证据与当前 workspace fingerprint 一致;不生成任务进度提交。
20
+ - untracked 上下文只接受 `stage=push`;该状态只负责路由,不替代本 skill 的正式计划、确认和 Git 安全检查,也不生成任务进度提交。
21
21
 
22
22
  ## 模式
23
23
 
@@ -40,7 +40,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
40
40
 
41
41
  auto-loop 内部 `commit-only` 已由 runner 的 `run_check_all -> run_spec_update -> commit_only` 状态机和预授权保证顺序,因此不重复记录或判断本交互证据。
42
42
 
43
- 没有活动 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`。命中 untracked 后,以 helper 返回的 stage、scope、baseline、current fingerprint、Check-All 和 Update-Spec 证据填写上述完成链;必须为 `stage=push` 且证据仍有效。`miss` 才按既有“无活动任务”普通 Git 路径处理;`error` 或 workspace drift 停止,不从摘要猜测。
43
+ 没有活动 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`。命中 untracked 后,记录 work id、summary 和 stage,并要求 `stage=push`;完成链证据仍从当前 Check-All / Update-Spec 结果与实际 diff 获取。`miss` 才按既有“无活动任务”普通 Git 路径处理;损坏状态停止,不从摘要猜测。游标命中不表示 Push 已计划、已确认或已执行。
44
44
 
45
45
  ## Step 1:发现仓库与任务
46
46
 
@@ -67,7 +67,7 @@ python3 ./.trellis/scripts/task_progress.py status --json || true
67
67
  git status --short --untracked-files=all -- <task-dir>
68
68
  ```
69
69
 
70
- 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动 task 时仍可提交相关代码,但不生成任务进度。untracked 命中时,所有业务 `planned` 文件必须能由当前 state scope 与实际 diff 归属,计划同时显示 work id;scope 外文件只能保留或作为归属风险。存在活动 task 时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
70
+ 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动 task 时仍可提交相关代码,但不生成任务进度。untracked 命中时,结合当前请求、work summary 和实际 diff 判断业务 `planned` 文件归属,计划同时显示 work id;无法明确归属的文件只能保留或作为风险。存在活动 task 时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
71
71
 
72
72
  ## Step 2:预检与文件归属
73
73
 
@@ -212,7 +212,7 @@ dispatch prompt 第一行始终遵守当前 task/untracked 契约。agent 文件
212
212
 
213
213
  ### Untracked Subagent Dispatch 契约
214
214
 
215
- untracked 的 implement/check subagent prompt 第一行固定为 `Untracked work: <work-id>`,并包含事项摘要、stage、scope、baseline 仓库摘要、current fingerprint、已有验证证据、相关 spec 路径和本轮明确职责。不得写 `Active task:`,不得要求 `prd.md`、`implement.jsonl` 或 `check.jsonl`。agent 必须直接执行,不得递归 dispatch implement/check agent。
215
+ untracked 的 implement/check subagent prompt 第一行固定为 `Untracked work: <work-id>`,并包含事项摘要、当前 stage、实际 diff、相关 spec 路径、已有验证上下文和本轮明确职责。helper 只提供流程游标,不提供 scope、baseline、fingerprint 或 owner evidence。不得写 `Active task:`,不得要求 `prd.md`、`implement.jsonl` 或 `check.jsonl`。agent 必须直接执行,不得递归 dispatch implement/check agent。
216
216
 
217
217
  ### Subagent Check-All Dispatch 契约
218
218
 
@@ -18,7 +18,7 @@ description: "统一 Check-All 入口:确认范围与运行上下文,按 req
18
18
  4. 全程收集普通问题到 `CHK-*`,收集低风险文档漂移到 `DOC-*`。
19
19
  5. 在最终报告前处理允许自动修复的文档漂移,并把修复内容展示在报告里。
20
20
  6. 根据 interactive / validated auto-loop 边界输出下一步或完成 runner `record + next`。
21
- 7. untracked 上下文在最终 diff 稳定后调用 `untracked_flow.py record-check`;只有严格通过且 disposition 确认继续时才 `advance --stage spec`。
21
+ 7. untracked helper 只保存流程游标:findings 或新编辑设回 `implement`;只有严格通过且 disposition 确认继续时才 `advance --stage spec`。
22
22
 
23
23
  ---
24
24
 
@@ -37,9 +37,9 @@ git log --oneline -10
37
37
 
38
38
  没有当前 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`:
39
39
 
40
- - `hit`:读取 work id、summary、stage、scope、baseline/current fingerprint 和已有验证证据;三件套实现维度标记 `N/A`,其余维度仍对实际 diff 与相关 spec 负责。
40
+ - `hit`:读取 work id、summary 和 stage;三件套实现维度标记 `N/A`,其余维度仍对实际 diff、相关 spec 和本轮可验证证据负责。
41
41
  - `miss`:仅当用户明确要求检查一个无状态的已知 diff 时继续,并把工作上下文缺失列为风险;否则停止并回到 Request Triage。
42
- - `error` 或 workspace drift:按阻塞报告,禁止用聊天摘要恢复或覆盖状态。
42
+ - `error`:按损坏状态阻塞报告,禁止用聊天摘要恢复或覆盖游标。
43
43
 
44
44
  untracked 检查必须处于 `stage=check`,且只读取个人 check 偏好,不创建 task-scoped route decision。
45
45
 
@@ -6,7 +6,7 @@ Full 是完整验收映射和全影响面审查。只有 `check_profile.effectiv
6
6
 
7
7
  ## Step 1:对照规划三件套检查实现
8
8
 
9
- untracked 上下文没有 task artifacts,本 Step 标记 `N/A`;不得把 summary、scope 或聊天记录当成 PRD。仍须完整执行 Step 2 与 Step 3,并对实际 diff、相关 spec、状态机证据和多仓分发边界负责。
9
+ untracked 上下文没有 task artifacts,本 Step 标记 `N/A`;不得把 summary、stage 或聊天记录当成 PRD。仍须完整执行 Step 2 与 Step 3,并对实际 diff、相关 spec、当前验证证据和多仓分发边界负责。
10
10
 
11
11
  ### 1.1 验收依据
12
12
 
@@ -125,7 +125,7 @@ interactive 模式完成所有可继续检查和允许的 `DOC-*` 自动修复
125
125
 
126
126
  检查通过后的动作由下方 `Interactive Post-Check Stop Gate` 判断:普通交互停止等待,符合 direct Git 严格通过条件时同轮进入 Phase 3.3 `trellis-update-spec`,再到 Phase 3.4 `trellis-push`。仍有 `CHK-*` 时停留在修复/重检循环。
127
127
 
128
- untracked 在最终报告前调用 `untracked_flow.py record-check`:严格通过记录 `pass`,有问题记录 `findings`,部分验证记录 `partial`,真正阻塞记录 `blocked`。普通严格通过但尚未继续时保持 `stage=check`;只有 direct Git 同轮继续或用户后续明确继续时才 `advance --stage spec`。任何报告后的新编辑先回到 `prepare-edit`,旧检查证据随 fingerprint 失效。
128
+ untracked helper 不记录 Check-All 证据。普通严格通过但尚未继续时保持 `stage=check`;只有 direct Git 同轮继续或用户后续明确继续时才 `advance --stage spec`。有 findings、部分验证、阻塞或报告后的新编辑时,先 `advance --stage implement` 再返回实现。
129
129
 
130
130
  ---
131
131
 
@@ -17,7 +17,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
17
17
  - 不发起、终止或解决分支合并;只允许普通模式完成已经开始、冲突已清零且索引完全可归属的 merge commit。
18
18
  - 不处理上线核对、任务归档、会话日志或自动任务队列状态。
19
19
  - 不使用 `git add .`、`git add -A`,不要求工作区整体干净,也不提交计划外文件。
20
- - untracked 上下文只接受 `stage=push` 且 Check-All / Update-Spec 证据与当前 workspace fingerprint 一致;不生成任务进度提交。
20
+ - untracked 上下文只接受 `stage=push`;该状态只负责路由,不替代本 skill 的正式计划、确认和 Git 安全检查,也不生成任务进度提交。
21
21
 
22
22
  ## 模式
23
23
 
@@ -40,7 +40,7 @@ description: "按确认的精确文件范围提交普通变更或完成已就绪
40
40
 
41
41
  auto-loop 内部 `commit-only` 已由 runner 的 `run_check_all -> run_spec_update -> commit_only` 状态机和预授权保证顺序,因此不重复记录或判断本交互证据。
42
42
 
43
- 没有活动 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`。命中 untracked 后,以 helper 返回的 stage、scope、baseline、current fingerprint、Check-All 和 Update-Spec 证据填写上述完成链;必须为 `stage=push` 且证据仍有效。`miss` 才按既有“无活动任务”普通 Git 路径处理;`error` 或 workspace drift 停止,不从摘要猜测。
43
+ 没有活动 task 时运行 `python3 ./.trellis/scripts/untracked_flow.py status --verbose`。命中 untracked 后,记录 work id、summary 和 stage,并要求 `stage=push`;完成链证据仍从当前 Check-All / Update-Spec 结果与实际 diff 获取。`miss` 才按既有“无活动任务”普通 Git 路径处理;损坏状态停止,不从摘要猜测。游标命中不表示 Push 已计划、已确认或已执行。
44
44
 
45
45
  ## Step 1:发现仓库与任务
46
46
 
@@ -67,7 +67,7 @@ python3 ./.trellis/scripts/task_progress.py status --json || true
67
67
  git status --short --untracked-files=all -- <task-dir>
68
68
  ```
69
69
 
70
- 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动 task 时仍可提交相关代码,但不生成任务进度。untracked 命中时,所有业务 `planned` 文件必须能由当前 state scope 与实际 diff 归属,计划同时显示 work id;scope 外文件只能保留或作为归属风险。存在活动 task 时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
70
+ 不得把默认 `git status --short` 可能返回的 `?? <task-dir>/` 折叠目录当成 exact file、展示条目或 pathspec。无活动 task 时仍可提交相关代码,但不生成任务进度。untracked 命中时,结合当前请求、work summary 和实际 diff 判断业务 `planned` 文件归属,计划同时显示 work id;无法明确归属的文件只能保留或作为风险。存在活动 task 时,结合 `brief.md`、`implement.md`、当前 diff 与本轮执行范围生成一行语义进度;同时识别当前任务目录中已存在且可归属的 dirty/untracked 产物,供 Step 5 生成任务记录 exact files。不得从旧进度推断 Git 动作。
71
71
 
72
72
  ## Step 2:预检与文件归属
73
73
 
@@ -212,7 +212,7 @@ dispatch prompt 第一行始终遵守当前 task/untracked 契约。agent 文件
212
212
 
213
213
  ### Untracked Subagent Dispatch 契约
214
214
 
215
- untracked 的 implement/check subagent prompt 第一行固定为 `Untracked work: <work-id>`,并包含事项摘要、stage、scope、baseline 仓库摘要、current fingerprint、已有验证证据、相关 spec 路径和本轮明确职责。不得写 `Active task:`,不得要求 `prd.md`、`implement.jsonl` 或 `check.jsonl`。agent 必须直接执行,不得递归 dispatch implement/check agent。
215
+ untracked 的 implement/check subagent prompt 第一行固定为 `Untracked work: <work-id>`,并包含事项摘要、当前 stage、实际 diff、相关 spec 路径、已有验证上下文和本轮明确职责。helper 只提供流程游标,不提供 scope、baseline、fingerprint 或 owner evidence。不得写 `Active task:`,不得要求 `prd.md`、`implement.jsonl` 或 `check.jsonl`。agent 必须直接执行,不得递归 dispatch implement/check agent。
216
216
 
217
217
  ### Subagent Check-All Dispatch 契约
218
218
 
@@ -375,8 +375,8 @@
375
375
  "| Request Intent Routing | `Request Triage` + `trellis-start` | `task_intent.py` |",
376
376
  "| Project Knowledge Discovery | `Request Triage` | `spec_router.py` |",
377
377
  "| Active Task Scope Guard | `Request Triage` | `task_intent.py` scope safety |",
378
- "| Untracked Work Completion Chain | `workflow-state:untracked` + Phase 2/3 owners | `untracked_flow.py` |",
379
- "| Untracked Task Adoption | `workflow-state:untracked` + `trellis-brainstorm` | `task_intent.py adopt` |",
378
+ "| Untracked Work Completion Chain | `workflow-state:untracked*` + Phase 2/3 owners | `untracked_flow.py` |",
379
+ "| Untracked Task Adoption | `workflow-state:untracked*` + `trellis-brainstorm` | `task_intent.py adopt` |",
380
380
  "| Routing Gate | Phase 2 + `trellis-route` | `route_state.py` |",
381
381
  "| Auto-Loop Return Gate | `trellis-check-all` + `trellis-auto-loop` | `auto_loop.py record/next` |",
382
382
  "| Code Commit Confirmation Gate | Phase 3.4 + `trellis-push` | exact Git safety checks |",
@@ -480,9 +480,11 @@
480
480
  "A same-item hit resumes the existing state",
481
481
  "`active-work-conflict` blocks unrelated code writes until the current item is completed, explicitly abandoned, or adopted into a task",
482
482
  "Unrelated read-only requests may continue without mutating the state.",
483
- "python3 ./.trellis/scripts/untracked_flow.py prepare-edit --paths <exact intended paths>",
484
- "Do not edit when baseline capture or workspace validation fails.",
485
- "Do not edit when baseline capture, scope extension, or workspace validation fails.",
483
+ "A successful `begin` starts at `stage=implement`; the helper is a workflow cursor",
484
+ "[workflow-state:untracked_check]",
485
+ "[workflow-state:untracked_spec]",
486
+ "[workflow-state:untracked_push]",
487
+ "`stage=push` is only a route cursor",
486
488
  "python3 ./.trellis/scripts/task_intent.py adopt \"<title>\" --slug <slug>",
487
489
  "adoption continues through planning artifacts, Brief review, and `task.py start`, and never authorizes immediate implementation",
488
490
  "task_intent.py discard --task <current-task>"
@@ -1207,7 +1209,7 @@
1207
1209
  "<!-- BEGIN skill-garden patch trellis-meta-managed-workflow-source v0.6 -->",
1208
1210
  "<!-- BEGIN skill-garden patch trellis-meta-managed-owner-routing v0.6 -->\n## Skill Routing",
1209
1211
  "Do not choose implementation or checking behavior from a static platform-capability split.",
1210
- "| Untracked task adoption | `workflow-state:untracked`, `trellis-brainstorm`, and `task_intent.py adopt` |",
1212
+ "| Untracked task adoption | `workflow-state:untracked*`, `trellis-brainstorm`, and `task_intent.py adopt` |",
1211
1213
  "| Automatic task loop and return gate | `trellis-auto-loop`",
1212
1214
  "| Commit/push safety and completion activation | `trellis-push` and `task_progress.py` |",
1213
1215
  "| Cross-session task progress discovery and recovery | `trellis-continue` owns the recovery decision, `task_progress.py` owns candidate evidence and completed-task reopen, and `task.py start` with `.trellis/scripts/common/active_task.py` owns explicit session binding |",
@@ -1236,7 +1238,7 @@
1236
1238
  "<!-- BEGIN skill-garden patch trellis-meta-managed-workflow-source v0.6 -->",
1237
1239
  "<!-- BEGIN skill-garden patch trellis-meta-managed-owner-routing v0.6 -->\n## Skill Routing",
1238
1240
  "Do not choose implementation or checking behavior from a static platform-capability split.",
1239
- "| Untracked task adoption | `workflow-state:untracked`, `trellis-brainstorm`, and `task_intent.py adopt` |",
1241
+ "| Untracked task adoption | `workflow-state:untracked*`, `trellis-brainstorm`, and `task_intent.py adopt` |",
1240
1242
  "| Automatic task loop and return gate | `trellis-auto-loop`",
1241
1243
  "| Commit/push safety and completion activation | `trellis-push` and `task_progress.py` |",
1242
1244
  "| Cross-session task progress discovery and recovery | `trellis-continue` owns the recovery decision, `task_progress.py` owns candidate evidence and completed-task reopen, and `task.py start` with `.trellis/scripts/common/active_task.py` owns explicit session binding |",
@@ -1,2 +1,2 @@
1
1
 
2
- If the dispatch prompt's first line is `Untracked work: <work-id>`, run `python3 ./.trellis/scripts/untracked_flow.py status --verbose`, require the same work id, use the complete summary/scope/baseline/fingerprint/evidence/spec context supplied by the main agent, and skip any task lookup or task-artifact loading below. Do not require or invent a task path or JSONL file. Otherwise continue with the agent's normal task context rules.
2
+ If the dispatch prompt's first line is `Untracked work: <work-id>`, run `python3 ./.trellis/scripts/untracked_flow.py status --verbose`, require the same work id, use its summary/stage plus the actual diff, relevant specs, validation context, and responsibility supplied by the main agent, and skip any task lookup or task-artifact loading below. The helper is only a workflow cursor; do not require or invent a task path, JSONL file, scope, baseline, fingerprint, or owner evidence. Otherwise continue with the agent's normal task context rules.
@@ -3,6 +3,6 @@
3
3
  Resolve exactly one dispatch subject from the first prompt line:
4
4
 
5
5
  - `Active task: <path>`: use the normal task path. Read the role manifest (`implement.jsonl` for implement, `check.jsonl` for check), every listed file, then `prd.md`, optional `design.md`, and optional `implement.md`.
6
- - `Untracked work: <work-id>`: run `python3 ./.trellis/scripts/untracked_flow.py status --verbose`, require the same work id, and use the complete summary/scope/baseline/fingerprint/evidence/spec context supplied by the main session. Do not require or invent task artifacts or JSONL files.
6
+ - `Untracked work: <work-id>`: run `python3 ./.trellis/scripts/untracked_flow.py status --verbose`, require the same work id, and use its summary/stage plus the actual diff, relevant specs, validation context, and responsibility supplied by the main session. The helper is only a workflow cursor; do not require or invent task artifacts, JSONL files, scope, baseline, fingerprint, or owner evidence.
7
7
 
8
8
  If hook-injected context is present, it may satisfy the task branch. The untracked branch remains prompt-driven and must still validate the helper state. If neither first-line contract is present or the resolved subject mismatches, stop and report the missing context; do not guess or switch subjects.
@@ -29,10 +29,11 @@ def main() -> int:
29
29
  )
30
30
  else:
31
31
  work_id, stage, summary = untracked
32
- untracked_key = resolve_breadcrumb_key("untracked", platform, config)
32
+ untracked_status = "untracked" if stage == "implement" else f"untracked_{stage}"
33
+ untracked_key = resolve_breadcrumb_key(untracked_status, platform, config)
33
34
  breadcrumb = build_breadcrumb(
34
35
  None,
35
- "untracked",
36
+ untracked_status,
36
37
  templates,
37
38
  breadcrumb_key=untracked_key,
38
39
  subject_label=f"Untracked work: {work_id} ({stage})",
@@ -12,7 +12,6 @@ def _get_untracked_work(root: Path, input_data: dict) -> Optional[tuple[str, str
12
12
  root,
13
13
  input_data,
14
14
  platform=_detect_platform(input_data),
15
- validate_workspace=False,
16
15
  )
17
16
  except Exception:
18
17
  return None
@@ -8,8 +8,8 @@ Stable owner categories are:
8
8
  | --- | --- |
9
9
  | Request intent and project knowledge discovery | Request Triage, `trellis-start`, and the referenced router helper |
10
10
  | Active task scope safety | Request Triage and the active-task scope guard |
11
- | Untracked work completion | `workflow-state:untracked`, Phase 2/3 owners, and `untracked_flow.py` |
12
- | Untracked task adoption | `workflow-state:untracked`, `trellis-brainstorm`, and `task_intent.py adopt` |
11
+ | Untracked work completion | `workflow-state:untracked*`, Phase 2/3 owners, and `untracked_flow.py` |
12
+ | Untracked task adoption | `workflow-state:untracked*`, `trellis-brainstorm`, and `task_intent.py adopt` |
13
13
  | Planning handoff and activation | `trellis-task-brief` and the task-start Brief guard |
14
14
  | Implement/check execution mode | `trellis-route` |
15
15
  | Unified quality verification | `trellis-check-all` |
@@ -6,7 +6,7 @@ Start from the runtime section, then move to its owner:
6
6
  | --- | --- |
7
7
  | Add or reorder a phase | Workflow Patch/source plus every affected owner handoff |
8
8
  | Change task creation or scope policy | Request Triage, task-intent helper, and the managed workflow/state Patch |
9
- | Change untracked completion or adoption | `workflow-state:untracked`, Phase 2/3 owners, `untracked_flow.py`, and `task_intent.py adopt` |
9
+ | Change untracked completion or adoption | `workflow-state:untracked*`, Phase 2/3 owners, `untracked_flow.py`, and `task_intent.py adopt` |
10
10
  | Change planning handoff or activation | `trellis-task-brief` and the task-start Brief guard |
11
11
  | Change implement/check execution | `trellis-route`; Check-All remains the unified check entry |
12
12
  | Change automatic continuation | `trellis-auto-loop` and its runner action contract |
@@ -1 +1 @@
1
- - **No active task** -> first run `python3 ./.trellis/scripts/untracked_flow.py status`. On `hit`, resume the reported stage through `[workflow-state:untracked]`; on `miss`, follow the workflow `Request Triage` contract before acting. Use `task_intent.py create` for inferred complex planning, `task.py create` for explicit task planning, and ask only for material ambiguity or an independent safety boundary.
1
+ - **No active task** -> first run `python3 ./.trellis/scripts/untracked_flow.py status`. On `hit`, resume the reported stage through the matching `[workflow-state:untracked*]` breadcrumb; on `miss`, follow the workflow `Request Triage` contract before acting. Use `task_intent.py create` for inferred complex planning, `task.py create` for explicit task planning, and ask only for material ambiguity or an independent safety boundary.
@@ -27,7 +27,7 @@ Read real evidence in this order. Do not decide from the chat summary, task titl
27
27
 
28
28
  1. For task context, the current task's `implement.jsonl` / `check.jsonl` and every file they reference.
29
29
  2. For task context, the current task's `prd.md`, `design.md`, and `implement.md`.
30
- 3. For untracked context, `untracked_flow.py status --verbose`, including summary, scope, baseline/current fingerprint, focused validation, and Check-All evidence.
30
+ 3. For untracked context, `untracked_flow.py status --verbose` for work id, summary, and stage; obtain validation evidence from the current Check-All result and current change set rather than the cursor helper.
31
31
  4. The final Check-All conclusion and its actual validation evidence.
32
32
  5. The current subject's actual diff, source code, tests, and commit evidence.
33
33
  6. Existing specs and their indexes returned by `spec_router.py`.
@@ -56,6 +56,6 @@ When applicable, also validate indexes/links, code signatures, or project-specif
56
56
  - Interactive: after a passed Check-All stop, when the user says “下一步”, “继续”, `next`, `continue`, or an equivalent continuation intent, run this skill. A `no-op` or `written` result must load `trellis-push` in the same turn and present its single confirmation plan. A `needs-review` result stops and must not generate a Push plan.
57
57
  - Interactive direct Git: when the latest user message that triggered the current completion chain explicitly requests an ordinary push or a user-initiated `commit-only`, use that request only as conditional continuation after a strictly passed Check-All. After the existing standard Check-All report is shown, run this skill in the same turn when no currently valid `spec_update_result` exists. Only `no-op` or `written` may proceed to `trellis-push`; `needs-review` stops. Do not infer this intent from history, summaries, dirty state, or an auto-loop internal `commit-only`.
58
58
  - Validated auto-loop: for `no-op` or `written`, execute `record --action run_spec_update --result ok` and immediately run `next`. For `needs-review`, execute `record --action run_spec_update --result blocked --failure-type spec-needs-review`; never disguise it as `no-op`.
59
- - Untracked: after the final spec diff stabilizes, run `untracked_flow.py record-spec --result <no-op|written|needs-review> --summary <summary>`. Only `no-op` or `written` may advance to `push`; `needs-review` stays at `spec`. Any later edit outside this skill's allowed `.trellis/spec/**` batch must return through `prepare-edit` and invalidate downstream evidence.
59
+ - Untracked: keep the cursor at `spec` for `needs-review`. For `no-op` or `written`, run `untracked_flow.py advance --stage push`. Any later product edit returns the cursor to `implement`; the helper does not validate or preserve owner evidence.
60
60
 
61
61
  Do not ask again or rerun when a currently valid `no-op` or `written` result already exists. Re-evaluate after the actual diff, Check-All conclusion, or the user's spec intent changes.
@@ -12,8 +12,8 @@ Complete contracts live in the owning phase, workflow state, skill, hook, or hel
12
12
  | Project Knowledge Discovery | `Request Triage` | `spec_router.py` |
13
13
  | Flower Update Confirmation | SessionStart update context + Flower CLI | update hook / `self-update` arguments |
14
14
  | Active Task Scope Guard | `Request Triage` | `task_intent.py` scope safety |
15
- | Untracked Work Completion Chain | `workflow-state:untracked` + Phase 2/3 owners | `untracked_flow.py` |
16
- | Untracked Task Adoption | `workflow-state:untracked` + `trellis-brainstorm` | `task_intent.py adopt` |
15
+ | Untracked Work Completion Chain | `workflow-state:untracked*` + Phase 2/3 owners | `untracked_flow.py` |
16
+ | Untracked Task Adoption | `workflow-state:untracked*` + `trellis-brainstorm` | `task_intent.py adopt` |
17
17
  | Routing Gate | Phase 2 + `trellis-route` | `route_state.py` |
18
18
  | Auto-Loop Return Gate | `trellis-check-all` + `trellis-auto-loop` | `auto_loop.py record/next` |
19
19
  | Interactive Post-Check Stop Gate | Phase 2.2 + `trellis-check-all` | current Check-All evidence |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Run `trellis-route(target=check)`, then execute the unified `trellis-check-all` entry using the validated inline/subagent route.
4
4
 
5
- For untracked work, route reads only the personal pref helper and the dispatch prompt starts with `Untracked work: <work-id>` plus complete state/spec context. After Check-All, record its result through `untracked_flow.py record-check`; only a current valid pass may advance the work to `spec`.
5
+ For untracked work, route reads only the personal pref helper and the dispatch prompt starts with `Untracked work: <work-id>` plus the work summary, current stage, actual diff, relevant specs, and validation context. Findings or new edits return the cursor to `implement`; a strict pass advances to `spec` only when the existing interactive/direct-Git disposition continues the completion chain.
6
6
 
7
7
  Before interactive Check-All begins, run `python3 ./.trellis/scripts/pre_check_state.py clear`. A missing, subject-mismatched, or already-cleared preference is a no-op; a damaged runtime is reported diagnostically but safely defaults to checking.
8
8
 
@@ -7,13 +7,13 @@ Follow the validated route result:
7
7
  - `inline`: load `trellis-before-dev`, read the active task artifacts and referenced context, then implement and run focused verification.
8
8
  - `subagent`: dispatch the selected implement agent with `Active task: <task path>` as the first prompt line; the agent implements directly and must not recursively dispatch implement/check agents.
9
9
 
10
- For untracked work, route reads only the personal pref helper and never creates task-scoped route decisions. Inline loads relevant project specs from `spec_router.py`; subagent dispatch starts with `Untracked work: <work-id>` and includes the helper's complete state summary instead of task artifacts. Run `untracked_flow.py prepare-edit --paths <exact intended paths>` before every write batch.
10
+ For untracked work, route reads only the personal pref helper and never creates task-scoped route decisions. Inline loads relevant project specs from `spec_router.py`; subagent dispatch starts with `Untracked work: <work-id>` and includes the work summary, current stage, actual diff/spec context, and this turn's responsibility instead of task artifacts. If implementation resumes from a downstream stage, set the cursor to `implement` before editing.
11
11
 
12
12
  Route preference recovery, fallback choices, and runtime evidence belong to `trellis-route`; do not reproduce them here.
13
13
 
14
14
  After implementation and focused verification, resolve the next action in this order:
15
15
 
16
- For untracked work, first record the focused validation through `untracked_flow.py record-validation`; before entering Check-All, advance to `check`. A failed or partial validation remains in `implement` until the owner evidence permits advancement.
16
+ For untracked work, focused validation remains owned by the implementation path. When it is complete, advance the cursor to `check`; a failed or partial validation stays at `implement`.
17
17
 
18
18
  1. A validated auto-loop outstanding action wins; continue to its requested Check-All action without consulting interactive hold state.
19
19
  2. If the latest user message explicitly requests checking, continuation, commit, or deployment, run `python3 ./.trellis/scripts/pre_check_state.py clear` and enter Phase 2.2 in the same turn.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Load `trellis-push`. It owns dirty-file classification, exact file/message planning, one-shot confirmation, Git safety checks, ordinary commit + push, and current-task progress synchronization.
4
4
 
5
- For untracked work, the current state baseline/scope/evidence owns attribution and there is no task progress commit. After every confirmed repository action succeeds and the final workspace evidence is recorded, clear the untracked state with `--reason completed`; partial or failed Git execution keeps the state for recovery.
5
+ For untracked work, `stage=push` identifies the next owner and there is no task progress commit. `trellis-push` derives attribution from the current request, work summary, and actual diff. After every confirmed repository action succeeds, clear the untracked state with `--reason completed`; partial or failed Git execution keeps the cursor for recovery.
6
6
 
7
7
  Ordinary mode defaults to commit and push. Commit-only is allowed only when the user explicitly requests a local commit or a validated auto-loop supplies its scoped preauthorization.
8
8
 
@@ -8,4 +8,4 @@ Load `trellis-update-spec` and let it decide whether the task produced executabl
8
8
 
9
9
  Do not ask a separate generic “update spec?” question before invoking the skill.
10
10
 
11
- For untracked work, evaluate the current state/diff/spec evidence without inventing task artifacts, record the result through `untracked_flow.py record-spec`, and advance to `push` only for `no-op` or `written`.
11
+ For untracked work, evaluate the actual diff and relevant specs without inventing task artifacts. Keep the cursor at `spec` for `needs-review`; advance it to `push` only for `no-op` or `written`.
@@ -60,7 +60,7 @@ Supported events: `after_create / after_start / after_finish / after_archive`. N
60
60
  ### Full contract
61
61
 
62
62
  <!-- BEGIN skill-garden patch workflow-runtime-contract-reference v0.6 -->
63
- For the workflow state machine's runtime contract, the authoritative runtime inputs are the installed per-turn hook parser and the `[workflow-state:*]` tags in this file. This Flower variant uses fixed pseudo-status tag names `no_task`, `untracked`, and `missing_task`; hook diagnostic source types such as `session` or `session-fallback` must not become workflow-state tag names.
63
+ For the workflow state machine's runtime contract, the authoritative runtime inputs are the installed per-turn hook parser and the `[workflow-state:*]` tags in this file. This Flower variant uses fixed pseudo-status tag names `no_task`, `untracked`, `untracked_check`, `untracked_spec`, `untracked_push`, and `missing_task`; hook diagnostic source types such as `session` or `session-fallback` must not become workflow-state tag names.
64
64
 
65
65
  - Installed `<platform>/hooks/inject-workflow-state.py` copies — parse this workflow and emit the current breadcrumb for platforms with a per-turn hook.
66
66
  - `.trellis/spec/` project specs, when present — project-local runtime contract notes and invariants.
@@ -1,4 +1,4 @@
1
- For the workflow state machine's runtime contract, the authoritative runtime inputs are the installed per-turn hook parser and the `[workflow-state:*]` tags in this file. This Flower variant uses fixed pseudo-status tag names `no_task`, `untracked`, and `missing_task`; hook diagnostic source types such as `session` or `session-fallback` must not become workflow-state tag names.
1
+ For the workflow state machine's runtime contract, the authoritative runtime inputs are the installed per-turn hook parser and the `[workflow-state:*]` tags in this file. This Flower variant uses fixed pseudo-status tag names `no_task`, `untracked`, `untracked_check`, `untracked_spec`, `untracked_push`, and `missing_task`; hook diagnostic source types such as `session` or `session-fallback` must not become workflow-state tag names.
2
2
 
3
3
  - Installed `<platform>/hooks/inject-workflow-state.py` copies — parse this workflow and emit the current breadcrumb for platforms with a per-turn hook.
4
4
  - `.trellis/spec/` project specs, when present — project-local runtime contract notes and invariants.
@@ -21,7 +21,7 @@
21
21
 
22
22
  TAG ↔ PHASE scoping:
23
23
  [workflow-state:no_task] → no active task; before Phase 1
24
- [workflow-state:untracked] → current-session direct-edit completion chain
24
+ [workflow-state:untracked*] → current-session direct-edit stage cursor
25
25
  [workflow-state:missing_task] → missing active-task directory recovery
26
26
  [workflow-state:planning] → all of Phase 1 (status='planning')
27
27
  [workflow-state:planning-inline] → Codex inline variant of Phase 1
@@ -41,6 +41,6 @@
41
41
  in Skill-Garden managed mode, edit the owning Patch and run source sync,
42
42
  compiled-target checks, and dogfood update
43
43
  - Runtime pseudo-status names are fixed. This Flower variant defines
44
- `no_task`, `untracked`, and `missing_task`; hook diagnostic source types must not be
44
+ `no_task`, the `untracked*` stage family, and `missing_task`; hook diagnostic source types must not be
45
45
  appended to workflow-state tag names.
46
46
  -->
@@ -2,5 +2,5 @@ No active task. Infer the current request intent before acting.
2
2
  Repair intent alone is not a no-task switch; inspect unknown scope and reclassify before edits. Only an explicit current-request workflow instruction such as `直接做` / `不要任务` may override automatic `task_plan`.
3
3
  For non-trivial project work, follow the `Request Triage` Project Knowledge Discovery contract before routing the action. Load a Trellis capability directly only when the user explicitly names it or the request exactly matches that capability; route project-specific workflow actions through the matched SOP instead of keyword-mapping a general release/publish request to `trellis-release`.
4
4
  Handle `discuss` and `inspect` silently. For non-destructive `direct_edit`, state once that work will use the session-scoped untracked flow, then run `python3 ./.trellis/scripts/untracked_flow.py begin --summary "<bounded work summary>" --source <inferred|user-explicit>`.
5
- A same-item hit resumes the existing state; `active-work-conflict` blocks unrelated code writes until the current item is completed, explicitly abandoned, or adopted into a task. Unrelated read-only requests may continue without mutating the state. After a successful `begin`, run `python3 ./.trellis/scripts/untracked_flow.py prepare-edit --paths <exact intended paths>` before the first file write. Do not edit when baseline capture or workspace validation fails.
5
+ A same-item hit resumes the existing state; `active-work-conflict` blocks unrelated code writes until the current item is completed, explicitly abandoned, or adopted into a task. Unrelated read-only requests may continue without mutating the state. A successful `begin` starts at `stage=implement`; the helper is a workflow cursor and does not gate edits on file scope, Git state, or owner evidence.
6
6
  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.
@@ -1,8 +1,20 @@
1
1
  [workflow-state:untracked]
2
- One current-session untracked work item is active. Run `python3 ./.trellis/scripts/untracked_flow.py status` and continue its reported stage; do not create task artifacts or task-scoped route decisions.
3
- At `inspect` or `implement`, enter Phase 2.1 with `trellis-route(target=implement)` and run `prepare-edit --paths <exact paths>` before every write batch. Do not edit when baseline capture, scope extension, or workspace validation fails. Use `record-validation` for focused evidence, then advance to `check` only when it passes.
4
- At `check`, enter Phase 2.2 with `trellis-route(target=check)`; use `record-check` for the Check-All result and advance to `spec` only on a current valid pass.
5
- At `spec`, run `trellis-update-spec`; use `record-spec` for `no-op`, `written`, or `needs-review`, and advance to `push` only for the first two results.
6
- At `push`, load `trellis-push`; clear with `--reason completed` only after all confirmed Git actions succeed. New edits return through `prepare-edit`, which invalidates downstream evidence.
7
- A different implementation request is blocked by the single-active-work guard until this item is completed, explicitly abandoned, or adopted through `python3 ./.trellis/scripts/task_intent.py adopt "<title>" --slug <slug>`; adoption continues through planning artifacts, Brief review, and `task.py start`, and never authorizes immediate implementation. Unrelated read-only requests may continue without changing state.
2
+ The current-session untracked work item is at `implement`. Run `python3 ./.trellis/scripts/untracked_flow.py status`, then enter Phase 2.1 through `trellis-route(target=implement)` without creating task artifacts or task-scoped route decisions.
3
+ The helper is only a workflow cursor: it does not validate file scope, Git state, focused validation, or owner evidence. After focused validation is complete, run `python3 ./.trellis/scripts/untracked_flow.py advance --stage check` and continue through the normal Phase 2.1 completion contract.
4
+ A different implementation request remains blocked by the single-active-work guard until this item is completed, explicitly abandoned, or adopted through `python3 ./.trellis/scripts/task_intent.py adopt "<title>" --slug <slug>`; adoption continues through planning artifacts, Brief review, and `task.py start`, and never authorizes immediate implementation. Unrelated read-only requests may continue without changing state.
8
5
  [/workflow-state:untracked]
6
+
7
+ [workflow-state:untracked_check]
8
+ The current-session untracked work item is at `check`. Run `python3 ./.trellis/scripts/untracked_flow.py status`, then enter Phase 2.2 through `trellis-route(target=check)` and execute `trellis-check-all`.
9
+ If Check-All reports findings or a new edit is needed, run `python3 ./.trellis/scripts/untracked_flow.py advance --stage implement` before returning to implementation. On a strict pass, keep `check` while the interactive stop gate waits; only a same-turn direct Git continuation or a later explicit continuation advances to `spec`.
10
+ [/workflow-state:untracked_check]
11
+
12
+ [workflow-state:untracked_spec]
13
+ The current-session untracked work item is at `spec`. Run `python3 ./.trellis/scripts/untracked_flow.py status`, then load `trellis-update-spec`.
14
+ Keep `spec` for `needs-review`. For `no-op` or `written`, run `python3 ./.trellis/scripts/untracked_flow.py advance --stage push`. The helper records only the next owner; Update-Spec owns its evidence and validation.
15
+ [/workflow-state:untracked_spec]
16
+
17
+ [workflow-state:untracked_push]
18
+ The current-session untracked work item is ready to enter Push. Run `python3 ./.trellis/scripts/untracked_flow.py status`, require `stage=push`, and load `trellis-push`.
19
+ `stage=push` is only a route cursor: it is not a Git plan, user confirmation, or proof that Push already ran. `trellis-push` owns the exact plan, confirmation, Git safety checks, and execution. Clear with `--reason completed` only after every confirmed Git action succeeds; new edits first return the cursor to `implement`.
20
+ [/workflow-state:untracked_push]
@@ -19,7 +19,7 @@ PREFERENCE_KEY = "pre_check_preference"
19
19
  PREFERENCE_VERSION = 2
20
20
  LEGACY_PREFERENCE_VERSION = 1
21
21
  VALID_SOURCES = {"user-explicit", "follow-up-edit"}
22
- UNTRACKED_STATE_VERSION = 1
22
+ UNTRACKED_STATE_VERSIONS = {1, 2}
23
23
  UNTRACKED_STAGES = {"inspect", "implement", "check", "spec", "push"}
24
24
  SESSION_START_HINT = "Pre-check: deferred for current work; latest user intent may override."
25
25
 
@@ -137,7 +137,7 @@ def _runtime_scope(
137
137
  if isinstance(untracked, dict):
138
138
  work_id = untracked.get("id")
139
139
  if not (
140
- untracked.get("version") == UNTRACKED_STATE_VERSION
140
+ untracked.get("version") in UNTRACKED_STATE_VERSIONS
141
141
  and isinstance(work_id, str)
142
142
  and work_id.strip()
143
143
  and untracked.get("stage") in UNTRACKED_STAGES
@@ -243,7 +243,7 @@ def _rollback_adoption(
243
243
 
244
244
 
245
245
  def adopt_untracked_work(args: argparse.Namespace) -> dict:
246
- """把当前 untracked diff 和证据原地接管到 planning task。
246
+ """把当前 untracked diff 和流程游标原地接管到 planning task。
247
247
 
248
248
  Args:
249
249
  args: adopt 子命令参数。
@@ -256,7 +256,7 @@ def adopt_untracked_work(args: argparse.Namespace) -> dict:
256
256
  if not context_key:
257
257
  raise IntentTaskError("no-session-context", "无法解析当前 AI session")
258
258
  try:
259
- untracked = read_untracked_state(repo_root, validate_workspace=True)
259
+ untracked = read_untracked_state(repo_root)
260
260
  except Exception as exc:
261
261
  reason = getattr(exc, "reason", "untracked-state-invalid")
262
262
  raise IntentTaskError(reason, str(exc)) from exc
@@ -267,6 +267,7 @@ def adopt_untracked_work(args: argparse.Namespace) -> dict:
267
267
  raw_state = session_before.get(STATE_KEY)
268
268
  if not isinstance(raw_state, dict) or raw_state.get("id") != state["id"]:
269
269
  raise IntentTaskError("untracked-state-mismatch", "纳管前 untracked 状态已变化")
270
+ baseline = capture_git_baseline(repo_root)
270
271
 
271
272
  task_ref = ""
272
273
  task_dir: Path | None = None
@@ -281,11 +282,9 @@ def adopt_untracked_work(args: argparse.Namespace) -> dict:
281
282
  "createdAt": _utc_now(),
282
283
  "contextKey": context_key,
283
284
  "untrackedWorkId": state["id"],
284
- "implementationStarted": state["stage"] != "inspect",
285
- "baseline": state.get("baseline"),
285
+ "implementationStarted": True,
286
+ "baseline": baseline,
286
287
  "adoptedStage": state["stage"],
287
- "workspaceFingerprint": state.get("workspaceFingerprint"),
288
- "evidence": state.get("evidence", {}),
289
288
  }
290
289
  task_data["meta"] = meta
291
290
  _write_json_atomic(task_json, task_data)
@@ -322,7 +321,7 @@ def adopt_untracked_work(args: argparse.Namespace) -> dict:
322
321
  "task": task_ref,
323
322
  "workId": state["id"],
324
323
  "adoptedStage": state["stage"],
325
- "implementationStarted": state["stage"] != "inspect",
324
+ "implementationStarted": True,
326
325
  }
327
326
 
328
327
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python3
2
- """管理当前 session 的无任务 direct-edit 完成链。"""
2
+ """管理当前 session 的无任务 direct-edit 流程游标。"""
3
3
 
4
4
  from __future__ import annotations
5
5
 
@@ -14,23 +14,15 @@ from pathlib import Path
14
14
  from typing import Any
15
15
 
16
16
  from common.active_task import resolve_context_key
17
- from git_evidence import GitEvidenceError, capture_workspace_evidence
18
17
 
19
18
 
20
19
  STATE_KEY = "untracked_flow"
21
- STATE_VERSION = 1
20
+ STATE_VERSION = 2
21
+ LEGACY_STATE_VERSION = 1
22
22
  VALID_SOURCES = {"inferred", "user-explicit"}
23
- VALID_STAGES = {"inspect", "implement", "check", "spec", "push"}
24
- VALID_CLEAR_REASONS = {
25
- "completed",
26
- "abandoned",
27
- "adopted",
28
- "baseline-restored",
29
- "invalidated",
30
- }
31
- CHECK_RESULTS = {"pass", "findings", "partial", "blocked"}
32
- SPEC_RESULTS = {"no-op", "written", "needs-review"}
33
- VALIDATION_RESULTS = {"pass", "fail", "partial"}
23
+ VALID_STAGES = {"implement", "check", "spec", "push"}
24
+ LEGACY_STAGES = VALID_STAGES | {"inspect"}
25
+ VALID_CLEAR_REASONS = {"completed", "abandoned", "adopted"}
34
26
 
35
27
 
36
28
  class UntrackedFlowError(Exception):
@@ -146,32 +138,38 @@ def _runtime_scope(
146
138
 
147
139
 
148
140
  def _normalized_state(value: Any) -> dict[str, Any] | None:
149
- """校验并归一化 untracked 状态,非法时返回 None。"""
141
+ """校验并投影 v1/v2 untracked 状态,非法时返回 None。"""
150
142
  if not isinstance(value, dict):
151
143
  return None
144
+ version = value.get("version")
145
+ if version not in {LEGACY_STATE_VERSION, STATE_VERSION}:
146
+ return None
147
+ if version == LEGACY_STATE_VERSION and value.get("mode") != "direct_edit":
148
+ return None
149
+ source = value.get("source")
150
+ stage = value.get("stage")
151
+ work_id = value.get("id")
152
+ summary = value.get("summary")
152
153
  if (
153
- value.get("version") != STATE_VERSION
154
- or value.get("mode") != "direct_edit"
155
- or value.get("source") not in VALID_SOURCES
156
- or value.get("stage") not in VALID_STAGES
157
- or not isinstance(value.get("id"), str)
158
- or not value["id"].strip()
159
- or not isinstance(value.get("summary"), str)
160
- or not value["summary"].strip()
154
+ source not in VALID_SOURCES
155
+ or stage not in LEGACY_STAGES
156
+ or not isinstance(work_id, str)
157
+ or not work_id.strip()
158
+ or not isinstance(summary, str)
159
+ or not summary.strip()
161
160
  ):
162
161
  return None
163
- normalized = dict(value)
164
- normalized["scope"] = sorted(
165
- {
166
- str(path).replace("\\", "/")
167
- for path in value.get("scope", [])
168
- if isinstance(path, str) and path.strip()
169
- }
170
- )
171
- normalized["evidence"] = (
172
- dict(value["evidence"]) if isinstance(value.get("evidence"), dict) else {}
173
- )
174
- return normalized
162
+ created_at = value.get("createdAt")
163
+ updated_at = value.get("updatedAt")
164
+ return {
165
+ "version": STATE_VERSION,
166
+ "id": work_id,
167
+ "source": source,
168
+ "summary": summary,
169
+ "stage": "implement" if stage == "inspect" else stage,
170
+ "createdAt": created_at if isinstance(created_at, str) else "",
171
+ "updatedAt": updated_at if isinstance(updated_at, str) else "",
172
+ }
175
173
 
176
174
 
177
175
  def _state_summary(state: dict[str, Any]) -> dict[str, Any]:
@@ -181,10 +179,6 @@ def _state_summary(state: dict[str, Any]) -> dict[str, Any]:
181
179
  "summary": state.get("summary"),
182
180
  "source": state.get("source"),
183
181
  "stage": state.get("stage"),
184
- "scope": state.get("scope", []),
185
- "baselineCaptured": isinstance(state.get("baseline"), dict),
186
- "workspaceFingerprint": state.get("workspaceFingerprint"),
187
- "evidence": state.get("evidence", {}),
188
182
  }
189
183
 
190
184
 
@@ -193,7 +187,9 @@ def _persist(scope: dict[str, Any], state: dict[str, Any] | None) -> None:
193
187
  context = dict(scope["context"])
194
188
  context.setdefault(
195
189
  "platform",
196
- scope["context_key"].split("_", 1)[0] if "_" in scope["context_key"] else "session",
190
+ scope["context_key"].split("_", 1)[0]
191
+ if "_" in scope["context_key"]
192
+ else "session",
197
193
  )
198
194
  context["last_seen_at"] = _utc_now()
199
195
  if state is None:
@@ -203,66 +199,6 @@ def _persist(scope: dict[str, Any], state: dict[str, Any] | None) -> None:
203
199
  _write_json(scope["path"], context)
204
200
 
205
201
 
206
- def _normalize_paths(repo_root: Path, values: list[str]) -> list[str]:
207
- """校验并归一化事项文件范围。"""
208
- normalized: set[str] = set()
209
- root = repo_root.resolve()
210
- for raw in values:
211
- value = raw.strip()
212
- if not value:
213
- continue
214
- candidate = Path(value)
215
- absolute = candidate.resolve() if candidate.is_absolute() else (root / candidate).resolve()
216
- try:
217
- relative = absolute.relative_to(root).as_posix()
218
- except ValueError as exc:
219
- raise UntrackedFlowError(
220
- "scope-path-invalid",
221
- "事项范围路径逃逸项目根目录",
222
- path=value,
223
- ) from exc
224
- normalized.add(relative)
225
- if not normalized:
226
- raise UntrackedFlowError("scope-empty", "首次修改前必须提供至少一个事项路径")
227
- return sorted(normalized)
228
-
229
-
230
- def _capture(repo_root: Path) -> dict[str, Any]:
231
- """捕获 workspace 证据并转换底层错误。"""
232
- try:
233
- return capture_workspace_evidence(repo_root)
234
- except GitEvidenceError as error:
235
- raise UntrackedFlowError(error.reason, str(error), **error.details) from error
236
-
237
-
238
- def _ensure_workspace_matches(repo_root: Path, state: dict[str, Any]) -> dict[str, Any]:
239
- """校验当前 workspace 与状态记录的有效 fingerprint 一致。"""
240
- current = _capture(repo_root)
241
- expected = state.get("workspaceFingerprint")
242
- if isinstance(expected, str) and expected and current["fingerprint"] != expected:
243
- raise UntrackedFlowError(
244
- "workspace-drift",
245
- "当前 workspace 与 untracked 状态记录不匹配",
246
- expected=expected,
247
- actual=current["fingerprint"],
248
- )
249
- return current
250
-
251
-
252
- def _baseline_restored(state: dict[str, Any], current: dict[str, Any]) -> bool:
253
- """判断已实际推进的事项是否回到原始 baseline。"""
254
- baseline = state.get("baseline")
255
- if not isinstance(baseline, dict) or current.get("fingerprint") != baseline.get("fingerprint"):
256
- return False
257
- evidence = state.get("evidence")
258
- return (
259
- state.get("stage") in {"check", "spec", "push"}
260
- or isinstance(state.get("workspaceFingerprint"), str)
261
- or isinstance(evidence, dict) and bool(evidence)
262
- or state.get("preparedFingerprint") != baseline.get("fingerprint")
263
- )
264
-
265
-
266
202
  def begin_untracked_work(
267
203
  repo_root: Path,
268
204
  summary: str,
@@ -289,19 +225,6 @@ def begin_untracked_work(
289
225
  raise UntrackedFlowError("invalid-source", "无任务事项来源不合法", source=source)
290
226
  scope = _runtime_scope(repo_root, platform_input, platform)
291
227
  existing = _normalized_state(scope["context"].get(STATE_KEY))
292
- if existing and existing.get("baseline") is not None:
293
- current = _capture(repo_root)
294
- baseline = existing["baseline"]
295
- if (
296
- isinstance(baseline, dict)
297
- and current["fingerprint"] == baseline.get("fingerprint")
298
- and (existing["summary"] != clean_summary or _baseline_restored(existing, current))
299
- ):
300
- _persist(scope, None)
301
- scope["context"] = {
302
- key: value for key, value in scope["context"].items() if key != STATE_KEY
303
- }
304
- existing = None
305
228
  if existing:
306
229
  if existing["summary"] == clean_summary:
307
230
  return {"status": "hit", **_state_summary(existing)}
@@ -318,15 +241,9 @@ def begin_untracked_work(
318
241
  state = {
319
242
  "version": STATE_VERSION,
320
243
  "id": f"uw-{uuid.uuid4().hex[:12]}",
321
- "mode": "direct_edit",
322
244
  "source": source,
323
245
  "summary": clean_summary,
324
- "stage": "inspect",
325
- "baseline": None,
326
- "scope": [],
327
- "preparedFingerprint": None,
328
- "workspaceFingerprint": None,
329
- "evidence": {},
246
+ "stage": "implement",
330
247
  "createdAt": now,
331
248
  "updatedAt": now,
332
249
  }
@@ -334,248 +251,58 @@ def begin_untracked_work(
334
251
  return {"status": "created", **_state_summary(state)}
335
252
 
336
253
 
337
- def prepare_edit(
338
- repo_root: Path,
339
- paths: list[str],
340
- platform_input: dict[str, Any] | None = None,
341
- platform: str | None = None,
342
- ) -> dict[str, Any]:
343
- """在实际文件写入前捕获 baseline 并进入 implement。
344
-
345
- Args:
346
- repo_root: Trellis 项目根目录。
347
- paths: 本次准备修改的项目相对路径。
348
- platform_input: 可选平台 hook 输入。
349
- platform: 可选平台名称。
350
-
351
- Returns:
352
- 更新后的事项状态与 baseline 摘要。
353
- """
354
- scope = _runtime_scope(repo_root, platform_input, platform)
355
- state = _normalized_state(scope["context"].get(STATE_KEY))
356
- if state is None:
357
- raise UntrackedFlowError("no-active-work", "当前 session 没有活跃无任务事项")
358
-
359
- current = _capture(repo_root)
360
- expected = state.get("workspaceFingerprint")
361
- if isinstance(expected, str):
362
- if current["fingerprint"] != expected:
363
- raise UntrackedFlowError(
364
- "workspace-drift",
365
- "进入新一轮修改前 workspace 已偏离已验证证据",
366
- expected=expected,
367
- actual=current["fingerprint"],
368
- )
369
- elif state["stage"] in {"check", "spec", "push"}:
370
- raise UntrackedFlowError(
371
- "workspace-drift",
372
- "进入新一轮修改前缺少有效 workspace 证据",
373
- expected=expected,
374
- actual=current["fingerprint"],
375
- )
376
-
377
- normalized_paths = _normalize_paths(repo_root, paths)
378
- if state.get("baseline") is None:
379
- state["baseline"] = current
380
- state["scope"] = sorted(set(state.get("scope", [])) | set(normalized_paths))
381
- state["stage"] = "implement"
382
- state["preparedFingerprint"] = current["fingerprint"]
383
- state["workspaceFingerprint"] = None
384
- state["evidence"] = {}
385
- state["updatedAt"] = _utc_now()
386
- _persist(scope, state)
387
- return {
388
- "status": "prepared",
389
- **_state_summary(state),
390
- "baselineFingerprint": state["baseline"].get("fingerprint"),
391
- "preparedFingerprint": current["fingerprint"],
392
- }
393
-
394
-
395
- def record_validation(
396
- repo_root: Path,
397
- result: str,
398
- summary: str,
399
- platform_input: dict[str, Any] | None = None,
400
- platform: str | None = None,
401
- ) -> dict[str, Any]:
402
- """记录 focused validation 结果和当前 workspace fingerprint。
403
-
404
- Args:
405
- repo_root: Trellis 项目根目录。
406
- result: ``pass``、``fail`` 或 ``partial``。
407
- summary: 定向验证摘要。
408
- platform_input: 可选平台 hook 输入。
409
- platform: 可选平台名称。
410
-
411
- Returns:
412
- 记录后的事项状态摘要。
413
- """
414
- if result not in VALIDATION_RESULTS:
415
- raise UntrackedFlowError("invalid-validation-result", "定向验证结果不合法")
416
- scope = _runtime_scope(repo_root, platform_input, platform)
417
- state = _normalized_state(scope["context"].get(STATE_KEY))
418
- if state is None or state["stage"] != "implement":
419
- raise UntrackedFlowError("stage-mismatch", "只有 implement 阶段可以记录定向验证")
420
- current = _capture(repo_root)
421
- now = _utc_now()
422
- state["workspaceFingerprint"] = current["fingerprint"]
423
- state["evidence"] = {
424
- "focusedValidation": {
425
- "result": result,
426
- "summary": summary.strip(),
427
- "fingerprint": current["fingerprint"],
428
- "recordedAt": now,
429
- }
430
- }
431
- state["updatedAt"] = now
432
- _persist(scope, state)
433
- return {"status": "recorded", **_state_summary(state)}
434
-
435
-
436
254
  def advance_stage(
437
255
  repo_root: Path,
438
256
  stage: str,
439
257
  platform_input: dict[str, Any] | None = None,
440
258
  platform: str | None = None,
441
259
  ) -> dict[str, Any]:
442
- """在前置证据满足时推进 untracked 完成链阶段。
260
+ """更新当前 untracked 事项的流程游标。
443
261
 
444
262
  Args:
445
263
  repo_root: Trellis 项目根目录。
446
- stage: ``check``、``spec`` 或 ``push``。
264
+ stage: ``implement``、``check``、``spec`` 或 ``push``。
447
265
  platform_input: 可选平台 hook 输入。
448
266
  platform: 可选平台名称。
449
267
 
450
268
  Returns:
451
- 推进后的事项状态摘要。
269
+ 更新后的事项状态摘要。
452
270
  """
453
- if stage not in {"check", "spec", "push"}:
271
+ if stage not in VALID_STAGES:
454
272
  raise UntrackedFlowError("invalid-stage", "目标阶段不合法", stage=stage)
455
273
  scope = _runtime_scope(repo_root, platform_input, platform)
456
274
  state = _normalized_state(scope["context"].get(STATE_KEY))
457
275
  if state is None:
458
276
  raise UntrackedFlowError("no-active-work", "当前 session 没有活跃无任务事项")
459
- _ensure_workspace_matches(repo_root, state)
460
- evidence = state["evidence"]
461
- if stage == "check":
462
- focused = evidence.get("focusedValidation")
463
- if state["stage"] != "implement" or not isinstance(focused, dict) or focused.get("result") != "pass":
464
- raise UntrackedFlowError("focused-validation-required", "进入 Check-All 前需要通过定向验证")
465
- elif stage == "spec":
466
- checked = evidence.get("checkAll")
467
- if state["stage"] != "check" or not isinstance(checked, dict) or checked.get("result") != "pass":
468
- raise UntrackedFlowError("check-all-required", "进入 Update-Spec 前需要 Check-All 严格通过")
469
- else:
470
- spec = evidence.get("updateSpec")
471
- if (
472
- state["stage"] != "spec"
473
- or not isinstance(spec, dict)
474
- or spec.get("result") not in {"no-op", "written"}
475
- ):
476
- raise UntrackedFlowError("update-spec-required", "进入 Push 前需要完成 Update-Spec")
477
277
  state["stage"] = stage
478
278
  state["updatedAt"] = _utc_now()
279
+ if not state.get("createdAt"):
280
+ state["createdAt"] = state["updatedAt"]
479
281
  _persist(scope, state)
480
282
  return {"status": "advanced", **_state_summary(state)}
481
283
 
482
284
 
483
- def record_check(
484
- repo_root: Path,
485
- result: str,
486
- summary: str,
487
- platform_input: dict[str, Any] | None = None,
488
- platform: str | None = None,
489
- ) -> dict[str, Any]:
490
- """记录 Check-All 结果并绑定当前 workspace fingerprint。
491
-
492
- Args:
493
- repo_root: Trellis 项目根目录。
494
- result: Check-All 结果类别。
495
- summary: Check-All 结果摘要。
496
- platform_input: 可选平台 hook 输入。
497
- platform: 可选平台名称。
498
-
499
- Returns:
500
- 记录后的事项状态摘要。
501
- """
502
- if result not in CHECK_RESULTS:
503
- raise UntrackedFlowError("invalid-check-result", "Check-All 结果不合法")
504
- scope = _runtime_scope(repo_root, platform_input, platform)
505
- state = _normalized_state(scope["context"].get(STATE_KEY))
506
- if state is None or state["stage"] != "check":
507
- raise UntrackedFlowError("stage-mismatch", "只有 check 阶段可以记录 Check-All")
508
- current = _ensure_workspace_matches(repo_root, state)
509
- now = _utc_now()
510
- state["evidence"]["checkAll"] = {
511
- "result": result,
512
- "summary": summary.strip(),
513
- "fingerprint": current["fingerprint"],
514
- "recordedAt": now,
515
- }
516
- state["updatedAt"] = now
517
- _persist(scope, state)
518
- return {"status": "recorded", **_state_summary(state)}
519
-
520
-
521
- def record_spec(
522
- repo_root: Path,
523
- result: str,
524
- summary: str,
525
- platform_input: dict[str, Any] | None = None,
526
- platform: str | None = None,
527
- ) -> dict[str, Any]:
528
- """记录 Update-Spec 结果并绑定当前 workspace fingerprint。
529
-
530
- Args:
531
- repo_root: Trellis 项目根目录。
532
- result: Update-Spec 结果类别。
533
- summary: Update-Spec 结果摘要。
534
- platform_input: 可选平台 hook 输入。
535
- platform: 可选平台名称。
536
-
537
- Returns:
538
- 记录后的事项状态摘要。
539
- """
540
- if result not in SPEC_RESULTS:
541
- raise UntrackedFlowError("invalid-spec-result", "Update-Spec 结果不合法")
542
- scope = _runtime_scope(repo_root, platform_input, platform)
543
- state = _normalized_state(scope["context"].get(STATE_KEY))
544
- if state is None or state["stage"] != "spec":
545
- raise UntrackedFlowError("stage-mismatch", "只有 spec 阶段可以记录 Update-Spec")
546
- current = _ensure_workspace_matches(repo_root, state)
547
- now = _utc_now()
548
- state["evidence"]["updateSpec"] = {
549
- "result": result,
550
- "summary": summary.strip(),
551
- "fingerprint": current["fingerprint"],
552
- "recordedAt": now,
553
- }
554
- state["updatedAt"] = now
555
- _persist(scope, state)
556
- return {"status": "recorded", **_state_summary(state)}
557
-
558
-
559
285
  def read_untracked_state(
560
286
  repo_root: Path,
561
287
  platform_input: dict[str, Any] | None = None,
562
288
  platform: str | None = None,
563
289
  *,
564
290
  allow_active_task: bool = False,
565
- validate_workspace: bool = True,
291
+ validate_workspace: bool | None = None,
566
292
  ) -> dict[str, Any]:
567
- """读取并校验当前 session 的 untracked 状态。
293
+ """读取当前 session 的 untracked 流程游标。
568
294
 
569
295
  Args:
570
296
  repo_root: Trellis 项目根目录。
571
297
  platform_input: 可选平台 hook 输入。
572
298
  platform: 可选平台名称。
573
299
  allow_active_task: 是否允许 session 同时已有 task,供 adoption 清理使用。
574
- validate_workspace: 是否校验已稳定阶段的 workspace fingerprint。
300
+ validate_workspace: 兼容旧调用方的废弃参数;不再读取或校验 Git workspace。
575
301
 
576
302
  Returns:
577
303
  ``hit`` 或 ``miss`` 的结构化状态。
578
304
  """
305
+ del validate_workspace
579
306
  scope = _runtime_scope(
580
307
  repo_root,
581
308
  platform_input,
@@ -588,23 +315,6 @@ def read_untracked_state(
588
315
  state = _normalized_state(raw)
589
316
  if state is None:
590
317
  raise UntrackedFlowError("invalid-state", "当前 session 的无任务状态已损坏")
591
- if validate_workspace and isinstance(state.get("baseline"), dict):
592
- current = _capture(repo_root)
593
- if _baseline_restored(state, current):
594
- _persist(scope, None)
595
- return {
596
- "status": "miss",
597
- "reason": "baseline-restored",
598
- "contextKey": scope["context_key"],
599
- }
600
- if validate_workspace and state["stage"] in {"check", "spec", "push"}:
601
- _ensure_workspace_matches(repo_root, state)
602
- if (
603
- validate_workspace
604
- and state["stage"] == "implement"
605
- and isinstance(state.get("evidence", {}).get("focusedValidation"), dict)
606
- ):
607
- _ensure_workspace_matches(repo_root, state)
608
318
  return {
609
319
  "status": "hit",
610
320
  **_state_summary(state),
@@ -627,7 +337,7 @@ def clear_untracked_state(
627
337
 
628
338
  Args:
629
339
  repo_root: Trellis 项目根目录。
630
- reason: 完成、放弃、纳管、恢复 baseline 或失效原因。
340
+ reason: 完成、放弃或纳管原因。
631
341
  platform_input: 可选平台 hook 输入。
632
342
  platform: 可选平台名称。
633
343
  work_id: 可选的精确事项 ID 防误清。
@@ -679,12 +389,7 @@ def session_start_hint(
679
389
  命中时返回一行提示,否则返回 None。
680
390
  """
681
391
  try:
682
- result = read_untracked_state(
683
- repo_root,
684
- platform_input,
685
- platform,
686
- validate_workspace=False,
687
- )
392
+ result = read_untracked_state(repo_root, platform_input, platform)
688
393
  except UntrackedFlowError:
689
394
  return None
690
395
  if result.get("status") != "hit":
@@ -711,30 +416,15 @@ def build_parser() -> argparse.ArgumentParser:
711
416
  Returns:
712
417
  已配置全部状态命令的 parser。
713
418
  """
714
- parser = argparse.ArgumentParser(description="Trellis untracked workflow state helper")
419
+ parser = argparse.ArgumentParser(description="Trellis untracked workflow cursor helper")
715
420
  subparsers = parser.add_subparsers(dest="command", required=True)
716
421
 
717
422
  begin_parser = subparsers.add_parser("begin", help="create one untracked work item")
718
423
  begin_parser.add_argument("--summary", required=True)
719
424
  begin_parser.add_argument("--source", choices=sorted(VALID_SOURCES), required=True)
720
425
 
721
- prepare_parser = subparsers.add_parser("prepare-edit", help="capture baseline before editing")
722
- prepare_parser.add_argument("--paths", nargs="+", required=True)
723
-
724
- validation_parser = subparsers.add_parser("record-validation", help="record focused validation")
725
- validation_parser.add_argument("--result", choices=sorted(VALIDATION_RESULTS), required=True)
726
- validation_parser.add_argument("--summary", default="")
727
-
728
- advance_parser = subparsers.add_parser("advance", help="advance workflow stage")
729
- advance_parser.add_argument("--stage", choices=["check", "spec", "push"], required=True)
730
-
731
- check_parser = subparsers.add_parser("record-check", help="record Check-All result")
732
- check_parser.add_argument("--result", choices=sorted(CHECK_RESULTS), required=True)
733
- check_parser.add_argument("--summary", default="")
734
-
735
- spec_parser = subparsers.add_parser("record-spec", help="record Update-Spec result")
736
- spec_parser.add_argument("--result", choices=sorted(SPEC_RESULTS), required=True)
737
- spec_parser.add_argument("--summary", default="")
426
+ advance_parser = subparsers.add_parser("advance", help="set workflow stage cursor")
427
+ advance_parser.add_argument("--stage", choices=sorted(VALID_STAGES), required=True)
738
428
 
739
429
  status_parser = subparsers.add_parser("status", help="read current untracked work state")
740
430
  status_parser.add_argument("--verbose", action="store_true")
@@ -763,16 +453,8 @@ def main(argv: list[str] | None = None) -> int:
763
453
  try:
764
454
  if args.command == "begin":
765
455
  payload = begin_untracked_work(repo_root, args.summary, args.source)
766
- elif args.command == "prepare-edit":
767
- payload = prepare_edit(repo_root, args.paths)
768
- elif args.command == "record-validation":
769
- payload = record_validation(repo_root, args.result, args.summary)
770
456
  elif args.command == "advance":
771
457
  payload = advance_stage(repo_root, args.stage)
772
- elif args.command == "record-check":
773
- payload = record_check(repo_root, args.result, args.summary)
774
- elif args.command == "record-spec":
775
- payload = record_spec(repo_root, args.result, args.summary)
776
458
  elif args.command == "status":
777
459
  payload = read_untracked_state(repo_root)
778
460
  elif args.command == "session-start-hint":
@@ -1,7 +1,7 @@
1
1
  {
2
- "syncedAt": "2026-08-03T06:45:30.193Z",
2
+ "syncedAt": "2026-08-03T13:49:40.703Z",
3
3
  "syncedFrom": "vendor/skill-garden",
4
- "sourceCommit": "b13cc63622af845aa482d02832dac2bec0b35b2a",
4
+ "sourceCommit": "99505703777997be615cecb2e950fbd766398bc9",
5
5
  "common": {
6
6
  "codexSkills": [
7
7
  "aliyun-sls-query",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.6.0-beta.0",
3
+ "version": "0.6.0-beta.1",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -68,9 +68,9 @@
68
68
  "commit-and-tag-version": "^12.7.3"
69
69
  },
70
70
  "flowerReleaseNotes": {
71
- "version": "0.6.0-beta.0",
71
+ "version": "0.6.0-beta.1",
72
72
  "source": "CHANGELOG.md",
73
- "body": "### ✨ 新功能 Features\n\n* 升级 Patch Engine 适配 Trellis 0.6.12 ([3b1a32e](https://github.com/SilentFlower/flower-trellis/commit/3b1a32e1bdf6d532b467e786df5c0c5ff69e6f85))\n\n\n### 🐛 修复 Bug Fixes\n\n* 同步 Trellis 0.6.12 工作流修复 ([239ce16](https://github.com/SilentFlower/flower-trellis/commit/239ce1688d8d13af6cef2bfe64a5d8d1b5226136))\n* 完善 Trellis 0.6.12 升级与平台适配 ([aefda43](https://github.com/SilentFlower/flower-trellis/commit/aefda431e4af59e15afbad4d98a598522b7916bc))",
73
+ "body": "### 🐛 修复 Bug Fixes\n\n* 同步简化 untracked 流程与 Push 路由 ([26ce73a](https://github.com/SilentFlower/flower-trellis/commit/26ce73a0a9a5dbcc3b8a623ca08b062a54a1e810))",
74
74
  "truncated": false
75
75
  },
76
76
  "optionalDependencies": {
@@ -49,9 +49,7 @@ const SCRIPT_ALIASES = Object.freeze({
49
49
  task_intent: ["task-intent", "intent-routing", "workflow-enhancement"],
50
50
  git_evidence: [
51
51
  "git-evidence", "workflow-enhancement", "task-intent", "intent-routing",
52
- "auto-loop", "auto-loop-runner", "trellis-auto-loop", "trellis-route", "route",
53
- "trellis-check-all", "check-all", "trellis-update-spec", "update-spec",
54
- "trellis-push", "push",
52
+ "auto-loop", "auto-loop-runner", "trellis-auto-loop",
55
53
  ],
56
54
  untracked_flow: [
57
55
  "untracked-flow", "workflow-enhancement", "task-intent", "intent-routing",
@@ -70,14 +70,6 @@ export function copyScriptAssets(target, variantDir, skills = []) {
70
70
  "auto-loop",
71
71
  "auto-loop-runner",
72
72
  "trellis-auto-loop",
73
- "trellis-route",
74
- "route",
75
- "trellis-check-all",
76
- "check-all",
77
- "trellis-update-spec",
78
- "update-spec",
79
- "trellis-push",
80
- "push",
81
73
  ];
82
74
  } else if (name === "untracked_flow") {
83
75
  aliases = [