@sassywares/skills 0.17.1 → 0.17.3

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.
Files changed (36) hide show
  1. package/README.md +28 -6
  2. package/package.json +1 -1
  3. package/skills/sassy-babysit/SKILL.md +2 -2
  4. package/skills/sassy-dogfood/SKILL.md +11 -8
  5. package/skills/sassy-dogfood/references/check.md +5 -3
  6. package/skills/sassy-dogfood/references/discover.md +23 -12
  7. package/skills/sassy-dogfood/references/run.md +91 -17
  8. package/skills/sassy-setup/SKILL.md +5 -5
  9. package/skills/sassy-setup/assets/dogfood-recipe.md +19 -5
  10. package/skills/sassy-setup/references/anchors.md +1 -1
  11. package/skills/sassy-setup/references/branching.md +1 -1
  12. package/skills/sassy-setup/references/check.md +1 -1
  13. package/skills/sassy-setup/references/config.md +66 -14
  14. package/skills/sassy-setup/references/dogfood.md +181 -40
  15. package/skills/sassy-setup/references/harness.md +1 -1
  16. package/skills/sassy-setup/references/init.md +6 -4
  17. package/skills/sassy-setup/references/plan-resolution.md +1 -1
  18. package/skills/sassy-setup/references/scaffold-header.md +9 -2
  19. package/skills/sassy-setup/references/workspace.md +63 -1
  20. package/skills/sassy-setup/references/worktree.md +1 -1
  21. package/skills/sassy-setup/scripts/detect.sh +49 -1982
  22. package/skills/sassy-setup/scripts/hash-skill.mjs +1 -1
  23. package/skills/sassy-setup/scripts/lib/agents-md.sh +513 -0
  24. package/skills/sassy-setup/scripts/lib/branch.sh +200 -0
  25. package/skills/sassy-setup/scripts/lib/check.sh +940 -0
  26. package/skills/sassy-setup/scripts/lib/common.sh +128 -0
  27. package/skills/sassy-setup/scripts/lib/proposal.sh +248 -0
  28. package/skills/sassy-setup/scripts/lib/sync.sh +43 -0
  29. package/skills/sassy-setup/scripts/lib/worktree.sh +57 -0
  30. package/skills/sassy-setup/scripts/lib/yaml.sh +273 -0
  31. package/skills/sassy-setup/scripts/lockcheck.mjs +1 -1
  32. package/skills/sassy-setup/scripts/worktree-check.mjs +1 -1
  33. package/skills/sassy-ship/SKILL.md +4 -4
  34. package/skills/sassy-ship/references/brief.md +1 -1
  35. package/skills/sassy-ship/references/plan.md +1 -1
  36. package/skills/sassy-ship/references/slice.md +1 -1
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # Project config
@@ -99,9 +99,12 @@ worktrees:
99
99
  remove: scripts/worktrees/remove # this project's teardown; absent = built-in
100
100
  dogfood:
101
101
  enabled: false # true = sassy-plan writes Mode: Auto QA rows
102
- recipe: .sassywares/dogfood/recipe.md # the procedure
102
+ recipe: docs/dogfood.md # the procedure — a project document, reviewed like code
103
+ # recipes: # workspace only: one recipe per repo, keyed by repos:
104
+ # <repo>: docs/dogfood/<repo>.md # a path, or false — deliberately not dogfooded
103
105
  reports: .sassywares/dogfood/reports # run output, never committed
104
106
  timeout: 900 # whole procedure, seconds
