flower-trellis 0.2.1 → 0.2.3
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 +43 -2
- package/enhancements/0.6/.agents/skills/trellis-push/SKILL.md +5 -0
- package/enhancements/0.6/.claude/skills/trellis-push/SKILL.md +5 -0
- package/enhancements/0.6/overrides/workflow-states/in_progress-inline.md +1 -0
- package/enhancements/0.6/overrides/workflow-states/in_progress.md +1 -0
- package/enhancements/0.6/overrides/workflow.md +8 -11
- package/enhancements/MANIFEST.json +3 -3
- package/package.json +16 -3
package/README.md
CHANGED
|
@@ -108,16 +108,57 @@ flower banner → 平台多选菜单 → Trellis 原生交互(模板 / monorepo
|
|
|
108
108
|
|
|
109
109
|
## 开发
|
|
110
110
|
|
|
111
|
+
skill-garden 强化包源以 **git submodule** 形式挂在 `vendor/skill-garden`,克隆时需一并拉取:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 首次克隆(连同 submodule)
|
|
115
|
+
git clone --recurse-submodules https://github.com/SilentFlower/flower-trellis.git
|
|
116
|
+
|
|
117
|
+
# 已普通克隆过、vendor/skill-garden 为空时补拉
|
|
118
|
+
git submodule update --init --recursive
|
|
119
|
+
```
|
|
120
|
+
|
|
111
121
|
```bash
|
|
112
122
|
npm install # 安装依赖
|
|
113
|
-
npm run sync # 从 skill-garden 同步强化包快照到 enhancements/
|
|
123
|
+
npm run sync # 从 vendor/skill-garden 同步强化包快照到 enhancements/
|
|
114
124
|
node bin/flower-trellis.js init -u you --target /tmp/test-project # 本地试跑(勿在本仓库根直接 init)
|
|
115
125
|
```
|
|
116
126
|
|
|
117
|
-
|
|
127
|
+
> `npm run sync` 默认从 submodule `vendor/skill-garden` 读取;可用环境变量 `SKILL_GARDEN_DIR=/path/to/skill-garden` 覆盖到外部副本(旧布局逃生通道)。
|
|
128
|
+
|
|
129
|
+
**更新强化包**(skill-garden 有新提交时,先动 pin 再重建快照):
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
cd vendor/skill-garden && git fetch && git checkout origin/main && cd ../..
|
|
133
|
+
git add vendor/skill-garden # 登记新的 submodule pin
|
|
134
|
+
npm run sync # 重建 enhancements/ 快照(sourceCommit 跟随新 pin)
|
|
135
|
+
git add enhancements && git commit -m "chore: 更新强化包快照到 <sha>"
|
|
136
|
+
```
|
|
118
137
|
|
|
119
138
|
> **维护约束**:`workflow.md` 的旧块清理依赖 `src/lib/workflow-inject.js` 中硬编码的 sentinel 名单。修改现有块的内容无需改动名单;但当 skill-garden **新增一种 workflow 块类型**(新的 `BEGIN/END` 名)时,必须同步更新该名单,否则旧块无法被清除。
|
|
120
139
|
|
|
140
|
+
## 发布
|
|
141
|
+
|
|
142
|
+
采用「本地把关 + CI 发布」的混合流程,版本更新内容以 `CHANGELOG.md`(由 Conventional Commits 自动生成)为唯一来源:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# 1) 本地:按约定式提交自动定版本号 + 写 CHANGELOG + 打 tag(不 push、不 publish)
|
|
146
|
+
npm run release # = check-snapshot(校验快照一致)+ commit-and-tag-version
|
|
147
|
+
npm run release:dry # 仅预览版本号与 CHANGELOG,不落盘
|
|
148
|
+
|
|
149
|
+
# 2) 检查 CHANGELOG / package.json 版本 diff,确认无误后连 tag 一起推送
|
|
150
|
+
git push --follow-tags origin main
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
推送 `vX.Y.Z` tag 后,GitHub Actions(`.github/workflows/release.yml`)自动完成:
|
|
154
|
+
|
|
155
|
+
- **`npm publish`** —— 经 npm **OIDC Trusted Publishing** 发布,自动带 provenance 来源证明,**无需** `NPM_TOKEN`。
|
|
156
|
+
- **`gh release create`** —— 创建 GitHub Release,notes 取自 `CHANGELOG.md` 对应版本段(与 CHANGELOG 同源)。
|
|
157
|
+
|
|
158
|
+
> **一次性前置**:首次发布前需在 [npmjs.com](https://www.npmjs.com) 的本包设置里配置 **Trusted Publisher**,绑定 `SilentFlower/flower-trellis` 仓库与 `release.yml`,否则 OIDC 发布会失败。
|
|
159
|
+
>
|
|
160
|
+
> **发布前自检**:`npm run release` 会先跑 `scripts/check-snapshot.mjs`,确保 `enhancements/` 快照与 `vendor/skill-garden` 当前 pin 一致且已提交,杜绝发布陈旧快照。
|
|
161
|
+
|
|
121
162
|
## 相关项目
|
|
122
163
|
|
|
123
164
|
| 项目 | 作用 |
|
|
@@ -72,6 +72,8 @@ git status --short
|
|
|
72
72
|
|
|
73
73
|
对每个有变更的仓库,依次执行以下操作:
|
|
74
74
|
|
|
75
|
+
> **commit-only 模式**(调用方传入「只提交不推」/「commit-only」语义,如 Trellis Phase 3.4「commit now, push later」):只执行 2.1 展示 → 2.2 暂存确认 → 2.3 commit,**跳过 2.4 push 与 2.5 merge**。Step 3 快照、Step 4 结果照常,结果中标注「本地已提交、未推送,后续仍走 trellis-push 推」。
|
|
76
|
+
|
|
75
77
|
#### 2.1 展示变更摘要
|
|
76
78
|
|
|
77
79
|
```bash
|
|
@@ -105,6 +107,8 @@ git commit -m "<type>(<scope>): <description>"
|
|
|
105
107
|
|
|
106
108
|
#### 2.4 Push 当前分支
|
|
107
109
|
|
|
110
|
+
> **commit-only 模式:跳过 2.4 与 2.5**,直接进 Step 3。
|
|
111
|
+
|
|
108
112
|
```bash
|
|
109
113
|
git push origin <current_branch>
|
|
110
114
|
```
|
|
@@ -291,6 +295,7 @@ git remote -v | grep -E "^origin\s+"
|
|
|
291
295
|
| 语义 | 说明 | 用户怎么说 |
|
|
292
296
|
|------|------|-----------|
|
|
293
297
|
| 默认 | 自动检测所有有变更的仓库并处理 | `/trellis-push` |
|
|
298
|
+
| commit-only | 只 commit 不 push(Phase 3.4「commit now, push later」),跳过 2.4/2.5 | 「只提交不推」/「commit-only」 |
|
|
294
299
|
| 指定仓库 | 只处理指定仓库 | 「只 push 前端」/「push frontend」 |
|
|
295
300
|
| 重新配置 | 重新询问目标分支 | 「重新配置 push 目标分支」/「reconfigure push」 |
|
|
296
301
|
| 临时目标 | 临时指定目标分支(不修改配置) | 「push 到 hotfix 分支」 |
|
|
@@ -72,6 +72,8 @@ git status --short
|
|
|
72
72
|
|
|
73
73
|
对每个有变更的仓库,依次执行以下操作:
|
|
74
74
|
|
|
75
|
+
> **commit-only 模式**(调用方传入「只提交不推」/「commit-only」语义,如 Trellis Phase 3.4「commit now, push later」):只执行 2.1 展示 → 2.2 暂存确认 → 2.3 commit,**跳过 2.4 push 与 2.5 merge**。Step 3 快照、Step 4 结果照常,结果中标注「本地已提交、未推送,后续仍走 trellis-push 推」。
|
|
76
|
+
|
|
75
77
|
#### 2.1 展示变更摘要
|
|
76
78
|
|
|
77
79
|
```bash
|
|
@@ -105,6 +107,8 @@ git commit -m "<type>(<scope>): <description>"
|
|
|
105
107
|
|
|
106
108
|
#### 2.4 Push 当前分支
|
|
107
109
|
|
|
110
|
+
> **commit-only 模式:跳过 2.4 与 2.5**,直接进 Step 3。
|
|
111
|
+
|
|
108
112
|
```bash
|
|
109
113
|
git push origin <current_branch>
|
|
110
114
|
```
|
|
@@ -291,6 +295,7 @@ git remote -v | grep -E "^origin\s+"
|
|
|
291
295
|
| 语义 | 说明 | 用户怎么说 |
|
|
292
296
|
|------|------|-----------|
|
|
293
297
|
| 默认 | 自动检测所有有变更的仓库并处理 | `/trellis-push` |
|
|
298
|
+
| commit-only | 只 commit 不 push(Phase 3.4「commit now, push later」),跳过 2.4/2.5 | 「只提交不推」/「commit-only」 |
|
|
294
299
|
| 指定仓库 | 只处理指定仓库 | 「只 push 前端」/「push frontend」 |
|
|
295
300
|
| 重新配置 | 重新询问目标分支 | 「重新配置 push 目标分支」/「reconfigure push」 |
|
|
296
301
|
| 临时目标 | 临时指定目标分支(不修改配置) | 「push 到 hotfix 分支」 |
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!-- BEGIN skill-garden workflow-state in_progress_inline v0.6 -->
|
|
2
2
|
HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (in_progress-inline):
|
|
3
3
|
Inline mode means the main session edits directly, but check still routes before `trellis-check` / `trellis-check-all`.
|
|
4
|
+
At Phase 3.4, code commit/push still goes through `trellis-push` (commit-only for commit-without-push); never bare `git commit`/`git push` on code (hub: Code Commit Confirmation Gate).
|
|
4
5
|
If active task.json has `last_push_snapshot`, relay `partial_step` + `next_step` once before starting new work.
|
|
5
6
|
<!-- END skill-garden workflow-state in_progress_inline v0.6 -->
|
|
@@ -3,5 +3,6 @@ HIGHEST PRIORITY SKILL-GARDEN STATE GUARD (in_progress):
|
|
|
3
3
|
At Phase 2.1/2.2/3.1, invoke `trellis-route(implement|check)` first, including every check / check-all path.
|
|
4
4
|
Do not spawn `trellis-implement`, `trellis-check`, or `trellis-check-all` directly unless `trellis-route` just selected subagent mode.
|
|
5
5
|
If routing helper is unavailable, ask the same numbered route choices in normal chat and wait for the user's selection.
|
|
6
|
+
At Phase 3.4, code commit/push goes through `trellis-push` (commit-only mode for commit-without-push); never bare `git commit`/`git push` on code (hub: Code Commit Confirmation Gate).
|
|
6
7
|
If active task.json has `last_push_snapshot`, relay `partial_step` + `next_step` once before starting new work.
|
|
7
8
|
<!-- END skill-garden workflow-state in_progress v0.6 -->
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Priority**: This hub overrides any conflicting Trellis workflow, skill, or command text for the scoped behaviors below.
|
|
8
8
|
|
|
9
|
-
**Scope**: Phase 2.1 / 2.2 / 3.1 dispatch routing, Phase 3.5 finish-work bookkeeping, and push-progress recovery / snapshot reminders. State blocks should keep only one short skill-garden sentinel per state; long-form rules live here.
|
|
9
|
+
**Scope**: Phase 2.1 / 2.2 / 3.1 dispatch routing, Phase 3.4 code-commit/push via trellis-push, Phase 3.5 finish-work bookkeeping, and push-progress recovery / snapshot reminders. State blocks should keep only one short skill-garden sentinel per state; long-form rules live here.
|
|
10
10
|
|
|
11
11
|
**Mechanical rule**: use this hub as the source of truth. Do not add separate top-level skill-garden override sections or multiple skill-garden sentinels inside the same `workflow-state:*` block.
|
|
12
12
|
|
|
@@ -27,22 +27,19 @@ At phase boundaries, do not ask meta continuation questions such as "continue?",
|
|
|
27
27
|
|
|
28
28
|
Check routing has no 4h preference file. Before `trellis-check`, `trellis-check-all`, or either check sub-agent, route every time so the user can choose check-all vs lightweight and inline vs subagent.
|
|
29
29
|
|
|
30
|
-
####
|
|
30
|
+
#### Code Commit Confirmation Gate
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Every code commit — and its push — belongs to Phase 3.4 and MUST go through `trellis-push`, mirroring how implement/check must go through `trellis-route`. From the main session the agent never runs bare `git commit` / `git push` on code to bypass it.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
`trellis-push` IS the confirmation mechanism: its Step 2.2 stages only an explicit, user-approved file list (never `git add -A` / `git add .`); its Step 2.3 shows the drafted commit message for approval. "Confirmed" means the user saw that concrete file list + message inside `trellis-push` and approved it. A preference-style choice does NOT count — e.g. an `AskUserQuestion` "split / single commit" option only picks a strategy, and an option label/description never substitutes for the real file-list + message display.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
For Phase 3.4 "commit now, push later", invoke `trellis-push` in commit-only mode (commit without pushing); the later push also goes through `trellis-push`.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
This gate is independent of `session_auto_commit`: that switch never authorizes a code commit and never waives going through `trellis-push`. The only bare-`git` commits allowed are the two bookkeeping scripts below, which manage their own `.trellis/**` files.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
- Running `python3 ./.trellis/scripts/add_session.py ...` may write workspace journal/index files, but must not be described as producing a `chore: record journal` commit.
|
|
42
|
-
- Do not run a compensating `git add` / `git commit` for `.trellis/tasks/**` or `.trellis/workspace/**` just because those scripts skipped auto-commit.
|
|
43
|
-
- Report the resulting `.trellis/tasks/**` and `.trellis/workspace/**` dirty paths to the user as bookkeeping changes for manual review.
|
|
40
|
+
#### Bookkeeping Auto-commit Scope
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
`session_auto_commit` only governs the bookkeeping commits `task.py archive` / `add_session.py` make for their own `.trellis/tasks/**` and `.trellis/workspace/**` files — never code (gated above). When `false`, those archive/journal writes stay disk-only (no compensating `git commit`).
|
|
46
43
|
|
|
47
44
|
#### Push Progress Recovery / Snapshot
|
|
48
45
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"syncedAt": "2026-06-
|
|
3
|
-
"syncedFrom": "/
|
|
4
|
-
"sourceCommit": "
|
|
2
|
+
"syncedAt": "2026-06-08T18:22:30.404Z",
|
|
3
|
+
"syncedFrom": "vendor/skill-garden/.trellis",
|
|
4
|
+
"sourceCommit": "ec0ab7e2dd90b6cfdd86fb7a005610e245c36d40",
|
|
5
5
|
"variants": {
|
|
6
6
|
"old": {
|
|
7
7
|
"claudeSkills": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flower-trellis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
28
|
"sync": "node scripts/sync-enhancements.mjs",
|
|
29
|
-
"prepublishOnly": "node scripts/sync-enhancements.mjs"
|
|
29
|
+
"prepublishOnly": "node scripts/sync-enhancements.mjs",
|
|
30
|
+
"release": "node scripts/check-snapshot.mjs && commit-and-tag-version",
|
|
31
|
+
"release:dry": "commit-and-tag-version --dry-run"
|
|
30
32
|
},
|
|
31
33
|
"keywords": [
|
|
32
34
|
"trellis",
|
|
@@ -36,5 +38,16 @@
|
|
|
36
38
|
"claude",
|
|
37
39
|
"cli"
|
|
38
40
|
],
|
|
39
|
-
"
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/SilentFlower/flower-trellis.git"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/SilentFlower/flower-trellis/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/SilentFlower/flower-trellis#readme",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"commit-and-tag-version": "^12.7.3"
|
|
52
|
+
}
|
|
40
53
|
}
|