@sassywares/skills 0.11.21 → 0.12.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 (37) hide show
  1. package/CONCEPTS.md +33 -19
  2. package/README.md +33 -24
  3. package/package.json +1 -1
  4. package/skills/sassy-cycle/SKILL.md +7 -6
  5. package/skills/sassy-lfg/SKILL.md +1 -1
  6. package/skills/sassy-overview/SKILL.md +52 -0
  7. package/skills/sassy-overview/references/identify.md +82 -0
  8. package/skills/sassy-overview/scripts/identify.sh +83 -0
  9. package/skills/sassy-overview/scripts/lib.sh +334 -0
  10. package/skills/sassy-plan/SKILL.md +4 -4
  11. package/skills/sassy-setup/SKILL.md +8 -8
  12. package/skills/sassy-setup/assets/dogfood-recipe.md +1 -1
  13. package/skills/sassy-setup/assets/lifecycle/down +29 -0
  14. package/skills/sassy-setup/assets/lifecycle/up +34 -0
  15. package/skills/sassy-setup/assets/roster +1 -0
  16. package/skills/sassy-setup/assets/sassywares-readme.md +5 -4
  17. package/skills/sassy-setup/assets/worktree/_lib.sh +52 -213
  18. package/skills/sassy-setup/assets/worktree/create +18 -33
  19. package/skills/sassy-setup/assets/worktree/list +20 -54
  20. package/skills/sassy-setup/assets/worktree/prune +13 -9
  21. package/skills/sassy-setup/assets/worktree/remove +83 -26
  22. package/skills/sassy-setup/references/config.md +99 -17
  23. package/skills/sassy-setup/references/dogfood.md +11 -17
  24. package/skills/sassy-setup/references/init.md +18 -4
  25. package/skills/sassy-setup/references/workspace.md +27 -34
  26. package/skills/sassy-setup/references/worktree.md +66 -75
  27. package/skills/sassy-setup/scripts/detect.sh +112 -103
  28. package/skills/sassy-setup/scripts/hash-skill.mjs +31 -18
  29. package/skills/sassy-setup/scripts/worktree-check.mjs +89 -0
  30. package/skills/sassy-work/SKILL.md +1 -1
  31. package/skills/sassy-worktree/SKILL.md +17 -21
  32. package/skills/sassy-worktree/references/create.md +3 -3
  33. package/skills/sassy-worktree/references/list.md +2 -2
  34. package/skills/sassy-worktree/references/prune.md +4 -4
  35. package/skills/sassy-worktree/references/remove.md +8 -6
  36. package/skills/sassy-setup/assets/worktree/stop +0 -65
  37. package/skills/sassy-worktree/references/preview.md +0 -17
package/CONCEPTS.md CHANGED
@@ -22,7 +22,7 @@ A skill that mostly coordinates. It reads compact results, writes briefs, and av
22
22
 
23
23
  ## Change tier
24
24
 
25
- 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 work touches core code; never the reverse.
25
+ 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.
26
26
 
27
27
  ## Dogfood
28
28
 
@@ -53,7 +53,7 @@ A gate is a deliberate stop or pass/fail condition.
53
53
  ## Worktree
54
54
 
55
55
  One checkout per branch, so two runs never share a working tree. `sassy-worktree`
56
- owns the lifecycle; the scripts in `.sassywares/worktree/` own the git.
56
+ owns the workflow; the scripts in `.sassywares/worktree/` own the git.
57
57
 
58
58
  - **Worktree** — a second checkout of the same repository, at
59
59
  `~/.sassywares/worktrees/<repo>/<slug>`. It shares one object store and one
@@ -67,31 +67,45 @@ owns the lifecycle; the scripts in `.sassywares/worktree/` own the git.
67
67
  and a managed checkout that already exists for the branch is reused rather than
68
68
  a second one cut.
69
69
  - **Slug** — the branch with `/` flattened (`feat/catalog` → `feat-catalog`). It
70
- names the directory, the port, and the registry entry.
70
+ names the directory the checkout lives in, and the handle `list --path` and
71
+ `remove` take — `remove` also accepts the branch.
71
72
  - **Namespace** — the slug prefixed with the repo (`shop-feat-catalog`), and the
72
73
  only name a hook should use for a database, a compose project, or a simulator.
73
74
  Derived once by `create`; never rebuilt by hand.
