flower-trellis 0.6.12-beta.6 → 0.6.13-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.
- package/enhancements/0.6/overrides/bundles/shared-hook-runtime.json +5 -1
- package/enhancements/0.6/overrides/conflicts.json +2 -2
- package/enhancements/0.6/overrides/patches/hooks/inject-workflow-state/shared-runtime/main-content.py +9 -0
- package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/patch.json +38 -0
- package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/spec-count-content.py +1 -0
- package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/spec-count-selector.py +2 -0
- package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/spec-discovery-content.py +9 -0
- package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/spec-discovery-selector.py +5 -0
- package/enhancements/0.6/overrides/patches/scripts/context-output-cleanup/patch.json +19 -0
- package/enhancements/0.6/overrides/patches/scripts/context-output-cleanup/phase-index-content.py +9 -0
- package/enhancements/0.6/overrides/patches/scripts/context-output-cleanup/phase-index-selector.py +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/customization-principles-content.md +1 -1
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/skill-taxonomy-content.md +1 -1
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/system-model-content.md +1 -1
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/template-hashes-content.md +1 -1
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/customization-order-content.md +1 -1
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/skill-edit-route-content.md +1 -1
- package/enhancements/MANIFEST.json +9 -2
- package/package.json +3 -3
- package/src/assets/flower_session_start.py +7 -0
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
"id": "shared-hook-runtime",
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"installMode": "full-only",
|
|
6
|
-
"patches": [
|
|
6
|
+
"patches": [
|
|
7
|
+
"hooks/inject-workflow-state/shared-runtime",
|
|
8
|
+
"scripts/windows-streams",
|
|
9
|
+
"scripts/context-output-cleanup"
|
|
10
|
+
]
|
|
7
11
|
}
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
"type": "required-literal",
|
|
798
798
|
"values": [
|
|
799
799
|
"<!-- BEGIN skill-garden patch trellis-meta-managed-template-hashes v0.6 -->\n## Meaning Of Template Hashes",
|
|
800
|
-
"Plugin ownership, Patch
|
|
800
|
+
"Plugin ownership, Patch application records, transaction checks",
|
|
801
801
|
"<!-- BEGIN skill-garden patch trellis-meta-managed-file-boundaries v0.6 -->\n## Local Customization Boundaries",
|
|
802
802
|
"| Skill-Garden managed |"
|
|
803
803
|
]
|
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
"type": "required-literal",
|
|
818
818
|
"values": [
|
|
819
819
|
"<!-- BEGIN skill-garden patch trellis-meta-managed-template-hashes v0.6 -->\n## Meaning Of Template Hashes",
|
|
820
|
-
"Plugin ownership, Patch
|
|
820
|
+
"Plugin ownership, Patch application records, transaction checks",
|
|
821
821
|
"<!-- BEGIN skill-garden patch trellis-meta-managed-file-boundaries v0.6 -->\n## Local Customization Boundaries",
|
|
822
822
|
"| Skill-Garden managed |"
|
|
823
823
|
]
|
|
@@ -89,6 +89,15 @@ def main() -> int:
|
|
|
89
89
|
if breadcrumb is None:
|
|
90
90
|
return 0
|
|
91
91
|
|
|
92
|
+
if platform in CONDITIONAL_WORKFLOW_STATE_PLATFORMS and not force_refresh:
|
|
93
|
+
# Keep the source and tracker fingerprint intact; clean only the emitted copy.
|
|
94
|
+
breadcrumb = re.sub(
|
|
95
|
+
r"^<!-- (?:BEGIN|END) skill-garden patch [^<>\r\n]+ -->(?:\r?\n|$)",
|
|
96
|
+
"",
|
|
97
|
+
breadcrumb,
|
|
98
|
+
flags=re.MULTILINE,
|
|
99
|
+
)
|
|
100
|
+
|
|
92
101
|
# Kiro (CLI userPromptSubmit / IDE promptSubmit) adds a hook's stdout
|
|
93
102
|
# directly to the conversation context — no JSON envelope. Emit the bare
|
|
94
103
|
# breadcrumb text. Conditionally isolated: all other platforms keep the
|
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
"id": "session-start-context-trim",
|
|
4
4
|
"purpose": "hook_override",
|
|
5
5
|
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "session-start-spec-discovery",
|
|
8
|
+
"operation": "replace",
|
|
9
|
+
"targetPolicy": "each-existing",
|
|
10
|
+
"targets": [
|
|
11
|
+
{ "kind": "hook", "path": ".codex/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
12
|
+
{ "kind": "hook", "path": ".claude/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
13
|
+
{ "kind": "hook", "path": ".codebuddy/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
14
|
+
{ "kind": "hook", "path": ".cursor/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
15
|
+
{ "kind": "hook", "path": ".factory/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
16
|
+
{ "kind": "hook", "path": ".gemini/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
17
|
+
{ "kind": "hook", "path": ".kiro/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
18
|
+
{ "kind": "hook", "path": ".qoder/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
19
|
+
{ "kind": "hook", "path": ".trae/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
20
|
+
{ "kind": "hook", "path": ".zcode/hooks/session-start.py", "missing": "skip", "markerStyle": "none" }
|
|
21
|
+
],
|
|
22
|
+
"selector": { "type": "literal", "source": "spec-discovery-selector.py", "expectedMatches": 1 },
|
|
23
|
+
"content": { "source": "spec-discovery-content.py" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "session-start-spec-count",
|
|
27
|
+
"operation": "replace",
|
|
28
|
+
"targetPolicy": "each-existing",
|
|
29
|
+
"targets": [
|
|
30
|
+
{ "kind": "hook", "path": ".codex/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
31
|
+
{ "kind": "hook", "path": ".claude/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
32
|
+
{ "kind": "hook", "path": ".codebuddy/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
33
|
+
{ "kind": "hook", "path": ".cursor/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
34
|
+
{ "kind": "hook", "path": ".factory/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
35
|
+
{ "kind": "hook", "path": ".gemini/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
36
|
+
{ "kind": "hook", "path": ".kiro/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
37
|
+
{ "kind": "hook", "path": ".qoder/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
38
|
+
{ "kind": "hook", "path": ".trae/hooks/session-start.py", "missing": "skip", "markerStyle": "none" },
|
|
39
|
+
{ "kind": "hook", "path": ".zcode/hooks/session-start.py", "missing": "skip", "markerStyle": "none" }
|
|
40
|
+
],
|
|
41
|
+
"selector": { "type": "literal", "source": "spec-count-selector.py", "expectedMatches": 1 },
|
|
42
|
+
"content": { "source": "spec-count-content.py" }
|
|
43
|
+
},
|
|
6
44
|
{
|
|
7
45
|
"id": "codex-session-start-platform-dispatch-helper",
|
|
8
46
|
"operation": "insert",
|
package/enhancements/0.6/overrides/patches/hooks/session-start/context-trim/spec-count-content.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lines.append(f"Spec indexes: {len(spec_index_paths)} available.")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
if ".trellis/spec/guides/index.md" in spec_index_paths:
|
|
2
|
+
output.write("## Shared guidelines\n")
|
|
3
|
+
output.write("- .trellis/spec/guides/index.md\n\n")
|
|
4
|
+
|
|
5
|
+
output.write(
|
|
6
|
+
"Read the active task's `implement.jsonl` or `check.jsonl` for task-specific guidelines. "
|
|
7
|
+
"Find other relevant specs with "
|
|
8
|
+
"`python3 ./.trellis/scripts/spec_router.py \"<task keywords>\"`.\n\n"
|
|
9
|
+
)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"id": "context-output-cleanup",
|
|
4
|
+
"purpose": "control_plane_integrity",
|
|
5
|
+
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "workflow-phase-index-output-cleanup",
|
|
8
|
+
"operation": "replace",
|
|
9
|
+
"targets": [{
|
|
10
|
+
"kind": "file",
|
|
11
|
+
"path": ".trellis/scripts/common/workflow_phase.py",
|
|
12
|
+
"missing": "skip",
|
|
13
|
+
"markerStyle": "hash"
|
|
14
|
+
}],
|
|
15
|
+
"selector": { "type": "literal", "source": "phase-index-selector.py" },
|
|
16
|
+
"content": { "source": "phase-index-content.py" }
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
package/enhancements/0.6/overrides/patches/scripts/context-output-cleanup/phase-index-content.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
section = tag_re.sub("", section)
|
|
2
|
+
# Keep ownership markers in workflow.md; omit only their standalone output lines.
|
|
3
|
+
section = _re.sub(
|
|
4
|
+
r"^<!-- (?:BEGIN|END) skill-garden patch [^<>\r\n]+ -->(?:\r?\n|$)",
|
|
5
|
+
"",
|
|
6
|
+
section,
|
|
7
|
+
flags=_re.MULTILINE,
|
|
8
|
+
)
|
|
9
|
+
return section.rstrip() + "\n"
|
package/enhancements/0.6/overrides/patches/scripts/context-output-cleanup/phase-index-selector.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
return tag_re.sub("", section).rstrip() + "\n"
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
4. **Keep the lifecycle ordered**: Change `vendor/skill-garden/.trellis/0.6/`, run `npm run sync` to refresh `enhancements/0.6/`, regenerate/check compiled targets, then update dogfood through the Flower Plugin lifecycle.
|
|
7
7
|
5. **Keep shared semantics aligned**: Workflow owner changes may require matching skill, hook, helper, or platform entry updates, but each full procedure stays with its owning capability.
|
|
8
8
|
6. **Keep project-specific rules project-local**: Use `.trellis/spec/` or a separately owned local skill; do not turn public `trellis-meta` into a project notebook.
|
|
9
|
-
7. **Preserve evidence and user content**: Respect Plugin ownership, first-backup
|
|
9
|
+
7. **Preserve evidence and user content**: Respect Plugin ownership, first-backup and Patch application records, template conflicts, and current user modifications. Never use `node_modules` as an authoring target.
|
|
@@ -10,6 +10,6 @@ Directory shape alone does not determine ownership:
|
|
|
10
10
|
| Shared common | Plugin state entry with shared ownership | The common source retained across dependent capabilities |
|
|
11
11
|
| Project-local | No upstream template or Plugin ownership claim, plus project intent | The project file itself |
|
|
12
12
|
|
|
13
|
-
For managed 0.6 changes, Patch leaves own `insert`/`replace`/`remove` transformations; selectors and full baselines fail closed on upstream drift; content files own replacement bytes; explicit targets and `each-existing` prevent accidental platform creation; Bundles own full/selected aliases; required preflight prevents partial writes; markers and first backups support migration/recovery;
|
|
13
|
+
For managed 0.6 changes, Patch leaves own `insert`/`replace`/`remove` transformations; selectors and full baselines fail closed on upstream drift; content files own replacement bytes; explicit targets and `each-existing` prevent accidental platform creation; Bundles own full/selected aliases; required preflight prevents partial writes; markers and first backups support migration/recovery; Patch application records identify the selected operations; compatibility and conflict policies audit the final result; canonical compiled targets prove the pinned upstream output. These responsibilities must stay in the shared Patch Engine instead of being reimplemented by a skill-specific injector.
|
|
14
14
|
|
|
15
15
|
Discover what is active from the local skill roots, `.trellis/workflow.md`, available `overrides/bundles/`, and `.flower/state.json`. Do not infer ownership from a skill name or maintain a fixed Skill-Garden capability list in this document.
|
|
@@ -8,6 +8,6 @@ Native Trellis provides three project-local layers:
|
|
|
8
8
|
|
|
9
9
|
Flower adds a conditional management layer when a Plugin is declared and locked:
|
|
10
10
|
|
|
11
|
-
4. **Plugin management layer**: `.flower/plugins.json` records intent, `.flower/plugin-lock.json` records the resolved immutable graph and granted capabilities, and `.flower/state.json` records owned paths, Patch
|
|
11
|
+
4. **Plugin management layer**: `.flower/plugins.json` records intent, `.flower/plugin-lock.json` records the resolved immutable graph and granted capabilities, and `.flower/state.json` records owned paths, applied Patch operations, and resulting hashes. Planning, preflight, transaction, lock, state, rollback, and uninstall are one lifecycle rather than unrelated local edits.
|
|
12
12
|
|
|
13
13
|
Without matching Plugin state or managed markers, use the native three-layer model. With `flower/skill-garden` ownership, read deployed files to understand current behavior but make durable 0.6 changes through the owning Skill-Garden source and Patch catalog.
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
| File differs from the recorded template hash | Trellis may prompt to overwrite, keep, or generate `.new`. |
|
|
9
9
|
| File is no longer a current template | Trellis migration rules decide whether to delete, rename, or preserve it. |
|
|
10
10
|
|
|
11
|
-
This file is not the complete ownership model in a Flower-managed project. When `.flower/plugin-lock.json` and `.flower/state.json` claim a target, Plugin ownership, Patch
|
|
11
|
+
This file is not the complete ownership model in a Flower-managed project. When `.flower/plugin-lock.json` and `.flower/state.json` claim a target, Plugin ownership, Patch application records, transaction checks, and managed result hashes also apply. Do not hand-edit either hash store; inspect both before deciding whether a difference is a user customization, a managed overlay, or drift.
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
- project-local or native local customization: edit the narrowly scoped local source;
|
|
8
8
|
- Flower/Skill-Garden managed target: edit the owning Plugin/Patch source, not the deployed result.
|
|
9
9
|
5. **For Skill-Garden 0.6 authoring**: change `vendor/skill-garden/.trellis/0.6/`, run `npm run sync`, regenerate/check compiled targets, then apply the Flower lifecycle to dogfood targets.
|
|
10
|
-
6. **Verify final semantics**: check every existing platform target, conflict assertions,
|
|
10
|
+
6. **Verify final semantics**: check every existing platform target, conflict assertions, Patch application records, and idempotency. The final files must agree with `.trellis/workflow.md` and their workflow owner.
|
|
@@ -10,4 +10,4 @@ Use the ownership evidence, not the directory shape:
|
|
|
10
10
|
| Shared common | State path with shared ownership | Shared common source; preserve other consumers |
|
|
11
11
|
| Project-local | No managed ownership claim | Edit the project file directly |
|
|
12
12
|
|
|
13
|
-
For a managed target, the durable sequence is source change -> required preflight -> transaction -> state
|
|
13
|
+
For a managed target, the durable sequence is source change -> required preflight -> transaction -> state and Patch application record updates. For a project-private behavior, a differently named local skill or `.trellis/spec/` remains preferable to mutating a public bundled skill.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"syncedAt": "2026-
|
|
2
|
+
"syncedAt": "2026-11-05T13:33:09.454Z",
|
|
3
3
|
"syncedFrom": "vendor/skill-garden",
|
|
4
|
-
"sourceCommit": "
|
|
4
|
+
"sourceCommit": "c71dbe89261b6426313ce931ff2543ef630da189",
|
|
5
5
|
"common": {
|
|
6
6
|
"codexSkills": [
|
|
7
7
|
"aliyun-ops",
|
|
@@ -213,6 +213,10 @@
|
|
|
213
213
|
"hooks/session-start/context-trim/shared-builder-content.py",
|
|
214
214
|
"hooks/session-start/context-trim/shared-builder-selector.py",
|
|
215
215
|
"hooks/session-start/context-trim/shared-dispatch-helper-selector.py",
|
|
216
|
+
"hooks/session-start/context-trim/spec-count-content.py",
|
|
217
|
+
"hooks/session-start/context-trim/spec-count-selector.py",
|
|
218
|
+
"hooks/session-start/context-trim/spec-discovery-content.py",
|
|
219
|
+
"hooks/session-start/context-trim/spec-discovery-selector.py",
|
|
216
220
|
"hooks/session-start/pre-check-hold/claude-content.py",
|
|
217
221
|
"hooks/session-start/pre-check-hold/claude-selector.py",
|
|
218
222
|
"hooks/session-start/pre-check-hold/codex-content.py",
|
|
@@ -224,6 +228,9 @@
|
|
|
224
228
|
"hooks/session-start/update-boundary/notice-output-selector.py",
|
|
225
229
|
"hooks/session-start/update-boundary/patch.json",
|
|
226
230
|
"hooks/session-start/update-boundary/update-resolver-selector.py",
|
|
231
|
+
"scripts/context-output-cleanup/patch.json",
|
|
232
|
+
"scripts/context-output-cleanup/phase-index-content.py",
|
|
233
|
+
"scripts/context-output-cleanup/phase-index-selector.py",
|
|
227
234
|
"scripts/runtime-state-integrity/active-task-fallback-content.py",
|
|
228
235
|
"scripts/runtime-state-integrity/active-task-fallback-selector.py",
|
|
229
236
|
"scripts/runtime-state-integrity/active-task-resolution-content.py",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flower-trellis",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13-beta.0",
|
|
4
4
|
"description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"commit-and-tag-version": "^12.7.3"
|
|
72
72
|
},
|
|
73
73
|
"flowerReleaseNotes": {
|
|
74
|
-
"version": "0.6.
|
|
74
|
+
"version": "0.6.13-beta.0",
|
|
75
75
|
"source": "CHANGELOG.md",
|
|
76
|
-
"body": "###
|
|
76
|
+
"body": "### 🐛 修复 Bug Fixes\n\n* **hooks:** 同步索引发现修复与大目录预算回归 ([975cf5f](https://github.com/SilentFlower/flower-trellis/commit/975cf5f5c1927bd614b2f3e8c09c940dd70301a0))\n\n\n### 📝 文档 Docs\n\n* 同步 Trellis Meta 的术语修订 ([972160b](https://github.com/SilentFlower/flower-trellis/commit/972160be06b92d6896b23c57b96a1b9d5de9cbb2))",
|
|
77
77
|
"truncated": false
|
|
78
78
|
},
|
|
79
79
|
"optionalDependencies": {
|
|
@@ -369,6 +369,13 @@ def render_part(root: Path, hook: str, part: str, hook_input: dict) -> dict | No
|
|
|
369
369
|
result.pop("systemMessage", None)
|
|
370
370
|
try:
|
|
371
371
|
workflow_state = _run_workflow_state_refresh(root, hook, hook_input)
|
|
372
|
+
# 归属标记留在源文件中;注入时仅省略这些整行注释,避免压缩规则措辞。
|
|
373
|
+
workflow_state = re.sub(
|
|
374
|
+
r"^<!-- (?:BEGIN|END) skill-garden patch [^<>\r\n]+ -->(?:\r?\n|$)",
|
|
375
|
+
"",
|
|
376
|
+
workflow_state,
|
|
377
|
+
flags=re.MULTILINE,
|
|
378
|
+
)
|
|
372
379
|
separator = "" if not context or context.endswith("\n") else "\n"
|
|
373
380
|
context = f"{context}{separator}{workflow_state}"
|
|
374
381
|
except Exception as error:
|