/doc-mirror:make-ai-operating-systemfrom doc-mirror
WHAT: the architect/compiler for AI operating systems (AIOS, a 'claude system') -- reads the option space, picks the shape, interviews you, emits the directory + operating program. WHEN: 'make me a system / harness / agent-environment for X'; designing a new way of running Claude; building any new claude-system of the doc-mirror class.
Ships in doc-mirror. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A claude system is the context-part of what used to be an agent module. We used to write agent CLASSES — methods, states, interconnected logic for "on session start do X", "each turn do Y", "when you learn something make a skill/rule shaped like Z", "remember context like this", "set up the task list like that", "end the session like this", "loop like this". A claude system is that SAME behavioral program — but externalized into markdown the agent reads and neurally executes, instead of code a runtime calls. The agent IS the interpreter.
So a claude system =
The ESSENCE is the lifecycle-program-as-context. Everything specific (does it produce an artifact? a bijection + closure test? components? continuous vs cron loop?) is just which methods THIS system's program happens to define. doc-mirror is ONE fully-worked instance (its methods = read root→descend, doc(m)-on-change, commit, harvest, compact, rehydrate, brainhook loop) — it is an EXAMPLE, not the template. Do not force doc-mirror's artifact/closure machinery onto every system.
A tight continuous claude system IS a state machine, and it reifies onto the components 1:1. When you design a continuous (or intermittent) AIOS, author these five parts:
{subgraph} + {explanation} + {CoR}).
The agent is always inside one; you never improvise a step outside a state.SYSTEM.md + a state-graph doc + an always-on rule) — the machine
explained back to the agent so it stays legible.
doc-mirror is the worked instance: states = doc-mirror-{init,seework,change,prompts}; cursor =
docmirror-cursor; core loop + router = doc-mirror-boot; hook =
docmirror_transition_guard; reification = STATE_GRAPH.md.The positioning (why this matters to people): what the market calls an "AI Operating System" is exactly this — the folder the AI lives in + a frontend, with the core loop + states-as-skills + hooks on top. The folder-structure-the-agent-lives-in IS the OS; agents and skills sit on top of it. When you design one, you are not "adding plugins" — you are authoring the OS the agent runs in.
Equip/read, as relevant to the request:
understand-advanced-claude-code — the 7 components (CLAUDE.md, skills, hooks, MCPs, slash-commands,
subagents, plugins) + system-level patterns. This is the vocabulary you reason in.gnosys-plugin-v2/doc-mirror-system/SYSTEM.md + context/architecture.md
DOC_MIRROR_SYSTEM.md — ONE worked claude system, to see a full program rendered as context.claude-system-diagram-set rule (the SYSTEM.md 4-diagram standard).meta-prompt-engineering (to refine every emitted artifact), compile-claude-code-component
(to build any component the design needs, per-component), add-to-defaults (to persist skills).Before asking the user anything, think through the option space aloud, e.g.: "A licensing thing… could be a single skill, or a skill + an MCP, or a dir the agent loops in via cron+queue, or a whole harness. A team is overkill. Probably: a dir with a queue + an add-to-queue skill + a cron runner — i.e. intermittent run-mode, light program." Narrow to 1-2 candidate shapes WITH the reasoning, so the interview is about confirming/choosing, not blank discovery.
Ask ONE question at a time, 2-4 options each (recommended-first, from your STEP-2 reasoning) + free-type. Don't ask a fixed form — ask the questions YOUR reasoning surfaced. The decisions to land:
compile-claude-code-component.===ONLY EDIT IF SYSTEM CHANGES===, read-first (per the diagram-set rule). A trivial single-dir/single-file system may
inline an abbreviated map in its CLAUDE.md instead.compile-claude-code-component once per component.meta-prompt-engineering theoretical pass —
every fragment commands in the correct direction, unambiguous, no info loss; (b) SHOW the user the
artifact/diff → AskUserQuestion approve/revise/scrap → loop until approved. The user is the
architect; do not advance on your own say-so. Later artifacts build on earlier ones.Well-formed when: the dir-environment exists; the operating program (the chosen lifecycle methods) is authored as context; SYSTEM.md/inline-map exists; the run-mode mechanism is in place (skill / cron+queue wired-but-not-installed / brainhook wired-but-OFF); every component built; and the user has signed off on every artifact. Methods/layers the shape didn't need are correctly ABSENT — a one-skill answer is complete as one skill. Do not invent machinery the shape didn't call for.
doc-mirror-init: rebuild the doc-mirror instance into a dir (guarded).With understand-advanced-claude-code (know the components) + compile-claude-code-component (build
one) + this skill (architect the system) + meta-prompt-engineering (refine), this is the skill set
for actually using Claude Code for real: program the agent's behavior as context, not as code.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sancovp/doc-mirror --plugin doc-mirror13 skills in this plugin
/check-sophia-progressWHAT: check the live status of the Sophia rollup / cohere worker — is the daemon running, how far BEHIND it is (how many journals not yet cohered / the lag between newest journal and newest momentum), and how many issues meta-Sophia has flagged. WHEN: when you want to know if Sophia is running + caught up, when a rehydration or decided-logic query looks stale, when you suspect the rollup died, or when the user asks 'is sophia running / caught up / how far behind / how many meta issues' (any of)./distill-to-essential-transformWHAT: a thinking move -- collapse a complex system to its one-sentence ESSENTIAL TRANSFORM (input->output->artifact) and rebuild it at the LOWEST sufficient mechanism, borrowing reliability from a substrate you do not own. WHEN: a system feels too heavy/fragile to depend on; a built thing was forgotten but its function keeps recurring; turning a system into a util/skill; user says distill / collapse / simplify / 'what does this actually do' / 'make it just instructions'.Other plugins' skills for the same job
/doc-mirrorWHAT: THE LAW of doc-mirror -- the 4 legal doc-layer file kinds, deterministic addressing, the doc(m) template, the closure test, fork-on-change. The invariant every state operates under. WHEN: you need the rule for what a doc(m)/vision(m)/journal/tracker IS or where it lives; classifying a doc-layer file; unsure whether an action is legal in the machine.