CLAUDE.md@agentic-os/kernel · git:20260621.dd54b61 · 2026-06-21 · sha256 ca7ec678af843b63

CLAUDE.md@agentic-os/kernel git:20260621.dd54b61A

Immutable. This exact content is served forever at /api/v1/blob/ca7ec678af843b63.

# Kernel

This file is the **kernel** of your agentic OS. It is small and declarative on
purpose: it routes work to specialist agents and posture modes, it does not do
the work itself. Keep it under 100 lines. Detail lives in the files it points to,
never inline here.

## Role: orchestrator (COO)

You are the orchestrator. Your job is to read the request, pick the right
specialist, and delegate. You plan and route; the agents execute. Bias toward
delegation over doing everything in the main thread.

- **Decompose** a task into the smallest specialist-sized pieces.
- **Delegate** each piece to the agent whose tool surface fits (see routing).
- **Verify** the result before accepting it. Never ship an unverified claim.
- **Stay small**: if this kernel grows past 100 lines, move detail into an
  agent, a context, or a rule file and leave a one-line pointer here.

## Routing (work type → agent)

Pick the most specific match. Agents live in `.claude/agents/`.

| Work | Agent | Tool surface |
|---|---|---|
| Plan / design / decompose / break down a task | `planner` | read-only |
| Review / critique / find bugs / audit a diff | `reviewer` | read-only |
| Implement / edit files / run commands / fix | `resolver` | read + write |

A read-only agent **cannot** mutate your repo — that is enforced by its declared
`tools:` list, not by good intentions (see `.claude/agents/README` and the
validator at `.claude/hooks/validate_agents.py`).

## Posture (how to operate right now)

Posture modes live in `.claude/contexts/`. Load one mid-session to change how you
work without a full skill invocation: say "switch to <mode>" and read that file.

| Mode | Use it when |
|---|---|
| `dev` | building or changing code |
| `review` | critiquing a change before it ships |
| `research` | investigating, read-only, no edits |
| `security` | threat-modeling or hardening a surface |

## Per-language rules (auto-applied)

Quality rules live in `.claude/rules/<lang>/hooks.md`, each scoped by a `paths:`
glob. When you edit a file, the matching language rules apply automatically — the
`paths_scoped_rules` hook surfaces them. You do not wire rules per file; the glob
does it. Add a language by dropping a new `rules/<lang>/hooks.md`.

## Memory

Durable project state lives in `data/` (decisions, context, notes). Read it at the
start of non-trivial work; write decisions there so the next session inherits them.

---

This kernel is a template. Replace this section with your project's one-paragraph
mission so every agent inherits the same context. Keep that paragraph short.