mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
The MissionManager now builds evolving meta-prompts and processes
thread outcomes for continuous learning:
fire_mission() upgraded:
- Loads Project MemoryDocs via RetrievalEngine for context
- Builds meta-prompt from: goal, current_focus, approach_history,
project knowledge docs, trigger payload, thread count
- Spawns thread with meta-prompt as user message
- Background task waits for completion and processes outcome
- Daily thread budget enforcement (max_threads_per_day)
Meta-prompt structure:
# Mission: {name}
Goal: {goal}
## Current Focus (evolves between threads)
## Previous Approaches (what we've tried)
## Knowledge from Prior Threads (lessons, playbooks, issues)
## Trigger Payload (webhook/event data if applicable)
## Instructions (accomplish step, report next focus, check goal)
Outcome processing:
- Extracts "next focus:" from FINAL() response → updates current_focus
- Detects "goal achieved: yes" → completes mission
- Records accomplishment in approach_history
- Failed threads recorded as "FAILED: {error}"
Cron ticker:
- start_cron_ticker() spawns tokio task, ticks every 60s
- Checks active Cron missions, fires those past next_fire_at
151 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>