Menu

modular software ecosystem · for humans and agents · contract-first

Siembra módulos, cosecha aplicaciones.

sow modules, harvest applications

A milpa is not a crop: it's a system. Modules that grow together and feed one another — on a deterministic core, with contracts that protect them.

Explore getmilpa
published on Packagist + npm Apache-2.0 the field is planted
the milpa germinates as you scroll

the system

A polyculture, not a monoculture

The three sisters — corn, beans, and squash — grow together and feed one another. Deterministic, cultivated agriculture: order that yields abundance. That is the framework.

corn · the core

Deterministic kernel

The stalk that holds everything up. A small core, predictable and boring on purpose: abundance grows on top of it, not inside it.

milpa/core · zero dependencies — contracts and primitives only

beans · the modules

Plugins that climb the stalk

Modules that connect through events and compose with each other. They fix nitrogen: each one feeds the whole system.

provides / requires in milpa.json — providers load before consumers

squash · the contracts

Governance that protects

It covers the soil: machine-readable contracts that validate every piece. Nothing is sown without one.

*.contract.json · validated at boot, gated in CI

no layer pretends.

live demo

One atom, three doors — try it

The same operation, projected through three different doors — coa, MCP, HTTP. Pick one and see what changes.

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

Honest coverage gap: This is not a desirable HTTP guarantee. It is a radiography of the current implementation. MCP enforces scopes today; HTTP does not yet read scopes from Operation. This gap must be closed in runtime/policy before production. See Runtime x-ray. Source: Operation.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→201no (pending · middleware)

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 not claim that HTTP applies scopes, nor 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, ns App\Command, not part of the package): getmilpa-skeleton/src/Command/{CliProjector,McpProjector,HttpProjector}.php.
  • Didactic stand-ins: ConfirmTokenStore.php (in-memory, single-process — not production), SchemaCoercer.php.
  • Junior seed: docs/GUION-WEBINAR-JUNIORS.md (Artifact 2).

→ the full lesson in the Academy

the ecosystem

One milpa, five plots

Every piece of the ecosystem has its own ground and its own role — and they all feed one another. None of them overpromises: what's sown is published; what's germinating says so.

the framework · getmilpa.com

A field that keeps growing

Modular PHP for two kinds of callers: humans and agents on the same declared surface. From the zero-dependency core to the compositions — runtime, tools, MCP, workflow, orchestration — and new rows are sown all the time.

the design system · @milpa/design

The first harvest

68 pieces, every one with a machine-readable contract; 193 WCAG AA pairs verified in CI; theming as a contract — down to glass — without touching structure.

the tool · coa

The planting stick

The CLI you sow with: it inspects, validates, diagnoses and generates — deterministic first, with machine-readable answers, so humans and agents work on the same rails.

the marketplace · milpahq.com

Germinating

Bundles of plugins that form applications — compatibility by contract, metadata only. The registry arrives when the field is ready; foundations first, scale after.

the school · academy.milpa.lat

Where the field teaches

Interactive architecture artifacts, for humans and agents — real code running in the browser, not slides.

the root

Why Milpa is Milpa

I don't know computers — but I do know cars. If you buy one, it's worth learning how to fix it.

My father, paying for my first hardware course farmer · San Francisco del Mar, Oaxaca, México

He was the first in his region to bet on mango where everyone sowed sorghum. I planted the first grafts myself, at twelve, with a coa — the planting stick: hard rootstock below to hold more fruit, the bearing branch grafted above. Years later, time proved him right — twenty hectares of ataulfo and tommy mangos.

That's this ecosystem, if you look at it right. A deterministic root that holds. Modules grafted on top that bear the fruit. A CLI named after the tool that sowed the real thing. And his lesson as the contract under it all: what's yours, you should be able to understand and repair.

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

He never saw this framework. The field it grows from is his.

— Rodrigo Vicente · creator of Milpa

the first sowing

Harvest your first app

A modular PHP core, event-driven modules, contracts at the root — published on Packagist, Apache-2.0. Pre-1.0 and honest about it: the field is planted, and it grows in the open.

$ composer create-project milpa/skeleton my-app

every error, a link to what you broke · coming