feat(template): evidence-based knowledge governance — scan-usage skill + meta-skill admission standards - #176
Draft
BobbyZhouZijian wants to merge 4 commits into
Draft
feat(template): evidence-based knowledge governance — scan-usage skill + meta-skill admission standards#176BobbyZhouZijian wants to merge 4 commits into
BobbyZhouZijian wants to merge 4 commits into
Conversation
…tribution for the librarian Instead of asking agents to self-report which notes/skills they used, give the librarian a scanner over agent session logs (.claude/logs NDJSON): scan_usage.py counts agent-initiated Read/Bash/Skill tool calls touching notes/ and skills/, distinguishes reads from writes (incl. shell redirects) and browsing, and diffs against disk to list never-read notes and never-used skills. The librarian template now gathers this evidence before deduplicating/archiving and applies an evidence floor before retiring anything. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Embed a meta-skill document (references/meta-skill.md) in the bundled skill-creator: a five-point admission gate (recurrence evidence, outcome link, beyond base-model competence, no existing home, generalizes past the current task-state), skill-vs-note placement rules, scope/description standards, and lifecycle expectations. skill-creator now routes every candidate through the gate before drafting and checks scan-usage evidence before creating siblings of unused skills; the librarian applies the same gate when extracting skills from notes. Constraining births upstream keeps the shared library's trigger surface clean instead of relying on retirement to clean up junk later. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
create-notes gets a 'Before You Write — Admission and Placement' check: search for an existing home before creating a file (update / refute / supersede instead of forking near-duplicates; per-eval experiment notes stay append-only), route repeatable procedures to skill-creator's admission gate, and design for discovery (searchable titles, index entry, links) since the librarian's usage scan archives notes nobody reads. meta-skill.md cross-references the note-side check, and the regression test now covers the create-notes wiring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hatch-vcs regenerated it during uv sync and git add -A swept it into 803174a by accident. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Inspired by the "library drift" line of work on self-evolving skill libraries (arXiv:2605.19576): ungoverned LLM-authored skills contribute roughly nothing on their own — the value comes from governance, i.e. evidence-based curation at retirement time and strict admission at birth time. CORAL already has the roles (librarian subagent, skill-creator, create-notes) but their decisions were disconnected from outcome evidence. This PR wires them together.
What's in here
1.
scan-usagebundled skill — usage attribution from agent logsInstead of asking agents to self-report which notes/skills they used,
scripts/scan_usage.pyscans every agent's session log (.claude/logs/*.log, NDJSON) and counts agent-initiated tool calls touchingnotes/andskills/:Read/ Bashcat|sed|grepof a specific note → read;Write/Editand shell redirects (>,tee) → write;Glob/Grep→ browseSkilltool invocations, reads/executions underskills/<name>/,coral skills --read <name>→ skill use (authoring a skill is not a use)ls notes/output doesn't mark every note as read--jsonThe librarian template now runs this scan before touching anything, and applies an evidence floor: archive only on sustained zero reads with real run activity behind it (premature retirement destroys knowledge), never delete.
2. Meta-skill admission standards (
skill-creator/references/meta-skill.md)A five-point admission gate applied before drafting any new skill — recurrence evidence (≥3 occurrences or 2+ agents), outcome link (tied to scores/time saved, with citable evidence), beyond base-model competence, no existing home (70%+ overlap → update instead; unused adjacent skill → fix its description, don't birth a sibling), generalizes past the current task-state — plus skill-vs-note placement rules, scope/description standards, and lifecycle expectations. Both authoring paths (skill-creator and the librarian's extract-skills step) route through it.
3. Same principles applied to note creation (
create-notes)A "Before You Write — Admission and Placement" check: search for an existing home first (update /
refutes:/supersedes:instead of forking near-duplicates; per-eval experiment notes stay append-only), route repeatable procedures to skill-creator's gate, and design for discovery — since the librarian's usage scan archives notes nobody reads.Tests
tests/test_scan_usage.py— 15 cases for the scanner (read/write/browse semantics, redirect detection, tool-result immunity, codex events, agent attribution, CLI e2e)tests/test_meta_skill.py— regression gate that the admission wiring survives future prompt edits (skill-creator, librarian, create-notes)🤖 Generated with Claude Code