plugins/agent-agentic-os/skills/os-guide/SKILL.md
Trigger with "explain agentic os", "how do I set up a persistent agent environment", "what is the CLAUDE.md hierarchy", "explain the context folder structure", "how does session memory work", "what is soul.md or user.md", "explain auto-memory or MEMORY.md", "what is a loop scheduler or heartbeat", or when the user asks for the canonical guide.
npx skillsauth add richfrem/agent-plugins-skills os-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ../../requirements.txt for the dependency lockfile (currently empty — standard library only).
The core insight: LLMs are stateless functions. CLAUDE.md is the only file loaded by
default into every conversation. The Agentic OS pattern turns this constraint into a
full operating system metaphor.
| OS Concept | Agent Equivalent |
|------------|-----------------|
| Kernel | CLAUDE.md hierarchy (global -> org -> project -> local) |
| RAM | context/ folder (soul, user prefs, memory) |
| Disk | context/memory/YYYY-MM-DD.md dated session logs |
| Stdlib | skills/ procedural knowledge bundles |
| Processes | .claude/agents/ sub-agents with isolated context |
| Shell | .claude/commands/ slash commands |
| Cron | /loop + heartbeat.md scheduled background tasks |
| Boot | START_HERE.md + MEMORY.md bootstrap on session start |
| Autoresearch Loop | os-eval-runner + improvement-ledger.md |
| Category | Skill | One-liner |
|---|---|---|
| Orchestration | os-improvement-loop | Multi-agent concurrent loop: ORCHESTRATOR + PEER + INNER |
| Evaluation | os-eval-runner | Autoresearch eval engine — scores and gates SKILL.md iterations |
| Evaluation | os-eval-lab-setup | Bootstraps isolated lab repos for eval runs |
| Evaluation | os-eval-backport | Reviews lab results, applies approved changes to master |
| Mutation | os-improvement-loop | RED-GREEN-REFACTOR routing accuracy improvement |
| Memory | os-memory-manager | Session log writing, L2→L3 promotion, deduplication |
| Reporting | os-improvement-report | Progress charts from results.tsv + improvement ledger |
| Bootstrap | os-init | Deploys kernel.py, agents.json, Triple-Loop files to new project |
| Utility | os-clean-locks | Clears stale .locks/ directories after agent crash |
Agents (not skills): Triple-Loop Retrospective (trigger/diagnostic), os-health-check (liveness), agentic-os-setup (bootstrap interview)
Execute these phases in order. Do not skip phases. This skill uses Progressive Disclosure. Load only what you need:
references/architecture/claude-md-hierarchy.mdreferences/architecture/context-folder-patterns.mdreferences/operations/loop-scheduler.mdreferences/architecture/sub-agents-and-hooks.mdreferences/memory/memory-hygiene.mdreferences/architecture/canonical-file-structure.mdreferences/research/optimizer-engine-patterns.md and references/research/karpathy-autoresearch-3-file-eval.mdWhat Anthropic ships natively:
MEMORY.md) - Claude writes this itself with build commands, style prefs, architecture decisions/loop command for cron-style scheduling (up to 50 tasks per session, auto-expire after 3 days)SKILL.md-based procedural knowledge bundles.claude/agents/ with isolated tool contextsWhat the community layered on top:
context/soul.md, context/user.md, context/memory/{date}.md folder conventionsSTART_HERE.md bootstrap prompt patternheartbeat.md scheduled task definition filesEvery line in
CLAUDE.mdcompetes for attention with actual work. Keep it under 300 lines. Focus on what Claude would get wrong without it. Use@import context/soul.mdto load identity on demand, not always.
Ask the user which aspect they need help with:
references/architecture/canonical-file-structure.md, walk them through the setupos-memory-manager skillTriple-Loop Retrospective agentreferences/architecture/claude-md-hierarchy.md for scope precedenceEvery significant work session — especially eval runs, skill edits, backports, and agent loop completions — must close through this two-phase protocol. Do not consider a session complete without running both phases.
Session Lifecycle Invariant: The OUTER loop (
os-improvement-loop) owns session lifecycle. INNER loops (os-eval-runner) never close a session. A session is incomplete until Phase 6 is executed.Triple-Loop Retrospective(agent) is the trigger/diagnostic layer that feeds both Triple-Loop orchestration cycles — it detects friction and identifies targets;os-improvement-loop(skill) is the execution protocol the agents follow once a target is identified.
Work → Backport/Ship → Phase 6: Capture → Phase 7: Improve
[!NOTE] Dependency: Requires os-memory-manager (agent-agentic-os plugin). See INSTALL.md for instructions.
After any backport, eval run, or skill change:
Invoke os-memory-manager to write a dated session log and promote non-obvious
findings to long-term memory. Apply the non-obvious filter:
- CAPTURE: snags, footguns, scoring behaviors, architectural decisions, ADAPT patterns
- SKIP: routine score improvements, changes self-evident from the diff
What to capture:
Where it writes:
context/memory/YYYY-MM-DD.md — dated session log (git-tracked, not temp/)context/memory.md — promoted long-term facts with dedup IDsMEMORY.md system — cross-session feedback entriestemp/retrospectives/; loop sessions (os-improvement-loop) write to context/memory/retrospectives/. post_run_metrics.py only scans context/memory/retrospectives/ — lab surveys are not counted in loop metrics.When routing accuracy reveals a weak skill, invoke os-improvement-loop with the target skill
and a locked eval set. The loop runs mutate→eval→KEEP/DISCARD cycles until improvement is
confirmed, then os-eval-backport gates the winner to production.
→ See os-improvement-loop SKILL.md for invocation details.
1. Work / Eval Run / Backport
2. os-eval-backport → ACCEPT/ADAPT/REJECT each change, apply to master
3. os-memory-manager → Session log + promote non-obvious findings (Phase 6)
4. os-improvement-loop → Harden any skill whose routing was found weak (Phase 7)
5. Commit + push → Close the loop in git history
This Triple-Loop is what makes the OS self-improving. Skipping Phase 6 or 7 means knowledge evaporates at session end and skill quality drifts.
os-memory-manageragentic-os-setupTriple-Loop Retrospectivereferences/operations/loop-scheduler.mdAfter answering the user's question, emit a friction event for anything that was unclear, missing from the references, or required more turns than expected to explain:
# Only emit if friction was encountered — do not emit if explanation was clean
python context/kernel.py emit_event --agent os-guide \
--type friction --action encountered \
--summary "step:[which-reference] cause:[what-was-unclear]"
Then answer: What one addition to the guide references would have made this explanation
clearer or faster? Record the answer as a comment in the next session log or flag it
to Triple-Loop Retrospective if the same gap appears across multiple sessions.
tools
Ingests repository files into the ChromaDB vector store. Builds or updates the vector index from a manifest or directory scan using ingest.py. Use when new files need to be indexed or the vector store is out of date. <example> user: "Index these new plugin files into the vector database" assistant: "I'll use vector-db-ingest to add them to the vector store." </example> <example> user: "The vector store is missing recent files -- update it" assistant: "I'll use vector-db-ingest to re-index the changes." </example>
data-ai
Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. <example> user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned chunks." </example> <example> user: "The vector database has chunks for files that no longer exist" assistant: "I'll run vector-db-cleanup to prune them." </example>
testing
Audit Vector DB coverage -- compares the live filesystem manifest against the ChromaDB index to identify coverage gaps.
development
3-Phase Knowledge Search strategy for the RLM Factory ecosystem. Auto-invoked when tasks involve finding code, documentation, or architecture context in the repository. Enforces the optimal search order: RLM Summary Scan (O(1)) -> Vector DB Semantic Search -> Grep/Exact Match. Never skip phases.