Skip to content

trgysvc/AutonomousNativeForge

Repository files navigation

⚒️ ANF — Autonomous Native Forge

"We don't promise a perfect product. We promise an autonomous architecture that learns from its mistakes — and shares every single one of them."

License: MIT Node.js v22+

Important

This is a purely native implementation. No Express, no Axios, no high-level SDKs. Direct Node.js http/https modules only.

Hardware Model Framework Status


What Is This?

Autonomous Native Forge is a cloud-free, fully local, 4-agent autonomous software production factory built entirely on Node.js native capabilities — no middleware, no heavy frameworks, no vendor lock-in.

Runs on local hardware: NVIDIA GPU (Blackwell), Apple Silicon (Unified Memory), and NPU-accelerated devices. Local LLM inference only.

Agent Role Responsibility
🏗️ Architect Generalissimo Multi-Doc Synthesis, Consensus Mechanism & Steering Protocol
⚙️ Coder Specialist Atomic Task Implementation & Active Recall (Learning)
🛡️ Tester Guardrail Shadow Tester (Security Scan) & Governance Auditor
📚 Docs Archivist Autonomous DEVLOG & System State (Technical Debt) Management

The Honest Part (Why This README Is Different)

Most open-source projects show you the finish line. We show you the entire race — including the falls.

This project started with 4 days of continuous failure on NVIDIA Blackwell GB10:

  • vLLM wouldn't compile against CUDA 13.0
  • PyTorch binaries were incompatible with SM_100 architecture
  • 70B model caused OOM Killer to terminate the process at 132GB > 120GB VRAM
  • pyproject.toml metadata format broke the entire build pipeline

Every single one of these failures is documented, timestamped, and publicly available in this repository. Because the next developer who hits the same wall deserves a door, not another wall.


Architecture

┌─────────────────────────────────────────────────────┐
│                   USER REQUEST                      │
└───────────────────────┬─────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────┐
│              ARCHITECT (Doc Synthesis)              │
│    Scans docs/reference/ → DeepSeek-R1 reasoning    │
│         Produces file structure + task plan         │
└─────────────────────────────────────────────────────┘
                        │ EventEmitter Bus
                        ▼
┌─────────────────────────────────────────────────────┐
│             CODER AGENT (Production)                │
│   Native Node.js only • Zero external dependencies  │
│      45min deep reasoning via vLLM endpoint         │
└───────────────────────┬─────────────────────────────┘
                        │
              ┌─────────┴─────────┐
              │                   │
              ▼                   ▼
        TEST PASSED           TEST FAILED (Steering)
              │                   │
              ▼                   ▼
    GitHub Auto-Push        ARCHITECT STEERING
    (Native HTTPS)          (Self-Healing Loop)

⚒️ Universal Forge: Project Discovery

ANF V3 operates as a document-driven factory. It doesn't wait for manual tasks; it discovers them from your technical specifications.

How to Build Any Project:

  1. Drop your PRD/Spec: Create a folder in docs/reference/[YOUR_PROJECT_ID]
  2. Add .md files: Put your PRDs, Sprint Tasks, or Technical References there.
  3. Ignite: Run node agents/architect.js [YOUR_PROJECT_ID] or start the full bootstrap.

The Architect will synthesize all documents, build a dynamic manifest.json, and coordinate with the Coder and Tester to realize the architecture — autonomously.


Communication: Native EventEmitter — no message brokers, no Redis, no Kafka.
State Management: In-memory MemoryState object per session — no external databases.
Security: Credential isolation via bootstrap.js — agents never touch raw tokens.


The "Native Only" Philosophy

This project enforces a strict rule: if Node.js can do it natively, we don't install a package for it.

// ❌ What we DON'T do
const axios = require('axios');
const express = require('express');
const _ = require('lodash');

// ✅ What we DO
const https = require('https');
const fs = require('fs/promises');
const { EventEmitter } = require('events');

This isn't dogma — it's a deliberate architectural choice:

  • Zero supply-chain attack surface from third-party packages
  • Maximum performance — no abstraction layer overhead
  • Portability — runs on any Node.js v22+ environment, no npm install required
  • Forced understanding — if you write it native, you understand what it actually does

🚀 V4 Strategic Layer: The Intelligence Upgrade

ANF V4 introduces the Strategic Layer, moving from simple task execution to autonomous cognitive governance.

1. 🧠 Active Recall (Context-Aware Learning)

The factory now learns from its failures. If a task fails (e.g., due to a banned library), the Architect extracts a "Lesson Learned". This lesson is injected into the Coder's prompt only when relevant to the current task's context, preventing context-window bloat while ensuring the same mistake is never repeated.

2. 🕵️ Shadow Tester (Security-First Static Analysis)

A dedicated security_guardrail.js module performs real-time static analysis:

  • Secret Detection: Catches hardcoded API keys and tokens.
  • Dangerous Patterns: Flags eval(), insecure regex (ReDoS), and direct shell execution.
  • Remediation Steer: Instead of just failing, the Tester provides a specific "Steer Instruction" to guide the Coder to a secure implementation (e.g., using .env).

3. ⚖️ Peer-Review Consensus

For critical architectural tasks (S0) and Database Schema changes, ANF invokes a Consensus Mechanism:

  • Dialectic Review: "Cost-Oriented" vs "Performance-Oriented" agent personas evaluate the plan.
  • Synthesis: The Architect synthesizes a final plan, weighting Performance (PRD V4 Compliance) above all else.

4. 📋 Self-Doc (State & Technical Debt)

