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>
This commit is contained in:
Dan Gentry
2026-01-09 15:56:01 -05:00
parent 122f03dc21
commit 5f06dcf464
13 changed files with 1863 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ from fastapi.staticfiles import StaticFiles
from .routers import (
agent_router,
assistant_chat_router,
expand_project_router,
features_router,
filesystem_router,
projects_router,
@@ -25,6 +26,7 @@ from .routers import (
)
from .schemas import SetupStatus
from .services.assistant_chat_session import cleanup_all_sessions as cleanup_assistant_sessions
from .services.expand_chat_session import cleanup_all_expand_sessions
from .services.process_manager import cleanup_all_managers
from .websocket import project_websocket
@@ -38,9 +40,10 @@ async def lifespan(app: FastAPI):
"""Lifespan context manager for startup and shutdown."""
# Startup
yield
# Shutdown - cleanup all running agents and assistant sessions
# Shutdown - cleanup all running agents and sessions
await cleanup_all_managers()
await cleanup_assistant_sessions()
await cleanup_all_expand_sessions()
# Create FastAPI app
@@ -90,6 +93,7 @@ app.include_router(projects_router)
app.include_router(features_router)
app.include_router(agent_router)
app.include_router(spec_creation_router)
app.include_router(expand_project_router)
app.include_router(filesystem_router)
app.include_router(assistant_chat_router)