@sassywares/skills 0.11.14 → 0.11.15

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/CONCEPTS.md CHANGED
@@ -54,6 +54,10 @@ owns the lifecycle; the scripts in `.sassywares/worktree/` own the git.
54
54
  `~/.sassywares/worktrees/<repo>/<slug>`. It shares one object store and one
55
55
  branch lock with the main checkout, so the same branch can never be held twice
56
56
  — the property that makes it safe where a `git clone` per agent is not.
57
+ - **Permission, not a default** — `worktrees.enabled: true` means a checkout may
58
+ be offered. A run asks before taking one and otherwise works in the main
59
+ checkout: two runs only collide when they are actually parallel, and an unasked
60
+ checkout relocates the work and leaves the uncommitted tree behind.
57
61
  - **Slug** — the branch with `/` flattened (`feat/catalog` → `feat-catalog`). It
58
62
  names the directory, the port, and the registry entry.
59
63
  - **Namespace** — the slug prefixed with the repo (`shop-feat-catalog`), and the
@@ -114,7 +118,7 @@ A settled in-context brief produced by `sassy-plan` when the user picks "start w
114
118
 
115
119
  ## Handoff
116
120
 
117
- `sassy-handoff` in `mode:write` writes a self-contained handoff file under `/tmp/sassywares/handoffs/` and gives the user a `sassy-handoff mode:read <path>` command; `mode:read` in the fresh session summarizes what was done, why, and the current state against the tree, then asks what to do next. A skill cannot start a session, so the user opens the fresh one; the file is the only bridge, in any harness.
121
+ `sassy-handoff` in `mode:write` writes a self-contained handoff file under `/tmp/sassywares/handoffs/` and gives the user a `sassy-handoff mode:read <path>` command; `mode:read` in the fresh session summarizes what was done, why, and the current state against the tree, then asks what to do next. A skill cannot start a session, so the user opens the fresh one; the file is the only bridge, in any harness. Reaching for it is the user's call alone: no skill in the plan → work → ship pipeline writes, offers, or suggests one, and a run ends at its own report.
118
122
 
119
123
  ## Release
120
124
 
package/README.md CHANGED
@@ -89,9 +89,9 @@ Debugging:
89
89
  | **`sassy-plan`** | Grills you one question at a time through every branch of the work — pushing back, assuming nothing, sketching UI on request — until nothing is open, then offers three choices: write the plan, start working via `sassy-work`, or implement and ship via `sassy-lfg`. |
90
90
  | **`sassy-goal`** | Runs a project too big for one plan — a migration, an epic — as a goal split into slices that each ship something complete. `mode:write` (default) grills and writes the goal, `mode:next` plans the next slice via `sassy-plan`, `mode:check` validates a shipped slice and carries its lessons forward, `mode:close` verifies the whole goal. You run every step. |
91
91
  | **`sassy-scout`** | Grounds an area on demand and writes the shared grounding brief other agents read instead of re-exploring. |
92
- | **`sassy-work`** | Executes exactly one plan phase, or one in-context brief, commits after code approval, then hands off the next phase — a brief stops before ship. |
92
+ | **`sassy-work`** | Executes exactly one plan phase, or one in-context brief, commits after code approval, then stops — the next phase is a run you start. A brief stops before ship. |
93
93
  | **`sassy-lfg`** | Executes every phase of a plan, or one in-context brief, then closes out via `sassy-ship` after code approval. |
94
- | **`sassy-worktree`** | One checkout per branch, each with its own derived namespace and port, so two agents can work in one repo. `create`, `list`, `preview`, `remove`, `prune` — and `preview` brings a checkout up so you can look at it without setting it up by hand. |
94
+ | **`sassy-worktree`** | One checkout per branch, each with its own derived namespace and port, so two agents can work in one repo — taken when you ask, never because the config allows it. `create`, `list`, `preview`, `remove`, `prune` — and `preview` brings a checkout up so you can look at it without setting it up by hand. |
95
95
  | **`sassy-cycle`** | Runs one unit of work through implement → review + simplify + validate → fix → verify, with at most two verified fix passes. Also reworks finished work from requested changes or failed QA rows. |
96
96
  | **`sassy-debug`** | Diagnoses a bug, gates the fix, fixes via `sassy-work` (cycle, code approval, commit), then ships. Debug takes no mode and always leaves ship's review gate in place unless you invoke ship yourself with `mode:auto`. |
97
97
  | **`sassy-handoff`** | `mode:write` (default) writes a self-contained handoff file to `/tmp/sassywares/handoffs/` and gives you a `sassy-handoff mode:read <path>` command for a fresh session; `mode:read` explains what the handoff did, why, and where things stand now, then asks what to do next. Works in any harness. |
@@ -177,7 +177,7 @@ hooks:
177
177
  # after_create: [] # derive .env, seed, copy the session in
178
178
  # before_remove: [] # drop the database, shut the device
179
179
  worktrees: # parallel checkouts of this repo
180
- enabled: false # true = a run may work in its own checkout
180
+ enabled: false # true = a run may offer its own checkout
181
181
  dir: ~/.sassywares/worktrees # parent of the per-repo folder
182
182
  ports: 3000-3099 # optional; delete for a non-port preview
183
183
  dogfood: # agent QA: a stored procedure that proves a change runs
@@ -204,6 +204,11 @@ that also carries `.sassywares/config.yaml`. Anything else — another tool's
204
204
  worktree, or one cut from a ref that predates the wiring — is counted in a footer
205
205
  and left alone.
206
206
 
207
+ `enabled: true` makes a checkout **available**, never default: a run asks before it
208
+ takes one and otherwise works in the main checkout, because two runs only collide
209
+ when they are actually parallel. `sassy-worktree create` takes one whenever you
210
+ ask for it.
211
+
207
212
  `create` derives the identity from the branch and prints it — `WT_PATH`,
208
213
  `WT_SLUG`, `WT_NAMESPACE` — so a project's hook derives `.env`, a database name,
209
214
  or a simulator from one source instead of inventing its own.
@@ -307,7 +312,7 @@ flowchart LR
307
312
 
308
313
  Option 1 produces a durable plan with phased slices and QA tables. Options 2 and 3 keep the whole job as one settled in-context brief and write no plan file.
309
314
 
310
- `sassy-work` handles one phase and hands off the next. `sassy-lfg` drains the whole plan in one session. Both delegate to `sassy-cycle` and stop at one gate carrying code approval plus the QA checklist; nothing is `Done`, committed, or shipped until both pass. `Manual` rows are yours to run. `Auto` rows are proved before the gate by `sassy-dogfood`, and a failed one goes back through the cycle as a finding. With an in-context brief there are no QA rows, so the gate is code approval alone.
315
+ `sassy-work` handles one phase and stops after its commit. `sassy-lfg` drains the whole plan in one session. Both delegate to `sassy-cycle` and stop at one gate carrying code approval plus the QA checklist; nothing is `Done`, committed, or shipped until both pass. `Manual` rows are yours to run. `Auto` rows are proved before the gate by `sassy-dogfood`, and a failed one goes back through the cycle as a finding. With an in-context brief there are no QA rows, so the gate is code approval alone.
311
316
 
312
317
  Inside the cycle, every finding is fixed and then **verified**: a reviewer scoped to the fix confirms each finding resolved, and checks the fix itself for anything new. Whatever is still open gets a second fix pass; anything open after that comes back `blocked` rather than looping. Critical findings, warnings, and validator gaps are fixed automatically; the simplifier's findings are applied in the same pass but never block; the reviewer's suggestions are listed at the gate for you to pick. Changes you request at the gate and QA rows that fail go through the same loop as findings, then the gate comes back.
313
318
 
@@ -379,13 +384,14 @@ The artifact decides QA: a plan document carries QA tables that gate phase compl
379
384
 
380
385
  ## Branching
381
386
 
382
- `sassy-work`, `sassy-lfg`, and `sassy-debug` decide the branch **before they touch code**, from `commit.branch` (default `new`) compared against `base_map`. On `new`, the run cuts a branch and every commit — phases, docs, ship — lands on it, so no change ever exists on a base branch. A run that is already on a branch that is not a base reuses it, which is how a handed-off phase, a resumed run, or `sassy-lfg` after `sassy-work` converges instead of cutting a second branch.
387
+ `sassy-work`, `sassy-lfg`, and `sassy-debug` decide the branch **before they touch code**, from `commit.branch` (default `new`) compared against `base_map`. On `new`, the run cuts a branch and every commit — phases, docs, ship — lands on it, so no change ever exists on a base branch. A run that is already on a branch that is not a base reuses it, which is how a resumed run, a second `sassy-work` for the next phase, or `sassy-lfg` after `sassy-work` converges instead of cutting a second branch.
383
388
 
384
- With `worktrees.enabled`, `create` runs in a worktree instead of checking out in
385
- place, so the branch and its checkout appear together; the rest of the run works
386
- in `WT_PATH` and the main checkout stays read-only. A run that finds itself on a
387
- non-base branch reuses it, which is what keeps a resumed phase inside the
388
- worktree the first one cut.
389
+ With `worktrees.enabled`, a run **offers** a worktree when it cuts a branch and
390
+ takes one only if you say yes: the branch and its checkout appear together, the
391
+ rest of the run works in `WT_PATH`, and the main checkout stays read-only. Say no
392
+ and the branch is cut in place, as usual. A run that finds itself on a non-base
393
+ branch reuses it, which is what keeps a resumed run inside the worktree the first
394
+ one took.
389
395
 
390
396
  A base is **any `base_map` value**, not just the remote default: in a repo whose `"*"` targets `staging`, standing on `staging` counts as standing on a base. That distinction is the whole point of the key — see [`skills/sassy-setup/references/branching.md`](skills/sassy-setup/references/branching.md).
391
397
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassywares/skills",
3
- "version": "0.11.14",
3
+ "version": "0.11.15",
4
4
  "description": "Lean, explicit-invocation Agent Skills for shipping fast: plan, work, review, validate, ship.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -5,8 +5,8 @@ description: >-
5
5
  self-contained handoff file under /tmp/sassywares and gives the user a
6
6
  command to continue in a fresh session; mode:read takes a handoff file,
7
7
  explains what was done, why, and where things stand, then asks what to do
8
- next. Use at a phase boundary, when context is getting long, when the user
9
- asks to hand off, or to pick up a handoff file.
8
+ next. Use when the user asks to hand off or to pick up a handoff file — it is
9
+ never proposed on the model's own initiative.
10
10
  argument-hint: "[mode:write|read] [goal for the next session | handoff file path]"