The SYSTEM_STATE.md file tracks the physical reality of the project:

  • Feature Map: Real-time summary of implemented components.
  • Technical Debt: Explicitly tracks workarounds and temporary fixes, allowing the Architect to schedule "Refactor Sprints" autonomously.

Hardware & Infrastructure

Hardware Support

  • NVIDIA GPU: Optimized for Blackwell GB10 (120GB VRAM). Requires CUDA 13.0 and cu130 nightly PyTorch builds for aarch64.
  • Apple Silicon: Fully compatible with M-series chips utilizing Unified Memory for large context windows.
  • NPU Engines: Support for local AI accelerators (NPU) in modern mobile/desktop workstations.
  • Model: DeepSeek-R1-Distill-Qwen-32B (bfloat16 — ~64GB VRAM).

TEST SYSTEM

Server: vLLM OpenAI-compatible API (port 8000) Runtime: Node.js v22+ OS: Ubuntu 22.04+ (aarch64 / Blackwell) Deps: libnuma-dev, python3-dev, build-essential

Why 32B and Not 70B?

Simple math: 70B in bfloat16 requires ~132GB VRAM. GB10 has 120GB. The OOM Killer doesn't negotiate.
32B at ~64GB leaves 56GB for KV Cache — which actually makes the system faster for long reasoning chains.

Target Hardware (Roadmap)

  • Apple Silicon — M4 Ultra (192GB Unified Memory) for macOS-native agent deployment
  • ASUS Ascend — NPU-accelerated edge inference for sub-100ms agent response times

Project Structure

/AutonomousNativeForge/
├── agents/
│   ├── architect.js      # Document scanner + task decomposer
│   ├── coder.js          # Native code producer
│   ├── tester.js         # Security + dependency auditor
│   └── docs.js           # DEVLOG writer + archivist
├── core/
│   └── agentBus.js       # EventEmitter communication layer
├── config/
│   └── vault.json        # Multi-tenant credential store (gitignored)
├── docs/
│   └── reference/        # Drop .md files here → Architect auto-discovers
├── workspace/            # Agent-generated code output
├── queue/
│   └── inbox/            # Inter-agent JSON task files
├── logs/
│   └── system.log        # Unified timestamped log
├── bootstrap.js          # Factory ignition — starts all 4 agents
├── DEVLOG.md             # Autonomous development journal
└── main.js               # Orchestration entry point

Getting Started

Prerequisites

  • Node.js v22+
  • Blackwell GB10 or compatible GPU/NPU
  • GitHub Personal Access Token (for agent interaction)

Automatic Setup (Blackwell Dedicated)

The most reliable way to get ANF running on a Blackwell system is our automated setup script:

# 1. Clone the repo
git clone https://github.com/trgysvc/AutonomousNativeForge.git
cd AutonomousNativeForge

# 2. Run the Blackwell setup script
# This handles: GPU Dependencies -> CUDA -> vLLM Environment
./GB10_installation_script.sh

# 3. Configure your projects
# Drop your PRD/Spec files into:
docs/reference/[PROJE_ID]/

# 4. Start the factory
node agents/bootstrap.js

The factory wakes up. Architect discovers your spec. The pipeline runs.


The Transparency Manifesto

This repository is not just code — it's a public engineering journal.

Every session produces entries in three places:

DEVLOG.md — What was attempted, what broke, what was learned.
GitHub Issues — Real failure reports: "Session #4 — CoT blocks polluting output, solved with regex strip"
GitHub Discussions — Architecture decisions, trade-off debates, community questions.

We specifically track:

  • 🔴 Prompt failures — Which prompt caused hallucination and why
  • 🟡 Hardware bottlenecks — Where the GPU/NPU stalled and for how long
  • 🟢 Self-healing events — How many retries it took and what the fix was

Roadmap

  • vLLM + DeepSeek-R1 32B stable on Blackwell GB10
  • 4-agent pipeline with EventEmitter bus
  • Multi-tenant credential isolation
  • Self-healing loop (3 retries → ERROR_REPORT)
  • Autonomous GitHub push via native HTTPS
  • V4 Strategic Layer: Active Recall, Shadow Tester, Consensus
  • Self-Doc: SYSTEM_STATE.md with Technical Debt tracking
  • Apple Silicon port (MLX backend)
  • ASUS Ascend NPU inference integration
  • Web UI for real-time agent monitoring
  • Autonomous Refactoring Sprints (Debt Clearance)
  • Community plugin system for custom agents

Contributing

Read CONTRIBUTING.md before opening a PR. The one hard rule: no middleware dependencies. If you're adding a feature that requires an npm package, open a Discussion first and make the case.

Bug reports are especially welcome — the more specific, the better. "It broke" is not a bug report. "Coder agent produced CommonJS require() instead of ESM import on Node.js v22.3.0, here's the exact prompt and output" is a bug report.


License

MIT — Use it, fork it, build on it. If you do something interesting, open a Discussion and tell us about it.


Author

Turgay Savacı — Software Developer, 15+ years in IT, last 5 years deep in software engineering.
Building things that shouldn't exist yet, documenting every failure along the way.

The cloud is convenient. Local is sovereign.

About

ANF — Autonomous Native Forge is a cloud-free, self-healing software production pipeline powered by 4 AI agents (PM, Architect, Coder, Reviewer). Built entirely on Node.js native modules — no middleware, no external dependencies. Runs on local hardware: NVIDIA GPU, Apple Silicon (Unified Memory) and NPU-accelerated devices. Local LLM inference only

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors