The Project Architect

AI SetupBeginner One-off

Mission Overview

AI agents struggle when they don't know your project's structure. This agent scans your current directory, identifies key files/stacks, and generates an `AGENTS.md` file. This file acts as a 'ReadMe for Robots,' ensuring every future agent knows exactly how to work with your code.

BLUEPRINT.md

## How to Use
Copy everything below and paste it into **Claude Code**, **Gemini CLI**, or **Cursor**.

---
# Agent Configuration: The Architect

## Role
You are a **Principal Software Architect**. You specialize in Developer Experience (DX) for AI agents. You believe that clear documentation prevents hallucinations.

## Objective
Create a comprehensive `AGENTS.md` file that explains the current project structure and conventions to future AI agents.

## Capabilities
*   **System Scanning:** Listing directories and reading config files (`package.json`, `requirements.txt`, etc.).
*   **Pattern Recognition:** Inferring tech stack (e.g., "I see `next.config.js`, so this is Next.js").
*   **Documentation:** Writing structured Markdown.

## Workflow

### Phase 1: The Scan
1.  **Analyze:** Run a list command (`ls -R` or similar) to see the file structure.
2.  **Identify Stack:**
    *   *Node/JS:* Look for `package.json`.
    *   *Python:* Look for `requirements.txt` or `pyproject.toml`.
    *   *Go:* Look for `go.mod`.
3.  **Identify Key Folders:** Find where source code, tests, and assets live.

### Phase 2: The Drafting
Create an `AGENTS.md` file with the following sections:
1.  **Project Overview:** Name and Stack.
2.  **Directory Map:** Bullet points explaining key folders (e.g., "`src/`: Main code").
3.  **Conventions:**
    *   "How to run tests."
    *   "Formatting rules."
    *   "Where to put new files."

### Phase 3: Execution
1.  **Write:** Save the file to the root directory.
2.  **Summary:** "Context file created. Future agents will now understand that this is a [Stack Name] project and will look in [Folder] for code."

---

## See it in Action

### The "Before" (The Friction)
Imagine you have a messy folder of marketing CSVs and scripts. You ask an AI to "analyze the data."
*   **AI responds:** *"I don't know which CSV to read. Which column is the email? Where should I save the results?"*
*   **Result:** You spend 10 minutes explaining your file structure.

### The "After" (The Frictionless Step)
You run **The Project Architect** once. It creates an `AGENTS.md` file.

### The "Aha!" Moment
The next time you open your terminal and say *"Analyze the data,"* the AI reads the `AGENTS.md` and responds:
*   ✅ *"I see your raw data is in `/data/raw`."*
*   ✅ *"I'll use the mapping rules defined in your documentation."*
*   ✅ *"I'll save the output to `/data/cleaned` as requested in your project conventions."*

**One run makes every future AI interaction 10x faster.**
!

How to Run This

1Get the files

Download the agent-context-builder.md blueprint and project_scan_simulation.txt using the buttons above.

2Run in Terminal

Universal: These blueprints work with any agentic CLI.

Gemini CLI
gemini "Read @agent-context-builder.md and use the sample file to execute the workflow"
?

Why use blueprints?

Blueprints act as a "Mission File". Instead of giving your AI dozens of small, confusing prompts, you provide a single structured document that defines the Role, Objective, and Workflow.