Commit Graph

150 Commits

Author SHA1 Message Date
gsxdsm
f94265b639 feat(KB-249): immediate stuck task check on timeout setting change
- Add checkNow() method to StuckTaskDetector for immediate stuck task detection\n- Add comprehensive tests for checkNow() method\n- Wire up settings change handler in dashboard command\n- Update AGENTS.md documentation with immediate check behavior
2026-03-30 23:39:04 -07:00
gsxdsm
5de172787f test(KB-176): complete Step 5 — add tests for task_done summary functionality 2026-03-30 19:03:47 -07:00
gsxdsm
29ca64b50f feat(KB-176): complete Step 4 — update executor system prompt and task_done tool 2026-03-30 19:02:04 -07:00
gsxdsm
b7349a3f1f feat(KB-206): add stuck task detection and auto-recovery
- Add taskStuckTimeoutMs setting to detect tasks with no activity
- Create StuckTaskDetector to poll in-progress tasks every 30s
- Integrate heartbeat tracking into executor via step callbacks
- Implement recovery flow: abort stuck sessions, retry with preserved progress
- Export detector and wire into dashboard for real-time monitoring
- Add comprehensive tests and documentation to AGENTS.md
2026-03-30 17:16:35 -07:00
gsxdsm
4c38950e5e feat(KB-045): add scheduled tasks automation system
- Add AutomationStore and core automation types for cron-based scheduling
- Implement CronRunner engine for executing scheduled automations
- Add REST API routes for CRUD operations on automations
- Create UI components: ScheduleCard, ScheduleForm, and ScheduledTasksModal
- Integrate scheduled tasks into dashboard App.tsx and CLI dashboard command
- Add comprehensive tests for store, runner, API, and UI components
- Include changeset for the new scheduled tasks feature
2026-03-30 16:27:23 -07:00
gsxdsm
767105b755 chore(KB-205): increase Vitest maxWorkers default from 8 to 16
- Update default VITEST_MAX_WORKERS from 8 to 16 in all packages
- Affects CLI, Core, Dashboard, and Engine vitest configs
- Improves test execution parallelism on multi-core machines
- Environment variable override still supported via VITEST_MAX_WORKERS
2026-03-30 15:40:45 -07:00
gsxdsm
467f724a1b feat(KB-178): add proactive triage subtask guidance
- Add proactive subtask breakdown prompts to triage agent
- Update dashboard routes to support triage subtask operations
- Add comprehensive tests for triage subtask guidance logic
- Include changeset for @dustinbyrne/kb package release
2026-03-30 11:33:07 -07:00
gsxdsm
702361eafc fix(KB-170): handle worktree cleanup after merge retries exhausted
- Add mergeRetries counter to track per-task retry attempts
- Auto-resolve lock files and generated files during retry attempts
- Clean up worktree when all 3 merge retry attempts are exhausted
- Add comprehensive tests for retry cleanup logic in executor
- Add changeset for the worktree retry cleanup fix
2026-03-30 10:50:43 -07:00
gsxdsm
bff0c13d85 feat(KB-159): complete Step 4 — update frontend for streaming display 2026-03-30 08:55:07 -07:00
gsxdsm
555cbd9ddc feat(KB-141): fix workspace type resolution and add clean-checkout typecheck tests
- Remove dist-dependent workspace type resolution from all tsconfig files

- Add clean-checkout typecheck regression test to CI suite

- Update package.json type definitions for core, engine, dashboard, and cli packages

- Update README with typecheck testing documentation

- Clean up unused test files and component dependencies
2026-03-30 08:24:16 -07:00
gsxdsm
723493ce29 feat(KB-119): complete Step 1 — fix model selector row alignment 2026-03-30 08:06:46 -07:00
gsxdsm
5dba4e1524 feat(KB-134): remove planning mode checkbox and repair strict typecheck gate
- Remove PlanningModeModal checkbox functionality and related tests
- Delete NewTaskModal.test.tsx and PlanningModeModal.test.tsx
- Repair strict typecheck gate in typecheck.test.ts
- Update engine dependencies (add execa)
- Add development note about strict typecheck to dashboard README
- Clean up App.tsx and NewTaskModal.tsx planning mode code
2026-03-30 08:00:41 -07:00
gsxdsm
36a7bbe18a fix(KB-124): resolve ntfy duplicate notifications and spec editor layout
- Fix duplicate ntfy.sh notifications on task merge events
- Fix spec editor layout overflow in TaskDetailModal
- Add regression test coverage for merge notifications
- Add changeset for notification fix
2026-03-30 07:49:44 -07:00
gsxdsm
0986a65895 fix(KB-111): implement invalid transition handling in executor
- Detect and handle invalid column transitions during task step updates
- Reorder error checks to catch invalid transitions before paused status
- Improve log messages with actual column names for better debugging
- Add comprehensive tests for invalid transition error scenarios
- Include changeset for the invalid transition fix
2026-03-30 07:40:41 -07:00
gsxdsm
05fad4951e feat(KB-106): remove duplicate ntfy notifications and add per-event-type deduplication
- Add per-event-type deduplication using Set to track recent notification hashes
- Remove auto browser-open behavior from dashboard command
- Add recentWindowMs configuration option for deduplication window timing
- Update notifier tests for new deduplication logic and error handling
- Add changeset for ntfy duplicate notifications fix
- Remove stale changeset for auto browser-open feature
2026-03-30 07:35:16 -07:00
gsxdsm
7d62a3abc2 feat(KB-093): add PR-first merge mode with configurable merge strategies
- Add mergeStrategy setting (fast-forward, squash, merge-commit) to config
- Implement PR-first auto-completion flow that monitors PR merge status
- Wire PR monitoring service to detect merge completion and trigger auto-close
- Add PR status UI to dashboard with merge progress indicator
- Update settings modal with merge strategy selector
- Add changeset for PR-first merge mode feature
2026-03-29 23:13:24 -07:00
gsxdsm
2e94b78bb9 fix(KB-095): make vitest worker count configurable 2026-03-29 22:32:15 -07:00
gsxdsm
86efb14947 feat(KB-040): add break-into-subtasks toggle for task creation
- Add breakIntoSubtasks flag to core Task model and persist to store
- Plumb subtask flag through dashboard API routes with validation
- Add subtask toggle UI to inline task creation card
- Update triage agent to handle automatic subtask breakdown when enabled
- Add comprehensive tests for store, API routes, and UI components
- Include changeset for patch release documenting the new feature
2026-03-29 22:23:47 -07:00
gsxdsm
33353d5cd6 test(KB-082): assert execution failure error payloads
- Tighten executor failure assertions to expect exact error messages for rate-limit and other exceptions

- Verify non-usage-limit failures also preserve their original error text

- Align backward-compatibility coverage for execution failures without usage limit pauser
2026-03-29 21:51:06 -07:00
gsxdsm
1d994c0b63 feat(KB-039): complete Step 5 — App integration with UsageIndicator modal 2026-03-29 21:50:28 -07:00
gsxdsm
c541b928c6 test(KB-082): update executor tests to expect error field 2026-03-29 21:49:07 -07:00
gsxdsm
49f290da3c feat(KB-088): clear failed status when moving tasks and improve error display
- Fix moveTask to clear status/error/worktree/blockedBy when moving from in-progress to todo/triage
- Add error message display in TaskCard for failed tasks with truncation
- Add prominent error alert in TaskDetailModal for failed tasks
- Refactor usage tracking: move from app/components to dashboard/src/
- Add usage.ts and usage.test.ts for centralized usage tracking
- Remove UsageIndicator and useUsageData from app/ directory
- Update styles.css for error display components
- Update executor tests for error handling
- Add changeset for patch release
2026-03-29 21:48:44 -07:00
gsxdsm
fc3742582d feat(KB-039): complete Step 2 — frontend API client and hook for usage data 2026-03-29 21:46:09 -07:00
gsxdsm
26416d4919 test(KB-082): complete Step 6 — Add/update tests for error field and retry 2026-03-29 21:44:44 -07:00
gsxdsm
449b4b8738 feat(KB-087): remove Created/Updated columns and clean up usage tracking
- Remove createdAt and updatedAt columns from ListView component
- Update TaskCard to remove date display and related styles
- Update TaskDetailModal to remove date fields
- Update ListView tests to reflect new column layout
- Fix column index in dependencies test after column removal
- Remove unused usage tracking module (usage.ts and usage.test.ts)
- Clean up related CSS styles for date columns
2026-03-29 21:43:56 -07:00
gsxdsm
afbe29680b feat(KB-082): complete Step 2 — Record failure error in executor 2026-03-29 21:41:51 -07:00
gsxdsm
1698cae66e feat(KB-057): complete Step 2 — useTerminal hook with history, SSE streaming, and command execution 2026-03-29 20:57:18 -07:00
gsxdsm
5794c301b2 feat(KB-052): refactor GitHub integration to use gh CLI
- Create gh-cli utility module with auth detection and command execution
- Refactor GitHubClient to use gh CLI commands with REST API fallback
- Refactor PR Monitor to use gh CLI for PR operations
- Add listIssues() and getIssue() methods to GitHubClient
- Remove in-app GitHubRateLimiter (gh CLI handles rate limiting)
- Update all tests for gh CLI implementation
- Update AGENTS.md and extension docs for gh CLI auth preference
2026-03-29 20:52:07 -07:00
gsxdsm
919af827e0 feat(KB-036): add worktreeNaming setting for configurable worktree directory names
- Add worktreeNaming setting type with 'random' | 'task-id' | 'task-title' options
- Update executor to generate worktree names based on setting value
- Create worktree-names.ts utility module with generateWorktreeName function
- Add comprehensive executor tests for all naming strategies
- Update AGENTS.md documentation with setting description and usage
- Include changeset for patch release
2026-03-29 20:48:50 -07:00
gsxdsm
036473d2c6 feat(KB-026): add ntfy.sh push notification support
- Add ntfy settings (ntfyEnabled, ntfyTopic) to core types and config storage
- Create NtfyNotifier service with event-based notifications for task completion/failure
- Add Notifications section to SettingsModal for configuring ntfy topic
- Wire up NtfyNotifier in engine to send notifications on task state changes
- Include ntfy topic in task templates for per-task notification override
- Add comprehensive tests for NtfyNotifier service
2026-03-29 19:46:35 -07:00
gsxdsm
57f3afc2c7 feat(KB-044): add test coverage reporting with vitest coverage-v8
- Add @vitest/coverage-v8 to all workspace packages
- Configure vitest coverage settings in all vitest.config.ts files
- Align vitest versions across packages for consistency
- Add 'test:coverage' script to root package.json
- Verify all tests pass with coverage reporting enabled
2026-03-29 19:42:27 -07:00
gsxdsm
a8063f395e feat(KB-025): add per-task model overrides for executor and validator
- Add model override fields to Task type and TaskStore (modelProvider, modelId, validatorModelProvider, validatorModelId)

- Extend PATCH /api/tasks/:id endpoint with validation for model fields

- Create ModelSelectorTab component with provider/model dropdowns and tests

- Integrate Model tab into TaskDetailModal for per-task model configuration

- Update executor to use per-task model overrides when both provider and modelId are set

- Update reviewer to use per-task validator model overrides in reviewStep

- Document per-task model selection feature in AGENTS.md settings section
2026-03-29 19:36:15 -07:00
gsxdsm
aa8a78f023 feat(KB-007): add manual plan approval setting
- Add requirePlanApproval setting to core types and dashboard config
- Add approve-plan and reject-plan API endpoints with handlers
- Add approve/reject UI buttons to TaskDetailModal for awaiting-approval tasks
- Update triage processor to check requirePlanApproval and set awaiting-approval status
- Add comprehensive tests for API endpoints, UI components, and triage logic
- Update AGENTS.md with documentation for the new setting
2026-03-29 19:23:30 -07:00
gsxdsm
caefb5eef6 feat(KB-023): add smart automatic merge conflict resolution
- Add conflict classification API: classifyConflict(), getConflictedFiles(), resolveWithOurs(), resolveWithTheirs(), resolveTrivialWhitespace()

- Auto-resolve lock files (ours), generated files (theirs), and trivial whitespace conflicts

- Add smartConflictResolution setting (alias for autoResolveConflicts)

- Track resolution path via resolutionMethod and autoResolvedCount in MergeResult

- Implement 3-attempt retry logic with escalating strategies in aiMergeTask

- Export pattern constants LOCKFILE_PATTERNS and GENERATED_PATTERNS
2026-03-29 18:46:57 -07:00
gsxdsm
08c30401a9 feat(KB-014): add spec editing and AI revision to dashboard
- Add SpecEditor component with view/edit modes and AI revision UI
- Add spec revision API endpoint with column transition validation
- Enhance TriageProcessor for re-specification with feedback support
- Integrate Spec tab in TaskDetailModal with full edit capabilities
- Add comprehensive tests for SpecEditor and revision workflows
2026-03-29 18:42:41 -07:00
gsxdsm
e7863da66e feat(KB-010): add autoResolveConflicts setting with intelligent merge conflict resolution
- Add autoResolveConflicts setting to types and store (default: true)
- Implement smart conflict detection for lock files and generated files
- Add 3-attempt retry logic with escalating strategies to merger
- Auto-resolve lock files using 'ours', trivial whitespace conflicts
- Track mergeRetries per task for retry loop management
- Update AGENTS.md with conflict resolution documentation
- Add comprehensive merger tests for retry scenarios
2026-03-29 18:27:23 -07:00
gsxdsm
efd7c176fb feat(KB-004): add GitHub PR creation and comment monitoring
- Add PR fields (prInfo, prNumber, prUrl) to Task type and TaskStore with updatePrInfo method
- Add PR Management API endpoints: create, status, refresh with per-repo rate limiting
- Add GitHubClient for PR creation and status fetching with comment support
- Add PrSection component for PR status display and actions in dashboard
- Add PR comment monitoring engine with PrMonitor and PrCommentHandler
- Integrate PR monitoring into scheduler for automatic PR tracking
- Add comprehensive tests for PR features in all packages
2026-03-29 18:10:35 -07:00
gsxdsm
43c81c1f55 feat(KB-003): add task steering feature with UI and prompt injection
- Add SteeringComment type to core types for user steering input
- Add addSteeringComment method to TaskStore with persistence
- Add POST /api/tasks/:id/steer endpoint for adding steering comments
- Add frontend API client and SteeringTab UI component
- Inject steering comments into execution prompt for agent guidance
- Add comprehensive tests for store, API, UI, and executor components
- Include changeset for patch release
2026-03-29 17:40:42 -07:00
Dustin Byrne
1a73733be6 fix(KB-182): strengthen spec review post-session gate to require explicit APPROVE
- Change post-session gate from only blocking REVISE to requiring explicit APPROVE verdict
- Block tasks from reaching executor when review_spec was never called (null verdict)
- Block tasks on RETHINK, UNAVAILABLE, and reviewer-error paths
- Add tests for all non-APPROVE verdict paths: null, RETHINK, UNAVAILABLE, reviewer throw
- Update existing tests to invoke review_spec with APPROVE so they pass the stricter gate
2026-03-28 17:41:10 -04:00
Dustin Byrne
0772709955 feat(KB-176): make enginePaused a soft pause that lets running agents finish
- Remove agent termination listeners for enginePaused in executor and triage
- Update Settings.enginePaused JSDoc to document soft-pause semantics
- Update executor/triage/integration tests to assert sessions are NOT disposed on enginePaused
- Remove pause-abort tracking for enginePaused (only globalPause hard-stops agents)
- Add changeset for the behavioral change
2026-03-28 16:47:23 -04:00
Dustin Byrne
e7711013c9 fix: triage agent now knows of the task_create tool 2026-03-28 16:30:23 -04:00
Dustin Byrne
853496a74f fix: skip merger agent when squash merge stages nothing 2026-03-28 16:30:23 -04:00
Dustin Byrne
d7a9daf5c5 feat(KB-172): add spec review loop to triage agent
- Extend reviewer with 'spec' review type and spec review format template
- Add review_spec tool to triage agent for independent spec quality evaluation
- Implement APPROVE/REVISE/RETHINK loop with conversation rewind on RETHINK
- Add post-session gate to block tasks with unresolved REVISE verdicts from moving to todo
- Add tests for reviewer spec support and triage review loop (APPROVE, REVISE, RETHINK paths)
2026-03-28 16:30:23 -04:00
Dustin Byrne
08cdacf417 feat(KB-161): terminate active agent sessions on engine pause
- Add enginePaused agent termination to executor (kills sessions, moves tasks back to todo)
- Add enginePaused agent termination to triage processor (kills sessions, clears specifying status)
- Update enginePaused JSDoc to reflect new termination behavior vs old graceful drain
- Add unit tests for executor/triage pause termination and integration tests for restart flow
- Include changeset for engine pause behavior change
2026-03-28 16:30:23 -04:00
Dustin Byrne
f823161804 feat(KB-157): add soft-pause (enginePaused) alongside hard-stop (globalPause)
- Add enginePaused field to Settings type with soft-pause semantics (drain queue, don't kill agents)
- Gate scheduler, triage, auto-merge, and periodic merge retry on enginePaused
- Add Pause and Stop buttons to dashboard Header replacing single toggle
- Wire enginePaused state through App with optimistic toggle and unpause resume logic
- Add tests for scheduler, triage, dashboard CLI, Header, and App covering pause behavior
2026-03-28 16:30:23 -04:00
Dustin Byrne
e1bd4be9be fix(KB-153): detect exhausted-retry errors from pi-coding-agent sessions
- Add checkSessionError helper that re-raises errors stored on session.state.error after prompt() resolves silently when retries are exhausted
- Integrate checkSessionError in executor, triage, merger, and reviewer agents so existing catch blocks with isUsageLimitError can trigger UsageLimitPauser
- Add tests for checkSessionError and for each agent's error propagation path
- Add audit report documenting the error propagation gap
- Add changeset for the fix
2026-03-28 16:30:23 -04:00
Dustin Byrne
ab2b663385 feat(KB-154): persist worktree pool across engine restarts
- Add rehydrate() method and scanIdleWorktrees() to restore idle worktrees from disk on startup
- Add cleanupOrphanedWorktrees() to remove stale worktrees when recycling is disabled
- Wire startup rehydrate/cleanup into dashboard command based on recycleWorktrees setting
- Export new functions from @kb/engine and update dashboard imports
- Add unit tests for rehydrate/scan/cleanup and integration tests for restart resilience
2026-03-28 16:30:23 -04:00
Dustin Byrne
0a5b1ed76f feat(KB-152): make triage poll() dispatch specifyTask() calls concurrently
- Change poll() to fire specifyTask() with `void` instead of `await`, enabling concurrent task specification bounded by AgentSemaphore
- Add JSDoc to poll() documenting concurrent dispatch and re-entrance guard behavior
- Add tests for concurrent dispatch, semaphore limiting, polling flag reset, and overlapping poll discovery
- Update existing re-entrance guard test to block on listTasks (discovery) rather than specifyTask
- Fix existing paused-tasks and globalPause tests for non-blocking dispatch timing
2026-03-28 16:30:23 -04:00
Dustin Byrne
a37f1d2260 feat(KB-151): immediately resume agentic activity on global unpause
- Add settings:updated listener in Scheduler to trigger schedule() on globalPause true→false transition
- Add settings:updated listener in TriageProcessor to trigger poll() on globalPause true→false transition
- Add unpause handler in dashboard to resume orphaned executor tasks and sweep merge queue
- Guard all resume paths against no-op transitions (false→false, true→true) and stopped state
- Add tests for all three resume paths covering transition edge cases
2026-03-28 16:30:23 -04:00
Dustin Byrne
0f2958df69 feat(KB-150): kill active agent sessions on global pause
- Add settings:updated event to TaskStore with previous/new settings payload
- Kill all active executor agent sessions when globalPause transitions false→true
- Kill all active triage specification sessions on global pause with clean status reset
- Track and dispose active merger session on global pause via onSession callback
- Add JSDoc documenting global pause behavior on executor and triage constructors
2026-03-28 16:30:23 -04:00