flower-trellis 0.5.2-beta.0 → 0.5.2
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/.agents/skills/trellis-auto-loop/SKILL.md +16 -3
- package/enhancements/0.6/.agents/skills/trellis-check-all/references/document-drift-auto-remediation.md +7 -0
- package/enhancements/0.6/.agents/skills/trellis-check-all/references/reporting-and-disposition.md +2 -2
- package/enhancements/0.6/.agents/skills/trellis-push/SKILL.md +14 -9
- package/enhancements/0.6/.agents/skills/trellis-task-brief/SKILL.md +25 -5
- package/enhancements/0.6/.claude/skills/trellis-auto-loop/SKILL.md +16 -3
- package/enhancements/0.6/.claude/skills/trellis-check-all/references/document-drift-auto-remediation.md +7 -0
- package/enhancements/0.6/.claude/skills/trellis-check-all/references/reporting-and-disposition.md +2 -2
- package/enhancements/0.6/.claude/skills/trellis-push/SKILL.md +14 -9
- package/enhancements/0.6/.claude/skills/trellis-task-brief/SKILL.md +25 -5
- package/enhancements/0.6/overrides/bundles/control-plane-integrity.json +2 -1
- package/enhancements/0.6/overrides/bundles/trellis-meta.json +12 -0
- package/enhancements/0.6/overrides/conflicts.json +558 -3
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/constants-selector.py +6 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/helpers-selector.py +150 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/imports-content.py +4 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/imports-selector.py +8 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/output-content.py +7 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/output-selector.py +13 -0
- package/enhancements/0.6/overrides/patches/scripts/session-context-update-boundary/patch.json +53 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/bundled-overrides-baseline.md +16 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/bundled-overrides-content.md +10 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/customization-principles-baseline.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/customization-principles-content.md +9 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/file-boundaries-baseline.md +19 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/file-boundaries-content.md +13 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/patch.json +157 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/skill-taxonomy-baseline.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/skill-taxonomy-content.md +15 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/system-model-baseline.md +9 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/system-model-content.md +13 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/template-hashes-baseline.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-architecture-and-ownership/template-hashes-content.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/customization-entry-content.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/customization-entry-selector.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/customization-order-baseline.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/customization-order-content.md +10 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/patch.json +179 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/platform-edit-route-baseline.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/platform-edit-route-content.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/skill-classification-content.md +9 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/skill-classification-selector.md +8 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/skill-edit-route-baseline.md +13 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/skill-edit-route-content.md +13 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/workflow-edit-route-baseline.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/workflow-edit-route-content.md +8 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/workflow-entry-content.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-customization-routing/workflow-entry-selector.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/current-rules-baseline.md +12 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/current-rules-content.md +11 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/description-content.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/description-selector.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/how-to-use-baseline.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/how-to-use-content.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/patch.json +105 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/scope-content.md +10 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-mode-precedence/scope-selector.md +9 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/owner-routing-baseline.md +8 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/owner-routing-content.md +20 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/patch.json +106 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/state-boundary-baseline.md +20 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/state-boundary-content.md +7 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/workflow-change-map-baseline.md +13 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/workflow-change-map-content.md +16 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/workflow-source-content.md +1 -0
- package/enhancements/0.6/overrides/patches/skills/trellis-meta/managed-workflow-owners/workflow-source-selector.md +1 -0
- package/enhancements/0.6/overrides/patches/workflow/intent-routing/request-triage/content.md +3 -2
- package/enhancements/0.6/overrides/patches/workflow/task-brief-review/phase-1-activate-content.md +2 -2
- package/enhancements/0.6/scripts/auto_loop.py +247 -33
- package/enhancements/0.6/scripts/spec_router.py +486 -25
- package/enhancements/MANIFEST.json +56 -2
- package/package.json +3 -3
- package/src/builtin-plugins/skill-garden/content-adapter.js +29 -6
- package/src/builtin-plugins/skill-garden/provider.js +13 -2
- package/src/lib/patch-conflicts.js +28 -2
- package/src/lib/patch-engine.js +41 -3
- package/src/lib/platform-patch-adapters.js +8 -7
- package/src/lib/trellis-python-command.js +95 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
def _read_project_version(repo_root: Path) -> str | None:
|
|
2
|
+
try:
|
|
3
|
+
version = (repo_root / DIR_WORKFLOW / ".version").read_text(
|
|
4
|
+
encoding="utf-8"
|
|
5
|
+
).strip()
|
|
6
|
+
except OSError:
|
|
7
|
+
return None
|
|
8
|
+
return version or None
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _fetch_trellis_version_output() -> str | None:
|
|
12
|
+
try:
|
|
13
|
+
result = subprocess.run(
|
|
14
|
+
["trellis", "--version"],
|
|
15
|
+
capture_output=True,
|
|
16
|
+
text=True,
|
|
17
|
+
encoding="utf-8",
|
|
18
|
+
errors="replace",
|
|
19
|
+
timeout=_UPDATE_CHECK_TIMEOUT_SECONDS,
|
|
20
|
+
)
|
|
21
|
+
except (OSError, subprocess.SubprocessError, TimeoutError):
|
|
22
|
+
return None
|
|
23
|
+
|
|
24
|
+
if result.returncode != 0:
|
|
25
|
+
return None
|
|
26
|
+
output = f"{result.stdout}\n{result.stderr}".strip()
|
|
27
|
+
return output or None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _extract_available_update_version(output: str) -> str | None:
|
|
31
|
+
update_match = re.search(
|
|
32
|
+
r"Trellis update available:\s*"
|
|
33
|
+
r"(?P<current>\S+)\s*(?:→|->)\s*(?P<latest>\S+)",
|
|
34
|
+
output,
|
|
35
|
+
)
|
|
36
|
+
if update_match:
|
|
37
|
+
return update_match.group("latest").strip()
|
|
38
|
+
candidates = _VERSION_TOKEN_RE.findall(output)
|
|
39
|
+
return candidates[-1] if candidates else None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _resolve_available_update_version() -> str | None:
|
|
43
|
+
output = _fetch_trellis_version_output()
|
|
44
|
+
if not output:
|
|
45
|
+
return None
|
|
46
|
+
return _extract_available_update_version(output)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _parse_version(version: str) -> tuple[tuple[int, int, int], tuple[str, ...] | None] | None:
|
|
50
|
+
match = _VERSION_RE.match(version)
|
|
51
|
+
if not match:
|
|
52
|
+
return None
|
|
53
|
+
major, minor, patch, prerelease = match.groups()
|
|
54
|
+
numbers = (int(major), int(minor or "0"), int(patch or "0"))
|
|
55
|
+
prerelease_parts = tuple(prerelease.split(".")) if prerelease else None
|
|
56
|
+
return numbers, prerelease_parts
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _compare_prerelease(
|
|
60
|
+
left: tuple[str, ...] | None,
|
|
61
|
+
right: tuple[str, ...] | None,
|
|
62
|
+
) -> int:
|
|
63
|
+
if left is None and right is None:
|
|
64
|
+
return 0
|
|
65
|
+
if left is None:
|
|
66
|
+
return 1
|
|
67
|
+
if right is None:
|
|
68
|
+
return -1
|
|
69
|
+
|
|
70
|
+
for left_part, right_part in zip(left, right):
|
|
71
|
+
if left_part == right_part:
|
|
72
|
+
continue
|
|
73
|
+
left_numeric = left_part.isdigit()
|
|
74
|
+
right_numeric = right_part.isdigit()
|
|
75
|
+
if left_numeric and right_numeric:
|
|
76
|
+
left_int = int(left_part)
|
|
77
|
+
right_int = int(right_part)
|
|
78
|
+
return (left_int > right_int) - (left_int < right_int)
|
|
79
|
+
if left_numeric:
|
|
80
|
+
return -1
|
|
81
|
+
if right_numeric:
|
|
82
|
+
return 1
|
|
83
|
+
return (left_part > right_part) - (left_part < right_part)
|
|
84
|
+
|
|
85
|
+
return (len(left) > len(right)) - (len(left) < len(right))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def _compare_versions(left: str, right: str) -> int | None:
|
|
89
|
+
parsed_left = _parse_version(left)
|
|
90
|
+
parsed_right = _parse_version(right)
|
|
91
|
+
if parsed_left is None or parsed_right is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
left_numbers, left_prerelease = parsed_left
|
|
95
|
+
right_numbers, right_prerelease = parsed_right
|
|
96
|
+
if left_numbers != right_numbers:
|
|
97
|
+
return (left_numbers > right_numbers) - (left_numbers < right_numbers)
|
|
98
|
+
return _compare_prerelease(left_prerelease, right_prerelease)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _update_marker_path(repo_root: Path) -> Path:
|
|
102
|
+
context_key = resolve_context_key()
|
|
103
|
+
if not context_key:
|
|
104
|
+
terminal_key = os.environ.get("TERM_SESSION_ID", "").strip()
|
|
105
|
+
context_key = terminal_key or f"ppid-{os.getppid()}"
|
|
106
|
+
safe_key = re.sub(r"[^A-Za-z0-9._-]+", "_", context_key).strip("._-")
|
|
107
|
+
if not safe_key:
|
|
108
|
+
safe_key = "session"
|
|
109
|
+
return (
|
|
110
|
+
repo_root
|
|
111
|
+
/ DIR_WORKFLOW
|
|
112
|
+
/ ".runtime"
|
|
113
|
+
/ f"update-check-{safe_key[:160]}.marker"
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _mark_update_check_attempted(repo_root: Path) -> bool:
|
|
118
|
+
marker_path = _update_marker_path(repo_root)
|
|
119
|
+
if marker_path.exists():
|
|
120
|
+
return False
|
|
121
|
+
try:
|
|
122
|
+
marker_path.parent.mkdir(parents=True, exist_ok=True)
|
|
123
|
+
marker_path.write_text("checked\n", encoding="utf-8")
|
|
124
|
+
except OSError:
|
|
125
|
+
pass
|
|
126
|
+
return True
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _get_update_hint(repo_root: Path) -> str | None:
|
|
130
|
+
marker_path = _update_marker_path(repo_root)
|
|
131
|
+
if marker_path.exists():
|
|
132
|
+
return None
|
|
133
|
+
|
|
134
|
+
current_version = _read_project_version(repo_root)
|
|
135
|
+
if not current_version:
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
latest_version = _resolve_available_update_version()
|
|
139
|
+
if not latest_version:
|
|
140
|
+
return None
|
|
141
|
+
|
|
142
|
+
_mark_update_check_attempted(repo_root)
|
|
143
|
+
comparison = _compare_versions(current_version, latest_version)
|
|
144
|
+
if comparison is None or comparison >= 0:
|
|
145
|
+
return None
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
f"Trellis update available: {current_version} -> {latest_version}, "
|
|
149
|
+
"run trellis upgrade"
|
|
150
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
def output_text(repo_root: Path | None = None) -> None:
|
|
2
|
+
"""Output context in text format.
|
|
3
|
+
|
|
4
|
+
Args:
|
|
5
|
+
repo_root: Repository root path. Defaults to auto-detected.
|
|
6
|
+
"""
|
|
7
|
+
if repo_root is None:
|
|
8
|
+
repo_root = get_repo_root()
|
|
9
|
+
update_hint = _get_update_hint(repo_root)
|
|
10
|
+
if update_hint:
|
|
11
|
+
print(update_hint)
|
|
12
|
+
print("")
|
|
13
|
+
print(get_context_text(repo_root))
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"id": "session-context-update-boundary",
|
|
4
|
+
"purpose": "control_plane_integrity",
|
|
5
|
+
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "session-context-update-imports",
|
|
8
|
+
"operation": "replace",
|
|
9
|
+
"targets": [{
|
|
10
|
+
"kind": "file",
|
|
11
|
+
"path": ".trellis/scripts/common/session_context.py",
|
|
12
|
+
"missing": "error",
|
|
13
|
+
"markerStyle": "hash"
|
|
14
|
+
}],
|
|
15
|
+
"selector": { "type": "literal", "source": "imports-selector.py" },
|
|
16
|
+
"content": { "source": "imports-content.py" }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "session-context-update-constants",
|
|
20
|
+
"operation": "remove",
|
|
21
|
+
"targets": [{
|
|
22
|
+
"kind": "file",
|
|
23
|
+
"path": ".trellis/scripts/common/session_context.py",
|
|
24
|
+
"missing": "error",
|
|
25
|
+
"markerStyle": "hash"
|
|
26
|
+
}],
|
|
27
|
+
"selector": { "type": "literal", "source": "constants-selector.py" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "session-context-update-helpers",
|
|
31
|
+
"operation": "remove",
|
|
32
|
+
"targets": [{
|
|
33
|
+
"kind": "file",
|
|
34
|
+
"path": ".trellis/scripts/common/session_context.py",
|
|
35
|
+
"missing": "error",
|
|
36
|
+
"markerStyle": "hash"
|
|
37
|
+
}],
|
|
38
|
+
"selector": { "type": "literal", "source": "helpers-selector.py" }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "session-context-update-output",
|
|
42
|
+
"operation": "replace",
|
|
43
|
+
"targets": [{
|
|
44
|
+
"kind": "file",
|
|
45
|
+
"path": ".trellis/scripts/common/session_context.py",
|
|
46
|
+
"missing": "error",
|
|
47
|
+
"markerStyle": "hash"
|
|
48
|
+
}],
|
|
49
|
+
"selector": { "type": "literal", "source": "output-selector.py" },
|
|
50
|
+
"content": { "source": "output-content.py" }
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Overriding a Bundled Skill Locally
|
|
2
|
+
|
|
3
|
+
There is no formal "project-local skill" mechanism (e.g. `.trellis/skills/`). Bundled skills are platform-rooted, so any override is platform-rooted too.
|
|
4
|
+
|
|
5
|
+
The supported pattern relies on the existing template-hash diff in `trellis update`:
|
|
6
|
+
|
|
7
|
+
1. Edit the local file directly. Example: `.claude/skills/trellis-meta/SKILL.md`.
|
|
8
|
+
2. The file's hash now diverges from the entry in `.trellis/.template-hashes.json`.
|
|
9
|
+
3. The next `trellis update` detects the user modification and leaves the file untouched (Trellis never overwrites user-modified files without an explicit `--force`).
|
|
10
|
+
|
|
11
|
+
Caveats:
|
|
12
|
+
|
|
13
|
+
- The override only applies to the one platform whose directory you edited. To override the same skill across, for example, Claude Code and Codex, you must edit both `.claude/skills/<name>/` and `.agents/skills/<name>/`.
|
|
14
|
+
- A future `trellis update --force` will overwrite local edits. Keep the override under version control so it can be reapplied if needed.
|
|
15
|
+
- Marketplace skills installed under the same platform skill root with a different folder name (e.g. `.claude/skills/my-custom-meta/`) are untouched by Trellis and are the cleaner option when the goal is to add behavior, not to mutate the bundled skill.
|
|
16
|
+
- Team-private conventions belong in `.trellis/spec/` or in a separate marketplace-style local skill, not in modifications to `trellis-meta` itself. See `customize-local/add-project-local-conventions.md`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Overriding a Bundled Skill Locally
|
|
2
|
+
|
|
3
|
+
First determine whether the deployed bundled skill is only Trellis-managed or also owned by Flower/Skill-Garden.
|
|
4
|
+
|
|
5
|
+
- In a native Trellis project, template-hash conflict handling still permits a local divergence, with the normal cross-platform and future-update caveats.
|
|
6
|
+
- In a Flower-managed project, do not directly edit a target recorded in `.flower/state.json`. Change the owning Plugin/Patch source and let preflight plus the transaction writer update every existing platform target consistently.
|
|
7
|
+
- In the Flower source checkout, Skill-Garden 0.6 modifications belong under `vendor/skill-garden/.trellis/0.6/overrides/`; run `npm run sync`, refresh/check compiled targets, then apply the Plugin to dogfood targets.
|
|
8
|
+
- For project-private behavior, prefer `.trellis/spec/` or a differently named project-local skill that has no upstream or Plugin ownership claim.
|
|
9
|
+
|
|
10
|
+
If Skill-Garden is removed and its state ownership is cleanly released, the remaining bundled skill returns to native Trellis update semantics. Do not leave managed prose behind after uninstall or freeze assumptions into this reference.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## AI Customization Principles
|
|
2
|
+
|
|
3
|
+
1. **Find the local source of truth first**: Do not edit from memory. Read `.trellis/workflow.md`, `.trellis/config.yaml`, the relevant platform directory, and related task files first.
|
|
4
|
+
2. **Edit the user project, not the npm package cache**: Modify generated files inside the project, not `node_modules` or the global npm install directory.
|
|
5
|
+
3. **Keep platform files aligned with `.trellis/`**: If workflow routing changes, also check whether platform skills or commands still describe the same flow.
|
|
6
|
+
4. **Put project-specific rules in `.trellis/spec/` or a local skill**: Do not put team conventions into `trellis-meta`.
|
|
7
|
+
5. **Preserve user changes**: If a file was already modified locally, work from the current content instead of overwriting it with a default template.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## AI Customization Principles
|
|
2
|
+
|
|
3
|
+
1. **Inspect behavior and ownership separately**: Read the current `.trellis/` and platform files for runtime truth, then inspect `.flower/` state, template hashes, and managed markers to locate the durable authoring source.
|
|
4
|
+
2. **Choose the owner before the edit**: Project-local content may be edited locally. Trellis templates follow native update rules. Flower/Skill-Garden targets follow Plugin state and Patch ownership.
|
|
5
|
+
3. **Use the 0.6 Patch Engine for managed Trellis files**: Declare exact targets, selector/baseline/content, target policy, and Bundle selection. Do not add a special injector or modify only a deployed copy.
|
|
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
|
+
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
|
+
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/provenance records, template conflicts, and current user modifications. Never use `node_modules` as an authoring target.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Local Customization Boundaries
|
|
2
|
+
|
|
3
|
+
Editable by default:
|
|
4
|
+
|
|
5
|
+
- `.trellis/workflow.md`
|
|
6
|
+
- `.trellis/config.yaml`
|
|
7
|
+
- `.trellis/spec/**`
|
|
8
|
+
- `.trellis/scripts/**`
|
|
9
|
+
- Platform hooks, settings, agents, skills, commands, prompts, and workflows
|
|
10
|
+
|
|
11
|
+
Do not edit by default:
|
|
12
|
+
|
|
13
|
+
- Global npm install directory
|
|
14
|
+
- `node_modules/@mindfoldhq/trellis`
|
|
15
|
+
- Trellis GitHub repository source code
|
|
16
|
+
- Concrete state files under `.trellis/.runtime/**`
|
|
17
|
+
- Hash contents inside `.trellis/.template-hashes.json`
|
|
18
|
+
|
|
19
|
+
Switch to the Trellis CLI source-code perspective only when the user explicitly wants to contribute upstream.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Local Customization Boundaries
|
|
2
|
+
|
|
3
|
+
Classify before editing:
|
|
4
|
+
|
|
5
|
+
| Ownership | Durable edit point |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| Project-local | The current project file, after reading its call chain and related workflow semantics. |
|
|
8
|
+
| Upstream Trellis template | A local customization or upstream Trellis source, depending on the user's stated goal and template-hash behavior. |
|
|
9
|
+
| Skill-Garden managed | `vendor/skill-garden/.trellis/0.6/` in the Flower source checkout, expressed through Patch/Bundle declarations for existing Trellis targets. |
|
|
10
|
+
| Flower managed | The owning Flower source, Plugin manifest/adapter, or Patch catalog; never only the deployed result. |
|
|
11
|
+
| Shared common | The shared source plus Plugin state ownership rules; preserve content shared by more than one capability. |
|
|
12
|
+
|
|
13
|
+
Never hand-edit concrete runtime state, `.flower/` lock/state files, template hash contents, global npm caches, or `node_modules` as an implementation shortcut. If the Flower source checkout is not present, use the installed Plugin lifecycle or create separately owned project-local content rather than pretending the managed source exists locally.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"id": "trellis-meta-managed-architecture-and-ownership",
|
|
4
|
+
"purpose": "managed_architecture_ownership",
|
|
5
|
+
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "trellis-meta-managed-system-model",
|
|
8
|
+
"operation": "replace",
|
|
9
|
+
"targetPolicy": "each-existing",
|
|
10
|
+
"targets": [
|
|
11
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
12
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
13
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
14
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
15
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
16
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
17
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
18
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
19
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
20
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
21
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
22
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
23
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
24
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
25
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" }
|
|
26
|
+
],
|
|
27
|
+
"selector": { "type": "markdown-section", "heading": "## Local System Model" },
|
|
28
|
+
"baselines": ["system-model-baseline.md"],
|
|
29
|
+
"content": { "source": "system-model-content.md" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "trellis-meta-managed-customization-principles",
|
|
33
|
+
"operation": "replace",
|
|
34
|
+
"targetPolicy": "each-existing",
|
|
35
|
+
"targets": [
|
|
36
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
37
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
38
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
39
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
40
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
41
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
42
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
43
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
44
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
45
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
46
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
47
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
48
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
49
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" },
|
|
50
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/overview.md", "missing": "skip" }
|
|
51
|
+
],
|
|
52
|
+
"selector": { "type": "markdown-section", "heading": "## AI Customization Principles" },
|
|
53
|
+
"baselines": ["customization-principles-baseline.md"],
|
|
54
|
+
"content": { "source": "customization-principles-content.md" }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "trellis-meta-managed-template-hashes",
|
|
58
|
+
"operation": "replace",
|
|
59
|
+
"targetPolicy": "each-existing",
|
|
60
|
+
"targets": [
|
|
61
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
62
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
63
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
64
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
65
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
66
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
67
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
68
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
69
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
70
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
71
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
72
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
73
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
74
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
75
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" }
|
|
76
|
+
],
|
|
77
|
+
"selector": { "type": "markdown-section", "heading": "## Meaning Of Template Hashes" },
|
|
78
|
+
"baselines": ["template-hashes-baseline.md"],
|
|
79
|
+
"content": { "source": "template-hashes-content.md" }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "trellis-meta-managed-file-boundaries",
|
|
83
|
+
"operation": "replace",
|
|
84
|
+
"targetPolicy": "each-existing",
|
|
85
|
+
"targets": [
|
|
86
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
87
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
88
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
89
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
90
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
91
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
92
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
93
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
94
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
95
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
96
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
97
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
98
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
99
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" },
|
|
100
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/generated-files.md", "missing": "skip" }
|
|
101
|
+
],
|
|
102
|
+
"selector": { "type": "markdown-section", "heading": "## Local Customization Boundaries" },
|
|
103
|
+
"baselines": ["file-boundaries-baseline.md"],
|
|
104
|
+
"content": { "source": "file-boundaries-content.md" }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "trellis-meta-managed-skill-taxonomy",
|
|
108
|
+
"operation": "replace",
|
|
109
|
+
"targetPolicy": "each-existing",
|
|
110
|
+
"targets": [
|
|
111
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
112
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
113
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
114
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
115
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
116
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
117
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
118
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
119
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
120
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
121
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
122
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
123
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
124
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
125
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" }
|
|
126
|
+
],
|
|
127
|
+
"selector": { "type": "markdown-section", "heading": "## What Counts As Bundled (vs. Adjacent Concepts)" },
|
|
128
|
+
"baselines": ["skill-taxonomy-baseline.md"],
|
|
129
|
+
"content": { "source": "skill-taxonomy-content.md" }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "trellis-meta-managed-bundled-overrides",
|
|
133
|
+
"operation": "replace",
|
|
134
|
+
"targetPolicy": "each-existing",
|
|
135
|
+
"targets": [
|
|
136
|
+
{ "kind": "skill", "path": ".agent/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
137
|
+
{ "kind": "skill", "path": ".agents/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
138
|
+
{ "kind": "skill", "path": ".claude/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
139
|
+
{ "kind": "skill", "path": ".codebuddy/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
140
|
+
{ "kind": "skill", "path": ".cursor/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
141
|
+
{ "kind": "skill", "path": ".devin/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
142
|
+
{ "kind": "skill", "path": ".factory/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
143
|
+
{ "kind": "skill", "path": ".github/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
144
|
+
{ "kind": "skill", "path": ".kilocode/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
145
|
+
{ "kind": "skill", "path": ".kiro/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
146
|
+
{ "kind": "skill", "path": ".opencode/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
147
|
+
{ "kind": "skill", "path": ".pi/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
148
|
+
{ "kind": "skill", "path": ".qoder/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
149
|
+
{ "kind": "skill", "path": ".reasonix/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" },
|
|
150
|
+
{ "kind": "skill", "path": ".trae/skills/trellis-meta/references/local-architecture/bundled-skills.md", "missing": "skip" }
|
|
151
|
+
],
|
|
152
|
+
"selector": { "type": "markdown-section", "heading": "## Overriding a Bundled Skill Locally" },
|
|
153
|
+
"baselines": ["bundled-overrides-baseline.md"],
|
|
154
|
+
"content": { "source": "bundled-overrides-content.md" }
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## What Counts As Bundled (vs. Adjacent Concepts)
|
|
2
|
+
|
|
3
|
+
| Source path | Type | How it ships |
|
|
4
|
+
| --- | --- | --- |
|
|
5
|
+
| `templates/common/bundled-skills/<name>/` | Bundled skill (multi-file) | Whole directory copied to every platform skill root |
|
|
6
|
+
| `templates/common/skills/<name>.md` | Single-file workflow skill | Wrapped with frontmatter, written as `<root>/<name>/SKILL.md` |
|
|
7
|
+
| `templates/common/commands/<name>.md` | Slash command / prompt | Written to each platform's command directory (`.claude/commands/trellis/`, `.cursor/commands/trellis-*.md`, `.gemini/commands/trellis/*.toml`, etc.) |
|
|
8
|
+
| `templates/<platform>/skills/` | Platform-specific skill | Written only into that platform's directory (e.g. `.codex/skills/`) |
|
|
9
|
+
| User skills under `.claude/skills/<my-skill>/` etc. | Marketplace or user-authored | Not managed by Trellis at all |
|
|
10
|
+
|
|
11
|
+
The Trellis CLI never touches anything that is not produced by one of its own template loaders. Anything a user drops into a platform skill root by hand is left alone.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## What Counts As Bundled (vs. Adjacent Concepts)
|
|
2
|
+
|
|
3
|
+
Directory shape alone does not determine ownership:
|
|
4
|
+
|
|
5
|
+
| Ownership class | Evidence | Durable source |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Upstream bundled | Trellis template hashes and bundled-skill distribution | Trellis bundled template source or an explicitly local supplement |
|
|
8
|
+
| Skill-Garden managed | `flower/skill-garden` lock/state entries or `skill-garden patch` markers | `vendor/skill-garden/.trellis/0.6/` in the Flower source checkout |
|
|
9
|
+
| Flower managed | Flower Plugin state paths/patches and owner IDs | The owning Flower Plugin source, adapter, or `src/patches/` catalog |
|
|
10
|
+
| Shared common | Plugin state entry with shared ownership | The common source retained across dependent capabilities |
|
|
11
|
+
| Project-local | No upstream template or Plugin ownership claim, plus project intent | The project file itself |
|
|
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; provenance records 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
|
+
|
|
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.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Local System Model
|
|
2
|
+
|
|
3
|
+
Trellis provides three layers inside a user project:
|
|
4
|
+
|
|
5
|
+
1. **Workflow layer**: `.trellis/workflow.md` defines phases, routing, next actions, and prompt blocks.
|
|
6
|
+
2. **Persistence layer**: `.trellis/tasks/`, `.trellis/spec/`, and `.trellis/workspace/` store tasks, specs, and session memory.
|
|
7
|
+
3. **Platform integration layer**: hooks, settings, agents, skills, commands, prompts, and workflows in platform directories connect the Trellis workflow to different AI tools.
|
|
8
|
+
|
|
9
|
+
All three layers live inside the user project, so an AI can read and modify them directly.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Local System Model
|
|
2
|
+
|
|
3
|
+
Native Trellis provides three project-local layers:
|
|
4
|
+
|
|
5
|
+
1. **Workflow layer**: `.trellis/workflow.md` defines current phases, routing, next actions, and prompt blocks.
|
|
6
|
+
2. **Persistence layer**: `.trellis/tasks/`, `.trellis/spec/`, and `.trellis/workspace/` store tasks, specs, and deliberate session records.
|
|
7
|
+
3. **Platform integration layer**: hooks, settings, agents, skills, commands, prompts, workflows, channel runtime files, and memory entry points connect Trellis to AI tools.
|
|
8
|
+
|
|
9
|
+
Flower adds a conditional management layer when a Plugin is declared and locked:
|
|
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 provenance, and resulting hashes. Planning, preflight, transaction, lock, state, rollback, and uninstall are one lifecycle rather than unrelated local edits.
|
|
12
|
+
|
|
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.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Meaning Of Template Hashes
|
|
2
|
+
|
|
3
|
+
`.trellis/.template-hashes.json` records the content hash from the last time Trellis wrote a template file. `trellis update` uses it to distinguish three cases:
|
|
4
|
+
|
|
5
|
+
| Case | Update behavior |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| File was not modified by the user | It can be updated automatically. |
|
|
8
|
+
| File was modified by the user | Prompt the user to overwrite, keep, or generate `.new`. |
|
|
9
|
+
| File is no longer a current template | It may be deleted, renamed, or preserved according to migration rules. |
|
|
10
|
+
|
|
11
|
+
When an AI customizes local Trellis files, it does not need to maintain hashes manually. It is normal for Trellis update to recognize the result as "modified by the user."
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Meaning Of Template Hashes
|
|
2
|
+
|
|
3
|
+
`.trellis/.template-hashes.json` records native Trellis template hashes and still governs ordinary `trellis update` conflicts:
|
|
4
|
+
|
|
5
|
+
| Case | Native update behavior |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| File matches the recorded template hash | Trellis may update it automatically. |
|
|
8
|
+
| File differs from the recorded template hash | Trellis may prompt to overwrite, keep, or generate `.new`. |
|
|
9
|
+
| File is no longer a current template | Trellis migration rules decide whether to delete, rename, or preserve it. |
|
|
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 provenance, 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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This directory covers both native local customization and managed overlays. Read generated `.trellis/` and platform files to understand current behavior, but determine ownership before editing: project-local targets may be changed in place, while Flower/Skill-Garden targets must be changed through their owning Plugin or Patch source. Never use the npm cache or `node_modules` as an authoring source.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This directory is for local AI working in a user project where Trellis was installed through npm and `trellis init` has already been run. The AI should modify generated `.trellis/` and platform directories inside the project, not Trellis CLI upstream source code.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## General Operation Order
|
|
2
|
+
|
|
3
|
+
1. **Confirm platform and directories**: inspect which directories exist, such as `.claude/`, `.codex/`, `.cursor/`, `.zcode/`.
|
|
4
|
+
2. **Confirm the current active task**: run `python3 ./.trellis/scripts/task.py current --source`.
|
|
5
|
+
3. **Read the local source of truth**: prefer `.trellis/workflow.md`, `.trellis/config.yaml`, and relevant platform files.
|
|
6
|
+
4. **Modify narrowly**: edit only files related to the user's request.
|
|
7
|
+
5. **Synchronize semantics**: if a shared flow changes, check whether platform entry points also need changes; if a platform entry changes, check whether `.trellis/workflow.md` still agrees.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## General Operation Order
|
|
2
|
+
|
|
3
|
+
1. **Confirm scope**: inspect enabled platform roots and the current active task.
|
|
4
|
+
2. **Read runtime truth**: read `.trellis/workflow.md`, `.trellis/config.yaml`, and the relevant platform files.
|
|
5
|
+
3. **Resolve ownership**: inspect `.flower/plugins.json`, `.flower/plugin-lock.json`, `.flower/state.json`, `.trellis/.template-hashes.json`, and managed markers.
|
|
6
|
+
4. **Choose one route**:
|
|
7
|
+
- project-local or native local customization: edit the narrowly scoped local source;
|
|
8
|
+
- Flower/Skill-Garden managed target: edit the owning Plugin/Patch source, not the deployed result.
|
|
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, provenance, and idempotency. The final files must agree with `.trellis/workflow.md` and their workflow owner.
|