Archiet's core algorithm in one file: PRD text -> FastAPI app ZIP, pure stdlib, zero dependencies.
Project description
archiet-microcodegen
Archiet's core algorithm in one file. PRD text → manifest → genome → rendered FastAPI app → ZIP, in <1400 LOC, with zero imports from
app.*,agents.*, or templates. Pure stdlib. No LLM calls.
Inspired by Karpathy's micrograd philosophy: this file is the complete algorithm; everything else in Archiet is just efficiency on top.
Install
pip install archiet-microcodegen
Use
archiet-microcodegen path/to/prd.md --out ./out/
Or pipe to a ZIP:
archiet-microcodegen path/to/prd.md > app.zip
As a library:
from archiet_microcodegen import microcodegen
prd_text = open("prd.md").read()
zip_bytes = microcodegen(prd_text)
What you get
The generated output is a working FastAPI + PostgreSQL app with:
- FastAPI with
/docsinteractive OpenAPI explorer — auto-generated, free - SQLAlchemy 2.0 models (one per entity,
DeclarativeBase) - Pydantic v2 schemas —
Base/Create/Update/Responseper entity - JWT auth via httpOnly cookies —
register/login/logout/me; never localStorage - Full CRUD per entity — list, create, get, update, delete; all behind
Depends(get_current_user) - Per-tenant data isolation — every row has a
user_idFK; every query filters by it - Alembic migrations —
alembic.ini+alembic/env.pypre-configured - pytest test suite —
TestClient, DB override viadependency_overrides, auto-skip if Postgres unreachable - docker-compose.yml — Postgres 16 with healthcheck-gated startup
- ARCHITECTURE.md — ArchiMate 3.2 element map (ApplicationComponent, DataObject, BusinessProcess, ApplicationService)
- openapi.yaml — machine-readable API contract, importable into Postman or Swagger UI
Zero LLM calls. Zero API keys. Pure Python stdlib.
The four stages
parse_prd(text) → manifest— regex extraction of entities, fields, user stories, integrationsmanifest_to_genome(manifest) → genome— maps to the canonical IR with ArchiMate 3.2 element typingrender_genome(genome) → {path: content}—string.Template-based FastAPI renderingpack(files) → bytes— stdlibzipfile
Why this exists
This is the spec. The full platform (archiet.com) adds:
- LLM-powered PRD extraction (chunked, overlap+dedup, handles natural language)
- 12+ stack renderers (Flask, FastAPI, Django, NestJS, Laravel, Go, Java, Rails, .NET, Tauri+Rust, Salesforce, SAP CAP, Dynamics)
- Capability emission, frontend (Next.js / Expo), stub-filling, quality scoring, delivery gates
- Cross-stack parity enforcement and verification
But none of that changes the core algorithm. If a bug doesn't reproduce in microcodegen, it's in an efficiency layer, not the spec.
What's NOT included
- No LLM calls (deterministic zone by design)
- No frontend, no mobile, no payment integration, no rate limiting, no audit logging
- No multi-stack output (FastAPI only; that's the algorithmic baseline)
For the full platform, see archiet.com.
License
MIT. See LICENSE.
Links
- Source: github.com/Anioko/microcodegen
- Issues: github.com/Anioko/microcodegen/issues
- Full platform: archiet.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file archiet_microcodegen-0.2.0.tar.gz.
File metadata
- Download URL: archiet_microcodegen-0.2.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95da4ca75298690d1186f3018009b578268a3af9138cb4a36b2949a66c9697d6
|
|
| MD5 |
fb6f0e6e7c121defb412c6185da81b54
|
|
| BLAKE2b-256 |
c0ebddaad1a63145d931114371bd6e5294712799bada0f6ef137dd706cc2c6c1
|
File details
Details for the file archiet_microcodegen-0.2.0-py3-none-any.whl.
File metadata
- Download URL: archiet_microcodegen-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b196d20f04a9338e807231273aa4ac12112d13f0a80015c4ced72dacdc2ff0
|
|
| MD5 |
31d90a317f39b69f7f32b92acb1c8f7b
|
|
| BLAKE2b-256 |
9751bfaab2bcbe75791003a9b22c111d0a6fd3086de0715186e6ad24ec3f434a
|