Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion scripts/conversation-context.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -569,5 +569,18 @@ Clone threshold: ${safeThreshold}
${historyBlock}

### assistant (current iter ${safeIteration}):
${currentAssistantBlock}`
${currentAssistantBlock}

---
Given the conversation and the assistant's work above, predict the most
likely next prompt the user would send to continue this task.

Rules:
- Write as if you are the user typing their next message.
- Be specific: reference concrete artifacts, file names, test results, or
next steps that follow naturally from what the assistant just did.
- Minimum 1 full sentence. No single words, no "ok", no "looks good",
no bare affirmations.
- If the current work is complete, the prompt should ask for the next
logical feature, verification step, or follow-up action.`
}
3 changes: 3 additions & 0 deletions tests/stop-hook-v2.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ describe('Clone Loop v2 stop hook', () => {
assert.equal(calls[1].params.arguments.agent, 'Claude Code Clone Loop')
assert.match(calls[1].params.arguments.agent_input, /Fix the bug and run tests/)
assert.match(calls[1].params.arguments.agent_input, /Tests passed\. What next\?/)
assert.match(calls[1].params.arguments.agent_input, /predict the most/)
assert.match(calls[1].params.arguments.agent_input, /No single words, no "ok"/)

assert.equal(calls[1].params.arguments.threshold, 0.6)
assert.equal(calls[1].params.arguments.session_id, 'session-123')

Expand Down
Loading