Skip to content

Latest commit

Β 

History

84 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Qwen3CoderNext

A local-first coding agent framework β€” Codex-style repository automation, without handing your codebase to a black box.


Your repo. Your machine. Your rules.


Status Tests Python License uv


πŸ€” Why This Exists Β· ✨ What Makes It Different Β· πŸ— Architecture Β· πŸ“¦ Install Β· πŸ—Ί Roadmap Β· 🀝 Contributing


πŸ€” Why This Exists

Every major AI coding agent forces the same trade-off: ship your repository to a vendor's cloud, or give up autonomous workflows entirely.

That trade-off is unnecessary. And it's expensive:

  • Your code β€” env vars, internal tooling, proprietary logic β€” leaves your machine
  • Execution is opaque. You can't audit what the agent actually did to your codebase
  • You're locked to one provider's roadmap, pricing, and uptime
  • Most agent codebases calcify into unmaintainable spaghetti before the approach is even proven

Qwen3CoderNext exists because "autonomous" and "auditable" shouldn't be opposites.

It's a coding agent foundation built on infrastructure you control, where every read, write, and command is logged, checksummed, and replayable β€” before any autonomous behavior is layered on top.


πŸ“ Current Development Status

This project is under active development, built incrementally with a completed-layer-first discipline.

Completed:

  • Foundation Layer
  • Local Tooling Layer
  • Planning Layer
  • Failure Recovery Layer β€” Steps 1-9 complete
  • Repository Intelligence β€” Part 9 Steps 1-9 complete
  • Code Knowledge Graph β€” Part 10 Steps 1-7 complete

Current focus:

  • Agent Core
  • Execution Layer
  • Repository Intelligence and Graph integration into runtime workflows
  • Evaluation Layer integration

✨ What Makes It Different

Typical Cloud Coding Agents Qwen3CoderNext
Where it runs Vendor's cloud Your machine / your infra
Execution visibility Opaque Append-only, sequence-numbered audit log
Repo boundaries Implicit, trust-based Explicitly enforced
Generated files Ephemeral Checksum-verified, versioned, provenance-tracked
Provider lock-in High Model-gateway abstraction β€” swap providers freely
Build philosophy Ship autonomy, bolt on reliability later Deterministic infrastructure first, intelligence layered on top

πŸ”‘ Key Features

  • Local-first execution β€” your repository and credentials never have to leave your machine
  • Enforced workspace boundaries β€” the agent physically can't wander outside the repo it's working in
  • Safe, reversible file operations β€” reads, patches, and writes go through a controlled pipeline, not raw filesystem access
  • Full audit trail β€” every action is append-only logged and replayable, so you always know what happened and why
  • Provenance-tracked artifacts β€” every generated file is checksum-verified with a supersede history, never silently overwritten
  • Provider-independent model gateway β€” change models without rearchitecting your workflow
  • Built to be understood β€” modular, contract-driven components instead of one sprawling agent loop

πŸ— Architecture Overview

flowchart TD
    U[User / CLI] --> O[Orchestrator]

    O --> PL[Planning Layer]
    O --> MG[Model Gateway]
    O --> TF[Tool Framework]

    PL --> RI[Repository Intelligence]
    RI --> KG[Code Knowledge Graph]

    TF --> FS[Filesystem Service]
    TF --> CMD[Command Execution]
    TF --> AR[Artifact Registry]

    FS --> AL[Audit Log]
    CMD --> AL
    AR --> AL

    O --> FR[Failure Recovery]
    FR --> CP[Checkpoint / Rollback]
    FR --> LED[Recovery Ledger / Metrics]

    RI -.->|repository facts| PL
    KG -.->|code structure / traversal| PL

    O -.->|integration in progress| EX[Execution]
    O -.->|not yet fully wired| MEM[Memory]
Loading

Solid lines = implemented, validated, and available as project components. Dashed lines = implemented boundaries that are not yet fully wired into the runtime agent loop.

Component breakdown:

