@sassywares/skills 0.14.0 → 0.16.0

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 (73) hide show
  1. package/README.md +58 -34
  2. package/package.json +1 -2
  3. package/skills/sassy-babysit/SKILL.md +3 -0
  4. package/skills/sassy-commit/SKILL.md +4 -1
  5. package/skills/sassy-commit-push-pr/SKILL.md +4 -1
  6. package/skills/sassy-compound/SKILL.md +4 -1
  7. package/skills/sassy-compound/references/concepts.md +8 -2
  8. package/skills/sassy-compound/references/templates.md +6 -0
  9. package/skills/sassy-cycle/SKILL.md +4 -1
  10. package/skills/sassy-debug/SKILL.md +3 -0
  11. package/skills/sassy-docs/SKILL.md +3 -0
  12. package/skills/sassy-docs/references/handbook-format.md +6 -0
  13. package/skills/sassy-docs/references/handbook.md +6 -0
  14. package/skills/sassy-docs/references/review.md +11 -2
  15. package/skills/sassy-dogfood/SKILL.md +3 -0
  16. package/skills/sassy-dogfood/references/check.md +6 -0
  17. package/skills/sassy-dogfood/references/discover.md +6 -0
  18. package/skills/sassy-dogfood/references/run.md +6 -0
  19. package/skills/sassy-goal/SKILL.md +18 -12
  20. package/skills/sassy-goal/references/check.md +7 -1
  21. package/skills/sassy-goal/references/close.md +11 -4
  22. package/skills/sassy-goal/references/goal-format.md +17 -4
  23. package/skills/sassy-goal/references/next.md +15 -9
  24. package/skills/sassy-goal/references/revise.md +25 -0
  25. package/skills/sassy-goal/references/write.md +8 -0
  26. package/skills/sassy-handoff/SKILL.md +3 -0
  27. package/skills/sassy-handoff/references/read.md +6 -0
  28. package/skills/sassy-handoff/references/write.md +6 -0
  29. package/skills/sassy-overview/SKILL.md +3 -0
  30. package/skills/sassy-overview/references/identify.md +6 -0
  31. package/skills/sassy-plan/SKILL.md +30 -23
  32. package/skills/sassy-plan/references/interview.md +8 -2
  33. package/skills/sassy-plan/references/plan-format.md +40 -11
  34. package/skills/sassy-plan/references/revision-format.md +86 -0
  35. package/skills/sassy-plan/references/sketches.md +6 -0
  36. package/skills/sassy-review/SKILL.md +3 -0
  37. package/skills/sassy-scout/SKILL.md +3 -0
  38. package/skills/sassy-setup/SKILL.md +22 -11
  39. package/skills/sassy-setup/assets/agents-md.md +71 -0
  40. package/skills/sassy-setup/assets/roster +1 -1
  41. package/skills/sassy-setup/references/anchors.md +128 -0
  42. package/skills/sassy-setup/references/branching.md +19 -10
  43. package/skills/sassy-setup/references/check.md +20 -2
  44. package/skills/sassy-setup/references/config.md +22 -12
  45. package/skills/sassy-setup/references/dogfood.md +6 -0
  46. package/skills/sassy-setup/references/harness.md +6 -0
  47. package/skills/sassy-setup/references/init.md +10 -0
  48. package/skills/sassy-setup/references/plan-resolution.md +53 -0
  49. package/skills/sassy-setup/references/scaffold-header.md +6 -0
  50. package/skills/sassy-setup/references/workspace.md +29 -0
  51. package/skills/sassy-setup/references/worktree.md +6 -0
  52. package/skills/sassy-setup/scripts/detect.sh +282 -31
  53. package/skills/sassy-ship/SKILL.md +8 -5
  54. package/skills/sassy-ship/references/brief.md +6 -0
  55. package/skills/sassy-ship/references/plan.md +7 -1
  56. package/skills/sassy-ship/references/slice.md +6 -0
  57. package/skills/sassy-simplify/SKILL.md +3 -0
  58. package/skills/sassy-skill/SKILL.md +3 -0
  59. package/skills/sassy-skill/references/create.md +6 -0
  60. package/skills/sassy-skill/references/retune.md +6 -0
  61. package/skills/sassy-skill/references/verify.md +6 -0
  62. package/skills/sassy-strategy/SKILL.md +69 -0
  63. package/skills/sassy-strategy/references/check.md +87 -0
  64. package/skills/sassy-strategy/references/strategy-format.md +90 -0
  65. package/skills/sassy-strategy/references/write.md +186 -0
  66. package/skills/sassy-validate/SKILL.md +4 -1
  67. package/skills/sassy-work/SKILL.md +66 -68
  68. package/skills/sassy-worktree/SKILL.md +3 -0
  69. package/skills/sassy-worktree/references/create.md +6 -0
  70. package/skills/sassy-worktree/references/list.md +6 -0
  71. package/skills/sassy-worktree/references/remove.md +6 -0
  72. package/CONCEPTS.md +0 -178
  73. package/skills/sassy-lfg/SKILL.md +0 -92
@@ -1,93 +1,92 @@
1
1
  ---
2
+ suite: sassy-skills
3
+ artifact: skill
4
+ generated_by: sassy-work
2
5
  name: sassy-work
3
6
  description: >-
4
- Execute exactly one phase of a sassy plan by delegating to sassy-cycle, then
5
- commit it (or close out via sassy-ship if it was the last). The next phase is
6
- a run of its own when the user starts one. Also runs one settled in-context
7
- brief and stops before ship. The orchestrator only coordinates.
8
- argument-hint: "<plan path | brief> [phase:<n>] [branch:infer|current|new] [worktree:on|off] [review:logic|surface|none]"
7
+ Run a sassy plan — every phase then ship by default, or one phase at a time
8
+ with mode:phase — or one settled in-context brief. Delegates each phase to
9
+ sassy-cycle, commits at every phase boundary, gates on code approval plus QA,
10
+ turns feedback into a plan revision, and closes out via sassy-ship. The
11
+ orchestrator only coordinates.
12
+ argument-hint: "<plan path | brief> [mode:ship|phase] [phase:<n>] [branch:infer|current|new] [worktree:on|off] [review:logic|surface|none]"
9
13
  ---
10
14
 
11
15
  # Sassy Work
12
16
 
13
- **Outcome:** one phase run through `sassy-cycle`, findings fixed, then a single gate that carries both the code approval and the phase's QA checklist (`Manual` rows from the user, `Auto` rows from a `sassy-dogfood` report), marked `Done` only when both pass, committed via `sassy-commit`; then the run ends, or a `sassy-ship` close-out when this was the last phase.
17
+ **Outcome:** every phase not `Done` run through `sassy-cycle`, each committed at its boundary, gated on code approval plus its QA rows — and in `mode:ship`, closed out by `sassy-ship`. Feedback at a gate becomes a revision on the plan, never a pile of edits on a dirty tree.
14
18
 
15
- **Brief input** runs one cycle, presents the code approval gate, commits, and **stops before shipping**.
19
+ ## Modes
16
20
 
17
- **The orchestrator does not do work.** Read the plan, dispatch `sassy-cycle`, apply its result, update the plan's tracking table, dispatch `sassy-commit` or the snapshot, and report. Never edit application code.
21
+ | Mode | Runs | Gates | Ends with |
22
+ |---|---|---|---|
23
+ | `mode:ship` *(default)* | every phase not `Done`, in order | once, after the last phase | `sassy-ship` |
24
+ | `mode:phase` | one phase — the first not `Done`, or the one `phase:<n>` names | after that phase | a report |
18
25
 