74
- - **Port claim** — the private port a checkout owns, *when the project configured
75
- `worktrees.ports`*: hashed from the slug into the range, claimed with an atomic
76
- `mkdir`, and probed forward on a collision. Liveness is *probed*, never read
77
- from a pid file. Without a range there is no port and nothing to claim — a port
78
- is one resource, not the definition of a preview.
79
- - **Preview** — bringing that checkout up so a human can look at it. It runs the
80
- dogfood recipe's steps up to the section's `Prove it:` and never judges the
81
- work; proving is dogfood's job. **How to see it** is the recipe's `**Preview:**`
82
- line with `WT_*` substituted — a URL, a simulator, a window, never the command
83
- that started it — so the suite never assumes a browser.
75
+ - **Lifecycle** — the project's own pair of top-level config keys, `up:` and
76
+ `down:`, each a script or a skill and its args. The suite supplies the shape
77
+ and the `WT_*` environment, never the commands: `up` starts the stack in a
78
+ checkout and `down` stops it, and `remove` runs `down` before deleting. Absent
79
+ means no lifecycle, and nothing is invented. Addressing a checkout — a URL, a
80
+ simulator, a window — is the project's business too; two checkouts running the
81
+ same app collide unless the project's own `up:` keeps them apart.
84
82
  - **Managed checkout** — one under `worktrees.dir` that also carries
85
- `.sassywares/config.yaml`. The tooling lists, prunes, stops, and removes only
86
- those; anything else belongs to another tool or predates the wiring.
83
+ `.sassywares/config.yaml`. The tooling lists, prunes, and removes only those;
84
+ anything else belongs to another tool or predates the wiring.
87
85
 
88
- `create` and `remove` need an agent because their hooks are project skills, and a
89
- script cannot dispatch one. That is why the lifecycle is a skill and the git is a
90
- script.
86
+ `create` and `remove` need an agent because their hooks — and a `down:` that names
87
+ a skill — are project skills, and a script cannot dispatch one. So the
88
+ orchestration is a skill and the git is a script.
89
+
90
+ ## Overview
91
+
92
+ What a project is and how it runs, answered from its files. `sassy-overview`
93
+ owns it; its `identify.sh` is the query.
94
+
95
+ - **Identify** — the default `mode:identify`: one `key<TAB>value<TAB>source` line
96
+ per fact, read-only and never executing the project's tooling. The keys are
97
+ `stack`, `runner`, `install`, `up`, `down`, `test`, `compose`, `env`, `wired`.
98
+ - **Source** — the file a value came from, or `-` when there is none. A value
99
+ without a source is not a fact, which is why `unknown` carries `-`.
100
+ - **Unknown** — a first-class answer: the project has not declared this fact.
101
+ It is never a gap to fill with a default or a manifest written to hold one.
102
+ - **Answered vs. asked** — the default run is an inventory and exits `0`; naming
103
+ keys makes it a question, and any requested `unknown` exits `3` so the caller
104
+ branches instead of guessing. Usage errors exit `2`.
91
105
 
92
106
  ## Modes
93
107
 
94
- 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-handoff` (`write`, `read`), `sassy-setup` (`init`, `check`), and `sassy-skill` (`create`, `retune`, `verify`).
108
+ 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-handoff` (`write`, `read`), `sassy-setup` (`init`, `check`), `sassy-overview` (`identify`), and `sassy-skill` (`create`, `retune`, `verify`).
95
109
 
96
110
  - `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.
97
111
  - `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.
package/README.md CHANGED
@@ -89,9 +89,10 @@ Debugging:
89
89
  | **`sassy-plan`** | Grills you one question at a time through every branch of the work — pushing back, assuming nothing, sketching UI on request — until nothing is open, then offers three choices: write the plan, start working via `sassy-work`, or implement and ship via `sassy-lfg`. |
90
90
  | **`sassy-goal`** | Runs a project too big for one plan — a migration, an epic — as a goal split into slices that each ship something complete. `mode:write` (default) grills and writes the goal, `mode:next` plans the next slice via `sassy-plan`, `mode:check` validates a shipped slice and carries its lessons forward, `mode:close` verifies the whole goal. You run every step. |
91
91
  | **`sassy-scout`** | Grounds an area on demand and writes the shared grounding brief other agents read instead of re-exploring. |
92
+ | **`sassy-overview`** | Answers what a project is and how it runs — stack, runner, install, up, down, test, compose, env, wired — by inspecting files, read-only and with the source file for every value. `unknown` when the project hasn't said, and exit `3` so a caller branches instead of guessing. |
92
93
  | **`sassy-work`** | Executes exactly one plan phase, or one in-context brief, commits after code approval, then stops — the next phase is a run you start. A brief stops before ship. |
93
94
  | **`sassy-lfg`** | Executes every phase of a plan, or one in-context brief, then closes out via `sassy-ship` after code approval. |
94
- | **`sassy-worktree`** | One checkout per branch, each with its own derived namespace and port, so two agents can work in one repo — taken when you ask, never because the config allows it. `create`, `list`, `preview`, `remove`, `prune` — and `preview` brings a checkout up so you can look at it without setting it up by hand. |
95
+ | **`sassy-worktree`** | One checkout per branch, each with its own derived namespace, so two agents can work in one repo — taken when you ask, never because the config allows it. `create`, `list`, `remove`, `prune`: cut a checkout, see what exists, delete one, or clear the leftovers. |
95
96
  | **`sassy-cycle`** | Runs one unit of work through a tiered loop: implement → simplify + review + validate for `logic`, review for `surface`, nothing for mechanical → one fix pass. No verify. Also reworks finished work from failed QA rows and picked findings. |
96
97
  | **`sassy-debug`** | Diagnoses a bug, gates the fix, fixes via `sassy-work` (cycle, code approval, commit), then ships. Debug takes no mode and always leaves ship's review gate in place unless you invoke ship yourself with `mode:auto`. |
97
98
  | **`sassy-handoff`** | `mode:write` (default) writes a self-contained handoff file to `/tmp/sassywares/handoffs/` and gives you a `sassy-handoff mode:read <path>` command for a fresh session; `mode:read` explains what the handoff did, why, and where things stand now, then asks what to do next. Works in any harness. |
@@ -183,7 +184,9 @@ hooks:
183
184
  worktrees: # parallel checkouts of this repo
184
185
  enabled: false # true = a run may offer its own checkout
185
186
  dir: ~/.sassywares/worktrees # parent of the per-repo folder
186
- ports: 3000-3099 # optional; delete for a non-port preview
187
+ # up:/down: are top level — not under worktrees: — each `<script> <args…>` or `<skill> <args…>`
188
+ # up: ./bin/up
189
+ # down: ./bin/down # absent = no lifecycle
187
190
  dogfood: # agent QA: a stored procedure that proves a change runs
188
191
  enabled: false # true lets a plan write Mode: Auto QA rows
189
192
  recipe: .sassywares/dogfood/recipe.md # the procedure; never commands here
@@ -194,12 +197,11 @@ dogfood: # agent QA: a stored procedure that proves a ch
194
197
  ### Working in parallel
195
198
 
196
199
  Two agents in one repo need two checkouts, and a checkout needs a name — a
197
- directory, a port, a database. `worktrees:` turns that on:
200
+ directory, a namespace, a database. `worktrees:` turns that on:
198
201
 
199
202
  ```text
200
203
  ~/.sassywares/worktrees/shop/
201
204
  ├── .repo which checkout owns this folder
202
- ├── ports/ one claim directory per port
203
205
  └── feat-catalog-search/
204
206
  ```
205
207
 
@@ -213,9 +215,16 @@ takes one and otherwise works in the main checkout, because two runs only collid
213
215
  when they are actually parallel. `sassy-worktree create` takes one whenever you
214
216
  ask for it, and a run carrying `worktree:on` has already been told yes.
215
217
 
218
+ Setup installs the tooling as four scripts in `.sassywares/worktree/` — `create`,
219
+ `list`, `remove`, `prune` — run by path, `.sassywares/worktree/create
220
+ feat/catalog`. No command runner is required: if the project already has one that
221
+ carries named commands, setup offers to wire `worktree:<script>` aliases into it,
222
+ and never creates a manifest to hold them, so a Go, Python, or Dart project keeps
223
+ its own tooling file and nothing else.
224
+
216
225
  `create` derives the identity from the branch and prints it — `WT_PATH`,
217
- `WT_SLUG`, `WT_NAMESPACE` — so a project's hook derives `.env`, a database name,
218
- or a simulator from one source instead of inventing its own.
226
+ `WT_BRANCH`, `WT_SLUG`, `WT_NAMESPACE` — so a project's hook derives `.env`, a
227
+ database name, or a simulator from one source instead of inventing its own.
219
228
 
220
229
  A checkout's branch is cut **untracked**, and `create` prints the upstream it
221
230
  found — `none` on a fresh branch, and a plain-English warning when an existing
@@ -223,28 +232,28 @@ branch tracks something other than its own name. Cut from `origin/staging`, git'
223
232
  DWIM would have made `staging` that branch's upstream, so the branch's own `git
224
233
  push` would aim at the base: a run that looks healthy until it ships.
225
234
 
