컨텐츠로 건너뛰기

Philosophy

Khala does not promise absolute correctness. It guarantees calibration: aligning system confidence strictly with observable, verifiable evidence and blocking ungrounded assertions.

Khala is the shared knowledge and governance backbone that unifies independent engineering tools (Nexus, Archon, Arbiter, Adept, Probe, Observer) under standardized calibration contracts. Khala is not an independent runnable CLI; it is the protocol and interoperability layer connecting these tools. It enforces that all components operate against a single substrate of grounded knowledge and explicitly state the provenance and uncertainty bounds of their outputs.

Large language models (LLMs) exhibit high fluency regardless of factual grounding, generating confident outputs in the absence of verified premises. In engineering pipelines, this leads to two critical failure modes that single-purpose tools fail to address concurrently. Khala is architected to deterministically defend against both.

Four Information Domains on a Governed Substrate

Khala ensures that software engineers and autonomous coding agents operate from the same single source of truth. Engineering knowledge is structured into four distinct domains with different lifecycles and mutation dynamics:

  1. Domain & Organizational Knowledge — Specifications, design documents, operational policies, runbooks. Persisted in a unified corpus and accessed identically by humans (Web UI) and agents (MCP/A2A contracts). (Nexus)
  2. Architectural & Design Decisions — Architecture Decision Records (ADR/SDD). Automatically records micro-decisions made by agents while requiring human sign-off for accountable approval gates. (Arbiter)
  3. Runtime Telemetry & State — Distributed traces, metrics, logs. Combines live telemetry with approved knowledge into structured evidence packets for PR review and incident root-cause analysis. (Observer, on Nexus)
  4. System Comprehension & Cognitive Debt — Structural debt metrics. Measures the divergence between codebase complexity and human verification coverage. Evaluates the knowledge corpus as the denominator (required knowledge) and human vouches as the numerator to quantify cognitive debt. (Adept)

Adept interacts with Nexus and Arbiter not as an isolated dashboard, but by directly reading the approved knowledge corpus as an auditable ledger.

Failure Mode 1 — Model Hallucination & Ungrounded Assertion

The first failure mode occurs when generative models assert obsolete or fabricated domain logic with maximum confidence. When queried regarding domain invariants, business rules, or status codes, models often synthesize plausible yet erroneous answers.

  • Archon establishes an authority window directly over codebase constants and domain invariants, resolving truth deterministically from static code declarations.
  • Nexus implements multi-path retrieval and deterministically abstains with a fixed message when no evidence snippets are retrieved. Citation source-matching and the groundedness of the numbers in an answer are both verified deterministically after generation and returned as response values rather than gating abstention; only the citation side is aggregated, as an unverified-citation rate.

Failure Mode 2 — Human Rubber-Stamping

The second failure mode arises when human reviewers, overwhelmed by high-volume agent-generated diffs and specifications, approve changes without critical verification, collapsing the quality gate.

  • Arbiter elevates architecture decisions and specifications into formal pre-implementation gates. By cryptographically stamping content hashes, timestamps, and named human approvers into decision ledgers, it enforces full accountability and auditability across all code changes.

Latent Quality Defect — Superficial Test Coverage

Automatically generated test suites can report high line coverage while asserting trivial conditions, skipping execution checks, or over-mocking critical subsystems.

  • Probe executes mutation testing harnesses that programmatically alter AST nodes and measure whether existing test suites catch these mutations. It converts nominal coverage into empirical fault-detection metrics.

The Calibration Thesis

All tools across the Khala ecosystem enforce calibration as an architectural invariant:

  • Archon binds domain claims to verified static code constants.
  • Nexus binds generative answers to verified evidence packets.
  • Arbiter binds architectural approval to attributable decision ledgers.
  • Probe binds test suite assertions to deterministic mutation survival rates.
  • Adept binds organizational comprehension claims to measured vouch coverage.

Calibration Role Matrix

Tool IdentifierArchitectural RoleCalibrated DomainTarget ConsumersKhala TopologyExecution Trigger
NexusGrounded Knowledge BaseDomain Knowledge & Telemetry (No source → Abstain)All Engineers & AgentsCentral SubstrateOn-demand queries
ArchonDomain Invariants AuthoritySystem Constants & Business RulesPlanners, Architects, AgentsInvariant ProviderOn-demand queries
ArbiterDecision & Spec LedgerArchitectural Design & Approval IntegrityDecision MakersSpec ProviderPre-implementation gate
ObserverGrounded Analysis AgentPR Scope, API Spec Diffs, TriageReviewers, SREsSubstrate ConsumerPre-merge & Incident triage
ProbeMutation Quality HarnessTest Suite Fault-Detection EfficacyTest Authors, ReviewersAdvisory HarnessPre-commit advisory report
AdeptCognitive Debt MeterComprehension Validity & Vouch CoverageEngineering LeadershipCorpus AuditorContinuous / Doc mutation

Inter-Tool Topology

Khala ecosystem topology: Fragmented sources (docs, specs, traces, configs) flow into one governed link; humans and agents query the same shared view, and Adept audits the link as a ledger of comprehension.

Khala enforces a decoupled hub-and-spoke topology: producer tools never invoke each other directly. All interactions flow through the Khala substrate:

  • Archon and Arbiter publish verified constants and approved specifications into the substrate.
  • Observer queries the substrate to evaluate pull requests against approved specifications and runtime traces.
  • Archon provides a deterministic API for invariant lookup.