Skip to content

AI Vendor Abstraction & Model Neutrality

Decouple repository invariants, failure memory, and behavioral guardrails from LLM model providers.


Autonomous Agent Origin

The Agent Operating Substrate is designed, implemented, and maintained autonomously by AI agents (AOS Agent). All post-initial release enhancements follow a strict Pull Request / Merge Request workflow to ensure concurrent collaboration between multiple autonomous agents and human developers.

The Model Churn Dilemma

Enterprise engineering teams adopt AI coding assistants at breakneck pace. Yet software leaders face AI model churn and vendor lock-in: OpenAI, Anthropic, Google, and open-weights creators update models weekly, while developer tooling fragments across Cursor, Windsurf, Copilot, Amazon Q, and Claude Code.

The diagram below illustrates the fragility of managing disparate vendor rules independently:

flowchart TD
    subgraph Fragmented["Without AOS: Fragmented, Vulnerable, Vendor-Locked"]
        CR[".cursorrules<br/>(Cursor)"] --> D1["Prompt Drift & Inconsistent Checks"]
        WR[".windsurfrules<br/>(Windsurf)"] --> D2["Different Syntax & Attention Limits"]
        CM["CLAUDE.md<br/>(Claude Code)"] --> D3["Model Updates Break Adherence"]
    end

When teams embed policies directly inside vendor-specific prompt files, they incur severe costs: 1. Prompt Drift & Behavioral Inconsistency: What Claude 3.5 Sonnet respects through natural language prompting, GPT-4o or Gemini 1.5 Pro may overlook. Each model has unique attention patterns, context window thresholds, and system prompt formatting requirements. 2. Artificial Vendor Lock-in: Migrating from one IDE or model provider to another requires rewriting and re-testing months of prompt guidelines. 3. The AI Babysitting Tax: Senior engineers waste time repeatedly diagnosing identical regressions across different developer setups because rule enforcement relies on model obedience rather than deterministic validation.


The Solution: A Vendor-Agnostic Behavior Control Plane

The Agent Operating Substrate (AOS) abstracts away the model layer entirely.

AOS establishes an independent, machine-readable behavior control plane inside your repository. Whether code is drafted by Gemini 1.5 Pro, Claude 3.5 Sonnet, OpenAI Codex, or local DeepSeek running in an air-gapped environment, AOS guarantees the exact same repository guardrails, memory, and pre-commit verification.

flowchart TD
    Substrate[("Single Source of Truth Substrate<br/>.agents/substrate/active/")]

    Substrate -->|"aos sync / aos mcp"| Gemini["Google Gemini<br/>(Code Assist / Antigravity)"]
    Substrate -->|"aos sync / aos mcp"| Claude["Anthropic Claude<br/>(Claude Code / Projects)"]
    Substrate -->|"aos sync / aos mcp"| Codex["OpenAI Codex<br/>(ChatGPT / GPT-4o)"]
    Substrate -->|"aos sync / aos mcp"| Others["Cursor, Windsurf, Copilot, Amazon Q"]

    Gemini -->|"Staged Commits"| GitHook
    Claude -->|"Staged Commits"| GitHook
    Codex -->|"Staged Commits"| GitHook
    Others -->|"Staged Commits"| GitHook

    GitHook{"Deterministic Git Firewall<br/>(aos hook run)"}
    GitHook -->|"Complies"| Commit["Commit Accepted (Exit 0)"]
    GitHook -->|"Violates"| Block["Commit Rejected (Exit 1)<br/>Actionable Remediation Log"]

The 3 Pillars of Vendor Abstraction

1. Declarative, Model-Independent Invariants

Repository rules are authored in structured, vendor-neutral YAML schemas rather than conversational system prompts. Each invariant specifies scope, target paths, AST or regex patterns, and deterministic enforcement actions:

id: "sec-sql-injection-001"
version: 1
status: "active"
scope:
  paths: ["src/**", "api/**"]
  languages: ["python", "typescript", "go"]
invariant:
  statement: "Raw SQL query string concatenation is prohibited. All database queries must use parameterized queries or ORM bindings."
  rationale: "Prevents critical SQL injection vulnerabilities in database access layers."
  enforcement: "reject_diff"
provenance:
  incident_id: "inc-2026-09-01-01"
  inscribing_agent: "forensic-auditor"

Because invariants are pure data, they remain invariant regardless of which LLM reads them.

2. Universal Prompt Projection (aos sync)