226
- A **port is a resource, not the model**. With `ports:` configured, a checkout
227
- also gets `WT_PORT` and `WT_BASE_URL`, hashed into the range and claimed
228
- atomically so a restarted app returns to the same port. Delete `ports:` and there
229
- is no port at all: the checkout is addressed by the recipe's `**Preview:**` line
230
- instead — a simulator named `$WT_NAMESPACE`, a desktop window, or nothing at all
231
- for a CLI. The `list` table's column is `HOW TO SEE`, not "address", for exactly
232
- that reason.
235
+ **A checkout's address and its stack are the project's own business.** The suite
236
+ derives no address and runs no app: how a checkout is looked at, and what command
237
+ brings it up, are the top-level `up:` and `down:` keys — each one line, a script
238
+ or a skill and its args. Two checkouts running the same app collide on the same
239
+ fixed port unless the project's `up:` keeps them apart, so a project that needs a
240
+ per-checkout value derives it there from `$WT_SLUG`. Nothing here claims or tracks
241
+ one, and a collision surfaces in the project's own command.
233
242
 
234
243
  It needs `commit.branch: new`: under `current` a run commits where it stands and
235
244
  never cuts a branch, so nothing would create a checkout. `--check` says so rather
236
245
  than leaving a switch that cannot fire.
237
246
 
238
- **Previewing.** `sassy-worktree mode:preview` runs the dogfood recipe's bring-up
239
- steps — everything up to the section's `Prove it:` — leaves the app running, and
240
- prints the preview line — the result, not the command that booted it. A worktree gets a fresh, empty `.sassywares/session/`, and
241
- most providers register one callback URL, so the usual answer is to copy or link
242
- the main checkout's session in the `after_create` hook: a cookie is host-scoped
243
- and crosses ports freely, while a `localStorage` session is origin-scoped and has
244
- to be injected per origin.
247
+ `up:` runs in the foreground and is stopped with SIGTERM, so it must reap its
248
+ children; `down:` terminates what `up:` started and exits. `remove` runs `down:`
249
+ when the project declares one, then deletes the checkout. A worktree gets a fresh,
250
+ empty `.sassywares/session/`, and most providers register one callback URL, so the
251
+ usual answer is to copy or link the main checkout's session in the `after_create`
252
+ hook: a cookie is host-scoped, while a `localStorage` session is origin-scoped and
253
+ has to be injected per origin.
245
254
 
246
- Nothing here keeps state: liveness is probed, `stop` reaps by port, and `remove`
247
- refuses a dirty tree, unpushed commits, a live app, or the main checkout.
255
+ Nothing here keeps state: `list` reports branch, path, dirty, and upstream, and
256
+ `remove` refuses a dirty tree, unpushed commits, or the main checkout.
248
257
 
249
258
  ### Extending the pipeline
250
259
 
