Phase 1 / Ep 02: Antigravity Environment Preparation and Boundary Delineation
In the previous episode, we prepared the one-page plan for the T-Block project. At this moment, you might open your terminal and say: "Set up the project with Next.js as required."
Stop. You still need a little more patience. A repository where AI is allowed to freely add, delete, modify, and query in the root directory is a blind box that could explode at any moment.
In true Agentic development, "environment preparation" refers to setting rules for the Agent, delineating from the physical folder level which parts are the system instruction layer and which are the business code layer.
1. Let the Project Become a "Nation"
A regular developer creates a folder. An Agent developer creates a set of "administrative institutions." Enter your project root directory, we need to establish these most basic physical architectures:
/t-block-monorepo
├── .agents/ # <- The "office" for your AI management team
│ ├── workflows/ # Pipeline specifications
│ └── skills/ # AI's advanced skills/skill tree
├── docs/ # Mandatory persistent knowledge area (findings.md, etc., will be placed here)
├── web-client/ # Frontend Next.js code
└── backend-api/ # Backend Nest.js or Prisma code (if separated)
2. Why is Clear Separation Needed?
Disaster Scenario One: If there is no docs/ and no clear scope, large models can very easily, when generating code, due to confused Token context, directly delete configurations originally placed in the root directory, or merge frontend and backend configurations into a tangled mess.
Standardized Convention: Before issuing any creation commands, you must issue an uncrossable administrative directive to the Agent:
"From now on, business code must only be placed under
web-client/. All documentation and reflections regarding the development process can only be stored in the.agents/anddocs/directories."
3. Hands-on: Awaken the System's Underlying Architecture
You don't need to mkdir these contents yourself; this is an excellent first opportunity to "train your Agent."
Feed this sentence to Antigravity/Agent:
"This is a brand new monorepo project. Please create a directory structure named
.agents/workflows/and.agents/skills/in the current root directory. And create adocs/directory. Do not write any business library code, and report back to me after execution."
You see, by having the Agent create these directories itself, the understanding that "this is a project with an autonomous governance layer architecture" has already been planted in its mind. This is far more profound than you manually creating folders and then describing them to it.
In the next section, we will issue the supreme system constitution, GEMINI.md, to this empty office.