OTFotf

Antigravity

Wire Antigravity to respect your kit's conventions via AGENTS.md.

Antigravity is Google's agent-mode editor. It reads AGENTS.md from the project root on session start. OTF kits ship AGENTS.md at both monorepo root and kit root, layered so universal rules apply everywhere and kit-specific rules apply only inside the kit.

What Antigravity reads

On session start, Antigravity:

  1. Loads AGENTS.md from the cwd
  2. Walks up the directory tree gathering parent AGENTS.md files
  3. Concatenates them into the agent's working context

This matches Claude Code's behavior, which is why OTF kits use the same file structure:

otf-monorepo/
├── AGENTS.md                # universal rules
└── kits/
    └── saas-dashboard/
        └── AGENTS.md        # kit-specific rules (or symlink to CLAUDE.md)

Same content as CLAUDE.md, framed as agent guardrails:

kits/<your-kit>/AGENTS.md
# OTF SaaS Dashboard — agent operating manual

You are working inside the OTF SaaS Dashboard kit. Read this before any file edit.

## Hard rules (do not break)

- Strict TypeScript. No `any`, no untyped `as` casts.
- Tailwind token classes only — `bg-background`, `text-foreground`. Never hardcode hex.
- Functional components. No class components.
- Use the deploy script (`scripts/deploy-railway.sh`); never run `railway up` directly.

## Stack

(same table as CLAUDE.md)

## Patterns to follow

(same examples as CLAUDE.md)

## Where to find context

- Detailed guides: `docs/`
- Lessons learned: `docs/lessons.md` (read before debugging non-trivial issues)
- Active phase: `.todo/phase-N-*/PRD.md` + `todo.md`

Tips for Antigravity-specific behavior

  • Be explicit about hard rules. Antigravity's planner will sometimes override rules if it thinks they're suggestions. Use the word must liberally.

  • List the deploy command. Antigravity often re-deploys after large changes; pointing it at the right script prevents it from inventing one.

  • Note the test command. bun run typecheck or pnpm test — explicitly call it out so the agent runs it after edits.

On this page