Skip to main content

Atomadic Forge ? absorb, enforce, emerge. Polyglot (Python ? JavaScript/TypeScript ? Rust ? Go ? Swift ? Kotlin) architecture guardian for AI-generated code.

Project description

Atomadic Forge

Atomadic Forge

Spaghetti is Toast.
The architecture enforcement engine for AI-generated code.

PyPI Python 3.10+ License: BSL-1.1 CI MCP Registry

Live numbers — every badge below reads from forge.atomadic.tech/metrics.json on each render.
MCP tools MCP actions CLI verbs Tests passing Source files Lean4 theorems


AI agents write code 10x faster than humans can review it. Pattern violations went from 5% to 60% post-LLM. Your codebase is accumulating architectural debt at machine speed.

Forge fixes that.


🎯 300+ public OSS Python repositories absorbed end-to-end. fastapi (98k★), scrapy (61k★), django-rest-framework (30k★), pytest (13.8k★), langgraph (31k★), openai-agents-python (26k★), cookiecutter (25k★), aiohttp (16k★), deepeval (15k★), DocsGPT (17k★), txtai (12k★), E2B (12k★), copier, apscheduler, msgspec, peewee, alembic, tortoise-orm, presidio, dagster, IBM mcp-context-forge, and ~290 more — every single one ran through one forge auto command, emerged 5-tier-organized, wire-clean, scaffold-complete, deterministic. Wire-PASS holds across the entire 300-seed corpus. Receipts in HARVEST_LEDGER.md.

  • Catches architectural violations AI agents leave behind. Deterministic tier-law enforcement — no LLM in the loop, no hallucinations. Four monadic laws (MCB, AIOM, AHLP, IFWC) shipped as advisory AST scanners; promote to --fail-on-violations when ready.
  • Verifiable token savings. Every Forge verb auto-appends to a file-backed JSONL ledger at <project>/.atomadic-forge/lifetime_savings.jsonl. forge token-savings prints the running total and per-tool breakdown. Auditable line-by-line — not a marketing claim.
  • Surgical capability grafting. forge graft --source-file X --symbol Y extracts a single function or class from any Python source, lands it in the right tier, and auto-wires CLI + MCP. Sibling references resolve automatically. Closes the gap between whole-repo transmute auto and one-shot surgical absorption.
  • Deterministic recipe replay. forge replay <recipe> runs a golden command chain (release hardening, add-cli-command, fix-wire-violation, add-feature, publish-mcp) as subprocesses — zero LLM round-trips per step.
  • One command: spaghetti -> certified architecture. Python, JavaScript, TypeScript, Rust, Go, Swift, Kotlin — full pipeline (recon, wire, certify, scaffold, evolve) on every language. Recon cache short-circuits the AST walk on unchanged trees via tree fingerprint.
  • Bring your own LLM. Built-in presets for OpenAI, Anthropic, Gemini, OpenRouter, DeepSeek, Groq, Together, Fireworks, xAI, Mistral, Perplexity, Cerebras, Hyperbolic, AAAA-Nexus, and Ollama — plus forge config provider add for any custom OpenAI-compatible endpoint. See docs/PROVIDERS.md.
  • IDE-native. VS Code extension (vscode-extension/), MCP server for Claude Code / Cursor / Cowork / Windsurf, four ready-to-use Claude Code skills. See docs/IDE_INTEGRATION.md.

What Forge Does For You

Forge is an architecture enforcement engine, not a linter. It imposes deterministic structure on AI-generated code — and it ships proof that the structure holds.

  • Architectural drift stops here. forge auto runs recon, detects every upward-import violation, re-tiers mislaid files, and emits a signed conformance receipt — all in one command. Validated against 300+ OSS repositories: Wire-PASS holds across the entire corpus.

  • Context overhead you can actually measure. forge context_pack pre-bundles repo context into a single optimized payload for AI agents, cutting redundant re-reads. Every Forge verb logs its savings to a file-backed JSONL ledger at <project>/.atomadic-forge/lifetime_savings.jsonl — run forge token-savings to see the auditable running total, line by line.

  • Composition opportunities no human would find. forge emergent scan performs cross-repo AST analysis to surface capability combinations that exist in your codebase but have never been wired together. Discovery is deterministic — no LLM guessing, no hallucination false positives.

  • One command: spaghetti to certified. forge auto takes any Python, JS, TS, Rust, Go, Swift, or Kotlin repo from chaos to 5-tier-organized, 0 wire violations, 100/100 certify score. The before/after is not a demo — receipts are in HARVEST_LEDGER.md.

  • Bring your own LLM — any of them. OpenAI, Anthropic, Gemini, OpenRouter, Ollama, DeepSeek, Groq, Mistral, and 10+ more ship as built-in presets. Add any OpenAI-compatible endpoint with forge config provider add. No vendor lock-in, no rewiring required.

  • Enforcement that scales with AI output velocity. Forge's tier-law scanner is pure AST — no LLM in the loop, no nondeterminism. Promote violations from advisory to --fail-on-violations and it becomes a hard CI gate. Architecture holds at the speed AI generates code.


