> For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt.

YEARNING V4 · AI AGENTIC SQL REVIEW PLATFORM

PUBLIC BETA

# The AI Agentic
SQL Review Platform.

Autonomous metadata-probing AI SQL review paired with a scoped Database AI Assistant, frozen multi-stage approvals, in-process gh-ost, cross-engine rollback, and Top-SQL diagnostics.

[Try Public Beta](/en/guide/quick-start)[AI Agentic Precheck](/en/features/ai-precheck)[Database AI Assistant](/en/features/ai-assistant)

`git clone --single-branch --branch v4 https://github.com/cookieY/Yearning.git && cd Yearning && docker compose up -d`Copy

BETA NOTICE

Yearning v4.0 is currently in **Public Beta**. Please evaluate in staging or test environments first and keep backups before any cutover. [Share feedback on GitHub Issues →](https://github.com/cookieY/Yearning/issues)

Agentic Probes & Rules5 tools · 48 rulesMax SQL Batch100,000 stmts / 32 MiBApproval Chain1..N stages · 1..10 stepsRollback Capture100,000 rows in TX

## Yearning 4.0 Core Capabilities

Rebuilt from scratch in Go and React 19 on PostgreSQL, uniting an autonomous Agentic SQL review engine, a Database AI Assistant, and deterministic production execution.

4.0 CORE · AGENTIC REVIEW5 probes · 48 rules

### AI Agentic SQL Review Engine

Autonomously invokes 5 read-only database tools (tables, columns, indexes, stats, safe EXPLAIN) across up to 100,000 statements / 32 MiB, combining 48 built-in rules, custom skills, and team knowledge with dual-track cloud/LAN privacy.

[AI Precheck & 48 Rules Guide →](/en/features/ai-precheck)

4.0 CORE · AI ASSISTANTNL-to-SQL · AST Verified

### Scoped Database AI Assistant

Floating workspace assistant grounded in authorized read-only metadata: answers platform docs, drafts SELECT/DML/DDL from natural language with dialect AST verification, and bridges straight into formal precheck and change orders.

[Database AI Assistant Handbook →](/en/features/ai-assistant)

GOVERNANCE1..N stages · 18 gh-ost params

### Frozen Multi-Stage Approvals & In-Process gh-ost

Freezes rules, stages, actors, and snapshots at submission with zero admin override. Embeds Go gh-ost in-process (18 parameters, pt-osc retired) with exclusive datasource leases and result_unknown verification.

[Approval & gh-ost Tuning →](/en/features/change-orders)

RECOVERY0 Binlog/WAL · 100k rows

### Binlog-Free Cross-Engine Automatic Rollback

Captures in-transaction DML before-images (up to 100k rows fail-closed) and reversible DDL/gh-ost schema snapshots across MySQL and PostgreSQL, encrypted at rest and derived into governed rollback orders.

[Rollback Protection Guide →](/en/features/sql-rollback)

DATA ACCESSServer Masking · SSE Lock

### Governed Read-Only Query & PII Masking

Time-bounded Query Grants with read-only AST guards, server-side PII masking before rows leave the backend, 6h HMAC cursor pagination, controlled CSV/JSONL/XLSX export, and instant SSE revocation lock.

[Query Workspace Guide →](/en/features/query-workspace)

OBSERVABILITY & AGENT6 Charts · SKILL.md

### Top-SQL Diagnostics & AI Agent Skill

Read-only performance_schema / pg_stat_statements 6-chart overview with Brush drill-down and 4-section AI root-cause reports converting index DDL straight to orders, plus zero-dependency skills/yearning for Claude/Codex.

[Diagnostics & Agent Skill →](/en/features/sql-diagnostics)

## Inspect the AI Agentic Review & Governance Pipeline Live

AI agents autonomously probe metadata and synthesize evidence; deterministic governance controls every gate, approval, lease, and rollback. Switch all five scenarios below.

01AI Agentic Precheck02Database AI Assistant03Local SAN Native Track04In-Process gh-ost DDL05Binlog-Free Rollback

Autonomous Probes · 48 Rules5 read-only probes · PlanHash bound · default cloud / san LAN tracks

Before submission, the AI Agent autonomously calls 5 read-only database probes (tables, columns, indexes, stats, safe EXPLAIN) against 48 built-in rules and team knowledge, with automatic in-memory anonymization for cloud providers.

1. 1AST Lexing & Dual Fingerprint

Canonical + Dialect fingerprints collapse homologous statements into 1 group (up to 100k stmts / 1,000 groups)
1. 25 Autonomous Read-Only Metadata Probes

AI Agent autonomously calls list_indexes + safe_explain to prove the WHERE column lacks an index (4.82M full scan)
1. 3Built-In Rules + Custom Skill Verdict

Evaluates 48 built-in rules, custom skills, and team knowledge; cloud track automatically runs in-memory anonymization
1. 4Deterministic Gate Block & Restore

Rule violation deterministically blocks as Critical (free LLM notes cap at Medium); UI restores real identifiers for authorized reviewers

Developer Input SQLSQL

````
UPDATE billing.orders
SET amount_cents = 99900, remark = 'vip-promo-q4'
WHERE customer_phone = '13800138000'
  AND status = 'pending';
````

Yearning v4 Governance Engine

Dual Fingerprint + Read-Only Probes (Auto Cloud Anonymization)VERIFIED

````
-- Step 1: Dual fingerprint collapses 1,240 homologous stmts -> 1 review group
-- Step 2: AI Agent autonomous read-only metadata tool calls:
-> get_table_schema(table_1)     => 14 cols, PK(id), est_rows = 4,820,000
-> list_indexes(table_1)         => idx_status_created(status, created_at)
-> safe_explain(UPDATE table_1)  => type=ALL, key=NULL, rows=4,820,000
-- Step 3: Cloud default track strips literals/identifiers (AssertZeroLeak=PASS)
````

2008 REVIEW_BLOCKED_BY_RISK

Gate Blocked: billing.orders.customer_phone is unindexed and exceeds max_affect_rows threshold. Revise SQL and re-run precheck.

## Built for Daily DBA & Engineering Craft

Rewritten from Vue to React 19, TypeScript, and shadcn/ui with real-time SSE state updates, watermarked SQL Reveal, and 6-chart Top-SQL diagnostics.

Workbench & System Health/workspaceUnified personal queues, 30-day execution metrics, 6-component health dots, and the scoped Database AI Assistant.

AI Agentic SQL Precheck/changes/newUp to 100,000 statements / 32 MiB batch review with autonomous metadata probes, 48 built-in rules, and structured findings.

Frozen Order & Execution Console/changes/orders/:idInspect frozen multi-stage snapshots, watermarked SQL Reveal, in-process gh-ost progress, and governed rollback derivation.

Governed Query & PII Masking/queryTime-bounded Query Grants, read-only AST guards, server-side PII masking, cursor pagination, and streaming exports.

Multi-Engine Governance Plane/admin/datasourcesManage MySQL, PostgreSQL, TiDB, OceanBase, and PolarDB datasources, flows, review skills, AI budgets, SSO, and notifications.

![Workbench & System Health](/screenshots/dashboard-en-US-dark.png)

/workspaceAuthentic Yearning v4 1440p UI capture (auto-switches with site theme and language)

## Start by Role: Deploy, Configure, Operate

Skip marketing fluff. Jump straight into runnable configs, least-privilege DB grant SQL, 48 built-in rules, and daily DBA workflows.

01

### Deployment & Cutover

- [Docker Compose + Nginx HTTPS/SSE Proxy](/en/guide/quick-start)
- [Binary + Standalone PG 3-Role + systemd](/en/operations/binary-deploy)
- [Kubernetes 5 Secrets + Multi-Replica Rollout](/en/operations/kubernetes)
- [Yearning v3 -> v4 Downtime Migration](/en/operations/migration-v3-to-v4)

02

### Admin 15-Min Setup

- [6-Step First-Boot Setup Checklist](/en/admin/first-time-setup)
- [MySQL & PostgreSQL Least-Privilege Grant SQL](/en/admin/datasources-and-grants)
- [Cloud/LAN AI Providers & 48 Built-In Rules](/en/admin/review-engine)
- [AD/OpenLDAP, OIDC PKCE & IM Templates](/en/admin/governance)

03

### Daily Dev & DBA Usage

- [AI Agentic Precheck, Bulk .sql & Fixing 2008](/en/features/ai-precheck)
- [Database AI Assistant: NL-to-SQL & Safe Order Bridge](/en/features/ai-assistant)
- [Approvals, 18 gh-ost Params & result_unknown](/en/features/change-orders)
- [Rollback Protection & Deriving Rollback Orders](/en/features/sql-rollback)
- [6-Chart Top-SQL Diagnostics & AI Root Cause](/en/features/sql-diagnostics)

04

### Security, Ops & Automation

- [Enterprise Security & AI Trust Whitepaper](/en/guide/security-and-ai-trust)
- [Locked Admin Reset & All YEARNING_* Env Vars](/en/operations/cli-and-config)
- [Startup Faults & 10xx–70xx Error Code Lookup](/en/reference/error-codes)
- [Claude/Codex Agent Skill & curl API Recipes](/en/integration/agent-skill-openapi)

## Five Database Families, One Governance Plane

Strict separation between read-only review/query credentials and read-write execution credentials, sealed with AES-256-GCM AEAD and verified TLS.

| Database Engine | Mode | AI Precheck | Execution | In-Process gh-ost | Auto Rollback | Governed Query | SQL Diagnostics |
| --- | --- | --- | --- | --- | --- | --- | --- |
| MySQL 5.7 / 8.0 | Native MySQL | Yes | Yes | Native | Yes | Yes | performance_schema |
| PostgreSQL 14 – 18 | Native PostgreSQL | Yes | Yes | N/A | Yes | Yes | pg_stat_statements |
| TiDB | MySQL Mode | Yes | Yes | N/A | Yes | Yes | performance_schema |
| OceanBase | MySQL Mode | Yes | Yes | N/A | Yes | Yes | MySQL Digest |
| PolarDB | MySQL & PG Modes | Yes | Yes | N/A | Yes | Yes | Native Digest |

## Stateless Go Monolith. AI-Agent Ready.

Zero RPC sidecars and zero Pod-local state. Every API obeys OpenAPI v4, double-submit CSRF, Idempotency-Key, If-Match optimistic locks, and SSE realtime events. Connect Claude Code, Codex, or Antigravity via the zero-dependency yearning Skill without deploying an MCP server.

Web UI / AgentReact 19 · SKILL.mdGo Control PlaneAST · Agentic AITarget ClustersMySQL · PG · TiDBPostgreSQL Meta3 Roles · AEAD KeyringAI Providersdefault vs san LANOutbox & SSEAudit · IM · Events

[Read AI Agent Skill & OpenAPI Guide →](/en/integration/agent-skill-openapi)[Explore 6-Chart SQL Performance Diagnostics →](/en/features/sql-diagnostics)

skills/yearning/scripts/yearning_api.pyCopy

````
export YEARNING_BASE_URL="http://localhost:8080"
export YEARNING_USERNAME="admin"
export YEARNING_PASSWORD_FILE="/path/to/password"

# Discover granted change flows & run AI Agentic precheck
python3 skills/yearning/scripts/yearning_api.py flows
python3 skills/yearning/scripts/yearning_api.py precheck \
  --flow-id <flow_id> \
  --sql "ALTER TABLE demo.users ADD COLUMN status VARCHAR(32) NOT NULL DEFAULT 'active';"
````

Zero dependencies (Python 3 stdlib)CSRF · Idempotency-Key · If-Match

## Enterprise Security & AI Guardrails Built Into the Runtime

So security teams can safely adopt Agentic AI in production: enforced by Go runtime contracts rather than prompt conventions.

[Read Security & AI Trust Whitepaper →](/en/guide/security-and-ai-trust)

ZERO-LEAK PRIVACY

### Per-Request Anonymization & Local LAN Track

Cloud providers strip literals/comments and anonymize identifiers in per-request memory with fail-closed AssertZeroLeak (2005/6003). Self-hosted LAN vLLM/Ollama run on an isolated san track that never falls back raw payloads to cloud.

NON-INTRUSIVE AI

### Read-Only Metadata Only, Zero Execution Power

AI Precheck uses 5 read-only metadata tools; the AI Assistant executes zero SQL (not even SELECT/EXPLAIN); Diagnostics never touches execution credentials or database parameters. AI can never approve or run changes.

ANTI-HALLUCINATION

### Deterministic Rules, Medium Cap & AST Checks

Built-in rules and runtime-invalid SQL block deterministically as Critical, while free LLM observations cap at Medium so hallucinations never block valid releases. Missing metadata stays partial, and assistant SQL must pass dialect AST verification (6004).

DEFENSE IN DEPTH

### 6-Purpose AEAD, Least Privilege & 90-Day Audit

Six-purpose AES-256-GCM keyring with AAD binding, 3-role PostgreSQL metadata isolation, Argon2id + TTY-only admin reset, mandatory LDAPS/OIDC PKCE, watermarked SQL Reveal, 90-day append-only audit logs, and Distroless containers.

## Try v4 Public Beta in Three Minutes

PUBLIC BETA

Deploy on Docker Compose, standalone Linux binary, or Kubernetes in staging first, and share any feedback via GitHub Issues.

Docker ComposeKubernetesv3 Migration

````
git clone --single-branch --branch v4 https://github.com/cookieY/Yearning.git
cd Yearning
docker compose up -d
# Open http://<host-ip>:8080  (admin / Yearning@2026!)
````

Copy

[Deployment Guide](/en/guide/quick-start)[Upgrade from v3](/en/operations/migration-v3-to-v4)[Report Beta Feedback](https://github.com/cookieY/Yearning/issues)

v4.0 Public Beta · AGPL-3.0-or-later · Go 1.25 · React 19 · PostgreSQL 14–18

