sagarithm-kit
CLAUDE.md17 starsChanged 12 days agoApache-2.0View on GitHub
- Reads credentials
In this repository252 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/ai-systems-and-rag.mdcCursor rule
- .cursor/rules/architecture-spec-driven-development.mdcCursor rule
- .cursor/rules/architecture-system-design.mdcCursor rule
- .cursor/rules/backend-distributed-systems.mdcCursor rule
- .cursor/rules/database-architecture-and-modeling.mdcCursor rule
- .cursor/rules/delivery-shipping-and-launch.mdcCursor rule
- .cursor/rules/devops-sre-observability.mdcCursor rule
- .cursor/rules/documentation-architectural-decision-records.mdcCursor rule
- .cursor/rules/engineering-ai-data-remediation-engineer.mdcCursor rule
- .cursor/rules/engineering-ai-engineer.mdcCursor rule
- .cursor/rules/engineering-api-platform-engineer.mdcCursor rule
- .cursor/rules/engineering-autonomous-optimization-architect.mdcCursor rule
- .cursor/rules/engineering-backend-architect.mdcCursor rule
- .cursor/rules/engineering-cms-developer.mdcCursor rule
- .cursor/rules/engineering-codebase-onboarding-engineer.mdcCursor rule
- .cursor/rules/engineering-code-reviewer.mdcCursor rule
- .cursor/rules/engineering-database-optimizer.mdcCursor rule
- .cursor/rules/engineering-data-engineer.mdcCursor rule
- .cursor/rules/engineering-desktop-app-engineer.mdcCursor rule
- .cursor/rules/engineering-devops-automator.mdcCursor rule
- .cursor/rules/engineering-drupal-performance.mdcCursor rule
- .cursor/rules/engineering-drupal-shopping-cart.mdcCursor rule
- .cursor/rules/engineering-email-intelligence-engineer.mdcCursor rule
- .cursor/rules/engineering-embedded-firmware-engineer.mdcCursor rule
- .cursor/rules/engineering-feishu-integration-developer.mdcCursor rule
- .cursor/rules/engineering-filament-optimization-specialist.mdcCursor rule
- .cursor/rules/engineering-finops-engineer.mdcCursor rule
- .cursor/rules/engineering-frontend-developer.mdcCursor rule
- .cursor/rules/engineering-git-workflow-master.mdcCursor rule
- .cursor/rules/engineering-i18n-engineer.mdcCursor rule
- .cursor/rules/engineering-identity-access-engineer.mdcCursor rule
- .cursor/rules/engineering-incident-response-commander.mdcCursor rule
- .cursor/rules/engineering-it-service-manager.mdcCursor rule
- .cursor/rules/engineering-minimal-change-engineer.mdcCursor rule
- .cursor/rules/engineering-mobile-app-builder.mdcCursor rule
- .cursor/rules/engineering-mobile-release-engineer.mdcCursor rule
- .cursor/rules/engineering-multi-agent-systems-architect.mdcCursor rule
- .cursor/rules/engineering-network-engineer.mdcCursor rule
- .cursor/rules/engineering-orgscript-engineer.mdcCursor rule
- .cursor/rules/engineering-payments-billing-engineer.mdcCursor rule
- .cursor/rules/engineering-prompt-engineer.mdcCursor rule
- .cursor/rules/engineering-rapid-prototyper.mdcCursor rule
- .cursor/rules/engineering-realtime-collaboration-engineer.mdcCursor rule
- .cursor/rules/engineering-search-relevance-engineer.mdcCursor rule
- .cursor/rules/engineering-section-508-specialist.mdcCursor rule
- .cursor/rules/engineering-senior-developer.mdcCursor rule
- .cursor/rules/engineering-software-architect.mdcCursor rule
- .cursor/rules/engineering-solidity-smart-contract-engineer.mdcCursor rule
- .cursor/rules/engineering-sre.mdcCursor rule
- .cursor/rules/engineering-technical-writer.mdcCursor rule
- .cursor/rules/engineering-uswds-developer.mdcCursor rule
- .cursor/rules/engineering-video-streaming-engineer.mdcCursor rule
- .cursor/rules/engineering-voice-ai-integration-engineer.mdcCursor rule
- .cursor/rules/engineering-webassembly-engineer.mdcCursor rule
- .cursor/rules/engineering-wechat-mini-program-developer.mdcCursor rule
- .cursor/rules/engineering-wordpress-performance.mdcCursor rule
- .cursor/rules/engineering-wordpress-shopping-cart.mdcCursor rule
- .cursor/rules/frontend-ui-engineering.mdcCursor rule
- The first 60 shown.
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
34 rules. About 0 are common, 17 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Distinguish Symptoms from Root Cause: Do not apply superficial band-aids (e.g.
- Distinctive: line 34
Mandatory Regression Test: Write an automated unit or integration test that reproduces the exact bug scenario.
- Distinctive: line 35
Execute Test Runner: Run the test and confirm that it fails against the existing unpatched codebase with the reported error.
- Distinctive: line 36
Invariant Check: If the test passes before the fix is applied, the test does not reproduce the bug.
- Distinctive: line 42
No Opportunistic Refactors: Do not rewrite unrelated methods, rename variables, or alter untouched code.
- Distinctive: line 48
Verify Target Fix: Run the reproducing test and confirm it now passes (Green).
- Distinctive: line 50
Static Analysis & Types: Run linter and typecheckers to ensure syntax and contract integrity.
- Very specific: line 56
Commit Message Discipline: Use Conventional Commits (fix(scope): concise description).
- Very specific: line 61
Changelog Entry: Add an entry under [Unreleased] in CHANGELOG.md.
- Distinctive: line 72
Inspect Existing Code: Search the repository for existing modules, types, and utilities handling similar domain logic.
- Distinctive: line 73
Verify Existing Conventions: Check existing styling, naming conventions, test frameworks, and error-handling patterns.
- Very specific: line 86
If introducing a significant architectural boundary, draft an ADR using documentation.architectural-decision-records.
- Very specific: line 95
Dependency Admission: Do not add third-party packages if language standard libraries suffice (policy.dependency-management).
- Distinctive: line 101
Inspect Terminal Output: Verify that all new feature tests pass with exit code 0.
- Very specific: line 102
Static Analysis & Linting: Run project type checker and linter (tsc, npm run lint).
- Distinctive: line 103
Zero Assumed Success: Never claim the feature works without inspecting verified passing terminal output.
- Distinctive: line 108
Living Docs Sync: Update API specifications or developer guides affected by the change.
- Very specific: line 109
Changelog Entry: Add an entry under [Unreleased] in CHANGELOG.md following Conventional Commits format.
- Very specific: line 110
Atomic Commit: Commit changes with a descriptive message (feat(scope): add description).
- Distinctive: line 120
The Invariant: Never refactor code that is currently failing tests.
- Distinctive: line 121
Execute Baseline Suite: Run existing tests covering the target component.
- Distinctive: line 128
Verify Public Contracts: Ensure public API signatures, return types, and exceptions remain strictly identical.
- Distinctive: line 135
Preserve Compatibility: If moving public functions, provide temporary deprecated aliases to avoid breaking downstream consumers.
- Very specific: line 142
Architectural Invariant Check: Run architectural fitness functions (architecture.system-design) to confirm no circular dependencies were …
- Very specific: line 143
Diff Inspection: Verify with git diff that no external behavior or unintended files were modified (policy.change-scope).
- Very specific: line 148
ADR Update: If the refactor changed package boundaries or module structures, update or create an ADR in docs/adr/.
- Very specific: line 149
Conventional Commit: Commit with refactor(scope): describe internal improvement.
- Very specific: line 164
Validate Deprecation Cycles: Verify that any breaking changes were preceded by a formal deprecation period …
- Distinctive: line 171
Verify that migrations do not lock production tables or drop columns in active use.
- Very specific: line 172
Environment Variable Audit: Check if new mandatory environment variables are introduced and documented in .env.example.
- Very specific: line 177
Bump Version: Update version fields across project metadata files (package.json, Cargo.toml, pyproject.toml).
- Very specific: line 179
Assemble Build Bundles: Run production build commands (npm run build, cargo build --release).
- Very specific: line 185
Dependency Audit: Run dependency security scan (npm audit, pip-audit) ensuring zero high/critical CVEs.
- Distinctive: line 196
Confirm Rollback Plan: Document the rollback procedure (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- SAGARITHM:START - DO NOT EDIT DIRECTLY -->CLAUDE.md — Sagarithm Engineering Guidelines
Core Philosophy
- Understand before modifying; inspect before creating; minimal necessary change.
- Zero assumed success: always execute tests and verify terminal output before completing tasks.
Repository Policies
- Change Scope & Blast Radius Containment [error]: Confines code modifications strictly to the files and functions directly required to fulfill the user request.
- Dependency Management & Supply Chain Control [error]: Restricts the introduction of third-party dependencies. Requires evaluation of native standard libraries and lockfile integrity.
- Directory Creation & Structural Sprawl Prevention [error]: Strictly forbids the unauthorized creation of arbitrary directories, generic utility folders, or parallel folder hierarchies.
- Documentation & ADR Synchronization [warn]: Requires synchronization of documentation, API specs, and ADRs whenever code architecture or interfaces change.
- File Creation & Abstraction Deduplication [error]: Prevents creation of redundant files, duplicate helper abstractions, and mislocated source files.
- Security Boundary & Secrets Containment [error]: Prohibits committing credentials, raw SQL concatenation, untrusted shell executions, and unvalidated perimeter inputs.
- Testing Enforcement & Zero Assumed Success [error]: Mandates real terminal execution of automated tests, zero test failures, and regression tests for bug fixes.
Task Workflows
Bug Fix Workflow
Bug Fix Workflow
Overview
This workflow governs the investigation, reproduction, and resolution of software defects. It ensures bugs are permanently resolved by requiring a reproducing automated test before any fix is applied.
Phase 1: Understand & Root-Cause Diagnosis
- Understand Reported Defect: Analyze error logs, stack traces, expected behavior, and actual behavior.
- Distinguish Symptoms from Root Cause: Do not apply superficial band-aids (e.g. adding
if (x) return;to silence null errors) without understanding whyxwas null. - Trace Data Flow: Inspect callers, state transitions, and boundary inputs that led to the invalid state.
Phase 2: Reproduce with a Failing Test (Red Phase)
- Mandatory Regression Test: Write an automated unit or integration test that reproduces the exact bug scenario.
- Execute Test Runner: Run the test and confirm that it fails against the existing unpatched codebase with the reported error.
- Invariant Check: If the test passes before the fix is applied, the test does not reproduce the bug. Refine the test until it reliably reproduces the failure.
Phase 3: Minimal Surgical Fix (Green Phase)
- Minimal Necessary Change: Implement the minimal code change required to address the root cause (
policy.change-scope). - No Opportunistic Refactors: Do not rewrite unrelated methods, rename variables, or alter untouched code.
- Preserve Error Boundaries: Fix the logic while maintaining explicit typing and domain error models.
Phase 4: Verification Gate (Mandatory)
- Verify Target Fix: Run the reproducing test and confirm it now passes (Green).
- Verify Regression Suite: Execute the broader project test suite to guarantee the fix did not introduce regressions elsewhere.
- Static Analysis & Types: Run linter and typecheckers to ensure syntax and contract integrity.
- Zero Assumed Success: Inspect terminal output to confirm exit code 0.
Phase 5: Documentation & Review
- Commit Message Discipline: Use Conventional Commits (
fix(scope): concise description). - Explain Root Cause: In the commit message body, document:
- What the root cause was.
- How the patch fixes it.
- What test verifies the resolution.
- Changelog Entry: Add an entry under
[Unreleased]inCHANGELOG.md.
Feature Development Workflow
Feature Development Workflow
Overview
This workflow governs how an AI coding agent or engineer takes a user requirement from initial concept to verified production-ready code.
Phase 1: Understand & Inspect
- Clarify Acceptance Criteria: Break down the feature request into testable, unambiguous acceptance criteria and edge cases.
- Inspect Existing Code: Search the repository for existing modules, types, and utilities handling similar domain logic.
- Verify Existing Conventions: Check existing styling, naming conventions, test frameworks, and error-handling patterns.
- Enforce Policy: Apply
policy.directory-creationandpolicy.file-creationto locate where the feature belongs in the existing hierarchy.
Phase 2: Plan & Design
- Determine Risk Tier:
- Low: Localized UI tweaks, text updates.
- Medium: Isolated internal component or utility.
- High: Database schema change, new endpoint, third-party integration.
- Critical: Payment processing, authentication, credentials, data deletion.
- Formulate Architecture:
- Define data shapes, DTOs, and interface contracts.
- If introducing a significant architectural boundary, draft an ADR using
documentation.architectural-decision-records.
- Outline Test Strategy: Determine required unit tests, boundary validations, and integration tests before writing code.
Phase 3: Minimal Implementation
- Strictly Confine Scope: Modify only files directly required for the feature (
policy.change-scope). - Perimeter Validation: Validate all external inputs with schema parsers (
policy.security-boundary). - Strict Typing: No
anyor untyped objects (quality.coding-standards). - Dependency Admission: Do not add third-party packages if language standard libraries suffice (
policy.dependency-management).
Phase 4: Verification Gate (Mandatory)
- Execute Test Runner: Dispatch the test command in the terminal (
npm test,pytest,cargo test). - Inspect Terminal Output: Verify that all new feature tests pass with exit code 0.
- Static Analysis & Linting: Run project type checker and linter (
tsc,npm run lint). - Zero Assumed Success: Never claim the feature works without inspecting verified passing terminal output.
Phase 5: Documentation & Review
- Living Docs Sync: Update API specifications or developer guides affected by the change.
- Changelog Entry: Add an entry under
[Unreleased]inCHANGELOG.mdfollowing Conventional Commits format. - Atomic Commit: Commit changes with a descriptive message (
feat(scope): add description).
Refactoring Workflow
Refactoring Workflow
Overview
Refactoring improves the internal design, readability, or performance of code without altering its observable behavior. This workflow ensures refactoring remains safe, incremental, and verifiable.
Phase 1: Baseline Verification
- The Invariant: Never refactor code that is currently failing tests.
- Execute Baseline Suite: Run existing tests covering the target component.
- Verify Baseline: Confirm tests pass with 100% success before making any code modifications. If coverage is inadequate, add characterization tests first.
Phase 2: Plan & Boundary Invariants
- Identify the Smell / Goal: Clearly define why the refactoring is occurring (e.g., reduce cyclomatic complexity, decouple database logic, remove code duplication).
- Verify Public Contracts: Ensure public API signatures, return types, and exceptions remain strictly identical.
- No Concurrent Feature Work: Refactoring and feature development must never be blended in the same task or commit.
Phase 3: Incremental Transformation
- Small Steps: Make transformations in small, isolated steps (e.g. Extract Method, Move Class, Introduce Parameter Object).
- Preserve Compatibility: If moving public functions, provide temporary deprecated aliases to avoid breaking downstream consumers.
- Adhere to Code Quality: Apply
quality.coding-standardsto all rewritten segments.
Phase 4: Verification Gate (Mandatory)
- Run Full Test Suite: Execute the test suite and confirm that all existing tests pass without modification.
- Architectural Invariant Check: Run architectural fitness functions (
architecture.system-design) to confirm no circular dependencies were introduced. - Diff Inspection: Verify with
git diffthat no external behavior or unintended files were modified (policy.change-scope).
Phase 5: Documentation & Review
- ADR Update: If the refactor changed package boundaries or module structures, update or create an ADR in
docs/adr/. - Conventional Commit: Commit with
refactor(scope): describe internal improvement.
Release Workflow
Release Workflow
Overview
This workflow governs the preparation, verification, and deployment of software releases according to Semantic Versioning and operational safety standards.
Phase 1: Scope & SemVer Evaluation
- Audit Unreleased Changes: Review all commits and pull requests accumulated under
[Unreleased]inCHANGELOG.md. - Determine SemVer Level:
- MAJOR: Contains any breaking API changes, dropped database columns, or altered contracts.
- MINOR: Contains new features, new endpoints, or backward-compatible capabilities.
- PATCH: Contains bug fixes, performance optimizations, and security patches only.
- Validate Deprecation Cycles: Verify that any breaking changes were preceded by a formal deprecation period (
constitution/08-release-standards.md).
Phase 2: Migration & Backward-Compatibility Verification
- Database Schema Auditing:
- Confirm all database migrations strictly follow the phased Expand/Contract pattern.
- Verify that migrations do not lock production tables or drop columns in active use.
- Environment Variable Audit: Check if new mandatory environment variables are introduced and documented in
.env.example.
Phase 3: Release Artifact Preparation
- Bump Version: Update version fields across project metadata files (
package.json,Cargo.toml,pyproject.toml). - Finalize Changelog: Move items from
[Unreleased]to a versioned section[X.Y.Z] - YYYY-MM-DDinCHANGELOG.md. - Assemble Build Bundles: Run production build commands (
npm run build,cargo build --release).
Phase 4: Release Verification Gate (Mandatory)
- Full Test Suite Execution: Execute all unit, integration, and contract test suites.
- Dependency Audit: Run dependency security scan (
npm audit,pip-audit) ensuring zero high/critical CVEs. - Smoke Test Build Artifacts: Inspect generated binaries, docker containers, or bundles to confirm they launch cleanly without missing assets.
- Zero Assumed Success: Verified passing terminal output is required before proceeding to tagging.
Phase 5: Tagging & Rollback Readiness
- Create Annotated Git Tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" - Confirm Rollback Plan: Document the rollback procedure (e.g. downward database rollback script, previous container image tag).
- Publish Release Notes: Publish tagged release notes to repository release feeds.
<!-- SAGARITHM:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

