Claude-skill-registry compound-autolearn-compoundspec
Generate a CompoundSpec v2 JSON-only autolearn proposal from git diffstat + existing skills, while respecting strict file-scope constraints.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/compound-autolearn-compoundspec" ~/.claude/skills/majiayu000-claude-skill-registry-compound-autolearn-compoundspec && rm -rf "$T"
manifest:
skills/data/compound-autolearn-compoundspec/SKILL.mdsource content
<!-- BEGIN:compound:skill-managed -->
Purpose
Turn an autolearn prompt (recent activity + constraints) into a valid CompoundSpec v2 JSON object.
When To Use
- Prompt says "Background Autolearn" or "learning agent".
- Prompt requires JSON-only output and limits edits to memory/docs artifacts.
Procedure
- Read the constraints and allowed paths; assume anything else is forbidden.
- If a system reminder indicates read-only / Plan Mode:
- Do not propose product code changes.
- Keep proposals strictly within skills/instincts/docs/changelog.
- Do not propose actions that imply file modifications outside the allowed set.
- Use the git summary (changed_files + diffstat) as evidence for what to learn.
- If the git summary indicates an in-progress merge/conflict state (e.g., diffstat lines labeled "Unmerged <path>"):
- Treat the diff as incomplete/low-signal.
- Avoid inferring product behavior changes.
- Prefer a small instinct/skill update about conflict-state hygiene.
- If there is no other stable evidence, emit empty skill/instinct changes and set
.docs.sync: false
- If the diffstat is empty (or there are no meaningful file changes):
- Do not invent learnings.
- Emit empty
andinstincts.create/update
.skills.create/update - Set
.docs.sync: false - Use a changelog note that explains the skip (e.g., "Autolearn ran with no diff evidence; skipped memory updates.")
Evidence hygiene (low-signal diffs)
Treat generated/derived artifacts as low-signal evidence:
- If
changes without correspondingservices/index.json
edits, assume it was refreshed and do not infer new dependency learnings.services/*.md - If
/.opencode/memory/instincts.json
show large rewrites or deletions, assume cleanup and avoid inventing new heuristics from it..opencode/memory/INSTINCTS.md - If changes appear duplicated under both
and.claude/skills/
, assume a mirror/sync artifact:.opencode/skills/- Do not infer new behavior from the duplication.
- In CompoundSpec proposals, only target
(never propose changes to.opencode/skills/**
)..claude/skills/**
- If the diff is primarily additions/deletions under
, assume packaging metadata cleanup/regeneration noise and avoid learning anything beyond "egg-info is generated" unless the prompt explicitly states an intentional packaging change.src/*.egg-info/ - If the diffstat shows changes only under
with no correspondingexamples/
orsrc/
changes, treat it as low-signal for durable learnings; emit emptytests/
/skills
, setinstincts
, and use a changelog note explaining the skip.docs.sync: false
Ticket/process-heavy diffs
- If the diff is primarily ticket/process artifacts (e.g.
,.tickets/*.md
,LOOM_ROADMAP.md
,LOOM_CHANGELOG.md
) with no corresponding product code changes:AGENTS.md- Prefer
that strengthen workflow heuristics (triage, scoping, read-only constraints).instincts.update[] - Avoid creating new skills unless a repeated procedural gap is clearly demonstrated.
- Avoid proposing docs block updates unless a stable always-on principle changed.
- Do not infer or describe product behavior changes.
- Prefer
Prefer updates over creation
Prefer:
to strengthen an existing heuristicinstincts.update[]
to refine an existing skillskills.update[]
only if there is no close matchskills.create[]
Skill updates
- If updating a skill:
- Re-emit the entire final managed body (no diffs/snippets).
- Keep it checklist-like.
Instinct quality bar
- Keep instincts crisp:
- Trigger is a concrete situation.
- Action is a concrete behavior.
- Confidence is 0.6-0.85 unless repeated evidence.
Keep proposals small
- Max 3 skills per run.
- Max 8 instinct updates per run.
Output hygiene
- Output exactly one JSON object.
- Do not wrap in code fences.
- Do not include commentary.
- Use repo-root-relative paths in any markdown content.
Suggested Minimal Template
from prompt (oftenauto.reason
).session.idle
from prompt.auto.sessionID
if you touched skills/instincts/docs; otherwisedocs.sync: true
.docs.sync: false
as a single sentence describing the memory delta.changelog.note
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.