Skip to content

// architecture

The whole thing, mapped.

An interactive map of how MasterMind works: the kernel → the router → a field pack, the skills and agents it draws on, and the safety layer that keeps it honest. Tap or click to explore.

01 / 04

How a request flows

From what you type to a verdict you can trust.

  1. You ask

    You describe what you want in your own words. There is no command to learn: the kernel recognises the intent. README.md

  2. Kernel

    CLAUDE.md, the only part loaded in every session: the prime directives, the operating loop and the menu of skills and agents. CLAUDE.md

  3. Router

    ROUTER.md is a generated map. It pulls in the few core docs and field-pack files this task needs and leaves the rest on disk. engineering/ROUTER.md

  4. A skill

    A workflow that runs in the same conversation: build, debug, qa and the rest. One job each, picked from what you asked. skills/README.md

    An agent

    A role that works in its own clean context and reports back, so a review is not graded by the context that wrote the code. agents

  5. not green: fix, verify again · back to step 4

    Verify

    The work is run and checked before handoff. A claim with no tool result behind it is reported as not checked. engineering/core/rigor.md

  6. Verdict

    Every report closes with one of four verdicts in plain words, the evidence for it, and a line naming what was not checked. engineering/core/rigor.md

02 / 04

What an install writes

Three tools, three ways of loading, one brain in your project.

    Claude Code

    Reads .claude/CLAUDE.md on its own at the start of every session and again after compaction. Skills and agents are native.

    .claude/CLAUDE.md

    The kernel, loaded natively and re-read after compaction. An existing file gets a pointer appended, never overwritten. CLAUDE.md

    .claude/skills

    Every skill linked where Claude Code discovers skills, so it picks one from its description or by name. skills

    .claude/agents

    The isolated-context roles as native subagents: design, review, restructuring, adopt or build. agents

    SessionStart hook

    One entry merged into .claude/settings.json. It carries the framing at session start; every other key is left as it was. hooks/session-start.sh

    Cursor

    Has no kernel file of its own, so the kernel rides in a rule that Cursor sends again with every request.

    .cursor/rules/mastermind.mdc

    alwaysApply: true with the kernel inlined. It is re-sent on every request, so nothing has to survive compaction. CLAUDE.md

    .cursor/agents

    Generated copies of the agents as Cursor subagents, so a review runs in its own context there too. agents

    sessionStart hook

    Wired to Cursor's published schema, and unverified: Cursor has open bug reports where a hook's context never reaches the model. The rule carries the weight. hooks/session-start.sh

    Codex

    Reads AGENTS.md once at startup, after you trust the project. A hook brings the framing back when context is compacted.

    AGENTS.md

    The instruction file Codex reads at startup. It carries the kernel; an AGENTS.md of your own gets the kernel in a marked block after your content. AGENTS.md

    .agents/skills

    Every skill linked where Codex discovers skills, picked by its description or by $name. skills

    SessionStart hook

    Restores the framing after compaction, which AGENTS.md alone does not. Inert until you approve it once. hooks/session-start.sh

  • .mastermind/

    The project's own copy of the brain: kernel, core, field pack, skills, agents. Every tool's wiring points here.

03 / 04

The layers

One small kernel is always loaded. Everything under it loads when a task calls for it.

  1. Kernel

    CLAUDE.md, the only part loaded in every session: the prime directives, the operating loop and the menu of skills and agents. CLAUDE.md

  2. Universal core

    Field-agnostic documents read on demand: the mindset, the decision framework, the rigor gate and the execution loop. engineering/core

    • agent-loop
    • clarity
    • mindset
    • principles
    • product-sense
    • rigor
    • spec-driven
  3. Field pack

    What to know and which tools, for one real stack. None ships: init detects the stack and builds the pack from the template. engineering/fields/_template

    • audit-rules
    • curriculum
    • field
    • learning-sources
    • lessons
    • mentors
    • stack-defaults
  4. Agents

    Few and deep. Each runs in a fresh context: design, review, restructuring, and adopt-or-build decisions. agents

  5. CLI

    Installs the brain and answers an assistant mid-task: the routing table, one skill, one agent, the wrong-log. The lookups are read-only. bin/mastermind

  6. Hooks

    A short note at session start that points at the kernel, so the brain is present even where nothing else carries it. hooks/session-start.sh

  7. The Mod

    Opt-in code that enforces what the kernel asks for: one question before anything that cannot be undone. It only tightens. mod/README.md

    • irreversible
    • mod
    • signals

04 / 04

Spec-driven, in order

For a feature that spans sessions or touches money, authentication or data.

  1. assess: Is it worth building?

    on diskideas/<name>.md: go, clarify or stop, with evidence

  2. constitution: The rules

    on diskconstitution.md: versioned MUSTs every feature is checked against

  3. living-docs: What is true today

    on diskproduct.md · business.md · tech.md, kept current

  4. specify: What and why

    on diskNNN-feature/spec.md: stories, requirements, success criteria

  5. blueprint: How

    on diskplan.md, research.md, data-model.md, contracts/, quickstart.md

  6. checklist: Is the spec complete?

    on diskchecklists/<concern>.md

  7. breakdown: The steps

    on disktasks.md, grouped so each user story ships alone

  8. analyze: Do the documents agree?

    on disknothing: a read-only report

  9. converge: Is it really done?

    on diskappends whatever the code still lacks to tasks.md