Commit Graph

1031 Commits

Author SHA1 Message Date
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
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
0f80d4f2b2 feat(HAI-016): complete Step 5 — wire semaphore into dashboard engine components 2026-03-25 21:25:07 -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
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
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
64b28a012e feat(HAI-007): complete Step 1 — set specifying status during triage 2026-03-25 20:52:01 -04:00
Dustin Byrne
f6dc070bd8 feat(HAI-005): add auto-merge functionality for in-review tasks
- Add autoMerge boolean to Settings model with default false
- Add auto-merge toggle UI to the In Review column header
- Implement server-side auto-merge behavior in dashboard command
- Fix pre-existing build errors in types, executor, and dashboard server
- Update README with auto-merge documentation
2026-03-25 20:48:34 -04:00
Dustin Byrne
2713176190 fix: simplify triage testing requirements — rules only, no prereq check 2026-03-25 20:47:39 -04:00
Dustin Byrne
92154b70b6 feat(HAI-006): add groupOverlappingFiles setting for file-scope-aware task scheduling
- Add groupOverlappingFiles toggle to Settings types and store with default enabled
- Parse File Scope sections from PROMPT.md to extract per-task file lists
- Implement overlap detection in scheduler to group tasks sharing files
- Add groupOverlappingFiles toggle to the Settings UI modal
- Update README and remove obsolete triage overlap logic
2026-03-25 20:46:07 -04:00
Dustin Byrne
7c39f325e2 fix: triage agent must require real tests, create test infra task if missing
Triage prompt now explicitly:
- Checks for test framework before writing spec
- Creates a prerequisite task if no test framework exists
- Adds it as a dependency on the current task
- Forbids typecheck-only or manual-only testing steps
2026-03-25 20:45:07 -04:00
Dustin Byrne
c3a785a3fb feat(HAI-006): complete Step 3 — implement overlap detection in scheduler 2026-03-25 20:43:19 -04:00
Dustin Byrne
7f3cf51c19 fix(HAI-005): fix pre-existing build errors in types, executor, and dashboard server 2026-03-25 20:41:06 -04:00
Dustin Byrne
6fbf3519b5 feat(HAI-002): add maxWorktrees setting to limit total git worktrees
- Add maxWorktrees field to Settings interface with default of 4
- Enforce worktree limit in Scheduler.schedule() alongside maxConcurrent
- Wire setting through dashboard startup from persisted settings
- Include maxWorktrees in /api/config response
- Add Max Worktrees input to Settings Modal UI
- Backward compatible: existing configs without maxWorktrees use default
2026-03-25 20:32:07 -04:00
Dustin Byrne
93651835b6 fix: executor prompt gives agent concrete CLI examples and review_step instructions
- System prompt explains review_step tool with review level table
- Execution prompt injects real task ID in all CLI examples
- Execution prompt parses review level from PROMPT.md and tells agent exactly when to call review_step
- Removed {TASK_ID} placeholders that agent saw as literal text
2026-03-25 20:24:32 -04:00
Dustin Byrne
040409041a feat: cross-model review via review_step tool
- reviewer.ts: spawns separate pi agent with read-only tools
  and reviewer system prompt (taskplane's review format/verdicts)
- Executor registers review_step as a custom tool on the worker session
- Worker calls review_step(step, type, step_name) at step boundaries
  based on review level (0=none, 1=plan, 2=plan+code, 3=full)
- Reviewer returns APPROVE/REVISE/RETHINK with structured feedback
- REVISE feedback returned inline to worker for immediate action
- Review calls logged to task via hai task log
2026-03-25 20:22:20 -04:00
Dustin Byrne
66a62b9bcb refactor: drop discover command, agents create new tasks instead 2026-03-25 20:17:38 -04:00
Dustin Byrne
8a2a5ac14b feat: taskplane-style specs + CLI step tracking
- Triage agent generates full PROMPT.md (mission, steps, file scope,
  review level, docs requirements, commit conventions, guardrails)
- Executor agent reports progress via hai task CLI
- hai task update <id> <step> <status> — step lifecycle
- hai task log <id> <message> — execution log
- hai task discover <id> <what> <disp> — record discoveries
- hai task show <id> — display steps, progress, discoveries, log
- Steps auto-parsed from PROMPT.md headings into task.json
- Task types extended with steps, reviews, discoveries, log
2026-03-25 20:14:04 -04:00
Dustin Byrne
158c0ceb59 feat(HAI-003): clear task status in completeTask before moving to done 2026-03-25 20:01:16 -04:00
Dustin Byrne
ada968512e feat(HAI-002): set status at engine processor lifecycle points 2026-03-25 19:24:11 -04:00
Dustin Byrne
f57b87f7d3 feat(HAI-001): handle optional title in engine components 2026-03-25 19:15:35 -04:00
Dustin Byrne
98ddf0f3d3 fix: remove dead setStatus calls from engine 2026-03-25 19:02:24 -04:00
Dustin Byrne
d2056f620a feat(HAI-001): wire status updates in executor 2026-03-25 18:51:38 -04:00
Dustin Byrne
ea148e983b feat(HAI-001): wire status updates in scheduler (blocked/queued) 2026-03-25 18:51:27 -04:00
Dustin Byrne
cbb411cba3 feat(HAI-001): wire status updates in triage processor 2026-03-25 18:51:09 -04:00
Dustin Byrne
834a9f840b fix: MERGE_HEAD detection in AI merger 2026-03-25 18:44:49 -04:00
Dustin Byrne
16e9043aee feat: AI-powered merge via pi agent 2026-03-25 18:43:49 -04:00
Dustin Byrne
961203692d feat: hai board — core, dashboard, cli, engine 2026-03-25 18:32:10 -04:00