Commit Graph

166 Commits

Author SHA1 Message Date
Quenos
3c97051122 fix: make boolean fields resilient to NULL values
Problem: Features with NULL values in passes/in_progress fields caused
Pydantic validation errors in the API.

Solution - defense in depth:
1. Database model: Add nullable=False to passes and in_progress columns
2. Migration: Auto-fix existing NULL values to False on database connect
3. API layer: Handle NULL gracefully in feature_to_response (treat as False)
4. MCP server: Explicitly set in_progress=False when creating features

This ensures:
- New databases cannot have NULL boolean fields
- Existing databases are auto-migrated on connect
- Even if NULL values exist, they're handled gracefully at runtime

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:47:46 +01:00
Al Sharma
3d97cbf24b fix: exit agent loop when all features pass
Previously, the autonomous agent would continue running indefinitely
even after all features passed verification. The agent would enter a
verification loop, repeatedly checking 'All features are passing!'
without ever exiting.

This fix detects the completion message from feature_get_next() and
gracefully exits the main loop with a victory banner, preventing
unnecessary API calls and resource consumption.

Fixes infinite loop when project reaches 100% completion.
2026-01-12 14:34:42 -06:00
Auto
07c2010d32 fix: write system prompts to file to avoid Windows command line limit
Changes:
- Write system prompts to CLAUDE.md file instead of passing inline
- Use setting_sources=["project"] to load prompts from file
- Affects spec_chat_session.py and assistant_chat_session.py

Why:
- Windows has ~8191 character command line limit
- System prompts (e.g., create-spec.md at ~19KB) exceeded this limit
- The SDK serializes system_prompt as a CLI argument
- Writing to file and using setting_sources bypasses the limit