11
11
  ---
12
12
 
@@ -63,4 +63,5 @@ Anything unresolved, and anything the next session must not do.
63
63
  - **Pointer-first.** Plan paths, phases, files, and decisions are named, not reproduced. The plan is the source of truth; the file points at it.
64
64
  - **Outside the repo.** Handoff files live under `/tmp/sassywares/` only — never committed, never inside the working tree.
65
65
  - **No secrets.** A handoff file never carries credentials, tokens, or unrelated personal data, and `read` never echoes one.
66
+ - **The user's call alone.** No skill in the plan → work → ship pipeline writes, offers, or suggests a handoff. Run this only when the user asks for one; a run that reaches a natural stopping point reports and ends there.
66
67
  - **The skill does not switch sessions.** Never claim it did.
@@ -1,7 +1,7 @@
1
1
  # Mode: write — capture the session for a fresh one
2
2
 
3
3
  1. **Determine the continuation goal.**
4
- - At a sassy plan phase boundary: the next phase that is not `Done`, continued by invoking `sassy-work <plan> phase:<n>`.
4
+ - When the user stops after a phase: the next phase that is not `Done`, continued by invoking `sassy-work <plan> phase:<n>`.
5
5
  - After a `sassy-plan` run that kept the work in a brief instead of writing a plan: continue from that brief. There is no plan path, so the brief itself — goal, decisions, constraints, done-when — goes in the file.
6
6
  - Otherwise: the user's stated objective for the next session.
7
7
  - If the goal is genuinely unclear, ask. Do not fabricate a handoff.
@@ -77,18 +77,30 @@ config. This applies to every token these skills forward, not just `branch`.
77
77
  "release" is not a neutral name.
78
78
  5. If the name already exists: reuse it when it descends from `start-point`;
79
79
  stop and ask when it has diverged.
80
- 6. **Create the branch — in a worktree when the project asked for one.**
81
- With `worktrees.enabled: true` (per `worktree.md`), run the `sassy-worktree`
82
- skill's `create` for this run instead of checking out in place: it cuts the
83
- branch and the checkout together, so the branch can never be held twice, and
84
- it prints the `WT_*` namespace the run inherits. Two things follow, and both
85
- are the orchestrator's to carry:
80
+ 6. **Create the branch — in place, or in a worktree if the user says so.**
81
+ `worktrees.enabled: true` (per `worktree.md`) means this project *allows* a
82
+ checkout. It is permission, not a default: two runs only collide when they are
83
+ actually parallel, so guessing wrong moves the work to another directory,
84
+ leaves the uncommitted tree behind, and spends the `after_create` setup on a
85
+ checkout nobody needed. Ask once, here, with the branch named — *this
86
+ checkout, or a worktree of its own?* — and take the answer. Silence is not a
87
+ yes, and never ask when the answer cannot matter: a run standing on a non-base
88
+ branch reuses its branch and its checkout (`reuse`), and a human who wanted a
89
+ checkout already ran `sassy-worktree create`. With the config off, do not ask:
90
+ a user who wants a checkout anyway gets `sassy-worktree`'s refusal and the
91
+ switch that turns it on.
92
+
93
+ On yes, run the `sassy-worktree` skill's `create` for this run instead of
94
+ checking out in place: it cuts the branch and the checkout together, so the
95
+ branch can never be held twice, and it prints the `WT_*` namespace the run
96
+ inherits. Two things follow, and both are the orchestrator's to carry:
86
97
  - **Every step from here on works in `WT_PATH`,** and every delegated brief
87
98
  names that absolute path. The main checkout is read-only for the rest of the
88
99
  run — config, listing, nothing else.
89
100
  - **A dirty tree does not come along,** unlike a checkout: the worktree starts
90
101
  clean from `start-point`. Say in the gate summary that uncommitted work stays
91
102
  behind, because that is a change in what a run means.
103
+
92
104
  Otherwise `git checkout -b <name> <start-point>` here, and uncommitted work
93
105
  comes along — say so in the gate summary if the tree was dirty.
94
106
  7. Report the branch, the start point, `pr-base`, and the checkout it landed in.
@@ -97,7 +109,7 @@ config. This applies to every token these skills forward, not just `branch`.
97
109
 
98
110
  Report `head` and the checkout you are in, and carry on. Do **not** re-cut because
99
111
  `commit.branch` is `new`:
100
- a second phase, a resumed run, or a handed-off session is already standing on
112
+ a second phase, a resumed run, or `sassy-lfg` after `sassy-work` is already standing on
101
113
  the branch the first one cut. That is the whole reason this is inferred rather
102
114
  than forced. It is also what keeps a run inside its own worktree: it finds itself
103
115
  on a non-base branch and reuses it rather than nesting another checkout.
@@ -84,7 +84,7 @@ hooks:
84
84
  # after_create: [] # derive .env, seed, copy the session
85
85
  # before_remove: [] # drop the database, shut the device
86
86
  worktrees:
87
- enabled: false # true = a run may work in its own checkout
87
+ enabled: false # true = a run may offer its own checkout
88
88
  dir: ~/.sassywares/worktrees # parent of the per-repo folder; ~ is allowed here
89
89
  ports: 3000-3099 # optional; delete for a non-port preview
90
90
  dogfood:
@@ -117,7 +117,7 @@ dogfood:
117
117
  | `dogfood.recipe` | `.sassywares/dogfood/recipe.md` | The stored procedure `sassy-dogfood` executes. Its `Prove it:` step is the verdict |
118
118
  | `dogfood.reports` | `.sassywares/dogfood/reports` | Where a run writes its summary, step logs, and artifacts. Must be gitignored |
119
119
  | `dogfood.timeout` | `900` | Wall-clock for one run. A timeout is a failure, never a hang |
120
- | `worktrees.enabled` | `false` | `true` lets a run work in its own checkout instead of this one. Needs `commit.branch: new` |
120
+ | `worktrees.enabled` | `false` | `true` lets a run *offer* its own checkout; it asks, and the run stays in this one unless you say yes. Needs `commit.branch: new` |
121
121
  | `worktrees.dir` | `~/.sassywares/worktrees` | Parent of the per-repo worktree folder. The one path here that may be absolute or `~/` |
122
122
  | `worktrees.ports` | `3000-3099` | The range a checkout claims its private port from. **Optional**: without it a checkout holds no port and is addressed by the recipe's preview line — which is how a mobile, desktop, or CLI project previews |
123
123
 
@@ -196,8 +196,8 @@ branch from `origin/<base>` then leaves them behind entirely.
196
196
  | `new` (default) | Never commit on a base branch. Cut one first, then stay on it for the rest of the run |
197
197
 
198
198
  A branch that is already checked out and is **not** a base is reused, whatever
199
- the config says. That is what makes a second phase, a resumed run, or a
200
- handed-off session converge on the branch the first one cut instead of cutting
199
+ the config says. That is what makes a second phase, a resumed run, or
200
+ `sassy-lfg` after `sassy-work` converge on the branch the first one cut instead of cutting
201
201
  another.
202
202
 
203
203
  A base is **any `base_map` value**, plus the remote default — not the remote
@@ -409,6 +409,12 @@ worktrees:
409
409
  Three keys, no commands. The scripts in `.sassywares/worktree/` own the
410
410
  mechanics and `sassy-worktree` orchestrates them.
411
411
 
412
+ **`enabled: true` is permission, not a default.** It makes a checkout available;
413
+ `branching.md` still asks before a run takes one, and the run works in the main
414
+ checkout until the answer is yes. Two runs only collide when they are actually
415
+ parallel, and an unasked checkout relocates the work, leaves the uncommitted tree
416
+ behind, and pays the setup hooks for a checkout nobody needed.
417
+
412
418
  **A port is a resource, not the model.** Delete `ports` for an app whose preview
413
419
  is not a URL: no port is derived, `WT_PORT` and `WT_BASE_URL` are absent, and
414
420
  `list` shows the recipe's `**Preview:**` line instead. `dir` is the one path in this
@@ -418,7 +424,7 @@ something a teammate clones.
418
424
  **Two conditions.**
419
425
 
420
426
  - `enabled: true` needs `commit.branch: new`. Under `current` a run commits where
421
- it stands and never cuts a branch, so nothing would ever create a worktree;
427
+ it stands and never cuts a branch, so nothing would ever offer a worktree;
422
428
  `--check` says so rather than leaving a switch that does nothing.
423
429
  - It needs the `repo` topology. A `workspace` root and a `none` folder have no
424
430
  git to cut a checkout from.
@@ -24,7 +24,7 @@ Never re-ask what the tree already said.
24
24
  - **`commit.branch`** — default `new`: the run cuts a branch before the first change and never commits on a base branch. Offer `current` for a repo that genuinely wants work committed where it stands, and say plainly that `current` lets a run commit onto its base branch and push it, with no PR (`pr.*` and `hooks.pr` are ignored; `hooks.push` runs), and that a later `sassy-ship` run in `mode:auto` will then push to that base with no gate.
25
25
  - **`pr.*`** — default `babysit: true`, `merge: false`, `delete_branch: false`. Say plainly that `merge: true` authorizes merging every babysat PR in this project without asking.
26
26
  - **Hooks** — offer, do not impose. Ask whether the project wants steps injected at `before_create`, `after_create`, `before_merge`, or `after_merge` (or `hooks.push` `after_push`, for `commit.branch: current` only), and under which head branch (`"*"` for all). Entries may carry args (`<skill> <args…>`); a hook skill's args are its own vocabulary. Leave them `[]` when there is nothing to add. **Never write a hook skill yourself** — hooks are project skills, and copying one of ours into that role is the fork this mechanism exists to prevent.
27
- - **Worktrees** — ask whether the project wants parallel work in this repo: a checkout per branch, each with its own derived namespace and port, so two runs never fight over one working tree. Say plainly what it costs and what it needs. `false` — the run works here, which is today's behaviour. `true` — a run may create a checkout, and `sassy-worktree` gains `create`, `list`, `preview`, `remove`, and `prune`. It needs `commit.branch: new`: under `current` nothing ever cuts a branch, so the switch would do nothing — say so and leave it `false` rather than writing a setting that cannot fire. In `workspace` or `none` topology, say it is not available and write `false`. Read `references/worktree.md`. **Say what a checkout will need for this project** — install, `.env` derivation, a per-namespace database, a simulator, the session — and offer to create the hook with `sassy-skill`; **never write its body yourself**. With no hook, say plainly that every new checkout starts empty and the first preview will show it.
27
+ - **Worktrees** — ask whether the project wants parallel work in this repo: a checkout per branch, each with its own derived namespace and port, so two runs never fight over one working tree. Say plainly what it costs and what it needs. `false` — the run works here, which is today's behaviour. `true` — a run may *offer* a checkout and takes one only on your yes, and `sassy-worktree` gains `create`, `list`, `preview`, `remove`, and `prune`. It needs `commit.branch: new`: under `current` nothing ever cuts a branch, so the switch would do nothing — say so and leave it `false` rather than writing a setting that cannot fire. In `workspace` or `none` topology, say it is not available and write `false`. Read `references/worktree.md`. **Say what a checkout will need for this project** — install, `.env` derivation, a per-namespace database, a simulator, the session — and offer to create the hook with `sassy-skill`; **never write its body yourself**. With no hook, say plainly that every new checkout starts empty and the first preview will show it.
28
28
  - **Dogfood** — ask whether the project wants agent QA: a stored procedure that proves a change works in the running product, which then lets `sassy-plan` write `Mode: Auto` QA rows instead of manual ones. Say plainly what each answer means. `false` — every QA row stays a human's, which is today's behavior. `true` — a plan may write Auto rows, but only for a recipe section that carries a `Prove it:` step, so the switch alone never makes a gate prove something. Write the answer explicitly either way; never leave it to inference. On yes, scaffold per step 4 and offer to run the first `sassy-dogfood mode:discover` before this run ends: yes means do it now (it is the only step that knows how to bring this app up), no means hand over the command and say the recipe stays a skeleton until it runs. Read `references/dogfood.md` and **never** write a command into the block or author the procedure: the recipe is the project's, and its first real content comes from a `sassy-dogfood mode:discover` run.
29
29
 
30
30
  ## 4. Write the config
@@ -69,7 +69,7 @@ Both install the same way: report the scope if the pieces are present, otherwise
69
69
 
70
70
  Two independent sets, each only when its answer was yes.
71
71
 
72
- - **Worktrees, `repo` topology and `worktrees.enabled: true`.** Copy every file in `assets/worktree/` flat into `.sassywares/worktree/` and make the five scripts executable, then add one `worktree:<script>` alias per script to the project's manifest, append-only, exactly as the workspace aliases are. **Prove the merge**: the file must still parse (`node -p "require('./package.json')"`, or the manifest's own syntax check) and `git diff` must show only added lines plus at most one trailing comma — anything else is a rewrite, so restore the file from `HEAD` and insert again. Report the `worktree-version` you installed. **Ask before overwriting any of them when they already exist** — from the first install they are the project's files. Read `references/worktree.md`. Do not create a worktree, and do not run a script: installing is the whole job, and the first `create` belongs to a run or to the user.
72
+ - **Worktrees, `repo` topology and `worktrees.enabled: true`.** Copy every file in `assets/worktree/` flat into `.sassywares/worktree/` and make the five scripts executable, then add one `worktree:<script>` alias per script to the project's manifest, append-only, exactly as the workspace aliases are. **Prove the merge**: the file must still parse (`node -p "require('./package.json')"`, or the manifest's own syntax check) and `git diff` must show only added lines plus at most one trailing comma — anything else is a rewrite, so restore the file from `HEAD` and insert again. Report the `worktree-version` you installed. **Ask before overwriting any of them when they already exist** — from the first install they are the project's files. Read `references/worktree.md`. Do not create a worktree, and do not run a script: installing is the whole job, and the first `create` belongs to the user — a run only asks.
73
73
  - **Workspace, `workspace` topology only.** The snapshot plus the `branches` / `pull` / `checkout-bases` git helpers, and one `workspace:<script>` alias per script in the project's own manifest. Read `references/workspace.md` and follow it.
74
74
 
75
75
  Then return to `SKILL.md` for steps 7–9.
@@ -10,8 +10,15 @@ nested repo carries its own config, so there is nothing to cut a checkout from;
10
10
  says why, `--check` reports an `enabled: true` as drift, and the scripts refuse
11
11
  with that reason rather than "not a git repository".
12
12
 
13
- Read this when the project has `worktrees.enabled: true`, or when the user asks
14
- to run two agents in one project.
13
+ Read this when the project has `worktrees.enabled: true`, when a run is about to
14
+ cut a branch, or when the user asks to run two agents in one project.
15
+
16
+ **`enabled: true` is permission, not a default.** A run asks before it takes a
17
+ checkout and stays in the main one otherwise: two runs only collide when they are
18
+ actually parallel, and one taken unasked moves the work to another directory,
19
+ leaves the uncommitted tree behind, and spends the `after_create` setup on a
20
+ checkout nobody needed. `branching.md` owns that ask. `sassy-worktree` runs after
21
+ the answer is yes, or when a human asks for a checkout outright.
15
22
 
16
23
  ## Install
17
24
 
@@ -192,6 +199,8 @@ implied.
192
199
  - **One worktree per run.** `references/branching.md` decides; a run already on
193
200
  a non-base branch reuses it, so a second `sassy-work` in the same checkout does
194
201
  not nest another worktree.
202
+ - **Enabled is permission, not a default.** A run offers a checkout and takes one
203
+ only on the user's yes; the main checkout is where work happens until then.
195
204
  - **Never operate on another worktree.** A delegation brief carries the absolute
196
205
  path of the checkout it may touch; `MAIN` is for reading config and listing.
197
206
  - **Never `git stash`.** It is repository-global: a stash taken in one worktree
@@ -202,5 +211,5 @@ implied.
202
211
  through one checkout corrupts the other. Let the package manager's store do
203
212
  the deduplicating.
204
213
  - **`worktrees.enabled` needs `commit.branch: new`.** Under `current` a run
205
- commits where it stands and never cuts a branch, so no run would ever create a
214
+ commits where it stands and never cuts a branch, so no run would ever offer a
206
215
  worktree; `--check` notes the combination.
@@ -778,7 +778,7 @@ if (( CHECK )); then
778
778
  note " worktrees: no port resource — a checkout is addressed by the recipe's preview line"
779
779
  fi
780
780
  if [[ "$(yflat "commit${US}branch" 2>/dev/null || true)" == "current" ]]; then
781
- note " worktrees.enabled with commit.branch: current — a run never cuts a branch, so no run creates one"
781
+ note " worktrees.enabled with commit.branch: current — a run never cuts a branch, so no run offers a checkout"
782
782
  fi
783
783
 
784
784
  wt_lib="$ROOT/.sassywares/worktree/_lib.sh"
@@ -1377,9 +1377,10 @@ cat <<'EOF'
1377
1377
  # --- Worktrees ------------------------------------------------------------
1378
1378
  # Parallel work in one repo: a checkout per branch, each with its own derived
1379
1379
  # namespace, so two runs never fight over one working tree. enabled: true lets a
1380
- # run create one instead of working here — and needs commit.branch: new, because
1381
- # `current` never cuts a branch. The scripts in .sassywares/worktree/ own the
1382
- # mechanics; nothing else reads these values.
1380
+ # run offer one instead of working here — the run asks, and stays here unless the
1381
+ # answer is yes. It needs commit.branch: new, because `current` never cuts a
1382
+ # branch. The scripts in .sassywares/worktree/ own the mechanics; nothing else
1383
+ # reads these values.
1383
1384
  #
1384
1385
  # Repo topology only: a workspace root has no repo to cut a checkout from, and a
1385
1386
  # `none` folder has no git at all.
@@ -1389,7 +1390,7 @@ cat <<'EOF'
1389
1390
  # preview line instead (`$WT_NAMESPACE` names a simulator, a window, a path).
1390
1391
  worktrees:
1391
1392
  EOF
1392
- kv enabled false 34 '# true = a run may work in its own checkout'
1393
+ kv enabled false 34 '# true = a run may offer its own checkout'
1393
1394
  kv dir '~/.sassywares/worktrees' 34 '# parent of the per-repo folder; ~ is allowed'
1394
1395
  kv ports 3000-3099 34 '# a private port per checkout; delete for non-port previews'
1395
1396
  cat <<'EOF'
@@ -2,15 +2,15 @@
2
2
  name: sassy-work
3
3
  description: >-
4
4
  Execute exactly one phase of a sassy plan by delegating to sassy-cycle, then
5
- hand off to a fresh session for the next phase (or close out via sassy-ship if
6
- it was the last). Also runs one settled in-context brief and stops before ship.
7
- The orchestrator only coordinates.
5
+ commit it (or close out via sassy-ship if it was the last). The next phase is
6
+ a run of its own when the user starts one. Also runs one settled in-context
7
+ brief and stops before ship. The orchestrator only coordinates.
8
8
  argument-hint: "<plan path | brief> [phase:<n>] [branch:infer|current|new]"
9
9
  ---
10
10
 
11
11
  # Sassy Work
12
12
 
13
- **Outcome:** one phase run through `sassy-cycle`, findings fixed, then a single gate that carries both the code approval and the phase's QA checklist (`Manual` rows from the user, `Auto` rows from a `sassy-dogfood` report), marked `Done` only when both pass, committed via `sassy-commit`; then a handoff that continues the **next** phase in a fresh session, or a `sassy-ship` close-out if this was the last phase.
13
+ **Outcome:** one phase run through `sassy-cycle`, findings fixed, then a single gate that carries both the code approval and the phase's QA checklist (`Manual` rows from the user, `Auto` rows from a `sassy-dogfood` report), marked `Done` only when both pass, committed via `sassy-commit`; then the run ends, or a `sassy-ship` close-out when this was the last phase.
14
14
 
15
15
  **Brief input** runs one cycle, presents the code approval gate, commits, and **stops before shipping**.
16
16
 
@@ -50,7 +50,7 @@ Always gate before committing. The cycle has already fixed and verified its find
50
50
  1. **Load the phase.** Read the plan and only the selected phase's section. If it is already `Done`, stop and report.
51
51
 
52
52
  If the phase is `In progress`, an earlier run was interrupted before both gates passed. Ask one question — resume at the gate, or re-run the cycle from scratch — and take the answer. Resuming skips the cycle and goes straight to step 5, but **still resolve the branch at step 2 first**: on `reuse` it is a no-op, and on `create` it is the difference between committing on the base and not.
53
- 2. **Resolve the branch, before touching code.** Follow the `sassy-setup` skill's `references/branching.md` with this run's `branch:` token, if any. On `create`, cut the branch now — not at commit time — so no change ever exists on a base branch. On `reuse`, stay where you are, which is how a handed-off later phase or a resumed run lands on the branch the first phase cut. On `stop-and-ask`, present the choice and wait. Carry the branch and its start point into every gate summary you present.
53
+ 2. **Resolve the branch, before touching code.** Follow the `sassy-setup` skill's `references/branching.md` with this run's `branch:` token, if any. On `create`, cut the branch now — not at commit time — so no change ever exists on a base branch. On `reuse`, stay where you are, which is how a later phase or a resumed run lands on the branch the first phase cut. On `stop-and-ask`, present the choice and wait. Carry the branch and its start point into every gate summary you present.
54
54
  3. **Run the cycle.** Set the phase `In progress` in the Phase tracking table, then load the `sassy-cycle` skill and follow it, with:
55
55
  - work brief = the phase's goal, work items, and "Done when" criteria
56
56
  - intent reference = the plan path and phase
@@ -60,21 +60,18 @@ Always gate before committing. The cycle has already fixed and verified its find
60
60
  5. **Present the phase gate.** Report the phase, what changed, findings raised and resolved (with the fix passes it took), the simplifications applied, the validator grade, the reviewer summary, and the reviewer's suggestions as options the user may pick. Then give the QA checklist verbatim: each row's ID, check, `Mode`, and — for `Manual` — how to run it and what passing looks like, and for `Auto` — the dogfood verdict and run id, with unreported rows `Pending`. Ask for both decisions — code approval (or the changes wanted, including any suggestions picked) and the result per `Manual` row. Wait.
61
61
  6. **Resolve the gate.** Three outcomes, nothing in between:
62
62
  - **Code approved and every QA row passes** → go to step 7.
63
- - **Code approved, `Manual` rows still pending** → record that code is approved but leave the phase `In progress`, tick nothing, commit nothing, hand off nothing, and report that the phase is waiting on manual QA plus the command that resumes it.
63
+ - **Code approved, `Manual` rows still pending** → record that code is approved but leave the phase `In progress`, tick nothing, commit nothing, and report that the phase is waiting on manual QA plus the command that resumes it.
64
64
  - **Changes requested, or any row fails** → a rework cycle: load `sassy-cycle` with the requested changes and the failing rows as its findings, and the plan path and phase as the intent reference. On `done`, re-prove the `Auto` rows (step 4) and present the gate again from step 5; on `blocked`, mark the phase `Blocked` and stop. A QA row that fails again after its rework is `Blocked` with the reason and stops the phase. Change requests have no cap — each one is the user's call.
65
65
  7. **Commit the phase.** On both gates passing, first mark the phase's QA rows `Done` — `Manual` rows with the user's notes, `Auto` rows with the verdict and run id from the report — and the phase `Done` in the Phase tracking table, then persist according to `git.repo`:
66
66
 
67
67
  - **A remote** — dispatch a `worker` whose task is: *load the `sassy-commit` skill and follow it with `branch:current`*, naming that the commit must include the phase's code changes, the QA table results, and the now-updated Phase tracking table. It returns the hash and subject. The branch already exists: step 2 cut it, so committing on it is the point of `branch:current` here.
68
68
  - **`workspace`** — dispatch a `worker` per affected repo to commit that repo's code on the run's shared branch, then run `.sassywares/workspace/snapshot` for the plan, QA results, and docs at the root. The gate's approval is the commit approval; the snapshot runs right after it and is never skipped. A missing or outdated `.sassywares/workspace/snapshot` is a blocker — say to run `sassy-setup`.
69
- - **`none`** — nothing is persisted. Report that the phase's work is uncommitted and stop; never hand off on top of it.
69
+ - **`none`** — nothing is persisted. Report that the phase's work is uncommitted and stop; nothing follows an uncommitted phase.
70
70
 
71
- Do not hand off or close out until the commit or snapshot succeeds.
71
+ Do not close out until the commit or snapshot succeeds.
72
72
  8. **On commit success:**
73
- - **A next phase exists** → load the `sassy-handoff` skill in `mode:write` with the goal *Execute phase <next> of <plan> by invoking `sassy-work <plan> phase:<next>`*. It writes the handoff file and gives the user a `sassy-handoff mode:read <path>` command; the next phase starts when they run it in a fresh session and pick it.
74
-
75
73
  - **This was the last phase** → run the close-out: load the `sassy-ship` skill and follow it (under `commit.branch: current` ship commits and pushes, with no PR).
76
-
77
- **Why a fresh session:** one phase per context keeps every phase's context small. A skill cannot start a session itself, so the handoff file is the bridge and the user opens the session.
74
+ - **Any phase is left** → report the commit and stop. Name the next phase and the command that picks it up — `sassy-work <plan>` takes the first phase that is not `Done` — and never start it in this session. Continuing, stopping for now, or choosing another executor is the user's call; do not offer or write a handoff.
78
75
 
79
76
  ## Brief input
80
77
 
@@ -93,8 +90,9 @@ When the argument is not a plan path, it is one settled brief:
93
90
  | Orchestrator only | Delegate all implementation and quality work to `sassy-cycle`. |
94
91
  | Branch before code | Resolve the branch per the `sassy-setup` skill's `references/branching.md` before the cycle runs, so no change ever lands on a base branch. |
95
92
  | One phase per run | Do exactly one phase. Never continue into the next phase in this session. |
96
- | Gate before commit and handoff | Do not commit, hand off, or close out until the user approves the code and the phase QA rows pass. |
97
- | Commit per phase | Commit the phase, its QA results, and the plan update via `sassy-commit` before handoff or close-out. |
93
+ | Gate before commit and close-out | Do not commit or close out until the user approves the code and the phase QA rows pass. |
94
+ | Commit per phase | Commit the phase, its QA results, and the plan update via `sassy-commit` before close-out. |
95
+ | Handing off is the user's | Never write a handoff or suggest one. The run ends at its report; `sassy-handoff` is invoked by the user, in their own session and on their own initiative. |
98
96
  | Done needs both gates | Mark a phase `Done` only when the user approves the code and every QA row for that phase is `Done`, never before. |
99
97
  | QA rows follow their mode | Tick a `Manual` row `Done` only from the user's explicit confirmation, and an `Auto` row only from a passing dogfood report; keep unreported rows `Pending`; a failed row is a finding for a rework cycle. |
100
98
  | Send-backs are rework | Requested changes and failed QA rows go through `sassy-cycle` as findings — verified, two fix passes at most — never a direct edit. |
@@ -103,7 +101,7 @@ When the argument is not a plan path, it is one settled brief:
103
101
  ## Failure handling
104
102
 
105
103
  - `sassy-cycle` returns `blocked` → mark the phase `Blocked`, stop, report the open findings and the diagnostic.
106
- - QA stays pending, or a row fails again after its rework → keep the phase `In progress` (or `Blocked` with the reason), commit nothing, hand off nothing, and report.
107
- - `sassy-commit` fails or leaves the phase changes uncommitted → stop and report; never hand off on top of uncommitted phase work.
108
- - The validator returns **Blocked — insufficient grounding** → treat it as a real blocker; do not advance or hand off.
104
+ - QA stays pending, or a row fails again after its rework → keep the phase `In progress` (or `Blocked` with the reason), commit nothing, and report.
105
+ - `sassy-commit` fails or leaves the phase changes uncommitted → stop and report; never close out on top of uncommitted phase work.
106
+ - The validator returns **Blocked — insufficient grounding** → treat it as a real blocker; do not advance.
109
107
  - Ambiguous or unsafe failure → stop and ask.
@@ -5,7 +5,8 @@ description: >-
5
5
  worktree per branch, each with its own derived namespace and port, created and
6
6
  torn down safely. `mode:preview` brings a checkout up so you can look at it
7
7
  without setting it up by hand. Use when asked for parallel work, a second
8
- checkout, or to see what a worktree looks like.
8
+ checkout, or to see what a worktree looks like, and when a run offers one and
9
+ the user accepts.
9
10
  argument-hint: "[slug] [mode:create|list|preview|remove|prune] [section:<name>]"
10
11
  ---
11
12
 
@@ -13,7 +14,7 @@ argument-hint: "[slug] [mode:create|list|preview|remove|prune] [section:<name>]"
13
14
 
14
15
  **Outcome:** a checkout per branch that a run or a human can use without touching the main one — created, addressed, previewed, and removed without losing work — or a table saying what exists and what is safe to delete.
15
16
 
16
- **Config.** Resolve `.sassywares/config.yaml` (nearest, walking up) per the `sassy-setup` skill's `references/config.md`. `worktrees.enabled` decides whether any of this runs; `dir` and `ports` are read by the scripts, not by you. Precedence: explicit token > session instruction > config > skill default. Read the `sassy-setup` skill's `references/worktree.md` before the first mode: it owns the directory, port, refusal, and hook rules the scripts implement.
17
+ **Config.** Resolve `.sassywares/config.yaml` (nearest, walking up) per the `sassy-setup` skill's `references/config.md`. `worktrees.enabled` decides whether a checkout is available at all — permission, never an instruction to take one; `dir` and `ports` are read by the scripts, not by you. Precedence: explicit token > session instruction > config > skill default. Read the `sassy-setup` skill's `references/worktree.md` before the first mode: it owns the directory, port, refusal, and hook rules the scripts implement.
17
18
 
18
19
  **The scripts do the git.** `.sassywares/worktree/{create,list,stop,remove,prune}` are installed by `sassy-setup` and own the mechanics: `git worktree`, the port claim, the refusals. This skill never runs `git worktree` itself, never invents a port, and never deletes a directory.
19
20
 
@@ -37,6 +38,7 @@ Resolve the mode: an explicit `mode:` token wins. With none, it is `list` — th
37
38
  |------|-------------|
38
39
  | The scripts do the git | Never run `git worktree`, never invent a port, never `rm -rf` a checkout. `.sassywares/worktree/*` owns all of it. |
39
40
  | Repo topology only | `git.repo: workspace` or `none` means no worktrees at all. Say so in one line and stop — never create a checkout inside a nested repo to work around it. |
41
+ | Enabled is permission | `worktrees.enabled: true` lets a run *offer* a checkout. `create` runs on the user's yes, or on a human asking outright — never because the config allowed it. |
40
42
  | Ours only | A checkout is managed when it sits under `worktrees.dir` **and** carries `.sassywares/config.yaml`. Never list, prune, stop, or remove one that is not — another tool made it, or it was cut before the wiring. `create` says so when that happens. |
41
43
  | Names come from the script | `WT_NAMESPACE` is derived once, and `WT_PORT` only when the project configured a range. Never build a database name, a compose project, or a device name by hand. |
42
44
  | Hooks are dispatched, not skipped | A declared `after_create` or `before_remove` runs. `remove` exits `3` rather than skipping it, and that is deliberate. |