Commit graph

86 commits

Author SHA1 Message Date
Brad Groux
b243728f08 feat(US-910): Help context windows + keyboard shortcut fix 2026-01-27 20:50:26 -06:00
Brad Groux
f87fe0f8af feat(US-907): Apply template to existing task 2026-01-27 20:41:20 -06:00
Brad Groux
a81dfecadf docs: expand Sprint 10 with agent comparison, failure alerts, daily digest, budget tracking, velocity 2026-01-27 20:34:42 -06:00
Brad Groux
9c883d0f10 docs: Update sprint-9 status to Complete (8/9 stories)
US-907 (Apply template to existing task) deferred - requires significant TaskDetailPanel changes. All other stories completed successfully.
2026-01-27 20:33:48 -06:00
Brad Groux
a8d8457331 feat(US-907): Apply template to existing task (TODO)
Deferred: Requires significant TaskDetailPanel changes

Implementation plan:
- Add 'Apply Template' button in TaskDetailPanel header
- Create ApplyTemplateDialog component
- Merge strategy: only fill empty fields (non-destructive)
- Option to force-overwrite with confirmation
- Subtasks appended (not replaced)
- Activity log records template application

Technical requirements:
- New API endpoint or client-side merge logic
- Template application with variable interpolation
- Conflict resolution UI for non-empty fields
- Undo/revert capability
2026-01-27 20:33:05 -06:00
Brad Groux
d1fbd39dcb feat(US-909): Enhanced template UI (integrated)
Enhanced template UI features implemented across previous stories:
- Category tabs in CreateTaskDialog template picker (US-904)
- Template cards with category badges and icons (US-904)
- Variable input form with custom variable prompts (US-903)
- Blueprint preview showing task list and dependencies (US-905)
- Responsive template selector with filtering

Future enhancements for dedicated editor:
- Full-page template editor (currently inline in Settings)
- Drag-and-drop subtask builder
- Visual blueprint dependency wiring
- Template preview panel
2026-01-27 20:32:50 -06:00
Brad Groux
42effb04ba feat(US-908): Template import/export
- Export all templates as JSON file
- Import templates from JSON file with duplicate detection
- template-io utility for file handling and validation
- Import/Export buttons in SettingsDialog templates section
- Duplicates skipped during import with notification
2026-01-27 20:32:24 -06:00
Brad Groux
f4bb9ef22a docs: add Sprint 10 plan - Metrics & Observability Expansion 2026-01-27 20:31:22 -06:00
Brad Groux
219cf1a5bc feat(US-906): Agent & dependency defaults
- Add agent field to template editor (preferred agent for code tasks)
- Agent selector in AddTemplateForm with all available agents
- Agent displayed in template list alongside other defaults
- Templates can specify preferred agent (claude-code, amp, copilot, gemini, veritas)
2026-01-27 20:30:08 -06:00
Brad Groux
f99c3efde8 feat(US-905): Multi-task blueprints
- Blueprint templates create multiple linked tasks with dependencies
- CreateTaskDialog shows blueprint preview with task list
- Dependencies resolved via refId mapping (blockedByRefs -> actual task IDs)
- All blueprint tasks created sequentially, dependencies auto-wired
- Added blockedBy support to CreateTaskInput
- Blueprint UI shows task count, dependencies, and subtask count
2026-01-27 20:29:14 -06:00
Brad Groux
58427d6c66 feat(US-904): Template categories
- Add template-categories utility with built-in categories (bug, feature, sprint, content, research, automation, custom)
- Category selector in template creation form
- Category badges displayed in template list
- Category filter tabs in CreateTaskDialog template selector
- Templates without category default to 'custom'
2026-01-27 20:27:06 -06:00
Brad Groux
453f771794 feat(US-903): Variable interpolation
- Add template-variables utility with support for {{date}}, {{datetime}}, {{project}}, {{author}}, {{custom:label}}
- Extract custom variables from templates and prompt user for values
- Interpolate variables in description and subtask titles on task creation
- Display custom variable input form in CreateTaskDialog
- Variables resolved at creation time for dynamic content
2026-01-27 20:24:37 -06:00
Brad Groux
a452b6a279 feat(US-902): Subtask templates
- Add subtasks field to CreateTaskInput
- Task service creates subtasks from template when task is created
- CreateTaskDialog displays subtasks from template
- Users can remove individual subtasks before creating
- Subtasks sorted by order field and auto-generated with IDs
2026-01-27 20:22:58 -06:00
Brad Groux
8a731e27d8 feat(US-901): Enhanced template schema
- Extend TaskTemplate with version, category, tags, agent, subtaskTemplates, and blueprint fields
- Add SubtaskTemplate and BlueprintTask interfaces
- Implement v0 to v1 migration in template service (backward compatible)
- Export template types from shared package
- Server validates enhanced schema on create/update
2026-01-27 20:21:16 -06:00
Brad Groux
99fe5ab385 feat(task_20260128_nYPgZw): Enhanced Task Templates - Sprint 9 planning complete 2026-01-27 20:17:15 -06:00
Brad Groux
6c3925ef53 docs: add Sprint 9 plan - Enhanced Task Templates 2026-01-27 20:16:43 -06:00
Brad Groux
e675406164 Add Sprint 8 docs + telemetry data 2026-01-26 15:50:23 -06:00
Brad Groux
01b692ccb5 Merge feature/us-808-optional-traces: Optional Traces 2026-01-26 12:36:08 -06:00
Brad Groux
e6faa846bf feat(traces): add optional coarse traces for agent runs (US-808)
TraceService:
- 4 coarse step types: init, execute, complete, error
- Trace ID = Attempt ID for natural correlation
- Traces stored as JSON files in .veritas-kanban/traces/
- Off by default (enable via POST /api/traces/enable)

API Endpoints:
- GET /api/traces/status — Check if tracing is enabled
- POST /api/traces/enable — Enable tracing
- POST /api/traces/disable — Disable tracing
- GET /api/traces/:attemptId — Get a specific trace
- GET /api/traces/task/:taskId — List all traces for a task

AgentService Integration:
- Automatically records trace steps when tracing is enabled
- init: worktree setup, prompt building
- execute: agent process running
- complete: post-run processing
- error: captures error details
2026-01-26 12:36:04 -06:00
Brad Groux
b7c5b64649 Merge feature/us-806-807-dashboard: Dashboard Component and Placement 2026-01-26 12:20:02 -06:00
Brad Groux
e80f4b706e feat(dashboard): add metrics dashboard with collapsible section (US-806, US-807)
Dashboard Features:
- Task counts row: Total, To Do, In Progress, Review, Done, Archived, Completed
- Agent ops row: Error rate, Token usage, Run duration (with p50/p95)
- Project filter dropdown
- Period selector (24h / 7d)
- Auto-refresh every 30 seconds
- Color-coded metrics (green/yellow/red for error rates)

Placement:
- Collapsible section below Kanban board
- Collapsed by default
- 'D' keyboard shortcut to toggle
- State persisted in localStorage

New files:
- useMetrics hook with formatting utilities
- Dashboard component with MetricCard and StatCard
- DashboardSection with collapsible wrapper
2026-01-26 12:19:57 -06:00
Brad Groux
6282b760da Merge feature/us-805-metrics-api: Metrics API 2026-01-26 12:18:04 -06:00
Brad Groux
ac8ffea1e5 feat(metrics): add metrics API for dashboard (US-805)
New endpoints:
- GET /api/metrics/tasks — Task counts by status, total, completed, archived
- GET /api/metrics/runs?period=24h|7d — Error rate, success rate, run counts
- GET /api/metrics/tokens?period=24h|7d — Token totals, per-run stats (avg, p50, p95)
- GET /api/metrics/duration?period=24h|7d — Duration stats (avg, p50, p95)
- GET /api/metrics/all?period=24h|7d — All metrics in one call

All endpoints support optional project filter.
2026-01-26 12:18:00 -06:00
Brad Groux
d02ee6367d Merge feature/us-804-token-tracking: Token Usage Tracking 2026-01-26 12:16:46 -06:00
Brad Groux
98d12e510c feat(telemetry): add token usage tracking endpoint (US-804)
New endpoint: POST /api/agents/:taskId/tokens

Accepts:
- inputTokens (required)
- outputTokens (required)
- totalTokens (optional, defaults to sum)
- attemptId (optional, uses current attempt)
- agent (optional, uses current attempt's agent)
- model (optional)

Emits run.tokens telemetry event for dashboard metrics.
2026-01-26 12:16:43 -06:00
Brad Groux
fd15139491 Merge feature/us-803-run-events: Emit Run Events 2026-01-26 12:16:03 -06:00
Brad Groux
461c99f638 feat(telemetry): emit agent run events (US-803)
AgentService now emits telemetry events for:
- run.started: when agent process spawns
- run.completed: when agent exits (with durationMs, exitCode, success)
- run.error: on spawn failure or process error

All events include taskId, attemptId, agent type, and project.
2026-01-26 12:15:58 -06:00
Brad Groux
99c18ed60e Merge feature/us-802-task-events: Emit Task Events 2026-01-26 12:15:07 -06:00
Brad Groux
e55628def8 feat(telemetry): emit task lifecycle events (US-802)
TaskService now emits telemetry events for:
- task.created: when a new task is created
- task.status_changed: when task status changes (with previousStatus)
- task.archived: when a task is archived
- task.restored: when a task is restored from archive

All events include taskId, project, and current status.
2026-01-26 12:15:02 -06:00
Brad Groux
62bdd78cc7 Merge feature/us-801-telemetry-service: Telemetry Service 2026-01-26 12:13:44 -06:00
Brad Groux
ed014fe1ed feat(telemetry): add TelemetryService for event logging (US-801)
- Add TelemetryService with NDJSON file storage
- Date-partitioned event files (events-YYYY-MM-DD.ndjson)
- Configurable retention with automatic cleanup
- Query API with filters (type, since, until, taskId, project, limit)
- REST endpoints: GET /api/telemetry/events, /status, /count

New types:
- TelemetryEvent (base), TaskTelemetryEvent, RunTelemetryEvent, TokenTelemetryEvent
- TelemetryConfig, TelemetryQueryOptions

Includes 18 passing tests covering emit, query, filtering, and configuration.
2026-01-26 12:02:02 -06:00
Brad Groux
778e62f211 docs: Update README and add CHANGELOG
- Rewrote README with current features and Clawdbot integration
- Added CHANGELOG.md covering all 7 sprints
- Cleaner structure and better organization
2026-01-26 11:42:28 -06:00
Brad Groux
0ce2150830 fix: Add padding to sidebar headers to prevent X button overlap
Added pr-8 to header flex containers in:
- ArchiveSidebar
- ActivitySidebar
- ConflictResolver
- PreviewPanel

The Sheet component's close button is positioned absolute at right-4,
which was overlapping with action buttons (refresh, trash, etc.)
2026-01-26 11:40:21 -06:00
Brad Groux
575035d69b refactor: Replace direct spawn with Clawdbot sessions API integration
- Created ClawdbotAgentService that delegates to Veritas main session
- Agent requests written to .veritas-kanban/agent-requests/ as JSON
- Added /api/agents/pending endpoint for Veritas to poll
- Added /api/agents/:taskId/complete callback endpoint
- CLI commands: agents:pending, agents:complete, agents:status
- Removed PTY process management - Clawdbot handles it

Flow:
1. Kanban UI → POST /api/agents/:taskId/start
2. Server writes request to agent-requests/{taskId}.json
3. Veritas polls agents:pending or checks manually
4. Veritas calls sessions_spawn with task prompt
5. Sub-agent works in worktree, commits changes
6. Veritas calls /api/agents/:taskId/complete
7. Task updated, notifications sent
2026-01-26 11:20:28 -06:00
Brad Groux
1d9debee3b Move sprint 1-4 docs to docs/ folder for consistency 2026-01-26 06:36:10 -06:00
Brad Groux
c526038a06 US-711: Add running indicator on task cards - Sprint 7 complete! 🎉
- Blue glow effect (ring + shadow) when agent is running
- Running badge with spinning loader icon
- Shows agent name in badge and tooltip
- Pulsing animation for easy visibility
- Sprint 7: All 11 stories complete
2026-01-26 06:28:41 -06:00
Brad Groux
858460f0cb US-710: Add time tracking with start/stop timer and manual entries
- TimeEntry and TimeTracking types
- TaskService: startTimer, stopTimer, addTimeEntry, deleteTimeEntry, getTimeSummary
- API endpoints for time operations
- TimeTrackingSection component with:
  - Start/stop timer with live elapsed display
  - Manual entry dialog (1h 30m format)
  - Entries list with delete
- Time indicator on TaskCard with animated icon when running
- formatDuration/parseDuration utilities
2026-01-26 06:26:44 -06:00
Brad Groux
8facd82b04 US-709: Add merge conflict resolution UI
- ConflictService: detect, list, resolve conflicts
- Parse conflict markers, get ours/theirs/base versions
- API endpoints: conflicts status, file details, resolve, abort, continue
- ConflictResolver slide-out panel with:
  - File list sidebar
  - Side-by-side comparison (Ours vs Theirs)
  - Manual edit tab
  - Accept ours/theirs/manual resolution
  - Abort and continue actions
- Conflict warning banner in GitSection
2026-01-26 06:22:08 -06:00
Brad Groux
edc23f700b US-706: Add auto-archive suggestions for completed projects
- TaskService: getArchiveSuggestions(), archiveProject() methods
- Server-side detection of projects where all tasks are done
- API endpoints: GET /archive/suggestions, POST /archive/project/:project
- ArchiveSuggestionBanner component with confirmation dialog
- Activity logging for project_archived events
- Replaced client-side detection with server-side approach
2026-01-26 06:18:03 -06:00
Brad Groux
a9ee3d16da US-708: Add preview mode with embedded dev server
- DevServerConfig type for repo settings (command, port, readyPattern)
- PreviewService to manage dev server processes per task
- Auto-detect port and ready state from server output
- API endpoints for preview start/stop/status/output
- PreviewPanel slide-out with iframe, terminal output toggle
- Preview button in TaskDetailPanel for code tasks
2026-01-26 06:13:40 -06:00
Brad Groux
4eb6fa01c4 US-707: Add GitHub PR creation from task detail UI
- GitHubService using gh CLI for PR operations
- Added prUrl/prNumber to TaskGit type
- API endpoints for status check and PR creation
- Create PR dialog with title, description, draft option
- View PR button when PR exists
- Auto-opens new PR in browser
2026-01-26 06:09:20 -06:00
Brad Groux
e46a9f06e9 feat(US-706): Auto-archive suggestions for completed projects 2026-01-26 06:01:23 -06:00
Brad Groux
5dd3d1b3b1 feat(US-705): Multiple task attempts
- Added New Attempt button for completed/failed tasks
- Added attempt history list with status indicators
- Click attempt to view its log
- Supports selecting different agent for retries
- Previous attempts preserved and viewable
2026-01-26 05:53:35 -06:00
Brad Groux
dfff667490 feat(US-704): Task dependencies with blocking
- Added blockedBy field to Task type
- Added blocking status API endpoint
- Added server-side validation for blocked tasks
- Created DependenciesSection component
- Added blocked indicator badge on task cards
- Tooltip shows blocker names on hover
- Cannot move blocked task to In Progress
2026-01-26 05:52:12 -06:00
Brad Groux
d952e1aa5c feat(US-703): Subtasks with progress tracking
- Added Subtask type to shared types
- Added subtask routes: add, update, delete
- Added subtask hooks: useAddSubtask, useUpdateSubtask, useDeleteSubtask
- Created SubtasksSection component with:
  - Progress bar (X/Y complete)
  - Checkbox completion
  - Inline add/delete
  - Auto-complete parent option
- Added Checkbox and Switch UI components
2026-01-26 05:49:28 -06:00
Brad Groux
cf725c5eff feat(US-702): Restore from archive
- Added restoreTask() to TaskService
- Added POST /api/tasks/:id/restore endpoint
- Added useRestoreTask() hook
- Added restore button (hover) to ArchiveSidebar items
- Tasks restore to Done column with all data preserved
2026-01-26 05:46:27 -06:00
Brad Groux
db802ed56d feat(US-701): Archive sidebar with search/filter
- Added listArchivedTasks() to TaskService
- Added GET /api/tasks/archived endpoint
- Added useArchivedTasks() hook
- Created ArchiveSidebar component with:
  - Search by title/description/tags
  - Filter by task type
  - Filter by project
  - Click to view task details
- Added Archive button to Header toolbar
2026-01-26 05:42:53 -06:00
Brad Groux
6810aa5cdf docs: add Sprint 7 plan with backlog items
10 stories covering archive management, subtasks, dependencies,
and advanced features (PR creation, preview, time tracking)
2026-01-26 05:24:42 -06:00
Brad Groux
8e48ee3a49 fix: resolve infinite render loop in Sprint 6 features
- Use refs instead of state for keyboard callback setters
- Simplify FilterBar to remove problematic useEffect sync
- Make useBulkActions safe when used outside provider (DragOverlay)
- Remove unnecessary useEffect wrappers for ref-based callbacks
2026-01-26 05:13:28 -06:00
Brad Groux
3df4414b11 feat(US-605): activity log
- Add ActivityService for logging task events
- Activity sidebar with filter, refresh, clear
- Log task create, update, status change, archive, delete
- Relative timestamps in activity feed
- Add ScrollArea UI component

Sprint 6 complete!
2026-01-26 05:03:26 -06:00