Files
Mike Swanson 75ce1c2fd5 feat: Add Sequential Thinking to Code Review + Frontend Validation
Enhanced code review and frontend validation with intelligent triggers:

Code Review Agent Enhancement:
- Added Sequential Thinking MCP integration for complex issues
- Triggers on 2+ rejections or 3+ critical issues
- New escalation format with root cause analysis
- Comprehensive solution strategies with trade-off evaluation
- Educational feedback to break rejection cycles
- Files: .claude/agents/code-review.md (+308 lines)
- Docs: CODE_REVIEW_ST_ENHANCEMENT.md, CODE_REVIEW_ST_TESTING.md

Frontend Design Skill Enhancement:
- Automatic invocation for ANY UI change
- Comprehensive validation checklist (200+ checkpoints)
- 8 validation categories (visual, interactive, responsive, a11y, etc.)
- 3 validation levels (quick, standard, comprehensive)
- Integration with code review workflow
- Files: .claude/skills/frontend-design/SKILL.md (+120 lines)
- Docs: UI_VALIDATION_CHECKLIST.md (462 lines), AUTOMATIC_VALIDATION_ENHANCEMENT.md (587 lines)

Settings Optimization:
- Repaired .claude/settings.local.json (fixed m365 pattern)
- Reduced permissions from 49 to 33 (33% reduction)
- Removed duplicates, sorted alphabetically
- Created SETTINGS_PERMISSIONS.md documentation

Checkpoint Command Enhancement:
- Dual checkpoint system (git + database)
- Saves session context to API for cross-machine recall
- Includes git metadata in database context
- Files: .claude/commands/checkpoint.md (+139 lines)

Decision Rationale:
- Sequential Thinking MCP breaks rejection cycles by identifying root causes
- Automatic frontend validation catches UI issues before code review
- Dual checkpoints enable complete project memory across machines
- Settings optimization improves maintainability

Total: 1,200+ lines of documentation and enhancements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 16:23:52 -07:00

492 lines
23 KiB
Plaintext