AOS dynamically translates active YAML invariants into the native configuration format expected by each AI assistant: * Cursor: Synchronizes into .cursorrules and .cursor/rules/*.mdc. * Windsurf / Codeium: Compiles into .windsurfrules. * GitHub Copilot: Injects into .github/copilot-instructions.md. * Anthropic Claude: Formats into CLAUDE.md.

Injected rules are isolated within deterministic HTML markers (<!-- AOS_INVARIANTS_START -->). Custom developer instructions outside these markers are preserved untouched.

3. Universal Protocol & Deterministic Git Barrier

AOS provides two layers of enforcement that do not rely on prompt adherence: * Model Context Protocol (MCP): Via aos mcp, any MCP-compatible agent (Claude Desktop, Antigravity, Cursor, Cline) can query applicable invariants interactively during code generation. * Universal Git Hook (aos hook run): When code is committed, AOS inspects staged diffs directly. If an agent hallucinated a banned import or violated diff size constraints, the commit is deterministically rejected. The enforcement happens in local code, not in the model's neural weights.


Supported AI Ecosystems & Models

AOS supports the entire landscape of commercial, open-source, and local AI coding tools:

AI Ecosystem / Model Supported Tooling & Interfaces Integration Mode Enforcement Mechanism
Google Gemini Gemini Code Assist, Gemini CLI, Antigravity Live MCP Server (aos mcp), CLI execution autopsy (aos exec), Stigmergic Blackboard Pre-commit hook & live MCP tools
Anthropic Claude Claude Code, Claude Desktop, Claude Projects Single-source CLAUDE.md sync (aos sync), native MCP stdio server Deterministic pre-commit firewall (aos hook run)
OpenAI Codex & ChatGPT OpenAI Codex, ChatGPT Developer Mode, GPT-4o Prompt projection, MCP protocol, Git pre-commit barrier Substrate invariant evaluation & diff bouncer
GitHub Copilot VS Code, JetBrains, Visual Studio, Copilot Chat Automatic .github/copilot-instructions.md compilation Pre-commit hook & CI pipeline gatekeeper
Cursor IDE Cursor Composer, Cursor Agent Mode .cursorrules and .cursor/rules/*.mdc synchronization, MCP server Instant rule prompt injection & pre-commit hook
Windsurf / Codeium Windsurf IDE, Codeium Cascade .windsurfrules automatic synchronization Staged diff bouncer & rule validation
Aider, Roo Code & Cline Aider CLI, Roo Code, Cline (VS Code) Context injection (.agents/substrate/active), stdio MCP Autonomous pre-commit barrier & execution autopsy
Amazon Q Developer Amazon Q (AWS Toolkit, VS Code, JetBrains) Substrate prompt compilation & Git pre-commit barrier Deterministic pre-commit enforcement & CI check
Local & Open Weights DeepSeek-R1 / V3, Llama 3, Mistral, Qwen (via Ollama, vLLM) File-based substrate, local SQLite, stdio MCP 100% offline, local-first behavior firewall

Real-World Scenarios

Scenario 1: Model Migration with Zero Policy Regression

A team decides to migrate primary coding workflows from Claude 3.5 Sonnet to Gemini 1.5 Pro to take advantage of expanded context windows and pricing efficiency.

Without AOS: The platform team must rewrite complex prompt instructions, test prompt drift, and manually verify that Gemini adheres to team security conventions.

With AOS: 1. The team switches developer tools or switches model endpoints. 2. Run aos sync once to project existing invariants into the new harness. 3. Every invariant (security rules, diff constraints, memory alignment) remains 100% active and enforced by aos hook run. 4. Zero regressions, zero manual re-prompting.

Scenario 2: Heterogeneous Multi-Model Mesh

In advanced agentic setups, different models excel at different specialties: * Gemini 1.5 Pro / Antigravity: Ingests massive repository context and drafts broad cross-file refactors. * Claude 3.5 Sonnet: Performs rigorous architectural and security audits. * OpenAI Codex / GPT-4o: Synthesizes exhaustive test suites and property checks. * Local DeepSeek / Llama: Runs fast, air-gapped code completions on sensitive internal data.

AOS coordinates these disparate models unprompted through the stigmergic blackboard (.agents/blackboard/events.jsonl). Each agent reads past event traces, announces intents, and validates work against common repository invariants without human routing.


Enterprise Commercial Impact

Adopting a vendor-agnostic behavior control plane yields substantial business advantages:

  1. Eliminating AI Vendor Lock-in: Negotiate model pricing freely. Switch providers or mix-and-match models across teams without jeopardizing code quality or compliance.
  2. Slashing AI Regression Costs: Prevent broken imports, subtle memory bugs, and leaked API secrets before pull request review, saving hundreds of engineering hours.
  3. Audit and Compliance Readiness: Maintain a tamper-proof event stream (events.jsonl) verifying that security policies were enforced on every commit, meeting SOC2 Type II and ISO 27001 requirements.
  4. Fleet-Wide Governance (aos fleet): Synchronize compliance rules across 100+ repositories simultaneously while allowing local teams sovereign customization.

Next Steps