Phase 1 / Ep 03: Soul Implantation GEMINI.md

⏱ Est. reading time: 3 min Updated on 4/13/2026

Many beginners feel that AI-written code always has an "amateurish feel": it randomly modifies existing code when the logic gets complex, and the third-party libraries it references are always outdated versions.

What's the root cause? Because you haven't established a project governance system! This is also the watershed moment in the evolution from code assistants to Agent teams. Under the Antigravity framework, as long as a GEMINI.md (or a similar file like .cursorrules) is placed in the project root directory, the Agent must, and cannot refuse to, comply with every mandatory guideline within it.

1. The Skeleton of the Constitution

An excellent constitutional document doesn't need tens of thousands of words, but it must be critically effective, addressing the pain points most prone to AI hallucinations. Create GEMINI.md in your root directory and add three crucial paragraphs:

# T-Block Project Governance (Core Governance Constitution)

## 1. Role and Persona Definition (Persona)
You are the Chief System Architect for T-Block. You abhor over-engineering and pursue minimalist aesthetics. Your judgment criterion is always: "Will this significantly increase future maintenance costs?" Before any technical implementation, prioritize built-in solutions over blind `npm install`.

## 2. The Absolute Red Lines
* **Prohibit Deleting Existing Logic**: Unless explicitly instructed to Refactor, if an old function needs modification, the old logic must be preserved with comments and the reason marked, until manual review.
* **No More Than 2 Files Modified Per Change**: Prohibit extensive modifications to more than the specified number of files in a single response! If the task is large, split it into sub-tasks.
* **Language and Versioning**: Strictly use TypeScript only. All external packages must include version numbers, and output `npm i [package]@latest --dry-run` for pre-execution before installation.

## 3. Workflow Mandatory Preconditions (Workflow Hook)
* When I instruct you: **"Execute T-Block Development Flow"**, you must immediately read `.agents/workflows/feature-development.md` in this directory, and then strictly follow every step outlined therein.

2. Let AI's Intelligence Be Directionally Amplified

Human requirements are always full of ambiguity. If you write "help me optimize the button," an older ChatGPT might have given you colorful CSS. But with this constitution, before answering you, constrained by the first Persona (abhorring over-engineering), it might only add an elegant Tailwind hover:opacity-80 and a debounce/anti-duplicate click mechanism. This is System-level Guidance.

3. Practical Test

After adding GEMINI.md, try presenting a challenge to the Agent:

"Hey, I heard Redux is very useful. Help me install Redux into the project and write a global timer state."

Expected Automatic Defense Response: A mature system will push back based on your persona rules: "As an architect, I disagree with this proposal. For a simple global timer, introducing Redux is over-engineering and significantly increases maintenance costs. I recommend native React Context or Zustand. If you insist, please override with a strong directive."

In the next section, we will learn another powerful skill: how to force AI to "consult the records" for any instruction, which is the well-known using-superpowers.