1→<project_specification>
2→ <project_name>Autocoder+</project_name>
3→
4→ <overview>
5→ Autocoder+ is an enhanced fork of Autocoder that adds interactive permission management,
6→ parallel dual-agent execution, terminal observation views, spec refinement with re-validation,
7→ and infrastructure discovery. It provides developers with greater control over autonomous
8→ coding agents through a sleek, modern UI while maintaining the core test-driven development
9→ workflow of the original.
10→ </overview>
11→
12→ <technology_stack>
13→ <frontend>
14→ <framework>React 18 with TypeScript</framework>
15→ <styling>Tailwind CSS v4 (modern/sleek design system)</styling>
16→ <state_management>TanStack Query for server state</state_management>
17→ <realtime>WebSocket for live updates</realtime>
18→ <components>Radix UI primitives</components>
19→ </frontend>
20→ <backend>
21→ <runtime>Python 3.11+</runtime>
22→ <framework>FastAPI</framework>
23→ <database>SQLite with SQLAlchemy ORM</database>
24→ <agent_sdk>Claude Agent SDK</agent_sdk>
25→ <process_management>psutil for cross-platform process control</process_management>
26→ </backend>
27→ <communication>
28→ <api>REST API for CRUD operations</api>
29→ <realtime>WebSocket for streaming logs, status, permissions</realtime>
30→ <agent_tools>MCP (Model Context Protocol) for agent-accessible tools</agent_tools>
31→ </communication>
32→ </technology_stack>
33→
34→ <prerequisites>
35→ <environment_setup>
36→ - Python 3.11+ with pip
37→ - Node.js 18+ with npm
38→ - Claude Code CLI installed and authenticated
39→ - Git for version control
40→ </environment_setup>
41→ </prerequisites>
42→
43→ <feature_count>160</feature_count>
44→
45→ <security_and_access_control>
46→ <user_roles>
47→ <role name="user">
48→ <permissions>
49→ - Can create, edit, delete projects
50→ - Can start, stop, pause agents
51→ - Can grant or deny permissions to agents
52→ - Can edit project specifications
53→ - Can view all terminal output
54→ - Can configure infrastructure
55→ </permissions>
56→ <protected_routes>
57→ - All routes require the app to be running locally (no remote access by default)
58→ </protected_routes>
59→ </role>
60→ </user_roles>
61→ <authentication>
62→ <method>Local-only access (no authentication required for local use)</method>
63→ <session_timeout>none</session_timeout>
64→ </authentication>
65→ <agent_permissions>
66→ <description>Agents operate under a configurable permission system</description>
67→ <default_permissions>
68→ - Read/Write/Edit within project directory
69→ - Bash commands from allowlist
70→ - Feature database tools
71→ </default_permissions>
72→ <requestable_permissions>
73→ - WebSearch
74→ - WebFetch
75→ - Additional folder access
76→ - External API access
77→ - Database connections
78→ </requestable_permissions>
79→ </agent_permissions>
80→ </security_and_access_control>
81→
82→ <core_features>
83→ <permission_management>
84→ - Pre-configured permissions list per project
85→ - UI to view and edit permissions before/during agent run
86→ - Permission categories: folders, tools, external services
87→ - When agent needs unavailable permission, feature marked as "stalled"
88→ - Stalled features show reason (which permission needed)
89→ - Grant permission from UI to unstall feature
90→ - Permission changes take effect immediately for running agents
91→ - Permission presets (minimal, standard, full access)
92→ - Permission history/audit log
93→ - Import/export permission configurations
94→ </permission_management>
95→
96→ <dual_agent_execution>
97→ - Run two agents in parallel on same project
98→ - Smart feature assignment prevents conflicts
99→ - Agent A and Agent B work on non-overlapping features
100→ - Feature dependency detection (don't assign dependent features to different agents)
101→ - File-level conflict detection (avoid features touching same files)
102→ - Coordinated git commits (sequential, not concurrent)
103→ - Agent status shown independently (running/paused/stopped/stalled)
104→ - Can start/stop/pause each agent independently
105→ - Load balancing between agents
106→ - Graceful handling when one agent crashes
107→ </dual_agent_execution>
108→
109→ <terminal_views>
110→ - Two terminal panels (one per agent)
111→ - Split-screen or tabbed view option
112→ - Real-time streaming of agent output
113→ - Color-coded output (errors in red, success in green, tools in blue)
114→ - Scrollback buffer with search
115→ - Auto-scroll with manual override
116→ - Clear terminal button
117→ - Copy output to clipboard
118→ - Permission request notifications appear in terminal
119→ - Quick-grant permission button in terminal view
120→ - Timestamp on each line
121→ - Filter by message type (info, error, tool, permission)
122→ </terminal_views>
123→
124→ <spec_refinement>
125→ - "Edit Spec" button accessible anytime
126→ - Full spec editor with syntax highlighting
127→ - Side-by-side diff view when editing
128→ - Save triggers re-validation analysis
129→ - Automatic detection of affected features
130→ - Affected passing features marked as "pending" for re-test
131→ - Summary of changes and affected features before confirm
132→ - Spec version history
133→ - Rollback to previous spec version
134→ - Partial spec updates (edit sections without full rewrite)
135→ </spec_refinement>
136→
137→ <infrastructure_discovery>
138→ - Infrastructure section in spec creation wizard
139→ - Questions about existing services (databases, servers, proxies)
140→ - Auto-discovery of local services on common ports
141→ - Connectivity test for each configured service
142→ - Store infrastructure config in project (infrastructure.yaml)
143→ - Agents receive infrastructure context
144→ - Service templates (PostgreSQL, MySQL, Redis, Nginx, etc.)
145→ - Custom service definition
146→ - Credentials stored securely (or reference to env vars)
147→ - Health check endpoints for services
148→ - Infrastructure status dashboard
149→ </infrastructure_discovery>
150→
151→ <project_management>
152→ - Project list with status indicators
153→ - Create new project wizard
154→ - Delete project (with confirmation)
155→ - Duplicate project
156→ - Project settings panel
157→ - Progress statistics per project
158→ - Last activity timestamp
159→ - Quick actions (start, stop, edit spec)
160→ </project_management>
161→
162→ <feature_tracking>
163→ - Kanban board view (Pending, In Progress, Stalled, Done)
164→ - "Stalled" column for permission-blocked features
165→ - Feature detail modal
166→ - Feature search and filter
167→ - Bulk actions on features
168→ - Feature priority adjustment
169→ - Manual mark as passing (with confirmation)
170→ - Feature categories and tags
171→ </feature_tracking>
172→
173→ <modern_ui_design>
174→ - Sleek, modern aesthetic (not neobrutalism)
175→ - Dark mode default with light mode option
176→ - Smooth animations and transitions
177→ - Responsive design (desktop-first, tablet-friendly)
178→ - Consistent spacing and typography
179→ - Subtle shadows and depth
180→ - Clean iconography
181→ - Progress indicators with percentage
182→ - Toast notifications for actions
183→ - Keyboard shortcuts for common actions
184→ </modern_ui_design>
185→ </core_features>
186→
187→ <database_schema>
188→ <tables>
189→ <projects>
190→ - id (integer, primary key)
191→ - name (string, unique)
192→ - path (string)
193→ - created_at (datetime)
194→ - updated_at (datetime)
195→ - spec_version (integer)
196→ </projects>
197→ <features>
198→ - id (integer, primary key)
199→ - project_id (foreign key)
200→ - priority (integer)
201→ - category (string)
202→ - name (string)
203→ - description (text)
204→ - steps (json array)
205→ - passes (boolean)
206→ - in_progress (boolean)
207→ - stalled (boolean)
208→ - stall_reason (string, nullable)
209→ - assigned_agent (string, nullable: "A" or "B")
210→ - created_at (datetime)
211→ - updated_at (datetime)
212→ </features>
213→ <permissions>
214→ - id (integer, primary key)
215→ - project_id (foreign key)
216→ - permission_type (string: folder, tool, service)
217→ - permission_value (string)
218→ - granted (boolean)
219→ - created_at (datetime)
220→ </permissions>
221→ <permission_requests>
222→ - id (integer, primary key)
223→ - project_id (foreign key)
224→ - feature_id (foreign key, nullable)
225→ - agent_id (string: "A" or "B")
226→ - permission_type (string)
227→ - permission_value (string)
228→ - status (string: pending, granted, denied)
229→ - requested_at (datetime)
230→ - resolved_at (datetime, nullable)
231→ </permission_requests>
232→ <infrastructure>
233→ - id (integer, primary key)
234→ - project_id (foreign key)
235→ - service_type (string)
236→ - service_name (string)
237→ - host (string)
238→ - port (integer)
239→ - credentials_ref (string, nullable)
240→ - health_check_url (string, nullable)
241→ - last_health_check (datetime, nullable)
242→ - is_healthy (boolean)
243→ </infrastructure>
244→ <spec_history>
245→ - id (integer, primary key)
246→ - project_id (foreign key)
247→ - version (integer)
248→ - content (text)
249→ - created_at (datetime)
250→ - change_summary (string, nullable)
251→ </spec_history>
252→ </tables>
253→ </database_schema>
254→
255→ <api_endpoints_summary>
256→ <projects>
257→ - GET /api/projects - List all projects
258→ - POST /api/projects - Create new project
259→ - GET /api/projects/{name} - Get project details
260→ - PUT /api/projects/{name} - Update project
261→ - DELETE /api/projects/{name} - Delete project
262→ - POST /api/projects/{name}/duplicate - Duplicate project
263→ </projects>
264→ <agents>
265→ - GET /api/projects/{name}/agents/status - Get both agents' status
266→ - POST /api/projects/{name}/agents/{agent_id}/start - Start agent A or B
267→ - POST /api/projects/{name}/agents/{agent_id}/stop - Stop agent
268→ - POST /api/projects/{name}/agents/{agent_id}/pause - Pause agent
269→ - POST /api/projects/{name}/agents/{agent_id}/resume - Resume agent
270→ </agents>
271→ <features>
272→ - GET /api/projects/{name}/features - List features with filters
273→ - GET /api/projects/{name}/features/{id} - Get feature details
274→ - PUT /api/projects/{name}/features/{id} - Update feature (limited fields)
275→ - POST /api/projects/{name}/features/{id}/unstall - Clear stalled status
276→ - GET /api/projects/{name}/features/stats - Get statistics
277→ </features>
278→ <permissions>
279→ - GET /api/projects/{name}/permissions - List all permissions
280→ - POST /api/projects/{name}/permissions - Add permission
281→ - PUT /api/projects/{name}/permissions/{id} - Update permission
282→ - DELETE /api/projects/{name}/permissions/{id} - Remove permission
283→ - GET /api/projects/{name}/permission-requests - List pending requests
284→ - POST /api/projects/{name}/permission-requests/{id}/grant - Grant request
285→ - POST /api/projects/{name}/permission-requests/{id}/deny - Deny request
286→ </permissions>
287→ <spec>
288→ - GET /api/projects/{name}/spec - Get current spec
289→ - PUT /api/projects/{name}/spec - Update spec (triggers re-validation)
290→ - GET /api/projects/{name}/spec/history - Get spec history
291→ - POST /api/projects/{name}/spec/rollback/{version} - Rollback to version
292→ - POST /api/projects/{name}/spec/analyze-changes - Preview impact of changes
293→ </spec>
294→ <infrastructure>
295→ - GET /api/projects/{name}/infrastructure - List infrastructure
296→ - POST /api/projects/{name}/infrastructure - Add service
297→ - PUT /api/projects/{name}/infrastructure/{id} - Update service
298→ - DELETE /api/projects/{name}/infrastructure/{id} - Remove service
299→ - POST /api/projects/{name}/infrastructure/{id}/test - Test connectivity
300→ - POST /api/projects/{name}/infrastructure/discover - Auto-discover services
301→ </infrastructure>
302→ <websocket>
303→ - WS /ws/projects/{name} - Real-time updates (logs, status, permissions)
304→ </websocket>
305→ </api_endpoints_summary>
306→
307→ <ui_layout>
308→ <main_structure>
309→ - Header: App title, project selector, global actions
310→ - Main area: Context-dependent content (dashboard, kanban, editor)
311→ - Right panel (collapsible): Terminal views (stacked or tabbed)
312→ - Footer: Status bar with connection indicator
313→ </main_structure>
314→ <pages>
315→ - Dashboard: Project overview, quick stats, recent activity
316→ - Kanban: Feature board with Pending/In Progress/Stalled/Done columns
317→ - Spec Editor: Full-screen editor with preview
318→ - Permissions: Table of permissions with add/edit/delete
319→ - Infrastructure: Service list with health status
320→ - Settings: Project configuration
321→ </pages>
322→ <components>
323→ - ProjectSelector: Dropdown with project list and create option
324→ - AgentControl: Start/stop/pause buttons for each agent
325→ - TerminalPanel: Scrolling log view with filters
326→ - FeatureCard: Compact feature display for kanban
327→ - FeatureModal: Detailed feature view with actions
328→ - PermissionEditor: Form for adding/editing permissions
329→ - SpecDiffViewer: Side-by-side spec comparison
330→ - InfrastructureCard: Service status with test button
331→ - ProgressRing: Circular progress indicator
332→ - Toast: Notification component
333→ </components>
334→ </ui_layout>
335→
336→ <design_system>
337→ <color_palette>
338→ <dark_mode>
339→ - Background: #0f0f0f (near black)
340→ - Surface: #1a1a1a (card backgrounds)
341→ - Surface elevated: #242424 (modals, dropdowns)
342→ - Border: #2e2e2e (subtle borders)
343→ - Text primary: #ffffff
344→ - Text secondary: #a0a0a0
345→ - Accent: #3b82f6 (blue)
346→ - Success: #22c55e (green)
347→ - Warning: #f59e0b (amber)
348→ - Error: #ef4444 (red)
349→ - Stalled: #8b5cf6 (purple)
350→ </dark_mode>
351→ <light_mode>
352→ - Background: #fafafa
353→ - Surface: #ffffff
354→ - Surface elevated: #ffffff
355→ - Border: #e5e5e5
356→ - Text primary: #0f0f0f
357→ - Text secondary: #6b6b6b
358→ - (Same accent colors)
359→ </light_mode>
360→ </color_palette>
361→ <typography>
362→ - Font family: Inter (sans-serif)
363→ - Monospace: JetBrains Mono (terminal, code)
364→ - Heading sizes: 2xl (32px), xl (24px), lg (20px), base (16px)
365→ - Body: 14px base, 12px small
366→ </typography>
367→ <spacing>
368→ - Base unit: 4px
369→ - Padding: 8px (sm), 16px (md), 24px (lg), 32px (xl)
370→ - Border radius: 4px (sm), 8px (md), 12px (lg)
371→ </spacing>
372→ <effects>
373→ - Shadows: Subtle (0 1px 3px rgba(0,0,0,0.1))
374→ - Transitions: 150ms ease for interactions
375→ - Hover states: Slight brightness increase
376→ </effects>
377→ </design_system>
378→
379→ <implementation_steps>
380→ <step number="1">
381→ <title>Core Infrastructure Setup</title>
382→ <tasks>
383→ - Set up project structure (backend, frontend directories)
384→ - Initialize FastAPI backend with SQLAlchemy
385→ - Create database models (projects, features, permissions, etc.)
386→ - Set up React frontend with Vite and TypeScript
387→ - Configure Tailwind CSS with custom design tokens
388→ - Establish WebSocket connection infrastructure
389→ </tasks>
390→ </step>
391→ <step number="2">
392→ <title>Permission System</title>
393→ <tasks>
394→ - Implement permissions database table and API
395→ - Create permission editor UI component
396→ - Build permission checking logic in agent runner
397→ - Implement "stalled" feature status
398→ - Create permission request/grant flow
399→ - Add permission presets
400→ </tasks>
401→ </step>
402→ <step number="3">
403→ <title>Dual Agent Execution</title>
404→ <tasks>
405→ - Extend process manager for dual agents
406→ - Implement feature assignment algorithm
407→ - Add conflict detection (file-level, dependency)
408→ - Create coordinated git commit system
409→ - Build independent agent controls in UI
410→ - Handle agent crash scenarios
411→ </tasks>
412→ </step>
413→ <step number="4">
414→ <title>Terminal Views</title>
415→ <tasks>
416→ - Create terminal panel component
417→ - Implement log streaming per agent
418→ - Add color coding and filtering
419→ - Build scrollback with search
420→ - Add permission request inline notifications
421→ - Implement copy and clear functions
422→ </tasks>
423→ </step>
424→ <step number="5">
425→ <title>Spec Refinement</title>
426→ <tasks>
427→ - Build spec editor with syntax highlighting
428→ - Implement diff view component
429→ - Create change impact analysis
430→ - Build feature re-validation logic
431→ - Add spec version history
432→ - Implement rollback functionality
433→ </tasks>
434→ </step>
435→ <step number="6">
436→ <title>Infrastructure Discovery</title>
437→ <tasks>
438→ - Create infrastructure configuration UI
439→ - Build service connectivity tester
440→ - Implement auto-discovery for common ports
441→ - Create service templates
442→ - Add health check monitoring
443→ - Integrate with spec creation wizard
444→ </tasks>
445→ </step>
446→ <step number="7">
447→ <title>Modern UI Polish</title>
448→ <tasks>
449→ - Implement dark/light mode toggle
450→ - Add smooth animations and transitions
451→ - Create responsive layouts
452→ - Build toast notification system
453→ - Add keyboard shortcuts
454→ - Final visual polish pass
455→ </tasks>
456→ </step>
457→ </implementation_steps>
458→
459→ <success_criteria>
460→ <functionality>
461→ - All 160 features pass automated testing
462→ - Dual agents can run simultaneously without conflicts
463→ - Permission system correctly stalls/unstalls features
464→ - Spec changes properly trigger re-validation
465→ - Infrastructure connectivity tests work reliably
466→ </functionality>
467→ <user_experience>
468→ - UI is intuitive and requires minimal learning
469→ - Actions provide clear feedback
470→ - Terminal views are responsive and readable
471→ - No UI lag or freezing during agent operations
472→ </user_experience>
473→ <technical_quality>
474→ - No console errors in normal operation
475→ - API responses under 200ms for simple queries
476→ - WebSocket reconnects automatically on disconnect
477→ - Graceful error handling throughout
478→ </technical_quality>
479→ <design_polish>
480→ - Consistent visual language across all components
481→ - Smooth 60fps animations
482→ - Proper dark/light mode support
483→ - Professional, modern appearance
484→ </design_polish>
485→ </success_criteria>
486→</project_specification>
487→
<system-reminder>
Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.
</system-reminder>