flower-trellis 0.4.11 → 0.4.12-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.
- package/README.md +4 -0
- package/enhancements/0.6/.agents/skills/trellis-auto-loop/SKILL.md +24 -11
- package/enhancements/0.6/.agents/skills/trellis-check-all/SKILL.md +15 -0
- package/enhancements/0.6/.agents/skills/trellis-push/SKILL.md +136 -381
- package/enhancements/0.6/.agents/skills/trellis-release/SKILL.md +95 -3
- package/enhancements/0.6/.claude/skills/trellis-auto-loop/SKILL.md +24 -11
- package/enhancements/0.6/.claude/skills/trellis-check-all/SKILL.md +15 -0
- package/enhancements/0.6/.claude/skills/trellis-push/SKILL.md +136 -381
- package/enhancements/0.6/.claude/skills/trellis-release/SKILL.md +95 -3
- package/enhancements/0.6/overrides/skills/trellis-finish-work.md +57 -50
- package/enhancements/0.6/overrides/workflow-states/in_progress-inline.md +5 -4
- package/enhancements/0.6/overrides/workflow-states/in_progress.md +5 -4
- package/enhancements/0.6/overrides/workflow-states/no_task.md +1 -1
- package/enhancements/0.6/overrides/workflow.md +23 -11
- package/enhancements/0.6/scripts/{push_snapshot.py → task_progress.py} +128 -117
- package/enhancements/MANIFEST.json +7 -4
- package/package.json +3 -3
- package/src/lib/apply-enhancements.js +18 -1
- package/src/lib/copy-scripts.js +9 -2
- package/src/lib/skill-catalog.js +115 -13
package/README.md
CHANGED
|
@@ -224,6 +224,10 @@ flower banner → 平台多选菜单 → Trellis 原生交互(模板 / monorepo
|
|
|
224
224
|
npm i -g flower-trellis@latest && flower-trellis update
|
|
225
225
|
```
|
|
226
226
|
|
|
227
|
+
- **通用技能**:`flower-trellis update` 会用新版快照覆盖仓库中已经启用的 common skill,
|
|
228
|
+
未启用项不会自动安装;若某个已安装 common skill 已从新版快照移除,更新会精确删除其
|
|
229
|
+
`.codex/skills` / `.claude/skills` 或历史 `.agents/skills` 副本。
|
|
230
|
+
|
|
227
231
|
## 开发
|
|
228
232
|
|
|
229
233
|
skill-garden 强化包源以 **git submodule** 形式挂在 `vendor/skill-garden`,克隆时需一并拉取:
|
|
@@ -15,11 +15,12 @@ description: "启动、恢复和推进 Trellis 自动任务循环。用于用户
|
|
|
15
15
|
- run 进入 `blocked` 后不要用 `start --force` 新建 run 来纠正参数;先补齐缺失 route/context,然后用 `retry-blocked` 在同一个 run 内恢复。
|
|
16
16
|
- runner 默认输出是紧凑 JSON,只包含当前 action、队列计数、简短 blocked/pending/completed 列表和最近少量决策摘要;排障时才给 `status` / `resume` / `next` / `record` / `retry-blocked` 加 `--verbose` 读取完整 item、blocked detail 和 decision data。
|
|
17
17
|
- 默认 profile 是 `commit-only`:自动推进到本地 commit,不 push、不发布、不归档。
|
|
18
|
+
- 普通 `trellis-push` 默认 commit + push 不改变 auto-loop 的授权边界;auto-loop 始终只走专用 commit-only 预授权,不得因普通流程文案而推送远端。
|
|
18
19
|
- 多任务只按用户显式给出的任务顺序执行;同一 worktree 不并发。
|
|
19
20
|
- 启动 runner 前先完成 route 准备度判断:已有当前任务 runtime route 决策或个人 `.trellis/.route-prefs.tmp` 时可启动;没有时先进入 `trellis-route` 正常询问 / fallback,写入真实决策后再启动。
|
|
20
21
|
- auto-loop 不默认写 `route_authorization`;只有用户本次明确给出的临时 route 策略,才能通过 `--route-implement` / `--route-check` 传给 runner,且不能当成模型真实执行结果。
|
|
21
22
|
- auto-loop 启动前若 implement 与 check 都缺 route,优先展示 auto-loop 专用的合并选择,不要把 `trellis-route` 的两套完整 fallback 原样贴给用户。仍允许用户回复高级格式 `implement 1, check 1`。
|
|
22
|
-
-
|
|
23
|
+
- 代码提交必须复用 `trellis-push` 的内部 commit-only 执行能力;auto-loop 自己负责预授权校验和 runner 回写,不要裸 `git commit` / `git push`。
|
|
23
24
|
|
|
24
25
|
## 启动
|
|
25
26
|
|
|
@@ -108,7 +109,7 @@ python3 ./.trellis/scripts/auto_loop.py next
|
|
|
108
109
|
| `run_fix` | 根据 `last_failure` 修复,复用当前任务 implement route | `record --action run_fix --result ok --route-mode <mode> --route-source <source>` |
|
|
109
110
|
| `run_recheck` | 复用当前任务 check route,重新 check-all | `record --action run_recheck --result ok --route-mode <mode> --route-source <source>` |
|
|
110
111
|
| `run_spec_update` | 有代码/测试证据时用 `trellis-update-spec`;无必要更新也 record ok | `record --action run_spec_update --result ok` |
|
|
111
|
-
| `commit_only` |
|
|
112
|
+
| `commit_only` | 校验本 run 的预授权与文件归属,再把 exact files/message 交给 `trellis-push` 内部 commit-only 执行 | auto-loop 执行 `record --action commit_only --result ok --commit <hash>` |
|
|
112
113
|
|
|
113
114
|
失败时写回:
|
|
114
115
|
|
|
@@ -141,18 +142,30 @@ route action 成功回写时必须带上 `trellis-route` 输出里的真实 `mod
|
|
|
141
142
|
|
|
142
143
|
## Commit-Only 预授权
|
|
143
144
|
|
|
144
|
-
auto-loop 的 `commit-only` profile 是用户对“当前 run
|
|
145
|
+
auto-loop 的 `commit-only` profile 是用户对“当前 run 内任务相关本地提交”的一次性预授权。预授权判断和 runner 状态写回全部由本 skill 负责,不能下放给 `trellis-push`。
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
- profile 是 `commit-only`。
|
|
148
|
-
- 模式是 commit-only,不 push、不 merge、不发布、不归档。
|
|
149
|
-
- AI 已基于当前任务 artifacts、`git status`、`git diff` 和必要的文件内容生成提交计划,并能说明每个 planned file 为什么属于当前任务。
|
|
150
|
-
- 提交计划只包含当前任务可归属文件;未识别 dirty 文件保留未提交并写入结果摘要。
|
|
151
|
-
- 执行前复核 git 状态仍与计划一致。
|
|
147
|
+
收到 `commit_only` action 后,按顺序执行:
|
|
152
148
|
|
|
153
|
-
|
|
149
|
+
1. 读取 `auto_loop.py status`,确认 `run_status=running`、profile 为 `commit-only`,且 `outstanding_action.action/task` 与本次 action 和活动任务一致。
|
|
150
|
+
2. 读取当前任务 artifacts、`git status`、`git diff` 和必要文件内容,由 AI 生成 exact files、commit message 与逐文件归属理由。
|
|
151
|
+
3. 确认 staged 区为空、没有冲突或未完成的 Git 集成状态,所有 planned files 均属于当前任务,且不包含 `.trellis/.runtime/`、`.trellis/.route-prefs.tmp`、其他任务目录或未解释文件。
|
|
152
|
+
4. 调用 `trellis-push` 内部 commit-only,只传 exact files 与 message。该调用只执行精确本地提交,不读取 auto-loop 状态、不 push、不写任务进度。
|
|
153
|
+
5. 提交成功后,本 skill 执行:
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
```bash
|
|
156
|
+
python3 ./.trellis/scripts/auto_loop.py record \
|
|
157
|
+
--action commit_only \
|
|
158
|
+
--result ok \
|
|
159
|
+
--commit <hash> \
|
|
160
|
+
--files <exact files> \
|
|
161
|
+
--commit-message "<message>"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
6. `record` 成功后立即再次调用 `next`。
|
|
165
|
+
|
|
166
|
+
如果预检或内部提交失败,由本 skill 使用匹配的 action 写回 `failed` 或 `blocked`,并保留未识别 dirty 文件。不要用时间差或 dirty baseline 猜测文件归属。普通 dirty 文件不自动纳入提交;未识别 staged 文件、冲突、远端推送、上线/归档动作、真实外部系统或生产数据效果都必须阻止本次 commit-only。
|
|
167
|
+
|
|
168
|
+
`trellis-push` 在这个路径中只是精确提交执行器,不得自行调用 `status`、`record` 或决定队列项是 blocked/skipped。当前 item 失败后的继续、跳过或停止仍由 runner 的既有预算和 `next` 结果决定。
|
|
156
169
|
|
|
157
170
|
## 状态与停止
|
|
158
171
|
|
|
@@ -298,6 +298,20 @@ git log --oneline -10
|
|
|
298
298
|
|
|
299
299
|
---
|
|
300
300
|
|
|
301
|
+
## Post-check 停止边界
|
|
302
|
+
|
|
303
|
+
汇总报告输出后立即停止,等待用户继续。普通流程的本轮输出只允许包含:
|
|
304
|
+
|
|
305
|
+
- 各检查维度的状态与问题数
|
|
306
|
+
- 已执行的验证命令和结果
|
|
307
|
+
- 未覆盖的环境验证或剩余风险
|
|
308
|
+
- 总体结论
|
|
309
|
+
- 下一步指向现有 Phase 3.3,再到 Phase 3.4 `trellis-push`
|
|
310
|
+
|
|
311
|
+
本轮禁止出现 commit message、`Proposed commits`、拟提交/暂存文件、commit-only 决策或“回复 `ok` 执行提交”。这些内容属于后续 Phase 3.4,并且只能由 `trellis-push` 生成。运行中的 auto-loop 仍按 runner 的 `record` + `next` 规则继续,不受普通 post-check stop 影响。
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
301
315
|
## 修复问题(需用户确认)
|
|
302
316
|
|
|
303
317
|
如果发现问题,**先展示报告,获得用户确认后再修复**。
|
|
@@ -340,3 +354,4 @@ git log --oneline -10
|
|
|
340
354
|
- ❌ 委派给子 agent 跑各 Step(见执行模式段)
|
|
341
355
|
- ❌ Complex 任务下只对照 PRD,忽略 `design.md` / `implement.md`(三层都要查)
|
|
342
356
|
- ❌ 把 `implement.md` 的 validation commands 真跑算到 Step 1(Step 1 是静态对照;真跑归 Step 3 或用户执行)
|
|
357
|
+
- ❌ 汇总报告后自行草拟 commit message / `Proposed commits` / 文件提交计划,或要求用户回复 `ok` 提交
|