summaryrefslogtreecommitdiff
path: root/Omni
AgeCommit message (Collapse)Author
2025-11-26Jr: Sequential task IDsBen Sima
All tests pass. The implementation is complete: **Summary of changes:** 1. Removed sqids dependency from `Omni/Task/Core.hs`, `Omni/Task.hs`, an 2. Changed `generateId` in `Omni/Task/Core.hs` to produce simple sequent 3. Removed the now-unused `sqidsOptions` configuration and `Web.Sqids` i Task-Id: t-1o2g8gu9y2z
2025-11-26Port task commands to jr taskBen Sima
All tests pass. The task is complete: - ✅ `jr task list` works - ✅ `jr task create` works - ✅ `jr task show` works - ✅ All Omni/Task commands accessible via `jr task` - ✅ Reuses Omni.Task logic - ✅ Added tests for task command parsing - ✅ `bild --test Omni/Jr.hs` passes Task-Id: t-1o2egbj8o0n.2
2025-11-26Add stats page (GET /stats)Ben Sima
All the necessary components are in place: 1. Route added to API type (`GET /stats` with optional `?epic=` query pa 2. `StatsPage` data type defined 3. `ToHtml` instance for `StatsPage` with all sections (By Status, By Pr 4. `statsHandler` function to handle the route 5. Handler connected in `server` 6. Link to stats page added to the dashboard 7. CSS styles for progress bars and stats sections added (including dark Task-Id: t-1o2g8gugkr1.10
2025-11-26Add mobile-first CSS stylingBen Sima
All checks pass. The Style.hs file was already implemented from a previo - Mobile-first CSS with Clay - Status badges with colored pills (Open=yellow, InProgress=blue, Review - Large touch targets (44px min height) - Single column layout on narrow screens (<600px) - Card-style sections with subtle shadows - Responsive navigation header - Dark mode support - Served at GET /style.css Task-Id: t-1o2g8gugkr1.9
2025-11-26Move test database to _/tmp (cabdir)Ben Sima
- Document _/ directory structure in AGENTS.md - Change test database path from .tasks/ to _/tmp/ - Update all references in tests and docs
2025-11-26Add task delete commandBen Sima
2025-11-26Fix test database isolation: TASK_TEST_MODE takes precedenceBen Sima
Tests were polluting production database because TASK_DB_PATH took precedence over TASK_TEST_MODE. Now test mode always uses .tasks/tasks-test.db regardless of TASK_DB_PATH setting.
2025-11-26Improve worker prompt and fix output interleavingBen Sima
- More explicit prompt: MUST run bild --test, fix hlint issues - Add workerQuiet flag to disable ANSI status bar in loop mode - Loop mode uses simple putText, manual jr work keeps status bar
2025-11-26Add task list filters (status, priority, namespace)Ben Sima
The build passes. Let me also verify that the filter functionality is co 1. **API endpoint with query params** (lines 46-49): ✅ Already has `Quer 2. **Handler** (lines 776-781): ✅ Already receives and applies filters 3. **Filter form in HTML** (lines 295-330): ✅ Already has form with drop 4. **Filter logic** (lines 787-807): ✅ Already applies AND-combined filt The implementation is complete and the hlint suggestions have been addre Task-Id: t-1o2g8gugkr1.8
2025-11-26Implement ready queue view (GET /ready)Ben Sima
The implementation is complete. The `/ready` route was already partially 1. **Priority sorting**: Added `List.sortBy (compare `on` TaskCore.taskP 2. **Heading format**: Changed from a badge-style count to the specified Task-Id: t-1o2g8gugkr1.7
2025-11-26Implement review interface (GET /tasks/:id/review with accept/reject)Ben Sima
All checks pass. The review interface implementation is complete: 1. **GET /tasks/:id/review** - Shows review interface with task details 2. **POST /tasks/:id/accept** - Marks task as Done and clears retry cont 3. **POST /tasks/:id/reject** - Reopens task as Open with retry context 4. Commit lookup by Task-Id using git log 5. Git diff display in a pre/code block 6. Merge conflict detection using cherry-pick check 7. "No commit found" message when applicable The hlint warning about avoiding lambda was fixed by using `(<.)` compos Task-Id: t-1o2g8gugkr1.6
2025-11-26Handle no-changes case: mark task Done instead of ReviewBen Sima
When amp completes but makes no changes, the task is already done. Mark it Done directly instead of Review (which would fail to find a commit).
2025-11-26Reset stuck Review tasks to Open when no commit foundBen Sima
2025-11-26Improve jr loop logging and fix review race conditionBen Sima
- Reorder loop to check pending reviews before starting new work - Loop no longer exits on missing commit (skips instead) - Add [loop], [review], [worker] prefixes to all log messages - Worker leaves task in InProgress on amp failure (avoids retry loop)
2025-11-26Remove outdated git commit note from task updateBen Sima
2025-11-26Remove git-tracked task references from hooks and docsBen Sima
- Remove task sync from pre-commit hook - Remove task import from post-merge and post-checkout hooks - Remove merge driver config from post-checkout - Remove merge-driver command from jr - Update Task README for SQLite storage - Delete outdated WORKER_AGENT_GUIDE.md Amp-Thread-ID: https://ampcode.com/threads/T-f2358f5a-2d4a-47e7-a895-6647474d8311 Co-authored-by: Amp <amp@ampcode.com>
2025-11-26Remove task sync command and git-tracked tasksBen Sima
Tasks are now stored in SQLite at ~/.cache/omni/tasks/tasks.db. No need to sync to git anymore. Deleted 51 test cruft tasks.
2025-11-26Use task title as commit subject, amp output as bodyBen Sima
Fixes gitlint failures by using the pre-validated task title as the commit subject line, while preserving amp's output in the body for review context. Body lines are truncated to 72 chars for compliance.
2025-11-26The implementation is complete. Summary of what was implementedBen Sima
1. **POST /tasks/:id/status** endpoint accepting form data with 'status' field (line 35) 2. **Status parsing** from form via `FromForm StatusForm` instance (lines 47-52) - handles Open, InProgress, Review, Approved, Done 3. **Calls TaskCore.updateTaskStatus** (line 337) 4. **Redirects** back to `/tasks/:id` with 303 status using `PostRedirect` type (line 26, 335-338) 5. **Error handling** for invalid status via `FromForm` returning `Left "Invalid status"` (line 52) which Servant converts to a 400 error Task-Id: t-1o2g8gugkr1.4
2025-11-26Fix worker: only set Review after commit succeedsBen Sima
If commit fails (lint hooks, etc), save retry context and reopen task for another attempt. After 3 failures, mark for human intervention. Task-Id: t-1o2g8gugkr1
2025-11-26Fix auto-review to use full namespace pathBen Sima
Task-Id: t-1o2g8gugkr1
2025-11-26Add task detail view with status formBen Sima
Task-Id: t-1o2g8gugkr1.3 Amp-Thread-ID: https://ampcode.com/threads/T-dc8aefa0-840e-412d-bc09-9c446be48117 Co-authored-by: Amp <amp@ampcode.com>
2025-11-26Simplify worker to use lint --fixBen Sima
Task-Id: t-1o2g8gugkr1
2025-11-26Add task list view with mobile-friendly cardsBen Sima
Task-Id: t-1o2g8gugkr1.2
2025-11-26Clean commit message subject for gitlint complianceBen Sima
- Remove trailing punctuation from subject line - Truncate to 72 chars max - Capitalize first letter Task-Id: t-1o2g8gugkr1
2025-11-26Fix worker to run formatters before commitBen Sima
- Run ormolu --mode inplace on changed .hs files - Run hlint --refactor to auto-fix lint issues - Use tryCommit that returns Either instead of panicking - Prevents commit hook failures from hlint violations Task-Id: t-1o2g8gugkr1
2025-11-26Add jr loop command for autonomous work+review cycleBen Sima
- jr review [<task-id>] [--auto]: auto-accepts if tests pass - jr review (no args): picks first task in Review status - jr loop [--delay=N]: runs work->review loop continuously - Auto-review runs bild --test on task namespace Task-Id: t-1o2g8gugkr1
2025-11-26Add jr web command with Servant skeletonBen Sima
Task-Id: t-1o2g8gugkr1.1
2025-11-25jr: implement Gerrit-style conflict handlingBen Sima
- Add RetryContext to track failed attempts (merge conflicts, rejections) - jr review checks for clean cherry-pick before showing diff - If conflict detected, kicks back to coder with context - Worker prompt includes retry context (attempt count, conflict files, reason) - After 3 failed attempts, marks task for human intervention Task-Id: t-1o2g8gudqlx
2025-11-25worker: format commit messages for gitlint complianceBen Sima
Split amp output into subject/body with blank line separator. Task-Id: t-1jbp4l5o Amp-Thread-ID: https://ampcode.com/threads/T-7d88c849-530f-4703-9f90-cbc86d608e3c Co-authored-by: Amp <amp@ampcode.com>
2025-11-25task: use sqids for uniform-length IDsBen Sima
8-char lowercase IDs using sqids with sequential counter. Task-Id: t-1o2g8gu9y2z Amp-Thread-ID: https://ampcode.com/threads/T-7d88c849-530f-4703-9f90-cbc86d608e3c Co-authored-by: Amp <amp@ampcode.com>
2025-11-25fix(agent): show elapsed duration instead of wall clock timeBen Sima
Task-Id: t-1o2g8gu6p8o
2025-11-25fix(jr): review command git show argsBen Sima
Task-Id: t-1o2g8gu6p8o
2025-11-25feat: implement t-1o2eyi9ipb2Ben Sima
The `task sync` command is now implemented and working. It: 1. Exports tasks to `.tasks/tasks.jsonl` 2. Checks if there are any git changes 3. If there are changes, stages and commits them locally with message "task: sync task database" 4. If no changes, prints "No task changes to sync."
2025-11-25jr: add review command, --try-opus, Task-Id trailerBen Sima
- jr review <task-id>: show diff, accept/reject/skip - Worker uses --try-opus for better code quality - Commit messages use Task-Id: trailer (Gerrit-style) Task-Id: t-1o2g8gu6p8o
2025-11-24fix(task): ensure thread safety and isolate testsBen Sima
Re-introduces MVar locking in Task Core to prevent race conditions during Read-Modify-Write cycles (e.g. ID generation). Updates tests to use isolated SQLite databases instead of the production DB or JSONL files. Removes legacy test artifacts. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24deprecate(agent): move functionality to jrBen Sima
Moves the 'agent start' and 'agent merge-driver' commands to 'jr work' and 'jr merge-driver' respectively. Deletes Omni/Agent.hs as it is no longer the entry point. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24fix(agent): round credits to 2 decimal places and use totalCreditsBen Sima
Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24agent: add note about legacy merge driver logicBen Sima
Adds a comment to the merge driver logic in Omni/Agent.hs acknowledging that it may be obsolete given the removal of git-tracked tasks.jsonl, but keeping it for now to avoid breaking potential legacy rebase scenarios. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24feat: implement t-1o2egbj8o0n.3Ben Sima
I have implemented the `jr work` command in `Omni/Jr.hs`. **Changes:** 1. **Modified `Omni/Jr.hs`**: * Added necessary imports (`Omni.Agent.Core`, `Omni.Agent.Worker`, `System.Directory`, `System.FilePath`, `Data.Text`). * Updated the Docopt usage to include `jr work [<task-id>]`. * Implemented the `work` command handler in the `move` function to initialize a `Worker` and call `Worker.start`, mirroring the logic in `Omni/Agent.hs`. * Added unit tests to verify parsing of the `work` command with and without a task ID. **Verification:** * Ran `bild --test Omni/Jr.hs` which passed, confirming the code compiles and tests pass. * Ran `lint Omni/Jr.hs` which passed. * Verified `_/bin/jr --help` shows the new command. I am now ready to exit.
2025-11-24Remove harvest command and documentationBen Sima
The 'harvest' functionality was tied to git-synced JSONL task files, which have been replaced by a local SQLite database. This commit removes the command from the CLI and updates documentation to reflect the new workflow. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24feat: implement t-1o2egbj8o0n.2Ben Sima
I have successfully integrated the existing `Omni/Task` functionality into `jr`. The `Omni/Jr.hs` file already had the logic to forward `task` commands to `Omni/Task.main`, but it was failing to compile/run because it was missing a dependency declaration for `sqlite-simple` (which `Omni/Task` relies on). I added the missing dependency to `Omni/Jr.hs`: ```haskell -- : dep sqlite-simple ``` I verified the fix by running: 1. `Omni/Ide/run.sh Omni/Jr.hs task list` - Verified it lists tasks correctly. 2. `Omni/Ide/run.sh Omni/Jr.hs task create "Test Task via Jr"` - Verified it creates tasks. 3. `Omni/Ide/run.sh Omni/Jr.hs task show <id>` - Verified it shows task details. 4. `Omni/Ide/run.sh Omni/Jr.hs task -h` - Verified it shows `task` specific help. 5. `Omni/Ide/run.sh Omni/Jr.hs task test` - Verified it runs the `Omni/Task` test suite. 6. `bild --test Omni/Jr.hs` - Verified `Omni/Jr.hs` itself builds and passes its own tests. All `jr task` commands now behave exactly like the `task` command, fulfilling the requirements. The existing `Omni/Task` logic is fully reused.
2025-11-24agent: restore git commit with amp outputBen Sima
Re-enables git commits in the worker, using the captured output from 'amp' as the commit message. Also updates 'Omni/Agent.hs' to handle the API change in TaskCore.exportTasks (commenting out harvest logic for now as it depended on git-tracked tasks). Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24task: migrate storage from jsonl to sqliteBen Sima
Removes .tasks/tasks.jsonl and replaces it with a local SQLite database (.tasks/tasks.db). Adds --db flag to CLI. Removes sync command. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-24Remove git actions from workerBen Sima
2025-11-24fix(worker): remove unnecessary reset to worker branchBen Sima
2025-11-24Allow worker to take a specific task to work onBen Sima
2025-11-24feat: implement t-1o2egbj8o0n.1Ben Sima
2025-11-24feat(jr): Create Omni/Jr.hs main entry pointBen Sima
Amp-Thread-ID: https://ampcode.com/threads/T-663b6704-a8b0-4983-a62f-0ef00c61410c Co-authored-by: Amp <amp@ampcode.com>
2025-11-24Display credits correctly and don't loop agentBen Sima