← Back to Blog
aiengineeringagentsweb-dev

Building My Personal Website With AI — How I Used Architecture Files to Guide Agents

February 27, 2026 · 4 min read

Most people prompt AI wrong. They open ChatGPT, type "build me a navbar," and wonder why the output looks like every other navbar on the internet. The problem isn't the AI — it's the complete lack of context. AI agents perform dramatically better when you give them structured context upfront, not vague instructions in the moment.

I built this entire site using AI agents, but I didn't do it by throwing prompts at a chat window. I created three markdown files — ARCHITECTURE.md, CONTEXT.md, and AGENTS.md — that serve as standing orders for every agent interaction. The difference in output quality is night and day.

ARCHITECTURE.md: The Technical Blueprint

ARCHITECTURE.md defines the stack, page routes, folder structure, and key patterns. It prevents the AI from making assumptions about technology choices. Without it, you get chaos.

Here's what goes wrong: you ask an AI to build a blog page, and it assumes you're using the Pages Router because that's what most Next.js tutorials use. But you're on App Router. Now you have incompatible code. Or it imports a library you're not using. Or it structures files in a way that breaks your build pipeline.

ARCHITECTURE.md eliminates that entire class of errors. Mine specifies Next.js 14 App Router, TypeScript strict mode, Tailwind for styling, MDX for blog posts, and the exact folder structure under src/. Every agent reads it first, so every agent generates code that fits the existing architecture.

CONTEXT.md: The Identity Layer

CONTEXT.md defines who the site is for, what the mission is, tone and style, and privacy rules. It's the difference between a generic portfolio template and something that feels unmistakably like one specific person.

I defined the Tron-inspired aesthetic in CONTEXT.md once — deep black backgrounds, glowing yellow geometric lines, extreme negative space, mechanical animations. I specified that yellow isn't just an accent color, it's a brand identity marker. Every page the AI built after that was visually consistent, because every agent knew the rules.

Without CONTEXT.md, you end up repeating yourself in every prompt. "Make it dark mode. Use yellow. No, not that yellow, the brand yellow. Make the animation sharp, not bouncy." With CONTEXT.md, you write it once, and it applies to every component, every page, every interaction.

AGENTS.md: Role-Specific Instructions

AGENTS.md is the root file with standing orders every agent follows — things like "always use TypeScript," "mobile-first responsive design," "run npm run build before marking any task done." Then I have subfolders for role-specific agents: ui_engineer, content_manager, devops_engineer.

Each agent file defines responsibilities and boundaries. The UI Engineer builds components and handles animations. The Content Manager writes blog posts and manages MDX files. The DevOps Engineer owns next.config.ts and deployment. Separating concerns by agent role mirrors how a real engineering team works — each agent stays in its lane, and there's no overlap or confusion about who owns what.

The Prompt Structure That Actually Works

Here's the difference between a vague prompt and an anchored prompt:

Vague: "Build me a navbar"

Anchored: "Before doing anything, read ARCHITECTURE.md, CONTEXT.md, AGENTS.md, and agents/ui_engineer/AGENTS.md in that exact order. You are acting as the ui_engineer agent. Build the Navbar component per the design system specifications."

The anchored prompt forces the AI to load context first, assume a role, and follow established patterns. The output isn't generic — it's consistent with everything else in the project.

Why This Scales

This approach works for small personal sites and large multi-engineer projects. The investment in context upfront — writing ARCHITECTURE.md, CONTEXT.md, and AGENTS.md — pays off on every single prompt that follows.

You're not teaching the AI the same things over and over. You're not fixing inconsistencies between components built in different sessions. You're not rewriting code because the AI guessed wrong about your stack.

You write the rules once. Every agent follows them. The output is consistent, on-brand, and correct.

If you're building anything with AI — a side project, a startup MVP, internal tooling — start with the architecture files. Define the context. Separate the roles. Then prompt with precision.

The AI will meet you where you set the bar.