@sassywares/skills 0.11.13 → 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.13",
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",
@@ -13,7 +13,7 @@ argument-hint: "[section:<name>] [mode:run|discover|check]"
13
13
 
14
14
  # Sassy Dogfood
15
15
 
16
- **Outcome:** a report with a verdict — `pass`, `failed` with the failing step and its output tail, or `env`/`recipe` explaining why the run could not judge the work — in `.sassywares/dogfood/reports/<run-id>/`, plus, in `mode:discover`, a `recipe.md` that a fresh agent can follow with no other context.
16
+ **Outcome:** a report with a verdict — `pass`, `failed` with the failing step and its output tail, or `env`/`recipe` explaining why the run could not judge the work — in `.sassywares/dogfood/reports/<run-id>/`; or, in `mode:discover`, a `recipe.md` a fresh agent can follow with no other context; or, in `mode:check`, a lint and the last verdict, printed.
17
17
 
18
18
  **A procedure is the artifact.** The project stores how to dogfood itself in `.sassywares/dogfood/recipe.md`: ordered steps, each with an observable expectation, ending in one `Prove it:` step whose exit code is the verdict. The config points at it; it never restates it. Read the `sassy-setup` skill's `references/dogfood.md` first — it owns the recipe format, the report layout, and the verdict classes, and this skill only executes them.
19
19
 
@@ -25,80 +25,26 @@ argument-hint: "[section:<name>] [mode:run|discover|check]"
25
25
 
26
26
  ## Modes
27
27
 
28
- | Mode | What it does |
29
- |------|--------------|
30
- | `run` (default) | Preflight, execute the procedure from the recipe, write the report, classify, report back |
31
- | `discover` | Build or repair the recipe: probe the repo, try the cheapest proof that could work, write down what actually worked |
32
- | `check` | Lint the config and the recipe and print the last report's verdict; runs nothing, changes nothing |
28
+ | Mode | Load | It ends with |
29
+ |---|---|---|
30
+ | `run` (default) | `references/run.md` | a verdict from a report, returned compactly |
31
+ | `discover` | `references/discover.md` | a `recipe.md` proven by a clean run, with every gap visible |
32
+ | `check` | `references/check.md` | a printed lint and the last verdict; nothing written |
33
33
 
34
- `run` never edits the recipe. `discover` never gates anything: it produces a
35
- recipe, and the next `run` is what proves it.
34
+ Resolve the mode: an explicit `mode:` token wins. With none, it is `run`; a request to check or lint the setup is `check`, and a request to build, repair, or set up the procedure is `discover`. Read the one reference for that mode **and only that one**.
36
35
 
37
- ## Steps — `mode:run`
36
+ `run` never edits the recipe, and `discover` never gates anything: it produces a recipe, and the next `run` is what proves it. Only `discover` improvises; a run executes what the recipe names, classifies what it cannot, and stops.
38
37
 