107
+ keep: 10 # runs kept per repo; a green run prunes the oldest
105
108
  ```
106
109
 
107
110
  | Key | Default | Meaning |
@@ -127,9 +130,11 @@ dogfood:
127
130
  | `hooks.goal.<slug>.after_close` | `[]` | Project steps as `sassy-goal mode:close` persists the status, keyed by goal slug |
128
131
  | `hooks.push.<pattern>.after_push` | `[]` | Project steps after a push, keyed by the pushed branch (see Hooks) |
129
132
  | `dogfood.enabled` | `false` | `true` lets a plan write automated QA rows. Absent means `false` — manual QA, today's behavior |
130
- | `dogfood.recipe` | `.sassywares/dogfood/recipe.md` | The stored procedure `sassy-dogfood` executes. Its `Prove it:` step is the verdict |
133
+ | `dogfood.recipe` | `docs/dogfood.md` | A `repo` topology's one procedure, which `sassy-dogfood` executes — the project's own document, next to its plans and concepts. Its `Prove it:` step is the verdict. Point it at an existing runbook only if that runbook is already in this format. In a `workspace` it is drift: the map below replaces it |
134
+ | `dogfood.recipes` | `{}` | `workspace` only: repo folder → that repo's procedure, `docs/dogfood/<repo>.md`, or `false` for a repo that is deliberately not dogfooded. Keyed by `repos:`, so a key naming no repo is drift; a repo left out is one note and exits 0 |
131
135
  | `dogfood.reports` | `.sassywares/dogfood/reports` | Where a run writes its summary, step logs, and artifacts. Must be gitignored |
132
136
  | `dogfood.timeout` | `900` | Wall-clock for one run. A timeout is a failure, never a hang |
137
+ | `dogfood.keep` | `10` | How many run directories one repo keeps. An integer `>= 1`, counted in invocations, not sections. A legacy `<id>-<label>` directory counts as one run. The next completed green run prunes oldest-first; an over-quota set is a `--check` note, never drift |
133
138
  | `worktrees.enabled` | `false` | `true` lets a run *offer* its own checkout; it asks, or takes one on a `worktree:on` token, and works in this checkout on `worktree:off`. Needs `commit.branch: new` |
134
139
  | `worktrees.dir` | `~/.sassywares/worktrees` | Parent of the per-repo worktree folder. The one path here that may be absolute or `~/` |
135
140
  | `worktrees.create` | absent | The project's own prepare step: one executable path, no arguments. Absent uses the built-in `.sassywares/worktree/create` silently; a declared file that is missing or not executable falls back to it with a warning naming the key and the file |
@@ -380,9 +385,13 @@ in review, and commented when it is deliberate.
380
385
  - **Writes**: `before_create` may also commit, because it runs after the
381
386
  pipeline's commit. `after_push` may commit and push the checked-out head and
382
387
  push tags, never forcing, opening or merging a PR, or touching another branch.
383
- Every other point leaves the tree clean.
384
- - **Never**: push (bar `after_push`, above), open a PR, change `mode`, `branch`,
385
- or `merge`.
388
+ `after_merge` may act **in a checkout of the base** — fast-forward it to
389
+ `<remote>/<base>` and run steps there — because a release or a consumer sync
390
+ belongs on the base and cannot be done from the run's checkout, which is on the
391
+ PR head (a linked worktree, under `worktrees.enabled`). The run's own checkout
392
+ is never switched, moved, or dirtied. Every other point leaves the tree clean.
393
+ - **Never**: push (bar `after_push` and the base checkout an `after_merge` step
394
+ fast-forwards, above), open a PR, change `mode`, `branch`, or `merge`.
386
395
  - **Idempotent**: `after_merge` can be reached by a later run observing an
387
396
  already merged PR, `before_create` can run again on a re-ship, and `after_push`
388
397
  runs after an up-to-date push (nothing new) too.
@@ -426,7 +435,10 @@ A goal folder renamed to the `<type>-<slug>/` shape takes its `hooks.goal` keys
426
435
 
427
436
  `before_merge` and `after_merge` need a merge in this run. `pr.merge` defaults to
428
437
  `false`, so a project that declares them without enabling merging has inert
429
- hooks — the run says so in one line rather than skipping silently. `hooks.goal`
438
+ hooks — the run says so in one line rather than skipping silently. That is the
439
+ usual shape of an `after_merge` step: `commit.branch: new` never reaches a bare
440
+ push, so a project whose close-out must release from the base hangs it here
441
+ rather than on `hooks.push`, and the step resolves its own checkout of the base. `hooks.goal`
430
442
  never needs this run to merge anything — it fires on an observation, not on an
431
443
  action — but `before_slice` still waits until every earlier slice's PR is
432
444
  confirmed merged, because `mode:next` stops before it otherwise.
@@ -540,14 +552,18 @@ The namespace, the four toolbox scripts, and every refusal are in
540
552
 
541
553
  Agent QA: a stored procedure that proves a change works in the running product,
542
554
  not just in the diff. The block is a **pointer and a switch**, deliberately —
543
- four keys, no commands.
555
+ six keys, no commands.
544
556
 
545
557
  ```yaml
546
558
  dogfood:
547
559
  enabled: true
548
- recipe: .sassywares/dogfood/recipe.md
560
+ recipe: docs/dogfood.md # repo topology: the one procedure
561
+ # recipes: # workspace topology: one per repo, keyed by repos:
562
+ # web: docs/dogfood/web.md
563
+ # infra: false # deliberately not dogfooded
549
564
  reports: .sassywares/dogfood/reports
550
565
  timeout: 900
