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
Fold in the review rounds' changes that need no test week
Eoghan Henn4de8ec5be244
diff --git a/SKILL.md b/SKILL.mdindex e74ac2c..082dc37 100644--- a/SKILL.md+++ b/SKILL.md@@ -262,7 +262,7 @@ for one skill rarely share a name.**Check for a restatement before writing.** Before creating the file, listthe open observations that name the same target skill (the scan at sessionstart already holds their titles; otherwise `find observation-log -name-'*.md' -exec grep -l "skill:.*<skill>" {} +`) and read those titles. If the+'*.md' -exec grep -l "skill:.*<bare-name>" {} +`) and read those titles. If thefinding is the same one restated — the same rule, the same failure shape, adifferent example — extend the existing entry instead: append the newinstance to its body, add the session to `session_context`, widen `title:`@@ -271,8 +271,8 @@ roughly forty of ninety-one open entries were one finding restated), and anear-duplicate costs a capture every session and a triage every review.**Validate the target at write time.** `skill:` names a skill that exists-now and performs the operation the Issue describes, written as the skill-listing shows it (a plugin skill as `plugin:name`, never bare). If the+now and performs the operation the Issue describes, written as its bare+name (`plugin:name` only where two skills share it). If theright home is not a skill — an instructions file, a memory note, theregister a routine reads — put that path in `target_file:`, not thenearest skill; a skill not yet built goes in `proposes_skill:`.@@ -439,7 +439,7 @@ id: 0title: "Short descriptive title"status: open # open | actioned | declined | superseded | parkedtype: open-source # open-source | internal-skill: [skill-a, "plugin:skill-b"] # existing skills this improves —+skill: [skill-a, skill-b] # existing skills this improves —# always a list, first entry primary, may be# empty: []; quote an entry holding a colonproposes_skill: [] # new skills this argues for, by working@@ -459,7 +459,7 @@ session_context: "what task was being worked on"parked_until: # MANDATORY when status is parked, empty otherwise:# one line naming the condition that unparks itresolved: # date resolved; leave empty while OPEN-resolution: # what was done — set only when actioned/declined+resolution: # what was done — set only when actioned/declined/supersededreference: # optional — path to saved session-local evidencecommands_verified: # MANDATORY when the body quotes a command — each# `run` with its result, or `NOT RUN` with why; else nonediff --git a/references/environments.md b/references/environments.mdindex 1e5b64c..2867592 100644--- a/references/environments.md+++ b/references/environments.md@@ -155,6 +155,9 @@ Loading a skill is not complete until you have queried the observationlog for OPEN observations naming it and read their bodies:find "[ABSOLUTE PATH]/skill-observations/observation-log" -maxdepth 1 \-name '*.md' -exec grep -l "skill:.*<skill-name>" {} ++(<skill-name> is the bare name: drop a plugin: prefix, up to the last+colon. A qualified pattern misses every entry filed under the bare name+and reports a clean zero; the bare one matches both spellings.)(Use find, not a bare *.md glob. Under zsh an unmatched glob is an error,so on an empty log the command never runs and the enclosing block aborts —and 2>/dev/null does not help, because the redirection belongs to a@@ -177,6 +180,11 @@ false record. Before writing to any file a skill reads at run time (astate file), load that skill: a state file that describes itself is not asubstitute for the skill that owns it.+Where scripts run, the lookup and its checkpoint line are one command:+ bash "<skill directory>/scripts/skill-load.sh" "[ABSOLUTE PATH]" <skill-name>+The Skill invocation and that call are ONE batch — emit them together,+one call per skill loaded, never the call in a later batch.+The task-observer workspace for this project is:[ABSOLUTE PATH]Every path the skill uses derives from that root and nothing else:@@ -213,9 +221,10 @@ compaction, when the skill body is out of context.`<skill directory>` is the installed skill's own directory (the oneholding `SKILL.md`), substituted at install exactly like-`[ABSOLUTE PATH]`; where the harness cannot run a script, drop the-paragraph and keep the rest — the inline id snippet in SKILL.md is then-the write path.+`[ABSOLUTE PATH]`; where the harness cannot run a script, drop the two+script paragraphs and keep the rest — the inline id snippet in SKILL.md is+then the write path, and the `find … grep` above is the lookup, with its+checkpoint line written by hand in the same batch.### Anchoring the workspace@@ -701,6 +710,19 @@ or intermittently, so the first batch carries the probe alone and theskills load a batch later. The review's activation regression pass checksfor it (`weekly-review.md`, Step 1).+**A deferred probe tool moves the probe to batch 2.** In a cloud session+bridged to the user's computer, the device tools may still be connecting+at turn start and arrive deferred (name only, schema not loaded), so the+probe cannot ride in batch 1. Batch 1 then carries the deferred-tool load+together with the session-start skill loads; batch 2 carries the probe,+the session-start scan and one `skill-load.sh` call per skill loaded in+batch 1 — the one recorded exception to the lookup riding in its load's+batch, because the script runs through the same deferred tool. Record the split in the start-up lines ("probe in batch 2: device+tool deferred"), so a review reading the transcript sees an environmental+order, not a skipped rule. The failure shape: a rule that names batch 1's+content cannot be met when one of its tools does not exist yet, and an+unrecorded workaround reads the same as a violation.+### Install-layout hazards — three ways a skill silently stops existingEach of these leaves no error. The skill simply stops being offered, or an@@ -713,7 +735,7 @@ directory and looks for `<entry>/SKILL.md`. There is no recursive lookup. Ona library of any size the natural organising instinct is to group skills intocategory folders — `skills/seo/`, `skills/clients/`, `skills/writing/` — anddoing so makes **every skill inside them cease to exist**: no error, no-warning, no change in behaviour except that the skills stop being offered.+notice, no change in behaviour except that the skills stop being offered.There is nothing to debug, because "not found" has no error to report. Thelayout is not merely the happy path; it is the rule, and it does not travelwith the maintainer who reorganises six months later. Keep every skill@@ -965,7 +987,7 @@ files.with a BOM (`Set-Content -Encoding UTF8`, `Out-File -Encoding utf8`).Every header reader tests line 1 for `---`, so an entry written that waydrops out of the session-start scan — `parsed` one below `files`, with no-warning while other headers parse — and the archival sweep never moves+notice while other headers parse — and the archival sweep never movesit. Write entries with the editing tool or the helper script; inPowerShell 7, `-Encoding utf8NoBOM`.@@ -1254,8 +1276,8 @@ This skill consists of `SKILL.md`, the reference files it lists(`weekly-review.md`, `skill-authoring.md`, `environments.md`,`observation-log.md`, `signals.md`, `migration.md`,`starter-principles.md`) and `scripts/migrate-log.py`,-`scripts/new-observation.sh`, `scripts/session-start-scan.sh` and-`scripts/validate-skill-bundle.py`. If a referenced+`scripts/new-observation.sh`, `scripts/session-start-scan.sh`,+`scripts/skill-load.sh` and `scripts/validate-skill-bundle.py`. If a referencedfile is missing, the install isincomplete: proceed using the rules in `SKILL.md`, tell the user whichfiles are missing, and point them to the full bundle at the canonicaldiff --git a/references/observation-log.md b/references/observation-log.mdindex e2f69d9..dc630a5 100644--- a/references/observation-log.md+++ b/references/observation-log.md@@ -174,14 +174,14 @@ promise about the rest.| `parked` (status value) | Decided, but blocked on an external precondition: the entry is sound and no longer awaiting a judgement, so reviews drop it from the work queue and never re-escalate it. It is not resolved, so it does not archive — see Archival below. It stays in `observation-log/` until its `parked_until:` condition is met (set it back to `open`) or it is genuinely resolved. Recording a park as free text while leaving `status: open` does not work: nothing classifies on prose, so the entry stays in the queue and is re-raised at every review. || `parked_until` | **Mandatory whenever status is `parked`**, empty otherwise. One line naming the condition that unparks the entry ("the X scheduled task is re-enabled"), phrased so a later review can answer yes or no without reopening the original decision. || `type` | `open-source` or `internal` (see Taxonomy in the core skill). |-| `skill` | **Always a list**, even with one entry, so no consumer ever branches on string-vs-list. First entry is primary. May be empty. A plugin-scoped name is quoted: `["plugin:skill", other-skill]` (below). Write each name as the skill listing shows it — `plugin:skill` for a plugin skill, never the bare `skill`: the review buckets on this string, and one skill in two spellings is two buckets. |+| `skill` | **Always a list**, even with one entry, so no consumer ever branches on string-vs-list. First entry is primary. May be empty. Write each name in its bare form — the part after the last colon of the listed name — and qualify it as `plugin:skill` only where two installed skills share that bare name; a qualified entry is quoted: `["plugin:skill", other-skill]` (below). Bare is the canonical form because it is what writers produce in practice (0 of 40 entries were qualified when the two rules were compared) and one skill in two spellings is two review buckets. Every lookup BY skill name — a grep with a skill-name slot, `scripts/skill-load.sh` — reduces a `plugin:name` to the part after the last colon before matching: the bare pattern matches both spellings, while a qualified one misses every entry filed under the bare name and returns a clean zero. || `proposes_skill` | List of new-skill candidates by working name. Independent of `skill`; either may be empty, both may be filled. || `target_file` | List of paths, for observations whose right home is not a skill: an instructions file, a memory note, an agent brief, the register a routine reads. Name the file the fix will actually be written to, so a review can go there instead of remapping the entry onto the nearest skill. Measured on a first review of 27 legacy entries: 15 named a non-skill in `skill:` ("browser verification protocol", "documentation hygiene") and every one had to be resolved to a path by hand before the review could start. || `siblings_checked` | **Mandatory, never blank.** Records that the sibling check happened and what it concluded: the family name, the members evaluated, and the verdict per member (propagated / excluded). Every **exclusion** carries its ground — the file and section (or line) read in that sibling showing it does not apply — or the literal token `assumed`; inclusions need no ground, because including a sibling is the safe error. An `assumed` exclusion is a review item, not a settled verdict. `none` only where the target belongs to no family. Missing or empty = logged without a sibling check, and reviews count it as such. || `area` | The part of the skill or workflow concerned. || `date` | Date logged, `YYYY-MM-DD`. || `session_context` | What was being worked on. |-| `resolved` | Resolution date; set only when status is `actioned` or `declined`. Archival is gated on it. |+| `resolved` | Resolution date; set only when status is `actioned`, `declined` or `superseded`. Archival is gated on it. || `resolution` | What was done, or why declined. When the fix is a prescription (a rule, a check, a form to use), an `actioned` resolution names where it now lives — a file and section, a staged skill copy, or a registered backlog entry. If no such place can be named, the prescription has been described, not applied: leave the entry `open`, or resolve the part that landed and carry the rest in a carrier observation (below). A review's own resolution already names the staged copy (`weekly-review.md`, Step 6); this is the rule for a resolution set outside a review. || `reference` | Optional path to saved session-local evidence. || `commands_verified` | One clause per executable command the body quotes: `run`, with what it returned, or `NOT RUN` with why; the literal `none` where the body quotes no command. Blank on a body that quotes a command means the command was never run. See "Commands inside an observation" below. |@@ -900,7 +900,7 @@ root="[PROJECTS ROOT]" # absolute path of the directory holding the user's replist=$(for d in "$root"/*/.claude/skills/*/ "$root"/*/*/.claude/skills/*/; do [ -f "$d/SKILL.md" ] && echo "${d%/}"; done)n=$(printf '%s\n' "$list" | grep -c .); p=$(for d in "$root"/*/ "$root"/*/*/; do [ -d "$d" ] && echo; done | wc -l | tr -d ' ')echo "project skills: $n (in $p directories under $root, two levels deep)"-printf '%s\n' "$list" | grep "/<skill-name>$" # by name+printf '%s\n' "$list" | grep "/<skill-name>$" # by name: the bare name, any plugin: prefix droppedprintf '%s\n' "$list" | while IFS= read -r d; do if [ -n "$d" ]; then grep -Il -i -- "<term from the body>" "$d/SKILL.md" || :; fi; done # by problem; a non-match is not an error```diff --git a/references/skill-authoring.md b/references/skill-authoring.mdindex 7d81a6c..829d6ac 100644--- a/references/skill-authoring.md+++ b/references/skill-authoring.md@@ -13,6 +13,7 @@ Load this before creating any skill or making substantial changes to one.- Licensing- Versioning releases- Author Attribution Template+- The description has more than one reader- Confidentiality layers- Timelessness — shared skills must not capture current state- Editing skills — always start from the live file@@ -96,7 +97,7 @@ enumerate and read the set whenever enumeration is cheap.**A list of sources is an embedded command too.** The rule above is easy toread as being about shell snippets, because those are what "command" lookslike. It is not: it governs anything the skill instructs a future session to-*use* without checking — and a URL, an API endpoint, a database name, a file+*use* unchecked — and a URL, an API endpoint, a database name, a filepath or a tool invocation is exactly that. A skill whose core is "consultthese sources" ships its sources the way another ships a command.@@ -231,21 +232,26 @@ file serves one episode, or a set of episodes that reliably co-occur.Splitting is indicated when the count of distinct load triggers into onefile grows, whatever its size — each trigger pays for every otherepisode's content — and a long single-episode file is correctly shaped-and must not be split to satisfy a size rule. Measured once on this-skill's own bundle (lines / distinct load triggers named in the core):+and must not be split to satisfy a size rule. One measurement of this+skill's own bundle (lines / distinct section-named load triggers),+copied from the validator's `reference shape` line — refresh it from+that line, never by hand. The validator counts pointers that name a+section, so a file the core cites only by filename reads 0:| file | lines | triggers ||---|---:|---:|-| `weekly-review.md` | ~1,100 | 1 |-| `skill-authoring.md` | ~950 | ~1 |-| `observation-log.md` | ~930 | **14** |-| `environments.md` | ~720 | 2 |-| `signals.md` | ~170 | 3 |--A line ceiling would have flagged the largest file first — the one that-needs no change, since a review loads it whole as a unit — and said-nothing about the mid-sized file that fourteen separate moments in a-session each pull in. So `scripts/validate-skill-bundle.py` prints the+| `weekly-review.md` | 2,089 | 1 |+| `observation-log.md` | 1,718 | **18** |+| `environments.md` | 1,701 | 6 |+| `skill-authoring.md` | 1,411 | 0 |+| `starter-principles.md` | 480 | 0 |+| `signals.md` | 228 | 4 |+| `migration.md` | 226 | 0 |++A line ceiling flags the largest file first — the one that needs no+change, since a review loads it whole as a unit — and cannot tell it+from the file that eighteen separate moments in a session each pull+in. So `scripts/validate-skill-bundle.py` prints theper-file trigger count on every run, deliberately **not gated**: onesnapshot cannot site a threshold, and this one already overturned therule that was about to be written; the next review argues from a trend.@@ -366,7 +372,7 @@ requirement is that there is one.a client-agnostic skill shared privately with one client is NOT open sourceand NOT internal. Keep the author metadata and footer; replace the licencewith a short usage notice (e.g., "shared privately for internal use; please-don't redistribute without checking with the author"); no LICENSE file+ask the author before redistributing"); no LICENSE fileneeded. All confidentiality sweeps still apply — other-client informationmust not leak even when the recipient is a known client. Do not treat "notinternal" as "therefore open source": distribution channel determines the@@ -545,6 +551,38 @@ activation block, a hook entry, a handoff document; the config casecarries its own read-back in `environments.md` ("A delegated setup stepis not done until you have observed it").+## The description has more than one reader++A published skill's `description` is read by three systems and written for+one. It is the runtime trigger an agent matches to decide whether to load+the skill. It is the search field harvested skill directories index, often+ranked by nothing better than a substring match. And through those+directory pages it is part of the text AI answers ground on when someone+asks whether a tool like this exists. A trigger wants precision about when+to load; a directory search wants the words the audience types. The two+pull apart, and the trade-off resolves differently per skill, so it is+stated here, not settled.++The deciding fact is whether loading still depends on the description. A+skill that ships its own activation layer — a CLAUDE.md line, a+session-start hook, an explicit invocation convention — has decoupled+loading from description matching, and its description may carry audience+vocabulary. A skill that relies on description matching alone has not:+loosening its description buys discovery at the cost of false loads, each+one a full core read in a session that did not need it.++Two guards where the description is free to change. Every added term must+be one the author would defend as an accurate description of what the+skill does — the test is accuracy, not search volume, and a stuffed+description is read by the very maintainers a project pitches to; every+added word also spends the character budget the delivery gate measures.+And directories hold stale copies of the frontmatter, refreshed on their+own schedule, so a change is measurable only after weeks: record the+before state (terms searched, result positions) when the change ships, and+compare then. The failure shape: a field named for one consumer acquires+others once the artefact is published, and nothing in the authoring+workflow reads it from their side.+## Confidentiality layersThe open-source/internal boundary is a confidentiality boundary; enforce it@@ -646,7 +684,9 @@ in layers so any one catches what others miss:justification is stated as a present-tense failure shape ("the failureshape: …"), never as the case it came from: no "observed once", no "inthe case that produced this", no client complaint, no count from one- project. Examples come from at least two unrelated verticals or from a+ project. Exempt: counts about the skill's own log and process+ (observations, reviews, skills, releases) — they trace to no engagement+ and are the evidence a rule exists for. Examples come from at least two unrelated verticals or from aneutral stock vertical, never from the vertical of the session thatproduced the rule. The failure shape this layer closes: a skill updatewritten from an internal log carries the log's engagement narrative@@ -706,13 +746,13 @@ eight sites as corrected had missed three the least specific grep found.And a check that has passed every run is evidence about the check, notabout the artefact — the instrument guard (`observation-log.md`, "Everyinstrument gets the same guard") applies to green results exactly as to-empty ones. **One question is open and is the maintainer's, not the-scanning session's:** whether a claim-status form ("verified on <date>")-is exempt, on the argument that it is what stops a claim going stale-silently and that "at last check" makes a same-week verification-indistinguishable from a months-old one. Until it is decided, the rule-stands as written; if an exemption is granted, it is encoded as a scan-exclusion in the script, never as prose the next scan re-interprets.+empty ones. **One paired form is exempt (maintainer decision):** a+measured fact may carry "Last verified YYYY-MM-DD · Re-test:+`<one command>`" — the date plus a backticked re-test command, together, because+for a fact that drifts the age is the useful part and the command keeps it+from being a bare claim. Every other dated first-party form stays forbidden,+including the date without its command; a publishing scan encodes the+exemption as an exclusion in its script, never as prose.**The internal-document exemption assumes a maintenance loop that is onlyprose.** The taxonomy sanctions internal skills that describe one@@ -742,7 +782,7 @@ re-check exists, do not record the value — record how to obtain it.local-filesystem environments the same files are ordinary writablefiles and nothing stops the write — the discipline is the only thingpreventing the overwrite. Assume you are in the unprotected case unless- you have seen an EROFS yourself. Do not edit skill files in place, in+ you have seen an EROFS yourself. Do not edit a skill's files in place, inany environment — staging-only is what keeps the autonomous reviewsafe, and the way to make it hold where no guard exists is to beginevery edit with the copy (`mkdir -p` the staging dir, `cp` the live@@ -1319,7 +1359,8 @@ already sunk, and the loss is invisible because nothing errors.## Principle PropagationWhen an observation's Principle applies to skills in general, log it with-`Skill: All skills` and surface it; if the user approves, add it to+`skill: []` and `target_file: [skill-observations/cross-cutting-principles.md]`+and surface it; if the user approves, add it to`[workspace folder]/skill-observations/cross-cutting-principles.md`. Thatfile is a mandatory checklist during any skill creation or regeneration.The user chooses propagation timing: immediate (update all skills now — fordiff --git a/references/starter-principles.md b/references/starter-principles.mdindex 7ccad63..532c3e6 100644--- a/references/starter-principles.md+++ b/references/starter-principles.md@@ -153,7 +153,7 @@ reference file and point to it.**Requirement:** Use subagents for speed, but never let them guess at datavalues. Safe delegations: validation, formatting checks, cross-referencechecks — anything where every required input can be passed in the brief.-Unsafe without safeguards: anything requiring live data. For data-bearing+Unsafe unless guarded: anything requiring live data. For data-bearingtasks, the parent gathers the raw data first and passes it complete; asubagent lacking a value writes a `[VERIFY: value not confirmed]`placeholder rather than a plausible invention. After the return, thediff --git a/references/weekly-review.md b/references/weekly-review.mdindex 80a7870..92b4ed6 100644--- a/references/weekly-review.md+++ b/references/weekly-review.md@@ -387,6 +387,36 @@ review, and reads the same as one written from the prompt's intentrather than its text. Run the same read over every other scheduledprompt that invokes a skill.+A third read belongs to the same pass: **did each skill load carry its+lookup in the same batch?** Where session transcripts are available, match+the `loaded <skill>` lines in `checkpoints.log` (written by+`scripts/skill-load.sh`) against the Skill invocations. Two mismatches are+detectable failures, each a Log integrity finding: a `loaded` line with no+Skill invocation in the same batch, and an invocation with no `loaded`+line from its batch. Without transcripts, compare each session's `loaded`+lines against the skills that session reports loading, and flag a skill+with no line. A batch split recorded in the start-up lines as a deferred+probe tool (`references/environments.md`, "A deferred probe tool moves the+probe to batch 2") is not a finding. The failure shape: the rule is read+only after the batch that should carry the lookup is committed, so a late+lookup looks compliant from every later batch, and the record is the one+place the mismatch shows.++**Drain the observation inbox before the work queue is built.** Where this+run can read the user-scoped store that sessions without the log park+observations in, read its inbox file. For each entry, one at a time: run the+normal write path — restatement check, sibling check, id derivation+through the helper — and create the observation file; delete that entry+from the store only after its file exists on disk. An interrupted run then+loses nothing: every entry is still in the inbox or already a file, and+the restatement check catches one whose file was written just before the+interruption. Never delete the inbox file itself — deleting a memory file+needs the user's explicit request — leave it empty. Where the store is not+readable from this run, say so under Log integrity ("inbox not read:+<reason>"): the log is then not known to be complete. The failure shape: a+capture fallback the processing step never drains is a second log nobody+reviews.+Then archive observation files resolved in*previous* sessions — with the sweep as shipped (the sweep block of the idsnippet, run on its own; see Archival on Write in SKILL.md), never an@@ -634,6 +664,21 @@ diff through by eye is the habit that would hide it. The validator's packstep emits the quoted `name:`, so most installs come back byte-identical andthe normalisation is the backstop.+**A staged state file is reconciled by its recorded hash, not by a diff.**+For each file under `skill-updates/<date>/_target-files/` (Delivery, "State+files are staged as a patch"), re-hash the live file and compare it with+the byte size and sha256 the manifest entry recorded at staging. Hash+unchanged → the instruction may say "apply the patch — copy is safe", since+the patch applies to exactly the file it was made from. Hash changed → the+gate reports "staged patch, live file has moved — apply the N changed+lines, do not copy", with N counted from the patch, and+rewrites the entry's instruction to say so. Every added line of the patch+already present in live, and every removed line already gone → installed;+remove the entry. An install instruction is re-derived each time it is+repeated, never carried forward verbatim: nothing in a ledger expires on+its own, so a line that was correct at staging turns destructive without+changing a word once the live file moves on.+**(b) against (c) is decided per differing hunk, never per file.**`diff -rq` settles only (a). For every line present only in the stagedcopy, ask whether live *supersedes* it — carries a line that contains@@ -757,13 +802,18 @@ it from the frontmatter: every entry in an observation's `skill:` list putsit in that skill's bucket (the first entry is primary), every entry in`proposes_skill:` puts it under a new-skill candidate of that name, andevery entry in `target_file:` puts it under that file — a bucket the review-applies to like a skill (staged, never edited in place), instead of-remapping the entry onto the nearest skill. An observation may appear in+applies to by the file's owner (Delivery, "Non-skill files are split by+owner": written directly when the review owns it, staged as a patch when+another process does), instead of remapping the entry onto the nearest+skill. An observation may appear inmore than one. Key each bucket on the skill's listed name, not the rawstring: a bare name that matches exactly one installed `plugin:name` joinsthat bucket; a bare name matching several, or a descriptive form, isresolved from the body, never by guess; and every normalisation is listed-under Log integrity in the Step 8 summary. One skill written two ways is+under Log integrity in the Step 8 summary. Report there too the count of+entries whose `skill:` holds a plugin-qualified name (`plugin:name`) and+the count in bare form: a log carrying both spellings is the one in which+a lookup given either spelling silently misses the other. One skill written two ways isotherwise two smaller clusters, and the family check misses that bothentries target the same member. Then, before anything is presented:@@ -774,8 +824,8 @@ entries target the same member. Then, before anything is presented:performs the operation the Issue describes. If it does not, re-route —to the skill that does, or to the non-skill file that does (aninstructions file, an agent definition, a scheduled prompt), which- becomes a `target_file:` bucket whose output is a staged proposal for- that file — and note the move in the body ("routed from X to Y: X never+ becomes a `target_file:` bucket whose output is a patch for that file,+ routed by its owner (Delivery) — and note the move in the body ("routed from X to Y: X neverperforms the append") so the resolution carries it. A fix installedwhere it cannot fire closes the entry and leaves the defect standing.@@ -908,8 +958,10 @@ Both writes in this paragraph are the maintainer's: where Step 2 putsthis skill in (b), the triage reference is the maintainer's own file andthe starter file is a bundle file no local edit survives, so the verdictonly decides the offer in the next paragraph. Where the user maintains-this skill, stage the starter-file change alongside the principle change-rather than as a follow-up: append the scrubbed entry,+this skill, the principle and its verdict go straight into the workspace+files the review owns (Delivery, "Non-skill files are split by owner"),+while the starter file is skill content: stage its change in this skill's+bundle in the same round, not 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 anunbumped version ships the new entry to nobody), and run the@@ -1089,7 +1141,7 @@ shape is a hold that tests "version unchanged", finds it absent bothtimes, and stalls the sync while each side expects the other to pick thenumber. Either way the manifest entry statesthe bump. Whoever changes the content owns the bump; the publisher only-checks that it happened — the sync may not edit skill content, and a+checks that it happened — the sync may not alter skill content, and areview that grows a published skill by a hundred lines at an unchangedversion number ships a changed skill under the one promise a versionexists to keep.@@ -1275,7 +1327,8 @@ made per point of the body, naming the line that covers each: an entryis already-applied only when every point has its line, and one pointwithout a line makes it partially-applied, whatever the title suggests;a point that joins several conditions (A and B) counts as one point per-condition (SKILL.md, Acting on Observations). Classify against the+condition (`observation-log.md`, "Read the full body before resolving,+dismissing, fixing or citing"). Classify against the**Issue** as well as the suggestion: `already-applied` needs both — thesuggestion's substance is present AND the failure the Issue describescan no longer occur. Where the suggestion is present but the failure@@ -1349,11 +1402,20 @@ because two writers watching one task from two vantages log one findingtwice, and merging two entries about one fact is not the renumbering theduplicate-id check performs (Cross-slice duplicates, below). Reservestatus marking, archival and observation writes for the parent-session. Before the first subagent returns, the parent snapshots the-output tree (a listing with sizes), so a sibling's work deleted by-another writer is detectable rather than silently absent from the merge;-where the harness offers per-agent sandboxes or worktrees, parallel-writers use them. **A phase that will write is briefed as a write phase from the+session. Before dispatching, the parent snapshots the output tree (a+listing with sizes) and records, per cluster, a `diff -rq` of the staged+copy against live with the time it was seeded, and puts both into that+cluster's brief: a subagent that finds a different state before its first+edit is not the first writer, and reports the diff instead of building on+it. The snapshot also makes a sibling's work deleted by another writer+detectable rather than silently absent from the merge. Every brief+requires the final report to be written to a file in the scratch area as+well as returned, so a hand-back lost with an interrupted conversation is+recovered by reading the file, not by resuming the agent. After an+interruption, re-list the staged tree against the pre-dispatch snapshot+before dispatching anything again, and treat an unexplained change as a+prior run of that cluster, never as clean seed. Where the harness offers+per-agent sandboxes or worktrees, parallel writers use them. **A phase that will write is briefed as a write phase from thestart**, with the user's authorisation for the writes quoted verbatim inthe brief — one brief covering triage and apply, or a fresh subagent forthe apply phase — never a read-only brief later widened by a message from@@ -1544,6 +1606,9 @@ Updated skills ([N] observations, [N] principles applied):**[skill-name]** — [1-sentence change summary]; observations #[N], #[N]+**[workspace file written directly]** — [its diff] (Delivery, "Non-skill+files are split by owner"); or "none"+### Observations Actioned[numbers and titles]@@ -1556,7 +1621,8 @@ applied with the outstanding skill named — never left implicit]### Published skills[per published skill: release branch merged / held, with each change onit and its evidence (exercised naturally where, or check run and result);-merge review date = the publishing weekday ≥ 7 days after INSTALL;+merge review date = the publishing weekday at least three days after+INSTALL, derived per Step 5 ("The merge review is a fixed weekday");a user-decided restructure staged: listed FIRST, with the line"published skill — install and the release are your call";community items included now, routed to the test branch, or declined@@ -1573,7 +1639,9 @@ for the next review; or "none" — the line is never omitted]### Log integrity[duplicate ids renumbered and any floor lag (Step 1), each with thewriting sessions' session_context and date; `skill:` names normalised for-bucketing (Step 3), old → new; or "none"]+bucketing (Step 3), old → new; `skill:` entries in qualified and bare+form (Step 3), N / M; inbox entries drained (Step 1), or "inbox+not read: <reason>"; or "none"]### Skipped (needs manual review)[items with reasons]@@ -1652,7 +1720,8 @@ 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. **Every** staged skill is packed into a `.skill` bundle and+constraint, and it is absolute for skills because a skill has an install+step; non-skill files are split by owner (below). **Every** staged skill is packed into a `.skill` bundle andpresented as that bundle — one delivery format for all of them,regardless of size or file count. A format that switches on the shape ofthe artefact creates two conventions for one thing and a boundary every@@ -1727,7 +1796,7 @@ verifies the round trip and exits non-zero on a mismatch — and any editafter that means re-pack and re-check before presenting. 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 as-well as files. Do not edit skill files in place — nothing goes live+well as files. Do not edit a skill's files in place — nothing goes liveuntil the user installs it. **Keep-two rule:** for any skill, keep onlythe two most recent staged copies under `skill-updates/` **that have beeninstalled** — never prune an uninstalled one. The invariant two lines@@ -1754,6 +1823,39 @@ the next time it is needed, never at the moment of deletion. Rounds, notdays, are what the rule counts (a same-day second round is its owncopy).+**Non-skill files are split by owner.** The files this skill's review owns+in the observation workspace — `cross-cutting-principles.md`,+`skill-families.md`, the starter-set triage reference,+`activation-tiers.txt`, `checkpoints.log`, `last-review-date.txt` and+`skill-updates/PENDING.md` — have no install step, and other steps of+this procedure already write them. The review writes them directly: it+re-reads the file immediately before the write and applies its change as+a patch to that read, never as a copy prepared earlier. The Step 8+summary lists each such file with its diff. A staged copy or patch of+one of them left by an earlier round is applied the same way by the next+review, not carried forward as an install instruction. A file another+process owns and reads at run time stays staged, as the next paragraph+says. The failure shape: staging a file that has no install step turns+the review's own write into a manual copy for the user, and every run+until someone makes it reads the file without the change.++**State files are staged as a patch, never as a snapshot.** A state file+here is a non-skill file another process owns and reads at run time — a+routine's registry or config note, an instruction file. A review that+changes one stages it under+`skill-updates/<date>/_target-files/` as a patch: a unified diff against+the live file (`diff -u "$live_file" "$changed" > "<file>.patch"`), or the+changed lines with enough context to place them. Its manifest entry+records the live file's byte size and sha256 at staging time+(`wc -c < "$live_file"`; `sha256sum` on GNU, `shasum -a 256` on macOS),+which the reconciliation gate re-checks before repeating any install+instruction (Step 1, "A staged state file is reconciled by its recorded+hash"). The failure shape: every run writes a state file, so a snapshot+goes stale with the next run, and its "copy it over" instruction becomes+an overwrite that deletes everything written since staging while reading+as compliance; a stale patch degrades into a conflict someone has to+resolve instead.+**The dated staging folder is multi-writer.** `skill-updates/<date>/` isa namespace keyed only by date, so a manual session and a scheduled runcan both write into the same day's folder (observed minutes apart). Anydiff --git a/scripts/skill-load.sh b/scripts/skill-load.shnew file mode 100755index 0000000..5339b9b--- /dev/null+++ b/scripts/skill-load.sh@@ -0,0 +1,115 @@+#!/usr/bin/env bash+# skill-load.sh — the last step of loading a skill, as one command: the+# per-skill lookup of OPEN observations and the checkpoint line that records+# it.+#+# Usage:+# bash scripts/skill-load.sh <workspace-root> <skill-name>+#+# <workspace-root> the pinned absolute workspace path — the directory that+# holds skill-observations/. Never resolved from the cwd;+# the path may contain spaces.+# <skill-name> the skill whose Skill invocation rides in THIS batch, as+# the listing shows it (`plugin:name` allowed). The match+# is on the bare name — the part after the last `:` — on+# both sides, so a plugin-qualified listing finds entries+# that name the bare skill and vice versa; never on a+# prefix: `foo` does not match `foo-extras`.+#+# Prints, on stdout: one line `<skill-name>: N open observations`, then the+# matching file names, one per line (read their bodies next). Appends one+# line to skill-observations/checkpoints.log:+# YYYY-MM-DD HH:MM loaded <skill-name> — N open observations+#+# Exit status:+# 0 the lookup ran (N may be 0)+# 1 LOOKUP BROKEN — entries exist but no header parsed, or the lookup+# stage itself exited with an error; nothing is written to+# checkpoints.log, because "0 open" from a command that read nothing+# is the one result nobody questions+# 2 refused: missing arguments, a relative root, a root without+# skill-observations/, or a skill name with characters outside+# [A-Za-z0-9:._-]+#+# Why a script: a rule about what a tool batch must CONTAIN cannot be+# enforced by prose inside the thing the batch loads — the agent reads the+# prose only after the batch is committed. One call carrying both the lookup+# and the checkpoint line, emitted beside the Skill invocation, leaves a+# record a review can match against the invocation afterwards.+#+# Why no grep | xargs: file names are handed from find to awk with+# `-exec … {} +`, never through a pipe, so a spaced path cannot split. (The+# null-delimited `grep -Z | xargs -0` form is not portable: BSD grep, as on+# macOS, reads -Z as "decompress", and the pipe then splits on newlines+# again.) awk reads only the frontmatter, so a body that mentions a skill+# name is not a match.+#+# bash 3.2-compatible (stock macOS): case patterns are parenthesised, no+# bash-4 expansions.++set -u++root="${1:-}"+name="${2:-}"++if [ -z "$root" ] || [ -z "$name" ]; then+ echo "usage: bash skill-load.sh <workspace-root> <skill-name>" >&2; exit 2+fi+case "$root" in+ (/*|[A-Za-z]:[/\\]*) ;;+ (*) echo "workspace root must be an ABSOLUTE path, never relative to the cwd: got '$root'" >&2; exit 2 ;;+esac+case "$name" in+ (*[!A-Za-z0-9:._-]*) echo "skill name may hold only [A-Za-z0-9:._-]: got '$name'" >&2; exit 2 ;;+esac++# Every expansion of $root and $d stays double-quoted: the pinned path+# routinely contains a space.+d="$root/skill-observations/observation-log"+if [ ! -d "$d" ]; then+ echo "no observation log at '$d' — run the Workspace creation command first" >&2; exit 2+fi++# One awk over every entry. Per file: H <file> when the header closes (the+# parse count), M <file> when the header names the skill AND is open — the+# review's OPEN set: any status other than actioned, declined, superseded or+# parked, a missing status included. `skill:` is read in all three shapes the log uses: an inline+# [a, "b"] list, a plain scalar, and a block list of `- a` lines below it.+prog='function bare(t) { sub(/.*:/, "", t); return t }+ function tok(t) {+ gsub(/^[[:space:]"\047]+|[[:space:]"\047]+$/, "", t)+ return t != "" && bare(t) == bare(want)+ }+ FNR == 1 { fm = 0; sk = 0; rs = 0; inl = 0; sub(/^\357\273\277/, "")+ if ($0 ~ /^---[[:space:]]*$/) { fm = 1; next } else nextfile }+ fm && /^---[[:space:]]*$/ { print "H " FILENAME; if (sk && !rs) print "M " FILENAME; nextfile }+ fm && /^skill:/ { v = $0; sub(/^skill:[[:space:]]*/, "", v); sub(/[[:space:]]+#.*$/, "", v)+ inl = (v ~ /^[[:space:]]*$/); gsub(/[][]/, "", v)+ n = split(v, a, ","); for (i = 1; i <= n; i++) if (tok(a[i])) sk = 1+ next }+ fm && inl && /^[[:space:]]+-[[:space:]]/ { v = $0; sub(/^[[:space:]]+-[[:space:]]*/, "", v); if (tok(v)) sk = 1; next }+ fm && /^[A-Za-z_]/ { inl = 0 }+ fm && /^status:[[:space:]]*["\047]?(actioned|declined|superseded|parked)["\047]?[[:space:]]*(#.*)?$/ { rs = 1 }'++out=$(LC_ALL=C find "$d" -maxdepth 1 -name '*.md' -exec awk -v want="$name" "$prog" {} +)+stage=$?+files=$(find "$d" -maxdepth 1 -name '*.md' ! -empty | wc -l | tr -d ' ')+parsed=$(printf '%s\n' "$out" | grep -c '^H ')+matches=$(printf '%s\n' "$out" | sed -n 's|^M .*/||p' | LC_ALL=C sort)+count=0; [ -n "$matches" ] && count=$(printf '%s\n' "$matches" | wc -l | tr -d ' ')++# The guard: entries present and nothing parsed is a broken command, not an+# empty backlog.+if [ "$stage" -ne 0 ]; then+ echo "LOOKUP BROKEN — the lookup stage exited $stage (errors above); nothing written to checkpoints.log"; exit 1+fi+if [ "$files" -gt 0 ] && [ "$parsed" -eq 0 ]; then+ echo "LOOKUP BROKEN — $files entries present, 0 headers parsed; nothing written to checkpoints.log"; exit 1+fi++printf '%s: %s open observations\n' "$name" "$count"+[ -n "$matches" ] && printf '%s\n' "$matches"++printf '%s loaded %s — %s open observations\n' "$(date '+%F %H:%M')" "$name" "$count" \+ >> "$root/skill-observations/checkpoints.log"+exit 0