@sassywares/skills 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONCEPTS.md +11 -4
- package/README.md +18 -8
- package/package.json +1 -1
- package/skills/sassy-dogfood/SKILL.md +36 -11
- package/skills/sassy-plan/references/plan-format.md +1 -1
- package/skills/sassy-setup/SKILL.md +4 -4
- package/skills/sassy-setup/assets/dogfood-recipe.md +1 -1
- package/skills/sassy-setup/assets/worktree/_lib.sh +71 -5
- package/skills/sassy-setup/assets/worktree/create +21 -7
- package/skills/sassy-setup/assets/worktree/list +31 -8
- package/skills/sassy-setup/assets/worktree/prune +14 -6
- package/skills/sassy-setup/assets/worktree/remove +9 -6
- package/skills/sassy-setup/assets/worktree/stop +6 -3
- package/skills/sassy-setup/references/config.md +16 -9
- package/skills/sassy-setup/references/dogfood.md +63 -12
- package/skills/sassy-setup/references/harness.md +6 -0
- package/skills/sassy-setup/references/worktree.md +39 -12
- package/skills/sassy-setup/scripts/detect.sh +44 -8
- package/skills/sassy-setup/scripts/hash-skill.mjs +110 -0
- package/skills/sassy-setup/scripts/lockcheck.mjs +26 -37
- package/skills/sassy-worktree/SKILL.md +11 -8
|
@@ -23,7 +23,7 @@ argument-hint: "[slug] [mode:create|list|preview|remove|prune] [section:<name>]"
|
|
|
23
23
|
|
|
24
24
|
| Mode | What it does |
|
|
25
25
|
|------|--------------|
|
|
26
|
-
| `list` (default) | The table: branch, worktree,
|
|
26
|
+
| `list` (default) | The table: branch, worktree, how to see it, liveness, last dogfood verdict. Only managed checkouts appear; others are counted in a footer |
|
|
27
27
|
| `create` | Add a worktree for the run's branch, claim its port, dispatch `after_create` |
|
|
28
28
|
| `preview` | Bring that checkout up and print how to see it; leave it running. `stop` reaps it |
|
|
29
29
|
| `remove` | Dispatch `before_remove`, then delete after the script's refusals pass |
|
|
@@ -36,11 +36,11 @@ argument-hint: "[slug] [mode:create|list|preview|remove|prune] [section:<name>]"
|
|
|
36
36
|
1. **Resolve the branch and its start point first**, through the `sassy-setup` skill's `references/branching.md`, exactly as `sassy-work` does. A run that reaches here has already decided; the branch is not created twice. When a human asks for one by hand with no branch named, ask for the branch name — never derive one.
|
|
37
37
|
2. **Run `.sassywares/worktree/create <branch> --from <start-point>`** with the resolved start point. It is idempotent: an existing worktree for that branch is reported, a branch held by the main checkout is refused, and a port is claimed either way. On `--env` it prints the `WT_*` block alone.
|
|
38
38
|
3. **Dispatch the declared hooks.** The script prints one line per `hooks.worktree.after_create` entry; it cannot dispatch a skill, so you do. One `worker` each, in declared order: *load the project skill at `.agents/skills/<name>/SKILL.md` and follow it*, briefed with the `WT_*` block and the fact that the checkout now exists. A missing skill or a `blocked` result stops here — the checkout is real but unprepared, and saying so is the report.
|
|
39
|
-
4. **Report** the path, branch, namespace, port, address, and the hooks that ran or that none are declared. If the caller is a run, tell it to work in `WT_PATH` from now on.
|
|
39
|
+
4. **Report** the path, branch, namespace, port, address, the preview line, and the hooks that ran or that none are declared. If the caller is a run, tell it to work in `WT_PATH` from now on.
|
|
40
40
|
|
|
41
41
|
## `list`
|
|
42
42
|
|
|
43
|
-
Run `.sassywares/worktree/list` and present it as it prints — branch, worktree,
|
|
43
|
+
Run `.sassywares/worktree/list` and present it as it prints — branch, worktree, how to see it, live, last verdict. `--preview <slug>` prints how to see one checkout, `--path <slug>` its path, and `--address <slug>` its URL when the project configured ports. Never summarise the table away: how to see it is the point.
|
|
44
44
|
|
|
45
45
|
## `preview`
|
|
46
46
|
|
|
@@ -48,8 +48,8 @@ Run `.sassywares/worktree/list` and present it as it prints — branch, worktree
|
|
|
48
48
|
2. **Read the recipe** at `dogfood.recipe`. Two things stop the run, and both are reported rather than worked around: no recipe (the project has no stored procedure — say to run `sassy-dogfood mode:discover`), or the section has no `Prove it:` step (nothing marks where bringing-up ends).
|
|
49
49
|
3. **Preflight the session.** If the recipe's *Working in a second checkout* or *Set up once* names a session artifact and `.sassywares/session/` in **that checkout** is empty, that is `class: env`: report it with the line that fixes it and stop. Never open a logged-out app and call it a preview — the human will read the login screen as a broken build.
|
|
50
50
|
4. **Run the bring-up.** In `WT_PATH`: the recipe's *Set up once* when the checkout is cold (no `.env`, no installed deps), then the section's steps in order **up to but not including** its `Prove it:` step. Judge each step by its `Expect`. A failure stops the preview and is reported with the step id and its output tail — a preview that half-started is not a preview.
|
|
51
|
-
5. **Leave it running and report how to see it.**
|
|
52
|
-
6. **To stop it,** run `.sassywares/worktree/stop <slug
|
|
51
|
+
5. **Leave it running and report how to see it.** `list --preview <slug>` prints the recipe's `**Preview:**` line with the namespace substituted — the *result*, a URL or a simulator name or a window, never the command that started it. Print exactly that; never build an address yourself, and never assume one is a URL. When the project has ports and the preview answers on one, say it is up; when it does not, say it is running and that stopping it is the project's job.
|
|
52
|
+
6. **To stop it,** run `.sassywares/worktree/stop <slug>`. It kills by port, so it works only for a project that configured `worktrees.ports`; for a simulator or a window it says so instead of pretending.
|
|
53
53
|
|
|
54
54
|
Preview never judges the work, never writes a report, never commits, and never returns a verdict. If the user wants to know whether it *works*, that is `sassy-dogfood mode:run`.
|
|
55
55
|
|
|
@@ -57,7 +57,8 @@ Preview never judges the work, never writes a report, never commits, and never r
|
|
|
57
57
|
|
|
58
58
|
1. **Dispatch `before_remove` first**, one `worker` per declared entry, briefed with the `WT_*` block and that the checkout is about to go. Its job is the project's cleanup: drop the derived database, shut the simulator.
|
|
59
59
|
2. **Run `.sassywares/worktree/remove <slug> --hook-ok`.** Without `--hook-ok` it exits `3` by design when a hook is declared — that exit is the handshake, not an error to route around.
|
|
60
|
-
3. **
|
|
60
|
+
3. **Say what survives.** `remove` deletes the checkout and its port claim; the **branch stays**, so the work is still reachable. Naming that stops someone assuming the deletion took their commits with it.
|
|
61
|
+
4. **Report a refusal verbatim and stop.** Dirty tree, unpushed commits, a live preview, the main checkout: each is a real reason, and `--force` is the user's call, never yours. On success report the released port and the removed path.
|
|
61
62
|
|
|
62
63
|
## `prune`
|
|
63
64
|
|
|
@@ -71,10 +72,12 @@ Preview never judges the work, never writes a report, never commits, and never r
|
|
|
71
72
|
|------|-------------|
|
|
72
73
|
| The scripts do the git | Never run `git worktree`, never invent a port, never `rm -rf` a checkout. `.sassywares/worktree/*` owns all of it. |
|
|
73
74
|
| One worktree per run | The branch decision belongs to `references/branching.md`. Never create a second worktree for a run already on its branch. |
|
|
74
|
-
|
|
|
75
|
+
| Ours only | A checkout is managed when it sits under `worktrees.dir` **and** carries `.sassywares/config.yaml`. Never list, prune, stop, or remove one that is not — another tool made it, or it was cut before the wiring. `create` says so when that happens. |
|
|
76
|
+
| Names come from the script | `WT_NAMESPACE` is derived once, and `WT_PORT` only when the project configured a range. Never build a database name, a compose project, or a device name by hand. |
|
|
77
|
+
| A preview is not a URL | How to see a checkout is the recipe's preview line. A port is one resource among several; a mobile app's preview is a simulator, and this skill must not invent a URL for it. |
|
|
75
78
|
| Hooks are dispatched, not skipped | A declared `after_create` or `before_remove` runs. `remove` exits `3` rather than skipping it, and that is deliberate. |
|
|
76
79
|
| Never force on your behalf | `--force` skips the dirty and unpushed checks. Only the user's explicit instruction passes it. |
|
|
77
|
-
| Preview is a promise | Report
|
|
80
|
+
| Preview is a promise | Report a URL only when something answers on it. A half-started app is a failure with a step id, not a preview — and an app without a port gets its preview line, not a fabricated address. |
|
|
78
81
|
| No verdicts | This skill never says whether the work is correct. That is `sassy-dogfood`'s job, with a report. |
|
|
79
82
|
| No state of its own | Liveness is probed at read time. There is no registry, no pid file, and nothing to go stale. |
|
|
80
83
|
| Never production | A preview serves the local or staging app. A recipe step pointing at production is refused and reported. |
|