wwwwwwwwwwwwwwwwwww

Agents

AI-powered development with Takeout

Takeout is designed to work seamlessly with AI coding assistants. The stack’s opinionated structure, comprehensive documentation, and CLI tools make it easy for AI agents to understand and modify your codebase.

Why AI-First

Modern development benefits from AI assistance. Takeout embraces this by providing:

  • Structured codebase - Clear conventions make it easy for agents to navigate
  • Built-in docs - bun tko docs list gives agents instant context
  • Type safety - Full TypeScript inference guides correct changes
  • Clear patterns - Consistent code style across features

Agent Setup

Claude Code

Takeout includes a .claude/ directory with agent guidelines:

Terminal

docs/agent.md # Core development guidelines
.claude/settings.local.json # Agent configuration

The agent guidelines cover:

  • Code style and conventions
  • Verification commands
  • Common patterns
  • Environment setup

GitHub Copilot

Works out of the box with TypeScript inference. The strongly-typed schema, queries, and components provide excellent autocomplete context.

Cursor / Aider

Reference the agent docs for context:

Terminal

# Show all available docs
bun tko docs list
# Add specific docs to context
cat docs/agent.md

Agent Workflows

Feature Development

AI agents can build complete features by following patterns:

  1. Schema definition - Define tables in src/database/schema-public.ts
  2. Zero integration - Queries and mutations in src/data/
  3. UI components - Following Tamagui patterns in src/features/
  4. Routes - File-system routes in app/

Example prompt:

Add a “likes” feature: 1. Add a postLike table to the schema 2. Create queries for likes by post 3. Add a like button to PostCard 4. Handle optimistic mutations

Code Review

Ask agents to review changes:

Terminal

# Check all quality standards
bun tko check
# Let agent review specific patterns
git diff | # paste to agent

Documentation

Agents can maintain docs as code evolves:

Update the deployment docs to reflect the new environment variable we added for Redis

Best Practices

Provide Context

Give agents the full picture:

Terminal

# Show available commands
bun tko
# Show docs
bun tko docs list
# Show current branch structure
git log —oneline -10

Verify Changes

Always run checks after agent modifications:

Terminal

# Small changes
bun check:all
# Larger changes
bun run ci —dry-run

Iterative Refinement

Work incrementally:

  1. Ask for the plan - Before code changes
  2. Review the approach - Verify it matches patterns
  3. Implement in steps - One file or feature at a time
  4. Test continuously - Run checks between changes

Agent Guidelines

Takeout includes opinionated guidelines in docs/agent.md:

Approach

  • Explore and plan before making changes
  • Check skills for existing patterns
  • Use sub-tasks for parallel work
  • Prefer strong models for complex tasks

Code Style

  • Use ~ alias for imports
  • Use console.info() not console.log()
  • Write minimal, lowercase comments
  • Prefer named exports in routes

Verification

  • Small changes: bun check:all
  • Large changes: bun run ci —dry-run

Common Tasks

Add a New Page

Add a settings page at /settings with:

  • File: app/(app)/settings/index.tsx
  • Layout: Use PageContainer
  • Auth: Require authentication
  • Nav: Add link in MainHeader

Add a Database Table

Add a “notification” table:

  1. Define in schema-public.ts
  2. Generate migration with bun migrate
  3. Create queries in src/data/queries/
  4. Add to Zero permissions

Fix a Type Error

Fix the TypeScript error in PostCard.tsx:43 where the post.author type doesn’t match the expected User type.

Learn More

Edit this page on GitHub.