Context
The Antigravity IDE harness explicitly prepends a generic <web_application_development> block to the agent's context window. During long sessions, attention dilution causes the agent to fall back on this generic behavior, leading to "Semantic Corruption" where the agent attempts to build standard web apps (Next.js/HTML) and bypasses the Neo.mjs triad governance (e.g., executing direct-to-dev commits without branching).
The Problem
This semantic corruption was identified as the root cause of recent focus drift and direct-to-dev violations. While GitHub branch protection (Layer 1) mechanically stops the commits, it does not stop the agent from attempting them or from reasoning about generic web-dev concepts. Because there is no native IDE setting to disable this injected block, a cognitive counter-measure is required.
The Architectural Reality
The solution must be scoped to the specific harness causing the issue. Injecting rules into the global AGENTS.md pollutes the context for Claude Code and Codex. Therefore, the fix must reside in .agents/ANTIGRAVITY_RULES.md, which is exclusively loaded by the Antigravity agent.
The Fix
- Append an explicit "MX Hygiene (The Negative Override)" section to
.agents/ANTIGRAVITY_RULES.md.
- This override must explicitly command the agent to ignore the
<web_application_development> block.
- The override must explicitly forbid direct pushes to
dev and main, providing a harness-specific cognitive reinforcement of the existing mechanical branch protections.
Acceptance Criteria
Out of Scope
Modifying AGENTS.md or any rules applying to Claude Code or Codex.
Origin Session ID: c187aeaf-2978-44d3-8d15-3c4c5b542b2e
Context The Antigravity IDE harness explicitly prepends a generic
<web_application_development>block to the agent's context window. During long sessions, attention dilution causes the agent to fall back on this generic behavior, leading to "Semantic Corruption" where the agent attempts to build standard web apps (Next.js/HTML) and bypasses the Neo.mjs triad governance (e.g., executing direct-to-dev commits without branching).The Problem This semantic corruption was identified as the root cause of recent focus drift and direct-to-dev violations. While GitHub branch protection (Layer 1) mechanically stops the commits, it does not stop the agent from attempting them or from reasoning about generic web-dev concepts. Because there is no native IDE setting to disable this injected block, a cognitive counter-measure is required.
The Architectural Reality The solution must be scoped to the specific harness causing the issue. Injecting rules into the global
AGENTS.mdpollutes the context for Claude Code and Codex. Therefore, the fix must reside in.agents/ANTIGRAVITY_RULES.md, which is exclusively loaded by the Antigravity agent.The Fix
.agents/ANTIGRAVITY_RULES.md.<web_application_development>block.devandmain, providing a harness-specific cognitive reinforcement of the existing mechanical branch protections.Acceptance Criteria
.agents/ANTIGRAVITY_RULES.mdcontains the Negative Override.mainanddev.Out of Scope Modifying
AGENTS.mdor any rules applying to Claude Code or Codex.Origin Session ID: c187aeaf-2978-44d3-8d15-3c4c5b542b2e