This completes the fix for GitHub issue #33 (Windows "Command Line Too Long").
The previous commit removed **os.environ from MCP configs; this commit
addresses the larger system prompt issue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:39:50 +02:00
Auto
9816621e99 Resolve command to long message 2026-01-12 13:39:34 +02:00
Auto
f31ea403ea feat: add GLM/alternative API support via environment variables
Add support for using alternative API endpoints (like Zhipu AI's GLM models)
without affecting the user's global Claude Code settings. Configuration is
done via AutoCoder's .env file.

Changes:
- Add API_ENV_VARS constant and pass through ClaudeAgentOptions.env parameter
  in client.py and all server service files (spec, expand, assistant sessions)
- Add glm_mode to settings API response to indicate when GLM is configured
- Add purple "GLM" badge in UI header when GLM mode is active
- Update setup status to accept GLM credentials as valid authentication
- Update .env.example with GLM configuration documentation
- Update README.md with AutoCoder-scoped GLM setup instructions

Supported environment variables:
- ANTHROPIC_BASE_URL: Custom API endpoint (e.g., https://api.z.ai/api/anthropic)
- ANTHROPIC_AUTH_TOKEN: API authentication token
- API_TIMEOUT_MS: Request timeout in milliseconds
- ANTHROPIC_DEFAULT_SONNET_MODEL: Model override for Sonnet
- ANTHROPIC_DEFAULT_OPUS_MODEL: Model override for Opus
- ANTHROPIC_DEFAULT_HAIKU_MODEL: Model override for Haiku

This approach routes API requests through the alternative endpoint while
keeping all Claude Code features (MCP servers, hooks, permissions) intact.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 12:25:13 +02:00
Auto
a7f8c3aa8d feat: add multiple terminal tabs with rename capability
Add support for multiple terminal instances per project with tabbed
navigation in the debug panel. Each terminal maintains its own PTY
session and WebSocket connection.

Backend changes:
- Add terminal metadata storage (id, name, created_at) per project
- Update terminal_manager.py with create, list, rename, delete functions
- Extend WebSocket endpoint to /api/terminal/ws/{project}/{terminal_id}
- Add REST endpoints for terminal CRUD operations
- Implement deferred PTY start with initial resize message

Frontend changes:
- Create TerminalTabs component with neobrutalism styling
- Support double-click rename and right-click context menu
- Fix terminal switching issues with transform-based hiding
- Use isActiveRef to prevent stale closure bugs in connect()
- Add double requestAnimationFrame for reliable activation timing
- Implement proper dimension validation in fitTerminal()

Other updates:
- Add GLM model configuration documentation to README
- Simplify client.py by removing CLI_COMMAND support
- Update chat session services with consistent patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 11:55:50 +02:00
Auto
c1985eb285 feat: add interactive terminal and dev server management
Add new features for interactive terminal sessions and dev server control:

Terminal Component:
- New Terminal.tsx component using xterm.js for full terminal emulation
- WebSocket-based PTY communication with bidirectional I/O
- Cross-platform support (Windows via winpty, Unix via built-in pty)
- Auto-reconnection with exponential backoff
- Fix duplicate WebSocket connection bug by checking CONNECTING state
- Add manual close flag to prevent auto-reconnect race conditions
- Add project tracking to avoid duplicate connects on initial activation

Dev Server Management:
- New DevServerControl.tsx for starting/stopping dev servers
- DevServerManager service for subprocess management
- WebSocket streaming of dev server output
- Project configuration service for reading package.json scripts

Backend Infrastructure:
- Terminal router with WebSocket endpoint for PTY I/O
- DevServer router for server lifecycle management
- Terminal session manager with callback-based output streaming
- Enhanced WebSocket schemas for terminal and dev server messages

UI Integration:
- New Terminal and Dev Server tabs in the main application
- Updated DebugLogViewer with improved UI and functionality
- Extended useWebSocket hook for terminal message handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:35:36 +02:00
Auto
b1473cdfb9 fix: reset WebSocket state when switching projects
Add state reset at the start of the project change effect in
useWebSocket hook. This clears stale progress data, agent status,
and logs when the user switches to a different project, preventing
display of outdated information from the previous project.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:46:08 +02:00
Auto
aede8f720e fix: decouple project name from folder path in project creation
Remove automatic subfolder creation when creating projects. Users now
select the exact folder they want to use, enabling support for existing
projects without requiring folder names to match project names.

Changes:
- NewProjectModal.tsx: Remove path concatenation that appended project
  name to selected folder. Update instruction text to clarify users
  select THE project folder, not a parent location.
- FolderBrowser.tsx: Add visual indicator "This folder will contain
  all project files" to clarify selection behavior.
- projects.py: Add duplicate path validation to prevent multiple
  projects from registering the same directory. Includes case-insensitive
  path comparison on Windows for proper cross-platform support.

This allows users to:
- Use Auto Coder on existing projects by selecting their folder directly
- Have project names that differ from folder names (name is a registry label)
- Get clear feedback when a path is already registered under another name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:30:34 +02:00
Auto
b18ca80174 fix: hide AssistantFAB during spec creation mode
The Chat AI Assistant button (AssistantFAB) was appearing on top of the
full-screen spec creation chat overlay, causing a visual bug where the
button would overlap with the Send input area.

Changes:
- Add onStepChange callback prop to NewProjectModal to notify parent
  when the modal step changes
- Add onSpecCreatingChange callback prop to ProjectSelector to propagate
  spec creation state up to App.tsx
- Add isSpecCreating state to App.tsx to track when spec creation chat
  is active
- Update AssistantFAB render condition to include !isSpecCreating
- Disable 'A' keyboard shortcut during spec creation mode

The fix propagates the spec creation state through the component
hierarchy: NewProjectModal -> ProjectSelector -> App.tsx, allowing
the FAB to be hidden when step === 'chat' in the new project modal.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 11:01:02 +02:00
Auto
334b655472 feat: move feature action buttons to pending column header
Move the "Add Feature" (+) and "Expand Project" (sparkles) buttons from
the top navigation bar to the Pending column header in the Kanban board.

Changes:
- KanbanColumn: Add optional onAddFeature, onExpandProject, and
  showExpandButton props; render action buttons in column header
- KanbanBoard: Accept and pass action handlers to the Pending column
- App: Remove buttons from header, pass handlers to KanbanBoard

This improves UX by placing feature creation actions contextually near
the pending features they affect. Keyboard shortcuts (N, E) still work.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 20:26:57 +02:00
Auto
117ca89f08 feat: add configurable CLI command and UI improvements
Add support for alternative CLI commands via CLI_COMMAND environment
variable, allowing users to use CLIs other than 'claude' (e.g., 'glm').
This change affects all server services and the main CLI launcher.

Key changes:

- Configurable CLI command via CLI_COMMAND env var (defaults to 'claude')
- Configurable Playwright headless mode via PLAYWRIGHT_HEADLESS env var
- Pin claude-agent-sdk version to <0.2.0 for stability
- Use tail -500 for progress notes to avoid context overflow
- Add project delete functionality with confirmation dialog
- Replace single-line input with resizable textarea in spec chat
- Add coder agent configuration for code implementation tasks
- Ignore issues/ directory in git

Files modified:
- client.py: CLI command and Playwright headless configuration
- server/main.py, server/services/*: CLI command configuration
- start.py: CLI command configuration and error messages
- .env.example: Document new environment variables
- .gitignore: Ignore issues/ directory
- requirements.txt: Pin SDK version
- .claude/templates/*: Use tail -500 for progress notes
- ui/src/components/ProjectSelector.tsx: Add delete button
- ui/src/components/SpecCreationChat.tsx: Auto-resizing textarea
- ui/src/components/ConfirmDialog.tsx: New reusable dialog
- .claude/agents/coder.md: New coder agent configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:19:49 +02:00
Auto
a0f7e72361 fix: consolidate auth error handling and fix start.bat credential check
This commit addresses issues found during review of PRs #12 and #28:

## PR #12 (Auth Error Handling) Fixes

- Create shared auth.py module with centralized AUTH_ERROR_PATTERNS,
  is_auth_error(), and print_auth_error_help() functions
- Fix start.bat to use directory check instead of outdated
  .credentials.json file check (matching start.sh behavior)
- Update process_manager.py to import from shared auth module
- Update start.py to import from shared auth module
- Update documentation comments in autonomous_agent_demo.py and
  client.py to remove references to deprecated .credentials.json

## PR #28 (Feature Management) Improvements

- Add _priority_lock threading lock to feature_mcp.py to prevent
  race conditions when multiple features are created simultaneously
- Apply lock to feature_create, feature_create_bulk, and feature_skip
- Add checkAndSendTimeoutRef cleanup in useAssistantChat.ts to
  prevent memory leaks on component unmount
- Clear currentAssistantMessageRef on response_done

## Code Quality

- All Python files pass ruff linting
- All security tests pass (91/91)
- UI passes ESLint and TypeScript compilation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:19:32 +02:00
Leon van Zyl
cd82a4cf46 Merge pull request #12 from mantarayDigital/fix/start-sh-credentials-check
fix: Comprehensive authentication error handling
2026-01-10 11:29:13 +02:00
Leon van Zyl
7007e2b728 Merge pull request #28 from connor-tyndall/feat/interactive-assistant-feature-management
feat: Enable assistant chat to create and manage features
2026-01-10 11:24:05 +02:00
Auto
f7da9d679a ignore strange nul files on Windows 2026-01-10 11:15:43 +02:00
Auto
d5d81919bf fix: rename test_hook to check_hook to fix pytest fixture error
The test_hook helper function was being incorrectly interpreted by pytest
as a test function due to the 'test_' prefix. Pytest attempted to inject
fixtures for its parameters (command, should_block), causing an error.

Changes:
- Renamed test_hook() to check_hook() in test_security.py
- Updated all call sites (lines 206 and 276)
- Updated docstring to clarify it's a helper function

This fixes the "fixture 'command' not found" error when running pytest.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 11:04:36 +02:00
Leon van Zyl
b633e6d3f4 Merge pull request #35 from coreycauble/master
Fix: Implement reset time parsing for auto-continue when limit is reached #19
2026-01-10 10:58:14 +02:00
Auto
1998de7c50 fix: resolve merge conflicts and clean up expand project feature
Post-merge fixes for PR #36 (expand-project-with-ai):

- Fix syntax error in App.tsx Escape handler (missing `} else`)
- Fix missing closing brace in types.ts FeatureBulkCreateResponse
- Remove unused exception variables flagged by ruff (F841)
- Make nav buttons minimalist: remove text labels, keep icons + shortcuts
  - "Add Feature" → icon + N shortcut, tooltip "Add new feature"
  - "Expand" → icon + E shortcut, tooltip "Expand project with AI"

All checks pass: ruff, security tests, ESLint, TypeScript build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 10:50:28 +02:00
Leon van Zyl
0e7f8c657a Merge pull request #36 from st4rnin3/feature/expand-project-with-ai
feat: Add Expand Project for bulk AI-powered feature creation
2026-01-10 10:22:43 +02:00
Leon van Zyl
56202fa10d Merge branch 'master' into feature/expand-project-with-ai 2026-01-10 10:22:12 +02:00
Auto
cbe3ecd25d fix: resolve CI linting errors for Python and ESLint
Python (ruff F401 - unused imports):
- Remove unused DEFAULT_YOLO_MODE import from server/routers/settings.py
- Remove unused AVAILABLE_MODELS import from server/schemas.py

ESLint (missing config for v9):
- Add ui/eslint.config.js with flat config format for ESLint v9
- Configure TypeScript, React Hooks, and React Refresh plugins
- Fix unnecessary regex escapes in AgentThought.tsx
- Remove unused onComplete from useSpecChat.ts dependency array

Additional:
- Add .claude/commands/check-code.md for local CI verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 10:07:33 +02:00
Auto
dff28c53bf fix: handle cross-platform venv compatibility in WSL
Changes:
- start_ui.sh, start.sh: Check for venv/bin/activate instead of just
  venv/ directory to detect Windows venvs in Linux/WSL
- Auto-recreate venv when incompatible platform structure detected
- Add error handling for venv removal, creation, and activation failures
- Provide actionable error messages with distro-specific instructions
- start_ui.bat: Check for venv\Scripts\activate.bat for consistency
  with start.bat pattern

Fixes issue where users cloning repo in WSL would encounter:
- "venv/bin/activate: No such file or directory"
- "No module named pip" errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 09:51:54 +02:00
Dan Gentry
cdcbd11272 fix: address second round of code review feedback
Backend improvements:
- Create shared validation utility for project name validation
- Add asyncio.Lock to prevent concurrent _query_claude calls
- Fix _create_features_bulk: use flush() for IDs, add rollback on error
- Use unique temp settings file instead of overwriting .claude_settings.json
- Remove exception details from error messages (security)

Frontend improvements:
- Memoize onError callback in ExpandProjectChat for stable dependencies
- Add timeout to start() checkAndSend loop to prevent infinite retries
- Add manuallyDisconnectedRef to prevent reconnection after explicit disconnect
- Clear pending reconnect timeout in disconnect()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 23:57:50 -05:00
Corey Cauble
9c07dd72db Fixed issues requested by coderabbitai
Applied Fixes
More flexible string matching: Changed from response.lower().strip().startswith("limit reached") to "limit reached" in response.lower() to handle cases where the message has prefix text or variations in whitespace.

Improved regex pattern: Updated to r"(?i)\bresets(?:\s+at)?\s+(\d+)(?::(\d+))?\s*(am|pm)\s*\(([^)]+)\)" which now handles:

Optional "at" after "resets" (e.g., "resets at 3pm" or "resets 3pm")
Flexible whitespace around components
Word boundaries to prevent partial matches
Timezone sanitization: Added .strip() to tz_name = match.group(4).strip() to remove any leading/trailing whitespace that could cause ZoneInfo() to fail.

Safety clamp: Added delay_seconds = min(delta.total_seconds(), 24 * 60 * 60) to ensure the delay never exceeds 24 hours, preventing the agent from being stuck waiting for extremely long periods.
2026-01-09 14:35:20 -08:00
Corey Cauble
2b2e28a2c5 Enhance limit reached message for better context and display in the UI 2026-01-09 14:30:34 -08:00
Dan Gentry
75f2bf2a10 fix: address code review feedback from coderabbitai
- Add language specifier to fenced code block in expand-project.md
- Remove detailed exception strings from WebSocket responses (security)
- Make WebSocket "start" message idempotent to avoid session reset
- Fix race condition in bulk feature creation with row-level lock
- Add validation for starting_priority (must be >= 1)
- Fix _query_claude to handle multiple feature blocks and deduplicate
- Add FileReader error handling in ExpandProjectChat
- Fix disconnect() to clear pending reconnect timeout
- Enable sandbox mode and validate CLI path in expand_chat_session
- Clean up temporary settings file on session close

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:16:06 -05:00
Dan Gentry
5f06dcf464 feat: Add "Expand Project" for bulk AI-powered feature creation
Adds the ability to add multiple features to an existing project through
a natural language conversation with Claude, similar to how initial spec
creation works.

Features:
- New "Expand" button in header (keyboard shortcut: E)
- Full-screen chat interface for describing new features
- Claude reads existing app_spec.txt for context
- Features created directly in database after user approval
- Bulk feature creation endpoint for batch operations

New files:
- .claude/commands/expand-project.md - Claude skill for expansion
- server/services/expand_chat_session.py - Chat session service
- server/routers/expand_project.py - WebSocket endpoint
- ui/src/components/ExpandProjectChat.tsx - Chat UI
- ui/src/components/ExpandProjectModal.tsx - Modal wrapper
- ui/src/hooks/useExpandChat.ts - WebSocket hook

Modified:
- Added POST /bulk endpoint to features router
- Added FeatureBulkCreate schemas
- Integrated Expand button and modal in App.tsx

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 15:56:01 -05:00
Corey Cauble
7f436a467b Implement reset time parsing for auto-continue
Added functionality to parse and handle reset time for auto-continue based on agent response when Limit is reached for Claude Code SDK
2026-01-09 12:34:57 -08:00
Connor Tyndall
118f3933d2 fix: Add Field validation constraints to feature_create tool
Match the same validation constraints used in FeatureCreateItem:
- category: min_length=1, max_length=100
- name: min_length=1, max_length=255
- description: min_length=1
- steps: min_length=1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 06:20:50 -06:00
Connor Tyndall
398c9d492f feat: Enable assistant chat to create and manage features
Allow users to interact with the project assistant to create features
through natural conversation. The assistant can now:

- Create single features via `feature_create` tool
- Create multiple features via `feature_create_bulk`
- Skip features to deprioritize them via `feature_skip`

Changes:
- Add `feature_create` MCP tool for single-feature creation
- Update assistant allowed tools to include feature management
- Update system prompt to explain new capabilities
- Enhance UI tool call display with friendly messages

Security: File system access remains read-only. The assistant cannot
modify source code or mark features as passing (requires actual
implementation by the coding agent).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 06:10:43 -06:00
Auto
a195d6de08 YOLO mode effects 2026-01-09 08:08:59 +02:00
mantarayDigital
b2c19b0c4c feat: Add authentication error handling to UI flow
Extend auth error detection to the web UI flow:

server/main.py:
- Fix setup_status() endpoint to check ~/.claude directory instead of
  non-existent .credentials.json file
- Add explanatory comments about Claude CLI credential storage changes

server/services/process_manager.py:
- Add AUTH_ERROR_PATTERNS for detecting auth errors in agent output
- Add is_auth_error() helper function
- Add AUTH_ERROR_HELP message template
- Update _stream_output() to detect auth errors in real-time
- Buffer last 20 lines to catch auth errors on process exit
- Broadcast clear help message to WebSocket clients when auth fails

start_ui.sh:
- Add Claude CLI installation check with helpful guidance
- Add ~/.claude directory check with login reminder
- Non-blocking warnings that don't prevent UI from starting

This ensures users get clear, actionable feedback when authentication
fails, whether using the CLI or the web UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 07:37:04 +02:00
mantarayDigital
780cfd343f feat: Add authentication error handling to start.py
Add detection and helpful messaging for Claude CLI authentication errors
in the Python launcher, complementing the shell script improvements.

Changes:
- Add is_auth_error() helper with regex patterns for common auth errors
- Add print_auth_error_help() for consistent, actionable error messages
- Update run_spec_creation() to capture stderr and detect auth failures
- Update run_agent() to capture stderr and detect auth failures
- Both functions now provide helpful "run claude login" guidance

Error patterns detected:
- "not logged in" / "not authenticated"
- "authentication failed/required/error"
- "login required"
- "please run claude login"
- "unauthorized"
- "invalid token/credential/api key"
- "expired token/session/credential"

This aligns the Python UX with the shell script's non-blocking warning
approach while adding proactive error detection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 07:30:41 +02:00
mantarayDigital
81dbc4bc16 fix: Update start.sh to use correct Claude CLI auth detection
The previous credential check looked for ~/.claude/.credentials.json,
which no longer exists in recent versions of Claude CLI. This caused
the script to incorrectly prompt users to login even when they were
already authenticated.

Changes:
- Remove check for non-existent .credentials.json file
- Check for ~/.claude directory existence instead
- Always remind users about 'claude login' since we can't verify auth
  status without making an API call
- If ~/.claude doesn't exist, pause and warn (but allow continuing)
- Add explanatory comments about the limitation

The new approach is honest about what we can and can't verify:
- We CAN check if the CLI is installed (command -v claude)
- We CAN check if ~/.claude directory exists (CLI has been run)
- We CANNOT verify actual auth status without an API call

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 07:24:31 +02:00
Auto
45ba266f71 feat: Add global settings modal and simplify agent controls
Adds a settings system for global configuration with YOLO mode toggle and
model selection. Simplifies the agent control UI by removing redundant
status indicator and pause functionality.

## Settings System
- New SettingsModal with YOLO mode toggle and model selection
- Settings persisted in SQLite (registry.db) - shared across all projects
- Models fetched from API endpoint (/api/settings/models)
- Single source of truth for models in registry.py - easy to add new models
- Optimistic UI updates with rollback on error

## Agent Control Simplification
- Removed StatusIndicator ("STOPPED"/"RUNNING" label) - redundant
- Removed Pause/Resume buttons - just Start/Stop toggle now
- Start button shows flame icon with fiery gradient when YOLO mode enabled

## Code Review Fixes
- Added focus trap to SettingsModal for accessibility
- Fixed YOLO button color contrast (WCAG AA compliance)
- Added model validation to AgentStartRequest schema
- Added model to AgentStatus response
- Added aria-labels to all icon-only buttons
- Added role="radiogroup" to model selection
- Added loading indicator during settings save
- Added SQLite timeout (30s) and retry logic with exponential backoff
- Added thread-safe database engine initialization
- Added orphaned lock file cleanup on server startup

## Files Changed
- registry.py: Model config, Settings CRUD, SQLite improvements
- server/routers/settings.py: New settings API
- server/schemas.py: Settings schemas with validation
- server/services/process_manager.py: Model param, orphan cleanup
- ui/src/components/SettingsModal.tsx: New modal component
- ui/src/components/AgentControl.tsx: Simplified to Start/Stop only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:29:07 +02:00
Auto
122f03dc21 feat: Add GitHub Actions CI for PR protection
- Add CI workflow with Python (ruff lint, security tests) and UI (ESLint, TypeScript, build) jobs
- Add ruff, mypy, pytest to requirements.txt
- Add pyproject.toml with ruff configuration
- Fix import sorting across Python files (ruff --fix)
- Fix test_security.py expectations to match actual security policy
- Remove invalid 'eof' command from ALLOWED_COMMANDS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 10:35:19 +02:00
Auto
17b7354db8 fix: activate venv in UI launcher scripts
start_ui.sh and start_ui.bat were using system Python directly,
causing ModuleNotFoundError for dotenv. Now they create and activate
the venv before running, matching the pattern in start.sh.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 09:45:54 +02:00
Auto
63731c169f rebrand 2026-01-07 09:28:16 +02:00
Auto
1e20ba9cc9 fix dotenv dependency, also add license agreement 2026-01-06 17:03:35 +02:00
Auto
908754302a feat: Add conversational AI assistant panel for project codebase Q&A
Implement a slide-in chat panel that allows users to ask questions about
their codebase using Claude Opus 4.5 with read-only access to project files.

Backend changes:
- Add SQLAlchemy models for conversation persistence (assistant_database.py)
- Create AssistantChatSession with read-only Claude SDK client
- Add WebSocket endpoint for real-time chat streaming
- Include read-only MCP tools: feature_get_stats, feature_get_next, etc.

Frontend changes:
- Add floating action button (bottom-right) to toggle panel
- Create slide-in panel component (400px width)
- Implement WebSocket hook with reconnection logic
- Add keyboard shortcut 'A' to toggle assistant

Key features:
- Read-only access: Only Read, Glob, Grep, WebFetch, WebSearch tools
- Persistent history: Conversations saved to SQLite per project
- Real-time streaming: Text chunks streamed as Claude generates response
- Tool visibility: Shows when assistant is using tools to explore code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:57:58 +02:00
Auto
88951e454a feat: Grant agent access to WebFetch and WebSearch tools
Add WebFetch and WebSearch to the agent's allowed tools and permissions,
enabling the autonomous coding agent to look up documentation and search
the web when needed during development sessions.

Changes:
- Add WebFetch and WebSearch to BUILTIN_TOOLS list
- Add WebFetch and WebSearch to permissions_list in create_client()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:30:02 +02:00
Auto
81b1b29f24 refactor: Replace JSON registry with SQLite database
Replace the JSON-based project registry with SQLite using SQLAlchemy ORM
for improved reliability, concurrency handling, and simpler code.

Changes:
- registry.py: Complete rewrite from JSON to SQLite storage
  - Remove manual file locking (RegistryLock class with msvcrt/fcntl)
  - Remove atomic write logic (temp file + rename pattern)
  - Remove backup/recovery logic for corrupted JSON
  - Add SQLAlchemy Project model with name, path, created_at columns
  - Add singleton database engine pattern (_get_engine)
  - Add session context manager (_get_session) for transactions
  - Simplify from 493 to 367 lines of code

- CLAUDE.md: Update documentation to reflect new storage

Storage location change:
- Before: Platform-specific paths
  - Windows: %APPDATA%\autonomous-coder\projects.json
  - macOS: ~/Library/Application Support/autonomous-coder/projects.json
  - Linux: ~/.config/autonomous-coder/projects.json
- After: Unified path for all platforms
  - ~/.autocoder/registry.db

Benefits:
- SQLite handles concurrency automatically (no manual locking needed)
- Atomic transactions built-in (no temp file + rename dance)
- Crash-safe by default (no backup/recovery code needed)
- Consistent with existing features.db pattern in api/database.py
- Data persists across app updates (stored in user home, not project)

All public API functions maintain their existing signatures, so no
changes are required in the 7 consumer files (start.py,
autonomous_agent_demo.py, and 5 server routers).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 11:22:51 +02:00
Auto
e8f3b99a42 feat: Add robust fallback mechanisms for spec creation chat
Add multiple escape hatches to prevent users from getting stuck during
spec creation when the WebSocket completion signal fails.

Changes:
- Add "Exit to Project" button always visible in chat header
- Add /exit command detection to immediately exit to project
- Add backend GET /api/spec/status/{project} endpoint to poll status file
- Add getSpecStatus() API function in frontend
- Add status file polling (every 3s) in useSpecChat hook
- Update create-spec.md with status file write instructions

How it works:
1. Happy path: Claude writes .spec_status.json as final step, UI polls
   and detects completion, shows "Continue to Project" button
2. Escape hatch: User can always click "Exit to Project" or type /exit
   to instantly select the project and close modal, then manually start
   the agent from the main UI

This ensures users always have a way forward even if the WebSocket
completion detection fails due to tool call tracking issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 10:54:42 +02:00
Auto
74d3bd9d8b Add shimer effect to claude thinking 2026-01-02 10:26:13 +02:00
Auto
b628aa7051 feat: Add image upload support for Spec Creation chat
Add the ability to attach images (JPEG, PNG) in the Spec Creation chat
interface for Claude to analyze during app specification creation.

Frontend changes:
- Add ImageAttachment interface to types.ts with id, filename, mimeType,
  base64Data, previewUrl, and size fields
- Update ChatMessage interface with optional attachments field
- Update useSpecChat hook to accept and send attachments via WebSocket
- Add file input, drag-drop support, and preview thumbnails to
  SpecCreationChat component with validation (5 MB max, JPEG/PNG only)
- Update ChatMessage component to render image attachments with
  click-to-enlarge functionality

Backend changes:
- Add ImageAttachment Pydantic schema with base64 validation
- Update spec_creation.py WebSocket handler to parse and validate
  image attachments from client messages
- Update spec_chat_session.py to format multimodal content blocks
  for Claude API using async generator pattern

Features:
- Drag-and-drop or click paperclip button to attach images
- Preview thumbnails with remove button before sending
- File type validation (image/jpeg, image/png)
- File size validation (5 MB maximum)
- Images display in chat history
- Click images to view full size
- Cross-platform compatible (Windows, macOS, Linux)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 10:12:04 +02:00
Auto
05607b310a feat: Add YOLO mode for rapid prototyping without browser testing
Add a new YOLO (You Only Live Once) mode that skips all browser testing
and regression tests for faster feature iteration during prototyping.

Changes made:

**Core YOLO Mode Implementation:**
- Add --yolo CLI flag to autonomous_agent_demo.py
- Update agent.py to accept yolo_mode parameter and select appropriate prompt
- Modify client.py to conditionally include Playwright MCP server (excluded in YOLO mode)
- Add coding_prompt_yolo.template.md with static analysis only verification
- Add get_coding_prompt_yolo() to prompts.py

**Server/API Updates:**
- Add AgentStartRequest schema with yolo_mode field
- Update AgentStatus to include yolo_mode
- Modify process_manager.py to pass --yolo flag to subprocess
- Update agent router to accept yolo_mode in start request

**UI Updates:**
- Add YOLO toggle button (lightning bolt icon) in AgentControl
- Show YOLO mode indicator when agent is running in YOLO mode
- Add useAgentStatus hook to track current mode
- Update startAgent API to accept yoloMode parameter
- Add YOLO toggle in SpecCreationChat completion flow

**Spec Creation Improvements:**
- Fix create-spec.md to properly replace [FEATURE_COUNT] placeholder
- Add REQUIRED FEATURE COUNT section to initializer_prompt.template.md
- Fix spec_chat_session.py to create security settings file for Claude SDK
- Delete app_spec.txt before spec creation to allow fresh creation

**Documentation:**
- Add YOLO mode section to CLAUDE.md with usage examples
- Add checkpoint.md slash command for creating detailed commits

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 08:36:58 +02:00
Auto
981d452134 fix skipping rules 2025-12-31 14:15:04 +02:00
Auto
e7fc23a67e add features 2025-12-31 12:35:34 +02:00
Auto
6c99e40408 feat: Add arbitrary directory project storage with registry system
This major update replaces the fixed `generations/` directory with support
for storing projects in any directory on the filesystem. Projects are now
tracked via a cross-platform registry system.

## New Features

### Project Registry (`registry.py`)
- Cross-platform registry storing project name-to-path mappings
- Platform-specific config locations:
  - Windows: %APPDATA%\autonomous-coder\projects.json
  - macOS: ~/Library/Application Support/autonomous-coder/projects.json
  - Linux: ~/.config/autonomous-coder/projects.json
- POSIX path format for cross-platform compatibility
- File locking for concurrent access safety (fcntl/msvcrt)
- Atomic writes via temp file + rename to prevent corruption
- Fixed Windows file locking issue with tempfile.mkstemp()

### Filesystem Browser API (`server/routers/filesystem.py`)
- REST endpoints for browsing directories server-side
- Cross-platform support with blocked system paths:
  - Windows: C:\Windows, Program Files, ProgramData, etc.
  - macOS: /System, /Library, /private, etc.
  - Linux: /etc, /var, /usr, /bin, etc.
- Universal blocked paths: .ssh, .aws, .gnupg, .docker, etc.
- Hidden file detection (Unix dot-prefix + Windows attributes)
- UNC path blocking for security
- Windows drive enumeration via ctypes
- Directory creation with validation
- Added `has_children` field to DirectoryEntry schema

### UI Folder Browser (`ui/src/components/FolderBrowser.tsx`)
- React component for selecting project directories
- Breadcrumb navigation with clickable segments
- Windows drive selector
- New folder creation inline
- Fixed text visibility with explicit color values

## Updated Components

### Server Routers
- `projects.py`: Uses registry instead of fixed generations/ directory
- `agent.py`: Uses registry for project path lookups
- `features.py`: Uses registry for database path resolution
- `spec_creation.py`: Uses registry for WebSocket project resolution

### Process Manager (`server/services/process_manager.py`)
- Fixed sandbox issue: subprocess now uses project_dir as cwd
- This allows the Claude SDK sandbox to access external project directories

### Schemas (`server/schemas.py`)
- Added `has_children` to DirectoryEntry
- Added `in_progress` to ProjectStats
- Added path field to ProjectSummary and ProjectDetail

### UI Components
- `NewProjectModal.tsx`: Multi-step wizard with folder selection
- Added clarifying text about subfolder creation
- Fixed text color visibility issues

### API Client (`ui/src/lib/api.ts`)
- Added filesystem API functions (listDirectory, createDirectory)
- Fixed Windows path splitting for directory creation

### Documentation
- Updated CLAUDE.md with registry system details
- Updated command examples for absolute paths

## Security Improvements
- Blocked `.` and `..` in directory names to prevent traversal
- Added path blocking check in project creation
- UNC path blocking throughout filesystem API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 10:20:07 +02:00