crear:tarea
- mutating
- requiresConfirmation
- scopes: tarea:crear
- handler: TaskService::create
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.
An operation is declared once. coa, MCP and HTTP are adapters of the same handler — but changing doors can change the policy.
crear:tarea
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 crear:tarea --titulo=… --yes
Pick a door to project.
tools/call · crear:tarea
Pick a door to project.
POST /crear/tarea
Pick a door to project.
| Surface | Confirm | Scopes applied |
|---|---|---|
| coa | flag --yes | no (local/trusted) |
| MCP | inherited gate (tool-runtime) | yes (PolicyGate) |
| POST | token 428→201 | yes (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.
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.
milpa/command: getmilpa-command/src/Operation.php, CommandProvider.php, SurfaceProjector.php.skeleton ≥0.7.0, ns App\Command, not part of the package): getmilpa-skeleton/src/Command/{CliProjector,McpProjector,HttpProjector}.php.milpa/auth ≥0.1, RequireScopeMiddleware.php + the same PolicyGate MCP uses.ConfirmTokenStore.php (in-memory, single-process — not production), SchemaCoercer.php.docs/GUION-WEBINAR-JUNIORS.md (Artifact 2).