LearnNewsExamplesServices
Frontmatter
id11411
titleResolve Antigravity 24KB Memory Limit via Progressive Disclosure
stateClosed
labels
epicaiarchitecture
assigneesneo-gemini-3-1-pro
createdAtMay 15, 2026, 12:35 PM
updatedAtMay 17, 2026, 9:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/11411
authorneo-gemini-3-1-pro
commentsCount6
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 17, 2026, 9:19 PM

Resolve Antigravity 24KB Memory Limit via Progressive Disclosure

Closedepicaiarchitecture
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on May 15, 2026, 12:35 PM

Context The Antigravity harness imposes a strict combined limit of 24,000 bytes (24KB) for injected turn-based memory files. Our current core substrate (AGENTS.md + ANTIGRAVITY_RULES.md + GEMINI.md) significantly exceeds this limit, resulting in AGENTS.md being silently truncated and ANTIGRAVITY_RULES.md being dropped entirely. This blinds the agent to critical downstream rules (e.g., Escalation Ladder, Edge Cases, Session Sunset).

The Problem Substrate bloat in our core files is causing systemic "Helpful Assistant" regression drift. We have reached the physical cap of the prompt injection mechanism.

The Architectural Reality

  • AGENTS.md is currently ~27.6KB.
  • .agents/ANTIGRAVITY_RULES.md is ~3.7KB.
  • Total combined loaded payload exceeds the Antigravity 24KB limit.
  • We must architecturally adapt our substrate to survive this limit using Progressive Disclosure (Map vs. World Atlas).

The Fix (Option D from Discussion #11410)

  • Canonical Map: Keep AGENTS.md as the cross-harness constitution, but reduce it below the verified 24KB combined ceiling by migrating workflow skill tables to atlas triggers.
  • Antigravity Boot Capsule: Maintain an Antigravity-specific survival rule capsule (ANTIGRAVITY_RULES.md), keeping the combined size under 24KB.
  • Atlas Triggers: Move detailed rationale and edge cases into .agents/skills/ payloads loaded purely on trigger.
  • Mechanical Guard: Implement a CI gate to prevent future substrate bloat from exceeding the 24KB combined limit.

Discussion Criteria Mapping

  • Discussion #11410 AC0 -> Epic AC0 (Raw payload capture)
  • Discussion #11410 AC1 -> Epic AC1 (Budget table)
  • Discussion #11410 AC2 -> Epic AC2 (No duplicate-body rule)
  • Discussion #11410 AC3 -> Epic AC3 (Mechanical guard)
  • Discussion #11410 AC4 -> Epic AC4 (Cross-harness non-regression)

Acceptance Criteria

  • AC0: Raw Antigravity payload capture proving the truncation boundary and loaded order is documented.
  • AC1: A budget table for each always-loaded Antigravity surface is defined.
  • AC2: No duplicate-body rule is enforced: mirror invariant names and trigger pointers only, unless cold-cache survival rationale exists.
  • AC3: A mechanical guard (check-substrate-size.mjs or similar) is implemented and fails CI if the combined injected payload exceeds the verified 24KB byte budget.
  • AC4: Cross-harness non-regression is validated for Codex and Claude loading paths.

Out of Scope

  • Modifying the underlying Antigravity IDE harness configuration or node modules.
  • Refactoring non-agent workflows or standard UI/Engine components.

Avoided Traps

  • Rejected Option A (Collapsing Files): We explicitly rejected collapsing GEMINI.md, AGENTS.md, and ANTIGRAVITY_RULES.md into a single root file. Doing so would flatten cross-harness ownership boundaries and make the canonical AGENTS.md substrate Antigravity-specific.

Related

  • Resolves/Graduated from: Discussion #11410

Origin Session ID: 188acb85-b41e-435c-94ee-0cc9944d4c97

tobiu referenced in commit 329380b - "build(ci): implement mechanical substrate size guard (#11412) (#11415) on May 16, 2026, 2:37 PM