39
- 1. **Resolve the target.** Read the `dogfood:` block. If `enabled` is not `true`, stop with one line: reporting is not enabled, and enabling it is `sassy-setup mode:init`. Load the recipe; a section the caller names (`section:<name>`) is the target, otherwise every section. A missing recipe, or one whose section has no `Prove it:` step, stops the run and names `mode:discover`. A section whose `**Prove it:**` says `none` is refused with one line — it has no machine verdict by design, so its QA rows are `Manual`, and running it would only manufacture an opinion. Never guess a verdict from a procedure that has none.
40
- 2. **Open the report.** Create `<reports>/<YYYYMMDD-HHMMSS>/` with `steps/` and `artifacts/`, and write `summary.md` with `status: running`, the class blank, the recipe path with the current commit, and the start time. Prune older run directories down to ten.
41
- 3. **Preflight, then the bring-up.** Preflight checks presence only: each env var the recipe **names** (never print a value), a session it refers to — only when it refers to one — actually sitting in `.sassywares/session/`, and the commands' entry points existing. A missing entry point, a tool not on `PATH`, or an absent env var is `class: env` — write the report, report it, and stop.
42
-
43
- Then **run the recipe's *Set up once*.** It is the bring-up, not a checklist: install frozen where the project has a lockfile, and continue. That is the only installing a run does — never install something the recipe does not name, never `docker pull`, never mutate the environment to make a step pass.
44
-
45
- 4. **Execute in order, stopping at the first broken expectation.** Per step: write `steps/<section>-<NN>.log`, capped head-and-tail, with the command and its output, values of every env var the recipe names masked, and the exit code. `Do` is a command *or* an instruction — satisfy it with whatever is available, and judge it only against its `Expect`. The step's own shell mechanics are part of the step: backgrounding a server, redirecting its output, creating the directory a log path lives in. Improvisation is what the recipe does **not** name. A step whose expectation fails ends that section: record it, keep everything already written, and skip to the report. Resume at the failed step on the next run, never from the top: the summary's `Next:` line says which.
46
- 5. **Take the verdict from the prove step.** The section's `Prove it:` step decides: exit 0 is `pass`, non-zero is `failed`. A failure earlier in the section is `failed` regardless. This skill holds no opinion about the work — a check it judged by reading instead of running is not a verdict.
47
- **The deadline is yours to hold.** Track wall-clock from the start and stop at `dogfood.timeout`, filing the run as `failed` with `class: env` and the step it stopped in. A step that can hang states its own bound in its `Expect`; the recipe-wide deadline is the backstop, not a substitute.
48
-
49
- 6. **Classify.** `env` when the environment cannot produce a verdict: exit 75 or 127, a missing dependency, or **a service nobody in this run controls** being down (a third-party API, a shared backend). That last one is neither `code` nor `recipe` — report it, name the dependency, and stop. The line between the two is whose text is wrong: the named toolchain is right but absent → `env`; the recipe names the wrong version, script, or URL → `recipe`, because the procedure itself is what failed; `recipe` when a step cannot be followed at all (a script renamed, a URL that no longer exists, a UI that no longer matches) — that is the procedure being stale, not the code being wrong; `code` otherwise. When in doubt between `recipe` and `code`, ask: could a person follow this step as written and still be testing the app? If not, it is `recipe`.
50
- 7. **Finalize and report.** A preflight or bring-up failure has no step id, so it logs to `steps/00-setup.log` and the summary's table row reads `setup`. Write the final `summary.md` (`status`, `class`, the per-step table, artifacts, `Next:`), then return compactly: verdict, class, section, failing step id, the last ~600 characters of that step's log, the report path, and — for `recipe` — the one-line diff you propose. Never paste a whole log to the caller.
51
- 8. **On `recipe`, propose and stop.** Show the diff that would make the procedure followable and ask before writing it. Never edit the recipe to turn a red run green: the cheapest way to pass a check must not be to weaken it.
52
-
53
- ## Steps — `mode:discover`
54
-
55
- 1. **Read what the project already says.** The existing recipe, the config, and the manifest's scripts (`package.json`, `Makefile`, `pyproject.toml`, `deno.json`, a CI workflow). **Reading is not deciding** — what exists is the starting point, never the target.
56
- 2. **Find the surfaces.** Read `**Out of scope:**` first and drop those from the
57
- list — they were decided against, and asking again is how a decision gets
58
- reopened every week. `**Uncovered:**` surfaces stay: they still want a path.
59
- Then: what is this product? A web app, an API, a CLI, a library, a desktop app, a mobile app in a simulator, several of them. Each surface that a change can break gets its own answer — in a monorepo especially, one app having a suite says nothing about its siblings. **A surface is something this repository serves**; a backend it calls is not a surface — record it as `**Upstream:**` and let its outages be `env`.
60
- 3. **Classify each surface, honestly.** Three classes and no fourth:
61
-
62
- | Class | Means | Becomes |
63
- |---|---|---|
64
- | `runtime` | something already drives the running product — e2e, integration, a smoke script | a section that wraps it |
65
- | `unit-only` | tests exist, but they never start the product | an **uncovered** section |
66
- | `none` | nothing | an **uncovered** section |
67
-
68
- **A unit test is not a dogfood path**, and neither is `lint`, `tsc`, or `build`: they never start the product. Recording one as coverage is the failure this step exists to prevent — it makes an untested app look tested, and nobody can tell afterwards that the gap was never closed.
69
- 4. **Ask, one surface at a time — and stop until answered.** With what you found: *"`web`, `api`, and `admin` have no runtime path — `web` has Playwright, the other two only unit tests. Set up a runtime check for `api` and `admin`?"* The options are wrap an existing suite, add a small runtime check, or leave it uncovered and say so. **This step blocks steps 5–8**: the answer decides what gets written, so with no user to ask, stop and report the question verbatim — never write a recipe on a guessed answer. Never leave a surface uncovered silently, and never fill the gap with what happens to exist.
70
-
71
- A **small runtime check is in scope**: a boot plus one assertion, a `curl`, a screenshot diff — written into the recipe as steps. That is not a test framework, and it is the only check this skill authors. Installing a driver or a runner to make one possible is out of bounds; without one already present, the surface is uncovered.
72
- 5. **Write the draft, one section per surface, gaps included.** With more than one surface, that surface's `**Preview:**` and `**Upstream:**` go **inside its own section** — a file-level address on a multi-app project can only describe one app. With exactly one surface, keep the file flat. Every surface in the inventory gets a section: an uncovered one ends with `**Prove it:** none`, explicitly, so a plan keeps its rows `Manual`; an out-of-scope one gets no section at all. Name both lists in the header (`**Uncovered:** api (unit tests only)` / `**Out of scope:** admin`) so the gaps are visible without reading every section.
73
- 6. **Run it, and log every deviation.** Bring the product up and run the draft. Anything you do that is **not a step in the recipe** — an install, an export, a patch, a workaround, a second terminal — is a *deviation*, written down as you go. This is the only step where improvising is allowed, and it is never silent.
74
- 7. **Reconcile.** Every deviation becomes exactly one of two things: a step in the recipe, or the reason this surface is unprovable (`**Prove it:** none`). A recipe whose check passed only with help the recipe does not contain is wrong. If you cannot capture a deviation as a step, the surface is uncovered — say so rather than shipping a procedure nobody else can follow.
75
- 8. **Prove the procedure, not the day — with a fresh agent.** Hand the recipe to a run that has **nothing but the recipe and the config**: a new session, or a dispatched agent, but never this one. It is run once from a clean checkout, allowing no deviation. If you cannot get one, say the recipe is **unverified** rather than claiming it. That second run is the artifact. If it needs improvising, the recipe is wrong: fix it and repeat once; still failing means uncovered and visible.
76
- 9. **Report.** Per surface: its class, its proof, whether it was asked about, the deviations you reconciled, and what is still unknown. Mark a check you wrote as **unproven** if you never watched it fail — breaking the thing once is the way to earn that. Say plainly that `sassy-setup` flips `dogfood.enabled` and that the switch alone changes nothing.
77
-
78
- ## Steps — `mode:check`
79
-
80
- Run the `sassy-setup` skill's `scripts/detect.sh --root <path> --check` and report the `dogfood` and recipe lines verbatim; print the newest report's `status`, `class`, and timestamp, or that there is none. Write nothing.
81
-
82
- ## Hard rules
38
+ ## Hard rules — every mode
83
39
 
84
40
  | Rule | Requirement |
85
41
  |------|-------------|
86
42
  | The verdict is an exit code | A section's `Prove it:` step decides. Never a judgement, a screenshot someone liked, or "looks right". |
