Renumber the 15 reference docs into pillar groups (recipe -> anatomy): - 01 Build Recipe (entry), 02 Composition Root - domains: 10 Layering Rules - contract: 20 Spec-First Routing, 21 CRUD Template, 22 Auth Integration - interfaces/infra: 30 Infra Adapters - UI: 40 UI: Auto-Rendered Admin & Custom Pages (new; @aetoskia packages, client template, x- catalog via react-openapi MCP module) - pipelines: 50 Pipeline Scaffold, 51 Worker & Progress, 52 Human-in-the-Loop - delivery/meta: 90 Drone Pipelines, 91 Versioning & Changelog, 92 Genericity Matrix, 93 Library Registry, 94 Repository Inventory MCP module names are unchanged (NN_ prefix stripped); all cross-references (wiki, templates, hooks, registry) updated; lib index rewritten pillar-first; build recipe bootstraps the client template. Bundle + HTML sites regenerated.
Application Template
A minimal, runnable skeleton of the standardized architecture. It demonstrates
both axes of the blueprint (see standards):
- Resource axis — items and jobs, each a Claude-style generic CRUD slice
(model → document → repo → service → route), all driven from
openapi.yaml. - Pipeline axis — a background
worker.pythat polls pending jobs and runs a pipeline;pipelines/example/shows the reusable family skeleton andpipelines/item_sync.pythe simple end-to-end form.
Everything here is deliberately small so an agent can rewrite each file rather than delete unused code. The domain is a neutral "item", not an app noun.
Internal dependencies
The app depends on the internal Aetos libraries (openapi-first, mongo-ops,
hexa, dagpipe, doc-forge). Install them one of two ways.
-
Local checkouts (preferred in development) — install the sibling repos editable:
pip install -e ../aetos/openapi-first -e ../aetos/mongo-ops -e ../aetos/hexa ` -e ../aetos/dagpipe -e ../aetos/doc-forge -
Private index (CI / fresh machines) — the published wheels live on the Aetos index. Pass credentials through the environment only; never commit them:
pip install --extra-index-url ` "https://$PIP_REGISTRY_USERNAME:$PIP_REGISTRY_PASSWORD@pip.aetoskia.com/simple" .The
DockerfilereadsPIP_REGISTRY_USERNAME/PIP_REGISTRY_PASSWORDas build args and setsPIP_EXTRA_INDEX_URLaccordingly.
Instantiate a new app
cp -r src/templates/app apps/<your-app>
cd apps/<your-app>
pyproject.toml— rename the package; keep the internal library pins.config.py— replace/add settings consumed by your domain.openapi.yaml— replace theItem/Jobresources with your resources.domain/— renameitemandjobslices to your aggregates.pipelines/— replace the demo with your pipeline (see below).tests/— keep the two test files as the pattern for your own.
Install and run:
pip install -e ".[dev]"
uvicorn main:app --reload # API
python worker.py # worker
python -m scripts.seed # operator script
Pipeline families
pipelines/item_sync.py is the smallest possible pipeline (plain async steps).
When a family needs its own stages, copy pipelines/example/:
pipelines/<family>/
abc.py # port contracts
impl.py # concrete stages + wired root + register(...)
pipeline.yaml # graph spec
resources/
pipeline.yaml # runtime spec
patterns/*.yaml
pipelines/shared/
ports.py loader.py registry.py # reused by every family
The shared loader wires the root through the DI library (hexa.build) and merges
the pattern fragments; the registry resolves a (kind, variant, mode) triple to
a root class. See standards "50_pipeline_scaffold".
What to keep, what to replace
| Keep | Replace / rename |
|---|---|
config.py shape |
Settings fields |
init.py wiring pattern |
Resource names |
| openapi-first routing | Paths, schemas, operationIds |
| mongo-ops repo factory | Collections, doc models |
| generic CRUD adaptor | Nothing (reuse as-is) |
pipelines/shared/ |
Nothing (reuse as-is) |
pipelines/example/ |
Family name, stages, patterns |
| worker poll + status loop | Job payloads, pipeline steps |
scripts/ |
Task bodies |
Where the internal libraries slot in
openapi_first.app.OpenAPIFirstApp— main.py, interfaces/openapi.pymongo_ops— infra/db/setup.py, infra/db/repos/mongo.py, domain/*/ports/db.pyhexa.build— domain/*/ports/service.py, pipelines/shared/loader.pydagpipe— pipelines/ (wrap step chains in a DAG once they branch)docforge— generated.pyistubs and docsomniread/mail-intake— ingestion adapters (add when needed)
Confirm current endpoints and ownership with the standards registry MCP tools:
find_library("pipeline"), find_library("auth"), or
get_app_component("pipeline-abc", family="csv").