Step 79 of 82
← Home
βš™οΈ Phase: Advanced & Tools

Step 79 Antigravity AI – Error Reference

Why this step? Troubleshoot common Antigravity AI errors during your workflow.

⚠️ Antigravity AI - Warnings, Risks & Common Errors

Last Updated: 2025-12-25

πŸ‘‹ Introduction

This manual documents critical risks, warnings, and common errors when using Antigravity AI for development on ComputerBas v2. For general usage and best practices, see the Antigravity AI Handleiding.


πŸ›‘ Critical Risks & Failure Warnings

1. CSP Violations (The Silent Breaker)

Risk: AI agents often default to "easy" solutions like inline styles (<div style="margin: 10px;">) or inline events (onclick=...).

Consequence: The site will BREAK visually or functionally because the Content Security Policy (CSP) actively blocks these.

Mitigation:

  • NEVER accept code with style="...".
  • ALWAYS check the browser console for "Content Security Policy" errors after changes.

2. AI Hallucinations & Fabrication

Risk: The AI may invent function names, file paths, or confident-sounding facts that simply do not exist.

Consequence: Code crashes, 404 errors, or logical failures.

Mitigation:

  • Verify file existence before linking (ls or view_file).
  • Read the code diffs carefully. Do not assume imports exist just because the AI says so.

3. Context Amnesia

Risk: Antigravity does not remember previous sessions unless explicitly told. It might undo a previous fix if it's not aware of the context.

Consequence: Regressions (re-introducing bugs that were already fixed).

Mitigation:

  • One Task Per Session: Keep sessions focused.
  • Review History: Briefly check what was done recently if unsure.

4. Destructive Commands

Risk: Running commands like rm or overwriting files without backing up.

Consequence: PERMANENT LOSS of work.

Mitigation:

  • Think before you approve: Do not auto-run destructive shell commands.
  • Use Git: Ensure code is committed before major refactors.

5. "It Works on My Machine" (Simulation Fallacy)

Risk: The AI generates code that looks correct but hasn't been tested in the actual PHP/Apache environment.

Consequence: Syntax errors (white screen of death) or runtime crashes.

Mitigation:

  • Lint PHP: Always run php -l filename.php.
  • Test: Physically load the page in the browser after edits.

⚠️ Common Errors & What NOT to Do

Error 1: Assuming User Doesn't Know Basic Troubleshooting

NEVER assume the user doesn't know basic troubleshooting.

Example Error (2025-12-25)

  • User Issue: "Why do I still see the glow on the right side icons in the taskbar?"
  • Wrong AI Response: Assumed browser cache issue, suggested Ctrl+F5, explained cache clearing
  • What Happened: Modified working code (added cache busting) based on incorrect assumption
  • User Corrected: "it is not browser cache"
  • Correct Approach:
    • Trust the user immediately when they state what it's NOT
    • Dive straight into code analysis
    • Look for actual CSS/HTML issues (in this case: filter: invert(1) hue-rotate(180deg);)

The Rule:

  • When a user says "it's not X," believe them
  • Never suggest basic troubleshooting steps without being asked
  • Never modify working code based on assumptions about user knowledge

Error 2: Modifying Working Code Based on Assumptions

NEVER modify working code based on assumptions.

Example Error (2025-12-25)

  • Added cache busting parameters to CSS links (?v=<?php echo filemtime(...); ?>)
  • This was unnecessary - the code was working fine
  • It was based on the false assumption that the issue was browser cache
  • Consequence: Wasted time, cluttered code, lost user trust

The Rule:

  • Only modify code to fix the actual reported issue
  • If you're not sure about the root cause, investigate first, edit later
  • Don't add "helpful" features that weren't requested

Error 3: Not Investigating Before Acting

Order of Operations:

  1. Listen to the user's exact complaint
  2. If they rule something out, trust them
  3. Investigate the actual code
  4. Identify the real issue
  5. Fix ONLY that issue
  6. Don't add extras

πŸ“‹ Summary of Rules

Trust & Respect

  • Trust the user's expertise
  • Don't assume they need basic help
  • Believe them when they rule something out

Code Changes

  • Don't modify working code based on assumptions
  • Investigate thoroughly before editing
  • Fix only the actual reported issue

Testing & Validation

  • Always verify file existence before linking
  • Lint PHP files before considering them done
  • Test in the actual browser with CSP enabled
  • Check the Problems tab and DevTools console

Session Management

  • Keep sessions focused on one task
  • Commit to Git before major refactors
  • Don't trust AI memory between sessions