Why: AGENTS.md is preloaded into every session via CLAUDE.md's @AGENTS.md import, so every word is a tax paid whether or not it is relevant. It had grown to 3,371 words (~4,550 tokens), 75% of it a single "Setup and testing" section that was mostly neither: roughly 1,600 words were gate forensics — why a hook is shaped the way it is, what was tried and rejected, verification numbers — and only ~390 words were genuine one-time setup. Implementation notes: split three ways by audience rather than by heading. One-time setup, prerequisites and test commands move to a new root README.md, which did not previously exist. The gate forensics move to a new docs/spec/gates.md, preserving every constant, hook ID, error string and tried-and-rejected note (policy.fetch_failure_default, the removed fallback frontmatter reader, extending skill-size-check's files: pattern to agents, tidying .claude/settings.json out of the pretty-format-json exclude list) — these exist to stop settled decisions being re-litigated, so none were dropped. AGENTS.md keeps only what applies every session, at one clause of rationale per rule. The .apm/-mirror section collapses to a pointer because docs/spec/architecture.md already covers it in full. The hot ADR-0020 gate counts stay in AGENTS.md deliberately: they block any skill edit today. Also corrects docs/spec/architecture.md's stale claim of 19 ADRs; ADR-0020 landed without updating the count. Impact: per-session preload drops from ~4,550 to ~1,116 tokens, a 75% cut. agentsmd-audit passes: secrets clean, drift clean, 4 informational findings for sections deliberately relocated to the README.
holocron
The global AI development configuration repository — the authoritative source for agent definitions, skills, workflows, and prompts across all projects. Built as a homelab tool intended to scale to professional environments.
Content ships as six installable plugins, each an apm (Agent Package Manager) package. This repo consumes its own plugins through apm, so the working copy runs the same released content every other consumer gets.
Repo layout
| Path | What it holds |
|---|---|
plugins/ |
Six apm packages — bin, core, git, gitea, kyberforge, lint — each carrying skills, agents, hooks, MCP servers, and bundled assets |
providers/claude-code/ |
Claude Code adapter, deployed to ~/.claude/ via scripts/install.sh |
core/ |
Provider-agnostic always-on content — core/AGENTS.md and core/instructions/ |
docs/ |
Specs (docs/spec/), architectural decisions (docs/adr/), governance, research, and notes |
scripts/ |
Install, sync, and check scripts used by the git hooks |
tests/ |
run-tests.sh, run-bats.sh, the test-*.sh suites, and the bats submodules |
The six plugins:
- kyberforge — skills and agents for creating, maintaining, and managing a Claude Code / Copilot CLI plugin marketplace
- git — conventional commits, branch management, pull requests, feature flow
- gitea — issues, pull requests, milestones, releases, wikis
- core — authoring and auditing a repo's
AGENTS.mdand the provider adapter files that defer to it - lint — configuring and running linters
- bin — a place for things to be binned
Prerequisites
Install all of these before setting up. Each one is a hard dependency of a git hook or a script — several fail with an unhelpful "command not found" if missing.
| Tool | Why | Install |
|---|---|---|
apm CLI |
Four pre-push hooks shell out to it (apm-marketplace-check, apm-audit-ci, apm-pack-check-clean, and check-plugin-content-sync via scripts/sync-plugin-content.sh) |
The apm-install skill, or curl -sSL https://aka.ms/apm-unix | sh. Verify with apm --version |
jq |
Required by scripts/check-manifests.sh and scripts/sync-plugin-content.sh, both pre-push |
Your package manager |
python3 + PyYAML |
Required by scripts/skill-size-check.sh (the skill-size-check pre-commit hook), which reads folded YAML frontmatter |
python3 is usually present — pre-commit is itself a Python application. pip install pyyaml if the hook reports PyYAML missing |
vale |
Required by the vale-audit-prefilter-skill / -agent pre-commit hooks and the check-vale-style-sync pre-push hook |
brew install vale (macOS), snap install vale (Linux), choco install vale (Windows), or https://vale.sh/docs/vale-cli/installation/ |
claude CLI |
Required by the validate-plugins and validate-marketplace pre-push hooks |
Claude Code |
Two notes worth reading before you skip one:
- PyYAML is a hard requirement, not an optional accelerator. The hand-rolled fallback frontmatter reader was removed deliberately: a reader that mis-parses an unfamiliar scalar shape reports a clean pass on a file it never measured.
- No
vale syncis needed. TheKyberforgestyles are committed underplugins/kyberforge/.apm/skills/{skill-audit,agent-audit}/assets/vale/styles/, not downloaded packages (ADR-0014).
Setup
Run these in order, from the repo root.
# 1. Deploy this repo's own skills and agents
apm install
# 2. Install the git hooks — all three stages
# (use the `pc-run` skill, which knows the stage wiring)
apm install deploys the six plugins into .claude/skills/ and .claude/agents/. Both are gitignored install output, not authoring source — plugins/<name>/.apm/ remains the only place to edit. It needs the network, materializes apm_modules/ (which stays gitignored), and also configures the obsidian MCP server into the repo's .mcp.json.
Git hooks go in via the pc-run skill, wiring all three stages. This repo's .pre-commit-config.yaml has no default_install_hook_types, so a plain pre-commit install silently skips commit-msg (Conventional Commits) and pre-push (the full gate).
Keeping the install current
The six dependencies in root apm.yml are unpinned against the default branch, so deployed skills go stale whenever anyone merges. kyberforge ships a SessionStart hook that runs apm outdated at startup (~0.7s) and, when something is behind, runs apm update --yes and asks the host to re-scan skills (~10.4s).
That rewrites apm.lock.yaml — an unexplained modification to it after opening a session is expected, not a bug. Commit or discard it deliberately.
Note the difference between the two commands:
apm installdeploys fromapm.lock.yaml. It does not pick up remote changes.apm updatere-resolves refs. This is the command that pulls in a merged.apm/edit.
Running tests
bash tests/run-tests.sh # every test-*.sh script plus the bats suite
bash tests/run-tests.sh --bats-only # just bats
The first run auto-initializes the bats submodules; no manual git submodule update needed.
A suite that exits 77 because a dependency is missing is reported as SKIPPED and does not fail an ad-hoc run. It does fail under --strict (equivalently RUN_TESTS_STRICT=1), which is how the pre-push hook invokes it — at pre-push, a skip means one of the prerequisites above is absent on this machine, and the gate would otherwise report success having run fewer suites than it appears to. The strict failure names each skipped suite and what to install.
Before pushing
Run the whole pre-push gate locally in one command:
pre-commit run --hook-stage pre-push --all-files
See docs/spec/gates.md for what each hook enforces and why.
Offline? Exactly two pre-push hooks need the network, because root apm.yml's marketplace contains one remote package entry that must be resolved with git ls-remote:
SKIP=apm-marketplace-check,apm-pack-check-clean git push
Skip only those two. The remaining pre-push hooks are real local checks and pass offline; adding one of them to SKIP disarms it silently.
Editing plugin content
plugins/<name>/.apm/ is the only hand-edited source for plugin content — skills, agents, commands, instructions, extensions, and hooks. The flat plugins/<name>/{skills,agents,commands,instructions,extensions}/ directories, the merged hooks/hooks.json, and every plugin.json / marketplace.json manifest are generated. Nothing labels a generated file as generated, so check the path before you edit; an edit to the mirror is discarded by the next sync and reported as drift by the check-plugin-content-sync pre-push hook.
Hand-authored material that is not an .apm/ primitive — README.md, docs/, bin/, sources.md, .mcp.json — lives at the plugin root and is untouched. Never place such a file inside a mirrored directory: the sync removes the destination before every copy, so it is deleted with no drift report.
Full detail in docs/spec/architecture.md.
For external consumers
Install a plugin natively from the marketplace manifests:
claude plugin install <name>@holocron
Or consume the packages through apm, the way this repo does — declare them as dependencies.apm git+path entries against the holocron remote and run apm install.
Where to go next
AGENTS.md— the rules for AI agents working in this repoCONTEXT.md— domain language; read at the start of every session heredocs/spec/architecture.md— directory structure, install pipeline, provider modeldocs/spec/gates.md— the enforcement gates in depthdocs/adr/— architectural decisions; read before proposing structural changesdocs/VISION.md— where this is goingLESSONS.md— things that went wrong once and should not again