← Back to Blog
aiengineeringagentsweb-dev

Building My Personal Website With AI: Using Architecture Files to Guide Agents

February 27, 2026 · 4 min read

Most people prompt AI wrong. They open a conversational chat interface, type "build me a navbar," and wonder why the result looks like every standard starter template on the internet. The problem is rarely the AI model itself; it is the complete absence of architectural context. Autonomous code agents generate accurate solutions only when provided with structured constraints upfront rather than reactive conversational instructions.

I built this site utilizing autonomous coding agents without resorting to unstructured ad-hoc prompts in a terminal window. Instead, I established three foundational markdown files (ARCHITECTURE.md, CONTEXT.md, and AGENTS.md) that function as strict operational constraints across every agent invocation. The improvement in generated code reliability is immediate and repeatable.

ARCHITECTURE.md: The Technical Blueprint

ARCHITECTURE.md defines the runtime stack, routing design, directory patterns, and framework dependencies. It forbids the agent from guessing technical standards or hallucinating obsolete packages.

When an unguided agent creates a new page component in a modern Next.js repository, it typically infers legacy Pages Router semantics simply because historical tutorials dominate its training corpus. Introducing incompatible routing abstractions instantly breaks your compiler pipelines and pollutes the codebase with conflicting design patterns.

An exhaustive architecture document removes this error class entirely. My file explicitly declares Next.js 14 App Router rules, strict TypeScript validation checks, utility-first Tailwind CSS styling, MDX content compilation, and precise directory hierarchies inside src/. Forcing every agent to digest this structural spec before producing edits guarantees adherence to established engineering conventions.

CONTEXT.md: The Identity Layer

CONTEXT.md articulates project ownership, design goals, functional voice, and absolute user safety constraints. It bridges the gap between boilerplate template components and an intentional design system that reflects a definitive personal aesthetic.

I codified our high-contrast visual standards in CONTEXT.md once: deep black zinc backgrounds, sharp yellow geometric accents, deliberate negative space, and calculated Framer Motion animation timings. I instructed the system that our primary accent hue operates as a structural hierarchy indicator rather than arbitrary decorative decoration. Because every subsequent subagent ingested these identity rules, complex interface modules converged on a unified visual standard automatically.

Without an persistent identity document, developer productivity stalls on redundant style prompts: "Use dark zinc backgrounds. Apply our brand yellow hue. Ensure motion curves feel sharp and intentional rather than playful or bouncy." By maintaining CONTEXT.md, design system standards propagate cleanly into every button, modal dialog, and responsive layout without repetitive coaching.

AGENTS.md: Role-Specific Instructions

AGENTS.md functions as the repository root configuration containing mandatory operating procedures, including strict TypeScript enforcement, mobile-first responsive verification, and running full compilation checks (npm run build) prior to reporting task completion. To divide engineering responsibilities, I dedicated subdirectories for isolated role specialists: ui_engineer, content_manager, and devops_engineer.

Each specialist ruleset establishes exact functional jurisdictions and operational boundaries. The UI Engineer authors frontend DOM layouts and interface animation controllers. The Content Manager curates MDX blog files, copywriting tone, and portfolio case studies. The DevOps Engineer governs Vercel deployment hooks and runtime configurations within next.config.ts. Splitting execution boundaries by specialized persona emulates professional software organization practices, preventing overlapping scope or unauthorized refactoring in adjacent subsystems.

The Prompt Structure That Works

Compare the variance in code precision between an unstructured command and a fully anchored prompt invocation:

Unstructured: "Build me a navbar"

Anchored: "Before taking action or writing code, review ARCHITECTURE.md, CONTEXT.md, AGENTS.md, and agents/ui_engineer/AGENTS.md in that exact sequence. Assume the explicit role of the ui_engineer agent. Author the main Navbar navigation module strictly adhering to design system layout requirements."

An anchored prompt mandates deterministic pre-read steps, configures behavioral guardrails, and confines execution to established architectural boundaries. The delivered component avoids conversational assumptions and slides directly into existing structural pipelines.

Why This Architecture Scales

Structured specification layers prove equally effective across solo portfolio repositories and scalable multi-developer engineering initiatives. The upfront time investment spent drafting ARCHITECTURE.md, CONTEXT.md, and AGENTS.md pays off during every subsequent task deployment.

You no longer waste cycle time reteaching code interpreters basic repository syntax. You eliminate manual refactoring passes previously needed to reconcile conflicting state mechanics across disparate coding sessions, and you stop debugging broken dependencies caused by incorrect framework assumptions.

You define precise operational boundaries once, and autonomous agents abide by them across all iterations. If you are building software utilizing AI tools, whether prototyping a startup service or scripting automation utilities, construct your architectural specification layers first. Separate functional roles cleanly, provide unambiguous identity constraints, and initiate task instructions with structural precision.