A PHP framework whose primitives — generators, mutations, introspection — are built so an AI agent can drive it.
Univeros is a PHP 8.3+ framework for building APIs. It looks familiar — PSR-7/15 HTTP stack, a DI container, a Cycle ORM bridge, a Symfony Messenger bridge, immutable value objects, single-pass middleware. The unusual part is the layer above: a CLI (bin/altair) whose every command emits deterministic JSON an AI agent can branch on, plus first-class primitives — spec-driven scaffolding, a rewindable journal, an append-only event log, a symbol index, a doctor, a refactor adviser — so an agent can be productive in the codebase without a human in the loop.
The library ships under the Altair\* namespace as 35 composable packages (univeros/http, univeros/scaffold, univeros/persistence, …) plus the bundled meta-package univeros/framework.
Most frameworks were designed for a developer who reads docs, greps for examples, remembers conventions between sessions, and catches their own mistakes. An AI agent does none of those reliably. It needs:
- Conventions emitted as machine-readable manifests — not inferred from prose.
- Generators that are deterministic — so output can be verified, not just executed.
- A clean way to undo a failed iteration — not "hope you committed before that."
- Mutation history that persists across context windows — so "what did I just do?" is answerable in any session.
Univeros provides those four as first-class primitives. That is the reason it exists.
composer create-project univeros/univeros myapp
cd myapp
composer serve # php -S localhost:8080 -t public
curl localhost:8080/ping # {"message":"ok","timestamp":"..."}
composer testAdd an endpoint by writing the spec — never hand-write the boilerplate:
vendor/bin/altair spec:scaffold api/users/create.yaml
# Writes: Action, Input, Responder, domain stub, PHPUnit test,
# route entry, OpenAPI fragment, Cycle entity, migration, repository.Every emitted file is byte-stable — re-run on the same spec and not a byte changes.
| Repo | What it is |
|---|---|
| univeros/univeros | The composer create-project starter. |
| univeros/framework | The library source code. All issues and pull requests go here. |
| univeros/docs | Per-package guides and benchmarks. |
The 35 sub-package repos under this org (univeros/cache, univeros/http, …) are read-only mirrors maintained automatically by the framework's split workflow — install them with Composer, but contribute upstream in univeros/framework.
Found a vulnerability? Please report it privately via GitHub Security Advisories rather than opening a public issue.
Open-sourced software licensed under the MIT license.