Architecture Compiler

Atomadic Forge
AI writes code.
We give it architecture.

LLMs produce beautiful code, but without guardrails. Forge absorbs codebases, learns their architecture, enforces constraints, and rewrites AI-generated code into production-ready artifacts. Scout → Absorb → Wire → Certify. Now with surgical capability grafting, golden-path recipe replay, four monadic laws, and a tamper-evident token-savings ledger on every project.

Try it now → Subscribe View on GitHub pip install atomadic-forge

Open source  ·  BSL-1.1 → Apache 2.0 (2030)  ·  v0.81  ·  Python 3.10+  ·  1616 tests  ·  59 CLI verbs  ·  10 MCP tools / 116 actions

Atomadic Forge Dashboard
1616
Tests passing across 120 files
48,312
Lines across 243 source files
872
Lean4 theorems — 0 sorry, 0 admit
300+
Public OSS Python repos absorbed

The Pipeline

Scout, Absorb, Wire, Certify

Four commands that turn chaos into architecture. Every step is reversible, testable, and auditable.

01
🔍

Scout

Crawl a codebase tree. Extract language mix, architecture patterns, test coverage, CI/CD, docs. Produces a path_analysis.json that describes the entire project in one snapshot.

02
💾

Absorb

Learn the codebase rules. Read every file, extract architecture constraints, naming conventions, patterns, anti-patterns. Build a manifest.json that LLMs can follow for perfect alignment.

03
⚙️

Wire

Rebuild AI-generated code. Feed an LLM-generated file into Forge with the manifest. Forge rewrites it to fit the exact tier, imports, naming, and patterns of the codebase. One-shot alignment.

04

Certify

Validate rewrites. Hash-based certificate proves the code passed Forge's architecture gates. Signed, auditable, repeatable. Use for CI/CD gates, deployment checks, code review signoff.


Design Philosophy

5-Tier Monadic Composition

Every line of code belongs to exactly one tier. Tiers compose upward only. Logic never repeats.

┌─────────────────────────────────────────┐
 a4_sy_orchestration/  CLI, entry points
├─ imports from ↓
 a3_og_features/        Feature modules
├─ imports from ↓
 a2_mo_composites/     Stateful classes
├─ imports from ↓
 a1_at_functions/      Pure functions
├─ imports from ↓
 a0_qk_constants/      Types, enums, config
├─ imports from
  NOTHING
└─────────────────────────────────────────┘

Each tier is a verified building block. Features are assembled from lower tiers, not rewritten. Circular imports are impossible by design.


Feature Set

59 CLI verbs · 10 MCP tools · 116 actions

Everything you need to absorb, graft, replay, enforce, and certify. Each verb is composable, testable in isolation, and emits a savings receipt to the project ledger.

🔍

scout

Crawl a codebase directory. Extract languages, patterns, tests, CI/CD, docs. Return path_analysis.json.

📋

absorb

Read a codebase and extract architecture rules. Build manifest.json for LLM alignment.

⚙️

wire

Rebuild an AI-generated file to match codebase patterns. One-shot alignment to tiers, imports, naming.

certify

Hash and sign code as passing architecture gates. HMAC-SHA256 certificate proof.

🔄

evolve

Iterate on a generation with feedback. Loop LLM calls until code passes Forge gates.

🧪

test

Run pytest with coverage. Validate rewrites match expected behavior. 90+ test suite included.

📊

analyze

Deep code metrics. Cyclomatic complexity, tier violations, import cycles, coverage gaps.

🛠️

rebuild

Full end-to-end: scout → absorb → wire on every file. Atomic or per-file modes.

📝

docs

Auto-generate architecture docs from manifests. README, API reference, tier maps.

🚀

launch

End-to-end validation. Run all commands, verify output, cert sign, ready for deploy.

🧬

graft v0.76

Surgical extraction. forge graft --source-file X --symbol Y --rename Z lifts one function or class, lands it in the right tier, auto-wires CLI + MCP.

📒

token-savings v0.78

Print lifetime savings + by-tool breakdown from .atomadic-forge/lifetime_savings.jsonl. Tamper-evident, auditable line by line.

🔁

replay v0.79

Run golden-path command chains as subprocesses — zero LLM round-trips per step. 9 recipes: release_hardening, add_cli_command, fix_wire_violation, add_feature, publish_mcp, …

🧮

monadic-laws v0.80

MCB, AIOM, AHLP, IFWC-lite scanners. Bound pure-tier compute, ban I/O imports, fingerprint modules with SHA-256, fuzz declared invariants. Advisory by default.


Quick Start

Running Forge in 10 minutes

Three commands to absorb a codebase and see what Forge learns about your architecture.

Installation

Forge requires Python 3.10+. Install from PyPI:

# Install Atomadic Forge
$ pip install atomadic-forge

# Verify installation
$ forge --help
Usage: forge [OPTIONS] COMMAND [ARGS]...
  Atomadic Forge — absorb, enforce, emerge.

# Run the full pipeline
$ forge launch /path/to/codebase
✓ Scout: Found 156 files
✓ Absorb: Extracted 42 rules
✓ Wire: Ready for LLM alignment

Next: Use with Claude, Cursor, or your favorite LLM

Feed your manifest to an LLM prompt. When it generates code, pass the output through forge wire to rebuild it in your exact architecture.


Commercial Subscriptions

Pick the Forge tier that fits your team

All plans include every Forge command, every architectural enforcement gate, and every future update. Non-commercial use stays free forever under BSL-1.1; the source converts to Apache 2.0 on April 27, 2030.

Starter
Solo developers
$79/mo
1 seat · monthly · cancel anytime
  • All Forge commands
  • Commercial deployment rights
  • 1 developer seat
  • Community support
Professional
Growing teams
$249/mo
up to 10 seats · monthly · cancel anytime
  • All Forge commands
  • Up to 10 developer seats
  • Priority email support
  • Private channel for issues
Enterprise
Unlimited seats & SLA
$999+/mo
unlimited seats · custom integrations · SLA
  • Everything in Professional
  • Unlimited developer seats
  • Custom integrations & on-prem
  • Dedicated SLA & security review
Contact us →

Non-commercial use of Atomadic Forge is free forever under BSL-1.1. Subscriptions are required only for commercial deployment. Questions? atomadic69@gmail.com.


Absorb your codebase today.

Open source. Non-commercial use free forever. MIT-style patterns. Start with scout on any repo.

View on GitHub →
1616 tests included  ·  ✓ 872 Lean4 theorems  ·  ✓ 7 languages: Python, JavaScript, TypeScript, Rust, Go, Swift, Kotlin

Core Capabilities

Built for LLM-era development

Forge bridges the gap between fast code generation and production-ready architecture.

⚡ Zero-setup integration

Drop a manifest JSON into your LLM prompt. No special config. Works with Claude, GPT-4, Cursor, or any API.

🔒 Repeatable enforcement

Same code + same manifest = same output every time. Auditable, testable, git-friendly.

📊 Full visibility

Path analysis shows exactly what Forge learned. Tier violations, import cycles, coverage gaps all flagged.

✅ Certification ready

Every rebuild gets a cryptographic certificate. Use for CI/CD gates, deploy checks, code review signoff.

🧪 1616-test suite included

Comprehensive test suite across 120 files validates every tier, every command, every edge case. 872 Lean4 theorems back the math — 0 sorry, 0 admit. All green on Python 3.10-3.12.

📒 Tamper-evident savings ledger

Every Forge verb auto-appends to .atomadic-forge/lifetime_savings.jsonl. File-backed JSONL, line-by-line auditable. Run forge token-savings for a lifetime total + by-tool breakdown. Auditable, not claimed.

🧮 Four Monadic Laws

MCB (no unbounded loops in pure tier), AIOM (no I/O imports in pure tier), AHLP (SHA-256 fingerprint per pure module), IFWC-lite (property-based fuzzing on declared invariants). Deterministic guarantees backed by file-backed scanners — advisory by default.

🔁 Golden-path replay

forge replay <recipe> runs command chains as subprocesses — zero LLM round-trips per step. Nine recipes ship today: release_hardening, add_cli_command, fix_wire_violation, add_feature, publish_mcp, and more.

🎯 Multi-provider support

Works with any LLM. Ollama for local runs, Claude for quality, GPT-4 for speed. Your choice, your control.


CLI Reference

59 verbs, infinite composition

Each command outputs structured JSON and emits a savings receipt to the project ledger. Chain them in your CI/CD, IDE, or LLM pipelines.

$ forge --help

scout          Crawl codebase → path_analysis.json
absorb         Learn rules → manifest.json
wire           Rebuild code → aligned output
certify        Sign code → HMAC-SHA256 cert
graft          Lift one symbol from any repo → tier-correct landing  [v0.76]
replay         Run a golden-path recipe (zero LLM round-trips)         [v0.79]
token-savings  Print lifetime total + by-tool breakdown                [v0.78]
evolve         Iterate with feedback → convergence
analyze        Deep metrics → metrics.json
rebuild        Full end-to-end pipeline
launch         Validation + certification
           … and 48 more.

$ forge graft --source-file solver.py --symbol Solver --rename FastSolver
✓ Lifted Solver → a3_og_features/fast_solver.py + auto-wired CLI/MCP

$ forge replay release_hardening
✓ 7 steps, 0 LLM calls, 142s wall clock

$ forge token-savings
✓ Lifetime: ~3.4M tokens saved across 412 verb runs
  source: .atomadic-forge/lifetime_savings.jsonl (tamper-evident, line-by-line)