DEV Community

EvanLin | Contorium
EvanLin | Contorium

Posted on

Contorium CIL v3 — A Two-Layer Project Intelligence Runtime with Optional LLM Reasoning

Contorium introduces a structured architecture for representing software project intelligence across time.
It separates:

  • Storage (PIL)
  • Cognition (CIL)
  • Optional reasoning (LLM Layer) 
 ⸻ 

  • System Overview User ↓ CIL (Cognitive Layer) ↓ Kernel (runCognitiveKernel) ↓ PIL (Event Sourcing Storage) ↓ .contora/ 
 ⸻ 

  • PIL — Deterministic Intelligence Storage PIL is the immutable foundation. It stores:
  • Cognitive Events (single source of truth)
  • Decision Graph (ADR lifecycle)
  • Snapshots (time travel state)
  • Knowledge Graph (entity relationships)
  • Module Projections
  • Health signals Key Principle Everything in PIL is derived from events. No AI logic is involved. 
 ⸻ 

  • CIL — Cognitive Interaction Layer CIL provides a query interface over PIL. Supported intents:
  • history
  • decision
  • state
  • action
  • entity
  • time_travel
  • story
  • essence
  • dna CIL is built on:
  • Query Router
  • Cognitive Kernel
  • Formatter Layer 
 ⸻ 

  • Cognitive Kernel The kernel is the only orchestration point:
  • routeQuery()
  • event aggregation
  • decision reasoning
  • action ranking
  • snapshot retrieval It ensures: Single entry point for all cognition. 
 ⸻ 

  • LLM Provider Layer (New Addition) Contorium now introduces a pluggable AI abstraction layer. Supported providers:
  • OpenAI
  • Anthropic
  • Gemini
  • OpenRouter
  • Ollama Configuration: .contora/config/llm.json Users provide:
  • API key (via env or secure storage)
  • model selection
  • enabled modules 
 ⸻ 

  • Where LLM is Used LLM is NOT used for:
  • Event generation
  • Snapshot building
  • Knowledge graph construction
  • Decision graph logic
  • Health computation LLM is ONLY used for:
  • Why explanation generation
  • Project story synthesis
  • Essence compression
  • DNA summarization
  • Suggested questions generation 
 ⸻ 

  • Design Philosophy Contorium is built on a strict separation: Deterministic Layer
  • PIL
  • Events
  • Graphs
  • Snapshots Cognitive Layer
  • CIL query system
  • Kernel reasoning Probabilistic Layer
  • LLM explanation & synthesis 
 ⸻ 

  • Key Insight LLM does not define project intelligence.
It only explains it. The intelligence lives in structure, not generation. 
 ⸻ 
 Conclusion Contorium defines a new category: Project Intelligence Runtime (PIR) It is not a memory system. It is not an AI assistant. It is a queryable intelligence layer over software evolution. 
 ⸻ https://www.contorium.dev/ https://github.com/ContoriumLabs/contorium

Top comments (0)