Milpa doesn't promise to save you from thinking. Milpa promises to teach you to think while you build.

Imagine giving the same instruction to three different messengers — a command line, an AI assistant, a web form — and each one handles it with a different level of care: one asks you to confirm before acting, because it's local and trusts whoever's using it; the other two check your permission first, with the same rule. It's the same order, said three ways, with two clearly defined levels of care. That's what you're about to see, now with its technical name: one Operation, projected through three doors.

Artifact 09 Engineering · inspect

The atom and its doors

An operation is declared once. coa, MCP and HTTP are adapters of the same handler — but changing doors can change the policy.

crear:tarea

  • mutating
  • requiresConfirmation
  • scopes: tarea:crear
  • handler: TaskService::create

Coverage by surface: MCP and HTTP now enforce the same scopes: HTTP runs RequireScopeMiddleware and then the same PolicyGate MCP uses. coa does not enforce scopes — it's the local/trusted surface, by design. This was a real coverage gap; it closed when HttpProjector started requiring scopes. The Runtime x-ray shows the full, now-governed pipeline. Source: Operation.php, HttpProjector.php.

coa · CLI

coa crear:tarea --titulo=… --yes

resolve

validate

authorize

execute

audit

Pick a door to project.

MCP · agent

tools/call · crear:tarea

resolve

validate

authorize

execute

audit

Pick a door to project.

POST · HTTP

POST /crear/tarea

resolve

validate

authorize

execute

audit

Pick a door to project.

Guarantees by surface
SurfaceConfirmScopes applied
coaflag --yesno (local/trusted)
MCPinherited gate (tool-runtime)yes (PolicyGate)
POSTtoken 428→201yes (RequireScopeMiddleware + PolicyGate)

The handler never changed. You changed doors and the framework synthesized the invocation — but the door can change the policy, and today not all of them apply the same scopes.

Evidence and scope

Didactic model over an audited implementation. This artifact does claim that HTTP applies scopes (via HttpProjector + PolicyGate) — it does not claim that the in-memory token store is production-grade.

Audited sources

  • Published contract milpa/command: getmilpa-command/src/Operation.php, CommandProvider.php, SurfaceProjector.php.
  • Reference projectors (skeleton ≥0.7.0, ns App\Command, not part of the package): getmilpa-skeleton/src/Command/{CliProjector,McpProjector,HttpProjector}.php.
  • HTTP scope enforcement: milpa/auth ≥0.1, RequireScopeMiddleware.php + the same PolicyGate MCP uses.
  • Didactic stand-ins: ConfirmTokenStore.php (in-memory, single-process — not production), SchemaCoercer.php.
  • Junior seed: docs/GUION-WEBINAR-JUNIORS.md (Artifact 2).