Skip to main content

Agent Architecture

Agents are role-scoped adapters behind Lumie's routing system. They are not a dispatcher layer, a replacement for the main execution loop, or an approval mechanism. The main agent still owns Dispatch Lock, loop state, scope control, and the final report.

Role Model

RoleResponsibilityBoundary
Main agentFrames the task, resolves owner surface, applies the accepted loop, integrates evidence, and reports outcomeDoes not bypass Plan Mode, hooks, checks, or human-owner coverage
Specialist writerMakes bounded edits inside an explicit repo, module, or file scopeDoes not own unrelated files or revert user changes
Reviewer agentReads a diff or document surface and returns severity-ordered findingsProduces evidence; does not approve the work
Checker agentProduces policy, risk, security, contract, or consistency evidenceCannot replace tests, hooks, or human-owner review
Human ownerHolds mandatory review ownership for the changed surfaceRequired owner coverage is not satisfied by agent evidence

This model keeps agents useful without turning them into an unreviewable workflow harness.

Routing Layers

Agent selection flows through three routing layers:

  1. .codex/AGENTS.md establishes the entry gate, owner surface, Dispatch Lock, and whether a specialist is needed.
  2. .codex/routing/repos/*.md maps product repo work to writer guidance, verifier guidance, and repo-specific rules.
  3. .codex/routing/review-matrix.md maps the actual diff to required human owners, reviewer agents, checker agents, and Verify-phase evidence.

The output of this routing is an evidence plan. It does not grant permission to skip verification or ownership.

Agent Families

FamilyPurposeExamples
Writers and scaffoldersMake bounded edits inside a routed write scopefrontend-scaffolder, backend-scaffolder, worker-scaffolder, lumie-doc-author, codex-md-author
ReviewersRead a diff or document surface and return findingsfrontend-reviewer, backend-reviewer, worker-reviewer, lumie-doc-reviewer, lumie-doc-i18n-reviewer
Checkers and tripwiresProduce policy, risk, security, or contract evidencesecurity-tripwire, anti-pattern-tripwire, api-contract-checker, lumie-risk-scorer
Verification specialistsRun or summarize affected checks for a repo surfacefrontend-test-orchestrator, backend-test-orchestrator, worker-test-orchestrator, performance monitors
Explorers and domain specialistsAnswer navigation, terminology, or architecture questions without editingcodebase-explorer, infra-explorer, lumie-domain-expert, lumie-architect
CuratorsMaintain rules, references, and learning artifactsreference-curator, lumie-rulebook-curator, lumie-rulebook-pruner, post-mortem-author

Write-capable agents need an explicit ownership slice. Read-only agents should return severity-ordered findings or a clear No findings result. Both kinds must work with existing user changes instead of reverting unrelated work.

Evidence, Not Authority

The important boundary is that agent output is evidence, not authority. A reviewer or checker can produce findings, confirm no findings, or provide a specialized signal. It cannot replace a required human-owner:* row, approve a commit, or bypass a hook, lint, test, or checker gate.

This is why Lumie avoids dispatcher agents and workspace workflow harnesses. The architecture keeps orchestration in the routed loop, keeps specialist behavior small and inspectable, and keeps enforcement in Tier 0 mechanisms when a rule must hold without human reading.

Patterns To Avoid

PatternWhy it is rejected
Dispatcher agentsThey hide routing decisions behind another prompt layer and make ownership harder to audit
Agent sprawlToo many overlapping specialists make review routing ambiguous
Slash-command harnessesThey turn workflow control into invocation ceremony instead of observed loop state
Reviewer-as-approverIt confuses evidence with authority and can bypass human-owner coverage
Document-only guardrailsCritical rules fail when they depend only on someone reading prose