Architecture overview

Source: docs/architecture/overview.mdVerified 2026-10-16

developer-os has no process of its own. Its architecture is what Claude Code loads, when, and what the agent then reads and writes on the user's behalf.

1. Repository layout

.claude-plugin/marketplace.json   marketplace: one plugin, source ./plugin
plugin/                           the installed payload
  .claude-plugin/plugin.json      name, version, description, license, keywords
  rules/core.md                   core rules, printed by a SessionStart cat hook
  SURFACE.txt                     public names, checked against the disk
  hooks/hooks.json                4 hooks, 10-second timeouts
  hooks/state-card.py             SessionStart: state card after compaction or resume
  hooks/guard.py                  PreToolUse guard for Bash
  hooks/capture-nudge.py          Stop hook: session wrap-up nudge
  skills/<name>/SKILL.md          28 skills
  agents/<name>.md                6 agents
  output-styles/<name>.md         4 output styles
  vault-template/                 copied by brain-setup
templates/project/                project template (not installed)
scripts/install-codex.sh          Codex installer, run by hand (not installed)
evals/                            claude plugin eval cases (not installed)
tests/*.test.sh                   hook tests
.agnix.toml                       agnix lint settings for CI
scripts/check.sh                  the repository suite, also run by CI
docs/                             this documentation; docs/plans/ is git-ignored
site/                             public documentation site, published by .github/workflows/pages.yml

Only plugin/ reaches a user's machine through the marketplace. templates/ and evals/ stay in the repository; skills that mention them say so.

2. Load model

What occupies the context of a session, and when:

PartWhen it loadsSize todayLimit
rules/core.mdEvery SessionStart: startup, resume, /clear, compaction, forkJust under the limit8192 bytes (scripts/check.sh); Claude Code caps hook output at 10,000 characters
State cardAfter a compaction or resume inside a git repositoryUp to 1024 bytesThe CAP in state-card.py; the check keeps rules plus card under 10,000
Skill names and descriptionsEvery session, by Claude Code's skill listing10065 characters for 28 skills80–1024 each, 12000 total
Agent and output-style descriptionsEvery session, by Claude Code's listingsSmallNone in check.sh
A skill's bodyWhen the model or the user invokes it0.7–8.8 KB per SKILL.md fileOne screen where possible (CONTRIBUTING)
An agent's bodyWhen a skill or the main agent dispatches it, in the subagent's own context2.0–3.9 KB per file—
An output styleWhen selected; replaces the default style but keeps coding instructions0.6–1.8 KB—

The fixed cost per session is the core rules plus the listings. Everything else is paid only on use, which is why conventions live in skills and not in the core rules.

3. Hook pipeline

Hook pipeline: Claude Code runs cat core.md and, after compact or resume, state-card.py on SessionStart, guard.py on PreToolUse for every Bash call, and capture-nudge.py on Stop Claude Code SessionStart: cat core.md, state-card.py PreToolUse: guard.py Stop: capture-nudge.py session starts / resumes / compacts after compact/resume stdout = core rules, plus a state card every Bash call, JSON on stdin {"permissionDecision":"ask", reason} nothing (allow normal flow) or agent finishes a turn, JSON on stdin "Run the developer-os:session-retro skill..." exit 0, nothing or additionalContext

The three scripts are Python 3, standard library only; without python3 they fail open. Exact inputs, outputs and switches: reference/hooks.md.

4. Skill composition

Skills call each other by name and dispatch agents. The dependencies that exist today:

Skill composition: which skills invoke other skills and agents (solid arrows) and which hand off through the backlog or an offer (dotted arrows) backlog items backlog BASE items offers offers checks loads pr-cycle audit-to-backlog spec project-baseline fix-pr code-review implement-backlog code-reviewer fresh verifier: Codex or verifier agent security-auditor performance-engineer qa-expert defensive-coding-conventions testing-conventions bug-triage deploy-checklist session-retro brain-setup research-analyst brain-capture brain-search

Every dispatched agent answers with a final status (DONE, REVIEW, BLOCKED, CONTINUING) that the orchestrating skill reads before integrating. Solid arrows are invocations; dotted arrows are hand-offs through a file (the backlog), an offer the user accepts, or a step one skill borrows from another (fix-pr applies pr-cycle's Trust check). The backlog contract shared by audit-to-backlog, project-baseline and implement-backlog is the Backlog: <todo path>, <done path> line, defaulting to TODO.md and TODO-done.md (reference/configuration.md).

5. Data flows

FlowReadsWritesLeaves the machine?
Session startrules/core.md; after compaction or resume, git state and docs/plans/.devos-state.md of the repository root—As context to the model provider
Task state—docs/plans/.devos-state.md (implement-backlog, pr-cycle, audit-to-backlog)No
Brain searchVault Markdown (rg), skipping _archive/, templates/, _views/—Notes read go to the model provider
Capture / compileSession context; vault for duplicatesOne file in _inbox/Only as context
Review / gardenVaultNamed moves and edits; _reports/garden-log.mdOnly as context
Setupvault-template/, ~/.claude/CLAUDE.md, ~/.claude/settings.jsonVault files; the two config editsNo
Skill usage~/.claude/projects/**/*.jsonl (counts only, --no-filename)—Counts only, as context
Session retrogit, gh pr list (read-only)Approved items onlygh queries GitHub
PR skillsgit, ghCommits, pushes, PR body, thread replies after approvalYes, to GitHub, after approval
VerifierThe claim and the repository path—To Codex's provider when the Codex plugin is used
Codex installer (by hand)plugin/skills/, core.md, ~/.claude/CLAUDE.md~/.agents/skills/<name>, a marked block in ~/.codex/AGENTS.md and its backupNo
Routines (optional, user-built)The vault repository in Anthropic's cloud_inbox/ notes, an issue commentYes; see workflow.md

The plugin makes no network call itself. What the agent reads becomes model context; an agent with web tools could send it further, which the plugin cannot prevent (SECURITY.md).

6. Trust boundaries

BoundaryUntrusted inputControl
Vault notesText a past session or a phone capture wroteSkills treat notes as data and never run commands or open URLs from them; phone captures arrive in _inbox/
PR review comments, issues, CI logs, code commentsAnyone who can comment, file an issue or push codefix-pr, pr-cycle, bug-triage and code-review treat them as data and flag text that tries to instruct the agent; fix-pr flags non-collaborators; four injection-* evals check it
Code, diffs, fixtures, fetched pagesThe reviewed repository or the webEvery agent prompt states they are data; research-analyst never fetches a URL built from local file contents
External repositories.claude/settings.json, hooks, .mcp.json of a client or OSS repoCore rule: read them before the first session, use a sandbox or plan mode, never copy them into user config unread
Subagent outputA delegate's editsCore rule: auth/2FA/security changes from a subagent are unauthorized until reviewed; compare git status and git diff
Plugin updatesA new commit's hooks and rulesSECURITY.md: review the diff from the installed commit before updating; auto-update is off by default
Session transcriptsPast conversationsOnly skill-usage reads them, and only counts; session-retro and docs-sync never open them

7. Validation

scripts/check.sh is the single local gate, run before every commit and by .github/workflows/check.yml (after an agnix lint step) on pushes to development and main and on pull requests. Its stages and prerequisites are in development.md. Behavior is checked separately by the evals, by hand (evals/README.md).