Component Role Status
Orchestrator Coordinates planning, tools, recovery, and runtime execution boundaries βœ…
Planning Layer Request normalization, task decomposition, dependency resolution, artifact generation βœ…
Model Gateway Routes requests across supported model providers βœ…
Tool Framework Contract, registry, manager, and tool adapter infrastructure βœ…
Filesystem Service Workspace boundaries, safe reads/writes, patches, and diffs βœ…
Artifact Registry Checksum, provenance, and supersede tracking for generated files βœ…
Audit Log Append-only, sequence-numbered action history βœ…
Failure Recovery Failure classification, strategy selection, bounded execution, checkpoint/rollback, ledger/metrics, scenario tests βœ…
Repository Intelligence Scanning, classification, dependency hints, summaries, persistence, incremental refresh, queries, fixture integration βœ…
Code Knowledge Graph Graph contracts, parser adapters, relation normalization, storage, traversal, invalidation, export βœ…
Memory Runtime-owned persistent context and working-memory infrastructure 🚧 Integration pending
Agent Core End-to-end task execution and runtime wiring across the completed layers 🚧 Active

πŸ“Š Current Status

βœ… Foundation Layer β€” Complete

  • Core contracts (artifact, model, runtime, state, task)
  • Configuration system (settings, loader, defaults)
  • Structured logging infrastructure
  • State management (manager, store)
  • Model gateway and adapter layer
  • Runtime context and orchestrator shell
  • Artifact manager and store
  • Prompt infrastructure (contracts, loader, registry)
  • Evaluation foundation

βœ… Local Tooling Layer β€” Complete

  • Workspace resolution and boundary enforcement
  • Filesystem service abstraction
  • Safe file reads, writes, and patch application
  • Diff generation
  • Command execution
  • Artifact registry
  • Audit logging
  • Tool adapter integration

βœ… Planning Layer β€” Complete

  • Request normalization
  • Task decomposition
  • Dependency resolution
  • Validation
  • Planner state management
  • Artifact generation
  • Deterministic serialization
  • Runtime integration

βœ… Repository Intelligence β€” Complete

  • Part 9 Steps 1-9 complete
  • Immutable repository contracts and snapshot schema
  • Deterministic repository scanning and ignore handling
  • File classification and language detection
  • Shallow dependency hint extraction
  • File and folder summary generation
  • Manifest persistence
  • Incremental refresh and change journaling
  • Snapshot-backed query service
  • Fixture-driven end-to-end integration tests

βœ… Code Knowledge Graph β€” Steps 1-7 Complete

  • Immutable graph schemas and canonical IDs
  • Parser adapter boundary with deterministic Python AST parsing
  • Relation normalization and symbol resolution
  • Persistent graph snapshot storage and publication
  • Bounded deterministic graph traversal
  • Invalidation and incremental reconciliation
  • JSON, CSV, and text graph export

🚧 Agent Core β€” In Progress

  • Wiring the completed layers into the orchestrator
  • Building real end-to-end task execution
  • Runtime integration of repository intelligence and graph services
  • First complete CLI workflow

🎯 Target Experience

Agent Core is not yet complete. This is the full intended workflow once it lands.

You: "Refactor the auth module to use the new session interface."
          β”‚
          β–Ό
    Planning Layer
    (decomposition Β· dependency resolution Β· artifact generation)
          β”‚
          β–Ό
    Research Layer
    (schemas Β· state Β· request normalization Β· source policy)
          β”‚
          β–Ό
    Execution
    (controlled, audited, boundary-enforced)
          β”‚
          β–Ό
    Local Tooling
    (filesystem reads Β· patch application Β· command execution)
          β”‚
          β–Ό
    Audit Log
    (every action checksummed and replayable)
          β”‚
          β–Ό
    Artifacts
    (provenance-tracked Β· versioned Β· never silently overwritten)
          β”‚
          β–Ό
    Human Approval Gate
          β”‚
          β–Ό
    Main Branch

πŸ“¦ Installation

git clone https://github.com/neural-agi/Qwen3-coder-next.git
cd Qwen3-coder-next
uv sync

πŸ§ͺ Quick Start

The fastest way to verify the foundation is solid while Agent Core is being built:

uv run python -m unittest discover -s tests -v

329 tests. Zero failures.

Test Tier Coverage
tests/smoke/ Deterministic subsystem and contract smoke tests β€” contracts, configuration, logging, state, tooling, planning, recovery, repository intelligence, graph foundations, runtime, and subsystem boundaries
tests/unit/ Deep subsystem-level tests β€” detailed coverage for local tooling and core infrastructure
tests/integration/ End-to-end integration coverage β€” local tooling and repository-intelligence integration flows

πŸ“ Repository Structure

Qwen-3-Coder-Next/
β”œβ”€β”€ src/qwen3_coder_next/
β”‚   β”œβ”€β”€ __main__.py              # CLI entry point
β”‚   β”œβ”€β”€ adapters/                # model gateway, base adapter, exceptions
β”‚   β”œβ”€β”€ artifacts/                # artifact manager and store
β”‚   β”œβ”€β”€ bootstrap/                # app bootstrap, runtime initialization
β”‚   β”œβ”€β”€ config/                   # settings, loader, defaults
β”‚   β”œβ”€β”€ contracts/                # core type contracts β€” artifact, model, runtime, state, task
β”‚   β”œβ”€β”€ evaluation/                # evaluation contracts, evaluator, simple_evaluator
β”‚   β”œβ”€β”€ execution/                 # execution contracts and result types
β”‚   β”œβ”€β”€ extractors/                # graph relation normalization and symbol resolution
β”‚   β”œβ”€β”€ graph/                     # graph schemas, storage, traversal, invalidation, export
β”‚   β”œβ”€β”€ local_tooling/             # filesystem, reads, mutations, diff, commands,
β”‚   β”‚                               # artifact registry, audit, resolution, adapter, contracts
β”‚   β”œβ”€β”€ logging/                    # formatter, logger, setup
β”‚   β”œβ”€β”€ memory/                     # schemas, state, contracts, manager, store
β”‚   β”œβ”€β”€ parsers/                    # parser contracts and language adapters
β”‚   β”œβ”€β”€ planning/                   # contracts, planner, decomposition, validation
β”‚   β”œβ”€β”€ repo_intelligence/          # repository contracts, scanner, classifier, dependencies,
β”‚   β”‚                                # summaries, manifests, refresh, query services
β”‚   β”œβ”€β”€ research/                   # research schemas, state, source policy, pipeline
β”‚   β”œβ”€β”€ prompts/                    # contracts, loader, registry
β”‚   β”œβ”€β”€ runtime/                    # orchestrator, runtime context
β”‚   β”œβ”€β”€ state/                      # state manager and store
β”‚   β”œβ”€β”€ tools/                      # contracts, registry, manager, echo_tool
β”‚   └── utils/
β”‚
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ smoke/                   # Deterministic subsystem and contract smoke tests
β”‚   β”œβ”€β”€ unit/                    # Deep subsystem-level tests
β”‚   └── integration/             # End-to-end subsystem integration tests
β”‚
β”œβ”€β”€ documents/                   # internal architecture docs
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ vision.md
β”‚   β”œβ”€β”€ roadmap.md
β”‚   β”œβ”€β”€ coding_standards.md
β”‚   β”œβ”€β”€ progress.md
β”‚   └── session_handoff.md
β”‚
β”œβ”€β”€ Roadmap and Module wise expansion/   # 15 PDFs β€” full Tier 3 roadmap
β”‚   β”œβ”€β”€ Part 1: Foundation
β”‚   β”œβ”€β”€ Part 2: Filesystem + Local Tooling
β”‚   β”œβ”€β”€ ... (Parts 3–14)
β”‚   └── Part 15: Near-Codex Integrated System
β”‚
β”œβ”€β”€ logs/                        # application.log β€” the system already runs
β”œβ”€β”€ pyproject.toml, uv.lock
└── README.md

πŸ“š Documentation

documents/ β€” Internal architecture specifications, coding standards, progress tracking, and session context. Start here before touching code.

Roadmap and Module wise expansion/ β€” 15 PDFs covering the complete Tier 3 roadmap from Foundation through Near-Codex Integrated System. If you want to understand the layering decisions, start with the master roadmap PDF.


πŸ—Ί Roadmap

Layer Focus Status
Foundation Contracts, config, logging, state, model gateway, orchestrator, artifacts βœ… Complete
Local Tooling Filesystem, reads/writes, commands, audit, artifact registry βœ… Complete
Planning Layer Request normalization, task decomposition, dependency resolution, runtime integration βœ… Complete
Failure Recovery Failure classification, recovery strategy, execution, rollback, ledger/metrics, chaos validation βœ… Complete
Repository Intelligence Contracts, scanning, classification, dependency hints, summaries, persistence, refresh, queries, integration tests βœ… Complete
Code Knowledge Graph Graph contracts, parsing, normalization, storage, traversal, invalidation, export βœ… Steps 1-7
Agent Core Runtime integration, real task execution, CLI 🚧 Active
Execution Layer Controlled execution pipeline and autonomous task execution 🚧 In Progress
Memory Layer Persistent context, session memory, cross-task recall 🚧 Integration pending
Autonomous Workflows End-to-end task execution with human approval gates πŸ“‹ Planned
Multi-Agent Architecture Coordination, specialization, parallel execution πŸ“‹ Planned

The full 15-part roadmap is documented in Roadmap and Module wise expansion/.


πŸ‘₯ Who This Is For

Privacy-conscious developers and teams who can't or won't send proprietary code, internal tooling, or environment secrets to a third-party cloud agent.

Teams under compliance constraints β€” legal, financial, healthcare β€” where code leaving the machine isn't an option, but autonomous development workflows still are.

OSS maintainers who want reproducible, auditable automation in CI without a vendor dependency.

Builders and researchers who want a clean, contract-driven foundation to build agent behavior on top of β€” rather than forking an opinionated monolith and fighting its design assumptions.


🀝 Contributing

Qwen3CoderNext is early β€” contributing now means shaping the foundation, not just adding to it.

Read CONTRIBUTING.md for full setup instructions, coding guidelines, pull request expectations, and the project philosophy before opening anything.

The short version:

  • Open an issue before large changes β€” architecture decisions need to stay consistent with existing contracts
  • Tests are not optional β€” every subsystem has smoke, unit, and integration coverage; PRs that reduce coverage don't merge
  • Read the relevant documents/ spec and roadmap PDF for the module you're touching β€” it saves significant back-and-forth

Where to contribute right now:

Area What's Needed
🚧 Agent Core Orchestrator integration, end-to-end task execution, memory wiring, CLI entrypoint
🚧 Repository / Graph Integration Connect repository intelligence and graph services to runtime workflows
πŸ§ͺ Test Coverage Additional integration, regression, and end-to-end tests across completed layers
πŸ“š Documentation Architecture docs, setup guides, examples, and subsystem documentation

πŸ’‘ Design Philosophy

Most agent projects ship a capable-looking agent first and try to add reliability later. The result is an autonomous system that's hard to trust, hard to debug, and hard to extend β€” because the foundation wasn't built for those properties.

Qwen3CoderNext takes the opposite path: deterministic, testable infrastructure first. Every subsystem is validated before the next layer is added. Every layer is completed, validated, and frozen before higher-level systems are allowed to depend on it.

The long-term target is a fully autonomous, multi-agent development platform β€” repository understanding, persistent memory, multi-model collaboration, human approval gates β€” that never asks you to give up visibility into what it's doing or where your code lives.

329 automated tests. Deterministic infrastructure. Failure Recovery Steps 1-9 complete; Repository Intelligence Steps 1-9 and Part 10 Steps 1-7 graph foundations are implemented.


πŸ“„ License

Qwen3CoderNext is licensed under the MIT License.

You're free to use, modify, distribute, and build upon this project in accordance with the terms of the license.

See the LICENSE file for the full license text.


Built by @neural-agi

GitHub stars GitHub forks GitHub watchers

About

A local first, open source coding agent framework focused on building Codex like project assistance through a modular, testable, and extensible architecture.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages