Architecture

The Harness

Cadela is being designed as a modular system of independent layers that compose together — model routing, agent roles, project skills, and workflow pipelines.

Layer 1

Model routing

The router decides where each task executes based on configurable policy. Local models for privacy and speed. API models for capability and scale.

Your Task Model Router cost · privacy · speed · context · task type cost privacy speed context Local Models Ollama · llama.cpp Qwen · DeepSeek local API Models DeepSeek · Claude · OpenAI Gemini · more Output
Local providersOllama, llama.cpp, and directly-hosted models for privacy, speed, and offline work.
API providersDeepSeek, Claude, OpenAI, Gemini — for tasks that need stronger models.
Routing policyTask type, context size, privacy level, cost budget, and latency determine where a request goes.

Layer 2

Agent system

Agents are specialized roles with their own system prompts, tool access, and execution rules — working together in coordinated workflows.

Code agentRead, write, refactor, review, and test code within project-specific rules.
Reviewer agentAdversarial pass on code quality, security, architecture decisions, and edge cases.
Clean-room agentSource understanding and original documentation production for purchased or inherited code.
Workflow agentComfyUI pipeline planning, prompt building, media direction, and workflow automation.
Architect agentHigh-level planning, dependency analysis, API design, and implementation strategy.
Docs agentGenerates and maintains project documentation, READMEs, API references, and changelogs.

Layer 3

Skills, rules & tools

Projects define their own behavior through composable skills, behavioral rules, and tool access. The harness adapts per repository without manual reconfiguration.

Rules
Code style constraints Security policies Clean-room boundaries File access rules Behavior guardrails
Skills
Prompt packs Workflow templates Model cookbooks Doc generators Review patterns Media pipelines
Agents
Code agent Reviewer agent Clean-room agent Workflow agent Architect agent Docs agent
Tools
File system Search & grep Shell commands Git operations API calls Web fetch

Layer 4

Workflow engine

The workflow engine sequences agent calls, tool executions, and user checkpoints into reproducible pipelines.

ComfyUI integrationPlan and execute image, video, audio, and LoRA workflows from within the harness.
UE5 toolingC++ guidance, Blueprint-safe architecture planning, procedural helpers, and system documentation.
Clean-room pipelineAutomated documentation runs: inspect source, generate architecture maps, behavior notes, and implementation plans.
Prompt workflowsChain multiple model calls, route between agents, and iterate on prompts across sessions.