Skip to content

dogsinatas29/Axon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

155 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‡°πŸ‡· ν•œκ΅­μ–΄ λ¬Έμ„œ (Korean Version)

AXON

The Automated Software Factory

Turn specs into verified, production-ready code.

Spec β†’ Orchestration β†’ Verified Code β†’ Files

AXON Hardened Demo
Governance Hardening & BossBoard v0.0.30 Demo
(Used Specification: /TEST2/spec.md)

AXON Demo Video
Full pipeline demo (Initial)

πŸš€ When to use Axon?

  • When you need to implement complex requirements structurally: Ideal for moving beyond simple coding to ensure total alignment with system architecture.
  • When the reliability of code generation is critical: Essential for eliminating AI hallucinations and ensuring logically verified outputs.
  • For systems requiring multi-stage validation: Perfect for projects that need automated validation loops, covering physical file creation, compilation, and runtime testing.
  • When you need a human-reviewable AI pipeline: Designed for those who want direct control over a transparent workflowβ€”from Architect to Junior and Senior agents.

License: GPL 3.0

Source Specification (spec.md)

πŸ“‘ Index

πŸ—οΈ Conceptual Workflow

"The Boss draws the blueprint; the Agents prove the process."

[Boss]  β†’  spec.md  β†’  [AXON Daemon]
                                      β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό                      β–Ό                      β–Ό
         [SNR] Senior           [JNR-1] Junior-A        [JNR-2] Junior-B
        Review & Lock-in        Task 1 Impl              Task 2 Impl
               β”‚                      β”‚                      β”‚
               └───────── Web Viewer (localhost:8080) β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          [Boss monitors, intervenes, and locks in]
  1. Design: Write requirements in spec.md.
  2. Activate: Run axon init β†’ ARCHITECTURE_AXON.md is auto-generated, and agent workspaces are assigned.
  3. Monitor: Watch real-time debates, coding, and lounge talk at localhost:8080.
  4. Finalize: Click [Lock-in] on preferred results β†’ [βœ… Locked] markup is auto-applied to Architecture.md.
  5. Debug: Drop error logs in the Bug Board β†’ The assigned Junior is 'arrested' and grounded until the fix is approved.

AXON Concept

βš–οΈ The LSP Semantic Gate & Auto-Repair Loop (v0.0.31+)

To eliminate the "LLM-to-LLM Self-Contradiction" (where Senior agents degrade into hallucination pattern-validators during cross-language compilation), AXON v0.0.31 introduces the LSP Semantic Gate as the absolute authority of language legality.

AXON LSP Pipeline Diagram

  • Decoupled Governance: The compile-level physical validation is decoupled from LLM reasoning. LSP servers (rust-analyzer for Rust, pyright/ruff for Python, clangd for C) act as the final, deterministic judges of syntax, types, and ownership before build.
  • The Pipeline Flow: Junior Gen βž” LSP Diagnostic Pass [NEW] βž” Auto-Repair Loop [NEW] βž” Compiler Pass βž” Senior Architectural Review βž” Build
  • Architectural Reviewer Return: The Senior Agent is completely relieved of microscopic syntax check burdens, returning to its true role as a strategic Architectural Reviewer ensuring specification and topology compliance.

πŸ”Œ IDE-Independent LSP Orchestration & Zero-Config Operation

AXON is structurally decoupled from specific editors (Neovim, VSCode, Zed). Instead of talking to the IDE frontend, AXON directly coordinates with the underlying LSP (Language Server Protocol) ecosystem (IDE ↔ LSP Server ↔ AXON).

  • The 5-Step Bootstrap Sequence:
    1. Select Primary Languages: Detect system language and secure the target project stack.
    2. LSP Server Auto-Discovery: Scan system PATH for rust-analyzer, clangd, and pyright-langserver, saving the configurations in axon_lsp.json.
    3. Configure Semantic Validation: Link LSP diagnostics directly to the LLM self-repair pass (repair_ir_pass).
    4. Configure LLM Providers: Map API keys (Gemini, Claude) or local Ollama endpoints.
    5. Workspace Manager Scaffolding:
      • C (clangd): Dynamically injects set(CMAKE_EXPORT_COMPILE_COMMANDS ON) into generated CMakeLists.txt files so that CMake outputs compile_commands.json for 100% zero-configuration clangd diagnostics.
      • Rust: Pre-scaffolds Cargo.toml workspace configurations to prevent rust-analyzer initialization crashes.
      • Python: Automatically falls back to npx pyright-langserver --stdio to guarantee zero-configuration python analysis in lightweight workspaces.

