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
3.3.1: the core-size ceiling is the skill's own, not this script's
Eoghan Hennb20625df85a7
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 0485417..a414add 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -2,7 +2,7 @@"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json","name": "task-observer","displayName": "Task Observer — One Skill to Rule Them All",- "version": "3.3.0",+ "version": "3.3.1","author": {"name": "Eoghan Henn","url": "https://rebelytics.com"diff --git a/.tessl-plugin/plugin.json b/.tessl-plugin/plugin.jsonindex e68341b..951f07e 100644--- a/.tessl-plugin/plugin.json+++ b/.tessl-plugin/plugin.json@@ -5,5 +5,5 @@"skills": ["."],- "version": "3.3.0"+ "version": "3.3.1"}diff --git a/SKILL.md b/SKILL.mdindex f0eaa33..ab4089f 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,5 +1,6 @@---name: "task-observer"+core_max_lines: 728description: "Monitors task execution for skill improvement opportunities. Use during ANY multi-step task, agentic workflow, or work session. Captures patterns, user corrections and methodology worth preserving as reusable skills. Also triggers in post-task feedback discussions and when the user mentions skill observations, the observation log, or skill taxonomy. Also known as \"One Skill to Rule Them All\" — trigger on this phrase too. IMPORTANT: invoke this skill before the FIRST tool call of any session and before writing or proposing a plan — any turn that will involve a tool call counts. This sentence is the session-start trigger and the only activation layer that survives an unreachable config file; pair it with a CLAUDE.md instruction or a harness session-start hook (references/environments.md) — description matching alone is not enforceable."---@@ -234,10 +235,9 @@ was handled without its reference loaded, log an observation.(no observation-log directory after sessions of real work), and thereview's regression check for a tier that was present and is gone.5. **Concurrency.** There is no shared log file to guard: each observation- is its own file, so creating one never collides with or overwrites- another session's entry. Before changing the *status* of an existing- observation, re-read that one file first (a parallel review may have- resolved it).+ is its own file, so creating one never collides with another session's+ entry. Before changing an existing observation's *status*, re-read that+ one file first — a parallel review may have resolved it.6. **Targets and staged work.** Resolve each distinct `skill:` value inthe scanned frontmatter against the installed skill set and mention, inone line, any that no longer resolve — a deleted skill can accumulatediff --git a/references/skill-authoring.md b/references/skill-authoring.mdindex bd6ce6c..7a92470 100644--- a/references/skill-authoring.md+++ b/references/skill-authoring.md@@ -143,6 +143,23 @@ per-session rules in the skill body and episodic material in referencefiles loaded on demand (progressive disclosure) — a skill loaded everysession is fixed overhead and should be audited like one.+**Declare your own core ceiling, and let it only fall.** A skill opts into+the size ratchet by naming its own bound — `core_max_lines: N` in SKILL.md+frontmatter, or a `.core-ceiling` file beside it. `validate-skill-bundle.py`+then fails when the core exceeds it, with the instruction to move content to+a reference file rather than raise the number. Seed it at whatever the core+measures today: the point is not that every skill reaches some ideal size,+it is that no skill silently grows past where it already is.++A skill that declares neither has not opted in. The count and the distance to+the 500-line target are still reported; nothing is gated. That is deliberate,+and it is the correction to a real defect: the ceiling was briefly a constant+inside the validator, so one skill's budget failed three unrelated skills that+had not changed. **A tool one skill ships for the whole library must not carry+that skill's own constants.** Any threshold in a shared script is either read+from the subject being checked or is advisory — the tell is a gate that fails+on input its author never looked at.+**Progressive disclosure is the DEFAULT, not an option.** Loading happensin three levels: frontmatter metadata is always in context, the SKILL.mdbody loads whenever the skill triggers, and bundled resources load onlydiff --git a/scripts/validate-skill-bundle.py b/scripts/validate-skill-bundle.pyindex 4dc9b51..2edb256 100644--- a/scripts/validate-skill-bundle.py+++ b/scripts/validate-skill-bundle.py@@ -60,7 +60,14 @@ SEMVER_RE = re.compile(r"^\d+\.\d+\.\d+$")# TARGET is the size the core is trying to reach. The gap between CEILING and# TARGET is reported on every run, passing or failing, so the debt stays# visible rather than being rediscovered by a contributor with a line counter.-MAX_CORE_LINES = 728+# The ceiling is a property of the SKILL, not of this script. It is read from+# the skill under test — `core_max_lines:` in SKILL.md frontmatter, or a+# `.core-ceiling` file beside it holding the number. A skill that declares+# neither has not opted in: the count is reported and nothing is gated. This+# script ships inside task-observer but is run against every skill in a+# library, and a constant that describes one skill must never bound another.+CORE_CEILING_FILE = ".core-ceiling"+CORE_CEILING_KEY = "core_max_lines"TARGET_CORE_LINES = 500PATH_RE = re.compile(r"`((?:references|scripts|assets)/[^`\s*?]+\.[A-Za-z0-9]+)`")BUILD_JUNK = {"__pycache__", ".DS_Store"}@@ -155,8 +162,37 @@ def check_frontmatter_shape(fm, fails, yaml_available):"not parsed. Install PyYAML for the stronger check.")+def read_core_ceiling(skill_md):+ """The skill's own ceiling, or None if it has not declared one.++ Two sources, frontmatter first: `core_max_lines: N` in SKILL.md, else a+ `.core-ceiling` file beside it containing the number. None means the skill+ has not opted in — which is not a failure and must not be treated as one.+ A malformed value is also None, and says so, because silently falling back+ to some default is how one skill's number ends up bounding another.+ """+ text = skill_md.read_text(encoding="utf-8")+ m = re.match(r"(?s)^---\n(.*?)\n---\n", text)+ if m:+ km = re.search(r"(?m)^%s:\s*(\S+)\s*$" % CORE_CEILING_KEY, m.group(1))+ if km:+ if km.group(1).isdigit():+ return int(km.group(1))+ print(f"note: {CORE_CEILING_KEY} is not a whole number "+ f"({km.group(1)!r}) — core size not gated")+ return None+ f = skill_md.parent / CORE_CEILING_FILE+ if f.exists():+ raw = f.read_text(encoding="utf-8").strip()+ if raw.isdigit():+ return int(raw)+ print(f"note: {CORE_CEILING_FILE} is not a whole number ({raw!r}) — "+ f"core size not gated")+ return None++def check_core_size(skill_md, fails):- """The ratchet. See MAX_CORE_LINES.+ """The ratchet, against the skill's OWN declared ceiling.Counted with splitlines() so the number matches `wc -l` on anewline-terminated file. Counting newlines and adding one reports 755 for@@ -165,13 +201,21 @@ def check_core_size(skill_md, fails):"""lines = len(skill_md.read_text(encoding="utf-8").splitlines())over_target = lines - TARGET_CORE_LINES- if lines > MAX_CORE_LINES:+ ceiling = read_core_ceiling(skill_md)+ if ceiling is None:+ note = f"core SKILL.md {lines} lines (no ceiling declared — not gated"+ if over_target > 0:+ note += f"; {over_target} over the {TARGET_CORE_LINES}-line target"+ print(note + ")")+ return+ if lines > ceiling:fails.append(- f"core SKILL.md {lines} lines > ceiling {MAX_CORE_LINES}. "- f"Move content to a reference file — do not raise the ceiling.")+ f"core SKILL.md {lines} lines > this skill's declared ceiling "+ f"{ceiling}. Move content to a reference file — do not raise the "+ f"ceiling.")else:- headroom = MAX_CORE_LINES - lines- note = f"core SKILL.md {lines} lines (ceiling {MAX_CORE_LINES}, {headroom} to spare"+ headroom = ceiling - lines+ note = f"core SKILL.md {lines} lines (ceiling {ceiling}, {headroom} to spare"if over_target > 0:note += f"; {over_target} over the {TARGET_CORE_LINES}-line target"print(note + ")")