Skip to content
Subhojeet21Public

About

Autonomous architecture gate & AI-code governance engine for Salesforce DX projects. Audits distributed N+1 queries, USER_MODE security, LWC reactivity, and synthetic AI slop via Claude Code CLI, VS Code & Cursor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ArchonDX (⚡)

Autonomous Multi-Tenant Architecture & AI-Code Governance Engine for Salesforce DX projects

License Version Runtime Audit Scope Installs Reviews Run


💡 What is ArchonDX?

ArchonDX is an autonomous architectural review engine designed specifically for enterprise Salesforce DX environments. Embedded natively into your local developer workflow via Claude Code (CLI and VS Code extension) & Cursor, it acts as a virtual core reviewer that audits staged diffs and pull requests before code is committed or merged.

Unlike traditional static linters (such as PMD or ESLint) that only inspect single files in isolation, ArchonDX evaluates cross-class call graphs, runtime governor boundaries, and data access permissions across your entire local codebase.


🎯 Why Use ArchonDX? (The Business & Engineering Problem)

With generative AI assistants accelerating code generation, pull request velocity has multiplied—but so have subtle architectural regressions and review burden. AI-generated code often looks clean on the surface but contains critical multi-tenant anti-patterns that pass compilation and standard CI checks like:

  • Distributed $N+1$ Database Leaks: SOQL/DML queries nested three classes down within caller loops.
  • Security Regressions: Missing `WITH USER_MODE`, bypassing Field-Level Security (FLS) or tenant sharing models.
  • Synthetic "Coverage Padding": AI-generated unit tests with zero assertion logic (`System.assert(true)`), written purely to bypass the 75% deployment threshold.
  • LWC Resource Leaks: Unsubscribed Lightning Message Service (LMS) tokens and lingering DOM listeners causing browser memory decay.

ArchonDX performs semantic, cross-file architectural audits on Apex and Lightning Web Components before code ever reaches a pull request or before a pull request is merged.


🔬 Architecture: How ArchonDX Evaluates Beyond Static Linters

Traditional linters (PMD, ESLint, SonarQube) inspect isolated Abstract Syntax Trees (ASTs). They cannot detect cross-file side effects or understand architectural intent.

                    ┌───────────────────────────────────┐
                    │ Local Git Working Tree / PR Diff  │
                    └─────────────────┬─────────────────┘
                                      │
                                      ▼
                    ┌───────────────────────────────────┐
                    │ ArchonDX Workspace Hydrator       │
                    │ - Filter apex and lwc components  │
                    │ - Inspects Caller Call-Stacks     │
                    └─────────────────┬─────────────────┘
                                      │
            ┌─────────────────────────┼─────────────────────────┐
            ▼                         ▼                         ▼
┌───────────────────────┐ ┌───────────────────────┐ ┌───────────────────────┐
│ Lens A: Governor &    │ │ Lens B: Data Access   │ │ Lens C: Synthetic     │
│ Scalability Boundary  │ │ & Platform Security   │ │ Code & Test Integrity │
│ - Distributed N+1     │ │ - WITH USER_MODE      │ │ - Assert-less tests   │
│ - Queueable Chaining  │ │ - Explicit Sharing    │ │ - 200+ record bulk    │
│ - Heap & Cursor Guard │ │ - Dynamic SOQL binds  │ │ - Hallucinated APIs   │
└───────────┬───────────┘ └───────────┬───────────┘ └───────────┬───────────┘
            │                         │                         │
            └─────────────────────────┼─────────────────────────┘
                                      ▼
                    ┌───────────────────────────────────┐
                    │ Deterministic Version Pre-Flight  │
                    │ (GitHub API Release Check)        │
                    └─────────────────┬─────────────────┘
                                      │
                                      ▼
                    ┌───────────────────────────────────┐
                    │ Executive Architectural Brief &   │
                    │ 1-Click Code Replacement Patches  │
                    └───────────────────────────────────┘

Architectural Comparison Matrix

Inspection Dimension Static Analyzers (PMD / ESLint) Standard LLM Code Reviews ArchonDX Governance Engine
Distributed $N+1$ Traversal ❌ Only flags immediate loop bodies. ⚠️ Noisy; hallucinates syntax rules. ✅ Traces cross-class method invocations from handlers to selectors.
Data Security & FLS ⚠️ Relies on basic regex/rule files. ⚠️ Misses enterprise user modes. ✅ Enforces `WITH USER_MODE`, `stripInaccessible()`, and bind vars.
Test Suite Validity ❌ Passes any test reaching 75% coverage. ⚠️ Generates coverage padding. ✅ Detects hollow assert-less tests and verifies 200+ record bulk bounds.
LWC Lifecycle Hygiene ⚠️ Checks local variable state only. ⚠️ Inconsistent Locker/LWS context. ✅ Audits LMS cleanup in `disconnectedCallback()` and wire caching.
Workspace Footprint Heavy config setup (`ruleset.xml`). Requires custom API keys & billing. ✅ Zero-footprint, runs natively via enterprise Claude sessions.

⚡ Quick Installation

ArchonDX runs locally via Claude Code CLI and the official VS Code extension. Install it globally across all your Salesforce repositories in one command:

curl -fsSL https://github.com/Subhojeet21/archonDX/releases/latest/download/install.sh | bash

Note: The installer deploys the compiled, tamper-resistant engine definition directly to the user profile directory. No repository files or build dependencies are added to your target projects.


💻 Usage

Navigate into any Salesforce DX repository on your machine:

Runtime Target

1. In Claude Code CLI (Terminal)

claude
/archon

To compare against your team's integration branch before raising a PR:

/archon origin/main

2. In VS Code (Claude Code Extension)

  1. Open any Salesforce DX workspace in VS Code.
  2. In the Claude chat sidebar, type: /archon
  3. Review the generated executive table and 1-click suggested refactorings.

When to use?

1. Audit Working Tree Changes (Pre-Commit)

Inspect uncommitted staged and unstaged files:

/archon

2. Audit Against Trunk Branch (Pre-PR Gate)

Evaluate your feature branch diff against `main` before opening a pull request:

/archon origin/main

3. Review Staged Commits Only

/archon --staged

💬 Feedback & Rule Suggestions

ArchonDX evolves directly from enterprise edge cases and community feedback.

  • Trigger via Terminal / IDE: Type /archon --feedback inside your agent session.
  • Report a False Positive: Found a valid pattern incorrectly blocked by the gate? Open False Positive Report.
  • Suggest an Architectural Rule: Want support for custom frameworks, patterns? Submit a Rule Proposal.
  • Discussions & Q&A: Join the conversation on GitHub Discussions.

📄 License & Attribution

MIT License © Subhojeet Ghosh

About

Autonomous architecture gate & AI-code governance engine for Salesforce DX projects. Audits distributed N+1 queries, USER_MODE security, LWC reactivity, and synthetic AI slop via Claude Code CLI, VS Code & Cursor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors