From agent-learning-compounder
Core skill for compiling repo sessions, telemetry, and durable agent-learning recommendations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-learning-compounder:alc-coreThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compile repo truth and session evidence into durable, evidence-backed procedural
references/agent-quickstart.mdreferences/analyst-methods.mdreferences/analyst-queries-catalog.mdreferences/architecture.mdreferences/baseline-repo.mdreferences/capability-map.mdreferences/capability-parity.mdreferences/capability-rubric.mdreferences/cross-repo-gates.mdreferences/distill-sessions.mdreferences/domain-rules-learning.mdreferences/event-schema-evolution.mdreferences/event-sources.jsonreferences/event-sources.schema.jsonreferences/gate-effectiveness.mdreferences/gate-registry.mdreferences/generator-catalog.mdreferences/hermes-dsl-spec.mdreferences/hook-telemetry.mdreferences/mcp-catalog.mdCompile repo truth and session evidence into durable, evidence-backed procedural memory. Prefer bundled scripts over ad hoc parsing.
Initialize once per durable repo:
python3 ../../bin/init_learning_system.py \
--repo "$PWD" \
--runtime "${AGENT_LEARNING_RUNTIME:-codex}" \
--state-dir "$PWD/.agent-learning" \
--install-repo-integration \
--install-hooks \
--self-test
--state-dir) first, then
AGENT_LEARNING_STATE_DIR, then --personal/reports/agent-learning, then
the repo-local default <repo>/.agent-learning when invoked with a repo,
then $XDG_STATE_HOME/agent-learning, then ~/.local/state/agent-learning.domain-rules.active.json; use --domain-rules <json> or --domain-preset tm-norge.latest-approved-gates.md,
latest-skill-context.md), not raw logs.python3 ../../bin/install_runtime_hooks.py --repo "$PWD" --runtime codex --runtime claude --dry-run
python3 ../../bin/install_runtime_hooks.py --repo "$PWD" --runtime codex --runtime claude --apply
From a repo checkout:
python3 ../../bin/init_learning_system.py \
--repo "$PWD" \
--runtime "${AGENT_LEARNING_RUNTIME:-codex}" \
--state-dir "$PWD/.agent-learning" \
--install-repo-integration \
--install-hooks \
--self-test
Use a matching install.sh target first if this repo does not already have the
skill installed in the active runtime root.
.agent-learning.json, local hook runtime config targets, and repo state if no
longer needed.init_learning_system.py so manifests and pointers are regenerated from current
config.agent-learning-compounder backup directory and
rerun bootstrap against the repo with the target state path.--write.needs_verification.agent_compensation gates and
self_healing_loop entries.soul.md, system.md, preferences.md); propose
changes in the report.../../bin/scrub_secrets.py, then validate
generated reports with ../../bin/validate_outputs.py.telemetry flags allow those details.When an LLM/main agent starts work in an initialized repo, read
.agent-learning.json, then load only latest-approved-gates.md and
latest-skill-context.md. Treat them as compact routing/context, not as raw
memory.
When the alc MCP server is available, use it for structured operations:
get_gates: fetch approved gates for the current repo/scope.get_skill_context: fetch current skill-routing context.report_agent_event: record bounded subagent/background-worker lifecycle.report_outcome: record whether a loaded gate helped.propose_gate: queue a candidate gate for review; it does not approve memory.Never send prompts, tool output, transcript chunks, diffs, secrets, or broad environment dumps to ALC MCP/hook telemetry. Record only bounded identifiers, roles, outcomes, and repo-relative scope fields permitted by repo telemetry flags.
scripts/*.py are stable compatibility paths backed by lean runtime files in bin/.
For scratch outputs, create a run directory first: RUN_DIR="$(mktemp -d)".
python3 ../../bin/build_repo_baseline.py --repo "$PWD" --output "$RUN_DIR/baseline.json"python3 ../../bin/extract_sessions.py --path ~/.codex/sessions --path ~/.claude/projects --cwd "$PWD" --days 7 --max-sessions 50 --output "$RUN_DIR/corpus.txt"python3 ../../bin/distill_learning.py --corpus "$RUN_DIR/corpus.txt" --baseline "$RUN_DIR/baseline.json" --output "$RUN_DIR/report.md" --mode all
report.html next to report.md). Override path with --html-output, or pass --no-html to skip.--write, also archives YYYY-MM-DD.html and latest-report.html under personal/reports/agent-learning/.python3 ../../bin/render_html_report.py --corpus ... --baseline ... --output report.html [--payload-json payload.json] (same inputs as distill, HTML only).bin/auto_distill_session is a non-blocking wrapper that forks the full pipeline and writes to $AGENT_LEARNING_PERSONAL (default ~/.agent-learning). Wire it into a Claude Code Stop hook (or Codex equivalent). With --write, learning.md gets one dated line per gate at level ≥ 2 in addition to the summary entry in insights.md.--domain-rules <json> or --domain-preset tm-norge; initialized repos auto-read .agent-learning.json.export_gates.py, map_active_skills.py, extract_skill_usage.py, evaluate_skill_impact.py, export_skill_context.py.refresh_learning_state.py, collect_hook_event.py, install_runtime_hooks.py --dry-run then --apply.distill_learning.py with --write --personal <personal-root> or AGENT_LEARNING_PERSONAL.python3 -m unittest discover -s fixtures/tests, python3 -m unittest discover -s tests, python3 ../../bin/run_pressure_tests.py.Read these surfaces before proceeding with work in a repo:
latest-approved-gates.mdlatest-skill-context.mdagent-learning.jsonreports/ and state manifest outputsIf they are missing, stale, or unreadable, treat the repo as uninitialized.
references/architecture.md: production architecture, trust boundaries, and
runtime contracts.references/agent-quickstart.md: agent-facing operating guide.references/baseline-repo.md: repo baseline behavior.references/distill-sessions.md: transcript mining and quote rules.references/capability-rubric.md: AI-dependence levels.references/output-schema.md: report shape and append behavior.references/gate-registry.md: approved-gate export and next-session loading.references/pressure-tests.md: durable write readiness.references/source-adapters.md: new agent runtimes.references/threat-model.md: writes, network access, and trust policy.assets/report-template.md: report skeleton.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub beeard/agent-learning-compounder --plugin agent-learning-compounder