CLEO Vision
The contract between you and your AI coding agent.Vision Charter (Immutable)
This document is CLEO’s constitutional vision and source of product identity.Agent Entry (Deterministic)
Canonical Product Statement
CLEO is a vendor-neutral Brain and Memory system for AI software development that provides portable project memory, verifiable provenance, and agent-safe orchestration across any repository, model provider, or coding tool.Five Pillars
- Portable Memory: Project -> Epic -> Task hierarchy, research manifests, and agent outputs.
- Provenance by Default: Every artifact is traceable to task, decision, agent, and operation.
- Interoperable Interfaces: CLI + MCP + adapters for any AI agent framework/provider.
- Deterministic Safety: Validation layers, lifecycle gates, atomic writes, immutable audit logs.
- Cognitive Retrieval: Page index + graph/vector/RAG for contextual reasoning at Tier M/L.
Mission Statement
CLEO provides a structured protocol that:Prevents Hallucination
Four-layer validation ensures AI-generated data is always correct
Maintains Context
Immutable audit trails preserve state across sessions
Enables Reliable Workflows
Atomic operations and exit codes for programmatic handling
Scales Complexity
Orchestrated multi-agent coordination for complex projects
One developer. One AI agent. One source of truth.
Core Philosophy
Command System Architecture
CLEO uses a shared-core architecture with a single semantic contract:- CLI (TypeScript): authoritative runtime behavior and deterministic enforcement via Commander.js
- MCP (TypeScript): provider-neutral integration surface for AI tooling, sharing the same core logic
- Adapters (optional): tool-specific UX optimizations without changing core semantics
Agent-First Design
CLEO is built for LLM agents first, with human accessibility second. When your primary “user” is an AI coding agent, everything changes:| Dimension | Human User | LLM Agent |
|---|---|---|
| Input | Natural language, flexibility | Structured data, constraints |
| Errors | Reads error messages | Branches on exit codes |
| Validation | Trusts own judgment | Needs external ground truth |
| Context | Maintains mental model | Loses context between sessions |
| Completion | Knows when “done” | Needs explicit success criteria |
Five Founding Principles
Simplicity
Flat sequential IDs (
T001, T042) that never change, regardless of hierarchy restructuringFlat Structures
Three-level hierarchy maximum: Epic -> Task -> Subtask. Research shows this is optimal for navigation.
Anti-Hallucination Protocol
Every operation undergoes four-layer validation:- Layer 1: Schema
- Layer 2: Semantic
- Layer 3: Cross-File
- Layer 4: State Machine
JSON Schema Enforcement
- Structure validation
- Type checking
- Enum constraints (
status: pending|active|blocked|done) - Format validation (ISO 8601 timestamps, T### IDs)
Atomic Operations
No partial writes. No data corruption. Full rollback on any failure.
The Contract
When you use CLEO with any AI coding tool, you establish a formal contract:Stable Identity
Stable Identity
Tasks are identified by stable IDs (
T001) that never change, regardless of hierarchy restructuringMachine-Parseable Output
Machine-Parseable Output
All output is JSON by default, enabling programmatic handling
Numeric Exit Codes
Numeric Exit Codes
All errors have numeric exit codes for branching logic
Validation First
Validation First
All operations validate first, fail fast on invalid input
Persistent State
Persistent State
All state is persisted in
todo.json as single source of truthAudit Trail
Audit Trail
All changes are logged in immutable audit trail (
todo-log.jsonl)Atomic Writes
Atomic Writes
All writes are atomic with automatic backup and rollback
Daily Workflow
Morning Routine
During Work
End of Day
What CLEO Solves
| Problem | CLEO Solution |
|---|---|
| AI agent forgets yesterday’s context | Session notes + audit logs |
| Unclear which tasks are actually done | Verification gates + status tracking |
| Hallucinated task references | ID validation on every operation |
| Context degrades over long sessions | Manifest-based handoffs |
| Complex workflows overwhelm context | Orchestrator with 10K token budget |
Current State vs Strategic Direction
Current State (Shipped)
TypeScript-native CLI and MCP server sharing a common core, deterministic validation, atomic operations, audit logs, hierarchy lifecycle, and project-local memory are production baseline.
Strategic Direction (Gated)
Nexus validation, hybrid storage (ADR-002), and Tier M/L cognitive infrastructure expansion follow evidence-gated roadmap progression.
Provider Neutrality
CLEO is provider-agnostic by design. Tool-specific integrations MAY optimize user experience, but core memory models, provenance semantics, and lifecycle enforcement MUST remain neutral and portable.Global Intelligence (Nexus)
CLEO Nexus extends the task graph across project boundaries, creating a “super brain” for cross-project intelligence:Cross-Project Discovery
Find related tasks across all registered projects using similarity algorithms
Unified Dependencies
Analyze dependencies that span project boundaries with global graph
Permission Control
Three-tier access model (read/write/execute) protects project isolation
Neural Brain
Memory and context persistence for autonomous AI agents
Nexus implements neural network semantics: tasks are neurons, relationships are synapses, and similarity scores are weights. This enables AI agents to navigate and discover context autonomously.
Summary
CLEO bridges the gap between human intention and AI execution:For Developers
A shared memory system that maintains continuity across coding sessions
For AI Agents
Structured protocols that prevent hallucination and enable reliable workflows
Vision Governance
- This document defines what CLEO is, not just what CLEO builds next.
- Any change that alters canonical identity requires explicit vision amendment and synchronized updates to
README.mdanddocs/specs/PORTABLE-BRAIN-SPEC.md. - Strategic docs MUST align to this vision; they cannot redefine it.