87
43
  | No tooling, no installs | Never name or require a browser, driver, emulator, or MCP server. **What the recipe names is allowed** — if *Set up once* says `bun install --frozen-lockfile` or downloads the browser its suite declares, that is the project's declared bring-up and a run executes it. Installing anything the recipe does not name is out of bounds, and so is choosing a tool the project has not committed to. A permitted command's own lifecycle hooks (a `postinstall`) come with it; the run adds none of its own. |
88
44
  | Never production | Local or staging only. A recipe step pointing at production is refused and reported, not run. |
89
- | The run may not edit the check | A red run never fixes itself by editing the recipe or its expectations. Propose the diff, ask, stop. |
90
- | Reports stay local | Never commit `reports/`. Never paste a full log to a caller, a plan, or a PR. |
91
45
  | No secrets, ever | Env var **names** only, and session material stays in the gitignored `.sassywares/session/`. Mask values before a log is written, and never echo one in a report. |
92
- | Env is not code | Exit 75/127, a missing dependency, or an unreachable service is `env`: report and park. Looping on a broken toolchain burns a run for nothing. |
93
- | Resume, don't restart | Re-run from the failed step; the summary says where. Starting over hides the state that made the failure happen. |
94
- | Reports are disposable | Pruned to ten. The durable record is the QA row's note, which names the verdict and the run id, never a path that will vanish. |
95
- | Never promote what exists | A unit test, `lint`, or `build` is not a dogfood path. Discovery records what the product needs, and says so when that is nothing yet. |
96
- | Improvise out loud, or not at all | Discovery may improvise, never silently: every action that is not a step is a deviation, and every deviation is promoted into a step or kills the surface. A run never improvises — it classifies and stops. |
97
- | The second run is the artifact | A recipe is proven by a clean checkout that has nothing but the recipe. If it only works with the discoverer's context, it does not work. |
98
- | Ask about every gap | Each uncovered surface gets one question: wrap a suite, add a runtime check, or leave it uncovered and visible. Silence is how a gap becomes a false green. |
99
46
  | No third-party mutation | A run never registers a user, sends mail, charges a card, or writes to a service it does not own — a public demo API is somebody else's database. **A project-owned test environment is the exception**: an E2E deployment the project built, seeded by its own provisioning script and named in `**Upstream:**`, is the project's call. Production never is. |
100
- | No dependency churn | A bring-up never changes a lockfile. Install frozen where the project has one; a broken lockfile is `env`, not something to repair mid-run. |
101
- | Not a test framework | If the project has a suite, the recipe wraps it. This skill never grows assertions of its own beyond a step's `Expect`. |
47
+ | Reports stay local and disposable | Never commit `reports/`, which are pruned to ten. Never paste a full log to a caller, a plan, or a PR. The durable record is the QA row's note, which names the verdict and the run id, never a path that will vanish. |
102
48
 
103
49
  ## What dogfood is not
104
50
 
