feat(ulw-loop): require Oracle verification before completion

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-06 22:00:14 +09:00
parent c3f2198d34
commit a010de1db2
13 changed files with 286 additions and 58 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
import type { CommandDefinition } from "../claude-code-command-loader"
import type { BuiltinCommandName, BuiltinCommands } from "./types"
import { INIT_DEEP_TEMPLATE } from "./templates/init-deep"
import { RALPH_LOOP_TEMPLATE, CANCEL_RALPH_TEMPLATE } from "./templates/ralph-loop"
import { RALPH_LOOP_TEMPLATE, ULW_LOOP_TEMPLATE, CANCEL_RALPH_TEMPLATE } from "./templates/ralph-loop"
import { STOP_CONTINUATION_TEMPLATE } from "./templates/stop-continuation"
import { REFACTOR_TEMPLATE } from "./templates/refactor"
import { START_WORK_TEMPLATE } from "./templates/start-work"
@@ -31,16 +31,16 @@ $ARGUMENTS
argumentHint: '"task description" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]',
},
"ulw-loop": {
description: "(builtin) Start ultrawork loop - continues until completion with ultrawork mode",
template: `<command-instruction>
${RALPH_LOOP_TEMPLATE}
description: "(builtin) Start ultrawork loop - continues until completion with ultrawork mode",
template: `<command-instruction>
${ULW_LOOP_TEMPLATE}
</command-instruction>
<user-task>
$ARGUMENTS
</user-task>`,
argumentHint: '"task description" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]',
},
argumentHint: '"task description" [--completion-promise=TEXT] [--strategy=reset|continue]',
},
"cancel-ralph": {
description: "(builtin) Cancel active Ralph Loop",
template: `<command-instruction>
@@ -28,6 +28,34 @@ Parse the arguments below and begin working on the task. The format is:
Default completion promise is "DONE" and default max iterations is 100.`
export const ULW_LOOP_TEMPLATE = `You are starting an ULTRAWORK Loop - a self-referential development loop that runs until verified completion.
## How ULTRAWORK Loop Works
1. You will work on the task continuously
2. When you believe the work is complete, output: \`<promise>{{COMPLETION_PROMISE}}</promise>\`
3. That does NOT finish the loop yet. The system will require Oracle verification
4. The loop only ends after Oracle verifies the result with \`<promise>VERIFIED</promise>\`
5. There is no iteration limit
## Rules
- Focus on finishing the task completely
- After you emit the completion promise, run Oracle verification when instructed
- Do not treat DONE as final completion until Oracle verifies it
## Exit Conditions
1. **Verified Completion**: Oracle returns \`<promise>VERIFIED</promise>\`
2. **Cancel**: User runs \`/cancel-ralph\`
## Your Task
Parse the arguments below and begin working on the task. The format is:
\`"task description" [--completion-promise=TEXT] [--strategy=reset|continue]\`
Default completion promise is "DONE".`
export const CANCEL_RALPH_TEMPLATE = `Cancel the currently active Ralph Loop.
This will: