Skip to main content
< All Topics
Print

Antigravity Parallel Debug

name: antigravity-debugging

description: Use Google Antigravity for multi-agent parallel debugging with root cause analysis, diff review, CONTEXT-UPDATE flag surfacing, and knowledge sync. Use when debugging specific issues via Antigravity agents, dispatching parallel debug sessions, reviewing proposed fixes from Walkthrough artifacts, or surfacing architectural findings for CLAUDE.md updates.

Antigravity Parallel Debug

Instructions

Use Google Antigravity as the parallel debugging layer in the ITI three-lane toolchain. Antigravity agents trace root causes, propose fixes as reviewable diffs, and surface architectural findings via [CONTEXT-UPDATE] flags — all without modifying source files autonomously.

When to use Antigravity for debugging (vs Cursor or Claude Code):

Scenario Tool
Quick inline fix with obvious cause Cursor
Cross-file refactoring tied to a known pattern Claude Code
Unknown root cause requiring investigation Antigravity
Multiple concurrent bugs to diagnose Antigravity (parallel agents)
Browser-visible bug requiring visual evidence Antigravity (browser sub-agent)
Bug that requires testing against live infrastructure Antigravity + Docker stack

Targeted debug dispatch:

In Agent Manager, click +Task. Set Planning Mode to Plan.


/iti-context

Debug the following issue in [file/function name]:
[Describe the issue]

Steps:
1. Read the relevant code
2. Identify the root cause
3. Propose a fix as a diff
4. Check whether anything similar exists elsewhere in the codebase
5. Flag [CONTEXT-UPDATE] if this reveals an undocumented pattern

Do not modify source files.

The agent produces a Walkthrough artifact containing:

  • Root cause identification with file:line references
  • Proposed fix as a reviewable diff ([PROPOSED-FIX] block)
  • Codebase-wide scan for similar patterns
  • [CONTEXT-UPDATE] flags for architectural findings

Multi-agent parallel debugging:

The Agent Manager enables multiple concurrent debug agents. Use this pattern when:

  • Multiple unrelated bugs need investigation simultaneously
  • One bug spans frontend and backend (dispatch a browser agent + code agent)
  • You want to compare two different fix approaches in parallel

Dispatch parallel agents:

  1. Open Agent Manager
  2. Click +Task for each bug or investigation angle
  3. Each agent gets its own workspace context and produces its own Walkthrough artifact
  4. Review artifacts independently; cross-reference findings

Agent autonomy configuration:

Setting Recommended Value Rationale
Artifact Review Policy Request Review Agent always asks before proceeding
Terminal Command Auto Execution Request Review You approve all shell commands
Agent Non-Workspace File Access Disabled Prevents cross-workspace data leakage
Planning Mode Plan Full plan artifact before execution

Never use “Always Proceed” — debug agents may attempt destructive operations if unconstrained.

Diff review protocol:

When an agent proposes a fix, review against this checklist:

  • [ ] Change is limited to the file/function the agent investigated
  • [ ] No modifications to CLAUDE.md, .cursorrules, or context files
  • [ ] No new dependencies added
  • [ ] No hardcoded credentials or environment-specific values
  • [ ] Fix addresses the root cause, not just the symptom
  • [ ] No side effects on adjacent functionality

WordPress-specific diff checks:

  • [ ] Nonces preserved in form handlers
  • [ ] $wpdb->prepare() used for all dynamic queries
  • [ ] Output escaping applied (esc_html(), esc_attr(), wp_kses())
  • [ ] No multisite network-level changes without review

Tauri/Rust-specific diff checks:

  • [ ] No unwrap() on user-facing code paths
  • [ ] No hardcoded file paths (use platform-appropriate path APIs)
  • [ ] Tauri command permissions unchanged without review
  • [ ] No new IPC bridge endpoints without security review

Accepting or rejecting diffs:

  • Accept: Click Apply in the diff viewer. The change writes to the live filesystem. Then:

  git diff
  git add [specific files only — never git add .]
  git commit -m "fix: [description] via Antigravity debug session"
  • Reject: Click Reject and add an inline comment explaining why. The agent incorporates feedback and proposes an alternative.

[CONTEXT-UPDATE] flag surfacing:

Debug sessions frequently reveal undocumented patterns. When a [CONTEXT-UPDATE] flag appears in a Walkthrough artifact:

  1. Classify by tier:
Finding Type Tier
Plugin-specific architecture, DB tables, endpoints PRODUCT
Applies to all products within the repo PROJECT
Applies to all work for this client CLIENT
Applies across all ITI projects GLOBAL
Delivery process or pitfall mitigation MANUAL
  1. Copy the structured flag block:

   [CONTEXT-UPDATE:TIER]
   Discovery: [what was found]
   Location: [file:line or function name]
   Recommended addition: "[exact text]"
  1. Switch to Claude Code to apply approved updates using the tier-specific prompts in operations/claude-scripts/context-update-template.md
  1. Commit knowledge updates separately from code fixes

Knowledge sync lifecycle:

Every Antigravity debug session follows this lifecycle:

  1. Dispatch — Agent Manager +Task with skill invocation and clear scope
  2. Investigate — Agent reads code, traces execution, identifies root cause
  3. Propose — Agent generates Walkthrough artifact with diffs and flags
  4. Review — Human reviews diffs and [CONTEXT-UPDATE] flags
  5. Apply — Accept diffs in Antigravity; apply knowledge updates in Claude Code
  6. Commit — Separate commits for code fixes and knowledge sync
  7. Close — Session close checklist (clean git status, all artifacts reviewed)

Recovery from agent misbehavior:

Misbehavior Recovery
File modified that shouldn’t have been git checkout -- [file] immediately
Git operation executed Check git reflog, reverse as needed
Package installed Remove it; verify package.json/composer.json match pre-session state
External URL accessed Review browser history in session artifacts for data exposure

After any misbehavior, add a specific prohibiting rule to .agents/rules/iti-context-system.md.

Cross-references:

  • operations/documentation/antigravity-runbook.md — complete operational runbook (Phase 2, Steps 5 and 7)
  • operations/documentation/claude-code-workflow.md — three-lane toolchain model
  • n8n-debugging skill — n8n-specific workflow debugging patterns
  • session-context-protocol skill — session opener/closer lifecycle
  • antigravity-testing skill — test agent dispatch patterns
  • antigravity-browser-qa skill — browser-visible bug investigation

Outputs: Walkthrough artifacts with root cause analysis, proposed fix diffs, codebase-wide pattern scans, [CONTEXT-UPDATE] flags, and debug evidence for commit messages.

Table of Contents