flower-trellis 0.6.0-beta.7 → 0.6.0-beta.8
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-worktree/SKILL.md +27 -5
- package/enhancements/0.6/.claude/skills/trellis-worktree/SKILL.md +27 -5
- package/enhancements/0.6/scripts/worktree_setup.py +459 -22
- package/enhancements/MANIFEST.json +2 -2
- package/package.json +3 -3
- package/src/cli.js +8 -0
- package/src/commands/plugin-interactive.js +342 -121
- package/src/commands/plugin.js +84 -10
- package/src/commands/worktree.js +48 -1
- package/src/plugin/application-service.js +52 -7
- package/src/plugin/schemas/validator.js +5 -1
|
@@ -20,26 +20,48 @@ flower-trellis worktree status --target <target-worktree> --json
|
|
|
20
20
|
|
|
21
21
|
3. Route by status:
|
|
22
22
|
- `ready-local`: continue with the user's original Trellis intent in this worktree.
|
|
23
|
-
- `needs-prepare`: run `flower-trellis worktree prepare --target <target-worktree>` with an explicit developer identity when requested.
|
|
23
|
+
- `needs-prepare`: run `flower-trellis worktree prepare --target <target-worktree>` with an explicit developer identity when requested. Add `--inherit-route-prefs` only when the user wants the same developer's normalized personal route defaults from the current controlling worktree.
|
|
24
24
|
- `needs-init`: initialize Trellis in that branch; do not copy another worktree's version.
|
|
25
25
|
- `needs-migration`: run `flower-trellis worktree migrate --target <target-worktree> --dry-run` before the real migration.
|
|
26
26
|
- `blocked` or `error`: stop and report the stable reason and conflict paths.
|
|
27
|
-
4. For a new parallel task,
|
|
27
|
+
4. For a new parallel task, load Trellis package context before requesting the plan:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Treat the default package as the selected root repository. Correlate package entries marked as Git repositories with the engine's submodule inventory. Display every additional independent Git package by name and path, and require its base/branch to be confirmed separately after handoff; never infer a child repository base from the root branch.
|
|
34
|
+
5. Request the read-only create plan before planning files exist. Omit `--base` to use the current source branch; detached sources fall back to `HEAD`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
flower-trellis worktree create --target <path> --branch <branch> [--base <ref>] \
|
|
31
38
|
--task-title <title> --task-slug <slug>
|
|
32
39
|
```
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
6. Present one compact confirmation view containing the selected root repository/branch/HEAD, requested and resolved base, target branch/path/task, root dirty warning, selected-commit submodules, independent Git packages, developer initialization, normalized route preference action, and excluded local state. State explicitly that only the selected root gets the new branch; submodules and independent Git packages are inventory-only.
|
|
42
|
+
7. Ask for exactly one choice: confirm the displayed plan, change its inputs, or cancel. On confirmation, execute the exact plan fingerprint returned by preflight:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
flower-trellis worktree create --target <path> --branch <branch> [--base <ref>] \
|
|
46
|
+
--task-title <title> --task-slug <slug> \
|
|
47
|
+
--yes --plan-fingerprint <fingerprint>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
8. If the engine returns `create-plan-changed`, show the latest returned plan and require a new confirmation. Never reuse the old fingerprint.
|
|
51
|
+
9. Continue task planning in a new AI session whose cwd/workspace root is the returned handoff directory. Do not continue the source session inside the new worktree.
|
|
35
52
|
|
|
36
53
|
## Safety Rules
|
|
37
54
|
|
|
38
55
|
- `status` is read-only.
|
|
39
|
-
- `
|
|
56
|
+
- A `create` call without `--yes` is also read-only and must return `confirmation-required` plus a fingerprint.
|
|
57
|
+
- `prepare` only creates target-local gitignored state and registry metadata. By default it reads no other worktree. Explicit route inheritance requires the same canonical Git common dir and developer, and preserves an existing target preference file.
|
|
40
58
|
- `migrate` may replace only schema v1 manifest-managed symlinks, and only with content reconstructed from the target branch itself.
|
|
41
59
|
- Do not read the legacy `sourceRoot` as migration content.
|
|
42
60
|
- `create` does not attach or move an existing task.
|
|
61
|
+
- Root tracked, staged, untracked, and conflict state is a warning only and is never included in the selected base commit, copied, stashed, or treated as an implicit blocker.
|
|
62
|
+
- The only personal preference eligible for inheritance is `.trellis/.route-prefs.tmp`. Read only a regular file, keep only legal `implement` and `check` values, and write normalized fixed-order content. Never copy its original bytes.
|
|
63
|
+
- Do not inherit session/current-task state, pre-check/untracked/auto-loop/Ralph state, agent temporary state, `.flower/state.json`, `.claude/settings.local.json`, caches, transactions, or backups.
|
|
64
|
+
- Selected-commit submodules are inventory facts. Report initialized source branch/HEAD without fetching, checking out, or copying submodule working trees.
|
|
43
65
|
- `remove` requires a clean worktree with no active task, session, or lock; it preserves the branch.
|
|
44
66
|
- Do not use force, copy directories between worktrees, or treat setup as approval to start, check, commit, merge, or push.
|
|
45
67
|
|
|
@@ -20,26 +20,48 @@ flower-trellis worktree status --target <target-worktree> --json
|
|
|
20
20
|
|
|
21
21
|
3. Route by status:
|
|
22
22
|
- `ready-local`: continue with the user's original Trellis intent in this worktree.
|
|
23
|
-
- `needs-prepare`: run `flower-trellis worktree prepare --target <target-worktree>` with an explicit developer identity when requested.
|
|
23
|
+
- `needs-prepare`: run `flower-trellis worktree prepare --target <target-worktree>` with an explicit developer identity when requested. Add `--inherit-route-prefs` only when the user wants the same developer's normalized personal route defaults from the current controlling worktree.
|
|
24
24
|
- `needs-init`: initialize Trellis in that branch; do not copy another worktree's version.
|
|
25
25
|
- `needs-migration`: run `flower-trellis worktree migrate --target <target-worktree> --dry-run` before the real migration.
|
|
26
26
|
- `blocked` or `error`: stop and report the stable reason and conflict paths.
|
|
27
|
-
4. For a new parallel task,
|
|
27
|
+
4. For a new parallel task, load Trellis package context before requesting the plan:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Treat the default package as the selected root repository. Correlate package entries marked as Git repositories with the engine's submodule inventory. Display every additional independent Git package by name and path, and require its base/branch to be confirmed separately after handoff; never infer a child repository base from the root branch.
|
|
34
|
+
5. Request the read-only create plan before planning files exist. Omit `--base` to use the current source branch; detached sources fall back to `HEAD`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
flower-trellis worktree create --target <path> --branch <branch> [--base <ref>] \
|
|
31
38
|
--task-title <title> --task-slug <slug>
|
|
32
39
|
```
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
6. Present one compact confirmation view containing the selected root repository/branch/HEAD, requested and resolved base, target branch/path/task, root dirty warning, selected-commit submodules, independent Git packages, developer initialization, normalized route preference action, and excluded local state. State explicitly that only the selected root gets the new branch; submodules and independent Git packages are inventory-only.
|
|
42
|
+
7. Ask for exactly one choice: confirm the displayed plan, change its inputs, or cancel. On confirmation, execute the exact plan fingerprint returned by preflight:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
flower-trellis worktree create --target <path> --branch <branch> [--base <ref>] \
|
|
46
|
+
--task-title <title> --task-slug <slug> \
|
|
47
|
+
--yes --plan-fingerprint <fingerprint>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
8. If the engine returns `create-plan-changed`, show the latest returned plan and require a new confirmation. Never reuse the old fingerprint.
|
|
51
|
+
9. Continue task planning in a new AI session whose cwd/workspace root is the returned handoff directory. Do not continue the source session inside the new worktree.
|
|
35
52
|
|
|
36
53
|
## Safety Rules
|
|
37
54
|
|
|
38
55
|
- `status` is read-only.
|
|
39
|
-
- `
|
|
56
|
+
- A `create` call without `--yes` is also read-only and must return `confirmation-required` plus a fingerprint.
|
|
57
|
+
- `prepare` only creates target-local gitignored state and registry metadata. By default it reads no other worktree. Explicit route inheritance requires the same canonical Git common dir and developer, and preserves an existing target preference file.
|
|
40
58
|
- `migrate` may replace only schema v1 manifest-managed symlinks, and only with content reconstructed from the target branch itself.
|
|
41
59
|
- Do not read the legacy `sourceRoot` as migration content.
|
|
42
60
|
- `create` does not attach or move an existing task.
|
|
61
|
+
- Root tracked, staged, untracked, and conflict state is a warning only and is never included in the selected base commit, copied, stashed, or treated as an implicit blocker.
|
|
62
|
+
- The only personal preference eligible for inheritance is `.trellis/.route-prefs.tmp`. Read only a regular file, keep only legal `implement` and `check` values, and write normalized fixed-order content. Never copy its original bytes.
|
|
63
|
+
- Do not inherit session/current-task state, pre-check/untracked/auto-loop/Ralph state, agent temporary state, `.flower/state.json`, `.claude/settings.local.json`, caches, transactions, or backups.
|
|
64
|
+
- Selected-commit submodules are inventory facts. Report initialized source branch/HEAD without fetching, checking out, or copying submodule working trees.
|
|
43
65
|
- `remove` requires a clean worktree with no active task, session, or lock; it preserves the branch.
|
|
44
66
|
- Do not use force, copy directories between worktrees, or treat setup as approval to start, check, commit, merge, or push.
|
|
45
67
|
|