@@ -0,0 +1,12 @@
1
+ # Mode: check — lint the setup, print the last verdict, change nothing
2
+
3
+ Read the shared sections in `SKILL.md` first. This file is the check path only, and it is four lines long for a reason.
4
+
5
+ 1. **Lint.** Run the `sassy-setup` skill's `scripts/detect.sh --root <path> --check` and report the `dogfood` and recipe lines verbatim.
6
+ 2. **Report the last run.** Print the newest report's `status`, `class`, and timestamp, or that there is none. Read the summary only — never a step log.
7
+ 3. **Name the fix, don't make it.** Drift and a missing recipe are reported with the mode that fixes them: a skeleton or a stale procedure is `mode:discover`, and a config that forbids runs is `sassy-setup mode:init`.
8
+ 4. **Write nothing.** No report directory, no recipe edit, no config edit. A check that "just fixes a line while it is there" has become a discover run without the evidence to earn it.
9
+
10
+ | Rule | Requirement |
11
+ |------|-------------|
12
+ | Check writes nothing | Verdicts come from a `run`, procedures from a `discover`, config from `sassy-setup mode:init`. Check only reports. |
@@ -0,0 +1,59 @@
1
+ # Mode: discover — build or repair the recipe from what really worked
2
+
3
+ Read the shared sections in `SKILL.md` first (the recipe artifact, config, no-tooling, and the every-mode rules). This file is the discover path only. The recipe format is the `sassy-setup` skill's `references/dogfood.md`; you are writing that file, not executing it.
4
+
5
+ ## 1. Read what the project already says
6
+
7
+ The existing recipe, the config, and the manifest's scripts (`package.json`, `Makefile`, `pyproject.toml`, `deno.json`, a CI workflow). **Reading is not deciding** — what exists is the starting point, never the target.
8
+
9
+ ## 2. Find the surfaces
10
+
11
+ Read `**Out of scope:**` first and drop those from the list — they were decided against, and asking again is how a decision gets reopened every week. `**Uncovered:**` surfaces stay: they still want a path.
12
+
13
+ Then: what is this product? A web app, an API, a CLI, a library, a desktop app, a mobile app in a simulator, several of them. Each surface that a change can break gets its own answer — in a monorepo especially, one app having a suite says nothing about its siblings. **A surface is something this repository serves**; a backend it calls is not a surface — record it as `**Upstream:**` and let its outages be `env`.
14
+
15
+ ## 3. Classify each surface, honestly
16
+
17
+ | Class | Means | Becomes |
18
+ |---|---|---|
19
+ | `runtime` | something already drives the running product — e2e, integration, a smoke script | a section that wraps it |
20
+ | `unit-only` | tests exist, but they never start the product | an **uncovered** section |
21
+ | `none` | nothing | an **uncovered** section |
22
+
23
+ **A unit test is not a dogfood path**, and neither is `lint`, `tsc`, or `build`: they never start the product. Recording one as coverage is the failure this step exists to prevent — it makes an untested app look tested, and nobody can tell afterwards that the gap was never closed.
24
+
25
+ ## 4. Ask, one surface at a time — and stop until answered
26
+
27
+ With what you found: *"`web`, `api`, and `admin` have no runtime path — `web` has Playwright, the other two only unit tests. Set up a runtime check for `api` and `admin`?"* The options are wrap an existing suite, add a small runtime check, or leave it uncovered and say so. **This step blocks steps 5–8**: the answer decides what gets written, so with no user to ask, stop and report the question verbatim — never write a recipe on a guessed answer. Never leave a surface uncovered silently, and never fill the gap with what happens to exist.
28
+
29
+ A **small runtime check is in scope**: a boot plus one assertion, a `curl`, a screenshot diff — written into the recipe as steps. That is not a test framework, and it is the only check this skill authors. Installing a driver or a runner to make one possible is out of bounds; without one already present, the surface is uncovered.
30
+
31
+ ## 5. Write the draft, one section per surface, gaps included
32
+
33
+ With more than one surface, that surface's `**Preview:**` and `**Upstream:**` go **inside its own section** — a file-level address on a multi-app project can only describe one app. With exactly one surface, keep the file flat. Every surface in the inventory gets a section: an uncovered one ends with `**Prove it:** none`, explicitly, so a plan keeps its rows `Manual`; an out-of-scope one gets no section at all. Name both lists in the header (`**Uncovered:** api (unit tests only)` / `**Out of scope:** admin`) so the gaps are visible without reading every section.
34
+
35
+ ## 6. Run it, and log every deviation
36
+
37
+ Bring the product up and run the draft. Anything you do that is **not a step in the recipe** — an install, an export, a patch, a workaround, a second terminal — is a *deviation*, written down as you go. This is the only step where improvising is allowed, and it is never silent.
38
+
39
+ ## 7. Reconcile
40
+
41
+ Every deviation becomes exactly one of two things: a step in the recipe, or the reason this surface is unprovable (`**Prove it:** none`). A recipe whose check passed only with help the recipe does not contain is wrong. If you cannot capture a deviation as a step, the surface is uncovered — say so rather than shipping a procedure nobody else can follow.
42
+
43
+ ## 8. Prove the procedure, not the day — with a fresh agent
44
+
45
+ Hand the recipe to a run that has **nothing but the recipe and the config**: a new session, or a dispatched agent, but never this one. It is run once from a clean checkout, allowing no deviation. If you cannot get one, say the recipe is **unverified** rather than claiming it. That second run is the artifact. If it needs improvising, the recipe is wrong: fix it and repeat once; still failing means uncovered and visible.
46
+
47
+ ## 9. Report
48
+
49
+ Per surface: its class, its proof, whether it was asked about, the deviations you reconciled, and what is still unknown. Mark a check you wrote as **unproven** if you never watched it fail — breaking the thing once is the way to earn that. Say plainly that `sassy-setup` flips `dogfood.enabled` and that the switch alone changes nothing.
50
+
51
+ ## Rules for this path
52
+
53
+ | Rule | Requirement |
54
+ |------|-------------|
55
+ | Improvise out loud, or not at all | Discovery may improvise, never silently: every action that is not a step is a deviation, and every deviation is promoted into a step or kills the surface. |
56
+ | The second run is the artifact | A recipe is proven by a clean checkout that has nothing but the recipe. If it only works with the discoverer's context, it does not work. |
57
+ | Ask about every gap | Each uncovered surface gets one question: wrap a suite, add a runtime check, or leave it uncovered and visible. Silence is how a gap becomes a false green. |
58
+ | Never promote what exists | A unit test, `lint`, or `build` is not a dogfood path. Discovery records what the product needs, and says so when that is nothing yet. |
59
+ | Not a test framework | If the project has a suite, the recipe wraps it. Discovery never grows assertions of its own beyond a step's `Expect`. |
@@ -0,0 +1,54 @@
1
+ # Mode: run — execute the procedure, return a verdict
2
+
3
+ Read the shared sections in `SKILL.md` first (the recipe artifact, config, no-tooling, and the every-mode rules). This file is the run path only. The recipe format, report layout, and verdict classes are the `sassy-setup` skill's `references/dogfood.md`.
4
+
5
+ ## 1. Resolve the target
6
+
7
+ Read the `dogfood:` block. If `enabled` is not `true`, stop with one line: reporting is not enabled, and enabling it is `sassy-setup mode:init`. Load the recipe; a section the caller names (`section:<name>`) is the target, otherwise every section. A missing recipe, or one whose section has no `Prove it:` step, stops the run and names `mode:discover`. A section whose `**Prove it:**` says `none` is refused with one line — it has no machine verdict by design, so its QA rows are `Manual`, and running it would only manufacture an opinion. Never guess a verdict from a procedure that has none.
8
+
9
+ ## 2. Open the report
10
+
11
+ Create `<reports>/<YYYYMMDD-HHMMSS>/` with `steps/` and `artifacts/`, and write `summary.md` with `status: running`, the class blank, the recipe path with the current commit, and the start time. Prune older run directories down to ten.
12
+
13
+ ## 3. Preflight, then the bring-up
14
+
15
+ Preflight checks presence only: each env var the recipe **names** (never print a value), a session it refers to — only when it refers to one — actually sitting in `.sassywares/session/`, and the commands' entry points existing. A missing entry point, a tool not on `PATH`, or an absent env var is `class: env` — write the report, report it, and stop.
16
+
17
+ Then **run the recipe's *Set up once*.** It is the bring-up, not a checklist: install frozen where the project has a lockfile, and continue. That is the only installing a run does — never install something the recipe does not name, never `docker pull`, never mutate the environment to make a step pass.
18
+
19
+ ## 4. Execute in order, stopping at the first broken expectation
20
+
21
+ Per step: write `steps/<section>-<NN>.log`, capped head-and-tail, with the command and its output, values of every env var the recipe names masked, and the exit code. `Do` is a command *or* an instruction — satisfy it with whatever is available, and judge it only against its `Expect`. The step's own shell mechanics are part of the step: backgrounding a server, redirecting its output, creating the directory a log path lives in. Improvisation is what the recipe does **not** name. A step whose expectation fails ends that section: record it, keep everything already written, and skip to the report. Resume at the failed step on the next run, never from the top: the summary's `Next:` line says which.
22
+
23
+ ## 5. Take the verdict from the prove step
24
+
25
+ The section's `Prove it:` step decides: exit 0 is `pass`, non-zero is `failed`. A failure earlier in the section is `failed` regardless. This skill holds no opinion about the work — a check it judged by reading instead of running is not a verdict.
26
+
27
+ **The deadline is yours to hold.** Track wall-clock from the start and stop at `dogfood.timeout`, filing the run as `failed` with `class: env` and the step it stopped in. A step that can hang states its own bound in its `Expect`; the recipe-wide deadline is the backstop, not a substitute.
28
+
29
+ ## 6. Classify
30
+
31
+ | Class | When |
32
+ |---|---|
33
+ | `env` | The environment cannot produce a verdict: exit 75 or 127, a missing dependency, or **a service nobody in this run controls** being down (a third-party API, a shared backend). Report it, name the dependency, and stop. |
34
+ | `recipe` | The procedure itself is what failed: a step cannot be followed at all (a script renamed, a URL that no longer exists, a UI that no longer matches), or the recipe names the wrong version, script, or URL. |
35
+ | `code` | Everything else. |
36
+
37
+ The line between the last two is whose text is wrong: the named toolchain is right but absent → `env`; the recipe's own instructions cannot be followed or name the wrong thing → `recipe`. When in doubt, ask: could a person follow this step as written and still be testing the app? If not, it is `recipe`.
38
+
39
+ ## 7. Finalize and report
40
+
41
+ A preflight or bring-up failure has no step id, so it logs to `steps/00-setup.log` and the summary's table row reads `setup`. Write the final `summary.md` (`status`, `class`, the per-step table, artifacts, `Next:`), then return compactly: verdict, class, section, failing step id, the last ~600 characters of that step's log, the report path, and — for `recipe` — the one-line diff you propose. Never paste a whole log to the caller.
42
+
43
+ ## 8. On `recipe`, propose and stop
44
+
45
+ Show the diff that would make the procedure followable and ask before writing it. Never edit the recipe to turn a red run green: the cheapest way to pass a check must not be to weaken it.
46
+
47
+ ## Rules for this path
48
+
49
+ | Rule | Requirement |
50
+ |------|-------------|
51
+ | The run may not edit the check | A red run never fixes itself by editing the recipe or its expectations. Propose the diff, ask, stop. |
52
+ | Env is not code | Exit 75/127, a missing dependency, or an unreachable service is `env`: report and park. Looping on a broken toolchain burns a run for nothing. |
53
+ | Resume, don't restart | Re-run from the failed step; the summary says where. Starting over hides the state that made the failure happen. |
54
+ | No dependency churn | A bring-up never changes a lockfile. Install frozen where the project has one; a broken lockfile is `env`, not something to repair mid-run. |
@@ -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.
@@ -12,89 +12,40 @@ argument-hint: "[path] [mode:init|check]"
12
12
 
