Skip to content

About

Cross-agent software engineering framework for AI coding agents — production-grade skills, standards, workflows, policies, and quality gates.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sagarithm Kit

Universal Cross-Agent Engineering Framework for AI Coding Agents

npm version Website License: Apache-2.0 CI Matrix MCP Ready

Sagarithm Kit encodes the collective wisdom, disciplined practices, and architectural rigor of experienced software architects and engineers into an agent-agnostic framework. It equips AI coding agents with the engineering environment, protocol tools, and boundary policies required to produce production-grade software.


The Core Product Thesis

AI coding agents should not enter a codebase with only a user prompt. They should enter with:

  • Truth-Driven Ideation: Stress-testing feasibility, non-goals, and operational bottlenecks before code generation begins.
  • Project Context & Topology: Understanding existing abstractions, modules, call topologies, and public APIs.
  • Engineering Principles & Coding Standards: Strict adherence to architectural invariants and clean code paradigms.
  • 17 Core Engineering Skills & 99 Specialist Personas: Modular, discipline-specific procedural knowledge and autonomous specialist agent roles.
  • Behavioral Policies: Non-negotiable constraints preventing redundant folder creation, unvetted dependencies, and architectural drift.
  • Disciplined Workflows: Phased lifecycles (Understand -> Plan -> Implement -> Verify -> Document) with hard verification gates.
  • Native Protocol Interfaces (MCP): Providing runtime tools directly to LLMs for verification, entropy secret scanning, and AST queries.
  • Production Mindset: Favoring reliability, security, maintainability, and operational correctness over quick-and-dirty generation.

Installation & Quickstart

Run directly without installation via npx:

# Turnkey starter init: auto-provisions 116 skills & 99 specialist personas into .agents/
npx sagarithm-kit init --starter

# Run the native Model Context Protocol (MCP) server for Claude Desktop / Cursor
npx sagarithm-kit mcp

# Stress-test an idea before building (Truth-Driven Engineering)
npx sagarithm-kit validate "Decentralized real-time multiplayer state engine"

# Compute the 100-point Codebase Health Index
npx sagarithm-kit health

# Apply a curated engineering preset (fullstack-web, api-backend, systems-core, ai-agentic)
npx sagarithm-kit preset apply fullstack-web

# Compile canonical specifications into native agent configurations
npx sagarithm-kit sync

# Run the Zero Assumed Success verification gate
npx sagarithm-kit verify

Or install globally:

npm install -g sagarithm-kit
sagarithm --help

Development Environment vs. Target Platform

Google Antigravity is the development environment, NOT the target platform. Sagarithm Kit must not become dependent on Antigravity-specific functionality.

Sagarithm Kit maintains a single canonical source of truth that compiles down to configurations for any supported target agent:

  • Google Antigravity
  • Cursor
  • Claude Code & Claude Desktop
  • VS Code / GitHub Copilot
  • Windsurf
  • OpenAI Codex
  • Any Model Context Protocol (MCP) Client

The Seven Architectural Layers

  1. Canonical Engineering Knowledge - Architectural principles, domain models, coding standards.
  2. Canonical Skills & Personas - 17 core disciplines & 99 specialist personas (116 skills in .agents/skills/).
  3. Canonical Policies - Non-negotiable boundaries answering "What must or must not be done".
  4. Canonical Workflows - Temporal lifecycles answering "What sequence of steps and gates to follow".
  5. Project Context - Workspace manifests, dependency topologies, and AST coupling analytics.
  6. Agent-Specific Adapters - One-way compilation pipelines translating canonical specifications into native agent configurations.
  7. Model Context Protocol (MCP) Server - Stdio JSON-RPC 2.0 interface exposing runtime architectural tools directly to AI models.

For the complete architectural design, see ARCHITECTURE.md.


The Engineering Constitution

The foundational laws governing all agent interactions are codified in the Engineering Constitution:

  1. Engineering Principles
  2. Architecture Principles
  3. Coding Standards
  4. Testing Principles
  5. Security Principles
  6. Documentation Standards
  7. Git Standards
  8. Release Standards

Canonical Skills (v1.2.0)

The complete suite of 17 core canonical skills is cataloged in skills/README.md:

Domain Skill Identifier Description
Ideation Idea Validation & Truth-Driven Engineering ideation.idea-validation Stress-tests concepts; forbids blind AI compliance; demands truth on feasibility and non-goals.
Architecture Specification-Driven Architecture architecture.spec-driven-development Formal bounded contexts, contract interfaces, state machines, and acceptance criteria.
Architecture System Design & Modularity architecture.system-design Highly cohesive, loosely coupled modules with explicit public interfaces and acyclic graphs.
Frontend Frontend Architecture & UI/UX Engineering frontend.ui-engineering Component architecture, state machines, accessibility (WCAG 2.2 AA), and Core Web Vitals optimization.
Backend Backend Architecture & Distributed Systems backend.distributed-systems Resilient backend architectures, strict API contracts, idempotent operations, and failure tolerance.
Database Database Architecture & Data Modeling database.architecture-and-modeling Relational & document schemas, zero-downtime migrations, B-Tree/GIN indexing, and ACID boundaries.
DevOps / SRE DevOps, SRE & Cloud Deployment Governance devops.sre-observability Deployment lifecycles, hermetic containerization, CI/CD verification gates, and OpenTelemetry observability.
AI / ML Applied AI Systems & RAG Architecture ai.systems-and-rag Production AI architectures, deterministic tool calling, token conservation, and RAG pipelines.
Performance Systems Performance & Profiling Engineering performance.profiling-and-optimization Performance bottlenecks, CPU hotspots, memory leaks, and algorithmic complexity optimization.
Lifecycle Atomic Planning & Task Breakdown lifecycle.planning-and-task-breakdown Hermetic, sequentially verifiable implementation slices with rollback checkpoints.
Quality Clean Code & Quality Standards quality.coding-standards Expressive, type-safe code with strict error handling, discriminated unions, and concurrency safety.
Quality Rigorous Code Review & Quality Defense quality.code-review-and-quality Senior-engineer scrutiny, zero-leak defense, minimal blast radius, anti-rationalization pushback.
Security Secure Development & Vulnerability Prevention security.secure-development Defense-in-depth, input sanitization, Shannon entropy secret isolation ($H \ge 4.5$), STRIDE mitigation.
Testing STLC & Enterprise Quality Assurance testing.stlc-quality-assurance Full Software Testing Life Cycle execution, test pyramid governance, mutation testing, regression gates.
Testing Test-Driven Verification testing.test-driven-verification Deterministic automated test suites, property-based invariants, and mutation verification.
Documentation Architectural Decision Records documentation.architectural-decision-records MADR 3.0 decision matrices capturing consequential choices, alternatives, and trade-offs.
Delivery Production Shipping & Release Governance delivery.shipping-and-launch Verification gates, SemVer versioning, changelog synchronization, and CI/CD attestation.

Autonomous Specialist Roster: In addition to the 17 core skills, Sagarithm Kit v1.2.0 includes 99 specialized agent personas (AI data remediation, API platform, firmware, security, identity, mobile, etc.) auto-provisioned to .agents/skills/, .agents/agents/, and .copilot/agents/.


Behavioral Policies

The project-wide boundary policies are cataloged in policies/README.md:


Native Model Context Protocol (MCP) Server

Sagarithm Kit includes a native Model Context Protocol (MCP) server operating over standard input/output (stdio JSON-RPC 2.0). It equips AI models directly with 6 architectural tools:

{
  "mcpServers": {
    "sagarithm": {
      "command": "npx",
      "args": ["-y", "sagarithm-kit", "mcp"]
    }
  }
}

Exposed MCP Tools

  1. sagarithm_verify: Run empirical multi-vector verification gate (Static, Security, Architecture, Behavioral, Documentation).
  2. sagarithm_scan_secrets: Scan source code for Shannon entropy leaks ($H \ge 4.5$) and credential signatures.
  3. sagarithm_query_graph: Inspect AST symbols, calculate blast-radius, and evaluate Martin instability.
  4. sagarithm_validate_idea: Stress-test concepts against operational bottlenecks and anti-goals.
  5. sagarithm_health: Return composite 100-point codebase health index.
  6. sagarithm_get_skill: Retrieve canonical skill instructions and anti-rationalization tables.

Validation & Audit Engine

Empirical multi-vector verification gate enforcing the constitutional Zero Assumed Success principle:

  • Validation Specification: Verification state machine (ASSUMED -> IMPLEMENTED -> TESTED -> VERIFIED).
  • Canonical Rules:
  • Execution Harness:
    • sagarithm audit --deep: Full repository secret and architectural fitness audit.
    • sagarithm verify --strict: Multi-vector execution gate with empirical evidence collection and .sagarithm/audit-report.json generation.

Registry & Ecosystem

Decentralized distribution and turn-key engineering profiles for AI coding agents:

  • Registry Specification: Architecture, package anatomy, and SHA-256 integrity governance.
  • Registry Documentation: Presets, search, and packaging workflows.
  • Curated Presets:
    • fullstack-web: Next.js, React, Node, Web APIs, Tailwind, Client/Server state.
    • api-backend: Resilient REST, GraphQL, Outbox pattern, Pact contract testing.
    • systems-core: High-integrity systems, low-latency, zero-alloc, exhaustive typing.
    • ai-agentic: Multi-agent orchestration, prompt isolation, blast-radius containment.

Agent Adapters & CLI Engine

The @sagarithm/cli tool is documented in cli/README.md:

  • sagarithm init [--starter]: Workspace manifest generation and turnkey skill initialization
  • sagarithm mcp [--config <target>]: Stdio Model Context Protocol server
  • sagarithm validate "<idea>": Truth-driven feasibility and bottleneck stress-testing
  • sagarithm health: 100-point composite codebase health dashboard
  • sagarithm preset: List, inspect, and apply curated engineering presets (list, show, apply)
  • sagarithm sync: Multi-agent compiler (--target cursor, --target claude, etc.)
  • sagarithm context: Project graph generator and AST topology query engine (stats, find, blast-radius, orphans)
  • sagarithm doctor: Structural sprawl and repository health check
  • sagarithm audit: Pre-commit policy, secret, and architectural fitness scanner (--deep, --strict, --json)
  • sagarithm verify: Zero-Assumed-Success multi-vector execution verification gate (--strict, --suite, --json)
  • sagarithm registry: Search canonical catalog and package artifacts with SHA-256 integrity (search, pack)

Documentation & Specifications


License

Apache License 2.0. See LICENSE for details.

About

Cross-agent software engineering framework for AI coding agents — production-grade skills, standards, workflows, policies, and quality gates.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages