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
Add starter principles, session-start mount probe and review guards
Eoghan Henn2f78396a961b
diff --git a/SKILL.md b/SKILL.mdindex 121b522..16ecb43 100644--- a/SKILL.md+++ b/SKILL.md@@ -86,13 +86,36 @@ was handled without its reference loaded, log an observation.- `references/migration.md` — the one-time scripted conversion of apre-3.0 single-file `log.md`. **Load only when the Session StartProtocol detects a legacy log.** Fresh installs never read it.+- `references/starter-principles.md` — an optional, provenance-stripped+ seed set of generic cross-cutting principles. **Load at first run when+ offering the seed** (Session Start step 1); never read it once the+ adopter's own principles file exists.## Session Start Protocol-1. **Storage.** If `skill-observations/observation-log/` (with its- `archive/` subdirectory) or- `skill-observations/cross-cutting-principles.md` don't exist,- create them (principles template: `references/skill-authoring.md`).+1. **Storage.** The existence check for `skill-observations/` is also+ the workspace-mount probe — one `ls` of the pinned path, run in this+ turn. If it fails, the first response is the environment's folder-picker+ tool (in Cowork, `request_cowork_directory`; elsewhere, its equivalent),+ not the "no filesystem" branch: handoff-doc mode+ (`references/environments.md`) is for environments that have no+ filesystem at all, and it is reached too easily when a missing mount is+ read as one. Never assert the mount's state — connected or not — from+ an environment flag, the presence of a config file in context, or+ memory of an earlier turn; a claim about mount state needs a probe in+ the same turn. Once the path resolves: if+ `skill-observations/observation-log/` (with its `archive/`+ subdirectory) or `skill-observations/cross-cutting-principles.md`+ don't exist, create them (principles template:+ `references/skill-authoring.md`). When the principles file is being+ created for the first time, offer one choice and act on the answer:+ start empty, or seed it from `references/starter-principles.md` — a+ provenance-stripped set of generic methodology principles shipped with+ the bundle. Seeded entries carry `**Origin:** imported from starter set`+ so the adopter's own reviews can prune them like any other rule. Never+ pre-populate silently: the file's authority comes from the adopter's+ own evidence trail, and unexamined imported rules contradict the+ pruning principle the file itself carries.Create `skill-observations/last-review-date.txt` containing the literalvalue `never` if it doesn't exist — never write a date into it at setup;a date means a review actually ran. If a legacy single-file@@ -110,6 +133,17 @@ was handled without its reference loaded, log an observation.surface unprompted. Frontmatter-only is the whole point of the per-fileformat: the scan stays cheap once hundreds of observations exist.+ **This scan does not satisfy the per-skill check** (the grep run each+ time a skill loads — `references/environments.md`, activation block).+ Different scope (every skill vs one), different depth (frontmatter vs+ body), different moment (session start vs the point the skill's rules+ are applied). Both answer "have I looked at the log?", so running this+ one discharges the felt obligation and makes the targeted one feel+ redundant while leaving its function unperformed — awareness of a+ hundred titles does not survive as recall of the one relevant body+ twenty tool calls later. Retrieval has to happen where the decision is+ made.+**An empty scan in a log known to be non-empty is a broken commanduntil proven otherwise**, never the finding "no relevant observations".Count the files independently of the parse — a literal path, not the@@ -157,8 +191,16 @@ was handled without its reference loaded, log an observation.the scanned frontmatter against the installed skill set and mention, inone line, any that no longer resolve — a deleted skill can accumulatedozens of observations before a review discovers the target is gone.- If `skill-updates/PENDING.md` lists staged updates, say "N staged- updates awaiting review" in one line.+ If `skill-updates/PENDING.md` lists staged updates, reconcile the list+ before announcing it — installation happens outside any session, so no+ session observes the install itself, and the session that reads the+ ledger owns its cleanup. For each entry, `diff -rq` the staged copy+ against the live skill and classify three ways (live legitimately moves+ on, so a bare "differs" is not a verdict): identical → installed,+ remove the entry; live strictly newer/superset → superseded, remove+ with a note; staged content absent from live → NOT installed, keep the+ entry, surface it, and base any new staging of that skill on the staged+ copy. Then say "N staged updates awaiting review" in one line.7. **First run.** If the log is empty and the project has history(handover or decision docs, commit history, test scripts, an existingCLAUDE.md — which is largely a record of corrections nobody logged),@@ -289,16 +331,38 @@ values, plus one: the highest numeric prefix in `observation-log/`, thehighest in `observation-log/archive/`, and the number in`observation-log/archive/.id-floor` (the highest id ever issued — update itwhenever you issue an id above it, so the counter can never restart from 1-when the active directory is empty):+when the active directory is empty). The same command first sweeps stale+resolved files into `archive/` — archival is a side effect of deriving the+id, not a separate duty (see Archival on Write):```bashd=skill-observations/observation-log+today=$(date +%F) # archival rides inside this command (see below):+for f in "$d"/*.md; do # stale resolved files move before the id is read+ [ -e "$f" ] || continue+ 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/"+donehi=$( { ls "$d" "$d/archive" 2>/dev/null | grep -oE '^[0-9]+'; cat "$d/archive/.id-floor" 2>/dev/null; } \- | sort -n | tail -1); : "${hi:=0}"+ | sed 's/^0*\([0-9]\)/\1/' | sort -n | tail -1); : "${hi:=0}"[ "$hi" -eq 0 ] && [ -n "$(ls "$d"/*.md 2>/dev/null)" ] && { echo "ID COMMAND BROKEN — log is non-empty but no ids extracted"; exit 1; }next_id=$(( hi + 1 )); echo "$next_id" > "$d/archive/.id-floor"```+The `sed` strips the filename prefixes' zero-padding before the+arithmetic — do not "simplify" it away: shell arithmetic reads a+leading-zero number as octal, so `$(( 0105 + 1 ))` yields 70, and a+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 wouldotherwise propose id 1 in a populated log. A new file never touches another entry's bytes, so it cannot truncate,@@ -306,6 +370,18 @@ overwrite or renumber anyone else's work. If two parallel sessions pick thesame id, two files share a number — harmless; the next review renumbers oneand logs a meta-observation.+**Run the snippet immediately before EVERY write, including the first and+only one of a session.** Having already read the log directory earlier for+some other reason — the session-start frontmatter scan, a grep for+observations naming the skills in use, a status check — does not substitute+for it, and is the state in which skipping feels most reasonable. A filter+and a maximum are different questions over the same data, and the answer to+one is never evidence about the other; no ad-hoc listing reads `archive/`+or `.id-floor`, which are two of the three inputs and the reason the+command exists. If a collision happens anyway it is harmless but should be+fixed on discovery: derive a correct id, `mv` the file to that prefix, and+edit its `id:` frontmatter field to match.+**Batch writes: resolve each id at its own write time.** When logging morethan one observation in a session that may overlap a scheduled review oranother writer, run the id snippet before EACH file — never pre-compute a@@ -416,13 +492,22 @@ structure): `references/skill-authoring.md`.## Archival on Write-On every write, first `mv` already-resolved files from `observation-log/`-to `observation-log/archive/`. "Already resolved" is read from the file's+Archival is not a preamble duty to remember before writing — it rides+inside the id-derivation snippet above: the same command that computes the+next id first `mv`s already-resolved files from `observation-log/` to+`observation-log/archive/`, so the sweep runs whenever an id is issued and+cannot be skipped without failing the write. (The prose form of this rule+— "on every write, first archive" — under-fires: a duty attached as a+preamble to another action inherits none of that action's enforcement; if+a step must always accompany a tool call, put it inside the same command,+not beside it in prose.) The scheduled review archives too, at its Step 1,+as an independent backstop. "Already resolved" is read from the file'sown frontmatter: `status: actioned`, `declined` or `superseded` AND a`resolved:` date **before today**. Files resolved today stay until the nextday, whichever session resolved them — the grace period lives in the file,never in session memory. A resolved file with no readable `resolved:` date-gets today's date written to that field instead of being archived. One+gets today's date written to that field instead of being archived (the+snippet skips it; make that one-field edit separately). Onefile per `mv`; no rewrite of anything else. Helper and rationale:`references/observation-log.md`.@@ -505,12 +590,22 @@ that gets dropped; a stale `open` entry then invites redoing finished workover a section that has since moved on. The write is the enforcement,exactly as it is for logging.+**Acting on only a subset of a multi-skill observation's `skill:` list?**+Neither plain move is honest — left `open`, the finished portion gets+re-applied by another session; marked `actioned`, the unfinished portions+silently leave every future queue. Use the carrier pattern: note the claim+in the body while the partial work is in progress, then mark the+observation `actioned` with a `resolution:` naming which portions were+applied, and log a carrier observation holding the remainder with only the+outstanding skills in its `skill:` list. Full protocol:+`references/observation-log.md`.+## Quick Reference| Question | Answer ||----------|--------|| When do I observe? | The whole session, including feedback and reflection phases |-| How do I log? | Silently, immediately, as one file per observation named `NNNN-slug.md`; id = max(active, archive, `.id-floor`) + 1 |+| How do I log? | Silently, immediately, as one file per observation named `NNNN-slug.md`; id = max(active, archive, `.id-floor`) + 1, derived by running the snippet immediately before each write — an earlier read of the log for any other purpose is not a substitute || When do I surface? | End of session, or earlier if needed || Status field? | Mandatory `status: open` frontmatter on every new observation; reviews treat a missing status as OPEN, never as nonexistent. Five values: `open`, `actioned`, `declined`, `superseded`, `parked` — `parked` = decided but blocked on an external precondition, so it leaves the queue, requires `parked_until:`, and never archives || Does the target skill have siblings? | Resolve it against `skill-observations/skill-families.md` BEFORE writing; add every sibling the insight applies to to `skill:`, and record the verdict in the mandatory `siblings_checked:` field — including "checked, no propagation" |diff --git a/references/environments.md b/references/environments.mdindex 1eaf48c..79c9e86 100644--- a/references/environments.md+++ b/references/environments.md@@ -5,8 +5,8 @@ in an environment without filesystem access.## Recommended activation setup-Three activation tiers exist, and only the strongest is enforced. Pick one-knowingly; do not assume the middle one is a guarantee.+Four activation tiers exist, and only the strongest is enforced. Pick+knowingly; do not assume any of the middle ones is a guarantee.1. **Description matching** (weakest). The skill's frontmatter descriptioncompetes with every other skill's for relevance to the opening message.@@ -18,21 +18,41 @@ knowingly; do not assume the middle one is a guarantee.no hook mechanism this is the only tier that survives an unmounted orunreachable config file, which is why the description itself carries asession-start trigger.-2. **Configuration instruction** (better, still probabilistic). A CLAUDE.md+2. **User-level preferences** (folder-independent, still probabilistic).+ Agent settings the user controls that are injected into every session's+ system prompt regardless of which folder, if any, is connected (in+ Cowork, the personal-preferences field in the app settings; other+ agents' equivalents). This is the right home for a one-line+ probe-then-request trigger — "before any other tool call, `ls` the+ workspace path; if it fails, call the folder-picker tool; never state+ whether the folder is connected without that probe" — because a config+ file inside the workspace folder cannot fire in the very case it+ targets: when no folder is connected, there is no config file. Verify+ the channel once by asking a folder-less session to quote its+ preferences block; a line that does not reach the agent is not a tier.+3. **Configuration instruction** (better, still probabilistic). A CLAUDE.mdor project-instruction block, shown below. Empirically skippable underthe same conditions as tier 1, and silently absent when the file itlives in is not in context (no workspace folder mounted, a session- started outside the project). If `allow_cowork_file_delete` or a similar+ started outside the project). An unmounted workspace is recoverable,+ not terminal: where the environment offers a folder-picker tool+ (Cowork's `request_cowork_directory`), the folder can still be+ attached mid-session on request, and the Session Start Protocol should+ be run the moment it is — only the part of the session before the+ mount is lost. Ask early, but do not treat a declined or skipped+ folder selection as irreversible. If `allow_cowork_file_delete` or a similarlocal-filesystem permission tool is present in the tool surface, thesession runs on the user's machine and the config is reachable; treat"this session runs in the cloud, so the config was not loaded" as- unverified until the tool surface has been inventoried.-3. **Harness hook** (the only enforced option). A session-start hook that+ unverified until the tool surface has been inventoried — and treat the+ converse the same way: an environment flag saying a folder is selected+ is a hint, and only a probe of the path in the same turn is evidence.+4. **Harness hook** (the only enforced option). A session-start hook thatinjects the instruction — and ideally the log state — into context onevery session, e.g. Claude Code's `SessionStart` hook returning`hookSpecificOutput.additionalContext`. Even a hook can only inject aprompt; choosing to invoke a skill remains a model decision. Cowork has- no hook mechanism; there, tiers 1 and 2 are all there is.+ no hook mechanism; there, tiers 1 to 3 are all there is.**Word the trigger mechanically, not judgementally.** "Task-orientedsession" asks the agent to classify the session at its first turn, before@@ -62,9 +82,15 @@ and why"). This is the activation backstop: it forces a look at the log,so a session that silently skipped the protocol is discovered at thefirst task boundary instead of never.-When loading any skill, check the observation log for OPEN observations-tagged to that skill. Apply their insights to the current work, even if-the skill file hasn't been updated yet.+Loading a skill is not complete until you have queried the observation+log for OPEN observations naming it and read their bodies:+ grep -l "skill:.*<skill-name>" \+ [ABSOLUTE PATH]/skill-observations/observation-log/*.md+Apply their insights to the current work, even if the skill file hasn't+been updated yet. Run this at every skill load, however many skills load+in one session. The session-start scan does not cover it: that is a+frontmatter sweep over every observation at session start, this is a+body-level lookup for one skill at the moment its rules are applied.The observation log for this project lives at:[ABSOLUTE PATH]/skill-observations/observation-log/@@ -282,8 +308,9 @@ regimes: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`) and-`scripts/migrate-log.py`. If a referenced file is missing, the install is+`observation-log.md`, `signals.md`, `migration.md`,+`starter-principles.md`) and `scripts/migrate-log.py`. If a referenced+file 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 canonicalsource (for the published version, the repository named in the attributiondiff --git a/references/observation-log.md b/references/observation-log.mdindex 4618714..37cf081 100644--- a/references/observation-log.md+++ b/references/observation-log.md@@ -182,25 +182,74 @@ filename prefix in `observation-log/`, the highest in`observation-log/archive/.id-floor`. The floor file holds the highest idever issued, so the counter cannot restart from 1 when the active directoryis empty (every file archived) and nothing else remembers the range. Update-it whenever you issue an id above it.+it whenever you issue an id above it. The archival sweep (see Archival+below) is folded into this same command: every id derivation first moves+stale resolved files to `archive/`, so archival happens as a side effect+of a step no write can skip.```bashd=skill-observations/observation-log+today=$(date +%F) # archival rides inside this command (see below):+for f in "$d"/*.md; do # stale resolved files move before the id is read+ [ -e "$f" ] || continue+ 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/"+donehi=$( { ls "$d" "$d/archive" 2>/dev/null | grep -oE '^[0-9]+'; cat "$d/archive/.id-floor" 2>/dev/null; } \- | sort -n | tail -1); : "${hi:=0}"+ | sed 's/^0*\([0-9]\)/\1/' | sort -n | tail -1); : "${hi:=0}"[ "$hi" -eq 0 ] && [ -n "$(ls "$d"/*.md 2>/dev/null)" ] && { echo "ID COMMAND BROKEN — log is non-empty but no ids extracted"; exit 1; }next_id=$(( hi + 1 )); echo "$next_id" > "$d/archive/.id-floor"printf '%04d\n' "$next_id" # filename prefix```-`ls`, `grep -oE`, `sort -n` and `printf` are POSIX; the snippet runs-unchanged on macOS, Linux and Git Bash. A skill that hands the agent a+The `sed` strips the filename prefixes' zero-padding before the+arithmetic. It is load-bearing, not cosmetic: shell arithmetic reads a+leading-zero number as octal, so `$(( 0105 + 1 ))` yields 70 — a silently+wrong id — and a prefix containing an 8 or 9 (e.g. `0108`) is an invalid+octal constant and errors the whole derivation.++`ls`, `awk`, `sed -n`, `grep -oE`, `sort -n`, `mv` and `printf` are POSIX;+the snippet runs unchanged on macOS, Linux and Git Bash. The date+comparison relies on ISO dates sorting lexically, so it needs no `date`+arithmetic. A skill that hands the agent ashell command owns that command's portability: lead with the portableform, never offer it as a footnote the agent reaches for after the primaryhas failed — and make any command that derives a number from a file failloudly on an empty result, because a command that fails to empty ratherthan to error may never announce that it failed at all.+**A prior read of the log is not an id derivation.** The snippet runs+immediately before every write, including the first and only one of a+session. The precondition worth naming is the one in which skipping it+feels most reasonable: the directory has already been listed or grepped+earlier in the session for some other purpose — the session-start+frontmatter scan, a filter for observations naming the skills in use, a+status check — and having just read it makes the range feel already+surveyed. It is not. Those are *relevance* queries; the id is a+*maximum*, and the answer to one is never evidence about the other. A+relevance grep returns its highest matching entry, not the highest+entry, and neither it nor any plain listing of `observation-log/` reads+`archive/` or `.id-floor` — two of the three inputs, and the reason the+command exists at all. (Observed: a relevance grep whose top hit was+id N was read as meaning the next id was N+1, over an id already in+use, while the true maximum, sitting in the archive, was twenty higher.)++**Recovering from a collision.** Two files sharing an id is harmless —+distinct files, nothing lost — but should be fixed on discovery rather+than left for a review to notice: derive a correct id with the snippet,+`mv` the newer file to that prefix, and edit its `id:` frontmatter field+to match. Both are ordinary single-file operations; no other entry is+touched.+**Run the snippet once per file when writing a batch.** Appending severalobservations in one session that may overlap a scheduled review or anotherwriter means N separate id races, not one. Pre-computing a base and@@ -258,6 +307,34 @@ ownership fence: an explicit in-scope list by id, an explicit out-of-scopelist, and the instruction that each session edits status only on its ownids.+## Partially actioning a multi-skill observation — the carrier pattern++`status:` is per-observation, but `skill:` is a list, so the lifecycle+field is coarser than the work it tracks. When one session legitimately+acts on only a subset of the listed skills — a release session owning one+skill while a parallel review owns the rest — both plain moves are wrong:+left `open`, another session may re-apply the finished portion; marked+`actioned`, the unfinished portions silently leave every future review+queue. Split the record along the work's seams instead:++1. **While the partial work is in progress**, note the claim in the body:+ "portion X being applied by session Y — do not re-apply." The claim is+ what protects the in-flight portion from a parallel session.+2. **On completion**, mark the observation `actioned` with a `resolution:`+ naming exactly which portions were applied.+3. **In the same turn**, log a carrier observation holding the remaining+ portions: only the outstanding skills in its `skill:` list, a body+ stating it carries the unapplied remainder of the original (cite the+ original's id), and the substance the outstanding portions need —+ never just a pointer, since the original is about to archive.+4. **Reviews treat carriers as first-class.** A carrier enters the work+ queue like any other open observation; nothing about its provenance+ defers or demotes it.++Principle: when a record's lifecycle field is coarser than the work it+tracks, every state transition tells some consumer a lie — split the+record along the work's seams rather than overloading the status.+## When the workspace is under version controlVersioning the workspace folder is good practice — it gives the rollback@@ -283,14 +360,25 @@ run `git clean` with that directory in scope.## Archival-On every write, first move already-resolved files from `observation-log/`-to `observation-log/archive/`. "Already resolved" is decided by the file's+Archival is bound structurally to the id derivation (Assigning an id,+above): the same command that computes the next id first moves+already-resolved files from `observation-log/` to+`observation-log/archive/`, so every write triggers the sweep as a side+effect of a step it cannot skip. The prose form of the rule — "on every+write, first archive" — under-fires in practice: a duty attached as a+preamble to another action inherits none of that action's enforcement,+so if a step must always accompany a tool call, it belongs inside the+same command, not beside it in prose. The scheduled review archives+independently at its Step 1, as a backstop for logging-quiet weeks.+"Already resolved" is decided by the file'sown frontmatter: `status: actioned`, `declined` or `superseded` AND a`resolved:` date before today. Files resolved today stay until the nextday, no matter which session resolved them — the grace period lives in thefile, never in session memory, so it holds across parallel and subsequentsessions. A resolved file with no readable `resolved:` date gets today's-date written to that field instead of being archived.+date written to that field instead of being archived; the embedded sweep+deliberately skips such files (its date check fails closed), so that+one-field repair is a separate, careful edit of that file alone.**`parked` is exempt from archival — deliberately.** It is the one statusthat means "decided" without meaning "resolved", so it satisfies neither halfdiff --git a/references/skill-authoring.md b/references/skill-authoring.mdindex 9568c19..d8e013d 100644--- a/references/skill-authoring.md+++ b/references/skill-authoring.md@@ -349,6 +349,24 @@ in layers so any one catches what others miss:Every pointer in a published document must resolve in the reader'sworld, not the author's.+ Authoring-time corollary — sibling-sync and family notes. The family+ machinery legitimately writes sync notes into skill files so shared+ cores don't drift, and those notes are the expected shape of a+ violation of this layer: the sync rule and the standalone rule are+ each followed correctly and still jointly produce an unpublishable+ skill neither anticipated. When adding a sibling-sync or family note+ to an open-source skill that is published or a publication candidate,+ phrase the family reference in capability language from the start+ ("the sibling skills implementing this methodology for other+ platforms") or point generically at the private family registry —+ never name installed-but-unpublished skills, because the publishing+ workflow's standalone scan blocks those names, the sync itself becomes+ the publication blocker, and the only fix is rewording at the live+ skill. When a maintenance mechanism writes cross-references into an+ artefact, it must respect the publication boundary of the artefact it+ writes into: internal registries can name internal things; public+ artefacts reference them by capability, not by name.+## Timelessness — shared skills must not capture current stateAny skill leaving the author's own maintenance loop (published, or shareddiff --git a/references/starter-principles.md b/references/starter-principles.mdnew file mode 100644index 0000000..505271f--- /dev/null+++ b/references/starter-principles.md@@ -0,0 +1,296 @@+# Starter Cross-Cutting Principles (optional seed)++This file is NOT the adopter's principles file. It is an optional seed:+a curated set of generic methodology principles, accumulated over a long+run of the task-observer loop and stripped of their provenance+(observation ids, dates, the originating setup's skill and client names).+The live file is `[workspace folder]/skill-observations/cross-cutting-principles.md`,+and its authority comes from the adopter's own evidence trail — so nothing+here takes effect until the adopter consciously imports it.++**When to read this file:** only at first run, when the Session Start+Protocol (SKILL.md, step 1) is creating the principles file and offers the+choice "start empty, or seed from the starter set". Never read it once the+adopter's own file exists.++**How to import:** copy the entries the adopter chooses (all, or a subset)+into the live file in the template format from `references/skill-authoring.md`,+setting `**Added:**` to the import date, `**Propagation:** opportunistic`,+`**Status:** active`, and adding `**Origin:** imported from starter set` to+each. The Origin marker is load-bearing: it tells every later review that+the entry arrived without local evidence, so the pruning pass can drop it+as freely as any single-observation rule. Imported principles that never+fire in the adopter's own work should be removed, not kept out of respect.++---++### 1. Open-source skills must include an open-source licence+**Applies to:** all open-source skills+**Requirement:** Include a recognised open-source licence statement in the+skill preamble and a corresponding `LICENSE` (or `LICENSE.txt`) file in the+skill directory. Any commonly recognised licence is acceptable — CC BY 4.0+for prose-heavy skills, MIT or Apache 2.0 for code-heavy skills, CC BY-SA+or the GPL family for stronger copyleft. The choice belongs to the skill's+author; the requirement is that there *be* a licence.++### 2. Open-source skills must include author attribution and a feedback pathway+**Applies to:** all open-source skills+**Requirement:** Include an attribution block at the top of the skill with+author name, contact link, licence statement, and a feedback and support+pathway (an issue tracker, a repository, a contact address). A published+skill without a route back to its author cannot improve from its readers.++### 3. Skills with rules must include a pre-flight verification step+**Applies to:** all skills with explicit rules or requirements+**Requirement:** Include a verification step where the agent re-reads the+skill's rules and checks its output against them before delivery. Rules+that are not enforced are suggestions.++### 4. Open-source skills must not contain client-identifying information+**Applies to:** all open-source skills+**Requirement:** No client names, project URLs, domain names, or proprietary+details anywhere in the skill, its references, or its examples. Enforce at+authoring time, at observation-logging time, and again at publication —+the log and the commit message are artefacts too.++### 5. Open-source skills must use tool-agnostic language, with concrete examples first+**Applies to:** all open-source skills+**Requirement:** Reference capabilities (browser access, file system access,+web search, a scheduler) rather than hard-coding a dependency on one+product. Skills are read by agents, not humans, and an agent pattern-matches+against concrete tool names in its toolset — so name the concrete tool for+the primary environment as an example, then give the generic fallback:+"In [environment], use `[tool]`. Elsewhere, use the available equivalent."+Generic-first phrasing optimises for human readability at the cost of+machine actionability.++### 6. Skills that generate structured output must be grounded in multiple real examples+**Applies to:** all skills that produce structured output (configs, markup,+code templates, data formats)+**Requirement:** Inform the skill with several real-world examples of the+target format, never a single instance — one example creates blind spots+around edge cases, advanced features, and format variations. Where the+resulting specification is too detailed for the skill body, put it in a+reference file and point to it.++### 7. Subagents must have complete inputs and verified outputs+**Applies to:** all skills that delegate content generation to subagents+**Requirement:** Use subagents for speed, but never let them guess at data+values. Safe delegations: validation, formatting checks, cross-reference+checks — anything where every required input can be passed in the brief.+Unsafe without safeguards: anything requiring live data. For data-bearing+tasks, the parent gathers the raw data first and passes it complete; a+subagent lacking a value writes a `[VERIFY: value not confirmed]`+placeholder rather than a plausible invention. After the return, the+parent verifies every concrete value against the source. Two sub-rules:+**(visualisation)** when delegating a chart or table, pass the exact data+in final display order — pre-filtered, pre-sorted — never a broader set the+subagent must rank, and spot-check content accuracy against the source,+not just layout; **(characterisation)** value-checking does not fire on+output stated as a *judgement* — a reported conflict, defect, risk or+readiness verdict has no unit to check — so any subagent claim that will+reach the user as a finding must be spot-checked by the parent at whatever+granularity makes it falsifiable (one grep is usually enough). Require+subagents to return locatable evidence (file, line, matched string) with+every claim; a claim without evidence is a claim to verify, not to relay.+A wrong value fails loudly when something computes with it; a wrong+characterisation is consumed by being agreed with, and agreement leaves no+trace.++### 8. Graceful tool-failure recovery+**Applies to:** all skills that use interactive tools+**Requirement:** When a tool interaction (a question widget, a form input)+is rejected or fails, recover conversationally without exposing internal+error states to the user. Rephrase in plain text and continue; do not+assume the user dismissed the interaction.++### 9. Match interaction modality to conversation energy+**Applies to:** all skills that gather user input+**Requirement:** Use structured tools (question widgets, forms) for+structured intake at the start of tasks. During free-flowing dialogue,+prefer plain-text questions. Do not downgrade a rich conversation to+multiple choice.++### 10. Small actionable sets are presented inline AND saved to file+**Applies to:** all skills that produce deliverable results+**Requirement:** When the result is a small set of actionable items (roughly+25 or fewer links, tasks, or similar), present it inline in the+conversation AND save it to a file — the file is the persistent record,+the inline list serves the immediate workflow. For larger sets the file is+primary and a summary is shown inline. Do not force the user to open a+file for something they will consume right now.++### 11. Skills require pruning, not just growth+**Applies to:** all skills+**Requirement:** During every review, look for content to remove with the+same deliberateness as content to add: rules from a single observation that+never recurred, sections never consulted, elaborate workflows users+consistently shortcut, complexity added "just in case" that never triggers.+A skill that only grows eventually becomes too heavy to be useful.++### 12. Use canonical identifiers from source data, never reconstruct from derived fields+**Applies to:** all skills that join, match, or cross-reference data from+more than one source+**Requirement:** Always use the canonical identifier from the source system.+Never reconstruct an identifier from a derived or transformed field+(generating a URL from a name, inferring an id from a slug). Reconstructed+identifiers introduce silent false positives that pass casual review and+corrupt the analysis. A curated lookup table is more work up front and+produces verifiable, auditable results.++### 13. Skills that read or write workspace files must maintain a reference index+**Applies to:** all skills that depend on, or produce, files in the shared+workspace+**Requirement:** Include a "Reference files" section listing the key files+with a one-line description each, maintained as a living index — added to+when files are created, pruned when they are superseded. Without it, a new+session loading the skill has no way to discover that relevant workspace+files exist, and the skill cannot leverage its own historical outputs.++### 14. Scheduled tasks invoke skills; they do not reimplement them+**Applies to:** all scheduled tasks that perform a workflow documented in a+skill+**Requirement:** A scheduled task's prompt loads the skill and follows its+instructions; it does not inline the workflow. The skill stays the single+source of truth: improvements flow into the scheduled execution+automatically, and the methodology remains shareable and versioned.+Duplicating skill content into a task prompt creates a maintenance fork+that drifts, and traps methodology in a non-shareable location.++### 15. Scheduled task prompts are lightweight orchestrators — intelligence lives in skills+**Applies to:** all scheduled tasks+**Requirement:** Task prompts carry no domain knowledge, source lists,+output formats, or filtering criteria; all of that belongs in a skill the+task invokes. Pattern: task prompt = "Load skill X, then follow its+instructions." This lets the skill improve independently of the task, be+invoked manually in ad-hoc sessions, and be observed by the task-observer+on every run. When creating any scheduled task, first ask whether a skill+exists for its domain — and if not, create the skill first.++### 16. Interrupted operations are partial operations — verify state before retrying+**Applies to:** all skills that perform bulk data operations or multi-step+mutations+**Requirement:** When an operation is interrupted, times out, or fails+partway, assume partial success, not total failure. Before retrying by the+same or another method, verify the current state — bulk inserts (some rows+succeeded), file operations (some files written), multi-step workflows+(some steps completed). The pattern: interrupt → verify state → adjust the+remaining work → proceed. Never assume a clean slate after a failure.++### 17. Never suggest manual typing of technical content as a workaround+**Applies to:** all skills and all conversational interactions+**Requirement:** When a tool-based workflow breaks (formatting, paste+failures, encoding), never suggest that the user manually type or+transcribe code, markup, structured data, or any technical content —+regardless of length. Find another machine-assisted route: a different+file format, a different delivery mechanism, a different tool. "It's only+N lines" is never a justification.++### 18. Browser automation is a costly last resort+**Applies to:** all skills that use or recommend browser automation+**Requirement:** Browser tool payloads compound as a conversation grows.+Any skill that uses them must document the cost, offer non-browser+alternatives where they exist, position the non-browser path as the+default when equally effective, and include a checkpoint for sessions that+exceed a small number of browser calls. Escalate strictly: fetch or search+tools first, the browser only after those have failed on a specific+source, and where the browser is needed but unavailable, wait for the user+rather than skipping, aborting, or inventing an alternative.++### 19. Skills recommending API access must note network-sandbox implications+**Applies to:** all skills that recommend direct access to a third-party+API+**Requirement:** Note that users in sandboxed environments (desktop agents,+corporate proxies) may need to allowlist the API's domain in their network+settings and restart the application before the call succeeds, and name+the domain(s) where known. Otherwise the user discovers the blocker+through failed requests mid-workflow.++### 20. Skills contain only behaviour-changing content+**Applies to:** all skills, open-source and internal+**Requirement:** Keep only content that changes the agent's behaviour at+execution time. Changelogs, version notes, history sections, credits,+self-narrating prose, and maintainer-facing context belong in a supporting+document, in commit history, or in a README — not in the skill. The test:+would removing this line change how the agent behaves? This does NOT cut+examples, anti-patterns, or worked scenarios — those are load-bearing for+rule adherence, because bare rules get violated more reliably than rules+with context. Every non-load-bearing line is token cost paid on every load+with no behavioural payoff.++### 21. Use agent-agnostic language in open-source skills+**Applies to:** all open-source skills+**Requirement:** Refer to the executing AI as "the agent" rather than by a+vendor's model name, except where the reference is genuinely specific to+that vendor: product names (an app, a CLI, a hosted chat), a config-file+naming convention, an architecture or API only that vendor has. Generic+references to the executor ("[model] does X", "tells [model] to") become+"the agent". This extends the tool-agnostic principle to actor references.+Internal skills that only ever run in one setup are exempt.++### 22. Verifying current vendor guidance requires a dated changelog check, not just the docs page+**Applies to:** all skills that verify or assert a third-party platform's+current guidance+**Requirement:** When a workflow confirms what a vendor currently+recommends, supports, or requires, check the vendor's dated changelog or+updates page — not only the documentation page (e.g. a search engine's+dated "updates" page alongside its docs). Fetched docs pages are cache+snapshots and have been observed serving week-stale versions missing new+properties; the changelog is dated and authoritative, and catches both a+stale fetch and changes since the skill was written. Corollary: any+"this property/change does not exist" claim about recently updated+documentation needs a second channel (changelog, raw fetch, or browser)+before delivery — channel staleness is the first hypothesis, not vendor+absence.++### 23. Never aggregate across structurally different segments+**Applies to:** all skills that report a metric summed, averaged, or ranked+over more than one segment (market, brand, client, instrument, template,+channel, time bucket)+**Requirement:** Before aggregating, check whether the segments are+structurally comparable — same instrument, same population size, same+denominator behaviour. If not, report per segment first, and aggregate+only with the heterogeneity stated. Aggregation is an editorial decision,+not a neutral default. The diagnostic: an aggregate over heterogeneous+segments always flatters one segment and buries another, **and the buried+one is usually the finding** — so when an aggregate produces a "weakness",+check whether a small segment is being drowned by a large one before+reporting it.++### 24. Fetch the instance before describing it+**Applies to:** all skills that describe, classify, or verify a specific+artefact — a URL, a DOM element, a host, a record, a file — from evidence+about it+**Requirement:** Before asserting what a specific artefact *is*, obtain the+artefact itself rather than reasoning from a signal that correlates with+it. Surface patterns are evidence *about* an artefact and get substituted+for it because they are already in hand while fetching costs a call; the+substitution is invisible in the output, because an inference from a+familiar-looking pattern reads exactly like a verified fact. Typical+errors: a matching DNS record read as proof a host served content when it+served a redirect; a URL sweep read as evidence of what links to those+URLs; character proximity in serialised HTML read as DOM containment; a+URL's shape read as its page type when the dataset carried a page-type+column. The diagnostic: name the evidence a claim rests on and ask whether+it is the artefact or a correlate; if a correlate, ask what fetching the+artefact would cost — usually one call. Two corollaries: where a dataset+already classifies the entity, read its field rather than re-deriving it;+where direct access is blocked, prefer another response-level channel+(an inspection tool, a rendered view) over an infrastructure-level signal.++### 25. One verified reason beats two, where the second is unchecked+**Applies to:** all skills that produce recommendations, advice, arguments,+or justifications+**Requirement:** Every supporting reason attached to a recommendation must+clear the same evidence bar as the recommendation itself. When a single+justification feels thin, state it more precisely rather than reaching for+a second; if a second reason cannot be checked in the moment, flag it as+unchecked or leave it out. The mechanism does not feel like invention: the+search for a second reason is a search for something *plausible that+points the same way*, and supporting reasons get a fraction of the+scrutiny precisely because they are not the load-bearing claim — yet they+are the part the reader has no independent way to check. A wrong+supporting reason transfers its unreliability to the sound claim beside+it. Corollary: before building an argument on figures from a document,+establish who authored them — inherited or third-party numbers deviate in+both directions and change which of them are worth contesting at all.diff --git a/references/weekly-review.md b/references/weekly-review.mdindex bec922e..1a3d477 100644--- a/references/weekly-review.md+++ b/references/weekly-review.md@@ -143,7 +143,12 @@ no `status` field at all.** Concretely:**Reconciliation guard:** before proceeding, assert that`count(files in observation-log/) == count(status-classified files)`. If thecounts differ, the delta is statusless files — surface and triage them (as-OPEN) rather than proceeding as if the backlog were clean.+OPEN) rather than proceeding as if the backlog were clean. **This is a+point-in-time assertion, not a standing guarantee.** It proves the scan was+complete when it ran; the log is multi-writer and a long review is exactly+when other sessions are logging, so the result decays for the duration of+the run. Keep the Step 1 file list — Step 6 re-scans against it before+anything is marked.**Parked entries: excluded from the queue, not from view.** `status: parked`means the observation was judged sound but is blocked on an external@@ -157,6 +162,31 @@ carry it into this review's queue; (b) list every still-parked entry in theStep 8 summary in ONE LINE each — id, title, unpark condition — so a parkedbacklog stays visible without re-entering the work queue.+**Staged-work reconciliation gate.** Installation is a manual, per-item+act that happens outside any session, so no session observes it and+nothing fires at install time: a ledger whose removal trigger is an event+no session observes only ever grows. Bind the cleanup to the moment the+ledger is read — reading is the only reliably recurring event, so the+reading session owns it. For each entry in `skill-updates/PENDING.md`+(and, where the manifest may be missing entries, each skill directory+under recent `skill-updates/` dates), run `diff -rq` of the staged copy+against the live skill and classify THREE ways — three-way because live+legitimately moves on, so a bare "differs" is not a verdict:++- **(a) identical** → installed; remove the manifest entry.+- **(b) live strictly newer / a superset of the staged copy** →+ superseded; remove the entry with a note.+- **(c) the staged copy carries content absent from live** → NOT+ installed; surface it, and treat the staged copy — not live — as the+ base for any new staging of that skill in this review.++Reconcile in BOTH directions every time: lingering-done (installed but+still listed) and missing-done (staged but never installed) fail+differently, and only the diff sees both. Completion of a manual batch is+a claim, not a state; the check is one `diff -rq` per skill and runs in+seconds over a 20-skill batch. The Session Start Protocol (step 6) runs+the same gate whenever it announces staged updates.+Also read all active cross-cutting principles. If there are no OPENobservations and no outstanding principles: report "no open observationsor outstanding principles", update the timestamp, and stop.@@ -206,7 +236,10 @@ observation may appear in both. Then, before anything is presented:and it is silent, because the observation gets marked `actioned` on thestrength of the first skill it touched. Record the per-skill dispositionin `resolution:` and carry it into the Family coherence block of the- summary. Also check `siblings_checked:` while the frontmatter is in+ summary. Where a legitimate partial application exists (one session owns+ a subset of the listed skills), the carrier pattern in+ `observation-log.md` resolves it — and a carrier observation enters this+ queue as first-class, never deferred on account of its provenance. Also check `siblings_checked:` while the frontmatter is inhand: an entry with the field missing or blank was logged without thecheck, so before actioning it, do the check now (registry, tests andfallback in `observation-log.md`) and widen `skill:` if it was@@ -389,7 +422,27 @@ when two independent agents flag the same ambiguity, the brief is thedefect, not the agents: fix the brief and re-issue rather thanadjudicating the two outputs.-**Step 6 — mark ACTIONED.** In each applied observation's frontmatter set+**Step 6 — re-scan, then mark ACTIONED.** Before any status is written,+re-enumerate `observation-log/` and compare the listing against the file+list built at Step 1. The queue is a snapshot of a shared, append-only+store, and every downstream count and consistency check in this procedure+is computed against the queue rather than the directory — so a stale queue+produces a summary that is coherent, confident and incomplete, with no+internal contradiction to trip over. Files in the new listing that were+not in the Step 1 list arrived during the run: they are OPEN and were+never triaged. Classify each rather than merely counting them: (a) it+targets a skill whose staged copy from Step 5 is still open in this run →+fold it in and action it (this is the common case — a review that has just+touched a skill runs in the same window as the sessions most likely to be+using it, and it is the case where a miss costs most, because the next+review's base is then a staged copy whose provenance nobody re-derived);+(b) otherwise → leave it OPEN for the next review and list it under the+"arrived during this run" line of the Step 8 summary. Never let the delta+pass silently, and never infer it from an id counter — a monotonic id+surfacing a number above the scan's maximum is a side effect, not a+detection mechanism. The check is one `ls` against a list already in hand.++Then, in each applied observation's frontmatter set`status: actioned`, `resolved: YYYY-MM-DD` (today), and`resolution: Applied to [skill-name] (weekly review)` — editing only thosefields, in that one file. The `resolved:` date is load-bearing: archival is@@ -423,6 +476,10 @@ applied with the outstanding skill named — never left implicit][one line each: #id — title — unparks when: [condition]; plus any entrywhose condition has been met and was returned to the queue this review]+### Arrived during this run+[from the Step 6 re-scan: #id — title — folded into [skill] / left OPEN+for the next review; or "none" — the line is never omitted]+### Skipped (needs manual review)[items with reasons]```@@ -499,8 +556,12 @@ observation ids applied, and a per-change summarywhat 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-quickly, which is what raises the install rate. Remove an entry when the-user installs the update or when the keep-two rule prunes its directory.+quickly, which is what raises the install rate. Entries are removed by+the staged-work reconciliation gate (Step 1, mirrored in Session Start+step 6) when the staged copy proves identical to live or superseded by+it, or when the keep-two rule prunes the directory — never "at install+time", because no session observes the install; the session that reads+the manifest owns its cleanup.The gate stays absolute — the fix for a safety gate people are tempted tobypass is reducing the friction that creates the temptation, notloosening the gate. An optional git-based staging medium is described in