566
+ keep: 10
551
567
  ```
552
568
 
553
569
  Commands live in the recipe, not here. A copied command duplicates
@@ -557,6 +573,25 @@ prerequisites, and what counts as success between the steps. The recipe holds
557
573
  the order, an `Expect` per step, and one `Prove it:` step whose exit code is the
558
574
  verdict.
559
575
 
576
+ **The recipe is a project document.** It sits in `docs/` with the plans and the
577
+ glossary because the project edits it, and `.sassywares/` is suite-owned: only
578
+ our skills write there, and only run state (`reports/`, `session/`) lives there.
579
+ A recipe still at the old path `.sassywares/dogfood/recipe.md` is reported with
580
+ the exact command that moves it —
581
+ `mkdir -p docs && git mv .sassywares/dogfood/recipe.md docs/dogfood.md`, then the
582
+ key above. With `enabled: true` that is **drift**, a hard stop: a run would keep
583
+ appending to a file the rule no longer calls the recipe. With `enabled: false` it
584
+ is a **note** and the check still exits 0 — nothing reads the file, and a project
585
+ that never dogfoods must not fail a close-out over it. The suite never moves the
586
+ file itself; it names the command. In a `workspace` that command is never
587
+ printed: the finding names the per-repo split, and a leftover file beside a
588
+ written `recipes:` map is a note, not a stop — see
589
+ [`workspace.md`](workspace.md).
590
+
591
+ **A workspace holds one map, at its root:** `recipes:` keyed by `repos:`, each
592
+ value `docs/dogfood/<repo>.md` or `false`, never a single `recipe:`. See
593
+ [`workspace.md`](workspace.md).
594
+
560
595
  **Two gates.** An `Auto` QA row needs `enabled: true` **and** a recipe section
561
596
  with a `Prove it:` step. One without the other keeps the row `Manual`, which is
562
597
  how an unfinished recipe degrades safely instead of producing a green gate that
@@ -567,6 +602,9 @@ proves nothing.
567
602
  report layout, the verdict classes, and the lint are in
568
603
  [`dogfood.md`](dogfood.md).
569
604
 
605
+ **Retention is a number, not a sentence.** The cap, the green-only prune, and the
606
+ over-quota note are [`dogfood.md`](dogfood.md)'s *Reports* section.
607
+
570
608
  ## Fail closed vs soft
571
609
 
572
610
  - **Fail closed** (stop, say why): an unusable `artifacts.*` or `git.*` value.
@@ -606,12 +644,26 @@ report layout, the verdict classes, and the lint are in
606
644
  booleans and parse inconsistently.
607
645
  - `knowledge.read` is an inline list (`read: [a, b]`). A block list is not read
608
646
  by the config reader, so it would silently scout nothing.
609
- - `dogfood.*` is exactly four keys; `enabled` is `true` or `false`, `timeout`
610
- is a positive integer, and both paths are repo-relative and inside the
611
- project. `reports` must be gitignored in a `repo` topology, and the recipe is
612
- structurally linted — a section without a `Prove it:` line, a step without an
613
- `Expect`, or a secret-shaped string is drift. See
647
+ - `dogfood.*` is `enabled`, `recipe`, `reports`, `timeout`, `keep`, plus
648
+ `recipes` in a workspace; `enabled` is `true` or `false`, `timeout`
649
+ is a positive integer, `keep` is an integer `>= 1` (`0` would delete the report
650
+ a run just wrote), and every path is repo-relative and inside the
651
+ project. `recipe` defaults to `docs/dogfood.md`, and the old
652
+ `.sassywares/dogfood/recipe.md` is drift while `enabled` is `true`, a note
653
+ while it is `false` or once a workspace's `recipes:` map is written. A `repo`
654
+ topology gets the exact `git mv`; a `workspace` gets the per-repo split — see
655
+ [`dogfood.md`](dogfood.md) and [`workspace.md`](workspace.md). `reports` must
656
+ be gitignored in a `repo` topology, and the
657
+ recipe is structurally linted — a section without a `Prove it:` line, a step
658
+ without an `Expect`, or a secret-shaped string is drift. See
614
659
  [`dogfood.md`](dogfood.md).
660
+ - `dogfood.recipes` is a map, keyed by the repo folder `repos:` lists, and only
661
+ in a `workspace`: a key outside `repos:` is drift (it names no repo), a value
662
+ must be that repo's own `docs/dogfood/<repo>.md` or the literal `false`, and a
663
+ repo absent from the map is a note with exit 0 — most repos in a workspace are
664
+ never dogfooded. A `recipes:` key in a `repo` topology is drift, and so is a
665
+ stray `recipe:` in a `workspace`: the two forms never coexist. See
666
+ [`workspace.md`](workspace.md).
615
667
  - An unknown key is an error, not a fallback: a typo parses, is ignored, and the
616
668
  run uses a default this project never chose.
617
669
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # Dogfood
@@ -32,17 +32,22 @@ duplicate `package.json` or a `Makefile` and drift from it silently.
32
32
  ```yaml
33
33
  dogfood:
34
34
  enabled: false # false = every QA row is Manual
35
- recipe: .sassywares/dogfood/recipe.md # the procedure
35
+ recipe: docs/dogfood.md # the procedure — the project's document
36
+ # recipes: # workspace only: one per repo, keyed by repos:
37
+ # web: docs/dogfood/web.md # a path, or false — deliberately not dogfooded
36
38
  reports: .sassywares/dogfood/reports # run logs and artifacts; never committed
37
39
  timeout: 900 # whole procedure, seconds
40
+ keep: 10 # run directories kept per repo
38
41
  ```
39
42
 
40
43
  | Key | Default | Meaning |
41
44
  |-----|---------|---------|
42
45
  | `dogfood.enabled` | `false` | `true` lets `sassy-plan` write `Mode: Auto` QA rows. `false` forbids them. Absent means `false`: no block is today's behavior — manual QA |
43
- | `dogfood.recipe` | `.sassywares/dogfood/recipe.md` | The procedure. Relative to the config. Point it at an existing runbook only if that runbook is already in this format |
46
+ | `dogfood.recipe` | `docs/dogfood.md` | A `repo` topology's procedure. Relative to the config. Point it at an existing runbook only if that runbook is already in this format. In a workspace it is drift — `recipes:` replaces it |
47
+ | `dogfood.recipes` | `{}` | `workspace` only: repo folder → that repo's procedure at `docs/dogfood/<repo>.md`, or `false` for a repo that is deliberately not dogfooded. Keyed by `repos:` |
44
48
  | `dogfood.reports` | `.sassywares/dogfood/reports` | Where a run writes its summary, step logs, and artifacts. Must be gitignored |
45
49
  | `dogfood.timeout` | `900` | Wall-clock for one whole run. A timeout is a failure, never a hang |
50
+ | `dogfood.keep` | `10` | How many run directories one repo keeps — invocations, not sections. A legacy `<id>-<label>` directory counts as one run. The next completed green run prunes oldest-first; over quota is a `--check` note, never drift |
46
51
 
47
52
  `enabled` is written explicitly by `sassy-setup`, never left to inference, so a
48
53
  teammate reads the decision instead of guessing at it. `enabled: true` is not a
@@ -52,15 +57,52 @@ promise that a check exists: an unfinished recipe degrades to Manual rows
52
57
  ## Files
53
58
 
54
59
  ```text
60
+ docs/
61
+ └── dogfood.md the procedure — the project's, committed and reviewed like code
55
62
  .sassywares/
56
63
  ├── config.yaml
57
64
  ├── .gitignore /session/ and /dogfood/reports/ — setup-owned
58
65
  ├── session/ cookie jar, storage state, token — shared, never committed
59
66
  └── dogfood/
60
- ├── recipe.md the procedure — committed, reviewed like code
61
67
  └── reports/ run output — never committed
62
68
  ```
63
69
 
70
+ **The recipe is a project document, not suite state.** It sits in `docs/` beside
71
+ the plans, the glossary, and the strategy because the project writes and reviews
72
+ it; `.sassywares/` is suite-owned, and the only project-shaped thing that ever
73
+ lives there is run output (`reports/`, `session/`), which is gitignored. So
74
+ `docs/dogfood.md` is committed and reviewed like code, and a recipe is never
75
+ planted inside `.sassywares/`.
76
+
77
+ **A workspace holds one map, at its root:** `recipes:` keyed by `repos:`, each
78
+ value `docs/dogfood/<repo>.md` or `false`, never a single `recipe:`. See
79
+ [`workspace.md`](workspace.md).
80
+
81
+ **Migrating an older project.** The recipe used to live at
82
+ `.sassywares/dogfood/recipe.md`. A project still there is told exactly what to
83
+ do, and the suite never moves the file itself — it is the project's:
84
+
85
+ ```bash
86
+ mkdir -p docs && git mv .sassywares/dogfood/recipe.md docs/dogfood.md
87
+ # then, under dogfood: in .sassywares/config.yaml
88
+ # recipe: docs/dogfood.md
89
+ ```
90
+
91
+ In a `workspace` the same file gets the workspace form instead: one
92
+ `docs/dogfood/<repo>.md` per repo, declared as the `recipes:` map, with the
93
+ reader deciding which sections belong to which repo. It prints no command — the
94
+ single-file move above would restore one combined recipe, the shape a workspace
95
+ no longer has — and the old file stays until every section is distributed.
96
+
97
+ With `dogfood.enabled: true` the old path is **drift** and `--check` fails: a run
98
+ would keep appending to a file the rule no longer calls the recipe, and a planner
99
+ would write Auto rows against it. Dogfooding is stopped until the recipe moves.
100
+ With `dogfood.enabled: false` it is a **note** and the check still exits 0 —
101
+ nothing reads the file, and refusing a project that never dogfoods would fail a
102
+ close-out over a path that is inert there. In a `workspace` once the `recipes:`
103
+ map is written, the leftover file is a **note** either way: the split is under
104
+ way, so keep it until every section is distributed and delete it yourself.
105
+
64
106
  The two ignore lines are setup-owned. `--check` reports it missing as drift,
65
107
  because a project that "helpfully" removes it commits screenshots by accident.
66
108
 
@@ -83,6 +125,8 @@ because a project that "helpfully" removes it commits screenshots by accident.
83
125
 
84
126
  **Preview:** the catalog page, in a browser
85
127
 
128
+ **Capture:** the catalog page
129
+
86
130
  **Upstream:** `api.example.com` — a service this run does not control. Down is
87
131
  `env`, never a retry.
88
132
 
@@ -101,6 +145,9 @@ because a project that "helpfully" removes it commits screenshots by accident.
101
145
 
102
146
  ## mobile — no runtime path yet
103
147
 
148
+ **Capture:** none — the app never starts in this repo; its capture surface arrives
149
+ with its runtime check.
150
+
104
151
  **Uncovered:** 100+ unit tests that never start the app; a later discovery builds its
105
152
  runtime check.
106
153
 
@@ -129,8 +176,8 @@ answer. A section without one has no verdict.
129
176
 
130
177
  ### File level and section level
131
178
 
132
- `**Preview:**`, `**Upstream:**`, `**Set up once:**`, and `**Reset:**` can be written at
133
- file level **or inside a `## ` section**. A section's own value wins for that section;
179
+ `**Preview:**`, `**Upstream:**`, `**Set up once:**`, `**Reset:**`, and `**Capture:**` can be
180
+ written at file level **or inside a `## ` section**. A section's own value wins for that section;
134
181
  the file-level value is the default every section inherits.
135
182
 
136
183
  - **One surface: keep it flat.** File-level lines, one section — the shape most
@@ -162,6 +209,24 @@ value it needs has to resolve in both places.
162
209
  | Desktop | `the app window is already open` |
163
210
  | CLI | *(none — there is nothing to look at)* |
164
211
 
212
+ **One `**Capture:**` line**, optional, is **what a run should photograph**, never
213
+ the thing that photographs it. It names a surface — `the catalog page`, `the
214
+ checkout screen`, `the CLI output` — and never a browser, driver, emulator, or
215
+ MCP server: which harness tool takes the picture changes with the machine, and
216
+ the recipe must outlive it. There is no default tool and nothing is installed for
217
+ it; a run uses what the harness already has.
218
+
219
+ - **Absent means capture when the harness can see the surface.** An existing
220
+ recipe needs no edit to start capturing; a run that cannot see or save the
221
+ surface records `capture: unavailable — <reason>` and the verdict stands.
222
+ - **`none` is the only refusal**, and it carries a reason:
223
+ `**Capture:** none — the billing screen shows card data and is never recorded`.
224
+ A section's own `none` wins for that section.
225
+ - **Capture never changes a verdict.** The step's `Expect` and the section's
226
+ `Prove it:` decide; a capture that fails or is impossible is written down, never
227
+ retried into a pass, and the happy path is captured too — pass evidence is what
228
+ a PR shows.
229
+
165
230
  **`**Upstream:**` and `**Uncovered:**`** are optional header lines that make the
166
231
  two dangerous facts visible without reading every step: which third-party services
167
232
  the recipe depends on, and which parts have no machine verdict at all. `Uncovered`
@@ -233,65 +298,118 @@ transplant when it is only the wrong mechanism.
233
298
  ```text
234
299
  .sassywares/dogfood/reports/
235
300
  └── 20260514-093107/ run id: YYYYMMDD-HHMMSS, sorts chronologically
236
- ├── summary.md the only file read whole
237
- ├── steps/
301
+ ├── summary.md one row per section; the only file read whole
302
+ ├── steps/ every section's logs, one directory per invocation
238
303
  │ ├── catalog-01.log <section>-<NN> — a file name is a citation
239
- │ └── catalog-05.log
240
- └── artifacts/
304
+ │ ├── catalog-05.log
305
+ │ └── checkout-02.log
306
+ └── artifacts/ every section's captures, same naming
307
+ ├── catalog-01.png <section>-<NN>.png — the step's capture
241
308
  ├── catalog-03-header.png
242
- └── catalog-05-trace.zip
309
+ └── checkout-02.png
243
310
  ```
244
311
 
312
+ **One directory per invocation, one row per section.** A run that executes three
313
+ sections writes one run directory holding all three sections' logs and captures,
314
+ and one verdict row per section. A run is never one directory per section: `keep`
315
+ counts directories per bucket, and sections inside a run are its rows.
316
+
317
+ The run id is `YYYYMMDD-HHMMSS`. A directory written by an older release may
318
+ carry a legacy `-<label>` suffix (`20261204-215042-messages`, `20261130-101637-od`):
319
+ its first 15 characters are still the clock, so it sorts in place and counts as
320
+ one run. A new run never writes a label.
321
+
322
+ **In a workspace the run is filed under its repo:** `reports/<repo>/<run-id>/`,
323
+ never `reports/<run-id>/` and never a workspace-level summary — the path says which
324
+ repo the run belonged to, and the summary's first line carries it too
325
+ (`# Dogfood run <run-id> — <repo>`), so a pasted run is self-identifying. The tree
326
+ above is one run directory — `summary.md`, `steps/`, `artifacts/` — in whichever
327
+ bucket the run was filed. What a run covers, and the rollup it prints, are
328
+ `run.md` §1 and §7.
329
+
245
330
  ```markdown
246
- # Dogfood run 20260514-093107
331
+ # Dogfood run 20260514-093107 — <repo>
247
332
 
248
333
  **status:** failed
249
334
  **class:** code
250
- **section:** catalog
251
- **recipe:** .sassywares/dogfood/recipe.md @ a91f3c2
335
+ **recipe:** docs/dogfood.md @ a91f3c2
252
336
  **started:** 09:31:07 **finished:** 09:33:41
253
337
 
254
- | Step | Expect | Result |
255
- |---|---|---|
256
- | catalog-1 | `seeded 12 products` | pass |
257
- | catalog-5 | exit 0 | **fail, exit 1** |
338
+ | Section | Verdict | Class | Failing step | Capture |
339
+ |---|---|---|---|---|
340
+ | catalog | pass | — | — | `artifacts/catalog-01.png` |
341
+ | checkout | **fail** | code | `checkout-4` exit 1 | `artifacts/checkout-02.png` |
342
+ | auth | pass | — | — | `none — the section refuses capture` |
258
343
 
259
- **Prove it:** catalog-5 → exit 1. 3 of 41 e2e specs failed.
260
- **Artifacts:** `artifacts/catalog-05-report.json`, `artifacts/catalog-05-trace.zip`
261
- **Next:** re-run from catalog-4, not catalog-1.
344
+ **Prove it:** catalog-5 → exit 0; checkout-4 → exit 1; auth-3 → exit 0.
345
+ **Artifacts:** `artifacts/catalog-01.png`, `artifacts/checkout-02.png`, `artifacts/checkout-04-trace.zip`
346
+ **Next:** re-run `section:checkout` from checkout-4, not checkout-1.
262
347
  ```
263
348
 
264
- `summary.md` is created at the start with `status: running` and finalized on exit.
265
- A killed session therefore leaves an accurate breadcrumb, and the next one reads
266
- one file to know where it stopped.
267
-
268
- - **`status`** — `running` | `pass` | `failed`.
349
+ **The `Capture` cell is the index.** It lists the images the section produced,
350
+ `none — <reason>` when the section refused capture, or `capture: unavailable —
351
+ <reason>` when the harness could not see or save a surface. A capture is taken
352
+ on the happy path too, and it never changes a `Verdict`: the step's `Expect` and
353
+ the section's `Prove it:` decide. The reports directory — images included — stays
354
+ gitignored, so a capture is evidence for this run, never a file a commit links.
355
+
356
+ `summary.md` is created at the start with `status: running` and every target
357
+ section's row `pending`, and finalized on exit. A killed session therefore leaves
358
+ an accurate breadcrumb, and the next one reads one file to know where it stopped.
359
+
360
+ - **`status`** — `running` | `pass` | `failed`. `pass` only when every row is
361
+ `pass`; any red row makes the run `failed`.
362
+ - **A section verdict** — `pending` | `pass` | `failed`, taken from that section's
363
+ `Prove it:` step alone. A red section ends **itself**, never the run: the
364
+ invocation continues through the remaining sections, so three sections give
365
+ three verdicts in one directory.
269
366
  - **`class`** — `code` (a finding for the rework cycle) | `env` (the environment
270
367
  cannot produce a verdict: a missing dependency, exit 75 or 127, or a third-party
271
368
  service nobody in this run owns being down — report and park, never loop) |
272
369
  `recipe` (the procedure itself is stale: a renamed script, a dead URL, a step
273
370
  that cannot be followed). `recipe` is the rot signal: the run proposes a
274
- one-line diff and never quietly improvises around it.
371
+ one-line diff and never quietly improvises around it. A failed section carries
372
+ its own class; the run's `class` is the first failed section's, in recipe order.
275
373
  - **A preflight or bring-up failure** has no step id: its log is `steps/00-setup.log`
276
- and its table row is `setup`. It is a verdict about the environment, so it still
277
- gets a `class`.
374
+ and the run gets one `setup` row instead of the sections. It is a verdict about
375
+ the environment, so it still gets a `class`, and no section runs.
278
376
  - **One log per executed step**, capped head-and-tail (~64 KB) with a
279
377
  `[truncated N lines]` marker, so a runaway loop cannot fill the disk.
378
+ - **One capture per step where the harness can see the surface**, at
379
+ `artifacts/<section>-<NN>.png`, labeled with a suffix when a step needs more
380
+ than one. A section marked `**Capture:** none` writes none and its reason goes in
381
+ the index; an impossible or failed capture is `capture: unavailable — <reason>`.
280
382
  - **Redaction happens before the write.** Every value of an env var the recipe
281
383
  names is masked, plus a token-shape pass. A recipe that "stores creds" must not
282
384
  leave them in a log an agent will later paste into a report.
283
385
  - **The agent never reads a log whole.** It reads `summary.md`, then the last
284
386
  ~600 characters of the failing step. An agent that reads a 40k-line log dies of
285
387
  a missing semicolon.
286
- - **Reports are pruned to the ten most recent** at the start of each run. Nothing
287
- is committed here, so nothing must survive. The durable record is the QA row's
288
- note — `catalog-5 exit 1, run 20260514-093107` — which never depends on a path
289
- that will be deleted.
388
+ - **Reports are pruned to `dogfood.keep`, after a complete green run.** One
389
+ directory is one invocation, so `keep` counts directories per bucket — in a
390
+ workspace an invocation writes one per repo — never sections. The
391
+ ordering key is the run id: `YYYYMMDD-HHMMSS` is fixed-width, so a lexical sort
392
+ is chronological and "oldest" is the first name — even for an older directory
393
+ with a legacy `-<label>` suffix, which counts as one run, as *Reports* defines.
394
+ Pruning runs as the **last**
395
+ step, only once `summary.md` says `status: pass`, once per bucket — `reports/` in a repo
396
+ topology, `reports/<repo>/` in a workspace, so each repo is capped by itself
397
+ — and it removes the oldest names first until `keep` remain, never the
398
+ directory it is writing into. A killed run never reaches that step and prunes
399
+ nothing; a `failed` run leaves the whole set alone, because a cap is not a
400
+ license to delete a red run's evidence. A workspace's flat `reports/` bucket is
401
+ not a bucket any run maintains: it is a half-migrated layout that has to be
402
+ moved into `reports/<repo>/`, so `--check` keeps reporting it rather than
403
+ skipping it like a repo that is not dogfooded. The exact command is in
404
+ [`run.md`](../../sassy-dogfood/references/run.md).
405
+ - **Nothing is committed here, so nothing must survive.** The durable record is
406
+ the QA row's note — `catalog-5 exit 1, run 20260514-093107` — which never
407
+ depends on a path that will be deleted.
290
408
  - **Never committed.** Not the logs, the artifacts, or the traces.
291
409
  - **Never deleted by a recipe.** `**Reset:**` puts the *product* back to a known
292
- state; it never touches `reports/`. Pruning to ten is the tooling's job, and a
293
- recipe that deletes reports destroys the record of the failure you were about to
294
- investigate — including the one that is still open.
410
+ state; it never touches `reports/`. Pruning is the tooling's job and only after
411
+ a green run, and a recipe that deletes reports destroys the record of the
412
+ failure you were about to investigate — including the one that is still open.
295
413
 
296
414
  ## Two gates: `enabled` and the recipe
297
415
 
@@ -306,10 +424,10 @@ lying switch.
306
424
  | Artifact | Owner |
307
425
  |----------|-------|
308
426
  | `dogfood:` block in the config | `sassy-setup` — the only skill that writes the config |
309
- | `.sassywares/dogfood/recipe.md` | `sassy-dogfood` (`mode:discover` authors and repairs it; a `mode:run` never edits it to pass) |
427
+ | `docs/dogfood.md` | `sassy-dogfood` (`mode:discover` authors and repairs it; a `mode:run` never edits it to pass) — scaffolded once by `sassy-setup`, then the project's |
310
428
  | `.sassywares/.gitignore` | `sassy-setup`; never removes a line |
311
429
  | `.sassywares/session/` contents | the project — obtained and written by its own step or hook, never by this skill |
312
- | `reports/` | `sassy-dogfood`, always gitignored, pruned to ten |
430
+ | `reports/` | `sassy-dogfood`, always gitignored, pruned to `dogfood.keep` by a completed green run |
313
431
  | `Mode: Auto` QA rows | `sassy-plan`, a section name per row |
314
432
  | Row results | `sassy-work`, from a passing report — never from an opinion |
315
433
 
@@ -317,10 +435,13 @@ lying switch.
317
435
 
318
436
  Structural, never executed:
319
437
 
320
- - `enabled` is `true|false`; `timeout` is a positive integer; both paths are
321
- relative and stay inside the project.
438
+ - `enabled` is `true|false`; `timeout` is a positive integer; `keep` is an
439
+ integer `>= 1`; both paths are relative and stay inside the project.
322
440
  - `recipe` exists when `enabled` is `true` — absent, it is "created by the first
323
441
  `sassy-dogfood` run", a note rather than drift.
442
+ - `recipe` is accepted wherever it points; the one path flagged is the legacy
443
+ `.sassywares/dogfood/recipe.md`, named with the command that moves it in a
444
+ `repo` topology, or with the per-repo split in a `workspace`.
324
445
  - `reports` is gitignored in a `repo` topology (`git check-ignore`), since a run
325
446
  once committed would be drift nobody catches later. The same check covers
326
447
  `.sassywares/session` whenever that directory exists — a committed session is a
@@ -331,4 +452,24 @@ Structural, never executed:
331
452
  line whose value names a step (`step 3`) or is `none`, every numbered step has an
332
453
  `**Expect**`, and the file carries no secret-shaped strings. A `Prove it:` that
333
454
  is neither is a typo, and a typo reads as a verdict.
455
+ - Every `**Capture:**` line names a surface — a page, screen, view, window, or
456
+ output — and never names a capture tool. The lint catches every capture-product
457
+ name (Playwright, Puppeteer, Selenium, Cypress, Appium, WebDriverIO, BrowserStack,
458
+ XCUITest, Maestro, Detox, a `*driver`) anywhere in the value, and rejects a
459
+ generic word (browser, driver, emulator, simulator, headless, devtools, safari,
460
+ chrome, firefox, webkit, MCP) only when it is the whole value — `the browser`
461
+ is drift, `the browser tab strip settings page` is a surface. `none` carries a
462
+ reason (`none — <reason>`), and an absent line is legal, meaning
463
+ capture-when-possible. The lint is structural, and prose carries the rest: it
464
+ never checks whether the harness can actually see the surface.
334
465
  - `dogfood.*` is a known key block; anything else in it is an unknown key.
466
+ - The reports directory is counted per bucket — `reports/` in a `repo` topology,
467
+ `reports/<repo>/` in a workspace, where a run files one directory per repo — and
468
+ a bucket holding more than `keep` run directories is a **note** naming the count
469
+ and the bucket, with the check still exiting 0. A run directory is
470
+ `YYYYMMDD-HHMMSS`, or an older one with a legacy `-<label>` suffix, which
471
+ counts as one run, as *Reports* defines. A bucket under a repo that is
472
+ not dogfooded (`false` or no entry in `recipes:`) is not counted: no run will
473
+ ever prune it, so a note there would be permanent noise with nothing to act on.
474
+ Nothing is deleted here; the prune is the one *Reports* describes, by the next
475
+ completed green run, or by hand.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # Harness conventions
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # Mode: init — detect, ask, write, wire
@@ -32,12 +32,14 @@ Never re-ask what the tree already said.
32
32
  - **`pr.*`** — default `babysit: true`, `merge: false`, `delete_branch: false`. Say plainly that `merge: true` authorizes merging every babysat PR in this project without asking.
