Context Infrastructure

Deterministic, Composable Context

For AI-Assisted Engineering.

Yanzi gives engineering workflows governed, append-only operational context. Not orchestration. Not autonomous. Human-governed from session to release.

Claude Code New paper

State, context, and where Yanzi actually helps

Claude Code's first-person paper on session state and operational context — including a candid assessment of where Yanzi adds measurable value across engineering workflows, from one-off scripts to full SaaS products.

Read the PDF
Yanzi Technical paper

Deterministic context composition

The Yanzi technical paper on composing durable, governed context for AI-assisted engineering workflows — covering repeatability, append-only provenance, operational lineage, and deterministic context reconstruction.

Read the PDF
INSTALL brew install yanzi
INSTALL sudo apt-get install yanzi
INSTALL go install github.com/chuxorg/yanzi-cli@latest
INSTALL curl -sSL yanzi.sh/install.sh | bash
yanzi — zsh
~/projects/auth-service yanzi project create auth-service
Project "auth-service" created — corpus initialized
 
~/projects/auth-service yanzi capture --author agent --prompt-file p.md --response-file r.md
Captured intent-0001.md — append-only, hash: a4f92b
 
~/projects/auth-service yanzi checkpoint create --summary "JWT implementation complete"
Checkpoint #8 — 16 artifacts indexed, governance trace saved
 
~/projects/auth-service yanzi rehydrate
Context restored — 8 checkpoints, 16 artifacts, deterministic ✓
~/projects/auth-service
Works with every AI tool and IDE
Claude Code Cursor GitHub Copilot Aider GPT-4o Windsurf VS Code JetBrains Neovim Gemini CLI Claude Code Cursor GitHub Copilot Aider GPT-4o Windsurf VS Code JetBrains Neovim Gemini CLI

The Problem

Operational engineering
breaks without context governance.

Every AI session starts stateless. Context drifts. Decisions lose provenance. Release intent becomes impossible to verify or trace.

Context Drift

Sessions diverge from governed operational intent without warning. The AI model accumulates assumptions that no human explicitly authorized.

Operational Drift

Accumulated engineering decisions lose their provenance across sessions. What was decided, by whom, and under what constraint — gone.

Unrecoverable Sessions

Lost context cannot be reconstructed without manual re-explanation. Every new session starts from an empty operational state.

AI Inconsistency

Models produce different outcomes from the same implicit context. Without governed inputs, output repeatability is a coincidence, not a property.

Release Ambiguity

No deterministic path from work-in-progress to governed release. Certification is manual, informal, or absent.

Ephemeral Operational State

Every session begins without knowledge of operational history. There is no institutional memory of engineering decisions across the AI-assisted workflow.

Operational Reality

Why traditional AI tooling
struggles operationally.

The structural problem with stateless AI

Traditional AI coding assistants treat each session as an isolated, stateless interaction. There is no operational lineage between sessions. Context is reconstructed from scratch every time, often incompletely and non-deterministically.

This is not a model quality problem — it is an architectural one. The model is operating without a governed, append-only record of operational intent. Each session infers operational state rather than consuming a verified, traceable source.

The result is compounding failure: the further a project progresses through AI-assisted sessions, the harder it becomes to guarantee that the AI model is operating within governed constraints.

Yanzi addresses all three failure modes by making context deterministic, making provenance append-only, and making operational authority explicitly human-governed. Sessions no longer infer state — they consume it.

01

Non-deterministic context injection

The AI model's understanding of your operational state varies by session, even with identical inputs. Without a governed context source, output repeatability is probabilistic.

02

No append-only provenance

Decisions made in previous sessions leave no governed trace. The model cannot distinguish authoritative operational knowledge from its own inferences or hallucinations.

03

Unbounded operational authority

Without governed role and rule definitions, AI models make architectural and operational decisions that require human approval. There is no bounded authority boundary.

How It Works

Deterministic context
composition.

Yanzi is a local-first CLI. No daemon, no cloud sync, no inference. Every context operation is auditable and append-only.

01
Initialize a project corpus
Create a Yanzi project in any directory. A local, append-only SQLite corpus is initialized — all operational context stays on your machine, version-controlled alongside your code.
02
Capture operational context
Every meaningful prompt, response, and decision is captured into the intent corpus. Structured, searchable, and immutable. Context accumulates with a verified hash chain.
03
Checkpoint governed state
Before any major change, create a named checkpoint. Yanzi indexes all artifacts and records a governance trace — a human-approved snapshot of operational intent.
04
Rehydrate deterministically
New session, new agent, new machine — run yanzi rehydrate and the full operational context is reconstructed deterministically. Same inputs, same context, every time.
yanzi — context workflow
# 01 — Initialize
yanzi project create api-platform
yanzi project use api-platform
 
# 02 — Capture
yanzi capture \
   --author agent \
   --prompt-file p.md \
   --response-file r.md
intent-0001.md — hash: a4f92b3c
 
# 03 — Checkpoint
yanzi checkpoint create \
   --summary "auth layer complete"
Checkpoint #5 — governance trace saved
 
# 04 — Rehydrate (new session)
yanzi rehydrate
Context restored — deterministic ✓

Context Library

Operational reliability
primitives.

The Yanzi Context Library is a structured set of five composable primitives. Each one represents a governed, append-only unit of operational context — not an AI abstraction.

PACK

Packs

Versioned, bundled operational context for a specific engineering domain.

SEED

Seeds

Initial ground-truth documents that establish governed operational baselines.

WORKFLOW

Workflows

Governed procedural definitions for repeatable engineering operations.

RULE

Rules

Human-authored operational constraints applied at every session boundary.

ROLE

Roles

Bounded authority definitions that scope what agents may act on.

Primitive detail
Pack

Versioned Domain Context

Packs bundle all operational context for a specific engineering domain into a single, versioned artifact. Apply a pack at session start and the model operates with the full governed context for that domain — architecture patterns, constraints, standards, and terminology — without manual re-explanation.

  • Domain architecture and ADRs
  • Approved patterns and anti-patterns
  • Dependency and version constraints
  • Domain-specific glossary terms
Seed

Governance Ground Truth

Seeds are initial context documents that establish operational ground truth before any work begins. They are append-only, human-authored, and represent the authoritative starting state from which all session context flows. A seed is not editable once committed — it is a governed baseline.

  • System architecture overviews
  • Approved technology decisions
  • Organizational engineering standards
  • Security and compliance baselines
Workflow

Repeatable Operations

Workflows encode the approved sequence of steps, decision points, and authority boundaries for common engineering operations. They are not automation scripts — they are governed procedural definitions that the model follows under human oversight.

  • PR review and merge procedures
  • Service onboarding sequences
  • Incident response patterns
  • Release certification steps
Rule

Operational Constraints

Rules are human-authored operational constraints applied at session boundaries. They scope what the AI model may do, propose, or decide within a governed session. Rules are append-only — once authored, they constrain all subsequent context.

  • Prohibited dependency patterns
  • Required review gates
  • Scope and blast-radius limits
  • Escalation thresholds
Role

Bounded Authority

Roles define the bounded authority of an agent within a governed session. They establish the operational boundary between AI-assisted work and decisions that require explicit human approval — separating what the model may propose from what it may act on.

  • Read-only analysis roles
  • Draft-only authoring roles
  • Scoped implementation roles
  • Release authority definitions

Architecture

How context flows
through the system.

The append-only corpus is the core. Everything else — session rehydration, release certification, governance tracing — flows from a verified, deterministic context record.

Governed, append-only context infrastructure for AI-assisted engineering

Architecture v2.9.0
Yanzi architecture overview — high-level system design, agent interaction flow, rehydration timeline, storage architecture, and event streaming pathway.

Release Engineering

Deterministic release
engineering.

A release is a governance event, not just a deployment. Yanzi makes every release traceable to the operational context that produced it.

01

Certification

Every release candidate is verified against the current operational context before promotion. Certification produces a human-readable trace of what was checked and what passed.

02

Convergence Validation

Confirms that current system state converges to governed intent. Divergence is surfaced before promotion — not discovered in production.

03

Governed Promotion

Every promotion gate requires explicit human approval against a defined operational authority. There is no autonomous promotion — authority is always bounded and traceable.

04

Operational Traceability

Full lineage from development context to shipped release artifact. Every decision, constraint, and approval is append-only, human-readable, and auditable.

release trace — v2.9.1
# Governance trace — yanzi v2.9.1
# Generated: 2026-05-16T14:32:00Z
 
certification:
  candidate: v2.9.1
  corpus_hash: 8e3b1f42a
  context_artifacts: 38
  checkpoints: 12
 
convergence:
   Intent vs. implementation — CONVERGED
   Rule constraints — ALL MET
   Role authority bounds — WITHIN SCOPE
 
promotion:
  authority: human-governed
   Approved — csailer@yanzi.sh
   Release certified — v2.9.1 SHIPPED
Case Study · v2.9.1

How Yanzi v2.9.1 shipped with full governance trace

The v2.9.1 release was the first to complete a full deterministic certification cycle — from intent capture to convergence validation to governed promotion. Read the operational case study.

Read the case study →

Governance

The Yanzi Principles

Five governing constraints behind every architectural and product decision in Yanzi. These are not aspirational — they are enforced.

I
Context must be persistent
Captured operational context survives sessions, restarts, and context-window limits. What was governed stays governed.
II
Context must be resumable
Any project state can be reconstructed from its append-only artifact record. Deterministic recovery is always possible.
III
Context must be observable
Every decision and capture is stored as human-readable markdown. No inference. No black boxes. Full audit chain.
IV
Context must be deterministic
Rehydration is deterministic — not probabilistic. The same corpus always produces the same operational context. No inference, no guesswork.
V
Yanzi records. It does not decide.
Storage, indexing, and retrieval only. Operational authority belongs to humans. Intelligence lives above Yanzi — in your agents and your judgment.

Documentation

Start where
it makes sense.

Four entry points into the Yanzi knowledge base. The glossary is the recommended starting point — operational vocabulary is the foundation of deterministic context.

Roadmap

Four phases.
One discipline.

Building the foundational layer of governed, deterministic context infrastructure — one operational primitive at a time.

PHASE 01

Context Persistence

Append-only corpus. Core CLI commands. Checkpoints and deterministic rehydration. Local SQLite. Zero cloud dependencies.

PHASE 02

Context Library

Packs, Seeds, Workflows, Rules, and Roles as first-class primitives. Composable context assembly. Governed session initialization.

PHASE 03

Agent Integration

REST API for programmatic context injection. SDK for Claude, GPT, and local agent runtimes. Automatic session-boundary governance.

PHASE 04

Org Governance

Shared context libraries across teams. Org-level policy enforcement and role authority management. Compliance and audit tooling.

Get started

Start with deterministic
context today.

Add governed, append-only context to your AI-assisted engineering workflow. One CLI. No cloud. No inference. Human-governed from day one.