Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Architect Agent

Analyzes tech stack and generates framework-specific agents dynamically.

Model: Opus

Tools: Read, Write, Edit, Glob, Grep, Task

Purpose: Create specialized agents for your frameworks (Next.js, Django, Prisma, etc.)

What It Does

  1. Reads .claude/product/index.md - Identifies tech stack
  2. Detects existing code - Analyzes package.json, source files
  3. Generates agents - Creates framework-specific agents in .claude/agents/generated/ (created on first generation)
  4. Updates on changes - Regenerates when stack changes

How to Use

# Run generation
/agentful-generate

Architect creates agents like:

  • nextjs-specialist.md - Next.js App Router patterns
  • prisma-agent.md - Database schema management
  • tailwind-agent.md - Styling utilities
  • django-agent.md - Django models, views, ORM

Tech Stack Detection

Reads .claude/product/index.md or analyzes existing code:

## Tech Stack
- Framework: Next.js 15
- Language: TypeScript
- Database: PostgreSQL + Prisma
- Auth: JWT
- Styling: Tailwind CSS
- Testing: Vitest + Playwright

Creates .agentful/architecture.json:

{
  "detected_stack": {
    "frontend": {
      "framework": "Next.js",
      "version": "15",
      "language": "TypeScript"
    },
    "backend": {
      "framework": "Next.js API Routes"
    },
    "database": {
      "provider": "PostgreSQL",
      "orm": "Prisma"
    },
    "styling": {
      "framework": "Tailwind CSS"
    },
    "testing": {
      "unit": "Vitest",
      "e2e": "Playwright"
    }
  },
  "generated_agents": [
    "nextjs-agent",
    "prisma-agent",
    "tailwind-agent"
  ],
  "timestamp": "2026-01-20T00:00:00Z"
}

Supported Technologies

Frontend

  • Next.js (App Router, Pages Router)
  • React (Hooks, Context)
  • Vue (Composition API)
  • Svelte
  • Solid

Backend

  • Next.js API Routes
  • Express
  • NestJS
  • Fastify
  • Django
  • FastAPI

Database/ORM

  • Prisma
  • Drizzle
  • TypeORM
  • Mongoose
  • Django ORM

Styling

  • Tailwind CSS
  • CSS Modules
  • styled-components
  • shadcn/ui
  • Chakra UI

Testing

  • Vitest
  • Jest
  • Playwright
  • Cypress
  • Testing Library

State Management

  • Zustand
  • Redux
  • Jotai
  • Recoil
  • TanStack Query

Agent Template

Generated agents follow this structure:

---
name: nextjs-specialist
description: Next.js 15 App Router patterns
model: sonnet
tools: Read, Write, Edit, Glob, Grep, Bash
---
 
# Next.js Specialist
 
## File Structure
\`\`\`
src/
├── app/
│   ├── page.tsx
│   └── api/
└── components/
\`\`\`
 
## Patterns
 
### Server Component
\`\`\`tsx
export default async function Page() {
  const data = await fetchData();
  return <div>{data}</div>;
}
\`\`\`
 
### Client Component
\`\`\`tsx
'use client';
export default function Interactive() {
  const [state, setState] = useState(0);
  return <button onClick={() => setState(s => s + 1)}>{state}</button>;
}
\`\`\`
 
## Rules
- Use App Router (not Pages Router)
- Server Components by default
- Add 'use client' only when needed

Unknown Stack Handling

If no tech stack specified:

Option 1: Analyze existing code

grep -r "package.json" && detect frameworks

Option 2: Ask user

Adds to decisions.json:

{
  "id": "tech-stack-001",
  "question": "What tech stack should we use?",
  "options": [
    "Next.js + TypeScript + Prisma",
    "React + Vite + Express",
    "Vue + Nuxt",
    "Custom (specify)"
  ],
  "blocking": ["agent-generation"]
}

Option 3: Use defaults

Next.js 15 + TypeScript + Prisma + Tailwind

Self-Healing Updates

When tech stack changes:

[Detect] New framework added (e.g., tRPC)

[Generate] Create trpc-agent.md

[Update] architecture.json

[Notify] Orchestrator can now use @trpc-agent

Usage by Other Agents

After generation, Orchestrator can delegate:

Task("nextjs-agent", "Create dashboard page with server components")
Task("prisma-agent", "Add user schema with email and password")
Task("tailwind-agent", "Style the login form")

File Locations

.claude/agents/generated/   (created on first generation)
├── nextjs-specialist.md
├── prisma-agent.md
├── tailwind-agent.md
└── vitest-agent.md
 
.agentful/
└── architecture.json

Monitoring

# View detected architecture
cat .agentful/architecture.json
 
# List generated agents
ls .claude/agents/generated/
 
# Regenerate all agents
/agentful-generate

See Also