19
- **Config.** Resolve `.sassywares/config.yaml` (nearest, walking up) per the `sassy-setup` skill's `references/config.md`. Precedence: explicit token > session instruction > config > skill default. `git.repo` decides what the phase commit does, `artifacts.plans` decides where the plan lives, `commit.branch` decides whether this run needs its own branch, and a `worktree:on|off` token answers the checkout question `branching.md` asks at step 6. The token outranks config but never widens what `worktrees.enabled` allows.
26
+ Both modes run **one process**; only the gate's position differs. `phase:<n>` is a selector, never a stopping mode: `mode:ship phase:2` starts at 2 and runs to the end, `mode:phase phase:2` runs phase 2 alone.
27
+
28
+ **The orchestrator does not do work.** Read the plan, dispatch `sassy-cycle`, dispatch the commits, follow `sassy-plan mode:revise` when a gate sends something back, and report. Never read source or edit code.
29
+
30
+ **Config.** Resolve `.sassywares/config.yaml` (nearest, walking up) per the `sassy-setup` skill's `references/config.md`. Precedence: explicit token > session instruction > config > skill default. `git.repo` decides what a phase commit does, `artifacts.plans` decides where the plan lives, `commit.branch` decides whether this run needs its own branch, and a `worktree:on|off` token answers the checkout question `branching.md` asks at step 6. The token outranks config but never widens what `worktrees.enabled` allows.
20
31
 
21
32
  **Harness.** Loading another skill, dispatching an agent, and any command you hand the user follow the `sassy-setup` skill's `references/harness.md`. Read it once per run, before the first of those.
22
33
 
23
34
  ## Input
24
35
 
25
- Detect the shape from the argument:
36
+ - **Plan input** — a path under `artifacts.plans`, resolved per the `sassy-setup` skill's `references/plan-resolution.md`: a directory whose `plan.md` is the plan, or a legacy flat `.md` file. Both shapes are legal forever, so never refuse one for being flat and never migrate it just to read it. Read the frontmatter `status` first: `draft` → refuse and send the user back to `sassy-plan`; `done` → refuse, because running a closed plan means reopening it through `sassy-plan`; `active` → run; no `status` key → run, since it counts as `active` (`sassy-plan`'s `references/plan-format.md` owns that rule). Take `mode:` and an optional `phase:<n>`.
37
+ - **Writing a plan is a write path.** Marking a phase `In progress` or `Done`, recording a QA result, or sealing a revision migrates a legacy flat plan first — `git mv` into `<type>-<slug>/plan.md`, `mkdir revisions/`, no other line changed — in the same commit as the write, per `plan-resolution.md`.
38
+ - **Brief input** — anything else. One settled brief, run once, never revised (see **Brief input**).
26
39
 
27
- - **Plan input** — a path to an existing `.md` file under `artifacts.plans`. Read its frontmatter `status` first: `draft` → refuse and send the user back to `sassy-plan` to finish it; `done` → refuse, because the plan was closed out and a new phase needs `sassy-plan` to reopen it; `active` → run; no `status` key at all → run, since it counts as `active` (a rule `sassy-plan`'s `references/plan-format.md` owns). Take an optional `phase:<n>`, and default to the first phase whose status is not `Done`.
28
- - **Brief input** — anything else. Treat the whole argument as the settled brief from `sassy-plan`.
29
-
30
- If a plan path is given but the file does not exist, run `sassy-plan` first and stop.
40
+ If a plan path is given but does not resolve to a plan, run `sassy-plan` first and stop.
31
41
 
32
42
  ## Review tier
33
43
 
34
- A phase's `**Review:**` line names its change tier — `logic`, `surface`, or `none` — per the `sassy-plan` skill's `references/plan-format.md`. Pass it to `sassy-cycle`. A `review:` token on this run overrides the plan line; without either, the cycle detects the tier from the work. The tier decides the quality agents, so it is never a reason to skip the code approval gate.
35
-
36
- ## QA gate
44
+ A phase's `**Review:**` line names its change tier — `logic`, `surface`, or `none` — per the `sassy-plan` skill's `references/plan-format.md`. Pass it to `sassy-cycle`. A `review:` token overrides it; without either, the cycle detects the tier from the work. The tier decides the quality agents, so it is never a reason to skip the gate.
37
45
 
38
- Read the plan's frontmatter `qa` key and its per-phase QA table: `qa: off` means no QA gate for that plan, and no `qa` key means every phase's QA table is part of the gate. QA is part of the phase gate, not a separate track: a phase turns `Done` only when the code is approved **and** every QA row for that phase has passed. When you mark a phase or write a QA row result, a plan edited in place gets `updated` set to today.
46
+ ## The process
39
47
 
40
- Rows split by `Mode`, and the split decides who can settle them:
48
+ **A commit lands at every phase boundary, before any gate.** That is what makes a revision's diff exactly the revision: feedback always arrives on a clean tree.
41
49
 
42
- - **`Manual` rows are the user's.** The agent never ticks one it did not hear confirmed: it becomes `Done` only on the user's explicit confirmation in this conversation, with their note recorded.
43
- - **`Auto` rows are proved, not opined.** Step 4 runs `sassy-dogfood` for the phase's sections before the gate, and a row becomes `Done` only from a report whose verdict is `pass`, with the run id in `Notes`. A failed run is a finding into a rework cycle; the row never becomes `Done` because the agent judged it fine.
44
- - A row failing again after its rework is `Blocked` with the reason. Rows nobody has reported on stay `Pending`, and they keep the phase `In progress`. Never infer, batch-assume, or self-certify a pass.
50
+ 1. **Load.** Read the plan and its Phase tracking table; read only the current phase's section. Resolve `mode`. If the selected phase is already `Done`, skip to the next (or stop, in `mode:phase`). If it is `In progress`, an earlier run was interrupted — ask once whether to resume at the gate or re-run its cycle, and take the answer.
51
+ 2. **Resolve the branch, before touching code.** Follow the `sassy-setup` skill's `references/branching.md` with this run's `branch:` and `worktree:` tokens. Cut it now, not at commit time. In `mode:ship` the branch is cut once and every phase commits onto it. `stop-and-ask` stops the run here. When the decision took a checkout, every brief dispatched from here names its absolute `WT_PATH` and every dogfood run uses `WT_PATH` and `WT_NAMESPACE`.
52
+ 3. **Run the cycle.** Set the phase `In progress`, then load `sassy-cycle` with: work brief = the phase's goal, work items, and `Done when`; intent reference = the plan path and phase; review tier as above. On `blocked`, set the phase `Blocked` and stop.
53
+ 4. **Commit the boundary.** The cycle's `done` is the boundary: commit the phase's code and the plan's status edit via `sassy-commit` (`branch:current`), naming the phase in the subject (`feat(auth): sign-in pages (P2)`), per `git.repo`:
54
+ - **A remote** — dispatch a `worker`: *load the `sassy-commit` skill and follow it with `branch:current`*, naming the phase's code and the plan update. It returns the hash and subject.
55
+ - **`workspace`** — a `worker` per affected repo commits on the run's shared branch, then `.sassywares/workspace/snapshot` records the plan, QA results, and docs at the root. A missing snapshot script is a blocker: say to run `sassy-setup`.
56
+ - **`none`** — nothing is persisted; report that and stop. Nothing follows an uncommitted phase.
45
57
 
46
- A brief has no QA table, so its gate is code approval alone. Never invent, enable, or disable QA. A plan's `Auto` rows exist because the project enabled them: `dogfood.enabled` and a recipe section with a `Prove it:` step, per the `sassy-setup` skill's `references/dogfood.md`. Never edit the recipe to turn a red run green — propose the diff and ask.
58
+ A boundary commit is a **checkpoint, not an acceptance**. It records what was built; whether it is accepted is the gate's decision, and `Done` is the gate's word alone.
59
+ 5. **`mode:phase` — prove and gate now.** Prove the phase's `Auto` rows with `sassy-dogfood` in `mode:run` (a `failed` verdict is a finding → back to step 3; a `class: env` verdict stops the run with the toolchain named). Then present the gate below. `mode:ship` skips this step and continues to step 1 for the next phase.
60
+ 6. **`mode:ship` — the end gate.** After the last phase, prove every `Auto` row across every phase that changed, then present one gate carrying all of them.
47
61
 
48
- ## Phase gate
62
+ ## The gate
49
63
 
50
- Always gate before committing. The cycle has already fixed its findings in one work pass; present the combined gate — code approval plus the QA checklist — and wait for the user. A change the user sends back is new work: a new cycle with the change as its brief, reviewed at its detected tier, then the gate again. Failing QA rows alone are a one-pass rework. Neither is a direct edit.
64
+ Report: the plan and mode, the branch and its start point, each phase's status, what changed per phase, findings raised and what each single fix pass did with them (self-reported — the cycle does not re-review), the simplifications applied or skipped, the validator grade (or that it did not run), the reviewer summary, and the reviewers' suggestions as options the user may pick. Then give the QA checklist verbatim — row ID, check, `Mode`, for `Manual` how to run it and what passing looks like, for `Auto` the verdict and run id — with unreported rows `Pending`. Ask for both decisions: code approval (or the changes wanted, including any suggestions picked) and the result per `Manual` row. Wait.
51
65
 
52
- ## Steps
66
+ Read the plan's `qa` key: `qa: off` means no QA gate, and no key means every phase's table is part of it. Never invent, enable, or disable QA. A plan's `Auto` rows exist only because `dogfood.enabled` is `true` and the row names a recipe section with a `Prove it:` step, per the `sassy-setup` skill's `references/dogfood.md`. Never edit the recipe to turn a red run green — propose the diff and ask.
53
67
 
54
- 1. **Load the phase.** Read the plan and only the selected phase's section. If it is already `Done`, stop and report.
68
+ ## Resolving the gate
55
69
 
56
- If the phase is `In progress`, an earlier run was interrupted before both gates passed. Ask one question — resume at the gate, or re-run the cycle from scratch — and take the answer. Resuming skips the cycle and goes straight to step 5, but **still resolve the branch at step 2 first**: on `reuse` it is a no-op, and on `create` it is the difference between committing on the base and not.
57
- 2. **Resolve the branch, before touching code.** Follow the `sassy-setup` skill's `references/branching.md` with this run's `branch:` and `worktree:` tokens, if any. On `create`, cut the branch now — not at commit time — so no change ever exists on a base branch. On `reuse`, stay where you are, which is how a later phase or a resumed run lands on the branch the first phase cut. On `stop-and-ask`, present the choice and wait. When the decision took a checkout, every brief dispatched from here on names its absolute `WT_PATH`, as `branching.md` requires. Carry the branch, its start point, and the checkout into every gate summary you present.
58
- 3. **Run the cycle.** Set the phase `In progress` in the Phase tracking table, then load the `sassy-cycle` skill and follow it, with:
59
- - work brief = the phase's goal, work items, and "Done when" criteria
60
- - intent reference = the plan path and phase
61
- - review tier = this run's `review:` token when present, else the phase's `**Review:**` line
62
- 4. **Evaluate the phase.** On `Status: done`, the code is ready for the gate, but leave the phase `In progress` — both gates must pass before it closes. On `Status: blocked`, set it `Blocked` in the Phase tracking table and stop; a blocked phase is a real outcome and needs no approval.
70
+ - **Code approved and every QA row passes** → write the QA results (`Manual` with the user's notes, `Auto` with the verdict and run id) and the phases' `Done` in one plan edit; commit that plan-only edit with the next boundary commit, or on its own (`chore(plan): P<n> done`) when the run ends here. In `mode:ship`, continue to the close-out; in `mode:phase`, report and stop.
71
+ - **Code approved, `Manual` rows pending** → tick nothing, mark nothing `Done`, commit nothing further. Report which rows are outstanding and the command that resumes (`sassy-work <plan> mode:phase`).
72
+ - **Changes requested** → **go through the plan, not around it.** Load `sassy-plan <plan path> mode:revise` with the user's words verbatim. It opens one revision, applies the plan lines, and returns the path. Then a new `sassy-cycle` with the revision's items as the work brief, commit the code with that revision — sealing it in the same commit — and return to the gate. Nothing is ever edited straight into the working tree, and no change is made without a revision saying what it replaced.
73
+ - **A QA row fails, with no change requested** → a rework cycle with the failing rows as findings, the phase and plan as the intent reference. On `done`, re-prove and present the gate again; a row failing twice is `Blocked` with the reason and stops the run.
63
74
 
64
- **Then prove the `Auto` rows.** If the phase has any, run the `sassy-dogfood` skill in `mode:run` with each row's section named, before the gate and never after it. When the decision took a checkout, the report runs against the checkout's own path and namespace — `WT_PATH` and `WT_NAMESPACE` — since proof run against the main checkout's app proves the wrong app. Record what each report said. A `failed` verdict is a finding, so the phase goes back through step 3's cycle with the failing step and the report's log tail as its findings, and this step runs again; a `class: env` verdict is not a finding — report that the toolchain is broken, leave the phase `In progress`, and stop. An `Auto` row with no report is `Pending`, never `Done`.
65
- 5. **Present the phase gate.** Report the phase, what changed, findings raised and what the single fix pass did with each (self-reported; the cycle does not re-review), the simplifications applied or skipped, the validator grade (or that it did not run), the reviewer summary, and the reviewer's suggestions as options the user may pick. Then give the QA checklist verbatim: each row's ID, check, `Mode`, and — for `Manual` — how to run it and what passing looks like, and for `Auto` — the dogfood verdict and run id, with unreported rows `Pending`. Ask for both decisions — code approval (or the changes wanted, including any suggestions picked) and the result per `Manual` row. Wait.
66
- 6. **Resolve the gate.** Four outcomes, nothing in between:
67
- - **Code approved and every QA row passes** → go to step 7.
68
- - **Code approved, `Manual` rows still pending** → record that code is approved but leave the phase `In progress`, tick nothing, commit nothing, and report that the phase is waiting on manual QA plus the command that resumes it.
69
- - **Changes requested** → a new cycle: load `sassy-cycle` with the requested changes as the work brief and the plan path and phase, as amended by those changes, as the intent reference. The cycle detects the change's tier and runs that tier's agents. On `done`, re-prove the `Auto` rows (step 4) and present the gate again from step 5; on `blocked`, mark the phase `Blocked` and stop. If a QA row also failed, name it in the work brief as an additional requirement. Change requests have no cap — each one is the user's call.
70
- - **A QA row fails, with no change requested** → a rework cycle: load `sassy-cycle` with the failing rows as findings and the plan path and phase as the intent reference. On `done`, re-prove the `Auto` rows (step 4) and present the gate again from step 5; on `blocked`, mark the phase `Blocked` and stop. A row that fails again after its rework is `Blocked` with the reason and stops the phase.
71
- 7. **Commit the phase.** On both gates passing, first mark the phase's QA rows `Done` — `Manual` rows with the user's notes, `Auto` rows with the verdict and run id from the report — and the phase `Done` in the Phase tracking table, then persist according to `git.repo`:
75
+ Change requests have no cap — each one is the user's call. A revision that changes a phase already `Done` is also the user's call: put that one question to them rather than reopening it yourself.
72
76
 
73
- - **A remote** — dispatch a `worker` whose task is: *load the `sassy-commit` skill and follow it with `branch:current`*, naming that the commit must include the phase's code changes, the QA table results, and the now-updated Phase tracking table. It returns the hash and subject. The branch already exists: step 2 cut it, so committing on it is the point of `branch:current` here.
74
- - **`workspace`** — dispatch a `worker` per affected repo to commit that repo's code on the run's shared branch, then run `.sassywares/workspace/snapshot` for the plan, QA results, and docs at the root. The gate's approval is the commit approval; the snapshot runs right after it and is never skipped. A missing or outdated `.sassywares/workspace/snapshot` is a blocker — say to run `sassy-setup`.
75
- - **`none`** — nothing is persisted. Report that the phase's work is uncommitted and stop; nothing follows an uncommitted phase.
77
+ ## Close-out
76
78
 
77
- Do not close out until the commit or snapshot succeeds.
78
- 8. **On commit success:**
79
- - **This was the last phase** → run the close-out: load the `sassy-ship` skill and follow it (under `commit.branch: current` ship commits and pushes, with no PR).
80
- - **Any phase is left** → report the commit and stop. Name the next phase and the command that picks it up — `sassy-work <plan>` takes the first phase that is not `Done` — and never start it in this session. Continuing, stopping for now, or choosing another executor is the user's call; do not offer or write a handoff.
79
+ In `mode:ship`, on both gates passing, load the `sassy-ship` skill and follow it. Do only the close-out steps the user approves. Babysit options (`merge:on|off`, `delete-branch:on|off`) are forwarded to `sassy-babysit` through `sassy-ship`. The branch from step 2 already carries the work, so ship commits and opens the PR on it and never creates one. Under `commit.branch: current`, ship pushes the checked-out branch to its upstream and skips the PR, `hooks.pr.*`, babysit, and merge.
81
80
 
82
81
  ## Brief input
83
82
 
84
- When the argument is not a plan path, it is one settled brief:
83
+ When the argument is not a plan path, it is one settled brief — one cycle, not several.
85
84
 
86
- 1. Resolve the branch exactly as the plan path does — the `sassy-setup` skill's `references/branching.md`, this run's `branch:` and `worktree:` tokens — before the cycle runs. Every brief dispatched from there names the absolute `WT_PATH` when the decision took a checkout.
87
- 2. Run one `sassy-cycle` with the brief as the work brief, its decisions / done-when as the intent reference, and this run's `review:` token as the tier. Do not split it into multiple cycles.
88
- 3. Present the code approval gate with no QA checklist, and wait. Changes requested → a new cycle with the changes as the work brief and the brief's decisions / done-when, as amended by those changes, as the intent reference, then this gate again; `blocked` stops.
89
- 4. On code approval, persist the brief's changes the same way the plan path does: a `sassy-commit` delegation with `branch:current` in a remote repo, or the workspace snapshot in a workspace.
90
- 5. Stop and report. Shipping is a separate step (`sassy-ship`), or `sassy-lfg` would have built and shipped it. Never create or update a plan file.
85
+ 1. Resolve the branch exactly as a plan path does, before the cycle runs.
86
+ 2. Run one `sassy-cycle` with the brief as the work brief, its decisions and done-when as the intent reference, and this run's `review:` token as the tier.
87
+ 3. Commit at the boundary, with the brief's outcome as the subject.
88
+ 4. Present the code approval gate — no QA checklist, because a brief has no plan. Approve → `mode:ship` closes out through `sassy-ship`, `mode:phase` reports and stops.
89
+ 5. **A brief is never revised.** Its first change request **promotes it to a plan**: open `artifacts.plans/<type>-<slug>/plan.md` through `sassy-plan` as a one-phase plan holding the brief as P1, `status: active`, and record the request as `R01` with `sassy-plan mode:revise`. From that point it is a plan like any other, and the promotion is reported rather than assumed. This is why a brief leaves no directory behind: nothing throwaway becomes a ledger, and nothing gets revised without one.
91
90
 
92
91
  ## Hard rules
93
92
 
@@ -95,20 +94,19 @@ When the argument is not a plan path, it is one settled brief:
95
94
  |------|-------------|
96
95
  | Orchestrator only | Delegate all implementation and quality work to `sassy-cycle`. |
97
96
  | Branch before code | Resolve the branch per the `sassy-setup` skill's `references/branching.md` before the cycle runs, so no change ever lands on a base branch. |
98
- | Checkout from the branch decision | When the decision took a checkout, every brief names the absolute `WT_PATH` and the main checkout stays read-only; never restate that contract, it is `branching.md`'s. |
99
- | One phase per run | Do exactly one phase. Never continue into the next phase in this session. |
100
- | Gate before commit and close-out | Do not commit or close out until the user approves the code and the phase QA rows pass. |
101
- | Commit per phase | Commit the phase, its QA results, and the plan update via `sassy-commit` before close-out. |
102
- | Handing off is the user's | Never write a handoff or suggest one. The run ends at its report; `sassy-handoff` is invoked by the user, in their own session and on their own initiative. |
103
- | Done needs both gates | Mark a phase `Done` only when the user approves the code and every QA row for that phase is `Done`, never before. |
104
- | QA rows follow their mode | Tick a `Manual` row `Done` only from the user's explicit confirmation, and an `Auto` row only from a passing dogfood report; keep unreported rows `Pending`; a failed row is a finding for a rework cycle. |
105
- | Send-backs split | A user's change request at the gate runs a new `sassy-cycle` at its detected tier; failing QA rows alone go through a one-pass rework. Neither is a direct edit. |
106
- | No shipping on the brief path | The brief path commits and stops. Shipping is `sassy-ship` or `sassy-lfg`. |
97
+ | Checkout from the branch decision | When the decision took a checkout, every brief names the absolute `WT_PATH` and the main checkout stays read-only; `branching.md` owns that contract. |
98
+ | Commit at every boundary | Commit each phase before any gate. A checkpoint is never an acceptance. |
99
+ | Gate before `Done` | Never mark a phase `Done` before the user approves the code and every QA row for it is `Done`. |
100
+ | Revisions, not edits | Feedback after the read-back goes through `sassy-plan mode:revise`; the plan's line, its revision file, and the code land in one commit, and a replaced line is quoted in the revision that replaced it. |
101
+ | QA rows follow their mode | Tick a `Manual` row only from the user's explicit confirmation, an `Auto` row only from a passing dogfood report; keep unreported rows `Pending`; a failed row is a finding. |
102
+ | Modes are not scopes | `mode:ship` and `mode:phase` decide where the run stops. Neither ever widens what the plan asked for. |
103
+ | One process | There is one executor. No second skill, alias, or copied step list runs a plan. |
104
+ | Handing off is the user's | Never write a handoff or suggest one. The run ends at its report. |
107
105
 
108
106
  ## Failure handling
109
107
 
110
- - `sassy-cycle` returns `blocked` → mark the phase `Blocked`, stop, report the open findings and the diagnostic.
111
- - QA stays pending, or a row fails again after its rework → keep the phase `In progress` (or `Blocked` with the reason), commit nothing, and report.
112
- - `sassy-commit` fails or leaves the phase changes uncommitted → stop and report; never close out on top of uncommitted phase work.
113
- - The validator returns **Blocked — insufficient grounding** → treat it as a real blocker; do not advance.
108
+ - `sassy-cycle` returns `blocked` → mark the phase `Blocked`, stop, report the findings and diagnostic.
109
+ - `sassy-commit` fails or leaves the phase uncommitted → stop and report; never gate, revise, or close out on top of uncommitted work.
110
+ - QA stays pending, or a row fails twice → keep the phase `In progress` (or `Blocked` with the reason) and report. Never commit a pass you did not hear or prove.
111
+ - The validator returns **Blocked — insufficient grounding** → a real blocker; do not advance.
114
112
  - Ambiguous or unsafe failure → stop and ask.
@@ -1,4 +1,7 @@
1
1
  ---
2
+ suite: sassy-skills
3
+ artifact: skill
4
+ generated_by: sassy-worktree
2
5
  name: sassy-worktree
3
6
  description: >-
4
7
  Run more than one agent, or more than one line of work, in the same repo: a
@@ -1,3 +1,9 @@
1
+ ---
2
+ suite: sassy-skills
3
+ artifact: reference
4
+ generated_by: sassy-worktree
5
+ ---
6
+
1
7
  # Mode: create — add a checkout for a branch
2
8
 
3
9
  Read the shared sections in `SKILL.md` first. This file is the create path only.
@@ -1,3 +1,9 @@
1
+ ---
2
+ suite: sassy-skills
3
+ artifact: reference
4
+ generated_by: sassy-worktree
5
+ ---
6
+
1
7
  # Mode: list — the table, as it prints
2
8
 
3
9
  Read the shared sections in `SKILL.md` first. This file is the list path only. `list` is the default because it is the only mode that changes nothing.
@@ -1,3 +1,9 @@
1
+ ---
2
+ suite: sassy-skills
3
+ artifact: reference
4
+ generated_by: sassy-worktree
5
+ ---
6
+
1
7
  # Mode: remove — delete a checkout, keep its work reachable
2
8
 
3
9
  Read the shared sections in `SKILL.md` first. This file is the remove path only.
package/CONCEPTS.md DELETED
@@ -1,178 +0,0 @@
1
- # Sassy Skills — Concepts
2
-
3
- ## Source of truth
4
-
5
- The repo's `skills/` directory is the only copy of the skills. Consumers install from it with `npx skills add sassywares/sassy-skills` — per project, which vendors the files and pins content hashes in `skills-lock.json`, or globally with `-g`, into `~/.agents/skills/`. See README.md's Installation section.
6
-
7
- ## Consumer project
8
-
9
- A project that installs the suite per project, so it vendors its own copy in `.agents/skills/` and pins it in `skills-lock.json`. It does not get the maintainer's `~/.agents/skills` link, so a push to this repo reaches it only through the `sassy-skills-sync` hook, which mirrors exactly the suite's roster, repins those skills, commits, and pushes to the branch recorded in `.sassywares/consumers`. Its setup is never auto-updated: the sync reports that it is out of date, and which project.
10
-
11
- ## Skill
12
-
13
- A directory containing `SKILL.md`, discovered by a harness from a project skills directory, a user skills directory, or an installed package. Skills are explicit workflows, not always-on instructions. The model may invoke any of them, and the user can invoke one directly through their harness (the `sassy-setup` skill's `references/harness.md` lists each harness's command).
14
-
15
- ## Write boundary
16
-
17
- The exact set of paths a skill's run may create or edit, and so the exact set its commit step may stage — stated as a hard rule in the skill's `SKILL.md` and repeated as its commit file list. It names every surface the skill owns by name, which is why deleting a config key has to reach it: a body still naming a removed file is a boundary that commits or reports something no longer real.
18
-
19
- ## Agent
20
-
21
- A specialized subagent from [sassy-agents](https://github.com/sassywares/sassy-agents), installed per harness (`~/.pi/agent/agents/`, `~/.claude/agents/`, `~/.hermes/agents/`, or a project `.pi/agents/` / `.claude/agents/`) by `sassy-setup`. Skills delegate bounded work to agents such as `scout`, `worker`, `reviewer`, `simplifier`, and `validator`.
22
-
23
- ## Orchestrator
24
-
25
- A skill that mostly coordinates. It reads compact results, writes briefs, and avoids reading source or diffs in the main context. `sassy-work`, `sassy-lfg`, `sassy-ship`, `sassy-debug`, and `sassy-goal` are orchestrators.
26
-
27
- ## Cycle
28
-
29
- `sassy-cycle` runs one unit of work through a tiered loop: implement → quality by change tier → one fix pass → return. A `logic` unit runs the simplifier, reviewer, and validator in parallel; a `surface` unit runs the reviewer; a `none` unit runs neither. The fix pass applies every finding once, and the cycle never re-reviews it — findings the worker leaves open are reported, and simplifications never block. Reviewer suggestions go to the gate. Given findings instead of a brief — failed QA rows, picked review findings — it applies them in one work pass. A change the user asks for at a gate is not a finding: it runs as a new cycle with that change as the work brief, so tier detection and review apply. It never commits. Work and LFG run it; debug fixes through work.
30
-
31
- ## Change tier
32
-
33
- The depth of quality work a unit needs: declared per plan phase with `**Review:**`, passed as a `review:` token, or detected by `sassy-cycle` from the work. `logic` is core code and anything that can change runtime behavior; `surface` is everything that is not core code — docs, Markdown, comments, copy/i18n, tests, fixtures, formatting; `none` is machine-generated or mechanical churn. A declared `surface` or `none` is promoted to `logic` when the changed files include core code; never the reverse, and a worker's `Runtime behavior: yes` does not promote on its own, because tests and tooling can exercise behavior without changing it.
34
-
35
- ## Dogfood
36
-
37
- Agent QA: the project's own stored procedure for proving a change works in the running product, not merely in the diff. `sassy-dogfood` executes it, and the report's verdict is the only thing that settles an `Auto` QA row.
38
-
39
- - **Recipe** — `.sassywares/dogfood/recipe.md`, committed and reviewed like code. Append-only sections of ordered steps, each with a `Do` and an `Expect`, ending in one `Prove it:` step whose exit code is the verdict. It names no tool: whatever the harness has connected at run time is what satisfies a step. The config points at it and never restates it — commands in the config would duplicate the manifest and could not express order.
40
- - **Report** — `.sassywares/dogfood/reports/<run-id>/`, never committed and pruned to ten: `summary.md` (status, class, the per-step table, artifact paths), one log per executed step, and the artifacts. The durable record is the QA row's note — verdict and run id — never a path that will vanish.
41
- - **Verdict classes** — `code` is a finding for the cycle, `env` means the toolchain is broken (report and park, never loop), `recipe` means the procedure itself is stale (propose a diff, never improvise around it).
42
- - **Two gates** — an `Auto` row needs `dogfood.enabled: true` **and** a section with a `Prove it:` step. One without the other keeps the row `Manual`, which is how an unfinished recipe degrades safely instead of making a gate lie.
43
- - **Frozen against the run** — a red run never edits the recipe or its expectations to pass. The cheapest way past a check must not be to weaken it.
44
-
45
- ## Gates
46
-
47
- A gate is a deliberate stop or pass/fail condition.
48
-
49
- - **Fix gate** — `sassy-debug` presents the causal chain, fix, and risks before changing code.
50
- - **Code approval gate** — the user approves the code before committing or shipping. Always on for `sassy-work` and `sassy-lfg`.
51
- - **Gate change** — a change the user asks for while the code approval or QA gate is open is new work: a new `sassy-cycle` with that change as its work brief, at its detected tier, then the gate again. Failing QA rows alone are a one-pass rework.
52
- - **Ship review gate** — `sassy-ship` summarizes the close-out and waits in `mode:manual` (default); skipped only when the caller passed `mode:auto`.
53
- - **QA gate** — QA tables, part of phase completion rather than a separate track: a phase turns `Done` only when the code is approved and every QA row passed. A `Manual` row belongs to the user, and no agent ticks its own. An `Auto` row is settled by a passing dogfood report, never by an opinion, and ship will not persist behind one that is unproven. It exists only when the plan document has QA tables; an in-context brief has none.
54
-
55
- ## Branch and base
56
-
57
- - **Base branch** — any branch the config names as a base: every `base_map` value, the `repos` rung in a workspace, and the remote default. In a repo whose `base_map` routes `"*"` to `staging`, `staging` **is** a base even though `origin/HEAD` is `main`. Comparing against `origin/HEAD` alone is the mistake that let phase work land on a shared integration branch.
58
- - **Run branch** — the branch a run cuts before its first change when `commit.branch` is `new`. Cut once, at the start: every phase, every doc, and ship's commit land on it. A later phase, a resumed run, or `sassy-lfg` after `sassy-work` reuses it rather than cutting another.
59
- - **Token authorship** — a token is explicit only when the caller supplied it or the run's own gate recorded it. A skill that passes its own default as a token outranks the project's config, which is the bug class `commit.branch` was lost to.
60
-
61
- ## Worktree
62
-
63
- One checkout per branch, so two runs never share a working tree. `sassy-worktree`
64
- owns the workflow; the scripts in `.sassywares/worktree/` own the git.
65
-
66
- - **Worktree** — a second checkout of the same repository, at
67
- `~/.sassywares/worktrees/<repo>/<slug>`. It shares one object store and one
68
- branch lock with the main checkout, so the same branch can never be held twice
69
- — the property that makes it safe where a `git clone` per agent is not.
70
- - **Permission, not a default** — `worktrees.enabled: true` means a checkout may
71
- be offered. A run asks before taking one and otherwise works in the main
72
- checkout: two runs only collide when they are actually parallel, and an unasked
73
- checkout relocates the work and leaves the uncommitted tree behind. A
74
- `worktree:on` token is the other way to say yes — the ask answered up front —
75
- and a managed checkout that already exists for the branch is reused rather than
76
- a second one cut.
77
- - **Slug** — the branch with `/` flattened (`feat/catalog` → `feat-catalog`). It
78
- names the directory the checkout lives in, and the handle `list --path` and
79
- `remove` take — `remove` also accepts the branch.
80
- - **Namespace** — the slug prefixed with the repo (`shop-feat-catalog`), and the
81
- only name a project script should use for a database, a compose project, or a
82
- simulator. Derived once by `create`; never rebuilt by hand.
83
- - **Identity block** — the four `WT_*` lines `create` mints and `list --env` hands
84
- back: `WT_PATH`, `WT_BRANCH`, `WT_SLUG`, `WT_NAMESPACE`. The stream rule and the
85
- unprepared case are the `sassy-setup` skill's `references/worktree.md`'s.
86
- - **Project scripts** — the pair `<home>/worktrees/create` and
87
- `<home>/worktrees/remove`, named by `worktrees.create` and `worktrees.remove`.
88
- They are the lifecycle; the `sassy-setup` skill's `references/worktree.md` owns
89
- their order, slots, and degrade rule, and `.sassywares/worktree/` ships only the
90
- git mechanics. Addressing a checkout — a URL, a simulator, a window — is the
91
- project's business too, and lives in those scripts.
92
- - **Scaffold header** — the first line of a project-owned file setup plants,
93
- `# sassywares:scaffold v1 skill=<name> version=<version> date=<YYYY-MM-DD>`.
94
- The `sassy-setup` skill's `references/scaffold-header.md` owns its bytes and the
95
- offer-only upgrade rule.
96
- - **Toolbox** — the installed `.sassywares/worktree/` set of git-mechanics
97
- scripts, versioned by an integer *contract* header that the project's own
98
- wrappers are written against. That number is not the suite release a scaffold
99
- header records, so the two are not comparable; a toolbox older than the shipped
100
- one is drift, not an upgrade, because the wrappers call flags it never had.
101
- - **Managed checkout** — one under `worktrees.dir` that also carries
102
- `.sassywares/config.yaml`. The tooling lists and removes only those; anything
103
- else belongs to another tool or predates the wiring.
104
- - **State** — each managed checkout's `merged`, `gone`, or `unmerged`
105
- classification, from the branch's upstream. The `sassy-setup` skill's
106
- `references/worktree.md` owns the definitions; `list` is where it prints.
107
-
108
- `create` and `remove` need an agent because the run has to ask permission before
109
- taking a checkout, report each refusal verbatim, and confirm a set before removing
110
- several. The orchestration is the skill's; the git is the toolbox's.
111
-
112
- ## Overview
113
-
114
- What a project is and how it runs, answered from its files. `sassy-overview`
115
- owns it; its `identify.sh` is the query.
116
-
117
- - **Identify** — the default `mode:identify`: one `key<TAB>value<TAB>source` line
118
- per fact, read-only and never executing the project's tooling. The keys are
119
- `stack`, `runner`, `install`, `up`, `down`, `test`, `compose`, `env`, `wired`.
120
- - **Source** — the file a value came from, or `-` when there is none. A value
121
- without a source is not a fact, which is why `unknown` carries `-`.
122
- - **Unknown** — a first-class answer: the project has not declared this fact.
123
- It is never a gap to fill with a default or a manifest written to hold one.
124
- - **Answered vs. asked** — the default run is an inventory and exits `0`; naming
125
- keys makes it a question, and any requested `unknown` exits `3` so the caller
126
- branches instead of guessing. Usage errors exit `2`.
127
-
128
- ## Modes
129
-
130
- Three shared mode tokens: `mode:manual` (default) asks at the skill's gate; `mode:auto` means pre-authorized, no review; `mode:return` reports and changes nothing. Some skills take their own modes instead: `sassy-goal`, `sassy-docs` (`review`, `handbook`), `sassy-handoff` (`write`, `read`), `sassy-setup` (`init`, `check`), `sassy-overview` (`identify`), `sassy-worktree` (`list`, `create`, `remove`), and `sassy-skill` (`create`, `retune`, `verify`).
131
-
132
- - `sassy-ship` and `sassy-compound` accept `manual` and `auto`. Ship reviews the whole close-out in `mode:manual` and forwards `mode:auto` to compound once its own gate is answered.
133
- - `sassy-review`, `sassy-simplify`, and `sassy-validate` accept all three: `manual` asks which findings to fix, `auto` fixes them without asking, `return` hands the findings back to the caller.
134
- - `sassy-debug` accepts no mode. It always leaves ship's review gate in place.
135
- - `sassy-work` and `sassy-lfg` accept no mode.
136
- - `sassy-goal` takes its own modes, one per step of a goal: `mode:write` (default), `mode:next`, `mode:check`, and `mode:close`.
137
- - `sassy-docs` takes `mode:review` (default), which audits the docs against a change, or `mode:handbook`, which writes one handover.
138
-
139
- Everything else is decided by the artifact, not a mode:
140
-
141
- - A plan document under `docs/plans/` — `<type>-<slug>.md`, with YAML frontmatter for `type`, `status`, `created`, `updated` (plus `qa: off` when the user asks for no QA gates) — drives phased execution and carries QA tables whose rows are `Auto` or `Manual`.
142
- - An in-context brief drives one cycle and has no plan file and no QA tables.
143
-
144
- ## Plan
145
-
146
- A durable document under `docs/plans/<type>-<slug>.md` with frontmatter, intent, decisions, constraints, phase tracking, and per-phase QA tables. Its `status` is `draft` while `sassy-plan` is still grilling — the file is opened at that final path at the framing step and appended to as branches settle — `active` once the read-back is confirmed against the file, and `done` once `sassy-ship` closes it out, ship being the only writer of `done` and only when every phase row is `Done`. A plan whose phases are all `Done` but which was never shipped stays `active`: finished, not closed out, which is a real and visible state. Every executor — `sassy-work`, `sassy-lfg`, `sassy-validate`, `sassy-ship` — refuses a `draft`, and `sassy-work` and `sassy-lfg` refuse a `done` one too, since running a closed plan means reopening it through `sassy-plan`.
147
-
148
- ## Goal
149
-
150
- Work too big for one plan — a migration, an epic — run by `sassy-goal` as a folder under `artifacts.plans`, `<type>-<slug>/`: `goal.md` (intent, cross-slice decisions, landscape, coexistence, a slice table, carry-forward) plus one plan per started slice. It turns `done` when `mode:close` verifies its done-when against the whole tree. Like a plan, it is written while it is grilled: `draft` from the framing step, `active` only after a confirmed read-back, `done` only from `mode:close` — and revising a `done` goal reopens it to `active`. `next`, `check`, and `close` all refuse a `draft`, so `before_slice` never fires for a goal that is still being written.
151
-
152
- ## Slice
153
-
154
- One step of a goal: its own plan (`NN-<slug>.md`, written only when `mode:next` starts it), branch, and PR, and it must ship something complete on its own — never a half-built layer. One slice is in flight at a time: `Pending` > `Planned` > `Shipped` > `Done`.
155
-
156
- ## Carry-forward
157
-
158
- The append-only section of `goal.md` that `mode:check` adds to once per slice: what changed versus the plan, new decisions, impact on later slices, and gaps deferred or accepted. Every later slice's grill reads it as settled.
159
-
160
- ## Goal hook
161
-
162
- A project skill run at a goal's boundaries, declared under `hooks.goal` and keyed by the goal's folder name under `artifacts.plans`, `<type>-<slug>` (prefix included). `before_slice` runs in `mode:next` after the previous slice's merge is confirmed and before the next slice is grilled; `after_close` runs in `mode:close` after the status is persisted, on `done` and on a goal left `active`. Neither may touch the goal itself (`goal.md`, the slice plan, the status); anything else — switching to the bases, pulling, rebasing, committing, pushing, migrating — is the project's call, provided every base ends level with its remote. `before_slice` fires before `mode:next` checks the base, so it can be what freshens it. Entries are idempotent, and both fail closed. They are not PR-keyed, so `commit.branch: current` does not suppress them, and since `sassy-goal` has no approval gate the mode's report names what ran, that none are declared, or where it stopped.
163
-
164
- ## Docs
165
-
166
- `sassy-docs` in `mode:review` (default) takes a scope — a branch, a plan, a PR, a file list, or the close-out's own work — and holds every document that change invalidated against what the change actually does: it fixes each stale claim in place, names what it could not verify or does not own, and writes a handbook when a teammate would need one. `mode:handbook` is that handbook on its own: one plain-English, toolchain-free document under `artifacts.handbooks`. It never changes behavior — a code mismatch it finds is reported, not fixed, because documents are not code. `sassy-ship` dispatches `mode:review` as its docs step.
167
-
168
- ## Brief
169
-
170
- A settled in-context brief produced by `sassy-plan` when the user picks "start working" (`sassy-work`) or "implement and ship" (`sassy-lfg`). It carries the goal, decisions, constraints, work, and done-when, but no plan file and no QA tables: the plan opened during the grill is deleted when the run ends in a brief — already complete and `active` by then — because the user chose the brief over the document.
171
-
172
- ## Handoff
173
-
174
- `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.
175
-
176
- ## Release
177
-
178
- There is no background watcher. Releases go through `sassy-ship` under `commit.branch: current`: after the approved push, the `hooks.push` `after_push` hook runs the `sassy-skills-release` project skill, which runs the vendored `bin/release` script. It bumps the patch version and tags when consumer-facing files changed, and the tag publishes to npm. It installs nothing: `npx skills add` reads this repo directly. AGENTS.md has the details.
@@ -1,92 +0,0 @@
1
- ---
2
- name: sassy-lfg
3
- description: >-
4
- Execute a whole sassy plan phase by phase, or one settled in-context brief,
5
- then close out via sassy-ship after code approval. The orchestrator only
6
- coordinates. Best for small plans that one context can hold.
7
- argument-hint: "<plan path | brief> [branch:infer|current|new] [worktree:on|off] [review:logic|surface|none]"
8
- ---
9
-
10
- # Sassy LFG
11
-
12
- **Outcome:** every phase in the plan run through `sassy-cycle`, then one gate that carries the code approval and every phase's QA checklist (`Manual` rows from the user, `Auto` rows from a `sassy-dogfood` report), phases marked `Done` only when both pass, then `sassy-ship` closes it out (compound, docs, commit, PR, babysit; under `commit.branch: current`, commit and push with no PR). A brief runs one cycle through the same gate, then ships.
13
-
14
- **The orchestrator does not do work.** Read the plan, dispatch `sassy-cycle` per phase, then `sassy-ship`. Never edit application code. Keep the main context small — all heavy work happens in subagents.
15
-
16
- **Config.** Resolve `.sassywares/config.yaml` (nearest, walking up) per the `sassy-setup` skill's `references/config.md`. Precedence: explicit token > session instruction > config > skill default. Plans live under `artifacts.plans`; `git.repo` decides how the close-out persists; `commit.branch` decides whether the run needs its own branch, and a `worktree:on|off` token answers the checkout question the `sassy-setup` skill's `references/branching.md` asks at step 6. The token outranks config but never widens what `worktrees.enabled` allows.
17
-
18
- **Harness.** Loading another skill, dispatching an agent, and any command you hand the user follow the `sassy-setup` skill's `references/harness.md`. Read it once per run, before the first of those.
19
-
20
- ## Input
21
-
22
- Detect the shape from the argument:
23
-
24
- - **Plan input** — a path to an existing `.md` file under `artifacts.plans`. Read its frontmatter `status` first: `draft` → refuse and send the user back to `sassy-plan` to finish it; `done` → refuse, because the plan was closed out and running it again needs `sassy-plan` to reopen it; `active` → run; no `status` key at all → run, since it counts as `active` (a rule `sassy-plan`'s `references/plan-format.md` owns).
25
- - **Brief input** — anything else. Treat the whole argument as the settled brief from `sassy-plan`.
26
-
27
- If nothing is passed and no plan exists, run `sassy-plan` first and use what the user picks there.
28
-
29
- ## Review tier
30
-
31
- A phase's `**Review:**` line names its change tier — `logic`, `surface`, or `none` — per the `sassy-plan` skill's `references/plan-format.md`. Pass it to `sassy-cycle` for that phase. A `review:` token on this run overrides the plan line; without either, the cycle detects the tier from the work.
32
-
33
- ## QA gate
34
-
35
- Read the plan's frontmatter `qa` key and its per-phase QA tables: `qa: off` means no QA gate for that plan, and no `qa` key means every phase's QA table is part of the gate. QA is part of the completion gate: LFG builds every phase first, then presents one gate carrying code approval plus every phase's QA checklist. No phase turns `Done`, and nothing is committed or shipped, until both pass. When you mark a phase or write a QA row result, a plan edited in place gets `updated` set to today.
36
-
37
- Rows split by `Mode`:
38
-
39
- - **`Manual` rows are the user's.** The agent never ticks one it did not hear confirmed: it becomes `Done` only on the user's explicit confirmation, with their note recorded.
40
- - **`Auto` rows are proved, not opined.** Before the gate, run `sassy-dogfood` in `mode:run` for each row's section and take the verdict from its report; a row becomes `Done` only on a `pass`, with the run id in `Notes`.
41
- - A failed row is a finding. It goes through a rework cycle on its phase (step 5) and the gate is presented again; a row that fails again after its rework is `Blocked` with the reason and stops the run.
42
- - Rows nobody has reported on stay `Pending` and hold their phase `In progress`.
43
-
44
- A brief has no QA table, so its gate is code approval alone. Never invent, enable, or disable QA. Never edit the dogfood recipe to make a red run green — propose the diff and ask.
45
-
46
- ## Steps
47
-
48
- 1. **Load the plan.** Read the plan and its Phase tracking table. If phases are already `In progress` from an interrupted run, ask once whether to resume at the gate or rerun those cycles, then continue from the answer. A change the user brings instead of a resume follows the gate-change path: a new cycle with the change as its work brief.
49
- 2. **Resolve the branch, before touching code.** Follow the `sassy-setup` skill's `references/branching.md` with this run's `branch:` and `worktree:` tokens, if any. LFG runs every phase in one session, so the branch is cut once here and every phase commits onto it. Report the branch and its start point in the gate. A `stop-and-ask` here stops the run before any phase starts.
50
-
51
- When the decision took a checkout, every phase brief and every `sassy-dogfood` run uses the checkout's own address — `WT_PATH`, and `WT_NAMESPACE` — since proof run against the main checkout's instance proves the wrong app.
52
- 3. **Run every phase, in order.** For each phase not `Done`:
53
- - Set the phase `In progress`, then load the `sassy-cycle` skill and follow it, with work brief = the phase's goal/work/"Done when", intent reference = the plan path and phase, and review tier = this run's `review:` token when present, else the phase's `**Review:**` line.
54
- - On `Status: done`, leave the phase `In progress` — its QA rows are still owed, and only the gate closes them.
55
- - On `Status: blocked`, mark it `Blocked` and stop the run.
56
- 4. **The gate.** After the last phase, prove the `Auto` rows — run `sassy-dogfood` in `mode:run` for each row's section; a `failed` verdict is a finding for that phase's rework, and a `class: env` verdict stops the run with the toolchain named. Then report: the plan path, each phase's status, what changed per phase, findings raised and what each single fix pass did with them (self-reported; no verify), the simplifications applied or skipped, the validator/reviewer summaries, and the reviewers' suggestions as options the user may pick. Then give every phase's QA checklist verbatim — row ID, check, `Mode`, and for `Manual` how to run it and what passing looks like, for `Auto` the dogfood verdict and run id — with unreported rows `Pending`. Ask for both decisions: code approval (or the changes wanted, including any suggestions picked) and the result per `Manual` row. Wait. Do not commit.
57
- 5. **Resolve the gate.** Four outcomes:
58
- - **Code approved and every QA row passes** → mark the rows `Done` (`Manual` with the user's notes, `Auto` with the verdict and run id), mark the phases `Done`, then run the close-out below.
59
- - **Code approved, `Manual` rows still pending** → tick nothing, mark nothing `Done`, commit nothing, ship nothing. Report which rows are outstanding and how to resume (invoke `sassy-lfg <plan>` in the harness's syntax), and stop.
60
- - **Changes requested** → a new cycle per affected phase: load `sassy-cycle` with that phase's requested changes as the work brief and the plan path and phase, as amended by those changes, as the intent reference. The cycle detects the change's tier and runs that tier's agents. When every new cycle is `done`, re-prove the `Auto` rows and present the gate again; a `blocked` cycle marks its phase `Blocked` and stops the run. If a QA row also failed, name it in the work brief as an additional requirement. Change requests have no cap — each one is the user's call.
61
- - **A QA row fails, with no change requested** → a rework cycle per affected phase: load `sassy-cycle` with that phase's failing rows as findings and the plan path and phase as the intent reference. When every rework is `done`, present the gate again; a `blocked` rework marks its phase `Blocked` and stops the run. A row that fails again after its rework is `Blocked` with the reason and stops the run.
62
- 6. **Close-out.** On both gates passing, load the `sassy-ship` skill and follow it. Do only the close-out steps the user approves. Babysit options (`merge:on|off`, `delete-branch:on|off`) are forwarded through `sassy-ship` to `sassy-babysit`. The branch from step 2 already carries the work, so ship commits and opens the PR on it; ship never creates the branch. Under `commit.branch: current` ship commits and pushes the checked-out branch to its upstream and skips the PR, `hooks.pr.*`, babysit, and merge.
63
-
64
- ## Brief input
65
-
66
- When the argument is not a plan path, the brief is the one phase:
67
-
68
- 1. Resolve the branch exactly as the plan path does — the `sassy-setup` skill's `references/branching.md`, this run's `branch:` and `worktree:` tokens — before the cycle runs.
69
- 2. Run one `sassy-cycle` with the brief as the work brief, its decisions / done-when as the intent reference, and this run's `review:` token as the tier. Do not split it into multiple phases.
70
- 3. Present the code approval gate with no QA checklist, and wait. Changes requested → a new cycle with the changes as the work brief and the brief's decisions / done-when, as amended by those changes, as the intent reference, then this gate again; `blocked` stops.
71
- 4. On code approval, run `sassy-ship`. Do not run `sassy-plan` or write a plan file.
72
-
73
- ## Hard rules
74
-
75
- | Rule | Requirement |
76
- |------|-------------|
77
- | Orchestrator only | Delegate every phase to `sassy-cycle`. Never read source or edit code. |
78
- | Branch before code | Resolve the branch per the `sassy-setup` skill's `references/branching.md` before any phase runs, so no change lands on a base branch. |
79
- | Phases in plan order | Phases run one after another, in plan order. |
80
- | Done needs both gates | Mark a phase `Done` only when the user approves the code and every QA row for it is `Done`. |
81
- | QA rows follow the user | Tick a `Manual` QA row `Done` only from the user's explicit confirmation, and an `Auto` row only from a passing dogfood report; keep unreported rows `Pending`; a failed row is a finding for a rework cycle. |
82
- | Send-backs split | A user's change request at the gate runs a new `sassy-cycle` at its detected tier; failing QA rows alone go through a one-pass rework. Neither is a direct edit. |
83
- | Gates before shipping | Nothing is committed or shipped until the code is approved and every QA row passes. Shipping is `sassy-ship`. |
84
- | No plan on the brief path | Use the in-context brief; never create or update a plan file. |
85
- | Compact context | Only pass briefs to subagents and keep only their summaries. |
86
-
87
- ## Failure handling
88
-
89
- - A phase returns `blocked` → stop the run, report the open findings and diagnostic.
90
- - QA rows stay pending, or a row fails again after its rework → stop, commit nothing, ship nothing, report the outstanding rows.
91
- - The validator returns **Blocked — insufficient grounding** → stop; do not advance.
92
- - Ambiguous or unsafe failure → stop and ask rather than guessing.