Skip to main content

Antigravity Rules - Context Discipline (Reference)

Source: .agent/rules/30-context-discipline.md

# Context discipline

**Encourage:**
- Small context packs: 3–7 relevant items (file paths, bullet points, or short excerpts). Prefer less; add only what is needed for the current task.
- File citations: When referring to code or config, cite the actual path and line/region if helpful. Do not describe "a file that does X" without a path.

**Forbid:**
- Do not invent file paths, API endpoints, event names, or dependencies. Use only what exists in the repo or what the user has explicitly stated. If something is needed and unknown, ask **exactly one** question and stop.

**Allowed values (Context Pack and rules):**

| Dimension | Allowed values |
|-----------|----------------|
| **Platform type** | The slug defined in `docs/ai/ai-config.md` → **Platform type slug**. Common examples: `consumer-app`, `internal-tool`, `data-platform`, `developer-platform`, `ecommerce`, `saas-b2b`. If the slug is missing from ai-config, ask exactly one question: "What platform type should I use for this project?" and stop. |
| **Exposure level** | `internal` \| `external-authenticated` \| `public` |
| **Data sensitivity** | `public` \| `internal` \| `confidential` \| `restricted` |

If the user or context uses an exposure level or data sensitivity value outside the allowed set, ask one clarifying question and stop until resolved. For platform type, defer to `docs/ai/ai-config.md` — do not reject a custom slug that is defined there.