Skip to content

Prumo Architecture Overview ​

High-Level Topology ​

mermaid
flowchart LR
    H[Human / Agent Request] --> HA[Harness Adapter]
    HA --> CORE[Prumo Core - Go]
    CORE --> PP[Protocol & Policy Engine]
    CORE --> DE[Documentation Engine]
    CORE --> PL[Planning Engine]
    CORE --> AD[Adoption Engine]
    CORE --> EX[Experience Engine]
    CORE --> KN[Knowledge Engine]
    CORE --> VG[Evidence & Gate Engine]
    CORE --> CP[Control Plane]
    PP --> STORE[(Canonical Repository: Git + Markdown + JSON + Schemas)]
    DE --> STORE
    PL --> STORE
    AD --> STORE
    EX --> IDX[(Derived Index: SQLite / Search)]
    KN --> IDX
    VG --> STORE
    CP --> IDX
    CP --> EP[Execution Plane]
    EP --> IP[Integration Plane]
    IP --> H

Planes & Boundaries ​

Major Components ​

The major components are Protocol Domain, Project Service, Resolution Service, Documentation Engine, Planning Engine, Adoption Engine, Knowledge Engine, Experience Engine, Evidence/Gate Engine, Control Plane, Execution Plane, and Integration Plane.

Control Plane (Horizontal Infrastructure) ​

ServiceResponsibility
RunServiceRun lifecycle, checkpoints, retry, resume, cancellation, livelock detection
BudgetServiceHierarchical budget envelopes, cost governance, rate limits
ContextServiceContext Compiler pipeline, token budgets, cache awareness, compaction
ModelRoutingServiceModel Registry, eval-driven router, drift detection, fallback
ToolGatewayTool descriptors, lazy discovery, side-effect journal, MCP governance
EnvironmentServiceSandbox contract, isolation requirements, execution environments
AutomationServiceEvent-driven rules, DLQ, idempotency, concurrency keys
ObservabilityServiceStructured telemetry, explainability, incident bundles
PackageRuntimeServiceprumo.lock, provider isolation, supply chain verification

Knowledge Plane (Canonical State) ​

EngineResponsibility
GoalsLifecycle, locks, amendments, state transitions
DocumentationContracts, profiles, readiness, delta, contradictions
PlanningInterview, decisions, open questions, confidence
AdoptionScanner, semantic mapping, gap detection, migration
ExperienceSession events, summaries, handoffs, proposals
TraceabilityTyped edges: req↔dec↔code↔test↔doc↔evidence

Quality Plane (Verification) ​

ComponentResponsibility
Test ProvidersContract-based: Playwright, ZAP, CodeQL, fuzzers, sanitizers, UIA/AX/AT-SPI, KUnit, syzkaller
Quality OrchestratorDeterministic plan from change impact + risk + capabilities
Evidence NormalizationCommon schema for runs, findings, artifacts, environment fingerprint
Security VerifierIndependent verification for high/critical risk

Execution Plane (External Providers) ​

Models, tools/MCPs, sandboxes/runtimes, external providers. Never import canonical rules.

Integration Plane (Adapters) ​

OpenCode, Codex, Claude Code, Gemini CLI, Copilot CLI, Kiro, Generic. Thin adapters only — no canonical logic.

Dependency Direction ​

mermaid
flowchart TD
    IP[Integration Plane] --> CP[Control Plane]
    CP --> KP[Knowledge Plane]
    CP --> QP[Quality Plane]
    CP --> EP[Execution Plane]
    QP --> EP
    KP --> CR[(Canonical Repository)]
    CP --> DS[(Derived Runtime State)]
    QP --> DS

Rules:

  • Domain/Protocol never imports CLI, concrete storage, or harness
  • CLI depends on Application Services
  • Storage implements ports defined by consumers
  • Integrations call Prumo Core via stable CLI JSON/stdio or versioned API
  • SQLite never required to interpret canonical state
  • External harness never controls invariants

Interface Boundaries ​

Interfaces exist only at real boundaries with multiple implementations:

  • Repository (Git filesystem)
  • EventSink (local file, OTLP, in-memory)
  • DerivedIndex (SQLite, in-memory, future)
  • HarnessTransport (stdio, HTTP, MCP)
  • Clock (tests)
  • EmbeddingProvider (future)

Avoid premature interfaces during Go migration.

Internal Machine API ​

Versioned, stable commands for plugins/adapters:

prumo internal project-status --json
prumo internal resolve --json
prumo internal validate-tool --json
prumo internal docs-impact --json
prumo internal context --json
prumo internal handoff --json

Protocol Version Negotiation ​

Every adapter declares:

  • connector id/version
  • Prumo protocol version supported
  • capabilities
  • lifecycle hooks
  • write-blocking support
  • agent/skill primitives

Prumo refuses "strict" enforcement when harness lacks sufficient primitives.

Design Principle ​

Hard-code invariants; configure policies; evaluate heuristics.

  • Invariants: Goal lock, schema validation, evidence requirements
  • Policies: independent verifier for critical risk, budget limits
  • Heuristics: workforce size, model routing, context packing (subject to evals)

Distribuído sob licença MIT. Governança com Prumo v0.6.0.