The system is a local-first project intelligence and planning layer between a software repository and AI agents.
It is not:
- Git;
- an IDE;
- a coding model;
- a generic project manager;
- a cloud requirement.
HUMAN / IDE / AGENT
│
┌──────────┴──────────┐
│ │
CLI MCP
│ │
└──────────┬──────────┘
▼
Planner Daemon
│
┌──────────────┼───────────────┐
▼ ▼ ▼
Project DB Retrieval Git Adapter
│ │ │
│ ├── exact ├── commits
│ ├── lexical ├── trees
│ ├── semantic ├── diffs
│ ├── graph └── content
│ └── temporal
│
└──────────────┬────────────────
▼
Context Compiler
│
▼
Agent
Source of truth for:
- file contents;
- commits;
- branches;
- diffs;
- object identities;
- repository history.
Source of truth for:
- goals;
- decisions;
- tasks;
- discoveries;
- semantic facts;
- provenance;
- plan state;
- evidence;
- environment metadata.
Source of truth for derived structural relationships:
- symbols;
- imports;
- references;
- calls;
- module structure.
Chooses relevant information.
Converts internal knowledge into a compact agent-facing representation.
Decides what work should happen next and how newly discovered information modifies future work.
Validates claims and creates evidence.
The daemon owns state transitions.
The CLI, MCP, and UI must not independently implement business logic.
CLI ───────┐
MCP ───────┤
UI ────────┤──> canonical API/state machine
Plugins ───┘
This prevents diverging behavior.
Initial deployment:
- single user;
- loopback daemon;
- one daemon, many projects;
- repository data remains local;
- optional local token for API access.
A remote/hosted service is a later deployment target, not a core assumption.
Every query should follow roughly:
intent
↓
query classifier
↓
cheap exact/lexical retrieval
↓
semantic retrieval where useful
↓
graph expansion
↓
temporal filtering
↓
relevance/risk ranking
↓
context compiler
No layer should assume that the whole project can be loaded.
State changes produce append-only events.
Derived indexes/materialized state are allowed to be rebuilt from events + Git.
This is intended to make:
- audit;
- debugging;
- recovery;
- provenance;
- historical reasoning
reliable.
Responsibilities:
- start/stop agent;
- provide selected context/capabilities;
- capture output;
- collect evidence;
- report completion/failure.
Responsibilities:
- parse source;
- emit structural entities/edges;
- support incremental updates.
Responsibilities:
- read repository history;
- resolve paths;
- read diffs;
- provide commit/tree references.
The first implementation may be SQLite. The data model should not depend on SQLite-specific behavior.
When multiple agents work concurrently:
- prefer Git worktrees;
- each work unit gets an explicit integration boundary;
- path locks are advisory conflict detection, not a security boundary.
The system must never claim that a logical path lock alone prevents an agent from modifying an undeclared file.