13
13
  # Sassy Setup
14
14
 
15
- **Outcome:** `.sassywares/config.yaml` at the project root matching the tree it describes, the dogfood scaffold when agent QA was asked for, the skills installed in user or project scope and visible to the harness, the sassy-agents roster installed for the running harness, the snapshot tooling installed in `workspace` mode, and every file setup wrote committed — so the project is wired and the user is good to go in one run.
15
+ **Outcome:** `.sassywares/config.yaml` at the project root matching the tree it describes, the dogfood scaffold when agent QA was asked for, the skills installed in user or project scope and visible to the harness, the sassy-agents roster installed for the running harness, the snapshot tooling installed in `workspace` mode, and every file setup wrote committed — so the project is wired and the user is good to go in one run. A `check` run produces the same knowledge as a report, and changes nothing except committing setup-owned files that were already dirty.
16
16
 
17
17
  **Read `references/config.md` first.** It is the schema and the resolution rules; this skill only decides and writes.
18
18
 
19
19
  **Never a repo by force.** Setup records topology, it does not change it. No `git init`, ever.
20
20
 
21
- **Harness.** Loading another skill, dispatching an agent, and any command you hand the user follow `references/harness.md`; the agent wiring in step 5 uses its tables.
21
+ **Harness.** Loading another skill, dispatching an agent, and any command you hand the user follow `references/harness.md`; the agent wiring in step 5 of the init path uses its tables.
22
22
 
