// 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.
You ask
You describe what you want in your own words. There is no command to learn: the kernel recognises the intent.
README.mdKernel
CLAUDE.md, the only part loaded in every session: the prime directives, the operating loop and the menu of skills and agents.
CLAUDE.mdRouter
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.mdA 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.mdAn 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.
agentsnot 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.mdVerdict
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.
agentsSessionStart 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.shCursor
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.
agentssessionStart 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.shCodex
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.
skillsSessionStart 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.
Kernel
CLAUDE.md, the only part loaded in every session: the prime directives, the operating loop and the menu of skills and agents.
CLAUDE.mdUniversal 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
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
Skills
A growable library of workflows. Each is one job with a short routing description and a body that loads only when it runs.
skillsAgents
Few and deep. Each runs in a fresh context: design, review, restructuring, and adopt-or-build decisions.
agentsCLI
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/mastermindHooks
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.shThe 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.
constitution: The rules
on diskconstitution.md: versioned MUSTs every feature is checked against