The meta-skill that builds and improves all your skills, including itself. Watches your work sessions (autonomous or human-led), captures patterns, corrections and judgement calls, and turns them into skill improvements and new skill candidates for your review. Practical application of the Augmented Expertise methodology. Open source: CC BY 4.0.
Python agent-skillsai-skillsaugmented-expertiseawesome-skillsclaudeclaude-codeclaude-code-skillclaude-code-skillsclaude-coworkclaude-skillsmeta-skillrebelyticsskill-automationskill-builderskill-creationskill-improvementskill-managementskills
Harden the review procedures after the first multi-log and release-branch runs
Eoghan Henn5dac70f75125
diff --git a/SKILL.md b/SKILL.mdindex 3a44b76..2e885f6 100644--- a/SKILL.md+++ b/SKILL.md@@ -71,7 +71,20 @@ and its references takes that pinned absolute path, written`[ABSOLUTE PATH]` — substitute it when installing, exactly as in theactivation block. A snippet run with a relative path from any otherdirectory does not fail: it reports an empty, clean backlog, which is the-one answer that never gets questioned.+one answer that never gets questioned. **The substituted path routinely+contains a space** — the default shared-folder name on at least one+common install does — so every expansion of it stays double-quoted, and+no snippet may feed it through word splitting (`for f in $(find …)`): a+sweep that splits its own path at the space examines zero files, prints+errors nobody reads, and lets the command it rides inside succeed.+**Every snippet here is bash, not POSIX `sh`** — the archival sweep's+`read -r -d ''` is a bash extension that `dash` and `ash` do not have, so+under `sh` it fails as a usage error or, worse, as a loop that reads+nothing and exits zero, which is the same silent success as the word+split. A `bash` code fence states that to a human reader and to nothing+else, so invoke the snippets with bash explicitly; where a loop happens to+be POSIX-safe as well (the session-start scan), that is incidental and not+a promise about the rest.## Reference files — load on demand, not up front@@ -183,13 +196,13 @@ was handled without its reference loaded, log an observation.rather than an error.```bash- d="[ABSOLUTE PATH]/skill-observations/observation-log" # the pinned workspace path — re-derive in EVERY call, never relative to the cwd+ d="[ABSOLUTE PATH]/skill-observations/observation-log" # the pinned workspace path — re-derive in EVERY call, never relative to the cwd; run under bash, not shn=$(find "[ABSOLUTE PATH]/skill-observations/observation-log" -maxdepth 1 -name '*.md' | wc -l | tr -d ' ') # literal path: independent of $dparsed=$(find "$d" -maxdepth 1 -name '*.md' -exec awk 'FNR==1 {if (/^---[[:space:]]*$/) print FILENAME; nextfile}' {} + | wc -l | tr -d ' ')suspect=$(find "$d" -maxdepth 1 -name '*.md' -exec awk 'FNR==1 && /^---[[:space:]]*$/ {fm=1; next}fm && /^---[[:space:]]*$/ {fm=0; nextfile}fm && /^[a-z_]+: [^"\047[|>].*: / {print FILENAME; nextfile}' {} + | wc -l | tr -d ' ') # values with an unquoted ": " — invalid YAML- for f in $(find "$d" -maxdepth 1 -name '*.md' | sort); do+ find "$d" -maxdepth 1 -name '*.md' | LC_ALL=C sort | while IFS= read -r f; do # quote + IFS=: never word-split a path containing a spaceawk 'NR==1 && /^---[[:space:]]*$/ {fm=1; next}fm && /^---[[:space:]]*$/ {exit}fm' "$f"@@ -200,7 +213,20 @@ was handled without its reference loaded, log an observation.fi[ "$suspect" -gt 0 ] && echo "NOTE: $suspect of $n headers carry an unquoted ': ' in a value — quote those values (File format)"printf 'files: %s parsed: %s suspect: %s\n' "$n" "$parsed" "$suspect"+ printf '%s session-start scan: files=%s parsed=%s\n' "$(date +%F)" "$n" "$parsed" \+ >> "[ABSOLUTE PATH]/skill-observations/checkpoints.log" # the protocol's own trace```++ **The scan ends in a write, not only a print.** Loading this skill and+ executing this protocol are two acts, and only the load leaves an+ artefact in the transcript — which discharges the felt obligation, so a+ session that loaded and then ran nothing looks from outside exactly+ like one that did both. The appended `checkpoints.log` line is the+ protocol's own trace, for the same reason the checkpoint rule is a+ write: a step whose value lies in happening at a specific moment needs+ its own entry in the tool record. (Where the workspace prices every+ write — the exception under "How to Log" — fold this line into the+ session's first write instead.)3. **Review trigger.** Read `skill-observations/last-review-date.txt`. Thevalue carries the truth: a date = when the last review actually ran;`never` = no review has run yet. A missing file is abnormal (step 1@@ -381,6 +407,18 @@ tool call; piggy-backing the flush onto them makes the write a side effectof work you were doing anyway. (Why both checkpoints are writes rather thanquestions: `references/observation-log.md`.)+**A failed write to an external system is a flush trigger in its own+right** — a tool result carrying `permission stream closed`, `permission+denied`, or a harness interrupt. It is not a completion, but it has both+properties the flush needs: it is a literal string in the tool record+rather than a judgement about whether the moment qualifies, and it lands+at the point where a run has just discovered something worth reporting and+is therefore most likely to stop instead. Flush before doing anything else+with the failure, including deciding what to do about it. (Observed: an+unattended run completed every substantive step, took a permission error+on its first write to an external system, and ended without a report or a+logged observation.)+**Two gaps this pairing still leaves — both observed across full working daysin which nothing was logged at all.**@@ -433,21 +471,25 @@ resolved files into `archive/` — archival is a side effect of deriving theid, not a separate duty (see Archival on Write):```bash-d="[ABSOLUTE PATH]/skill-observations/observation-log" # the pinned workspace path, never relative to the cwd+d="[ABSOLUTE PATH]/skill-observations/observation-log" # the pinned workspace path, never relative to the cwd; it may contain a space, so keep it quoted; bash, not shtoday=$(date +%F) # archival rides inside this command (see below):-for f in $(find "$d" -maxdepth 1 -name '*.md'); do # stale resolved files move before the id is read- hdr=$(awk 'NR==1 && /^---[[:space:]]*$/ {fm=1; next}- fm && /^---[[:space:]]*$/ {exit} fm' "$f")- case $hdr in- *"status: actioned"*|*"status: declined"*|*"status: superseded"*) ;;- *) continue ;;- esac- r=$(printf '%s\n' "$hdr" | sed -n 's/^resolved:[[:space:]]*//p' | head -1)- case $r in [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) ;; *) continue ;; esac- [ "$r" != "$today" ] && \- [ "$(printf '%s\n%s\n' "$r" "$today" | sort | head -1)" = "$r" ] && \- mv "$f" "$d/archive/"-done+n_files=$(find "$d" -maxdepth 1 -name '*.md' | wc -l | tr -d ' ')+seen=$(find "$d" -maxdepth 1 -name '*.md' -print0 | { n=0 # -print0/-d '': never word-split a path containing a space — `read -d` is a bash extension, so this loop requires bash+ while IFS= read -r -d '' f; do # stale resolved files move before the id is read+ n=$(( n + 1 ))+ hdr=$(awk 'NR==1 && /^---[[:space:]]*$/ {fm=1; next}+ fm && /^---[[:space:]]*$/ {exit} fm' "$f")+ case $hdr in+ *"status: actioned"*|*"status: declined"*|*"status: superseded"*) ;;+ *) continue ;;+ esac+ r=$(printf '%s\n' "$hdr" | sed -n 's/^resolved:[[:space:]]*//p' | head -1)+ case $r in [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) ;; *) continue ;; esac+ [ "$r" != "$today" ] && \+ [ "$(printf '%s\n%s\n' "$r" "$today" | sort | head -1)" = "$r" ] && \+ mv "$f" "$d/archive/"+ done; printf %s "$n"; })+[ "$n_files" -gt 0 ] && [ "${seen:-0}" -eq 0 ] && { echo "ARCHIVAL SWEEP BROKEN — $n_files files present, 0 examined"; exit 1; }hi=$( { ls "$d" "$d/archive" 2>/dev/null | grep -oE '^[0-9]+'; cat "$d/archive/.id-floor" 2>/dev/null; } \| sed 's/^0*\([0-9]\)/\1/' | sort -n | tail -1); : "${hi:=0}"[ "$hi" -eq 0 ] && [ -n "$(find "$d" -maxdepth 1 -name '*.md')" ] && { echo "ID COMMAND BROKEN — log is non-empty but no ids extracted"; exit 1; }@@ -464,7 +506,12 @@ prefix containing an 8 or 9 errors out.The guard line distinguishes "the log says zero" from "I could not readthe log": a command that fails to empty rather than to error would-otherwise propose id 1 in a populated log. A new file never touches another entry's bytes, so it cannot truncate,+otherwise propose id 1 in a populated log. The sweep carries the same+guard in its own right — it counts the files it actually examined and+halts if that count is zero while `find` reports files present. An+archival loop that never enters its body moves nothing and exits+successfully, so without the count "nothing was due for archival" and+"the loop never ran" are the same output. A new file never touches another entry's bytes, so it cannot truncate,overwrite or renumber anyone else's work — provided it is a new file. Iftwo parallel sessions pick the same id and different slugs, two filesshare a number — harmless; the next review renumbers one and logs adiff --git a/references/environments.md b/references/environments.mdindex 115700b..7d8638a 100644--- a/references/environments.md+++ b/references/environments.md@@ -65,6 +65,24 @@ uninformed decisions past the review gate, and approval locks them in.Load skills before exploring, researching or drafting the plan: both,skill first.+**Select on the decision, not on the artefact.** Selection and loading are+separate steps, and the selection step fails in its own way: it runs+against what the user handed over — files to read, a link, a screenshot —+so every skill whose description names a *subject* is missed whenever the+request's surface form is an activity no skill claims. Before answering,+name the DECISION the user is making and match the installed descriptions+against that ("the deliverable is advice about X" → load the skill whose+description names X), even though the request arrived as a document to+review. The high-risk shape is an attachment plus an open question — "here+are two files, what do you think?" — which presents as a reading task and+hides its own domain; observed, it ran for four substantive turns of+domain advice with the domain skill unloaded, while the session-start+skills had loaded correctly. That is what makes this distinct from an+activation-config failure: the mechanism worked and still selected the+wrong set. The failure is silent by construction, because a skill that+never loads cannot announce that it was relevant, so the check belongs in+the checklist rather than in a disposition.+### The activation block```@@ -76,6 +94,11 @@ the protocol are separate steps; a session that loads the file and stopshas activated nothing. Any turn that will involve a tool call counts; donot classify the session as "too simple" from its opening message.+Select skills on the DECISION the request is about, not on the artefact it+arrived as. Name what the user is deciding, then match the installed skill+descriptions against that — a request handed over as a file to review+still needs the skill whose description names its subject.+After completing each task, check the observation records written thissession and report a one-line summary (ids and titles, or "none loggedand why"). This is the activation backstop: it forces a look at the log,@@ -135,7 +158,13 @@ right only for skills that exist in one project. A stable anchor canstill be plural — in Claude Code the identity is derived from thedirectory the session starts in, so per-subfolder habits shard the loginto several stable anchors that each look like the only one. Decide the-scope once, at install, and pin it.+scope once, at install, and pin it. **One plural case is legitimate and+is not a shard:** logs deliberately kept apart because their observation+bodies carry task context that does not travel, over skills that are+nonetheless installed globally and therefore shared. Read the multi-log+block in `weekly-review.md` before consolidating anything — it defines+that case and the aggregate review that serves it. A reader who stops at+this paragraph consolidates a set that was meant to stay separate.**Before creating a log, search for one.** Check the plausible anchorcandidates — the pinned path, the project identity root, the@@ -170,6 +199,20 @@ task boundary. If you adopt only one line of the block, adopt thepost-task check — in field use it turned an intermittently-activatinginstall into a stably-recording one.+A third belt sits inside the protocol itself: its scan appends a dated+line to `checkpoints.log` (SKILL.md, Session Start Protocol step 2), so+the protocol leaves its own trace and a session that skipped it is+detectable afterwards rather than only noticeable in the moment. That is+the missing half of the diagnosis above — the load produces a visible+artefact in the transcript and the protocol produces none, so having+loaded the skill feels like having done the thing the skill asks for.+Treat *loaded but not run* as a distinct failure cause, alongside the+skill being absent, truncated, or present and skipped: it is the likeliest+of the four, precisely because the load's visible success stands in for+the protocol's invisible omission, and the aggravating condition is the+same one that produces a skipped load — an opening message small enough+that a full startup protocol feels disproportionate to it.+**Anti-pattern:** don't chain activation through another skill — loadtask-observer and related skills independently from configuration; a brokenchain silences all observation activity.diff --git a/references/observation-log.md b/references/observation-log.mdindex eca757a..a882ec0 100644--- a/references/observation-log.md+++ b/references/observation-log.md@@ -136,12 +136,35 @@ expressible. The mechanism exists; the *check* does not — and a list fieldwith no rule to populate it collapses to a single value. Four parts, inincreasing cost:-**1. Declare the families —** `skill-observations/skill-families.md`. One-entry per family, with the members, and the load-bearing second column:+**1. Declare the families and the pattern groups —**+`skill-observations/skill-families.md`. The registry holds two kinds of+grouping, and conflating them is what makes it either block publication+or ship references nobody can use:++| Kind | Defined by | Members may cross-reference? | Shared rules live |+|---|---|---|---|+| **Family** | the same tool, or a core skill and its companions | yes — a user of one has reason to load the others | in the members (per the coherence model) |+| **Pattern group** | the same shape — one companion per tool, one dossier per subject — with no reason for a user of one to have another | **never** — a sibling paragraph naming the others is a defect, published or not | in cross-cutting principles |++Group skills by what a user of one would also need, not by what they+look alike. Propagation of insights and cross-referencing are different+relationships: a pattern group earns the sibling check at write time+(the "could this sentence survive removing the tool name?" test is+exactly what such a group is good for) and earns no cross-references at+all. A family earns both.++**A skill can belong to more than one grouping** — typically a per-tool+family and a core/companion family at once — and the registry records+each membership separately rather than forcing a single home. The+sibling check (part 2) runs against **every** family and every pattern+group the target belongs to, not just the first one it resolves to.++Each entry carries the members and the load-bearing second column:**what is shared versus what is legitimately member-specific.** Withoutthat column every observation looks like it might apply everywhere and the-check generates noise instead of signal. Record each family's *coherence-model* too, because it decides what "fixing drift" means:+check generates noise instead of signal. Record the *coherence model* for+each FAMILY too, because it decides what "fixing drift" means (a pattern+group has no coherence model — there is no shared text to keep in sync):| Coherence model | Meaning | Fixing drift means ||---|---|---|@@ -149,9 +172,10 @@ model* too, because it decides what "fixing drift" means:| `shared-core` | one skill holds the common material; the others load it as a companion | edit the core once, check the pointers |```markdown-## [family name]+## [group name]+**Kind:** family | pattern group**Members:** skill-a, skill-b, skill-c-**Coherence model:** synced-duplicates | shared-core+**Coherence model:** synced-duplicates | shared-core # families only**Shared:** [the material every member should carry]**Member-specific:** [what legitimately differs, and why]```@@ -160,9 +184,13 @@ Duplication is sometimes correct and absence is not always drift — that isexactly what the shared/member-specific split records.**2. Logging-time check** (SKILL.md, "How to Log"). Before writing an-observation, resolve the target against the registry. If it belongs to a-family, evaluate each sibling and either add it to `skill:` or state in the-body why it does not apply. **No registry yet, or the target is not in+observation, resolve the target against the registry — against every+family and every pattern group it appears in, since membership is+plural. For each sibling in each of them, either add it to `skill:` or+state in the body why it does not apply. Where the insight is shared+across a PATTERN group, the destination is usually a cross-cutting+principle rather than the same paragraph copied into each member.+**No registry yet, or the target is not init?** The check is still required: scan the installed skill names for ashared prefix, suffix or subject (`*-extras` companions, per-toolimplementations of one method, per-subject dossiers), do the evaluationdiff --git a/references/skill-authoring.md b/references/skill-authoring.mdindex 503d26b..0ad053a 100644--- a/references/skill-authoring.md+++ b/references/skill-authoring.md@@ -95,9 +95,16 @@ in three levels: frontmatter metadata is always in context, the SKILL.mdbody loads whenever the skill triggers, and bundled resources load onlywhen something reads them. The body is therefore a per-invocation tax andthe reference files are not, so content belongs in the body only if it-changes behaviour every time the skill fires. Any NEW or SUBSTANTIALLY-REVISED skill whose body would run past roughly 500 lines is split — this-is the target structure, not a suggestion to weigh up. Concretely:+changes behaviour every time the skill fires. **The split is the target+structure for every NEW or SUBSTANTIALLY REVISED skill, whatever its+size** — episodic material goes to `references/` from the first draft,+not once the body has grown too big to read. A structure rule that+switches on a line count gives one skill two shapes and a boundary every+reader and every tool has to re-derive; starting split costs nothing at+the small end. The ~500-line figure survives in one role only: as the+**retrofit trigger** for an existing, not-yet-split skill — a body past+roughly 500 lines is the point at which retrofitting stops being+optional. Concretely:- **SKILL.md keeps** the mental model, the small number of rules thatchange behaviour on every invocation, and a pointer list to the@@ -453,16 +460,21 @@ patterns before committing — a scan, not a reminder.presentation/upload tool exists (e.g. Claude Code CLI), present thestaged path and a change summary in chat instead; staging-only appliesin every environment — it's the review loop's safety property, not a- filesystem constraint. For any- skill with supporting files, zip the staged directory into a `.skill`- bundle and present the bundle, never the bare SKILL.md: a single-file+ filesystem constraint. For **every**+ skill, zip the staged directory into a `.skill`+ bundle and present the bundle, never the bare SKILL.md — one delivery+ format regardless of file count: a single-filedelivery convention applied to a multi-file skill truncates itsilently (the install succeeds, the skill loads, and the missingpieces only surface when a reference load or script call fails- mid-task). **Pre-delivery gate — three items, checked at the moment of- delivery, not just at drafting time:** (1) every `references/`,- `scripts/`, `assets/` path in the staged SKILL.md body has its file in- the staged set; (2) if the skill is multi-file, the delivery artefact+ mid-task), and a convention that switches on file count leaves that+ boundary to be re-derived every time. **Pre-delivery gate — three items, checked at the moment of+ delivery, not just at drafting time:** (1) every UNQUALIFIED+ `references/`, `scripts/`, `assets/` path in the staged SKILL.md body+ has its file in the staged set — a path qualified with an owning skill+ name (`<skill-name>/references/<file>`) is a cross-reference, exempt by+ construction, and that is the convention for citing another skill's+ file (weekly-review.md, Delivery); (2) the delivery artefactis the `.skill` bundle — bare file links fail this gate even when allfiles are staged; (3) frontmatter constraints — measure the description(the FOLDED value, not the raw YAML block) and fail the delivery above@@ -478,7 +490,7 @@ patterns before committing — a scan, not a reminder.RAW central-directory bytes, because CPython's `zipfile` normalises`0x5C` to `/` on read and reports a malformed archive as clean; Windows`Compress-Archive` produces exactly this defect for any skill with a- subdirectory. `scripts/validate-skill-bundle.py` implements all five as+ subdirectory. `scripts/validate-skill-bundle.py` implements all seven asassertions and packs a well-formed bundle on any platform; run it wherePython is available. Generally: any hard limit the consuming platformimposes belongs in this gate as a measurement compared to a bound in@@ -528,12 +540,55 @@ patterns before committing — a scan, not a reminder.→ use the skill-creator if available; internal skills with requirementsalready established in conversation → write directly, flaggingsubstantial changes for review.+8. **Before staging a rewrite, enumerate the surfaces outside the skill+ directory that restate its rules.** A rule's home is a location; its+ reach is every artefact that paraphrases it, and those live in+ directories the owning skill cannot see, so a grep across the skill+ folder — however thorough — reports clean. The surfaces that matter are+ the ones that execute independently of the skill: scheduled-task prompts+ above all, then activation fragments in CLAUDE.md or its equivalent,+ saved shortcuts, and handoff docs. Enumerate them (a scheduled-task+ listing returns a path per task, so this is one call plus a grep), then+ either update each in the same round or replace the copy with a stop+ condition per "Configuration vs process" above — including the clause+ that says the omission is deliberate, or a later editor helpfully+ restores the summary. The asymmetry is what makes the step+ non-negotiable: a stale copy never fails loudly. It runs, plausibly,+ doing the superseded thing, and the only witness is the user noticing an+ old behaviour reappear weeks after asking for it to stop. And drift is+ fast — it is the source's rate of change that predicts it, not the+ copy's age (observed: four days from an anti-drift rule being written to+ a live violation of it, in a skill whose rules were under active+ rewrite, found only because the prompt happened to be opened for an+ unrelated reason).## Verifying relocations and restructures-When content is relocated verbatim (splits into core + references, merges,-restructures), "nothing was lost" is checkable mechanically — but only with-a two-tier check:+Two modes, and picking the wrong one is why a good move looks broken.+**Verbatim relocation** — the content moves unchanged — is verified line+by line, with the two-tier check below. **Merge or extraction** — several+overlapping sources are reconciled into one destination, wording is+rewritten, tool or client names are generalised into capability language+on the way — is verified section by section, because every moved line+legitimately fails an exact match and the line-grep tier reports total+loss on a perfect merge.++For a merge or extraction, replace the line-grep tier with a **mandatory+source-section → destination coverage table, one per mover**: every+heading of every source is accounted for as moved / merged-into /+left-in-companion / dropped-with-reason, alongside the content only one+source carried, the generic content deliberately left behind, and the+substitutions made. Keep the word-count sanity check per file — it is+cheap and catches wholesale omission. And **the mover of a split section+writes both destinations**: whoever moves material out of a skill also+writes that skill's remainder for the same sections. Complementarity —+nothing in both places, nothing fallen between them — cannot be checked+afterwards as cheaply as it can be produced, and splitting the two halves+across two authors guarantees the seam nobody owns. The coverage table+is the artefact a merge is admitted on; a diff is not.++For a verbatim relocation, "nothing was lost" is checkable mechanically —+but only with a two-tier check:1. Enumerate every added/moved line via `diff` of the old base vs the newbase.@@ -665,6 +720,21 @@ because it is the only moment when the differences between all of them arebeing actively thought about by anyone. Skipping the comparison wastes theaudit and creates the divergence.+**When the extraction does happen, work brief-first.** Write the split+rule once, before any file is touched — the test that decides where a+sentence goes (*could this sentence survive having the platform's name+removed?* → core; otherwise → companion), the confidentiality rules, the+generalisation substitutions, and any global numbering rule — and hand+that one brief to every mover, rather than letting each rediscover the+rule from the material in front of them. Then give each destination file+one mover, and require that mover to produce **both** halves of every+section it splits (the core text and the companion's remainder) plus the+coverage table from "Verifying relocations and restructures". The+reconciliation notes, not the diffs, are the deliverable the maintainer+reviews. Two independent movers flagging the same ambiguity means the+brief is the defect: fix the brief and re-issue rather than adjudicating+the outputs.+## Retiring skills — harvest before you retireAn ending engagement is a harvest trigger, not only a cleanup trigger.diff --git a/references/starter-principles.md b/references/starter-principles.mdindex 1a59d35..0a4f3b9 100644--- a/references/starter-principles.md+++ b/references/starter-principles.md@@ -1,6 +1,6 @@# Starter Cross-Cutting Principles (optional seed)-Starter set version: 1+Starter set version: 2This file is NOT the adopter's principles file. It is an optional seed:a curated set of generic methodology principles, accumulated over a long@@ -303,3 +303,24 @@ supporting reason transfers its unreliability to the sound claim besideit. Corollary: before building an argument on figures from a document,establish who authored them — inherited or third-party numbers deviate inboth directions and change which of them are worth contesting at all.++### 26. A companion skill must declare its coverage boundary+**Applies to:** all skills that document a surface someone else owns — a+tool, an MCP server, an API, a platform, a product — and any skill loaded+as a companion to a base skill+**Requirement:** State near the top which parts of the documented surface+the skill covers and which it does not. A companion is loaded precisely+because the agent does not know the tool, so the file's silence about a+surface is read as the surface not existing rather than as the file being+partial — and the load itself suppresses the exploration that would settle+the difference. Name the uncovered areas explicitly, even as a bare list+with no detail behind it; a named gap is a question the agent knows to+ask, an unnamed one is not. Read in the other direction: an existing+companion that declares no boundary has UNKNOWN coverage, not complete+coverage, so verify against the product before concluding a feature is+absent. Marking individual tools or endpoints as exercised versus+unexercised (see "Documenting an external tool surface" in+`references/skill-authoring.md`) does not substitute for this: no marking+scheme can describe a surface the file never mentions, and a skill can be+accurate on every line it contains while accounting for roughly half of+what the tool does.diff --git a/references/weekly-review.md b/references/weekly-review.mdindex 2f122fd..ad031ff 100644--- a/references/weekly-review.md+++ b/references/weekly-review.md@@ -67,7 +67,13 @@ split across sessions, not across logs).An aggregate review is therefore an explicitly invoked run over a namedset of workspace roots — not something a per-workspace scheduled taskdiscovers or starts. Those keep their per-log behaviour, which is what-stops two runs from draining the same queues at once. Given the roots:+stops two runs from draining the same queues at once. **The named set is+given as ABSOLUTE paths**, once, at the top of the run: roots enumerated+from a project identity commonly begin with `-` (Claude Code encodes the+directory path that way), and a leading `-` in a relative argument is+read as an option by `ls`, `grep` and `find` — the scan then returns+zero files with no error, which is indistinguishable from a clean log.+Given the roots:- **Scope by what the logs observe, not by what they declare.** Logswhose workspaces observe the same installed skills are in scope. Do@@ -80,15 +86,28 @@ stops two runs from draining the same queues at once. Given the roots:so `#5` exists in each of them. Any cross-log reference — approvallist, `resolution: "by #N"`, Step 8 summary, manifest entry — carriesthe workspace key alongside the number.-- **Stage each affected skill ONCE, and publish the anchor everywhere.**- One workspace's `skill-updates/` is the anchor; append the manifest- entry there AND a pointer entry in every participating workspace's- `PENDING.md`. A manifest is read only from its own workspace and its- entry is removed on install, so an anchor named in one workspace alone- is invisible from the others and gone after the first install.+- **Stage each affected skill ONCE, and publish the anchor workspace+ everywhere.** One participant is the **anchor workspace**: its+ `skill-updates/` holds the staged copy, and it supplies+ `[workspace folder]` for the Step 5 seed — which then picks its+ **anchor directory** (`[today]/[skill-name]`, or a discriminated one+ under the same-day rule) exactly as in a single-log run. The two+ senses are separate axes and are always named in full: *anchor+ workspace* = which log's `skill-updates/` tree, *anchor directory* =+ which dated directory inside it. Append the manifest entry in the+ anchor workspace AND a pointer entry in every participating+ workspace's `PENDING.md`, **creating that manifest where it does not+ exist yet** — a participant that has never staged anything has no+ `PENDING.md`, and an appender that assumes the file is there writes+ nothing. A manifest is read only from its own workspace and its entry+ is removed on install, so an anchor named in one workspace alone is+ invisible from the others and gone after the first install.- **Bookkeeping stays local.** Each log's work queue, status edits,- archival and `last-review-date.txt` are read from and written back to- its own workspace. Integration and staging unify; bookkeeping does+ archival, `last-review-date.txt` and `activation-tiers.txt` are read+ from and written back to its OWN workspace — the activation record in+ particular is a statement about that workspace's config, so an+ aggregate run writes one per participant and never a single copy at+ the anchor workspace. Integration and staging unify; bookkeeping doesnot.The principle: when several append-only queues feed edits into shared@@ -147,11 +166,24 @@ application on this policy, it does not pre-approve the changes.default — safety comes from the staging-plus-review pattern (nothing islive until the user installs it). **Escalate without applying** when: (1)the observation proposes a NEW skill (naming/scope/type/licence need the-user); (2) it removes or substantially restructures existing content; (3)-it self-flags uncertainty ("not sure if…", "worth discussing…"); (4) two-observations conflict. A scheduled run should still apply every-non-escalated item — a review that applies nothing is just a report-generator.+user); (2) the AGENT is proposing a removal or a substantial restructure+of existing content; (3) it self-flags uncertainty ("not sure if…",+"worth discussing…"); (4) two observations conflict. A scheduled run+should still apply every non-escalated item — a review that applies+nothing is just a report generator.++Criterion (2) is about whose judgement is driving the change, not about+the size of the diff. Where the observation records the removal or+restructure as DECIDED by the user AND carries a complete specification+— it names what replaces what, in enough detail to apply without+inventing anything — apply it, provided the target skill is not+published open-source, and always flag it as the FIRST diff in the+summary for the user to read. Where the spec is partial ("something+like…", "the old rules should probably go"), criterion (3) applies and+it stays escalated. An escalation rule guards against the agent's own+judgement, not against change as such: escalating a decision the user+already made returns their answer to them as a question, buys no safety,+and costs a cycle in which the skill stays knowingly wrong.Escalate one DECISION per cluster, never the same decision twice — clusterthe OPEN entries before the escalation list is written (Step 3), and list@@ -205,7 +237,9 @@ hook where the harness has one — and if a tier that a previous reviewrecorded as present is missing, say so in the summary's first line andre-suggest the block; record the tiers found in`skill-observations/activation-tiers.txt` so the next review has a-baseline to compare against. Then archive observation files resolved in+baseline to compare against — in an aggregate run over several logs,+one such file per participating workspace, describing that workspace's+own config, never a single copy at the anchor workspace. Then archive observation files resolved in*previous* sessions (see Archival on Write in SKILL.md). Read only the frontmatter ofeach file in `observation-log/` — not the bodies — to build the work queue;load a body only when you actually action that observation in Step 5. This@@ -378,6 +412,27 @@ pointing at a decision that may be settled without it.Flag every skill that doesn't yet comply with each active cross-cuttingprinciple.+**Adding or materially editing a principle carries its starter-set+verdict in the same act.** Where a bundle ships a public,+provenance-stripped extract of the private principles file — this skill's+`references/starter-principles.md` — that extract is derived content, and+a one-off triage performed once at extraction time is a snapshot: the+extract starts drifting at the very next edit of the private file, and+nothing downstream would ever produce a verdict for the entries added+since. So the step that adds a principle, or changes an existing one+materially, classifies it in the same act: **`include verbatim`**,+**`include after scrub`** — naming exactly what to strip (provenance,+observation numbers, client or environment specifics) — or **`leave+out`** (personal strategy, or specific to one environment). Append the+verdict to the triage reference, keyed by principle number, so the+classification is per entry and dated by the edit that prompted it.+Then, for this skill, stage the starter-file change alongside the+principle change rather than as a follow-up: append the scrubbed entry,+bump the `Starter set version:` line at the top of the starter file+(every adopter's reconciliation offer is gated on that number, so an+unbumped version ships the new entry to nobody), and run the+confidentiality scan over the starter file in the pre-delivery gate.+Then run the **family drift audit**: for each family in`skill-observations/skill-families.md`, grep every member for each rulelisted as shared and surface the gaps. It is mechanical and takes minutes,@@ -412,6 +467,79 @@ the most. An empty duplicate search releases the draft only after apositive control: search for a term you know an existing issue contains,and if that returns nothing the search is broken, not clean.+**Published skills have more inputs than the log and more outputs than+one staged copy.** For any skill published to a public repository, run+these four passes before and while staging it; each produces something+the summary carries.++1. **Merge last cycle's release branch first.** If the previous review+ cut a `release/vX.Y.Z` branch and it has been installed locally for+ the week, this repo's first act is the merge decision — and it+ precedes the new staging, because everything staged this week is+ staged on top of the merged result. **A branch merges only when every+ change on it has either a week of natural exercise recorded or a+ synthetic check with a stated pass criterion run in this review.** The+ test week is the container; the checks are the evidence. A clean week+ is evidence about the changes the week's activity happened to touch+ and silence about the rest, so absence of complaints certifies+ nothing. The merge report lists each change with its evidence —+ exercised naturally (where), or check run (fixture and result) — and+ a change with neither does not merge; it stays on the branch for+ another cycle. The checks themselves come from the branch's test-plan+ observation, which is in this review's queue by procedure (below).+2. **Read the repo's open issues and pull requests.** They are review+ inputs alongside the observation log — the review is the only point+ at which including a contribution costs nothing extra, and a channel+ that is merely monitored is a backlog that collides with the next+ sync. List every open issue and PR and classify each: **include now**+ (doc-level fixes, bug fixes with a clear spec, changes consistent+ with the current rules), **test branch** (behavioural changes to+ snippets, procedures or activation, and anything that changes what an+ agent does at session start), or **decline, with the reason**. Apply+ the include-now set to the staged copy, and record in the staging+ manifest both the classification and, per include-now item, the+ reporter's **GitHub login and numeric user ID** — the publishing run+ needs both to write a trailer GitHub can resolve+ (`Co-authored-by: Name <[email protected]>`, or+ `Reported-by:` for a bare report). Credit written as prose in a+ commit body is credit the platform cannot see, and the ids are cheap+ to collect here and awkward to collect at commit time.+3. **Re-derive every numeric and duration claim in the README and user+ guide.** Prose counts are derived content with no timestamp: they were+ true when written and drift with every week of use and every merged+ contribution, and nothing else in the pipeline re-checks them.+ Enumerate the claims, recompute each from its source — observations+ logged = the highest id ever issued; skills observed = the installed+ skill count; contributors, issues and PRs = the repo's ALL-TIME+ counts, not the open ones; months or years in use = from the date of+ the earliest observation in the log (the oldest file in+ `observation-log/archive/`), not from the install date or the repo's+ first commit — and update them in the same staging. Carry the new+ values into the review summary so the maintainer sees what changed.+ Anything of the same class the maintainer alone would notice (a+ "recommended by" list, a supported-platform list) is checked in the+ same pass.+4. **Classify every change, and stage twice.** Each change going into+ this week's version — community item or observation — is+ **safe-to-main** or **needs-test**, by the same test as pass 2. That+ produces two artefacts, not one: the **main staging** (safe changes+ only) and the **release-branch staging** (safe plus needs-test),+ named `release/vX.Y.Z` for the version the branch will become, and it+ is the release-branch staging that is installed locally for the test+ week. Both are staged copies under `skill-updates/` with their own+ manifest entries; neither is pushed by the review.++**Standing rule — a branch is cut together with its test plan.** The+session that cuts a release/test branch classifies every change on it as+*exercised naturally by a week of use* or *unlikely to happen+naturally*, and for the second class writes a test plan — fixture,+procedure and pass criterion per change — as an observation whose+`skill:` list names the branch's skill. Filed that way, the plan reaches+the next scheduled review by procedure rather than by anyone+remembering, and the merge step above has the evidence it requires. A+test period tests what the period's activity happens to touch; for+everything else it is only a delay.+Choose the anchor first: if `[today]/[skill-name]` already exists, apply thesame-day rule under Delivery — integrate another writer's pending copy, or givea second round after an install a discriminated anchor — and put that path into@@ -442,18 +570,17 @@ live path *inside* the staged directory, once per skill. And keep `IFS=` onboth `read` loops — workspace paths routinely contain spaces, and without itthe loop mangles them.-**If the `diff` reports anything, do not edit and do not delete.** On a mount-that denies `unlink`, `rm -rf` and `rmdir` both fail on the unwanted paths, so-the obvious cleanup is unavailable and the step stalls. Rename them into a-holding folder instead — the mount permits rename — then re-run the diff:--```bash-mkdir -p "[workspace folder]/_to_delete/<date>-staging-artefacts"-mv "<unwanted path>" "[workspace folder]/_to_delete/<date>-staging-artefacts/<name>"-```--Requesting the delete permission for the workspace folder also works where-that tool exists, and is worth doing anyway before the prune in Delivery.+**If the `diff` reports anything, do not edit.** On a mount that denies+`unlink`, `rm -rf` and `rmdir` both fail on the unwanted paths, so the+cleanup needs the environment's delete grant: **request the delete grant+on the target directory (`allow_cowork_file_delete` or the equivalent),+then delete — never rename into a holding folder.** Then re-run the diff.+A holding folder converts one deletion into a second, deferred task the+user has to remember, and the queue grows silently with no consumer. In a+scheduled or autonomous run, request the grant the same way; if the+permission stream fails there, leave the files in place, name them in the+report as "pending deletion — grant needed", and still never rename them+into a holding folder.The sequence exists so the live path is never the target of an edit, thestaged copy provably starts from live, and a stale staged copy from an earlier@@ -593,6 +720,12 @@ applied with the outstanding skill named — never left implicit][drift audit: gaps found per family, and how each was resolved][N observations logged without a sibling check]+### Published skills+[per published skill: release branch merged / held, with each change on+it and its evidence (exercised naturally where, or check run and result);+community items included now, routed to the test branch, or declined+with the reason; README and user-guide counts re-derived, old → new]+### Parked[one line each: #id — title — unparks when: [condition]; plus any entrywhose condition has been met and was returned to the queue this review]@@ -635,15 +768,23 @@ review and install from there.Never write to the live skill directly, even where the skills directory iswritable — staging-only is a deliberate safety property of the review loop(nothing goes live without the user's sign-off), not a filesystem-constraint. For any skill with-supporting files, zip the staged directory into a `.skill` bundle and-present the bundle; a bare SKILL.md install silently truncates a-multi-file skill. Pre-delivery gate (run as the last step+constraint. **Every** staged skill is packed into a `.skill` bundle and+presented as that bundle — one delivery format for all of them,+regardless of size or file count. A format that switches on the shape of+the artefact creates two conventions for one thing and a boundary every+consumer has to re-derive; one format costs nothing on a single-file+skill and removes the whole "a bare SKILL.md silently truncates a+multi-file skill" failure class at the other end.+Pre-delivery gate (run as the last stepbefore presenting): (1) grep the staged SKILL.md body for `references/`,`scripts/`, `assets/` paths and fail the delivery if any referenced file-is missing from the staged set; (2) for multi-file skills, fail the-delivery if the artefact being presented is bare file links rather than-the `.skill` bundle; (3) measure each staged skill's frontmatter+is missing from the staged set — a backticked path counts as this skill's+own only when it is UNQUALIFIED, so a file belonging to another skill is+cited as `<skill-name>/references/<file>` and passes untouched; that+qualification is the convention, and re-wording a genuine cross-reference+until the backtick no longer starts with the prefix is disguising a+reference to satisfy a linter, not fixing a defect; (2) the artefact presented is the+bundle — bare file links fail this gate; (3) measure each staged skill's frontmatterdescription (the folded value, not the raw YAML block) and fail thedelivery above 1024 characters, with a soft warning above ~900 —measure every skill in the set, not just the one that failed; (4) `name`@@ -657,17 +798,31 @@ outside code: a literal regex backreference (`\1`) on its own line or inprose, merge-conflict markers, unresolved `{{slot}}` placeholders — thegate checks the form of a delivery, and this is the one content assertion,because a failed replacement once passed apply, gate and install as a-literal `\1`. `scripts/validate-skill-bundle.py`+literal `\1`. The unresolved-slot rule — and only that rule — is waived+for a file whose path contains `template` (case-insensitive) or whose+first line is the marker `<!-- template: slots intentional -->`: in a+reference file that IS a template for a delegate author, the slots are+the deliverable, not residue. Every other residue rule and every other+gate item still runs on such a file, so the exemption never becomes the+hand-zip that skips the checks nobody was questioning.+`scripts/validate-skill-bundle.py`asserts all seven and packs a well-formed bundle — run it where Python is-available. Sweep build artefacts (`__pycache__/`, `*.pyc`, `.DS_Store`,+available. Where the bundle ships a public extract of a private file+(this skill's `references/starter-principles.md`), run the+confidentiality scan over that extract here too: it is the one file in+the bundle whose content is copied from a private source, so the+authoring-time sweeps never see it. Sweep build artefacts (`__pycache__/`, `*.pyc`, `.DS_Store`,`.~lock.*`) before zipping and read the archive listing back after, forleaked artefacts and for path separators. When seeding stagedcopies from the read-only mount, `chmod -R u+w` the staged path first —the mount's read-only mode travels with the copy, for directories aswell as files. Do not edit skill files in place — nothing goes liveuntil the user installs it. **Keep-two rule:** for any skill, keep only-the two most recent staged copies under `skill-updates/`; move the-older ones to `_to_delete/`. The rule is scoped to staged skill copies,+the two most recent staged copies under `skill-updates/`; for the older+ones, **request the delete grant on the target directory, then delete —+never rename into a holding folder** (if the permission stream fails in+an autonomous run, leave them in place and name them in the report as+"pending deletion — grant needed"). The rule is scoped to staged skill copies,not to date directories: before pruning a directory, list what else is init — an assembly script, a verification script, working notes — and moveanything that is not a staged skill copy aside first, or leave the@@ -708,7 +863,13 @@ prevented seeding over it.)`[workspace folder]/skill-updates/PENDING.md`: the skill, the datedirectory, the producer (which session or scheduled run staged it), theobservation ids applied, and a per-change summary-(observation id → section touched → one-line rationale). The manifest is+(observation id → section touched → one-line rationale). The install+artefact is always the `.skill` bundle, so the entry never distinguishes+a single-file from a multi-file skill. For a published skill it also+carries the community-item classification from Step 5 (include now /+test branch / declined, with the reason) and, per included item, the+reporter's GitHub login and numeric id, so the publishing run's commit+can write the crediting trailer without going back to the API. The manifest iswhat the Session Start Protocol reads to announce "N staged updatesawaiting review", so staged work is never quietly forgotten; theper-change summary is what lets the user review a full-file diff@@ -719,8 +880,13 @@ it, or when the keep-two rule prunes the directory — never "at installtime", because no session observes the install; the session that readsthe manifest owns its cleanup.-The manifest carries provenance and install instructions, never follow-up-work. Anything a review recognises as "check next time" — a sibling to+The manifest carries three kinds of entry and no others: provenance,+install instructions, and — in an aggregate run over several logs — the+**cross-log pointer** naming the anchor workspace where a shared skill+was actually staged. The pointer is provenance for a staging that lives+elsewhere, so it belongs here; it is not follow-up work. Follow-up work+is what the manifest never carries. Anything a review recognises as+"check next time" — a sibling tomirror, an audit to run once the staging is installed — is logged as its ownobservation before the summary is written: created with `status: open`, as thefile-format rule requires of every new entry, and parked in the same turn —@@ -728,7 +894,12 @@ file-format rule requires of every new entry, and parked in the same turn —edit a review makes on any parked entry. That puts it in the queue the next reviewreads by procedure (Step 1 re-checks every parked condition; Step 8 listsevery parked entry), and it survives the reconciliation and the prune that remove-the manifest entry. A note in an artefact whose lifetime ends at install+the manifest entry. In an aggregate run, that parked follow-up is written+to the log of the workspace whose work it concerns — the one whose next+review will need it — and to the anchor workspace's log only when the+follow-up is about the shared staging itself; bookkeeping stays local,+and an id is qualified with its workspace key wherever it is referenced+from another log. A note in an artefact whose lifetime ends at installcannot carry a follow-up: nothing in the review reads manifest notes as aqueue, and the one place the review is guaranteed to delete is the oneplace it is tempting to write the leftover backlog. (Observed: two sessionsdiff --git a/scripts/validate-skill-bundle.py b/scripts/validate-skill-bundle.pyindex 7c310b2..a6cfc87 100644--- a/scripts/validate-skill-bundle.py+++ b/scripts/validate-skill-bundle.py@@ -36,13 +36,23 @@ BUILD_JUNK = {"__pycache__", ".DS_Store"}# replacement, an unresolved template slot or an unfinished merge. The gate# checks bundle FORM; this is the one CONTENT assertion, because a literal# backreference passed apply, gate and install once.+SLOT_WHY = "unresolved template slot"RESIDUE_RES = [(re.compile(r"(?m)^\\[0-9]\s*$"), "literal regex backreference on its own line"),(re.compile(r"(?<![\w`])\\[1-9](?![\w])"), "literal regex backreference in prose"),(re.compile(r"(?m)^(<<<<<<<|=======|>>>>>>>)( |$)"), "merge conflict marker"),- (re.compile(r"\{\{[A-Za-z_][A-Za-z0-9_ .-]*\}\}"), "unresolved template slot"),+ (re.compile(r"\{\{[A-Za-z_][A-Za-z0-9_ .-]*\}\}"), SLOT_WHY),(re.compile(r"\b(TODO|FIXME|XXX)\b: ?(fill|replace|write)", re.I), "placeholder note left in"),]+# A file that IS a template carries its slots as the deliverable, not as+# residue: exempt it from the SLOT rule only — every other residue rule and+# every other gate check still runs on it, so the exemption never becomes the+# hand-zip that also skips the checks nobody questioned.+TEMPLATE_MARKER = "<!-- template: slots intentional -->"+++def slots_are_intentional(path, body):+ return "template" in str(path).lower() or body.lstrip().startswith(TEMPLATE_MARKER)SECOND_FRONTMATTER_RE = re.compile(r"^---\n.*?\n---\n\s*(---\n|name:|description:)", re.S)@@ -96,10 +106,22 @@ def check_dir(skill_dir, fails):fails.append(f"description {len(desc)} chars > cap {MAX_DESCRIPTION_CHARS}")elif len(desc) > 900:print(f"warn: description {len(desc)} chars (cap {MAX_DESCRIPTION_CHARS}) — near the boundary")- # every cited bundled path exists (backticked, real extension — globs in prose are skipped)+ # Every cited bundled path exists (backticked, real extension — globs in+ # prose are skipped). Ownership is inferred from the shape of the span, so+ # the convention has to make the two cases distinguishable: PATH_RE requires+ # the reserved prefix IMMEDIATELY after the backtick, which means a path+ # qualified with its owning skill's name — `<skill-name>/references/x.md` —+ # does not match and is exempt by construction. That qualified form is how a+ # skill cites a file belonging to a different skill; re-wording a legitimate+ # cross-reference so the backtick no longer starts with the prefix is not.+ # The failure message names the convention, because a false FAIL here is+ # otherwise indistinguishable from a genuinely missing file.for rel in sorted(set(PATH_RE.findall(text))):if not (skill_dir / rel).is_file():- fails.append(f"cited path missing from staged set: {rel}")+ fails.append(+ f"cited path missing from staged set: {rel} "+ f"— if this file belongs to another skill, cite it as "+ f"`<skill-name>/{rel}`, which this check exempts")# exactly one frontmatter block: a second `---` block (or stray# name:/description: lines) directly after the first is a duplicated# header that every field check passes by construction@@ -115,7 +137,11 @@ def check_dir(skill_dir, fails):# fenced blocks and inline spans, keeping line numbers intactprose = re.sub(r"(?ms)^```.*?^```[ \t]*$", lambda m: re.sub(r"[^\n]", " ", m.group(0)), body)prose = re.sub(r"`[^`\n]*`", lambda m: " " * len(m.group(0)), prose)+ rel = p.relative_to(skill_dir)+ exempt_slots = slots_are_intentional(rel, body)for rx, why in RESIDUE_RES:+ if why == SLOT_WHY and exempt_slots:+ continuem = rx.search(prose)if m:line = body.count("\n", 0, m.start()) + 1