33
33
  - **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). Also offer goal hooks — `before_slice` and `after_close` under `hooks.goal`, keyed by the goal slug — as base refresh, environment preparation, and boundary announcements that never touch the goal itself and leave every base level with its remote. 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.
34
34
  - **Worktrees** — ask whether the project wants parallel work in this repo: a checkout per branch, each with its own derived namespace, 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, or outright when the run carries a `worktree:on` token, and `sassy-worktree` gains `create`, `list`, and `remove`. 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`. **Ask what a checkout will need for this project** and carry each confirmed need into step 6's interview, which owns the pattern menu and writes it as a labelled comment in the project's own scripts. Never a hook skill, and never a body setup writes.
35
- - **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.
35
+ - **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 — **in a workspace, ask which repos come first**: a workspace dogfoods some repos, never all of them, so the map gets an entry per repo the user picks and no entry for the rest. Then 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.
36
36
  ## 4. Write the config
37
37
 
38
38
  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.
39
39
 
40
- **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.
40
+ **The dogfood scaffold, only when the answer was yes.** Write `docs/dogfood.md` — the project's recipe — from `assets/dogfood-recipe.md`: the asset verbatim, with the header's `<version>` and `<YYYY-MM-DD>` replaced as [`scaffold-header.md`](scaffold-header.md) says, creating `docs/` when it does not exist. Then `.sassywares/.gitignore` with two lines — `/session/` and `/dogfood/reports/` — adding them to a `.gitignore` that already exists rather than replacing it. **No recipe file ever lands under `.sassywares/`**: the recipe is the project's document and that folder is suite-owned, so `.sassywares/dogfood/` holds `reports/` only, written by the first run (and `session/` once something needs one), never a file setup wrote. **In a `workspace` the same skeleton goes to `docs/dogfood/<repo>.md`, one per repo the user picked in step 3.** Write the `recipes:` map for exactly those repos, one entry each, pointing at the file just written; a repo the user declined is simply left out, and `false` is written only when they say the repo is deliberately off. A repo that already has its file is not overwritten either: say it is there and leave it, and keep its entry.
41
+
42
+ Never overwrite an existing `docs/dogfood.md`, and never a recipe already sitting at `.sassywares/dogfood/recipe.md` — show it and ask, naming `docs/dogfood.md` as where it belongs now. 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.
41
43
 
42
44
  **The worktree keys and scripts are written in step 6**, once the pair exists. Nothing here writes them.
43
45
 
@@ -108,7 +110,7 @@ Then return to `SKILL.md` for steps 7–9.
108
110
  | Comments are part of the file | Every key keeps its description and allowed values. A stripped config is an incomplete config. |
109
111
  | Hooks are named, not written | Setup records hook skill names. Creating those skills is the project's work. |
110
112
  | The block is never a rewrite | `AGENTS.md` gets the marked block and nothing else. An existing file's own lines are never touched, a differing block is shown as a diff and asked about, and `CLAUDE.md` is never written. |
111
- | 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. |
113
+ | Dogfood is a pointer | The block names a recipe, a reports path, a timeout, how many runs to keep, and whether Auto rows are allowed — never a command and never a tool: a copied command duplicates the manifest and cannot express step order. A `workspace` names one recipe per repo instead, keyed by `repos:`, in the root's one config. |
112
114
  | The strategy is offered, never authored | Setup names `sassy-strategy` and offers the interview. Every question, section, and status flip belongs to that skill's own run: a setup run that drafts a line has written an anchor nobody grilled. |
113
115
  | 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. |
114
116
  | 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. |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # Resolving a plan
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  suite: sassy-skills
3
3
  artifact: reference
4
- generated_by: sassy-setup@0.17.0
4
+ generated_by: sassy-setup@0.17.3
5
5
  ---
6
6
 
7
7
  # The scaffold header
@@ -21,8 +21,15 @@ its own `worktree-version` line instead.
21
21
  # sassywares:scaffold v1 skill=<name> version=<version> date=<YYYY-MM-DD>
22
22
  ```
23
23
 
24
+ A Markdown document carries the same block inside an HTML comment, so it does not
25
+ render: `<!--`, the header line above, a blank line, the prose block, `-->`. `#`
26
+ is an ATX heading in Markdown, so the bare form would open the project's document
27
+ with a bogus H1 and a heading per prose line; inside the comment the header's
28
+ bytes — the `# sassywares:scaffold` marker included — are unchanged. Scripts keep
29
+ the `#` form.
30
+
24
31
  `skill` is the suite skill that wrote it (`sassy-setup`), `date` is the day it was
25
- written. After that line come a blank comment line and the prose block: the
32
+ written. After that line come a blank line and the prose block: the
26
33
  file's contract — what it is called as, what it must exit with, what it must
27
34
  print — and the statement that future setup runs leave it alone. The header is
28
35
  part of the file; never move it below the contract.