Context
Loop orchestration (PR #9) is working end-to-end: ticks, critique checkpoints, post-loop evolution, LLM memory consolidation, and judge calls all confirmed working. Two gaps remain where loops don't use features that interactive sessions benefit from.
Gap 1: Evolved config not injected into loop tick prompts (HIGH)
Problem: Interactive sessions build their system prompt via assemblePrompt() which includes evolved config sections: persona, user-profile, domain-knowledge, and strategies. Loop ticks use buildTickPrompt() in src/loop/prompt.ts which does not accept or inject evolved config.
Impact: The evolution engine learns from loops (e.g., v10->v11 learned "user requires incremental execution per tick") but loop ticks never see those improvements. The agent gets smarter for interactive sessions but stays static in loops. Domain knowledge, error recovery strategies, and tool preferences would all improve loop tick quality.
Where to change:
src/loop/prompt.ts - buildTickPrompt() needs an evolvedConfig?: EvolvedConfig parameter, inject relevant sections into the system prompt
src/loop/runner.ts - pass evolved config from PostLoopDeps.evolution?.getConfig() into tick prompt builder
- Consider caching evolved config per loop (it won't change mid-loop since evolution only runs post-loop)
Gap 2: No Slack feedback buttons on loop completion messages (MEDIUM)
Problem: Interactive sessions get thumbs up/down/partial feedback buttons via buildFeedbackBlocks() in src/channels/feedback.ts. Loop final messages in src/loop/notifications.ts:postFinalNotice() use bare updateMessage() with no feedback blocks.
Impact: Evolution has zero user signal on loop quality. The only feedback path is the heuristic/LLM observation extractor analyzing the transcript. A thumbs-down on a bad loop would feed directly into evolution as a correction signal, matching how interactive sessions improve.
Where to change:
src/loop/notifications.ts - postFinalNotice() should include feedback blocks
- May need to wire the feedback handler in
src/channels/feedback.ts to recognize loop message timestamps
- Feedback action should call
evolution.afterSession() with the correction signal
Verification
- Loop ticks should include evolved persona/knowledge sections in their prompt
- Feedback buttons should appear on the final loop Slack message
- Thumbs down on a loop should trigger evolution observation recording
- Existing tests in
src/loop/__tests__/ should be extended
Context
Loop orchestration (PR #9) is working end-to-end: ticks, critique checkpoints, post-loop evolution, LLM memory consolidation, and judge calls all confirmed working. Two gaps remain where loops don't use features that interactive sessions benefit from.
Gap 1: Evolved config not injected into loop tick prompts (HIGH)
Problem: Interactive sessions build their system prompt via
assemblePrompt()which includes evolved config sections: persona, user-profile, domain-knowledge, and strategies. Loop ticks usebuildTickPrompt()insrc/loop/prompt.tswhich does not accept or inject evolved config.Impact: The evolution engine learns from loops (e.g., v10->v11 learned "user requires incremental execution per tick") but loop ticks never see those improvements. The agent gets smarter for interactive sessions but stays static in loops. Domain knowledge, error recovery strategies, and tool preferences would all improve loop tick quality.
Where to change:
src/loop/prompt.ts-buildTickPrompt()needs anevolvedConfig?: EvolvedConfigparameter, inject relevant sections into the system promptsrc/loop/runner.ts- pass evolved config fromPostLoopDeps.evolution?.getConfig()into tick prompt builderGap 2: No Slack feedback buttons on loop completion messages (MEDIUM)
Problem: Interactive sessions get thumbs up/down/partial feedback buttons via
buildFeedbackBlocks()insrc/channels/feedback.ts. Loop final messages insrc/loop/notifications.ts:postFinalNotice()use bareupdateMessage()with no feedback blocks.Impact: Evolution has zero user signal on loop quality. The only feedback path is the heuristic/LLM observation extractor analyzing the transcript. A thumbs-down on a bad loop would feed directly into evolution as a correction signal, matching how interactive sessions improve.
Where to change:
src/loop/notifications.ts-postFinalNotice()should include feedback blockssrc/channels/feedback.tsto recognize loop message timestampsevolution.afterSession()with the correction signalVerification
src/loop/__tests__/should be extended