Commit Graph

996 Commits

Author SHA1 Message Date
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
b0d361cc3c feat(KB-156): add search input to dependency dropdowns
- Add searchable text input to TaskDetailModal dependency dropdown with filtering by id, title, and description
- Add matching search input to InlineCreateCard dependency dropdown
- Add sticky .dep-dropdown-search CSS with focus styling
- Reset search term when dropdown closes and reopens
- Add tests for search filtering, case-insensitive matching, empty state, and reset behavior
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
e20134a474 feat(KB-155): sort dependency dropdown newest-first by createdAt
- Sort availableTasks in TaskDetailModal by createdAt descending (newest first)
- Add test verifying dropdown items appear in newest-first order
- Exclude current task from dropdown list as before
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
Dustin Byrne
711b19740d fix(KB-148): fix triage concurrency and scheduler double-counting
- Add re-entrance guard to triage poll() to prevent overlapping poll cycles
- Move status update to 'specifying' inside semaphore callback so queued tasks don't appear active
- Fix scheduler double-counting specifying tasks when semaphore is present
- Add tests for poll re-entrance guard, semaphore-aware status transitions, and scheduler slot counting
- Add changeset for patch release
2026-03-28 16:30:23 -04:00
Dustin Byrne
85687be6a0 feat(KB-147): auto-pause engine on API usage limit errors
- Add UsageLimitPauser class and isUsageLimitError detector for rate limits, overloaded, and quota errors
- Integrate usage limit detection into executor, triage, and merger error handlers
- Wire shared UsageLimitPauser instance in dashboard startup across all agents
- Export UsageLimitPauser and isUsageLimitError from @kb/engine public API
- Add comprehensive tests for detector patterns and agent integration
2026-03-28 16:30:23 -04:00
Dustin Byrne
36873e57ca feat(KB-145): add global pause button to halt all AI engine activity
- Add globalPause setting to core Settings type with default false
- Guard scheduler, triage, and auto-merge queue to skip work when globalPause is active
- Add pause/play toggle button in dashboard Header with optimistic UI and rollback on failure
- Add tests for scheduler, triage, Header, and App global pause behavior
- Include minor changeset for the new feature
2026-03-28 16:30:23 -04:00
Dustin Byrne
2bdd628d6d feat(KB-142): add confirm gate and abort flow to task_add_dep tool
- Add confirm parameter to task_add_dep requiring explicit opt-in before destructive action
- On confirm, abort execution, discard worktree/branch, and move task to triage
- Add triage as valid transition from in-progress for dependency-triggered re-specification
- Auto-move todo tasks to triage when dependencies are added
- Update EXECUTOR_SYSTEM_PROMPT with task_add_dep confirm behavior documentation
2026-03-28 16:30:23 -04:00
Dustin Byrne
a59fb5b857 fix(KB-144): exclude in-review worktrees from maxWorktrees limit
- Change activeWorktrees filter to only count in-progress tasks, not in-review with worktree
- Update existing scheduler test to reflect in-progress-only counting
- Add 3 new tests covering in-review tasks not blocking scheduling
- Update maxWorktrees JSDoc to reflect new semantics
- Add changeset for patch release
2026-03-28 16:30:23 -04:00
Dustin Byrne
7c685f2138 fix: prompt agents to declare dependencies when creating related tasks 2026-03-28 16:30:23 -04:00
Dustin Byrne
8a6396e4d1 Revert "feat(KB-140): add task_add_dep tool to executor"
This reverts commit a9dae834a59b60701874ee09e0b1f86d0d98b3e2.
2026-03-28 16:30:23 -04:00
Dustin Byrne
9dec324288 fix(KB-143): fix parseFileScopeFromPrompt regex and add tests
- Replace single-pass multiline regex with heading match + slice approach to avoid lazy quantifier issues
- Fix section extraction to correctly handle File Scope as both mid-file and last section
- Add tests for File Scope followed by another heading, at end of file, missing section, missing PROMPT.md, and glob patterns
2026-03-28 16:30:23 -04:00
Dustin Byrne
861179cbe7 feat(KB-139): parse dependencies, size, and review level from PROMPT.md after triage
- Add parseDependenciesFromPrompt to TaskStore to extract task IDs from ## Dependencies section
- Call dependency parser in specifyTask after PROMPT.md is written by triage agent
- Extract size (S/M/L) and review level from PROMPT.md front-matter into task metadata
- Extend updateTask to accept size and reviewLevel fields
- Add comprehensive tests for dependency parsing and triage integration
2026-03-28 16:30:23 -04:00
Dustin Byrne
8fd8b36f7d feat(KB-140): add task_add_dep tool to executor
- Add task_add_dep tool allowing agents to declare dependencies mid-execution
- Validate against self-dependency, non-existent targets, and duplicates
- Append new dependency to existing array without overwriting
- Log dependency additions via store.logEntry
- Add 7 tests covering success, self-dep, missing target, duplicate, and append behavior
2026-03-28 16:30:23 -04:00
Dustin Byrne
d151a31789 feat(KB-141): add dependency awareness to triage system prompt and task_get tool
- Add 'Dependency awareness' section to TRIAGE_SYSTEM_PROMPT instructing agent to call task_get on dependencies before writing specs
- Update task_get tool description to mention reading dependency task specs
- Add test verifying system prompt contains dependency awareness instructions
- Add test verifying task_get tool description mentions dependency specs
2026-03-28 16:30:23 -04:00
Dustin Byrne
5a851a714e feat(KB-138): add priority-based scheduling to AgentSemaphore
- Add priority levels (PRIORITY_MERGE=2, PRIORITY_EXECUTE=1, PRIORITY_SPECIFY=0) to AgentSemaphore
- Update acquire() and run() to accept a numeric priority parameter with FIFO ordering within same level
- Wire priority constants into executor (PRIORITY_EXECUTE) and triage (PRIORITY_SPECIFY) callers
- Add comprehensive tests for priority ordering, FIFO within same priority, and dynamic limit interaction
- Include changeset for the priority-based agent scheduling feature
2026-03-28 16:30:23 -04:00
Dustin Byrne
1812bf4310 feat(KB-137): add automatic port fallback when dashboard port is in use
- Handle EADDRINUSE by retrying with port 0 (OS-assigned random port)
- Print warning message showing original and fallback port
- Update banner and browser-open to use the actual bound port
- Add tests for successful listen, fallback, and warning behavior
- Add changeset for patch release
2026-03-28 16:30:23 -04:00
Dustin Byrne
7acb8c533e doc: update AGENTS.md 2026-03-28 16:30:23 -04:00
github-actions[bot]
a0005fc1e5 Version Packages (#5)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 20:33:41 -04:00
Dustin Byrne
6f35968aac feat(KB-136): add sign-in hint when no providers are authenticated
- Show 'Sign in to at least one provider to get started' message when all OAuth providers are unauthenticated
- Provider rows remain visible below the hint for easy sign-in
- Hide hint automatically when at least one provider is authenticated
- Add tests for both hint-visible and hint-hidden states
2026-03-27 20:23:26 -04:00
Dustin Byrne
5e3cc792bd feat(KB-134): exclude Bun-compiled binaries from npm publish tarball
- Refine files field in cli package.json to use specific globs instead of bare 'dist'
- Include only .js, .d.ts, .d.ts.map, .js.map, and dist/client/** in tarball
- Add tests verifying refined file globs are present
- Add tests ensuring Bun platform binaries are not matched by any glob
- Add changeset for patch release
2026-03-27 20:10:41 -04:00
Dustin Byrne
b4577994b4 feat(KB-131): bundle workspace dependencies into CLI for npm publish
- Replace tsc with tsup (esbuild) to inline @kb/* workspace code into a single dist/bin.js
- Move @kb/core, @kb/dashboard, @kb/engine from dependencies to devDependencies
- Add tsup.config.ts that copies dashboard client assets into dist/client/
- Add bundle output tests verifying shebang, inlined code, and no bare @kb/* imports
- Add changeset for the bundled CLI build fix
2026-03-27 20:10:41 -04:00
Dustin Byrne
a32897921c feat(KB-133): fix auto-scroll to use proximity-to-bottom detection
- Replace scroll-direction tracking with proximity-to-bottom check (40px threshold)
- Remove lastScrollTopRef in favor of comparing scrollTop + clientHeight to scrollHeight
- Update existing tests to use container geometry instead of scroll direction
- Add test for scrolling down but not near bottom (stays disabled)
- Add test for exact-bottom edge case (re-enables auto-scroll)
2026-03-27 20:10:41 -04:00
Dustin Byrne
abdb2e6497 feat(KB-132): auto-open Settings to Authentication tab when unauthenticated
- Add initialSection prop to SettingsModal to allow opening to a specific tab
- Export SectionId type from SettingsModal for use by parent components
- Check auth status on App mount and auto-open Settings to Authentication tab when all providers are unauthenticated
- Reset initialSection on modal close so subsequent manual opens default to General
- Add comprehensive tests for auto-open behavior and initialSection prop
2026-03-27 20:10:41 -04:00
github-actions[bot]
30cf489749 Version Packages (#4)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 02:21:39 -04:00
Dustin Byrne
e0d1abbaa4 chore: add missing changesets for KB-125, KB-126, KB-130 2026-03-27 02:19:14 -04:00
Dustin Byrne
ffc5e14876 feat(KB-130): allow dependent tasks to start from in-review dep branches
- Relax scheduler dep gate to treat in-review tasks as satisfied
- Add resolveBaseBranch() to detect in-review deps with unmerged worktrees
- Executor creates worktrees from dep branch instead of HEAD when baseBranch is set
- Extend file-overlap tracking to include in-review tasks with worktrees
- Add baseBranch field to Task type and store update logic
- Add scheduler and executor tests for in-review dependency handling
2026-03-27 02:15:20 -04:00
Dustin Byrne
b4dfca2774 docs(KB-129): document --depends flag in kb-task skill
- Add --depends <id> flag usage examples to task creation section
- Document that --depends is repeatable and blocks scheduler
- Add dependency example to the examples section at end of file
2026-03-27 02:00:28 -04:00
Dustin Byrne
039671b5ad feat(KB-126): add RETHINK rewind for plan and code reviews with REVISE enforcement
- Differentiate RETHINK handling between plan reviews (session rewind only) and code reviews (git reset + session rewind)
- Update system prompt with detailed REVISE/RETHINK verdict descriptions for plan vs code review types
- Enforce code review REVISE verdict by blocking task_update(done) until re-review passes
- Capture pre-step session checkpoints in task_update for conversation rewind on RETHINK
- Add comprehensive tests for plan RETHINK, code RETHINK, and REVISE enforcement flows
2026-03-27 01:58:46 -04:00
Dustin Byrne
c909271a62 docs(KB-128): add CLI-to-skills sync guideline to AGENTS.md
- Add CLI-to-Skills Sync section to project guidelines
- Document kb-task and kb-board skill file locations
- Remind contributors to update skill docs when CLI behavior changes
2026-03-27 01:54:47 -04:00
Dustin Byrne
7170e5ba55 feat(KB-127): add --depends flag to task create CLI command
- Add --depends flag to task create command in bin.ts and task.ts
- Support setting task dependencies at creation time via CLI
- Add tests for --depends flag including single and multiple dependencies
- Include changeset for the new CLI feature
2026-03-27 01:53:30 -04:00
Dustin Byrne
741964f271 feat(KB-125): implement RETHINK verdict with git reset and session rewind
- Capture pre-step session checkpoint in task_update when status changes to in-progress
- Handle RETHINK verdict with git reset --hard to baseline SHA to revert code changes
- Rewind agent conversation to pre-step checkpoint via navigateTree with branchWithSummary fallback
- Update system prompt to describe RETHINK as automatic revert + rewind behavior
- Replace code review REVISE enforcement tests with comprehensive RETHINK rewind tests
2026-03-27 01:49:43 -04:00
Dustin Byrne
7ec0417559 chore: add rollup changeset for all work since last release 2026-03-27 01:45:30 -04:00
Dustin Byrne
62e80abe9a docs: add AGENTS.md with project guidelines for all agents 2026-03-27 01:45:30 -04:00
Dustin Byrne
488b9260d5 feat(KB-124): enforce code review REVISE verdict before step advancement
- Track per-step code review verdicts in executor via codeReviewVerdicts map
- Block task_update(status="done") when last code review returned REVISE
- Update system prompt with enforcement language distinguishing code vs plan reviews
- Add comprehensive tests for verdict tracking, blocking, clearing, and independence across steps
2026-03-27 01:25:06 -04:00
Dustin Byrne
948928d258 feat(KB-123): add agent role tracking and expanded logging to agent system
- Extend AgentLogEntry with agent field and new event types (thinking, tool_end)
- Expand AgentLogger with thinking, tool_end callbacks and agent role support
- Wire new logging callbacks in createKbAgent and all agent call-sites (executor, merger, reviewer, triage, pi)
- Update AgentLogViewer with agent role badges and rendering for new entry types
- Export AgentRole and AgentLogType from core package and add tests for new functionality
2026-03-27 01:19:42 -04:00
Dustin Byrne
0d920e20ef chore: add changeset for readme updates 2026-03-27 00:45:30 -04:00
github-actions[bot]
6e8c4f6bb0 Version Packages (#3)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 00:44:01 -04:00
Dustin Byrne
c0e6b4d52c fix: add repository.url to cli package.json for npm provenance 2026-03-27 00:42:24 -04:00
Dustin Byrne
ce4f647c1c fix: use setup-node v5 + npm 11.6.4 for OIDC publishing 2026-03-27 00:40:54 -04:00
Dustin Byrne
cd22c2d19a fix: mark internal packages as private, only publish @dustinbyrne/kb 2026-03-27 00:28:03 -04:00
github-actions[bot]
d969db4edd Version Packages (#2)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 00:25:15 -04:00
Dustin Byrne
2595476a2d docs: update readme 2026-03-27 00:24:53 -04:00
Dustin Byrne
756fc3131d docs: clean up READMEs, mermaid diagram, quick start with kb CLI 2026-03-26 23:50:05 -04:00
Dustin Byrne
439b643f9f docs: plain ASCII workflow diagram 2026-03-26 23:50:05 -04:00
Dustin Byrne
5865655064 docs: replace box-drawing chars with plain ASCII in file tree 2026-03-26 23:50:05 -04:00
Dustin Byrne
13a60bf4d5 docs: fix workflow diagram to show actual flow with review loop 2026-03-26 23:50:05 -04:00
Dustin Byrne
f2a69edc10 docs: replace ASCII workflow diagram with mermaid 2026-03-26 23:50:05 -04:00
github-actions[bot]
7bec1501e9 Version Packages (#1)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-26 23:30:57 -04:00