Open Source • Apache-2.0
TSNode 22+ Native Engine

Engineering standards for AI coding agents.

Universal cross-agent framework delivering architectural governance, empirical verification, living context graphs, and quality gates to Cursor, Antigravity, Claude Code, Copilot, and Windsurf.

Interactive Studio
6 Agents Supported
5 Vectors Verification
Zero Assumed Success
sagarithm-cliv1.0.1
$npx sagarithm-kit context stats
⚙ Parsing project AST & topological dependency graph...
Afferent Coupling (Ca)
14incoming
Efferent Coupling (Ce)
3outgoing
Martin Instability Metric (I):0.18 (Highly Stable)
Orphan Abstractions:0 detected (Clean)
Active Preset: systems-coreNode.js 22+ Native ESM
npm

npm & npx Registry

GLOBAL CLI RUNTIME

Live public release v1.0.1

npx sagarithm-kit init
GH

GitHub Packages

CONTAINER & NPM REGISTRY

Scoped enterprise package

npm i @sagarithm/sagarithm-kit
AI

Multi-Agent Adapters

6 TARGET RUNTIMES

Cursor • Antigravity • Claude Code

sagarithm sync --target all

Compile cross-agent configurations in real-time.

Select an agent target and architectural preset to observe deterministic instruction compilation, policy constraints, and empirical quality gates.

sagarithm-compiler|Deterministic AST Engine
100% Client-Side Simulation
Real-Time Compiler

Canonical laws compile deterministically into native targets on selection with zero manual drift.

Target:.cursorrules
Active Presetsystems-core
Quality Gate[VERIFIED]
Graph Cycles0 (Acyclic DAG)
<!-- SAGARITHM:START -->
# SAGARITHM ENGINEERING CONSTITUTION (Target: .cursorrules)
# Preset: systems-core | Version: 1.0.1

## Supreme Behavioral Governors
- Zero Assumed Success: You are strictly forbidden from declaring a task complete without empirical test evidence.
- Entropy Security Gate: Shannon entropy H >= 4.5 triggers an immediate security abort.
- Acyclic Graph Constraint: Circular dependencies between modules are considered critical bugs.

## Active Preset Directives (systems-core)
- 1. Never create circular dependencies; all modules must form a strict DAG.
- 2. Shannon entropy threshold for credentials is H >= 4.5. Secrets must never be committed.
- 3. Zero Assumed Success: Verify code using empirical test execution before reporting done.
- 4. No generic 'utils' or 'helpers' directories; use domain-oriented taxonomy.

## Required Verification Vectors
1. Static Analysis: Strict typing, zero eslint warnings.
2. Security Gate: Zero hardcoded API keys, tokens, or private secrets.
3. Architecture Fitness: Acyclic DAG topology, zero 'utils/helpers' anti-patterns.
4. Behavioral Tests: All unit and integration test assertions green.
5. Documentation: Topology manifest and ADR state synchronized.
<!-- SAGARITHM:END -->

Built for autonomy, architecture, and security.

Embedding architectural governance, entropy token defense, and topological graph analysis directly into the agentic development loop.

01/engine.ts
State Machine Automation

Autonomous Workflow Orchestration

Deterministic multi-stage workflow runner executing feature development, bug fixes, refactoring, and release prep with strict gate enforcement.

CLI Command:sagarithm run feature-development
02/secrets.ts
Information Entropy H >= 4.5

Algorithmic Shannon Entropy Scanner

Detects high-randomness tokens and API credentials at H >= 4.5 Shannon entropy, stopping confidential leaks and injection flaws before commits occur.

CLI Command:sagarithm audit --strict
03/graph.ts
Afferent/Efferent Metric Graph

Robert C. Martin Instability & Coupling

Calculates Afferent (Ca) and Efferent (Ce) coupling metrics, calculates component instability I = Ce / (Ca + Ce), and isolates unreferenced orphan abstractions.

CLI Command:sagarithm context stats
04/compiler.ts
Zero Configuration Drift

Deterministic Cross-Agent Compiler

Maintains a single canonical source of truth for architectural laws, injecting precision demarcated instruction blocks into Cursor, Antigravity, Claude, and Copilot.

CLI Command:sagarithm sync --target all

Six decoupled layers. One source of truth.

Decoupled engineering principles, skills, and policies compiled deterministically into native agent targets without configuration drift.

Layer 01

Engineering Constitution

constitution/

Role & Purpose

Codified principles governing engineering philosophies, strict typing, error handling, testing pyramids, OWASP security, documentation standards, atomic git hygiene, and SemVer releases.

Codified Specifications in Layer 01

01-engineering-principles.md
02-architecture-principles.md
03-coding-standards.md
04-testing-principles.md
05-security-principles.md
06-documentation-standards.md
07-git-standards.md
08-release-standards.md
Decoupled Design:100% Target Agent Agnostic

Standard prompts assume. Sagarithm Kit verifies.

Evaluating software engineering reliability across raw LLM prompting, static .agents rules, and Sagarithm Kit's empirical multi-vector quality gates.

Engineering DimensionRaw LLM Prompting.agentsSagarithm Kit v1.0.1
Proof of Correctness Gate
Self-reported 'Task Completed' (No test run)
Static markdown instructions (Easily ignored)
Zero Assumed Success (Mandatory empirical test execution)
Credential Leak Defense
None (High risk of pushing live keys)
Naive regex strings (Misses random tokens)
Shannon Entropy H >= 4.5 + Regex Pattern Engine
Architectural Graph Governance
Creates circular dependency cycles
No AST or graph awareness
Acyclic DAG Cycle Interception & Martin Instability (I)
Code Organization & Anti-Patterns
Dumps code into 'utils' & 'helpers' drawers
Subjective guidelines
Automated Fitness Audit & Refactoring Remediation (--fix)
Cross-Agent Ecosystem Sync
Completely manual prompt re-entry
Hardcoded to a single IDE file (.cursorrules)
Universal AST Compiler (Cursor, Antigravity, Claude, Copilot)
Orphan Abstraction Interceptor
Leaves dead code and unreferenced exports
None
AST Export/Import graph isolates unreferenced interfaces
Methodology: Multi-vector execution harnessZero Assumed Success Principle

One install. Governs every agent.

Run natively with npx, install globally via npm, or integrate directly into your CI/CD pipeline to enforce Zero Assumed Success on every pull request.

Initialize Sagarithm Kit workspace configuration

Generates the canonical sagarithm.config.json file, detects existing agent configurations, and prepares workspace directories.

$npx sagarithm-kit init
BASH / POWERSHELL

Command Flags & Options

--forceOverwrite existing configurations without confirmation
--preset <id>Initialize with a curated preset (fullstack-web, systems-core, etc.)

Simulated Output

✔ Generated sagarithm.config.json
✔ Detected target: .cursorrules (Cursor IDE)
✔ Successfully initialized Sagarithm Kit in workspace!