Commit Graph

2380 Commits

Author SHA1 Message Date
Dustin Byrne
69ff2f7aa0 feat: squash merge for clean one-commit-per-task history
- git merge --squash replaces git merge --no-ff
- Merge agent prompt updated for squash flow
- Fallback detection uses staged changes instead of MERGE_HEAD
- Abort uses git reset --merge instead of git merge --abort
- Store fallback merge also squashes + commits
2026-03-25 22:02:33 -04:00
Dustin Byrne
f6c5c62f93 feat(HAI-025): complete Step 1 — add column-based agent-active glow for in-progress cards 2026-03-25 22:02:27 -04:00
Dustin Byrne
005e504565 feat(HAI-024): remove PROMPT.md header from TaskDetailModal
- Remove the hard-coded PROMPT.md h4 heading from the task detail section
- Add test asserting the PROMPT.md heading is no longer rendered
2026-03-25 22:02:01 -04:00
Dustin Byrne
27c8744c46 feat(HAI-024): complete Step 1 — remove PROMPT.md header from TaskDetailModal 2026-03-25 22:01:29 -04:00
Dustin Byrne
507c0d6b67 feat(HAI-023): complete Step 2 — dashboard API upload/download/delete routes 2026-03-25 22:00:51 -04:00
Dustin Byrne
7f47f1e781 feat(HAI-023): complete Step 1 — core types and store methods for attachments 2026-03-25 21:57:51 -04:00
Dustin Byrne
a6d18e1b53 feat: replace .DONE file with task_done tool
- task_done() marks all remaining steps as done and signals completion
- No more filesystem side channel for completion detection
- Removes all .DONE references from executor and prompts
2026-03-25 21:51:34 -04:00
Dustin Byrne
b5da595f3b feat: triage agent gets task_list and task_get tools for duplicate detection
- task_list: returns all non-done tasks (ID, column, description, deps)
- task_get: returns full task detail including PROMPT.md content
- Agent calls task_list to scan for duplicates, task_get to verify
2026-03-25 21:48:33 -04:00
Dustin Byrne
f74a1f3597 feat(HAI-022): add duplicate task detection during triage
- Add duplicate check instructions to specification prompt
- Read existing tasks before writing spec to detect duplicates
- Agent outputs DUPLICATE: {id} instead of PROMPT.md when duplicate found
- Parse agent output for duplicate flag and auto-close duplicate tasks
- Log duplicate relationship before deleting the duplicate task
2026-03-25 21:48:22 -04:00
Dustin Byrne
285893d026 feat: triage agent checks for duplicate tasks before specifying
- Triage prompt instructs agent to read existing task.json files
- If duplicate found, agent writes DUPLICATE: HAI-XXX to PROMPT.md
- Triage processor detects this and deletes the duplicate task
- Avoids wasting tokens specifying work that's already tracked
2026-03-25 21:47:23 -04:00
Dustin Byrne
34fe3fe969 fix(HAI-019): add generic type parameters to tool definitions
- Extract tool parameter schemas to module-level constants for reuse
- Add Static<typeof schema> type annotations to tool execute callbacks
- Import Static type from @mariozechner/pi-ai
- Remove inline parameter schema definitions from tool objects
2026-03-25 21:45:43 -04:00
Dustin Byrne
e7d964f9d2 feat(HAI-013): add markdown rendering styles and TaskDetailModal tests
- Add markdown-body base styles in dashboard styles.css
- Remove backdrop and enable scroll on task detail prompt rendering
- Add TaskDetailModal unit tests with vitest jsdom environment
- Update vitest config with globals and jsdom support
- Clean up unused test files and legacy concurrency module
2026-03-25 21:45:05 -04:00
Dustin Byrne
dbea81c67e feat(HAI-015): add agent-active glow effect to TaskCard
- Add agent-active CSS with animated purple border glow using in-progress theme color
- Apply agent-active class conditionally in TaskCard component
- Add TaskCard agent-active unit tests
- Move TaskCard tests to __tests__ directory
2026-03-25 21:44:26 -04:00
Dustin Byrne
f34d849282 feat(HAI-020): add atomic writes and remove truncation recovery workarounds
- Add atomic writes for config.json with config lock in store
- Simplify safeReadTaskJson to readTaskJson, removing truncation recovery logic
- Remove withRetry workaround from fetchTaskDetail in dashboard API
- Remove related retry logic from executor and dashboard command
- Update store tests to cover atomic write behavior
2026-03-25 21:43:57 -04:00
Dustin Byrne
bce41ca00c feat(HAI-013): complete Step 1 — add markdown-body base styles, ensure no backdrop on prompt rendering 2026-03-25 21:43:46 -04:00
Dustin Byrne
99502e4e05 feat: resume orphaned in-progress tasks on engine restart 2026-03-25 21:42:47 -04:00
Dustin Byrne
2488e1c9d2 feat(HAI-020): complete Step 3 — remove withRetry workaround from fetchTaskDetail 2026-03-25 21:38:16 -04:00
Dustin Byrne
6975fae33f feat(HAI-020): complete Step 2 — simplify safeReadTaskJson to readTaskJson, remove truncation recovery 2026-03-25 21:37:44 -04:00
Dustin Byrne
6d2c234d89 feat(HAI-020): complete Step 1 — atomic writes for config.json with config lock 2026-03-25 21:36:38 -04:00
Dustin Byrne
0e023c7b2b fix(HAI-018): improve error handling for task detail fetching
- Fix server-side error handling in GET /tasks/:id with retry on transient failures
- Add client-side retry logic for fetchTaskDetail in dashboard
- Add unit tests for routes and API error/retry behavior
- Remove outdated core store tests and vitest config
- Update documentation for error handling improvements
2026-03-25 21:33:39 -04:00
Dustin Byrne
9596430016 fix(HAI-019): complete Step 1 — add generic type parameters to tool definitions
Extract TypeBox schemas to module-level constants and use Static<typeof schema>
to explicitly type execute callback params, resolving all TS7006 implicit-any
errors in the four create*Tool methods.
2026-03-25 21:33:15 -04:00
Dustin Byrne
0c0ca5ad95 fix(HAI-018): complete Step 4 — documentation & delivery 2026-03-25 21:32:46 -04:00
Dustin Byrne
6f1cc2cb48 fix(HAI-018): complete Step 2 — add client-side retry for fetchTaskDetail
- Added withRetry wrapper in api.ts (1 retry, 200ms delay)
- fetchTaskDetail now retries transient 500s transparently
- TaskCard shows 'Failed to load task details' instead of raw error
- Added api.test.ts with success, retry-success, and exhaustion tests
2026-03-25 21:32:11 -04:00
Dustin Byrne
d452aeb0c1 fix(HAI-018): complete Step 1 — fix server-side error handling in GET /tasks/:id
- Route now returns 404 only for ENOENT, 500 for transient errors
- store.getTask() retries once after 50ms on non-ENOENT failures
- Added route tests for success, 404, and 500 cases
- Updated vitest config to include src/**/*.test.* files
2026-03-25 21:30:18 -04:00
Dustin Byrne
01752d5d6a feat(HAI-017): add per-task write lock, atomic writes, and defensive JSON parsing to TaskStore
- Add per-task write lock in TaskStore to prevent concurrent write corruption
- Implement defensive JSON parsing with recovery for task.json files
- Use atomic writes (write-to-temp + rename) for task.json updates
- Add vitest config and tests for lock, parsing, and atomic write behavior
- Remove concurrency module from engine, consolidating store safety in core
2026-03-25 21:29:10 -04:00
Dustin Byrne
ea2a9399c7 feat(HAI-017): complete Step 5 — documentation and delivery 2026-03-25 21:28:52 -04:00
Dustin Byrne
a8f31782a8 test(HAI-017): complete Step 4 — add vitest config and tests for lock, parsing, atomic writes 2026-03-25 21:27:49 -04:00
Dustin Byrne
60be31927f feat(HAI-016): add shared AgentSemaphore for concurrent agent limiting
- Create AgentSemaphore class in engine/src/concurrency.ts with configurable maxConcurrent
- Integrate semaphore into TriageProcessor and TaskExecutor to gate agent spawning
- Wire semaphore into merge path and dashboard engine components
- Add comprehensive tests for concurrency, executor, and triage integration
- Update JSDoc and types for maxConcurrent configuration option
2026-03-25 21:27:29 -04:00
Dustin Byrne
dcf9da35a0 docs(HAI-016): complete Step 7 — update JSDoc for maxConcurrent and AgentSemaphore 2026-03-25 21:27:05 -04:00
Dustin Byrne
0f80d4f2b2 feat(HAI-016): complete Step 5 — wire semaphore into dashboard engine components 2026-03-25 21:25:07 -04:00
Dustin Byrne
65ed0d919e feat(HAI-017): complete Step 3 — use atomic writes for task.json 2026-03-25 21:24:46 -04:00
Dustin Byrne
1ebde5701a feat: task_create tool accepts optional dependencies 2026-03-25 21:22:19 -04:00
Dustin Byrne
6a45531a79 feat(HAI-016): complete Step 4 — integrate semaphore into merge path 2026-03-25 21:21:42 -04:00
Dustin Byrne
edb31077d4 feat(HAI-017): complete Step 2 — add defensive JSON parsing with recovery 2026-03-25 21:21:15 -04:00
Dustin Byrne
ab3acd59b5 feat(HAI-017): complete Step 1 — add per-task write lock to TaskStore 2026-03-25 21:19:19 -04:00
Dustin Byrne
d487ebee51 feat(HAI-016): complete Step 3 — integrate semaphore into TaskExecutor 2026-03-25 21:19:07 -04:00
Dustin Byrne
640c288832 feat(HAI-016): complete Step 2 — integrate semaphore into TriageProcessor 2026-03-25 21:17:31 -04:00
Dustin Byrne
6379008a88 feat(HAI-016): complete Step 1 — create shared AgentSemaphore 2026-03-25 21:14:13 -04:00
Dustin Byrne
b9ee8cc04b feat(HAI-014): reorder TaskCard layout and add tests
- Reorder JSX and update layout in TaskCard component
- Update dashboard styles for new TaskCard layout
- Add TaskCard unit tests with vitest
- Add vitest config and test dependencies to dashboard package
2026-03-25 21:11:16 -04:00
Dustin Byrne
43cc7e7f05 test(HAI-015): complete Step 3 — add TaskCard agent-active tests 2026-03-25 21:11:07 -04:00
Dustin Byrne
19b12a4770 test(HAI-014): complete Step 2 — add TaskCard tests and vitest config 2026-03-25 21:10:51 -04:00
Dustin Byrne
4777ae5dcb feat(HAI-014): complete Step 1 — reorder JSX and update layout 2026-03-25 21:10:10 -04:00
Dustin Byrne
cf79ae52d4 test(HAI-013): complete Step 2 — add TaskDetailModal tests and vitest config 2026-03-25 21:10:05 -04:00
Dustin Byrne
ebbc6d479a feat(HAI-015): complete Step 2 — apply agent-active class conditionally 2026-03-25 21:09:26 -04:00
Dustin Byrne
97f9dc6dbb feat(HAI-015): complete Step 1 — add agent-active glow CSS 2026-03-25 21:09:16 -04:00
Dustin Byrne
428362a6fd feat(HAI-013): complete Step 1 — drop detail-prompt backdrop and scroll for markdown rendering 2026-03-25 21:09:00 -04:00
Dustin Byrne
b8d4853e85 feat: register task_update, task_log, task_create as agent tools
Replaces CLI-based progress reporting (hai task update/log/create)
with custom tools registered on the worker's pi session. No PATH
dependency, no shell overhead, works in any worktree.

- task_update(step, status) — update step lifecycle
- task_log(message) — log actions and decisions
- task_create(description) — create tasks for out-of-scope work
- review_step unchanged (already a tool)
- System prompt and execution prompt updated to reference tools
2026-03-25 21:04:20 -04:00
Dustin Byrne
06a6046950 feat(HAI-012): add activity timeline to TaskDetailModal
- Add formatTimestamp helper for relative time display
- Add Activity section rendering task log entries in reverse chronological order
- Display log action, timestamp, and optional outcome per entry
- Add timeline-style CSS with scrollable list, dot indicators, and styled outcome blocks
2026-03-25 21:04:03 -04:00
Dustin Byrne
c8aacc3622 feat(HAI-012): complete Steps 1-2 — add activity timeline to TaskDetailModal with styling 2026-03-25 21:03:12 -04:00
Dustin Byrne
963bc15e58 fix(HAI-010): serialize auto-merge with queue, startup sweep, and periodic retry
- Add serialized merge queue to prevent concurrent git merge operations
- Enqueue in-review tasks on startup so pre-existing tasks are not missed
- Add periodic retry interval to re-attempt failed merges automatically
- Re-check autoMerge setting and task column before each merge attempt
- Clean up merge retry interval on SIGINT for graceful shutdown
2026-03-25 21:01:30 -04:00