docs(standards): mirror doc-forge wiki style; mermaid + copyable build prompt
- move templates into src/templates; renumber wiki pages; add app-components page - embed agentic build prompt as a copyable markdown block; add mermaid diagrams - build.py writes <name>/mcp; config static bundle -> standards/mcp - registry reads libraries.json as bytes (committed file was UTF-16LE); normalize to UTF-8 - Dockerfile: drop stale blog copy; per-repo <name>/mcp copies - drop nested standards/mcp/standards duplicate and empty root mcp/
This commit is contained in:
@@ -1,45 +1,68 @@
|
||||
# The Aetos Standard App Blueprint
|
||||
# 🧩 Standards — the Aetos App Blueprint
|
||||
|
||||
A single, reusable architecture for backend applications in the Aetos ecosystem.
|
||||
One reusable architecture for every backend application in the Aetos ecosystem:
|
||||
a spec-first HTTP edge, a pure domain core, a pluggable infrastructure layer,
|
||||
and a single composition root.
|
||||
|
||||
Every application built with this blueprint has the same shape:
|
||||
Fill in **two axes only** and a new app is done: your **resource model**, and
|
||||
(if needed) your **pipeline family**. The blueprint itself never names a
|
||||
business domain — expenses, health metrics, inventory, and analytics are all
|
||||
the same shape underneath.
|
||||
|
||||
- a **spec-first HTTP layer** driven by an OpenAPI document;
|
||||
- a **domain layer** of pure models, ports, and services;
|
||||
- an **infrastructure layer** of adapters (MongoDB, cache, workers, LLM, mail);
|
||||
- a **composition root** that wires everything in exactly one place;
|
||||
- an optional **pipeline layer** for data-driven extraction/enrichment;
|
||||
- an optional **background worker** that runs long-running jobs and reports progress.
|
||||
> **Doc model:** this wiki is written for humans — how-to guides, the build
|
||||
> recipe, and quality gates. The enforceable rules (layering, composition root,
|
||||
> CRUD template, pipeline scaffold) and the library registry live in the
|
||||
> **reference** pages, mirrored by the machine-readable `standards` MCP bundle.
|
||||
> Query `find_library` before writing any infrastructure.
|
||||
|
||||
> This blueprints is deliberately **app-agnostic**. It never names a concrete
|
||||
> business domain. Any application — expenses, health metrics, inventory,
|
||||
> analytics — is produced by filling in **two axes only**: the resource model
|
||||
> and (if needed) the pipeline family.
|
||||
---
|
||||
|
||||
## How to read this
|
||||
## 🚀 Key Features
|
||||
|
||||
| Page | What it covers |
|
||||
|---|---|
|
||||
| Overview | The philosophy and the one-way dependency rule |
|
||||
| Layering Rules | Which package may import which |
|
||||
| Composition Root | The single wiring point |
|
||||
| Spec-First Routing | OpenAPI as the source of truth |
|
||||
| CRUD Template | The canonical resource slice |
|
||||
| Pipeline Scaffold | Data-driven processing families |
|
||||
| Worker & Progress | Async jobs, status machine, streaming progress |
|
||||
| Human-in-the-Loop | Pausing a job to ask a question |
|
||||
| Infra Adapters | MongoDB, cache, stores, LLM, mail |
|
||||
| Testing | Integration + unit conventions |
|
||||
| Build Recipe | The ordered checklist to generate a new app |
|
||||
| Genericity Matrix | What is reusable vs what you must write |
|
||||
- 🧭 **Spec-first routing** — the OpenAPI document, not decorator routers, is
|
||||
the source of truth (operationId lookup)
|
||||
- 🏗️ **One-way layering** — `interfaces → domain → infra`, enforced
|
||||
- 🔌 **Single composition root** — every dependency is wired in exactly one place
|
||||
- 🧩 **Generic, not app-specific** — reusable rules versus two authoring axes
|
||||
- 📚 **Library-backed** — DB, DI, pipelines, ingestion, auth, and docs come from
|
||||
internal libraries, never hand-written
|
||||
- 🚦 **Explicit state machines** — durable job statuses, progress, and
|
||||
human-in-the-loop pauses
|
||||
|
||||
## For AI agents
|
||||
---
|
||||
|
||||
This content is served as MCP resources under `docs://index`, `docs://nav`,
|
||||
and `docs://modules/{module}`. To build a new app:
|
||||
## 📁 Documentation Structure
|
||||
|
||||
1. Read `build_recipe` first.
|
||||
2. Read `genericity_matrix` to know what you must author.
|
||||
3. Query the **library registry** (`find_library`) before writing any
|
||||
infrastructure yourself.
|
||||
4. Copy the `templates/` skeleton and fill the two app-specific axes.
|
||||
| Section | Description |
|
||||
|-----------------------------------------------------|--------------------------------------------------------|
|
||||
| [Overview](01_overview.md) | Philosophy, the one-way dependency rule, architecture |
|
||||
| [App Components](02_components.md) | The component model and how the pieces wire together |
|
||||
| [Build Recipe](03_build_recipe.md) | The ordered, agentic checklist for a new app |
|
||||
| [Testing & Quality](04_development/01_testing.md) | Test layout and acceptance gates |
|
||||
|
||||
**Reference** (separate site, mirrors the MCP bundle): the enforceable
|
||||
rules — [Layering](../lib/02_layering_rules/), [Composition
|
||||
Root](../lib/03_composition_root/), [Spec-First
|
||||
Routing](../lib/04_spec_first_routing/), [CRUD
|
||||
Template](../lib/05_crud_template/), [Pipeline
|
||||
Scaffold](../lib/06_pipeline_scaffold/), [Worker &
|
||||
Progress](../lib/07_worker_and_progress/), [Human-in-the-Loop](../lib/08_human_in_loop/),
|
||||
[Infra Adapters](../lib/09_infra_adaptors/), [Genericity
|
||||
Matrix](../lib/12_genericity_matrix/), [Library
|
||||
Registry](../lib/13_library_registry/).
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Related Resources
|
||||
|
||||
- **MCP bundle** — `standards` server on `:8009`: read `doc://index`,
|
||||
`doc://nav`, `doc://modules/{module}`; call `find_library(capability)`
|
||||
- **Library registry** — the catalog of internal libraries behind every app
|
||||
(`libraries.json`, served as `registry://libraries`)
|
||||
- **Template** — the runnable skeleton at `standards/src/templates/app/`
|
||||
- **Copy the repo's `AGENTS.md`-style build prompt** from
|
||||
[Build Recipe](03_build_recipe.md)
|
||||
|
||||
---
|
||||
|
||||
© Aetoskia Internal — `standards`
|
||||
Reference in New Issue
Block a user