23
- ## Modes
24
-
25
- | Mode | What it does |
26
- |------|--------------|
27
- | `init` (default) | Detect, ask, write, wire, verify, commit, report |
28
- | `check` | Verify an existing setup against the tree and report |
29
-
30
- The argument names the mode: `mode:init`, `mode:check` (or `--check`, the older spelling). A run with no mode that finds a `.sassywares/config.yaml` walking up is a **check** run — a folder that is already wired is verified, never rebuilt from detection.
31
-
32
- A check run never edits the config and never rewrites the tree: it prints what `detect.sh --check` says, and its only possible write is step 8 committing setup-owned files that were already dirty. A fix is an `init` run, where each change is shown and approved first.
33
-
34
- ## Steps
35
-
36
- 1. **Resolve the start and the mode.** The path argument, else the working directory; the mode per above. On `check`, run steps 7 → 8 → 9 and stop.
37
- 2. **Detect.** Run `scripts/detect.sh --root <path>`. It prints a proposed config: topology (`repo`, `workspace`, `none`), the remote name, a probed base branch, and nested repos with their bases.
38
-
39
- **A config that already exists is the proposal.** When `.sassywares/config.yaml` is found — an explicit `init` on a project that is already wired — the detector's output is only the starting point: take every value it **probes** (`git.repo`, `base_map`'s `"*"`, `repos`), and take every value it **emits as a default** from the existing file instead — the other `base_map` rungs, `hooks.*`, `worktrees.*`, `dogfood.*`, `pr.*`, `commit.branch`, `knowledge.*`, `artifacts.*`. A default is not an answer: writing the blank slate here would retarget `"*"` away from the integration branch the project actually uses and delete its hooks. Present the result as a **diff against the file, key by key**, and ask before writing.
40
- 3. **Ask only what detection cannot answer.** Never re-ask what the tree already said.
41
- - **`workspace`** — the snapshot mirror: create a **private** GitHub repo, or connect an existing one? Creating it needs explicit approval and a named slug first.
42
- - **`none`** — confirm the intent: this folder is deliberately outside git, so commit, PR, and babysit refuse here.
43
- - **Artifacts** — offer the detected paths as the default; take overrides.
44
- - **Knowledge** — `knowledge.read` defaults to the solutions dir plus the concepts file. Ask whether there are extra folders to read (a hand-written `notes/learnings/`, a `docs/adr/`).
45
- - **Base map** — detection proposes `"*"` from the probed remote default. Ask where ordinary work branches from, and whether the default branch itself releases to another branch (a `staging: main` rung). Never write `main` as a guess. In `workspace` mode, show the `repos` map and get a yes on every row — a probed base is only the remote's default.
46
- - **`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). Under `mode:auto` with `current` on a base branch, ship pushes to that base with no gate.
47
- - **`pr.*`** — default `babysit: true`, `merge: false`, `delete_branch: false`. Say plainly that `merge: true` authorizes merging every babysat PR in this project without asking.
48
- - **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.
49
- - **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.
50
- - **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.
51
- 4. **Write the config.** Build the file from the proposal plus the answers. It is written **fully commented**: every key keeps a description and its allowed values, exactly as the detector emits them. Never strip those comments to save lines — for a teammate opening the file, the comments are the documentation. If a config already exists, show what changes and ask before writing — never silently overwrite. Keep every key; an unset key falls back to its documented default, so a short file is legal when nothing deviates.
52
-
53
- **The dogfood scaffold, only when the answer was yes.** Create `.sassywares/dogfood/` holding `recipe.md` copied verbatim from `assets/dogfood-recipe.md`, and `.sassywares/.gitignore` with two lines — `/session/` and `/dogfood/reports/` — adding them to a `.gitignore` that already exists rather than replacing it. Never overwrite an existing recipe — show it and ask. The skeleton is deliberately incomplete: it carries the shape and the rules and fills in nothing, because `sassy-dogfood mode:discover` writes the procedure from what actually worked. Say so in the report — `enabled: true` is a permission, not a promise that a check exists.
54
- 5. **Wire the skills and the agents.** Both install the same way: if they are already there in either scope, report which and move on; if not, ask once where to install, recommending user scope.
55
-
56
- - **Skills.** The suite comes from upstream with the open `skills` CLI. Never copy skill files in by hand, never add the suite as a dependency.
57
-
58
- **Installed** means the `sassy-*` skills exist in the project scope (`.agents/skills/sassy-*`, pinned in `skills-lock.json`) or the user scope (`~/.agents/skills/`, plus `~/.claude/skills/` for Claude Code). If they do, report which scope and move on. If not, ask once where to install, recommending user scope:
59
-
60
- - **User scope** — every project on this machine, nothing committed, updated with `npx skills update -g`. Run `npx -y skills add sassywares/sassy-skills -g -y`, which writes `~/.agents/skills/sassy-*`, the `~/.claude/skills/sassy-*` links, and `~/.agents/.skill-lock.json`.
61
- - **Project scope** — only this project, pinned with it. Run `npx -y skills add sassywares/sassy-skills -y`, which writes `.agents/skills/sassy-*` (real files), per-agent links such as `.claude/skills/sassy-*`, and `skills-lock.json`. The vendored folders and the lock are the pin and join step 8's commit list, so a clone needs no network. Ignore `.claude/skills` only — it is a link created at install time. Create `.gitignore` only when there is none, and in `workspace` topology never touch the project's root `.gitignore` at all.
62
-
63
- A project that wants its own pin on a machine that already has the user-scope suite can install in project scope too — say that Claude Code prefers the user-scope copy, so the project's pin does not decide what Claude Code runs there.
23
+ **The rest of the suite's shared references.** `references/branching.md` is how a run picks a branch and a base — setup records it here, every run reads it there. On the init path, `references/init.md` points at `references/worktree.md`, `references/dogfood.md`, and `references/workspace.md` when an answer or a topology needs them; a check run needs none of the three.
64
24
 
65
- **Do not wire updates.** How and when the suite is refreshed is the user's or the project's decision, not setup's: no `skills:*` scripts, no `postinstall` edit. Mention the update command for the chosen scope and stop there. Note for yourself that `npx skills check` is an alias of `update` — it is not a validator, and running it here would silently move the pin.
66
-
67
- - **Write `.sassywares/README.md`** from `assets/sassywares-readme.md` when absent. Never overwrite it — it may carry project notes.
68
- - **Agents.** The skills dispatch five subagents by name — `scout`, `worker`, `reviewer`, `simplifier`, `validator` — from [`sassy-agents`](https://github.com/sassywares/sassy-agents), which keeps one folder per harness. Use the row for the harness you are running in:
69
-
70
- | Harness | sassy-agents folder | User scope | Project scope |
71
- |---|---|---|---|
72
- | pi | `pi/` | `~/.pi/agent/agents/` | `.pi/agents/` |
73
- | Claude Code | `claude/` | `~/.claude/agents/` | `.claude/agents/` |
74
-
75
- A harness with no row has no folder in sassy-agents: say so, skip the agents, and name it in the report. Never translate another harness's folder by hand.
25
+ ## Modes
76
26
 
77
- **Installed** means all five `<name>.md` files exist in the user scope or the project scope. If they do, report which scope and move on. If any are missing, ask once where to install, recommending user scope:
27
+ | Mode | Load | It ends with |
28
+ |---|---|---|
29
+ | `init` (default) | `references/init.md` — steps 1–6, then the shared steps below | a wired, verified, committed project |
30
+ | `check` | `references/check.md` — step 7 onward, its own way | a report of drift and scope; no config and no tree written |
78
31
 
79
- - **User scope** — every project on this machine, updated by `git pull`. Reuse the user's sassy-agents checkout if they have one; otherwise ask where to clone it (`git clone https://github.com/sassywares/sassy-agents.git <dir>`). Then run `<dir>/scripts/install.sh <folder>`, which symlinks the folder into the user scope and never overwrites a differing file.
80
- - **Project scope** — only this project, pinned with it. Shallow-clone into its own `mktemp -d` under `/tmp/sassywares/scratch/` (two runs share that folder now, per `references/harness.md`), copy `<folder>/*.md` into the project scope directory, delete the clone. Never overwrite an existing agent file that differs: show it and ask. The copies join step 8's commit list.
32
+ The argument names the mode: `mode:init`, `mode:check` (or `--check`, the older spelling). A run with no mode that finds a `.sassywares/config.yaml` walking up is a **check** run — a folder that is already wired is verified, never rebuilt from detection. Read the one reference for that mode **and only that one**; steps 7–9 below are shared and run in both.
81
33
 
