Home · Developers · Guides · Architecture Overview

Foundations

Architecture Overview

Services, event bus and DI container

Nova Coder is built as a modular, event-driven AI software engineering platform. Every subsystem is a replaceable service with a common lifecycle, communicating through a central event bus and resolving dependencies through a dependency injection container.

Design Principles

  1. Everything is a Service: Config, logging, workspace, AI, tools, agents, and memory all implement the same NovaService lifecycle.
  2. Everything Emits Events: Services do not call each other directly. They publish events on the EventBus with optional filtering and routing.
  3. Everything Uses Dependency Injection: No global state. Services are registered in and resolved from the Container.
  4. Every Provider is Replaceable: AI providers, tools, agents, and plugins share common interfaces.
  5. Build in Phases: The platform grows incrementally from a stable kernel.
  6. Services Can Be Distributed: Service mesh integration enables traffic management, load balancing, and health checks for distributed deployment.
  7. State Can Be Event-Sourced: Event sourcing system provides event replay, state reconstruction, and snapshot support for auditability and debugging.

High-Level Architecture

                        ┌─────────────────────────────────────┐
                        │         User Interfaces             │
                        │  CLI │ Desktop │ Web │ IDE │ API    │
                        └─────────────┬───────────────────────┘
                                      │
                                      ▼
                        ┌─────────────────────────────────────┐
                        │      Nova Core Orchestrator         │
                        │         (Application)               │
                        └─────────────┬───────────────────────┘
                                      │
          ┌───────────────────────────┼───────────────────────────┐
          │                           │                           │
          ▼                           ▼                           ▼
   ┌─────────────┐            ┌─────────────┐            ┌─────────────┐
   │ AI Engine   │            │ Agent Engine│            │ Tool Engine │
   │             │            │             │            │             │
   │ Provider    │            │ Manager     │            │ Registry    │
   │ Router      │            │ Planner     │            │ Filesystem  │
   │ Prompts     │            │ Coder       │            │ Git         │
   │ Context     │            │ Reviewer    │            │ Shell       │
   └─────────────┘            │ Tester      │            └─────────────┘
                              └─────────────┘
                                      │
                                      ▼
                        ┌─────────────────────────────────────┐
                        │   Workspace Intelligence Engine     │
                        │                                     │
                        │  AST Parser │ Symbol Graph │ Vector │
                        │  Knowledge Graph │ Indexer          │
                        └─────────────────────────────────────┘

Data Flow Example

When a user asks "Add JWT authentication":

  1. CLI receives the prompt and publishes PromptReceived.
  2. Planner analyzes the request and publishes a TaskGraph.
  3. Workspace is queried for the authentication layer.
  4. Architect designs the change plan.
  5. Coder generates the code.
  6. Reviewer checks quality.
  7. Tester runs tests.
  8. Tool Engine applies changes via filesystem and git tools.
  9. CLI displays the result.

Service Architecture

All services share a common lifecycle:

class NovaService:
    def initialize(self) -> None
    def start(self) -> None
    def stop(self) -> None
    def dispose(self) -> None
    def health(self) -> ServiceHealth

The kernel manages startup and shutdown order deterministically.

Directory Layout

novacoder/
├── kernel/        # Lifecycle, DI, events, registry, health
├── config/        # Settings and validation
├── logging/       # Structured logging
├── ai/            # AI providers, routing, prompts
├── agents/        # Specialist agents
├── planner/       # Planning engine
├── tools/         # Tool framework
├── workspace/     # Indexing and code understanding
├── memory/        # Memory layers
├── plugins/       # Plugin system
├── cli/           # Command-line interface
└── app.py         # Application orchestrator

Roadmap

  • v0.0.1: Bootstrap, kernel, config, logging, CLI, basic AI, tools, agents, memory
  • v0.0.2: Workspace Intelligence, scanning, AST, symbols, dependency graphs
  • v0.0.3: AI Runtime, multi-provider support, streaming, model routing
  • v0.0.4: Planner, task decomposition and task graphs
  • v0.0.5: Tool Framework, full tool execution and permissions
  • v0.0.6: Agent Runtime, multi-agent orchestration
  • v0.0.7: Memory, persistent memory layers
  • v0.1.0: First public release

Development Instructions

Working with the Architecture

When modifying or extending Nova Coder, follow these rules to preserve the architecture:

  1. Every new capability is a service, implement NovaService and register it in the kernel.
  2. Services do not call each other directly, use the event bus for notifications and the container for dependency resolution.
  3. No global state, store subsystem state in services and access them through the container or registry.
  4. Every interface is replaceable, providers, tools, agents, and plugins share common base classes.
  5. One directory per responsibility, do not mix unrelated logic into the kernel or other modules.

Adding a New Major Subsystem

  1. Create a new directory under novacoder/.
  2. Implement a NovaService subclass in service.py.
  3. Export public classes from __init__.py.
  4. Add the service to NovaApplication.SERVICE_ORDER in novacoder/app.py.
  5. Add the subsystem to the directory layout diagram in this page.
  6. Add a dedicated wiki page in wiki/<subsystem>.md.
  7. Add unit and integration tests in tests/.

Modifying the Data Flow

When adding a new feature, trace how it fits into the flow:

User Request → Intent → Plan → Knowledge → Agents → Tools → Validation → Review

Publish events at each step so plugins and other services can react.

Version Planning

Use the roadmap to decide where a feature belongs. Avoid introducing advanced features before the kernel and runtime are stable.

Source: wiki/architecture-overview.md · rendered 2026-11-10