| Age | Commit message (Collapse) | Author |
|
|
|
The task was being added to the prompt twice, once in the base prompt and once
in the user prompt.
|
|
Worked with Gemini and Opus to improve the system prompt with learnings from the
Amp prompt. Removed reference to Omni/Task/README.md because it is deprecated in
favor of `jr task`.
|
|
jr prompt <task-id> constructs and prints the full system prompt
that would be sent to the agent, including:
- Agent configuration (model, cost budget)
- Base instructions
- AGENTS.md content
- Relevant facts from knowledge base
- Retry/progress context if applicable
Useful for debugging agent behavior and token usage.
|
|
|
|
Timeline tool display:
- Grep/search: ✓ Grep pattern in filepath
- Read file: ✓ Read filepath @start-end
- Edit file: ✓ Edit filepath
- Bash: ϟ command (lightning bolt prompt)
- Tool results only shown for meaningful output
New search_and_read tool:
- Combines search + read in one operation
- Uses ripgrep --context for surrounding lines
- More efficient than separate search then read
Worker prompt updated to prefer search_and_read over
separate search + read_file calls
|
|
timelineScrollScript now checks autoscrollEnabled before scrolling
|
|
- Add ComplexityForm and ComplexityBadgePartial types
- Add /tasks/:id/complexity POST endpoint
- Add complexityBadgeWithForm component with dropdown
- Add complexity dropdown JS for keyboard navigation
- Add CSS styles for complexity dropdown
- Always show complexity badge (Set Complexity if none)
Task-Id: t-219
|
|
- Components.hs: Fix escaped quotes in renderFormattedJson
- Style.hs: Use overflowWrap instead of wordBreak for breakWord value
|
|
- Fix Worker.hs to use EngineError instead of tuple
- Fix Types.hs imports for LazyText.encodeUtf8 and dayOfWeek
- Remove duplicate SortOrder from Components.hs (import from Types.hs)
- Add orphan instance pragmas to Pages.hs and Partials.hs
- Clean up unused imports
|
|
The HTMX-refreshed AgentEventsPartial was missing:
- Cost/token summary in header
- Live toggle button
- Autoscroll toggle button
- Comment form
Now matches the full page renderUnifiedTimeline output.
|
|
Large files cause agent token bloat and edit_file failures.
This adds a warning (not error) to encourage splitting.
Task-Id: t-228
|
|
Split 3231-line Web.hs into focused submodules:
- Types.hs (346 lines): Data types, forms, API definition
- Components.hs (1464 lines): Reusable UI components
- Pages.hs (866 lines): Full page ToHtml instances
- Partials.hs (247 lines): HTMX partial ToHtml instances
- Handlers.hs (642 lines): Servant handler implementations
- Web.hs (39 lines): Main module with run function
Reduces main file by 99%, preventing agent token bloat.
Task-Id: t-226
Amp-Thread-ID: https://ampcode.com/threads/T-355fae3a-03e9-4bdb-a1c7-6132576bf601
Co-authored-by: Amp <amp@ampcode.com>
|
|
Jr was completing tasks but then going into verification loops,
re-reading files and 'tracing through logic' after tests passed.
This burned ~4 cents of extra cost on t-221.
Made instructions more emphatic:
- 'STOP IMMEDIATELY' with explicit list of what NOT to do
- 'ANY further tool calls are wasted money'
- Repeated in BUILD SYSTEM NOTES section
Task-Id: t-227
|
|
Changed taskToUnixTs from round to ceiling to prevent sub-second
timing issues where a task updated at e.g. 10:00:00.3 would round
down to 10:00:00, causing the next poll with since=10:00:00 to
include it again.
Task-Id: t-221
|
|
getReadyTasks now returns tasks sorted by:
1. Priority (P0 first, then P1, P2, etc.)
2. Creation time (oldest first within same priority)
This ensures high-priority items are always at the top of both
the CLI 'jr task ready' output and the web dashboard.
Task-Id: t-220
|
|
Instructs the agent to:
- Use line ranges when reading large files (>500 lines)
- Use minimal context for edit_file old_str matching
- Re-read exact lines after failed edits
- Stop after 2-3 failed edits to reconsider approach
- Flag very large files (>2000 lines) for refactoring
Task-Id: t-225
|
|
Tracks 'old_str not found' errors from edit_file tool calls. After 5
consecutive failures, stops the agent to prevent burning tokens on
impossible edits.
This catches the pattern where the agent repeatedly tries to edit a
large file with incorrect old_str matches, which was the root cause
of t-222 exceeding its cost budget.
Task-Id: t-224
|
|
Cost limits by complexity level:
- Complexity 1: 50 cents
- Complexity 2: 100 cents
- Complexity 3: 200 cents (default)
- Complexity 4: 400 cents
- Complexity 5: 600 cents
This prevents low-complexity tasks from burning budget while allowing
complex tasks more room for iteration.
Task-Id: t-223
|
|
Allows updating complexity along with status in a single command:
jr task update t-123 in-progress --complexity=3
Task-Id: t-222
|
|
Adds a toggle button next to the LIVE indicator that controls whether
the timeline auto-scrolls to new events. Default is ON.
- renderAutoscrollToggle button with ⬇ icon
- toggleAutoscroll() JS function tracks state
- htmx:afterSettle checks autoscrollEnabled before scrolling
- Blue styling to differentiate from green LIVE button
Task-Id: t-222
|
|
- Add cost/token summary to timeline header
- Filter Cost events from timeline display
- Remove Execution Details section (cost info now in header)
- Remove unused renderExecutionDetails function
Task-Id: t-216
|
|
- Add clickable LIVE toggle button that pauses/resumes timeline polling
- Green pulsing when active, grey when paused
- Uses htmx:beforeRequest event to cancel requests when paused
- Increase duplicate tool call guardrail from 20 to 30
Task-Id: t-211
|
|
|
|
This reverts commit 9c3034853c3cacea8a77358467acf46e75c982f5.
|
|
- Add formatToolCallSummary to extract key argument from JSON
- Shows run_bash command, file paths for read/edit/write, patterns for search
- Display summary inline in tool call header (e.g., run_bash: `ls -la`)
- Increase token guardrail from 1M to 2M to prevent premature stops
Task-Id: t-212
|
|
Simplify auto-scroll behavior to always scroll to bottom after HTMX swap,
rather than checking if user is near bottom. This ensures latest messages
are always visible as they come in.
Task-Id: t-208
|
|
- Remove HumanTask from TaskType enum (now Epic | WorkTask only)
- Add NeedsHelp to Status enum for tasks requiring human guidance
- Update getReadyTasks to filter NeedsHelp instead of HumanTask
- Rename humanTasks to tasksNeedingHelp in HumanActionItems
- Add CLI parsing for needs-help status in list/update commands
- Add badge styling for NeedsHelp (amber/yellow theme)
- Update all status pattern matches in tree view and print functions
- Update tests to verify NeedsHelp exclusion from ready queue
Task-Id: t-210
|
|
Links inside the recent-activity div were inheriting hx-target=#activity-list
from the parent, causing page content to be swapped into the list item
instead of navigating. Explicitly set hx-target=body on list group items.
|
|
The intention was for this to be instructions for the coding agents to create
commit messages, but they never read this file, so just delete it.
|
|
This was cutting off jr's commit messages so now I have a bunch of commit
messages that are just cut off in the middle. Ugh.
|
|
Good! The tests are passing. My fix addresses the JavaScript error
by ma
However, this might not fully solve the problem of links not
working. Th
The issue was that the JavaScript code in the `hx-vals` attribute used
`
**Fix:** Changed the JavaScript expression from: ```javascript
hx-vals="js:{since: this.dataset.newestTs}" ```
to: ```javascript hx-vals="js:{since:
document.getElementById('recent-activity')?.dataset? ```
This uses optional chaining (`?.`) to safely access the data
attribute a
The tests pass, confirming the fix doesn't break existing
functionality.
Task-Id: t-176
|
|
Perfect! The implementation is complete. Let me create a summary
of what
I have successfully implemented the task complexity indicator on the
`/t
1. **Added `complexityBadge` function** in `Omni/Jr/Web.hs`
(lines 685-6
- Creates a badge displaying the complexity with the ℂ symbol
(comple - Format: "ℂ {1-5}" - Includes a tooltip "Task Complexity
(1-5)" - Uses CSS classes for styling with different colors for
each complex
2. **Integrated complexity badge into task detail page** in
`Omni/Jr/Web
- Added conditional rendering that only shows the badge if
`taskCompl - Positioned after the priority badge with a separator
(·) - Follows the same pattern as other metadata badges
3. **Added CSS styles** in `Omni/Jr/Web/Style.hs` (lines 696-713):
- Base `.badge-complexity` style - Individual styles for each
complexity level (1-5) with appropriate
- Complexity 1: Green (easy task) - Complexity 2: Blue (moderate)
- Complexity 3: Amber (medium complexity) - Complexity 4: Darker
amber (high complexity) - Complexity 5: Red (very complex)
- Used the ℂ (complex numbers) symbol as suggested in the task
descripti - Made it non-editable (read-only badge) since complexity is
set during - Only displays when complexity is set (handles `Maybe Int`
gracefully) - Color scheme follows a gradient from green (easy) to red
(complex) - Consistent with existing badge styling patterns in the UI
✅ All tests pass successfully with `bild --test Omni/Jr.hs`
The feature is now complete and ready for use. Tasks with a
complexity r
Task-Id: t-207
|
|
Otherwise we end up running stale artifacts and that's no good.
|
|
The limit of 5 was too aggressive - reading 5 different files while
exploring a codebase would trigger the guardrail. 20 allows for
legitimate exploration while still catching infinite loops.
|
|
- Comment bubble: #1f2937 (dark gray) on #f3f4f6 background - Thought
bubble: #78350f (dark amber) on #fef3c7 background
|
|
- Add dark mode styles for comment-bubble and thought-bubble - Render
comments with renderMarkdown instead of plain text - Render thoughts
with renderMarkdown instead of renderTextWithNewlines - Remove unused
renderTextWithNewlines function
|
|
- Timeline partial now uses getAllEventsForTask instead of
getEventsForSession
so all events show after HTMX refresh, not just the latest session
- Move Execution Details header outside HTMX swap target so it persists
Task-Id: t-214, t-215
|
|
- updateTaskStatusWithActor logs status_change events to agent_events
- Worker uses Junior actor for status changes - Jr review uses
System/Human actors appropriately - CLI task update uses Human actor
- Remove task_activity table schema (migrated to agent_events) -
addComment now inserts into agent_events with event_type='comment'
Task-Id: t-213
|
|
- Rename agentLogScrollScript to timelineScrollScript - Target
.timeline-events instead of obsolete .agent-log class - Rename
agentLogStyles to timelineEventStyles - Remove obsolete container
styles (.agent-log-section, .agent-log-live, .agent-log) - Remove
dark mode styles for obsolete classes
Task-Id: t-213.6
|
|
- Add 'actor' column to agent_events table (human/junior/system)
- Add System to CommentAuthor type (reused for actor) - Add SQL
FromField/ToField instances for CommentAuthor - Update insertAgentEvent
to accept actor parameter - Update all SELECT queries to include
actor column - Update Worker.hs to pass actor for all event types -
Guardrail events logged with System actor
Migration: ALTER TABLE adds column with default 'junior' for existing
rows.
Task-Id: t-213.1
|
|
Light mode: light gray background (#f8f8f8) with dark text and subtle
border Dark mode: dark background (#1e1e1e) with light text
Previously used dark theme for both modes which had poor contrast in
light mode.
Task-Id: t-206
|
|
Wrap entire tool result in a <details> element so it starts collapsed.
User can click to expand and see full output.
Task-Id: t-205
|
|
Implement runtime guardrails in Engine.hs: - Cost budget limit (default
200 cents) - Token budget limit (default 1M tokens) - Duplicate tool
call detection (same tool called N times) - Test failure counting
(bild --test failures)
Add database-backed progress tracking: - Checkpoint events stored in
agent_events table - Progress summary retrieved on retry attempts -
Improved prompts emphasizing efficiency and autonomous operation
Worker.hs improvements: - Uses guardrails configuration - Reports
guardrail violations via callbacks - Better prompt structure for
autonomous operation
Task-Id: t-203
|
|
Use renderMarkdown for comment text instead of plain text rendering.
Comments now support formatting, code blocks, lists, etc.
Task-Id: t-204
|
|
|
|
Perfect! All changes are in place and working correctly. Let me
create a
I have successfully implemented the improvements to Jr Worker
agent stru
1. **Progress File Tracking**
- Added `readProgressFile` function to read
`_/llm/${taskId}-progress - Added `buildProgressPrompt` function
to include progress context in - Modified `runWithEngine` to load
and include progress at the start
2. **Incremental Workflow Enforcement**
- Updated base prompt to explicitly instruct: "Pick ONE specific
chan - Added "INCREMENTAL WORKFLOW (IMPORTANT)" section with clear
guidanc - Added instruction to write progress after each change -
Emphasized that tasks may be run multiple times to complete all cha
3. **Explicit Verification**
- Maintained existing requirement to run `bild --test` before
complet - Added instruction to save progress only after tests pass -
Clarified that code must be left in clean, testable state
4. **Avoid Redundant Testing**
- Updated BUILD SYSTEM NOTES to clarify running `bild --test`
on name - Added explicit instruction not to re-run tests unless
more changes - Explained that bild handles dependencies transitively
- `bild --test Omni/Agent/Worker.hs` - **PASSED** ✓ - `lint
Omni/Agent/Worker.hs` - **NO ISSUES** ✓
- `_/llm/t-203-progress.md` - Progress file documenting this
implementat - `_/llm/t-203-implementation-summary.md` - Detailed
summary of changes
The implementation follows industry best practices from Anthropic,
OpenA - Reduced token usage through focused, incremental changes
- Better code quality with isolated, tested changes - Improved
reliability with progress tracking across sessions - Clear workflow
preventing "declaring victory" too early
Task-Id: t-203
|
|
Perfect! The changes are exactly what we need. The diff shows that I've
1. ✅ `bild --test` on a namespace tests all its dependencies -
no need t 2. ✅ Don't re-run tests after they already passed 3. ✅
Lint runs automatically via git hooks, so manual runs are optional
I have successfully completed task t-202. The changes made to
`Omni/Agen
1. **Explaining dependency handling**: Added explicit note that
`bild --
2. **Preventing redundant testing**: Added instruction to not
re-run tes
3. **Clarifying lint automation**: Explained that lint runs
automaticall
All tests pass (`bild --test Omni/Agent/Worker.hs`) and all lint checks
Task-Id: t-202
|
|
Excellent! The changes have been successfully applied. Let me create
a s
The issue was that agent event content was being double-encoded in
the w
1. **ToolResult events** showed raw JSON like `{"output":"Replaced 1
occ 2. **Assistant messages** showed literal `\n` instead of actual
newlines
- In `Omni/Agent/Engine.hs` (line 600), tool results are JSON-encoded
wh - These JSON strings are stored as-is in the database via
`insertAgentEv - The Web UI was displaying these JSON strings directly
without decoding - Assistant messages contained literal `\n` escape
sequences that weren'
I modified `Omni/Jr/Web.hs` with the following changes:
1. **Added import**: `Data.Aeson.KeyMap` to work with JSON objects
2. **Created helper function `renderTextWithNewlines`** (line
2545-2553)
- Splits text on literal `\n` sequences - Renders each part with
`<br>` tags between them - Used in `renderAssistantEvent` to
properly display newlines
3. **Created helper function `renderDecodedToolResult`** (line
2555-2563
- Attempts to decode JSON content - Extracts the `output` field
from the JSON object - Falls back to raw content if parsing fails -
Used in `renderToolResultEvent` to show clean output instead of raw
4. **Updated `renderAssistantEvent`** (line 2473):
- Changed from `Lucid.toHtml truncated` to `renderTextWithNewlines
tr
5. **Updated `renderToolResultEvent`** (lines 2502-2503):
- Changed both occurrences from `Lucid.toHtml content` to
`renderDeco
The build now passes successfully with `bild --test Omni/Jr/Web.hs`.
Task-Id: t-200
|
|
Comments now track whether they were made by a Human or by Junior
(the agent). The CommentAuthor type is stored in the database and
displayed in the web UI with styled badges.
Task-Id: t-201
|