82
- - **Tell the user to `/reload`** (or restart the harness). The skills and agents are invisible to the harness until it rescans.
34
+ A check run never edits the config and never rewrites the tree. Its only possible write is step 8 committing setup-owned files that were already dirty. A fix is an `init` run, where each change is shown and approved first.
83
35
 
84
- 6. **Install the git tooling.** Two independent sets, each only when its answer was yes.
36
+ ## Steps 7–9 — shared by both modes
85
37
 
86
- - **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.
87
- - **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.
88
38
  7. **Verify.** Run `scripts/detect.sh --root <path> --check`. It validates the config against the tree — topology and remotes, `base_map` shape and cycles, `repos` against each nested repo, hooks, artifacts paths, `knowledge`, `pr.*` booleans, `commit.branch`, the `worktrees` block, the `dogfood` block, any unknown key, and in `workspace` mode the installed snapshot's version — plus, for a project-scope install, the pin: every suite-skill folder in `.agents/skills` (a name in the suite's roster, `assets/roster` in sassy-setup, not any `sassy-` prefix) hashed against `skills-lock.json`, the lock's coverage both ways, and whether git carries the lock. A user-scope install has no pin here; the check notes the scope it found. Report every `drift:` line verbatim, or that the config matches the tree. Drift blocks step 8.
89
39
 
90
40
  The `worktrees` half checks what a run would read: the switch and the port range, that the tooling is installed at the shipped version, that no checkout sits inside the working tree, that none holds a branch `base_map` names as a base, and that no port is still claimed by a worktree that no longer exists.
91
41
 
92
42
  The `dogfood` half is structural and never runs the product: `enabled` and `timeout` are in range, the two paths are relative and stay inside the project, `reports` and `.sassywares/session` are gitignored in a `repo` topology, and the recipe has a `**Prove it:**` line per section with an `**Expect**` per step and no secret-shaped string. A recipe that does not exist yet is a note, not drift — unless `enabled` is `true`, which is the one combination that would let a planner write Auto rows against a check nobody has.
93
43
 
94
- Then check the skills and the agents exactly as step 5's **Installed** rules say, and report the scope each was found in or what is missing. A check run never installs them; a missing suite or roster is reported with the fix (`mode:init`), and it does not block step 8.
44
+ Then check the skills and the agents exactly as step 5's **Installed** rules say, and report the scope each was found in or what is missing. Step 7 never installs anything: a missing suite or roster is reported with the fix (`mode:init`), and it does not block step 8.
45
+
95
46
  8. **Commit what setup owns.** `repo` topology only, and only when step 7 is clean. The file list is exactly what setup wrote or found unwritten:
96
47
 
97
- `.sassywares/config.yaml`, `.sassywares/README.md`, `.sassywares/dogfood/recipe.md` and `.sassywares/.gitignore` when step 4 created them, `.sassywares/worktree/*` and `package.json` when step 6 installed the tooling and added its aliases, `.agents/skills/sassy-*` and `skills-lock.json` when the suite is in project scope, the project-scope agent files when step 5 copied them, and `.gitignore` when step 5 created it. Named files only — never `git add -A`, never `git add .`. The reports directory is never in this list: it is gitignored, and nothing setup writes lives there.
48
+ `.sassywares/config.yaml`, `.sassywares/README.md`, `.sassywares/dogfood/recipe.md` and `.sassywares/.gitignore` when step 4 created them, `.sassywares/worktree/*` and `package.json` when step 6 installed the tooling and added its aliases, `.agents/skills/sassy-*` and `skills-lock.json` when the suite is in project scope, the project-scope agent files when step 5 copied them, and a root `.gitignore` when step 5 created one. Named files only — never `git add -A`, never `git add .`. The reports directory is never in this list: it is gitignored, and nothing setup writes lives there.
98
49
 
99
50
  Dispatch `sassy-commit` with that list and `branch:current`. The token is explicit, not this skill's default: wiring is a one-time bootstrap commit, and cutting a branch would leave the project configured but uncommitted until someone ships it. Name the branch it landed on, base branch included.
100
51
 