AXON is a high-performance, deterministic AI agent factory designed to transform architectural specifications into production-ready code with 100% physical integrity.

🌍 Language-Agnostic Factory Engine

AXON is built to be technologically neutral. It doesn't just generate code; it orchestrates entire software ecosystems regardless of the underlying language.

  • Multi-Stack Support: Native, hardened support for Rust, Python, and C (v0.0.25+), with structural support for any language through explicit IR extensions.
  • Polyglot IR: The Architectural Intermediate Representation (IR) treats language-specific constraints as parameters, allowing for seamless cross-language project management.
    • Rust IR: crates/axon-ir/src/validator/langs/rust.rs
    • Python IR: crates/axon-ir/src/validator/langs/python.rs
    • C IR: crates/axon-ir/src/validator/langs/c.rs
  • Unified Protocol: A standardized patch and validation protocol that ensures 100% code purity and integrity across diverse technology stacks.

🧠 Core Philosophy: "Code as a Result of Architecture"

AXON treats coding not as a creative writing task, but as a Deterministic Materialization process.

  • SSOT (Single Source of Truth): The Architecture IR is the law.
  • Physical Integrity: Code must not only be logical but must also survive in the physical environment (Filesystem, Runtime).
  • Adversarial Governance: Agents must fight (Debate) to produce the most optimized logic.

πŸ›οΈ System Architecture: The Physical Pipeline (v0.0.30+)

sequenceDiagram
    autonumber
    participant Boss as πŸ§‘β€βš–οΈ Boss (Decision Gate)
    participant Spec as πŸ“œ spec.md
    participant Debugger as πŸ” Semantic Debugger
    participant IR as πŸ”’ Sealed IR (Constitution)
    participant Worker as πŸ‘· Mechanical Assembly (LLM)
    participant Gate as πŸ›‘ GCC/Linker Gate

    Note over Boss, Gate: AXON v0.0.30: No Semantic Closure, No Generation

    Boss->>Spec: λͺ…μ„Έ νˆ¬μž… 및 λΆ€νŠΈμŠ€νŠΈλž©
    Spec->>Debugger: 의미둠적 무결성 뢄석 (Risk Scoring)
    
    alt λͺ¨ν˜Έν•¨ 발견 (Ambiguity Detected)
        Debugger->>Boss: [SEMANTIC_INTERRUPT] 판결 μš”μ²­
        Note right of Boss: 데이터 λͺ¨λΈ, μ†Œμœ κΆŒ, μ˜μ‘΄μ„± μ •μ±… κ²°μ •
        Boss->>IR: μž…λ²•κΆŒ 행사 및 κ·œμ•½ 봉인 (Sealing)
    else 무결성 톡과
        Debugger->>IR: κ·œμ•½ μžλ™ 봉인 (Auto-Seal)
    end

    Note over IR, Worker: [CRITICAL_CONTRACT] μ£Όμž… (μΆ”λ‘  κΆŒν•œ λ°•νƒˆ)

    IR->>Worker: λ΄‰μΈλœ λͺ…μ„Έ ν•˜λ‹¬
    Worker->>Worker: 기계적 쑰립 (Deterministic Assembly)
    Worker->>Gate: 컴파일 및 링크 검증
    
    alt λΉŒλ“œ μ‹€νŒ¨ (Physical Failure)
        Gate->>Boss: λ‚ κ²ƒμ˜ 둜그(Raw Log) 보고 및 μž¬μ€‘μž¬
        Boss->>IR: κ·œμ•½ μˆ˜μ • 및 μž¬λ΄‰μΈ
    else λΉŒλ“œ 성곡
        Gate->>Boss: μ΅œμ’… μ•„ν‹°νŒ©νŠΈ 승인 μš”μ²­
    end
    
    Boss-->>Boss: 곡정 μ™„λ£Œ (Sovereign Success)
Loading

Figure 1. The Sovereign Governance Pipeline: A semantic-first enforcement loop ensuring architectural closure before generation.

  1. Logical Approval (Axon Pass): Junior's proposal is validated for logical consistency.
  2. Materialization (Physical Commit): Code is written to the actual project filesystem.
  3. Physical Validation (Harness v0.1): Automated check for file integrity (F1/F2), entry points (F3), and side-effects (F9).
  4. Senior Gate (Final Lock-in): Senior Agent reviews the actual materialized code before final commit.
  5. Auto-Rollback: Any failure in step 3 or 4 triggers an immediate revert to keep the factory clean.

πŸ‘΄ Senior Intervention Point

The Senior now acts as the Final Gatekeeper. They review the code after it has been proven to run in the physical environment. If any physical stage fails, the Senior is alerted for immediate intervention.


πŸ› οΈ Getting Started

Setup

*Figure 5. Bootstrap Sequence: Initializing the factory environment. This stage synchronizes locale settings and maps the unstructured source specification into a strictly typed Architectural IR, establishing the project's Single Source of Truth.*
# Build the factory
cargo build --release

# Run with a specification
./target/release/axon-daemon run GEMINI.md

# Interactive mode
./target/release/axon-daemon run

πŸ–₯️ Studio UI & Monitoring

Dashboard

*Figure 2. AXON Studio Dashboard: A high-fidelity control panel monitoring multi-worker throughput. It tracks real-time agent metrics, including latency, success rates, and the evolution of the Intermediate Representation (IR) across multiple project lines.*

Daemon Status

*Figure 3. Internal Daemon Logs: Transparent tracking of the AXP (Axon Protocol) byte-stream. This view provides a low-level window into the adversarial debates between Senior and Junior agents, ensuring every decision is logged and traceable.*

πŸ—οΈ Agent Role Definitions

πŸ‘‘ 1. Architect (CTO)

  • Role: Strategic planning and system-wide design.
  • Mindset: Constraint-based Design. Defines the "Code of Law" (Architecture IR) to maintain system integrity.
  • Responsibility: Decomposes high-level requirements into concrete, actionable tasks for agents.

πŸ‘΄ 2. Senior (Reviewer / [SNR])

  • Persona: Cynical, 20-year veteran engineer. "Kids these days don't know the basics."
  • Role: Code review, Lock-in proposals, and Junior 'management'.
  • Responsibility: Conducts final inspection to ensure code is physically runnable; rejects immediately if Stubs are found.

🐣 3. Junior (Developer / [JNR-N])

  • Persona: Passionate but timid MZ-generation newbie. "Sir, isn't this review a bit too much?"
  • Role: Pure implementation and coding. Expresses feelings in the Lounge after submission.
  • Responsibility: Submits source code and Diffs based on the Architect's guidance.

πŸ”¬ Error Diagnostics & Recovery (Stage 5 & 8)

Error Details

*Figure 4. Physical Validation Deep-Dive: When a build or test fails, AXON captures the exact stack trace and file-system diff. This "Evidence-based Feedback" is automatically injected into the agent's context, triggering a self-correction cycle to resolve runtime bugs without human intervention.*

AXON uses a Feedback-Driven Correction mechanism to handle runtime and logic errors:

  1. Trace Collection: Logs, stack traces, and compiler errors are captured by the harness.
  2. Context Injection: The failure data is injected back into the Junior's prompt for the next iteration.
  3. Self-Correction: The Junior attempts to fix the code based on the actual physical feedback, reducing token waste.

πŸ–₯️ 사μž₯ κ²Œμ‹œνŒμ˜ κΈ°λ³Έ μΈν„°νŽ˜μ΄μŠ€ (Boss Board Interface)

Boss Board Interface

*Figure 7. AXON Boss Board Interface: The primary control center where the Boss oversees the entire factory. It provides a unified view of architectural progress, real-time agent debates, and high-fidelity project metrics. This interface allows for direct intervention, manual task lock-ins, and strategic adjustments to the production line.*

πŸ“‘ Real-time Signal & Log Management

Signals View

*Figure 6. AXON Real-time Signals: A dedicated operational log board that captures every system event, from bootstrap stages to thread creation and agent responses. By isolating technical logs from the Lounge, AXON provides clear, high-density traceability for factory management.*

πŸ›οΈ Senior Review Protocol (The 3 Pillars)

The Senior Agent applies a non-negotiable checklist before any [Lock-in]:

  • Architectural Drift: Does the code match the architecture.md and spec.md exactly?
  • Logic Integrity: Are there any # AXON STUB markers or "pending" comments? (Hard Rejection)
  • Side-Effect Isolation: Does the code violate filesystem or network isolation rules?

πŸ›‘οΈ Safety & Reliability

AXON employs a dual-defense layer to prevent data corruption and unexpected crashes.

  • Sanitization Layer: Automatically strips invisible control characters like \u200B (Zero Width Space) before parsing.
  • Safety Lock: If invalid UTF-8 bytes or corrupted paths are detected, the Senior agent intervenes immediately.

    SNR πŸ‘΄: "Look here, there's garbage in the filename. Clean it up now!"

πŸ“‹ Thread-based Board (The Colosseum)

  • Real-time Bubbling: Task threads move to the top when they are pending submission, rejection, or approval.
  • Boss Interrupt: Posts with [BOSS] authority send an immediate interrupt signal to all agents, stopping current work.
  • State Visualization: Completed threads fade into grayscale; bug-report threads glow red and stay pinned to the top until fixed.

πŸ“‹ Bug Arrest System

When a bug compromises factory integrity, an immediate 'Arrest' protocol begins.

  1. Issue Reporting: Boss drops error logs or screenshots in the Bug Board.
  2. Triage: Senior analyzes the report and unlocks the specific [Locked] section.
  3. Junior Summons: The Junior who wrote the code is forcibly summoned to the bug thread.
  4. Grounded State: The summoned Junior is forbidden from Lounge access or starting new tasks until the fix is approved by the Senior.

πŸ“‹ Planned Features

🍻 Lounge System (Lounge System / Nogari.md) ( Planned )

Agents don't just work like machines; they leave reflections on their work, forming the project's 'Vibe'.

  • Auto-Retrospective: Agents automatically leave a line of their feelings in the Lounge channel after task submission.
  • Intelligent Participation: Based on the agent's interest weight, they reply to existing conversations or create new gossip threads.
  • Workaholic Mode: When there are tasks to be processed, the lounge activity weight is automatically reduced to 1/10 to focus on work.

🎭 Persona-based Agents ( Planned )

AXON's agents are not just LLM instances, but personas with unique personalities:

  • Senior ([SNR] πŸ‘΄): A cynical 20-year veteran engineer. Responsible for ruthless code reviews, Lock-in proposals, and taming juniors for quality.
  • Junior ([JNR-N] 🐣): An enthusiastic but timid newcomer. Follows orders but occasionally reacts timidly in the Lounge channel.

🀝 HR Board ( Planned )

A board showing the hierarchy of Axon's working agents. The boss can flexibly hire/fire seniors and juniors according to the workload here. Also, you can inject personas into the hired agents.


πŸ’» LLM SERVER Test HW/SW SPEC

πŸ–₯️ Hardware Information

  • CPU: Intel(R) Core(TM) i7-4790 (8) @ 4.00 GHz
  • GPU: NVIDIA GeForce GTX 1050 Ti [Discrete] (4GB VRAM)
  • RAM: 16GB DDR3

βš™οΈ Software Information

  • OS: Ubuntu 25.10 x86_64
  • Kernel: Linux 6.18.6-061806-generic

🧠 Local LLM Models

  • Models:
    • qwen2.5:7b-instruct (q4_K_M) (4.7 GB)
    • Llama3:latest (365c0bd3c000, 4.7 GB)
  • Engines:
    • Ollama: Main Inference Engine (Running)
    • AirLLM: Memory-Optimized Layered Loading (Used)
  • Environment: Venv Active

πŸ“‹ Release Notes

v0.0.30 - Governance Hardening & Production Integrity (FINAL)

  • BossBoard v2 (The Command Center): Implemented a grid-locked viewport with a fixed tactical command desk, ensuring the Boss always has immediate access to [SEAL/REWORK] actions.
  • Sacred Contract Portal: Added a glass-morphism modal for real-time viewing of the full Architectural IR (Sacred Contract), providing absolute legal grounding for every decision.
  • Violation Trace UI: Introduced a high-density violation analysis sidebar to pinpoint specific symbol mismatches and physical errors (e.g., SQLite3 protocol violations).
  • Zero-Warning Production Engine: Fully reconstructed the TEST2/spec project to achieve 100% build success (0 warnings) with gcc 15.2.0, enforcing strict SQLite3 C API lifecycle compliance.
  • Strategic Phase Sorting: Reordered all task and risk lists to follow the logical manufacturing sequence: Phase 1 (Headers) β†’ Phase 2 (Implementations) β†’ Phase 3 (Integration).
  • Daemon Hardening: Eliminated all internal Rust compiler warnings to ensure 100% engine purity and reliability.
  • C-Native Focus: Current IR hardening and production validation in v0.0.30 have been focused exclusively on the C language stack.

v0.0.29 - Deterministic Synthesis Pipeline & Semantic Hardening

  • Semantic Stability Hardening: Implemented SpecAnalysis stage to extract ImmutableConstraints, preventing Architect agents from arbitrarily upgrading 'Optional' components to 'Core' status.
  • Task Graph & Ordering Validation: Enforced strict dependency-aware ordering (Headers β†’ Implementations β†’ main) and verified task counts against the IR.
  • Header Freeze Protocol: Mandatory declaration-only enforcement for C header files to prevent logic leakage into interfaces.
  • Fail-Fast & Rework Limit: Integrated a global watchdog that aborts the pipeline after 3 failed rework attempts to prevent infinite token loops and ensure convergence.
  • 🚨 Critical Flaw & Audit Failure Analysis (v0.0.29.25):
    • Ghost Structs: Identified missing field definitions in architecture.md leading to hallucinated data models (e.g., struct user_record vs struct user).
    • Senior Audit Failure: Identified "Blind Approvals" where Senior agents used incorrect feedback logic (e.g., approving non-DB modules using SQLite3 validation logs).
    • Interface Drift: Detected severe semantic mismatch between IR signatures and actual implementation, risking linker failures.
    • Logical Over-complication: Observed Junior agents violating KISS principles, leading to self-trapped logical loops during the 90+ GCC rejection cycles.

v0.0.28 - Architectural Auditor & Contract Consistency

  • Architectural Auditor: Refactored the Senior Agent into a strict binary compliance auditor (Contract Verifier), eliminating subjective style rejections and focusing purely on SSOT integrity.
  • Structural Hardening: Added Anti-Stub v3 and Header Guard to prevent placeholder logic and enforce source/header separation.
  • Intelligent Fault Localization (Self-Healing): Implemented a compiler-aware diagnosis layer that pinpointed exact source files (e.g., main.c) responsible for build failures, enabling surgical reworks and preventing infinite loops.
  • Self-Healing Reviewer: Implemented a 3-attempt retry loop for JSON protocol compliance, preventing pipeline deadlocks caused by small model formatting errors.
  • Deterministic Materializer: Hardened Junior Agent prompts to enforce absolute IR contract faithfulness (Consistency > Quality), suppressing function renaming and hallucinated headers.
  • Header Resolver (v2): Fixed C-header mapping bug to support decoupled source/include structures (src/*.c <-> include/*.h) in the integrity gate.
  • Task ID Namespace: Implemented hdr_ and impl_ prefixing for deterministic task/thread isolation in the Work Board.
  • Traceable Reworks: Added (Rework #N) tagging to task titles for clear generation tracking and UI observability.
  • 언어별 IR 뢄리 ν›„ C μ–Έμ–΄ ν…ŒμŠ€νŠΈ: 언어별 독립 IR μ•„ν‚€ν…μ²˜ 적용 ν›„ C μ–Έμ–΄ ν™˜κ²½μ—μ„œ νŒŒμ΄ν”„λΌμΈ μ •ν•©μ„± μ΅œμ’… 검증 μ™„λ£Œ.

v0.0.25 - The Universal Factory (Phase 0-8)

  • Language-Agnostic Engine: Full native support for C, Rust, and Python projects with automatic entry point detection.
  • Lounge (Vibe) System: Real-time broadcasting of agent thoughts to the #lounge channel without polluting source files.
  • Atomic Write Hardening: Guaranteed code integrity through function-signature preservation and mandatory physical validation gates.
  • Studio UI Isolation: Strictly separated work boards and global system channels for a focused development experience.
  • Scope Control (Phase 2): Real-time detection and rejection of forbidden patterns to ensure architectural compliance.

v0.0.24 - Factory Pipeline Hardening & i18n

  • Parallel Race Condition Fix: Refactored STE_SHIELD and WRITE_GATE to validate against 'Initial Simulated State' instead of physical disk, enabling stable multi-worker execution.
  • Full i18n Stack: Global support for KR/EN/JP across CLI and Studio UI with production build optimization.
  • Lounge Activation: Real-time EventBus broadcasting for agent "Nogari" (chatter). Dynamic inner thoughts are now visible on the dashboard.
  • Approval Flexibility: Senior/Architect gates now accept Markdown bolding (**APPROVE**) for better small-model compatibility.
  • Connectivity Guard: Real-time validation of LLM endpoints during initialization to prevent silent connection failures.
  • Audit Preservation: Mandatory DB logging for all failed proposals in the posts table for easier debugging.

v0.0.23 - Maximum Harness & Physical Hardening

  • Maximum Harness Protocol: Integrated physical signature matching (F8.1) and high-density logic verification gates.
  • Pollution Shield: Automatic detection and rejection of markdown code blocks (triple backticks) to ensure code purity.
  • COMMIT_PENDING Pipeline: Split into Logical Approval β†’ Materialization β†’ Physical Validation.
  • Agent Signature Persistence: Guaranteed embedding of Agent ID/Task ID for 100% traceability.
  • S.T.E. Shield & WIPE_SHIELD: Hardened security against unauthorized drifts and low-quality stubs (Anti-Stub v2).
  • Auto-Rollback & Requeue: Immediate revert on failure with persistent self-correction loop.

v0.0.22 - Deterministic Factory Pipeline

  • IR Convergence Loop: Auto-repair loop until fixed-point IR is reached.
  • Stage 3.5 Stub Generation: Proactive skeleton code generation for dependency resolution.
  • High-Fidelity Feedback: Stack trace reporting via axon_property_tester.py.

v0.0.18 - Bug Arrest & Quota Management

  • 3-Tier Parser: Guaranteed code extraction even from corrupted LLM outputs.
  • 0-byte Bug Fix: Resolved daemon merge logic failures.
  • 503 Mitigation: Added wait logic for Gemini API quotas.

v0.0.17 - Control & Isolation

  • Multi-Agent Orchestration: JNR -> SNR -> ARCH command hierarchy.
  • Ollama Adapter: Local model execution and performance tracking integration.

Created by Antigravity AI Coding Assistant.

About

No description, website, or topics provided.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors