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 listgives 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
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
Agent Workflows
Feature Development
AI agents can build complete features by following patterns:
- Schema definition - Define tables in
src/database/schema-public.ts - Zero integration - Queries and mutations in
src/data/ - UI components - Following Tamagui patterns in
src/features/ - 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
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
Verify Changes
Always run checks after agent modifications:
Terminal
Iterative Refinement
Work incrementally:
- Ask for the plan - Before code changes
- Review the approach - Verify it matches patterns
- Implement in steps - One file or feature at a time
- 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()notconsole.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:
- Define in
schema-public.ts - Generate migration with
bun migrate - Create queries in
src/data/queries/ - 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
- Agent Guidelines
- Takeout CLI - Command reference
- Contributing
Edit this page on GitHub.