Skip to main content

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 /docs interactive OpenAPI explorer — auto-generated, free
  • SQLAlchemy 2.0 models (one per entity, DeclarativeBase)
  • Pydantic v2 schemasBase / Create / Update / Response per 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_id FK; every query filters by it
  • Alembic migrationsalembic.ini + alembic/env.py pre-configured
  • pytest test suiteTestClient, DB override via dependency_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

  1. parse_prd(text) → manifest — regex extraction of entities, fields, user stories, integrations
  2. manifest_to_genome(manifest) → genome — maps to the canonical IR with ArchiMate 3.2 element typing
  3. render_genome(genome) → {path: content}string.Template-based FastAPI rendering
  4. pack(files) → bytes — stdlib zipfile

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archiet_microcodegen-0.2.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archiet_microcodegen-0.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

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

Hashes for archiet_microcodegen-0.2.0.tar.gz
Algorithm Hash digest
SHA256 95da4ca75298690d1186f3018009b578268a3af9138cb4a36b2949a66c9697d6
MD5 fb6f0e6e7c121defb412c6185da81b54
BLAKE2b-256 c0ebddaad1a63145d931114371bd6e5294712799bada0f6ef137dd706cc2c6c1

See more details on using hashes here.

File details

Details for the file archiet_microcodegen-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for archiet_microcodegen-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93b196d20f04a9338e807231273aa4ac12112d13f0a80015c4ced72dacdc2ff0
MD5 31d90a317f39b69f7f32b92acb1c8f7b
BLAKE2b-256 9751bfaab2bcbe75791003a9b22c111d0a6fd3086de0715186e6ad24ec3f434a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page