@@ -257,10 +266,10 @@ A project adds its own steps by naming a skill that lives in its own `.agents/sk
257
266
  | `before_merge` | this run is about to merge | a final approval gate |
258
267
  | `after_merge` | this run observed the merge | sync a back-merge branch, tag, notify |
259
268
  | `hooks.push` `after_push` | `commit.branch: current` only: after ship's push | notify, trigger a follow-up step |
260
- | `hooks.worktree` `after_create` | just after a checkout exists | derive `.env` and the port, seed the database, copy the session in |
269
+ | `hooks.worktree` `after_create` | just after a checkout exists | derive `.env`, seed the database, copy the session in |
261
270
  | `hooks.worktree` `before_remove` | before the checkout is deleted | drop the derived database, shut the simulator |
262
271
  | `hooks.goal` `before_slice` | `sassy-goal mode:next`: after the previous slice's merge is confirmed, before the slice is grilled | switch to the bases, pull, migrate, seed |
263
- | `hooks.goal` `after_close` | `sassy-goal mode:close`: after the goal's status is persisted | post the goal summary, notify, tear down per-slice previews |
272
+ | `hooks.goal` `after_close` | `sassy-goal mode:close`: after the goal's status is persisted | post the goal summary, notify, tear down per-slice environments |
264
273
 
265
274
  Hooks run in declared order, one subagent each, and fail closed: a declared skill that is missing or returns `blocked` stops the run. Which points may write, and how, is stated once in `sassy-setup`'s `references/config.md` (the hook contract). `before_merge` and `after_merge` never fire unless this run merges. Goal hooks may do anything except touch the goal itself, as long as every base ends level with its remote; `before_slice` fires before `mode:next` checks the base, and neither is suppressed by `commit.branch: current`.
266
275
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassywares/skills",
3
- "version": "0.11.21",
3
+ "version": "0.12.0",
4
4
  "description": "Lean, explicit-invocation Agent Skills for shipping fast: plan, work, review, validate, ship.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,18 +46,19 @@ Every worker brief this cycle dispatches — implement and fix — carries:
46
46
  - Tests only for the files the worker changed and the existing tests that directly regress them. The full suite runs once at the final gate.
47
47
  - A hard timeout around long-running commands, for example `timeout 300 bunx vitest run path/to/file.test.ts`; a hung command is killed and reported.
48
48
  - Stop and report a blocker to the orchestrator after one failed retry, with the exact command and error, instead of looping on the same failure.
49
- - Report the files it changed and state `Runtime behavior: yes` or `Runtime behavior: no` — whether the change alters what the product does.
49
+ - Report the files it changed and state `Runtime behavior: yes` or `Runtime behavior: no` — whether the change alters what the product does for a user. Running the product in a test or tooling does not count.
50
50
  - For a **simplification**: behavior stays identical — same output for every input, same errors, same side effects and ordering. Never remove validation, error handling that prevents data loss, authorization, escaping, or accessibility code to make something simpler, and never weaken a test to make it pass. A simplification that cannot meet that is skipped and reported with the reason.
51
51
 
52
52
  ## Steps
53
53
 
54
54
  1. **Recon (optional).** If the work is large or its location is unclear, run `sassy-scout` first and pass the grounding brief path into the work brief. Skip when the brief is already precise.
55
55
  2. **Implement.** Dispatch a `worker` with the work brief, the intent reference, and the plan path if there is one, carrying the worker brief constraints above. For independent chunks, batch them as **parallel** `worker` tasks in one call (max 8). The worker reads whatever it needs itself.
56
- 3. **Resolve the tier.** An explicit tier from Inputs wins, unless the work contradicts it: a `surface` or `none` unit whose files include core code, or whose worker reported `Runtime behavior: yes`, is promoted to `logic`. Never demote. Without an explicit tier, classify from the worker's file report:
57
- - any core-code path, or `Runtime behavior: yes` → `logic`
58
- - only human-authored docs, copy, comments, tests, or fixtures → `surface`
56
+ 3. **Resolve the tier.** An explicit tier from Inputs wins, unless the work contradicts it: a `surface` or `none` unit whose files include a core-code path is promoted to `logic`. Never demote. The worker's `Runtime behavior: yes` is not a promotion on its own — tests, fixtures, and tooling often exercise runtime behavior without changing it. Without an explicit tier, classify from the worker's file report:
57
+ - any core-code path → `logic`
58
+ - only human-authored docs, copy, comments, tests, fixtures, or tooling → `surface`
59
59
  - only generated, vendored, lock, or formatting files → `none`
60
- - mixed surface and generated files → `surface`; the human-authored part decides.
60
+ - mixed surface and generated files → `surface`; the human-authored part decides
61
+ - anything else → `logic` if the worker reported `Runtime behavior: yes`, otherwise `surface`.
61
62
 
62
63
  Core code is what ships and runs: product source, UI and styles, schemas and migrations, public contracts, and behavior-changing config. Report the resolved tier as `declared`, `detected`, or `promoted` in the result.
63
64
  4. **Quality (by tier).** Dispatch in one **parallel** call where the tier has more than one agent:
@@ -98,7 +99,7 @@ Notes: <anything the caller needs>
98
99
  | Orchestrator only | Never edit code or read source in the main context. Delegate. |
99
100
  | Tier decides agents | `logic` → simplifier + reviewer + validator (validator only with an intent reference); `surface` → reviewer; `none` → none. |
100
101
  | One fix pass, no verify | At most one work pass after the quality agents. Never re-review the fix. |
101
- | Never demote | A declared `surface` or `none` promotes to `logic` when the work touches core code or reports changed runtime behavior. |
102
+ | Never demote | A declared `surface` or `none` promotes to `logic` only when the changed files include core code. |
102
103
  | Parallel where independent | Independent work chunks → parallel workers. The tier's quality agents run in one parallel call. |
103
104
  | Only fixes block | Simplifications are applied or reported but never make a run `blocked`; reviewer suggestions go to the caller's gate for the user to pick and are never applied automatically. |
104
105
  | Simplifier runs once | Only at the `logic` tier. It never runs on rework. |
@@ -48,7 +48,7 @@ A brief has no QA table, so its gate is code approval alone. Never invent, enabl
48
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
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
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`/`WT_PORT` where the project declared a port range — since proof run against the main checkout's port proves the wrong app.
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
52
  3. **Run every phase, in order.** For each phase not `Done`:
53
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
54
  - On `Status: done`, leave the phase `In progress` — its QA rows are still owed, and only the gate closes them.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: sassy-overview
3
+ description: >-
4
+ Answers what a project is and how it runs — its stack, install, up, down,
5
+ test, compose, env, and whether the suite is wired — from its files, read-only,
6
+ with the source file for every value and `unknown` when nothing is declared.
7
+ Use when a skill or a user needs project facts before acting: setting up a
8
+ repo, deciding how to start or stop it, or checking a stack instead of
9
+ guessing one. Never installs, runs, or changes anything.
10
+ argument-hint: "[mode:identify] [key...]"
11
+ ---
12
+
13
+ # Sassy Overview
14
+
15
+ **Outcome:** one definitive, sourced answer to "what is this project and how does it run" — or `unknown` where the project has not said — so no skill has to guess a stack or invent a command.
16
+
17
+ **The script answers; the skill reads it.** `scripts/identify.sh` (with `scripts/lib.sh`) does the work by inspecting files. It is invoked by path from this skill's directory, is never installed into a project's `.sassywares/`, and needs no config, no pin, and no reconciliation: it is a query.
18
+
19
+ **Read-only, always.** It reads file bytes. It never touches the network, never executes the project's tooling — not even `make -n` — and writes no file. Anything it cannot see in a file is `unknown`, which is a real answer and never a prompt to guess.
20
+
21
+ ## Modes
22
+
23
+ | Mode | Load | It ends with |
24
+ |---|---|---|
25
+ | `identify` (default) | `references/identify.md` | the key/value/source lines, and the facts they prove |
26
+
27
+ `identify` is the only path today. A later overview (a dependency audit, an environment check) lands as its own script plus its own reference and gets a row here — never as a section appended to `identify`. Read the one reference for the mode you were dispatched to, and only that one.
28
+
29
+ ## Workflow
30
+
31
+ 1. Run `bash <this skill's directory>/scripts/identify.sh --root <project>` — every key, or name the ones you need (`identify.sh --root <project> test up`).
32
+ 2. Read the three columns: `key`, `value`, `source`. A value with a source is a fact; `unknown` is the project declining to say.
33
+ 3. Branch on the exit code, never on a guess: `0` answered, `3` a key you requested is unknown, `2` usage. A caller that needs `up` and gets `3` says so and stops; it never substitutes a command it made up.
34
+ 4. Quote the source file when you pass a value on. "test: `go test ./...` (go.mod)" is auditable; "test: `go test`" is not.
35
+
36
+ ## Hard rules
37
+
38
+ | Rule | Requirement |
39
+ |---|---|
40
+ | Files only | No network, no running project tooling, no `make -n`. A command is reported only when a manifest declares it. |
41
+ | Every value is sourced | `key<TAB>value<TAB>source`; `-` when there is no file behind it. Never print a value without one. |
42
+ | `unknown` is final | Report it. Never fill a gap with a plausible default, and never write a manifest so an answer exists. |
43
+ | Exit code is the answer | `3` means the requested fact is unknown; a caller branches on it instead of guessing. |
44
+ | Writes nothing | Not the project's tree, not the suite's, not a temp file. |
45
+ | Never this skill's job | It does not wire, start, migrate, install, or fix a project. It reports, and `sassy-setup` or the user acts. |
46
+
47
+ ## Consuming it
48
+
49
+ Any skill that needs project facts names it and runs the script; nothing copies its table.
50
+
51
+ - `sassy-setup` is the intended consumer: it probes with this script before offering a project's `up:`/`down:` keys, so a project that already declares a command is pointed at it instead of being handed a stub. Once `.sassywares/config.yaml` names `up`/`down`, the config is the authority for those two facts and the worktree mechanics read it; this script keeps reporting what a manifest declares, never the suite's config.
52
+ - Nobody else reads it yet. `sassy-worktree` must not: its `up`/`down` pointers already carry the stack, so an overview there would re-create the seam this replaced.
@@ -0,0 +1,82 @@
1
+ # Identify
2
+
3
+ `scripts/identify.sh` inspects a project's files and prints one line per key. It is the whole of `mode:identify`: run it, read its lines, branch on its exit code.
4
+
5
+ ```bash
6
+ bash <sassy-overview skill>/scripts/identify.sh [--root DIR] [--key KEY]... [KEY]...
7
+ ```
8
+
9
+ `--root` defaults to the current directory. Positional keys and `--key KEY` are the same thing; both may be mixed. With no keys it prints every key in table order. `scripts/lib.sh` holds the table and is sourced by `identify.sh` — never invoked directly.
10
+
11
+ ## The contract
12
+
13
+ Exactly three tab-separated columns, one line per key, no header, no blank lines:
14
+
15
+ ```
16
+ key<TAB>value<TAB>source
17
+ ```
18
+
19
+ - `key` — one of the nine names below.
20
+ - `value` — what the project declares, or `unknown`.
21
+ - `source` — the file the value came from, relative to `--root`, or `-` when there is none (`unknown`, and `wired: no`). The one exception: a `.sassywares/config.yaml` belonging to a directory above `--root` has no relative path, so `wired` names it absolutely.
22
+
23
+ Exit codes decide what a caller may do:
24
+
25
+ | Code | Meaning | Caller's move |
26
+ |---|---|---|
27
+ | `0` | answered | use the values |
28
+ | `3` | a requested key is `unknown` | say the fact is unknown and stop; never substitute a command |
29
+ | `2` | usage error (bad key name, bad option, missing directory) | fix the invocation |
30
+
31
+ The default run is an **inventory**: it prints every key and exits `0` even when some are unknown, because an inventory is not a question. Naming keys makes it a question — any requested key that is `unknown` makes the run exit `3`, after printing all requested lines. Requested keys print in the order they were named.
32
+
33
+ Everything is file inspection: no network, no executing the project's tooling (not even `make -n`), no writes. A wrong answer is possible only where the files are ambiguous; a fabricated one is not.
34
+
35
+ ## The keys
36
+
37
+ | Key | It means | `unknown` when |
38
+ |---|---|---|
39
+ | `stack` | the project's language ecosystem | no stack manifest in the table |
40
+ | `runner` | the tool that runs the project's commands | no task runner and no stack manifest |
41
+ | `install` | how dependencies are installed | nothing declared |
42
+ | `up` | how the app starts | no declared start target and no compose file |
43
+ | `down` | how the app stops | no declared stop target and no compose file |
44
+ | `test` | how the test suite runs | nothing declares one (a language default counts only where it is unambiguous) |
45
+ | `compose` | the compose file in use | no compose file |
46
+ | `env` | the env file in use | no env file |
47
+ | `wired` | the suite is set up here | never — the answer is `yes` or `no` |
48
+
49
+ `up` and `down` are the only keys a project might reasonably have and not declare, and this script reads only what a file declares: a `Makefile`/`justfile` target or a compose file. A project that states them in `.sassywares/config.yaml` (`up:`/`down:`, which `sassy-setup` initializes and the worktree mechanics read) is answering through the config — this script still reports `unknown` for them, because it never reads the suite's own config for a stack fact, and the config is the authority once it names one.
50
+
51
+ `wired` is the one key that always has an answer: `yes` with the nearest `.sassywares/config.yaml` as its source, otherwise `no` with `-`. The search walks up from `--root` the same way `sassy-setup`'s `detect.sh` resolves a config, so a repo nested inside a folder that owns one is `wired: yes`; the source is then that config's absolute path, since it sits outside the root.
52
+
53
+ ## The manifest table
54
+
55
+ The first stack manifest in this order wins, so a repo with several gets one stack and one set of ecosystem commands. A `Makefile`/`justfile` then overrides `runner` and any command it declares (just outranks make), and a compose file takes `up`/`down` only where nothing else declared them.
56
+
57
+ | Stack | Manifest | `runner` | `install` | `test` |
58
+ |---|---|---|---|---|
59
+ | `go` | `go.mod` | `go` | `go mod download` | `go test ./...` |
60
+ | `node` | `package.json` | `bun`/`pnpm`/`yarn`/`npm`, from its lockfile then `packageManager` | `<pm> install` | `<pm> test`, when `scripts.test` exists |
61
+ | `deno` | `deno.json`, `deno.jsonc` | `deno task` when it declares `tasks`, else `deno` | — | `deno task test`, when declared |
62
+ | `python` | `pyproject.toml`, `requirements.txt`, `setup.py` | `poetry`/`uv` from their lockfile, else `pip` | `poetry install`, `uv sync`, `pip install -r requirements.txt`, or `pip install -e .` | — |
63
+ | `dart` | `pubspec.yaml` | `flutter` when the SDK is declared, else `dart` | `flutter pub get` / `dart pub get` | `flutter test` / `dart test` |
64
+ | `rust` | `Cargo.toml` | `cargo` | `cargo fetch` | `cargo test` |
65
+ | `php` | `composer.json` | `composer` | `composer install` | `composer test`, when `scripts.test` exists |
66
+ | `ruby` | `Gemfile` | `bundle` | `bundle install` | — |
67
+ | — | `Makefile` | `make` | — | `make test`, when declared |
68
+ | — | `justfile` | `just` | — | `just test`, when declared |
69
+ | — | `compose.yaml`, `compose.yml`, `docker-compose.yml`, `docker-compose.yaml` | `docker` (last resort) | — | — |
70
+
71
+ `up` and `down` are declared, never inferred from a language: a `dev`/`start`/`up`/`serve` target in a `Makefile` or `justfile` (or a task of that name in a `deno.json`/`deno.jsonc` `tasks` object), then a compose file (`docker compose up` / `docker compose down`). A node `scripts.dev` is deliberately not read — it says how a tool starts, not how the project comes up. A target is recognized by its declaration line; nothing is executed to prove it exists. A Deno manifest declares no dependency-install step (imports are resolved by the runtime), so its `install` is `unknown` rather than an invented `deno install`.
72
+
73
+ `env` is the first of `.env`, `.env.local`, `.env.example`, `.env.sample`. Its value is the path, never the contents.
74
+
75
+ Adding a row to this table means adding a fixture to `tests/sassy-overview-identify.sh` in the same change that asserts the row's real value — not `unknown`. A row without a fixture is a guess with a source column.
76
+
77
+ ## Consuming a value
78
+
79
+ - **Print the source with the value.** A caller that says `test: go test ./... (go.mod)` can be checked; one that says `test: go test` cannot.
80
+ - **Treat `3` as information.** If `up` was requested and is `unknown`, the project has not said how it starts. Report that. Do not invent `npm run dev`, do not write a `Makefile` so an answer exists, and do not fall back to a sibling key.
81
+ - **Ask for what you need.** Requesting one key is cheaper to read and gives a sharper exit code than parsing the full inventory.
82
+ - **Never cache it.** It is a file read; rerun it after the project's files change rather than trusting a remembered answer.
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env bash
2
+ # identify.sh — what is this project, and how does it run?
3
+ #
4
+ # One tab-separated line per key: `key<TAB>value<TAB>source`, where source is
5
+ # the file the value came from, or `-` when there is no source (an `unknown`
6
+ # value, or `wired: no`). Read-only: it inspects files, never the network, and
7
+ # never runs the project's tooling — not even `make -n` — and writes nothing.
8
+ #
9
+ # Usage:
10
+ # identify.sh [--root DIR] every key, in table order
11
+ # identify.sh [--root DIR] [--key KEY]... [KEY]...
12
+ # only the keys named, in the order
13
+ # they were named (`--key` and a
14
+ # bare positional are the same)
15
+ # identify.sh --help
16
+ #
17
+ # Exit: 0 answered; 3 a requested key is unknown; 2 usage error. The default
18
+ # run is an inventory and exits 0 even when keys are unknown — a request is a
19
+ # question, and only a question can go unanswered.
20
+ set -euo pipefail
21
+
22
+ SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
23
+ # shellcheck source=skills/sassy-overview/scripts/lib.sh
24
+ . "$SELF_DIR/lib.sh"
25
+
26
+ KEYS="$ID_KEYS"
27
+ USAGE="usage: identify.sh [--root DIR] [--key KEY]... [KEY]...
28
+ identify.sh --help
29
+
30
+ Prints one line per key: key<TAB>value<TAB>source. Read-only.
31
+
32
+ Keys: $KEYS
33
+ Exit: 0 answered, 3 a requested key is unknown, 2 usage error."
34
+
35
+ die_usage() {
36
+ printf 'identify: %s\n%s\n' "$*" "$USAGE" >&2
37
+ exit 2
38
+ }
39
+
40
+ ROOT="$(pwd -P)"
41
+ want=()
42
+
43
+ while (( $# )); do
44
+ case "$1" in
45
+ --root) (( $# >= 2 )) || die_usage "missing DIR after --root"; ROOT="$2"; shift 2 ;;
46
+ --root=*) ROOT="${1#*=}"; shift ;;
47
+ --key) (( $# >= 2 )) || die_usage "missing KEY after --key"; want[${#want[@]}]="$2"; shift 2 ;;
48
+ --key=*) want[${#want[@]}]="${1#*=}"; shift ;;
49
+ --help|-h)
50
+ printf '%s\n' "$USAGE"
51
+ exit 0 ;;
52
+ -*) die_usage "unknown option '$1'" ;;
53
+ *) want[${#want[@]}]="$1"; shift ;;
54
+ esac
55
+ done
56
+
57
+ [ -d "$ROOT" ] || die_usage "not a directory: $ROOT"
58
+ ID_ROOT="$(cd "$ROOT" && pwd -P)"
59
+
60
+ id_known() {
61
+ case " $KEYS " in *" $1 "*) return 0 ;; esac
62
+ return 1
63
+ }
64
+
65
+ for k in ${want[@]+"${want[@]}"}; do
66
+ id_known "$k" || die_usage "unknown key '$k'"
67
+ done
68
+
69
+ id_scan
70
+
71
+ # An inventory prints every key and always exits 0; a request prints the keys it
72
+ # named, in that order, and exits 3 when one of them has no answer.
73
+ if (( ${#want[@]} )); then keys="${want[*]}"; else keys="$KEYS"; fi
74
+ missing=0
75
+ for k in $keys; do
76
+ v="$(id_value "$k")"
77
+ s="$(id_source "$k")"
78
+ printf '%s\t%s\t%s\n' "$k" "$v" "$s"
79
+ if [ "$v" = unknown ] && (( ${#want[@]} )); then missing=1; fi
80
+ done
81
+
82
+ (( missing == 0 )) || exit 3
83
+ exit 0