The Ground Truth Ledger for
Requirements & AI Coding Agents
Eliminate requirement drift and hallucinated specs across Cursor, Claude Code, and autonomous AI agents. Real-time AST hashing, 100% automated stale cascading, and fail-fast preflight validation.
npx -y srs-mcp docker run -d -p 3000:3000 pgsty/srs-ledger Join Early Access Whitelist • Priority Access
Get instant early access to real-time SRS synchronization and zero-latency AI Agent Preflight Engine.
Registered email:
Live Spec Playground
In-browser markdown editor with sub-50ms AST hash recomputation, state cascade visualization, and ANSI terminal simulator.
Engineered for Absolute Requirements Integrity
Eliminate hallucinations before AI coding agents execute a single prompt. Four architectural pillars guarantee real-time verification and zero spec drift.
100% Automatic Stale Cascade
Whenever a spec section changes, the ledger computes SHA-256 anchor hashes and instantly cascades all dependent clarifications from Approved to Stale in sub-50ms. No stale requirements can sneak past agents.
7-State Lifecycle Machine
Every requirement clarification strictly traverses an immutable state machine: Draft → Submitted → Approved, Changes Requested, Rejected, Stale, or Archived. AI coding agents only ever consume certified state.
Enforces strict transition policies • Blocks unverified draft consumption
4-Tier Zero-Leakage Whitelist Bundle
Downstream agents receive audited JSON snapshots filtered across four cryptographic tiers. Discard draft chatter, internal reviews, and stale discussions to prevent token bloat and hallucination.
Production Architecture
Engineered with Fastify REST API, Drizzle ORM, and PostgreSQL 16 relational integrity. High-bandwidth MinIO S3 streaming supports massive specification documents and audit logs with 578 Vitest test suite verification.
Zero-Setup AI Agent Integrations
Drop-in configurations and official MCP server snippets for Cursor, Claude Code, Antigravity, and Claude Desktop.
Model Context Protocol (MCP)
Target: Claude Desktop, Cursor, Zed, & AntigravityRegister the official published srs-mcp package into any MCP-compatible runtime to grant tools like srs_query_spec, srs_preflight_check, and srs_list_clarifications.
{
"mcpServers": {
"srs": {
"command": "npx",
"args": ["-y", "srs-mcp"]
}
}
} Cursor AI Rules
Target: .cursorrulesInstruct Cursor to query the SRS Clarification Ledger and run preflight checks prior to proposing code modifications.
# SRS Clarification Ledger Guardrails
Before generating, refactoring, or deleting any authentication or authorization logic:
1. Run preflight check: npx -y srs-mcp preflight --project amela-core
2. If exit code is 3 (STALE DETECTED): HALT execution and ask developer to resolve stale specifications.
3. Only use Approved requirements and certified clarifications from Tier 1-3 bundles. Claude Code System Context
Target: CLAUDE.mdEnsure Claude Code verifies requirement anchor integrity and respects the 7-state lifecycle machine before writing code.
## SRS Integrity Verification Workflow
Every engineering task must respect the SRS Ground Truth Ledger:
- Verify spec freshness: `srs-ledger preflight --project <project_id>`
- Do NOT proceed if preflight returns Exit Code 3.
- Reference verified requirement tags ([REQ-AUTH-001], [REQ-AUTH-002]) in commit messages. Antigravity Agent Skill
Target: skills/srs-preflight/SKILL.mdAutonomous Antigravity agent skill that executes fail-fast preflight checks and parses AST anchor hashes before running plans.
---
name: srs-preflight
description: Runs deterministic requirements preflight validation against the SRS Clarification Ledger. Halts if stale anchors are detected.
---
# Preflight Protocol
1. Execute: `npx -y srs-mcp preflight --project amela-core`
2. On Exit Code 0: Proceed with implementation.
3. On Exit Code 3: Stop planning, report invalidated anchor IDs to user. Get Started in 60 Seconds
Deploy via CLI sync (srs-ledger preflight), Docker Compose multi-container stack (docker run -d -p 3000:3000 pgsty/srs-ledger), or explore the Web UI.
Direct CLI Sync & Preflight Validation
Node 18+ or npxInstall globally with npm or execute on-demand with npx. Sync specifications against local repositories and verify requirement anchors before running AI coding agents.
Full Multi-Container Stack (PostgreSQL 16 + MinIO S3 + Fastify)
docker-compose.ymlSpin up the complete SRS Clarification Ledger stack with Postgres, MinIO object storage, and the Fastify REST API engine in one command.
version: '3.8'
services:
# Relational Ledger Database
postgres:
image: postgres:16-alpine
container_name: srs-postgres
environment:
POSTGRES_DB: srs_ledger
POSTGRES_USER: srs_admin
POSTGRES_PASSWORD: secret_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# S3-Compatible Streaming Storage
minio:
image: minio/minio:latest
container_name: srs-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minio_admin
MINIO_ROOT_PASSWORD: minio_secret_key
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
# SRS Clarification Fastify Application
srs-server:
image: pgsty/srs-ledger:latest
container_name: srs-fastify
ports:
- "3000:3000"
environment:
DATABASE_URL: postgres://srs_admin:secret_password@postgres:5432/srs_ledger
S3_ENDPOINT: http://minio:9000
depends_on:
- postgres
- minio
volumes:
postgres_data:
minio_data: docker compose up -d Web UI Overview & Interactive Operations
Port 3000 DashboardAccess the web dashboard for real-time document mapping, stale triage queue management, and sub-second requirement search.
AST Visual Tree
Visual representation of requirement markdown headings and anchor tags.
Stale Queue Review
Inbox of drifted requirements ready for single-click re-certification or update.
Instant Query Engine
Query requirements, clarifications, and discussion logs with zero latency.
Join Early Access Whitelist
Get first access to autonomous agent synchronization, multi-repository drift monitors, and private team ledger deployments.
Zero spam • Direct access to maintainers • Instant onboarding token