Skip to content

chuxorg/yanzi

Repository files navigation

Yanzi

Release Release workflow

Managed Intent for AI-Assisted Development

AI accelerates generation. Yanzi preserves the why.


What Yanzi Is

Yanzi is a small, composable system that captures, verifies, and chains the reasoning behind AI-generated decisions.

It does not generate code. It does not orchestrate agents. It does not summarize or reinterpret reasoning.

It simply refuses to forget.

90-Second Quickstart

These commands assume embedded local mode (no server).

  1. Install
curl -fsSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh -s -- --add-path
  1. Capture
yanzi capture --author "Ada" --prompt-file prompt.txt --response-file response.txt
  1. Verify
yanzi verify <intent-id>
  1. Chain
yanzi chain <intent-id>
  1. Optional: enable HTTP mode
git clone https://github.com/chuxorg/chux-yanzi-library
cd chux-yanzi-library
go run ./cmd/libraryd -addr :8080 -db yanzi.db

Use Cases

Yanzi is useful for:

  • Individual developers using AI tools locally.
  • Teams sharing AI-generated decisions.
  • Resuming context after closing an AI session.
  • Preserving architectural reasoning.

End-to-End Example: Local Mode (Default)

  1. Install:
curl -sSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh
  1. Verify version:
yanzi --version
  1. Capture an interaction:
yanzi capture \
  --author "developer" \
  --prompt "Create a minimal HTML page that says Hello World" \
  --response "<!DOCTYPE html><html><body>Hello World</body></html>" \
  --meta project=hello-world \
  --meta type=feature

Exactly one of --prompt or --prompt-file must be provided. Exactly one of --response or --response-file must be provided. Mixing inline and file inputs is valid.

Optional file-based input:

echo "Create a minimal HTML page that says Hello World" > prompt.txt
echo "<!DOCTYPE html><html><body>Hello World</body></html>" > response.txt

yanzi capture \
  --author "developer" \
  --prompt-file prompt.txt \
  --response-file response.txt \
  --meta project=hello-world \
  --meta type=feature
  1. Browse:
yanzi list
  1. Inspect:
yanzi show <id>
  1. Verify:
yanzi verify <id>

Local mode is the default and requires no server.

Filtering by Metadata

yanzi list --meta project=hello-world
yanzi list --meta project=hello-world --meta type=feature

Filtering is exact match. Multiple --meta flags use AND semantics. If no records match, an empty result set is returned.


End-to-End Example: Server Mode (Optional)

  1. Install with server enabled:
curl -sSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh -s -- --server
  1. Start server:
libraryd
  1. Confirm config:
cat ~/.yanzi/config.yaml
  1. Capture via server:
yanzi capture \
  --author "developer" \
  --prompt "Refactor login handler for idempotency" \
  --response "Updated code..." \
  --meta project=auth-service \
  --meta type=refactor

If libraryd is not reachable in HTTP mode, capture will fail. There is no automatic fallback to local mode.


AI Agent Integration Example

PROMPT_FILE=$(mktemp)
RESPONSE_FILE=$(mktemp)

echo "$HUMAN_PROMPT" > "$PROMPT_FILE"
echo "$AI_RESPONSE" > "$RESPONSE_FILE"

yanzi capture \
  --author "codex" \
  --source "codex" \
  --prompt-file "$PROMPT_FILE" \
  --response-file "$RESPONSE_FILE"

rm "$PROMPT_FILE" "$RESPONSE_FILE"

For agents that can safely pass inline strings, --prompt and --response may be used directly. For large or complex content, file-based input remains supported. Files are ephemeral. Yanzi stores structured, immutable records. Each capture represents one atomic interaction.


Why This Is Necessary

If you are using AI to generate production artifacts but not preserving the reasoning behind them, you are creating undocumented architectural drift.

The Problem

AI tools move fast. But the reasoning behind decisions often disappears.

Weeks later, someone asks:

Why does this exist?

And no one can answer.

Yanzi captures intent at the moment decisions are made — and preserves it immutably.


Install Yanzi

For Humans

macOS or Linux:

curl -fsSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh

Optional (auto-add to PATH):

curl -fsSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh -s -- --add-path

To uninstall:

curl -fsSL https://raw.githubusercontent.com/chuxorg/yanzi/master/uninstall.sh | sh

Server Mode (Optional)

Default install uses embedded local mode.

Enable server mode:

./install.sh --server

Then start the server:

libraryd

Server mode is activated via: ~/.yanzi/config.yaml


Tell Your AI to Install Yanzi

If your AI assistant has shell access (Cursor, Codex CLI, etc.), you can give it this prompt:

Install Yanzi on this machine.

If macOS or Linux:
Run:
curl -fsSL https://raw.githubusercontent.com/chuxorg/yanzi/master/install.sh | sh -s -- --add-path

If Windows:
Download the latest release from:
https://github.com/chuxorg/yanzi/releases

After installation:
Run:
yanzi --help

Then reply:
"Yanzi is installed and ready. I will save important decisions using it."

Quick Example

Capture intent:

yanzi capture --author "Ada" --prompt-file prompt.txt --response-file response.txt

Verify integrity:

yanzi verify <intent-id>

Inspect evolution:

yanzi chain <intent-id>

Architecture

Yanzi consists of:

  • Yanzi Library — append-only intent ledger
  • Yanzi CLI — human interface
  • Yanzi Emitter — machine ingestion boundary

Each component is intentionally small and independent.


Philosophy

Small. Composable. Verifiable.

No magic. No orchestration theater. No agent hype.

Just memory.


Repositories


About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages