@sassywares/skills 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -6
- package/package.json +1 -1
- package/skills/sassy-babysit/SKILL.md +2 -2
- package/skills/sassy-dogfood/SKILL.md +11 -8
- package/skills/sassy-dogfood/references/check.md +5 -3
- package/skills/sassy-dogfood/references/discover.md +23 -12
- package/skills/sassy-dogfood/references/run.md +91 -17
- package/skills/sassy-setup/SKILL.md +5 -5
- package/skills/sassy-setup/assets/dogfood-recipe.md +19 -5
- package/skills/sassy-setup/references/anchors.md +1 -1
- package/skills/sassy-setup/references/branching.md +1 -1
- package/skills/sassy-setup/references/check.md +1 -1
- package/skills/sassy-setup/references/config.md +66 -14
- package/skills/sassy-setup/references/dogfood.md +181 -40
- package/skills/sassy-setup/references/harness.md +1 -1
- package/skills/sassy-setup/references/init.md +6 -4
- package/skills/sassy-setup/references/plan-resolution.md +1 -1
- package/skills/sassy-setup/references/scaffold-header.md +9 -2
- package/skills/sassy-setup/references/workspace.md +63 -1
- package/skills/sassy-setup/references/worktree.md +1 -1
- package/skills/sassy-setup/scripts/detect.sh +1 -1
- package/skills/sassy-setup/scripts/hash-skill.mjs +1 -1
- package/skills/sassy-setup/scripts/lib/agents-md.sh +13 -2
- package/skills/sassy-setup/scripts/lib/branch.sh +1 -1
- package/skills/sassy-setup/scripts/lib/check.sh +291 -24
- package/skills/sassy-setup/scripts/lib/common.sh +1 -1
- package/skills/sassy-setup/scripts/lib/proposal.sh +29 -2
- package/skills/sassy-setup/scripts/lib/sync.sh +1 -1
- package/skills/sassy-setup/scripts/lib/worktree.sh +1 -1
- package/skills/sassy-setup/scripts/lib/yaml.sh +77 -3
- package/skills/sassy-setup/scripts/lockcheck.mjs +1 -1
- package/skills/sassy-setup/scripts/worktree-check.mjs +1 -1
- package/skills/sassy-ship/SKILL.md +4 -4
- package/skills/sassy-ship/references/brief.md +1 -1
- package/skills/sassy-ship/references/plan.md +1 -1
- package/skills/sassy-ship/references/slice.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# generated_by: sassy-setup@0.17.
|
|
1
|
+
# generated_by: sassy-setup@0.17.3
|
|
2
2
|
# lib/yaml.sh — the flattened-config readers and the map match both nested
|
|
3
3
|
# maps share (git.base_map, hooks.<kind>).
|
|
4
4
|
# Sourced by detect.sh. Never sets shell options; reads CONFIG.
|
|
@@ -46,6 +46,30 @@ list_items() {
|
|
|
46
46
|
# check run validates the shape of a procedure, it never runs the product.
|
|
47
47
|
recipe_lint() {
|
|
48
48
|
awk '
|
|
49
|
+
# A capture value names the surface, never the thing that takes the picture.
|
|
50
|
+
# Two tiers, because a word can be both a product and an ordinary noun:
|
|
51
|
+
# a capture-product name is rejected anywhere it appears (naming it is naming
|
|
52
|
+
# a tool), while a generic word (`browser`, `driver`, `simulator`) is rejected
|
|
53
|
+
# only when it is the whole value — `the browser` is a tool, but
|
|
54
|
+
# `the browser tab strip settings page` is a surface.
|
|
55
|
+
function norm(low, v) {
|
|
56
|
+
v = low
|
|
57
|
+
sub(/^(a|an|the)[[:space:]]+/, "", v)
|
|
58
|
+
gsub(/^[[:space:]]+|[[:space:]]+$/, "", v)
|
|
59
|
+
while (v ~ /[[:punct:]]$/) {
|
|
60
|
+
sub(/[[:punct:]]$/, "", v)
|
|
61
|
+
gsub(/[[:space:]]+$/, "", v)
|
|
62
|
+
}
|
|
63
|
+
return v
|
|
64
|
+
}
|
|
65
|
+
function capture_tool(low, n, words, i, v) {
|
|
66
|
+
n = split(low, words, /[^a-z0-9]+/)
|
|
67
|
+
for (i = 1; i <= n; i++)
|
|
68
|
+
if (words[i] in product) return words[i]
|
|
69
|
+
v = norm(low)
|
|
70
|
+
if (v in generic) return v
|
|
71
|
+
return ""
|
|
72
|
+
}
|
|
49
73
|
function inventory(rest, kind, n, parts, i, name) {
|
|
50
74
|
n = split(rest, parts, ",")
|
|
51
75
|
for (i = 1; i <= n; i++) {
|
|
@@ -57,7 +81,16 @@ recipe_lint() {
|
|
|
57
81
|
else oos[++noos] = name
|
|
58
82
|
}
|
|
59
83
|
}
|
|
60
|
-
BEGIN {
|
|
84
|
+
BEGIN {
|
|
85
|
+
pending = 0; sec = ""; sname = ""; prove = 0; step = ""; incomment = 0
|
|
86
|
+
nunc = 0; noos = 0; subsec = 0
|
|
87
|
+
_n = split("playwright puppeteer selenium cypress appium webdriverio webdriver chromedriver geckodriver browserstack xcuitest maestro detox", _a, " ")
|
|
88
|
+
for (_i = 1; _i <= _n; _i++) product[_a[_i]] = 1
|
|
89
|
+
_n = split("browser driver emulator simulator headless devtools safari chrome chromium chrome-headless firefox webkit mcp", _a, " ")
|
|
90
|
+
for (_i = 1; _i <= _n; _i++) generic[_a[_i]] = 1
|
|
91
|
+
_n = split("tbd todo tba tbc na n/a", _a, " ")
|
|
92
|
+
for (_i = 1; _i <= _n; _i++) placeholder[_a[_i]] = 1
|
|
93
|
+
}
|
|
61
94
|
index($0, "<!--") { incomment = 1 }
|
|
62
95
|
incomment {
|
|
63
96
|
if (index($0, "-->")) incomment = 0
|
|
@@ -89,12 +122,15 @@ recipe_lint() {
|
|
|
89
122
|
printf "section \"%s\" has no **Prove it:** line — it has no verdict\n", sname
|
|
90
123
|
if (pending)
|
|
91
124
|
printf "step %s-%s has no **Expect** line — an unstated check is a suggestion\n", sname, step
|
|
92
|
-
pending = 0; prove = 0
|
|
125
|
+
pending = 0; prove = 0; subsec = 0
|
|
93
126
|
sec = $0; sub(/^## +/, "", sec)
|
|
94
127
|
split(sec, parts, /[ \t]+/); sname = parts[1]
|
|
95
128
|
insection[sname] = 1
|
|
96
129
|
next
|
|
97
130
|
}
|
|
131
|
+
# A capture line is resolved per `## ` section, so one under a `### ` subsection
|
|
132
|
+
# is never read. Flag it instead of linting a line no run can act on.
|
|
133
|
+
/^### / { subsec = 1; next }
|
|
98
134
|
/^[0-9]+\. / && index($0, "**Do**") {
|
|
99
135
|
if (pending)
|
|
100
136
|
printf "step %s-%s has no **Expect** line — an unstated check is a suggestion\n", sname, step
|
|
@@ -102,6 +138,38 @@ recipe_lint() {
|
|
|
102
138
|
pending = 1; next
|
|
103
139
|
}
|
|
104
140
|
index($0, "**Expect**") { pending = 0; next }
|
|
141
|
+
# Capture is optional and inherited: file level by default, a section value wins.
|
|
142
|
+
# An absent line is legal (capture when the harness can see the surface), `none`
|
|
143
|
+
# is the only refusal, and a refusal without a reason is a guess in the clothes
|
|
144
|
+
# of a verdict. Which tool takes the picture is never the recipe business.
|
|
145
|
+
# Anchored and last among the structural rules: a heading that merely carries
|
|
146
|
+
# the token stays ordinary structural text, and no other check is skipped.
|
|
147
|
+
/^[[:space:]]*\*\*Capture:\*\*/ {
|
|
148
|
+
if (subsec) {
|
|
149
|
+
printf "a **Capture:** line under a \"### \" subsection is never read \342\200\224 put it at file level or inside its \"## \" section\n"
|
|
150
|
+
next
|
|
151
|
+
}
|
|
152
|
+
val = $0; sub(/^[[:space:]]*\*\*Capture:\*\*[[:space:]]*/, "", val)
|
|
153
|
+
low = tolower(val)
|
|
154
|
+
if (val == "")
|
|
155
|
+
printf "a **Capture:** line names the surface to capture (e.g. `the catalog page`) or `none \342\200\224 <reason>`\n"
|
|
156
|
+
else if (low ~ /^none/) {
|
|
157
|
+
rest = substr(low, 5)
|
|
158
|
+
# A reason is words after the refusal: `none`, or a bare dash, is not one.
|
|
159
|
+
if (rest !~ /[[:alnum:]]/)
|
|
160
|
+
printf "**Capture:** none needs a reason \342\200\224 `none \342\200\224 <why this surface cannot be captured>`\n"
|
|
161
|
+
} else {
|
|
162
|
+
v = norm(low)
|
|
163
|
+
if (v !~ /[[:alnum:]]/ || v in placeholder)
|
|
164
|
+
printf "**Capture:** names nothing \342\200\224 say what to capture (e.g. `the catalog page`) or `none \342\200\224 <reason>`\n"
|
|
165
|
+
else {
|
|
166
|
+
t = capture_tool(low)
|
|
167
|
+
if (t != "")
|
|
168
|
+
printf "**Capture:** names a tool (\"%s\"), not a surface \342\200\224 name what to capture instead (e.g. `the catalog page`); the run picks the tool\n", t
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
next
|
|
172
|
+
}
|
|
105
173
|
END {
|
|
106
174
|
if (pending)
|
|
107
175
|
printf "step %s-%s has no **Expect** line — an unstated check is a suggestion\n", sname, step
|
|
@@ -157,6 +225,12 @@ hook_patterns() {
|
|
|
157
225
|
yaml_flat | awk -F'\t' -v us="$US" -v k="${1:-pr}" '{n=split($1,a,us); if (n==4 && a[1]=="hooks" && a[2]==k) print a[3]}' | sort -u
|
|
158
226
|
}
|
|
159
227
|
|
|
228
|
+
# repo_names — the keys declared under `repos:`, in config order. The one reader
|
|
229
|
+
# of the workspace inventory: its callers add the order they need.
|
|
230
|
+
repo_names() {
|
|
231
|
+
yaml_flat | awk -F'\t' -v us="$US" '{n=split($1,a,us); if (n==2 && a[1]=="repos") print a[2]}'
|
|
232
|
+
}
|
|
233
|
+
|
|
160
234
|
# hook_points KIND — the single source of point names; empty for an unknown kind.
|
|
161
235
|
hook_points() {
|
|
162
236
|
case "$1" in
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
suite: sassy-skills
|
|
3
3
|
artifact: skill
|
|
4
|
-
generated_by: sassy-ship@0.17.
|
|
4
|
+
generated_by: sassy-ship@0.17.3
|
|
5
5
|
name: sassy-ship
|
|
6
6
|
description: >-
|
|
7
7
|
Close out approved work: capture learnings, bring the docs in line with the
|
|
@@ -47,12 +47,12 @@ The frontmatter keys are the answer; the directory convention — a plan inside
|
|
|
47
47
|
|
|
48
48
|
## Steps (in order)
|
|
49
49
|
|
|
50
|
-
1. **Review gate.** In `mode:manual` only: present a compact shipping summary — the plan or topic, the changes from the cycle results, the docs the close-out expects to write, the branch/PR target, the babysit options, the target's own summary lines from its reference — for a slice, the `goal.md` change (slice → `Shipped`) and that babysit will not merge — and **the hooks resolved for this run's head — point, skill, and args — or that none are declared** — and wait. Under `commit.branch: current`, state instead "commit + push to `<head>`, no PR", that no PR, babysit, merge, or `hooks.pr.*` (`before_create`, `after_create`, `before_merge`, `after_merge`) will run, and **the `hooks.push.after_push` entries resolved for `<head>` — skill and args — or that none are declared**. In `mode:auto`, skip this gate.
|
|
50
|
+
1. **Review gate.** In `mode:manual` only: present a compact shipping summary — the plan or topic, the changes from the cycle results, the docs the close-out expects to write, **each dogfood run it relies on named with its repo and run id — `reports/<repo>/<run-id>/` in a workspace, `<run-id>/` in a repo, never one anonymous report directory** — the branch/PR target, the babysit options, the target's own summary lines from its reference — for a slice, the `goal.md` change (slice → `Shipped`) and that babysit will not merge — and **the hooks resolved for this run's head — point, skill, and args — or that none are declared** — and wait. Under `commit.branch: current`, state instead "commit + push to `<head>`, no PR", that no PR, babysit, merge, or `hooks.pr.*` (`before_create`, `after_create`, `before_merge`, `after_merge`) will run, and **the `hooks.push.after_push` entries resolved for `<head>` — skill and args — or that none are declared**. In `mode:auto`, skip this gate.
|
|
51
51
|
2. **Compound (conditional).** If the work produced a qualifying learning, dispatch a `worker` whose task is: *load the `sassy-compound` skill and follow it with `mode:auto`* — with a compact learnings brief (the solved problems, root causes, and solutions taken from the cycle results, not from re-reading the tree). It always gets `mode:auto` because ship's own gate already covered the approval. Skip cleanly when nothing qualifies, and skip entirely when `knowledge.write` is `false`.
|
|
52
52
|
3. **Docs.** Dispatch a `worker` whose task is: *load the `sassy-docs` skill and follow it in `mode:review`* — with the target path or topic, the change summary taken from the cycle results rather than re-read from the tree, the document set from `artifacts.*`, and this run's scope. It reports every stale claim, fixes it, and writes a handbook when the change is independent enough that a teammate would need a handover. It always gets the change summary: an auditor re-deriving the change from the tree disagrees with the document for the wrong reason. Skip cleanly when the change is trivially small and touches no documented surface, and skip entirely when the caller's `steps:` omits `docs`.
|
|
53
53
|
4. **Commit or snapshot.** After the review gate — never before it — the docs and any remaining code become durable.
|
|
54
54
|
|
|
55
|
-
**Before anything is persisted, check the plan's `Auto` QA rows.** If the plan carries any and one is not `Done` from a passing `sassy-dogfood` report, stop here: report the outstanding rows,
|
|
55
|
+
**Before anything is persisted, check the plan's `Auto` QA rows.** If the plan carries any and one is not `Done` from a passing `sassy-dogfood` report, stop here: report the outstanding rows, each run's path named with its repo, and what it would take to prove them. Ship never commits, pushes, or opens a PR behind an unproven automated row, and never runs the recipe itself — proving is `sassy-work`'s step, and re-running it here would let a red row reach a commit by being retried instead of fixed. A brief and a plan with only `Manual` rows skip this entirely.
|
|
56
56
|
- **`git.repo` is a remote.** Dispatch a `worker`: *load the `sassy-commit` skill and follow it with `branch:current`*, naming that the commit must include the plan and its `status` change, any new solutions docs, the concepts file, `AGENTS.md`, and any doc step 3 wrote — resolved from `artifacts.*`, never hardcoded. The branch already exists: `sassy-work` cut it before the first change, so the docs belong on it with the phase commits. It returns the hash and subject.
|
|
57
57
|
|
|
58
58
|
**Ship never creates the branch.** Outside `commit.branch: current`, a head on a base branch with unpublished commits is a mis-run — `sassy-work` was supposed to cut before touching code. Ask the commit worker to return `state` and `unpublished` from the `sassy-setup` skill's `scripts/detect.sh --branch`, and stop and ask if they show a base with a non-zero count. Never relocate commits silently, never push to the base. Under `commit.branch: current` this check does not fire: unpublished commits on the head are simply pushed along with the close-out commit.
|
|
@@ -71,7 +71,7 @@ The frontmatter keys are the answer; the directory convention — a plan inside
|
|
|
71
71
|
|
|
72
72
|
| Rule | Requirement |
|
|
73
73
|
|------|-------------|
|
|
74
|
-
| Unproven rows stop the close-out | A plan's `Auto` QA row that is not `Done` from a passing dogfood report stops ship before anything is persisted. Ship never runs the recipe itself. |
|
|
74
|
+
| Unproven rows stop the close-out | A plan's `Auto` QA row that is not `Done` from a passing dogfood report stops ship before anything is persisted. Ship never runs the recipe itself. A workspace cover is N runs: each is named with its repo and run id, never quoted as one report path. |
|
|
75
75
|
| Review gate | `mode:manual` (default) presents the summary and waits before any write, commit, push, or PR. |
|
|
76
76
|
| No review | `mode:auto` runs the close-out with no approval gate. Never toggled by the skill. |
|
|
77
77
|
| All-or-nothing gate | In `mode:manual`, nothing is written until the gate is answered. |
|