@@ -105,31 +56,23 @@ A check run never edits the config and never rewrites the tree: it prints what `
105
56
 
106
57
  9. **Report.** The config path, the topology, the resolved artifact and knowledge paths, whether agent QA is **off** — one line saying every QA row stays a human's, with no suggestion attached — or on, and then whether the recipe is ready or still a skeleton until `sassy-dogfood mode:discover` runs, where the skills are installed (scope) and where the agents are (scope and harness), or why either is not, the commit (hash and branch) or why there is none, and in `workspace` mode what was installed, with versions (`snapshot vN`, `workspace-git vN`), and the manifest the `workspace:*` aliases went into — naming it as created when there was no script surface to begin with. Remind: `/reload` so the harness rescans. Close with what is left over — at most dirt setup deliberately did not commit — and nothing else: a clean setup leaves the user good to go.
107
58
 
108
- ## Hard rules
59
+ ## Hard rules — every mode
109
60
 
110
61
  | Rule | Requirement |
111
62
  |------|-------------|
112
63
  | No `git init` | Setup never turns a folder into a repo, and never does remote or ref surgery. The step 8 commit is its only git write. |
113
- | Commit only what setup owns | The config, the setup README, the vendored `sassy-*` folders and `skills-lock.json` (project scope), the project-scope agent files, and a `.gitignore` setup created. Never a file the user wrote or the repo already had, unless they name it. |
114
64
  | Verify before commit | A config that fails `--check` is reported, never committed. |
115
- | Approval to create a remote | Creating the mirror repo needs an explicit yes and a named slug first. |
65
+ | Commit only what setup owns | The config, the setup README, the vendored `sassy-*` folders and `skills-lock.json` (project scope), the project-scope agent files, and a `.gitignore` setup created. Never a file the user wrote or the repo already had, unless they name it. |
116
66
  | No silent overwrite | An existing config or an existing `.sassywares/workspace/snapshot` is shown and asked about, never replaced blind. |
117
- | Version is reported | Setup names the snapshot and `workspace-git` versions it installed; `--check` flags an installed copy older than the skill's. |
67
+ | Write boundary | Only `.sassywares/` (the config, the setup README, the dogfood scaffold, and the worktree tooling), the skills and agent files step 5 installed in the scope the user chose, `skills-lock.json` (project scope), `.sassywares/.gitignore` with its two lines, and at most one root `.gitignore` line that step 5 created. Never `package.json` outside step 6's `worktree:*` and `workspace:*` aliases, never a root `.gitignore` in a workspace. Workspace git helpers land in `.sassywares/workspace/`, never in a project's `bin/`. |
68
+ | Install the tooling, never use it | Setup copies `.sassywares/worktree/` and wires the aliases. It never creates a checkout, never claims a port, and never runs a script — those are a run's or the user's. |
118
69
  | Skills come from upstream | Install with `npx skills add`, `-g` for user scope; never hand-copy skill files or maintain the links yourself. |
119
70
  | Agents come from sassy-agents | Only the running harness's folder, as-is: linked by `install.sh` (user scope) or copied verbatim (project scope). Never edit, merge, or overwrite a differing agent file without asking. |
120
71
  | Never edit the manifest | No dependencies, no `postinstall`, no `skills:*` scripts. The one exception is step 6's `worktree:*` and `workspace:*` aliases: appended or corrected, never removed, and nothing else in the file touched. Setup installs the suite; the user or project decides how it updates. |
121
- | Write boundary | Only `.sassywares/` (the config, the setup README, the dogfood scaffold, and the worktree tooling), the skills and agent files step 5 installed in the scope the user chose, `skills-lock.json` (project scope), and one `.gitignore` line — and the project-scope part of that list is step 8's commit. Never `package.json` outside step 6's `worktree:*` and `workspace:*` aliases, never a root `.gitignore` in a workspace. Workspace git helpers land in `.sassywares/workspace/`, never in a project's `bin/`. |
122
- | Detect, don't guess | An unknown base branch stays unknown and gets asked about. A probed value is reported as probed. |
123
- | A re-apply is a diff | On a project that already has a config, every key the detector only *defaults* keeps its value from that file. Changing one needs the user to say so — never a detector default, and never a silent deletion. |
124
- | Comments are part of the file | Every key keeps its description and allowed values. A stripped config is an incomplete config. |
125
- | Hooks are named, not written | Setup records hook skill names. Creating those skills is the project's work. |
126
- | Dogfood is a pointer | The block names a recipe, a reports path, a timeout, and whether Auto rows are allowed — four keys. Never a command and never a tool: a copied command duplicates the manifest and cannot express step order. |
127
- | The recipe is the project's | Setup scaffolds the skeleton and stops. Authoring or "fixing" a procedure is `sassy-dogfood mode:discover`'s job, and a run may never edit the recipe to make its own failure pass. |
128
72
  | Run output and sessions never ship | `.sassywares/.gitignore` holds `/session/` and `/dogfood/reports/`. Never remove a line, never add anything from either path to the commit, and never write a credential anywhere else. |
129
73
  | No secrets in setup's writes | Env var names only, in the config and in the skeleton. A credential never lands in a file setup commits. |
130
- | Worktrees need `new` | `worktrees.enabled: true` with `commit.branch: current` is refused, not written: nothing cuts a branch there, so the switch could never fire. |
131
- | Install the tooling, never use it | Setup copies `.sassywares/worktree/` and wires the aliases. It never creates a checkout, never claims a port, and never runs a script — those are a run's or the user's. |
132
- | Repair is `check` | Run against an existing config, setup reports drift — it does not rewrite the file without approval. |
74
+ | Version is reported | Setup names the snapshot and `workspace-git` versions it installed; `--check` flags an installed copy older than the skill's. |
75
+ | Repair is `init` | `check` reports drift and never rewrites; closing it is `mode:init`, where every change is shown and approved first. |
133
76
 
134
77
  ## What setup is not
135
78