<project_specification>
  <project_name>Automaker - Autonomous AI Development Studio</project_name>

  <overview>
    Automaker is a sophisticated desktop application that empowers developers to build software autonomously through AI-powered agents. Built with Electron and Next.js, it provides an intelligent GUI for project management, feature tracking via Kanban boards, and autonomous code generation. The application leverages multiple AI models (Claude, GPT) and supports complex workflows including git worktree isolation, testing automation, and multi-model agent execution. It acts as a complete development orchestrator, managing the entire lifecycle from specification to verified implementation.
  </overview>

  <technology_stack>
    <frontend>
      <framework>Next.js 16.0.7 (App Router)</framework>
      <ui_library>shadcn/ui with Radix UI primitives</ui_library>
      <styling>Tailwind CSS 4.0</styling>
      <state_management>Zustand with persistence</state_management>
      <drag_drop>@dnd-kit for Kanban board</drag_drop>
      <icons>Lucide React</icons>
      <query_client>TanStack Query for server state</query_client>
    </frontend>
    <desktop_shell>
      <framework>Electron 39.2.6</framework>
      <language>TypeScript 5.x</language>
      <inter_process_communication>Electron IPC with security sandboxing</inter_process_communication>
      <file_system>Node.js fs/promises with path validation</file_system>
    </desktop_shell>
    <ai_engine>
      <primary_model>Claude 3.5 (Opus, Sonnet, Haiku) via Anthropic Claude Agent SDK</primary_model>
      <secondary_model>GPT-5.1 Codex family via OpenAI CLI</secondary_model>
      <orchestration>Custom Agent Service with streaming responses</orchestration>
      <model_registry>Dynamic model provider system with CLI detection</model_registry>
    </ai_engine>
    <testing>
      <framework>Playwright for E2E testing</framework>
      <unit>Jest/Vitest compatible</unit>
      <integration>Agent-driven test execution and verification</integration>
    </testing>
    <version_control>
      <system>Git with worktree isolation support</system>
      <branching>Feature branch management</branching>
      <workflow>Automated commit and merge capabilities</workflow>
    </version_control>
  </technology_stack>

  <core_capabilities>
    <project_management>
      - Open and manage multiple local projects
      - Project-specific themes and configurations
      - Session management with project context
      - Recently used project cycling (Q/E shortcuts)
      - Project search and type-ahead selection
      - Trash and restore functionality for projects
    </project_management>

    <intelligent_analysis>
      - Auto-generation and updating of app_spec.txt
      - Feature extraction from existing codebases
      - Technology stack detection and documentation
      - Project structure analysis with file tree visualization - "Project Ingestion": Analyzes existing codebases to understand structure
      - Auto-generation of `.automaker/app_spec.txt` based on codebase analysis
      - Auto-generation of features in `.automaker/features/{id}/feature.json`:
        - Scans code for implemented features
        - Creates test cases for existing features
        - Marks existing features as "passes": true automatically
    </intelligent_analysis>

    <kanban_workflow>
      - Visual representation of features from `.automaker/features/` folder
      - Drag-and-drop interface to reprioritize tasks
      - direct editing of feature details (steps, description) from the card
      - Visual Kanban board with drag-and-drop functionality
      - Multiple status columns: Backlog, In Progress, Waiting Approval, Verified
      - Feature cards with detailed information display (3 detail levels)
      - Real-time status updates during agent execution
      - Search and filtering capabilities
      - Category management and autocomplete
      - Image attachment support for feature descriptions
    </kanban_workflow>

    <autonomous_agent_engine>
      - Multi-model agent system with profile-based execution
      - Streaming agent output with real-time logs
      - Git worktree isolation for safe feature development
      - Automatic testing and verification workflows
      - Context-aware prompt generation
      - Agent memory and learning capabilities
      - Concurrent feature processing with configurable limits
      - Follow-up and resume capabilities
    </autonomous_agent_engine>

    <advanced_workflows>
      - Git worktree management for isolated development
      - Feature-specific branching and merging
      - Automated commit generation with file tracking
      - Test-driven development support
      - Code review and approval workflows
      - Revert and rollback capabilities
    </advanced_workflows>

    <user_interface>
      - Dark/Light theme support with 12 custom themes
      - Per-project theme configurations
      - Comprehensive keyboard shortcut system
      - Sidebar navigation with project switching
      - Multi-view architecture (Board, Spec, Agent, Context, Settings)
      - Setup wizard for first-time configuration
      - CLI integration status monitoring
    </user_interface>

    <extensibility>
      - AI Profile system for model/thinking level presets
      - Keyboard shortcut customization
      - Model provider plugin architecture
      - Context file management for agent guidance
      - Feature suggestion generation
      - Spec regeneration workflows
    </extensibility>
  </core_capabilities>

  <ui_layout>
    <window_structure>
      - Sidebar: Project List, Settings, Logs, Plugins
      - Main Content:
        - **Spec View**: Split editor for `.automaker/app_spec.txt`
        - **Board View**: Kanban board for `.automaker/features/` folder
        - **Code View**: Read-only Monaco editor to see what the agent is writing
        - **Agent View**: Chat-like interface showing agent thought process and tool usage. Also used for the "New Project Interview".
    </window_structure>
    <theme>
      - Dark/Light mode support (system sync)
      - "Hacker" aesthetic option (terminal-like)
      - Professional/Clean default
    </theme>
  </ui_layout>

  <development_workflow>
    <local_testing>
      - "Browser Mode": Run the Next.js frontend in a standard browser with mocked Electron IPC for rapid UI iteration.
      - "Electron Mode": Full desktop app testing.
      - Hot Reloading for both Main and Renderer processes.
    </local_testing>
  </development_workflow>

  <implemented_features>
    - Complete Kanban board with drag-and-drop functionality
    - Multi-model AI agent execution (Claude + GPT/Codex)
    - Git worktree isolation for features
    - Real-time agent output streaming and logging
    - Project management with session persistence
    - Theme system with 12 themes + per-project themes
    - Comprehensive settings panel with all configurations
    - Feature image attachment and context system
    - Agent profiles with model/thinking level presets
    - Keyboard shortcut system with customization
    - CLI integration detection (Claude Code + Codex CLI)
    - Auto mode for autonomous feature processing
    - Feature suggestions generation
    - Spec regeneration and project analysis
    - Context file management
    - Chat history and session management
    - File diff viewing and git integration
    - Search and filtering across all features
    - Category management and autocomplete
    - Test automation and verification workflows
  </implemented_features>

  <implementation_roadmap>
    <phase_1_foundation>
      - Enhanced error handling and recovery mechanisms
      - Performance optimization for large projects
      - Improved memory management for long-running sessions
      - Advanced logging and debugging capabilities
    </phase_1_foundation>
    
    <phase_2_core_logic>
      - Plugin system for custom model providers
      - Advanced workflow customization engine
      - Team collaboration features
      - Cloud synchronization capabilities
      - Advanced project templates and scaffolding
    </phase_2_core_logic>

    <phase_3_kanban_and_interaction>
      - Build Kanban board with drag-and-drop
      - Connect Kanban state to `.automaker/features/` filesystem
      - Implement "Run Feature" capability
      - Integrate standard prompts library
    </phase_3_kanban_and_interaction>

    <phase_3_polish>
      - Enhanced accessibility features
      - Advanced theme customization
      - Performance monitoring and analytics
      - Documentation generation automation
      - Integration with external development tools
      - Advanced security auditing and sandboxing
    </phase_3_polish>

    <phase_4_polish>
      - Advanced terminal integration
      - Settings & Extensibility
      - UI refinement
    </phase_4_polish>
  </implementation_roadmap>
</project_specification>