Commit Graph

5924 Commits

Author SHA1 Message Date
YeonGyu-Kim 2c299d2d9e Merge pull request #3943 from code-yeongyu/feature/boulder-evolution-and-discipline-agents
feat: boulder evolution + discipline agents (multi-work, timings, CLI, hooks, Oracle phase gates, no-excuses retry)
2026-05-11 14:54:58 +09:00
YeonGyu-Kim 29c42485a8 fix(hooks/atlas): capture plan snapshot for .sisyphus paths
Oracle review of PR #3943 surfaced that endTaskTimer never fires for real Prometheus plans because their canonical path is .sisyphus/plans/ and the snapshot capture was nested inside the !isSisyphusPath branch intended for direct-work warning suppression. Move the snapshot/path tracking out of the warning gate so all plan-file edits are snapshotted regardless of .sisyphus prefix. Keep the warning branch isSisyphus-gated so Atlas does not yell at legitimate plan edits.

Regression test now uses a real .sisyphus/plans/ path and fails against HEAD before the fix.
2026-05-11 14:48:49 +09:00
YeonGyu-Kim cf5fe757df feat(hooks/atlas): parse task_key from delegation prompt for parallel batches 2026-05-11 14:28:56 +09:00
YeonGyu-Kim e3cddb3650 feat(hooks/atlas): end task timer when plan checkbox flips to checked via edit 2026-05-11 14:27:03 +09:00
YeonGyu-Kim b8c25b3b75 refactor(hooks/atlas): remove unused resolveSessionOrigin helper 2026-05-11 14:26:10 +09:00
YeonGyu-Kim 079a2cd65a fix(start-work): preserve existing works when starting an explicit new plan 2026-05-11 14:25:52 +09:00
YeonGyu-Kim dd5f77562a fix(boulder-state): missing plan file no longer reports isComplete=true 2026-05-11 14:25:35 +09:00
YeonGyu-Kim ce2f3af001 fix(boulder-state): make completeBoulder idempotent on already-completed works 2026-05-11 14:25:06 +09:00
YeonGyu-Kim 70351534d0 style(agents): replace em dashes with semicolons/periods
Comply with the no-em-dash constraint flagged in PR #3943 review.
Two single-line replacements:
- opus-4-7-prompt-sections.ts:149 retry guidance copy
- plan-generation.ts:65 Oracle gate guidance copy

No behavioral change.
2026-05-11 14:23:34 +09:00
YeonGyu-Kim 14b9a434d7 fix(cli/boulder): strip ANSI in formatter test so FORCE_COLOR CI passes
picocolors emits ANSI escape codes when FORCE_COLOR is set (GitHub
Actions default), so the literal toContain('status: active') assertion
fails against the wrapped 'status: \x1b[36mactive\x1b[39m' output.
Reuse the existing stripAnsi helper from src/cli/doctor/format-shared.ts
in the test before assertion.

Reproduced locally with FORCE_COLOR=1 bun test src/cli/boulder/formatter.test.ts.
2026-05-11 14:11:28 +09:00
YeonGyu-Kim de9c28a095 fix(hooks/atlas): align completion behavior tests with task-4 timing updates 2026-05-11 13:49:36 +09:00
YeonGyu-Kim 1ebf89cb9f feat(hooks/atlas): inject boulder-complete elapsed-time nudge once per work
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:43:40 +09:00
YeonGyu-Kim a1c6e6b77d fixup! feat(hooks/atlas): use getWorkForSession in boulder lookups and session tracking 2026-05-11 13:42:39 +09:00
YeonGyu-Kim c34508235f feat(cli/boulder): implement boulder() entry point and register subcommand 2026-05-11 13:41:18 +09:00
YeonGyu-Kim 30984939eb feat(cli/boulder): add types and formatter for boulder subcommand 2026-05-11 13:41:09 +09:00
YeonGyu-Kim fb2f696b47 docs(start-work): document multi-work resume flow in agent template
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:41:06 +09:00
YeonGyu-Kim d6f4199cab feat(start-work): use getWorkResumeOptions for multi-work resume selection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:40:57 +09:00
YeonGyu-Kim 29b44fffd0 feat(hooks/atlas): call completeBoulder when progress.isComplete 2026-05-11 13:40:48 +09:00
YeonGyu-Kim 127112e1e2 feat(hooks/atlas): wire per-task timers via startTaskTimer/endTaskTimer 2026-05-11 13:39:47 +09:00
YeonGyu-Kim f2a5ef0966 feat(hooks/atlas): add BOULDER_COMPLETE_PROMPT template and SessionState guard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:37:35 +09:00
YeonGyu-Kim 18af3d3617 feat(hooks/atlas): use getWorkForSession in boulder lookups and session tracking 2026-05-11 13:37:19 +09:00
YeonGyu-Kim 42db7078af feat(boulder-state): add formatDurationHuman utility
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:35:59 +09:00
YeonGyu-Kim 0c6805cc62 prompt(prometheus): add Oracle phase-gate verification between phases
Inserts blocking Oracle verification todos (plan-1b / plan-2b /
plan-6b in the canonical, plan-1b / plan-2b / plan-5b in the gpt and
gemini variants) between each major Prometheus phase. Each gate is a
single task(subagent_type=oracle) invocation that must return
VERDICT: GO; NO-GO is a directive to fix the cited issues and rerun on
the same Oracle session, not a license to skip.

Adds a new 'Oracle Verification (Phase Gates)' section to
plan-generation.ts with the concrete invocation prompts for each gate:
phase 1 verifies interview completeness, phase 2 verifies the generated
plan, phase 3 verifies plan readiness for execution before /start-work
handoff.

Also adds a plan-generation.test.ts smoke suite (9 cases) that pins
the new todo ids, the section name, the GO/NO-GO format, the
'fix the cited issues' fallback, and the relative ordering.
2026-05-11 13:32:38 +09:00
YeonGyu-Kim 8c238a11a2 prompt(atlas): replace retry cap with no-excuses policy and add boulder-complete response
Drops 'Maximum 3 retries' / 'document and move on' across every Atlas
variant (default, opus-4-7, gpt, kimi, gemini). New text forbids the
'false positive' excuse explicitly and instructs Atlas to keep iterating
on the same task_id, attaching a diagnosis plan, until verification
passes — and to spawn a different-angle subagent only when the original
loops.

Adds a shared <boulder_completion_response> section composed by
shared-prompt.ts. When the hook injects the BOULDER COMPLETE nudge,
Atlas now knows to print TOTAL ELAPSED + per-task elapsed times in the
exact summary shape, confirm boulder.json state, and only mark
pass-final-wave after the Final Wave reviewers approve.
2026-05-11 13:32:27 +09:00
YeonGyu-Kim 29c29da3a8 Merge pull request #3942 from code-yeongyu/fix/3819-compaction-agent-token-cache
fix(compaction): ignore compaction agent updates
2026-05-11 13:30:49 +09:00
YeonGyu-Kim 5d823b5078 feat(boulder-state): add task timer + completion helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:30:29 +09:00
YeonGyu-Kim 9f500743d1 feat(boulder-state): add session-aware multi-work storage helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:28:58 +09:00
YeonGyu-Kim 49ff4b5f8d fix(compaction): ignore compaction agent updates
Fixes #3819
2026-05-11 13:25:29 +09:00
YeonGyu-Kim 246e0dca80 feat(boulder-state): add BoulderWorkState and timing fields to types
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 13:24:28 +09:00
YeonGyu-Kim cfe94fc2a8 Merge pull request #3941 from code-yeongyu/fix/delegate-task-metadata
[codex] preserve native delegate task metadata
2026-05-11 13:20:10 +09:00
YeonGyu-Kim 0fd918ea80 fix(delegate-task): preserve native task metadata 2026-05-11 13:08:56 +09:00
YeonGyu-Kim 726c82e131 Merge pull request #3939 from code-yeongyu/fix/ralph-loop-message-dispatch
fix(ralph-loop): commit iteration only after continuation is dispatched
2026-05-11 13:07:53 +09:00
YeonGyu-Kim 2e36a92c25 fix(ralph-loop): revalidate ownership and harden commit/session-creation failures
Three correctness fixes on top of the dispatch-before-commit invariant:

- ralph-loop-event-handler.ts: after idleSettleMs, also require state ownership and non-verification-pending to match the event source before dispatching. Applied to both the session.idle and session.error retry paths.
- verification-failure-handler.ts: if incrementIteration fails after a successful continuation injection, clear the loop state and emit a warning toast instead of returning success.
- session-reset-strategy.ts: catch thrown session.create errors so they route through the typed session_creation_rejected path instead of surfacing as an unhandled rejection.
2026-05-11 13:02:16 +09:00
YeonGyu-Kim 35cab4db10 test(ralph-loop): cover ownership race, verification commit failure, session.create throw
Three additional invariant tests addressing the gaps surfaced by Cubic and the post-implementation review:

- idle path must not dispatch when state ownership changes during the idleSettleMs window
- verification-failure path must treat incrementIteration failure as a loud failure, not a success
- reset strategy must surface session.create rejections as session_creation_rejected even when the SDK throws instead of returning an error envelope
2026-05-11 13:02:07 +09:00
YeonGyu-Kim 954aa1f121 fix(compaction): isolate preservation hook failures 2026-05-11 12:54:32 +09:00
YeonGyu-Kim caaae19155 fix(ralph-loop): commit iteration only after verification continuation dispatches
Split the verification-failure restart into clearVerificationState (clears\nthe verification flags so we cleanly transition back to the main loop)\nfollowed by injectContinuationPrompt, with incrementIteration only on\nsuccessful injection. On rejection: clear the loop state and emit a loud\nwarning toast. Mirrors the dispatch-before-commit contract enforced for\nthe idle and session.error paths.
2026-05-11 12:46:35 +09:00
YeonGyu-Kim 09c45c3acb fix(ralph-loop): commit iteration only after continuation is dispatched
Reorder the session.idle and session.error retry paths so the durable\niteration counter and the progress toast advance only when continueIteration\nreturns dispatched. On dispatch_rejected or session_creation_rejected,\nclear the loop state and emit a loud failure toast instead of silently\nlogging while the loop appears to make progress.\n\nAdds an explicit settle-window state check so a session.deleted firing\nduring the idleSettleMs sleep no longer feeds dispatch against a cleared\nloop. Keeps idleSettleMs intact for the original idle-settle race.
2026-05-11 12:46:07 +09:00
YeonGyu-Kim d4cdeaccbe fix(ralph-loop): return typed ContinuationResult from continueIteration
Replace silent returns in continueIteration with a discriminated union\n(dispatched | session_creation_rejected | dispatch_rejected). Wraps\ninjectContinuationPrompt in try/catch so reset-strategy createIterationSession\nreturning null and promptAsync rejections both surface as typed failures\nthe caller can react to.
2026-05-11 12:45:59 +09:00
YeonGyu-Kim f0857a88fb test(ralph-loop): add dispatch-failure invariant tests
Lock the contract that durable iteration state and visible UI must only\nadvance when the continuation dispatch is semantically accepted. Adds 4\npermanent invariant tests covering the idle, session.error retry, and\nverification-failure orchestration paths, plus the reset-strategy\nsilent-null path.
2026-05-11 12:45:51 +09:00
YeonGyu-Kim bd4db2acfd Merge pull request #3938 from code-yeongyu/fix/delegate-bg-completion-message
fix(background-agent): retry deferred parent wake
2026-05-11 12:43:38 +09:00
YeonGyu-Kim a5cc498433 fix(background-agent): retry deferred parent wake 2026-05-11 12:38:04 +09:00
YeonGyu-Kim 917398b719 fix(team-mode): cleanup team runs on shutdown 2026-05-11 12:37:54 +09:00
YeonGyu-Kim 59209f0659 fix(team-mode): track session-created team runs 2026-05-11 12:37:20 +09:00
YeonGyu-Kim ac9e375d85 fix(delegate-task): align continuation task metadata titles 2026-05-11 12:21:37 +09:00
github-actions[bot] 5bb0b0140e @Qihao0v0 has signed the CLA in code-yeongyu/oh-my-openagent#3934 2026-05-11 03:09:37 +00:00
acamq b213d0dab1 Merge pull request #3929 from wenghuayang96/fix/runtime-fallback-volcano-quota
fix(runtime-fallback): match Volcano Engine quota exceeded errors
2026-05-10 20:27:17 -06:00
acamq 38c50d6a39 Merge pull request #3827 from ShishaBoyTJ/fix/tmux-subagent-single-dispatch
fix: support cmux tmux compatibility
2026-05-10 19:41:10 -06:00
acamq 0d19c31274 fix: add cmux __tmux-compat prefix to interactive_bash tool
Extract isCmuxCompatEnvironment to shared module and fix
interactive_bash to resolve cmux executables with the __tmux-compat
prefix, matching all other tmux command paths in the codebase.
2026-05-10 19:29:42 -06:00
github-actions[bot] 9314dca06a @acamq has signed the CLA in code-yeongyu/oh-my-openagent#3644 2026-05-11 01:07:10 +00:00
YeonGyu-Kim 69aedf3bc4 Merge pull request #3915 from code-yeongyu/fix/installer-checking-opencode-hang
fix(installer): timeout opencode --version probe to avoid Desktop binary hang
2026-05-11 09:31:01 +09:00