Quick Start

pip install atomadic-forge        # install
forge recon .                     # scan any repo (free, read-only)
forge certify . --print-card      # get your architecture score (0-100)

That's it. No API key, no config, no writes.


What Forge Does

Forge enforces a 5-tier monadic law — every source file belongs to exactly one tier, tiers compose upward only. AI agents generate code fast; Forge gives it gravity.

  a4_orchestration/    <- CLI, entry points
         |
  a3_features/         <- Feature modules
         |
  a2_composites/       <- Stateful classes
         |
  a1_functions/        <- Pure functions
         |
  a0_constants/        <- Constants, enums (zero logic)

Before Forge:

62 import violations · certify score 23/100 · "it works on my machine"

After forge auto:

0 violations · certify 100/100 · signed conformance receipt · ship it

CLI Commands

Core Pipeline

Command What it does
forge auto Flagship. recon → cherry → wire → certify → receipt
forge recon Scan a repo — classify every symbol, show tier distribution
forge wire Detect upward-import violations
forge certify Architecture score (0-100): docs, tests, tier layout, imports
forge verify Composite ship gate: PASS / REFINE / FAIL
forge enforce Apply mechanical fixes (rollback-safe)
forge status Wire + certify in one call
forge welcome First-call handshake — score + guidance in one response

Quality & Intelligence

Command What it does
forge smell Code smell scan: cyclomatic complexity, long functions, duplicates
forge call-graph AST call graph for any symbol
forge call-graph-summary Whole-package call-graph portfolio — orphans, fan-in hotspots, max depth
forge churn File-level git commit frequency — hotspot and stable files
forge cna-check Compose-Not-Add — flag duplicates before writing
forge trust-gate LLM response hallucination detector
forge preflight Pre-edit guardrail: tier + import + scope check
forge surface-gaps Find a1 entry points missing MCP or CLI coverage
forge wire-stubs <module> <function> Generate MCP handler + CLI stub + test skeleton for any unwired a1 function
forge capability-scout --queries "q1,q2" Search GitHub for harvest target repos
forge dead-code AST-walk dead symbol detector (vulture synthesis)
forge maintainability Maintainability Index per module (radon MI: A/B/C/D ranking)
forge concept-bridge --harvest-json path/to/harvest.json Convert harvest candidates below TAU_TRUST into actionable synthesis plans
forge token-savings Lifetime token-savings total + per-tool breakdown from .atomadic-forge/lifetime_savings.jsonl
forge replay <recipe> Run a golden recipe's validation gate as subprocesses — zero LLM round-trips; flags: --dry-run, --keep-going, --list, --json

Monadic Law Verbs (advisory; --fail-on-violations to enforce)

Command What it does
forge mcb-check Flag unbounded while loops and recursion in tier-a1 atoms (Monadic Compute Bounding)
forge aiom-check Flag forbidden I/O imports (requests, urllib, socket, subprocess) in tier-a1 (Algebraic I/O Monad)
forge fingerprint SHA-256 of every a1 module's normalised AST — tamper-evident, stable across whitespace (AHLP)
forge fuzz <module> Hypothesis property tests on any a1 callable carrying __invariants__ (IFWC-lite)

Composition & Multi-Repo

Command What it does
forge create Intent + seed repos -> new pip-installable package
forge emergent scan Cross-domain composition discovery
forge recon-swarm Walk N repos, unified report
forge harvest Cross-repo capability gap finder
forge graft --source-file <f> --symbol <name> Extract one function/class from any Python source and land it in the target's correct tier; --rename for private→public; auto-wires CLI + MCP

Planning & LLM Loops

Command What it does
forge iterate LLM loop: intent -> code -> absorb -> score -> iterate
forge evolve Recursive improvement over N rounds
forge plan Bounded execution plan with risk + rollback
forge chat Terminal copilot over forge docs

Live CLI verb count: see forge_metrics.json. Full reference: docs/02-commands.md


MCP Server

Forge ships a Model Context Protocol server. Add it to Cursor, Claude Code, Aider, Devin, or any MCP-compatible agent:

{
  "mcpServers": {
    "atomadic-forge": {
      "command": "forge",
      "args": ["mcp", "serve", "--project", "/path/to/your/repo"]
    }
  }
}

Current live surface: see surface.json and forge_metrics.json. All legacy tool names redirect automatically — existing callers keep working. Deployed Worker at forge.atomadic.tech/mcp. Listed in the MCP Official Registry.

Tool Dispatch What it does
welcome none RECOMMENDED FIRST CALL: onboarding scan, score, narrative, capability tour
explore action= Analyze, understand, discover — recon/explain/call_graph/call_graph_summary/smell/lineage/harvest/synergy/scan/swarm/churn/surface_gaps/capability_scout/dead_code/maintainability/concept_bridge
audit action= Quality gates, change safety, trust
plan action= Orient + dev utilities — context/compose/policy/recipes/generate/apply/locate/commit/scaffold/steersman
transmute action= FLAGSHIP spaghetti→certified pipeline — auto/cherry/finalize
loop action= LLM iteration loops — iterate/resume/evolve/evolve_step
hive action= Multi-agent coordination — lifecycle, consensus, handoffs, enhancements
wisdom action= Institutional memory DB — record/query/list/recall/promote
nexus op= AAAA-Nexus auth primitives — identity/federation/authorize/trust/contract/lineage/ratchet
inspect action= Low-level AST inspection — body/symbol/class_signals/ast_scope_blueprint/mint_ast_locks/add_node/classify_repo_layout/fingerprint_repo/synthesis_plan/swarm_repo_specs
create none Intent + seed repos → shippable pip package (Phase 1 pipeline: emergent_swarm + materialize)

Note: nexus uses op= as its dispatch key instead of action= to avoid collision with the authorize_action operation's own action parameter that passes through to the Nexus API.

Full tool reference: docs/MCP_TOOLS.md | First call: welcome


By the Numbers

Live repo metrics come from forge_metrics.json. Live MCP surface shape and legacy redirects come from surface.json. Historical release counts stay in CHANGELOG.md and receipts/.

Metric Value

| Current version, CLI, source, test, and proof counts | forge_metrics.json | | Current MCP tools, actions, recipes, and legacy redirects | surface.json | | Historical release snapshots | CHANGELOG.md, receipts/ |

Forge eats its own cooking. Every CI run scores itself.

Production-tested at scale. 300+ public Python repos absorbed end-to-end via forge auto — fastapi (98k★), scrapy (61k★), pytest (13.8k★), DRF (30k★), cookiecutter (25k★), and ~295 others. Wire-PASS on every single one. Full receipt: HARVEST_LEDGER.md.


Pricing

Tier Price What you get
Free $0 OSS, 25 calls/day, read-only tools
One-Time Refactor $149 $99 We run auto on your repo -> PR targeting 100/100. One revision included.
Starter $79/mo Full current Forge surface, 5k calls/mo, signed receipts, custom recipes
Pro $249/mo + notarization, compliance attestations, cross-repo telemetry
Founding Member $999/yr Everything. Forever. First 25 only.
Enterprise Custom BSL commercial license, SSO, self-host, SLA

Launch special: The one-time refactor is $99 (normally $149). See what Forge does to your codebase before committing to a subscription.

Get started ->


Docs

First 10 Minutes Install, demo, first scan
Tutorials Quickstart, 5-tier law, LLM integration
Architecture How Forge itself is built
CI/CD Integration GitHub Actions, GitLab CI, pre-commit
Showcase Live run trajectories
Changelog Version history
Contributing How to extend Forge
Security Vulnerability reporting

License

Business Source License 1.1. Free for non-production use. Commercial license for production — see COMMERCIAL_LICENSE.md. Change Date: 2030-04-27 -> Apache 2.0.


forge.atomadic.tech — paste any GitHub repo, watch the analysis in real time.

Interested in investing?

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

atomadic_forge-0.87.0.tar.gz (5.7 MB view details)

Uploaded Source

Built Distribution

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

atomadic_forge-0.87.0-py3-none-any.whl (748.3 kB view details)

Uploaded Python 3

File details

Details for the file atomadic_forge-0.87.0.tar.gz.

File metadata

  • Download URL: atomadic_forge-0.87.0.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atomadic_forge-0.87.0.tar.gz
Algorithm Hash digest
SHA256 fb9ee7324a6ef645864609264dc3b3ed0d41420e8a288db9e8cfa50e1da6bd4d
MD5 62e766a1be705959505dbdc159c2f33b
BLAKE2b-256 e13ba0cdccf59c319105bdeeb1a54d9ac51e877612b9718bcca1c020c0482e20

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomadic_forge-0.87.0.tar.gz:

Publisher: release.yml on atomadictech/atomadic-forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomadic_forge-0.87.0-py3-none-any.whl.

File metadata

  • Download URL: atomadic_forge-0.87.0-py3-none-any.whl
  • Upload date:
  • Size: 748.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atomadic_forge-0.87.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c4660a48758fb9f51035223ef203d6fb3d1f9a729f55d3ca600c62e14069fa5
MD5 4660db6f7a465797f41e5a7549a61da0
BLAKE2b-256 75749961822198b7b7d90376e6db2ce80948ce0ce3da60780c28cee1c2a0819e

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomadic_forge-0.87.0-py3-none-any.whl:

Publisher: release.yml on atomadictech/atomadic-forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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