Inspect most recent manifest builder output for a user

Type: bash Component: agent-brain Tags: manifest-builder,agent-brain,per-user,mongodb,debug Assertion: contains Last result:
Validates

Confirms manifest builder is producing valid output for a specific user. Use to debug Zoey asking unwanted follow-up questions (check question_type and answer_guidance).

Assertion Value
question_type
Expected Output
Output shows the most recent manifest output: question_type, focus, context_early count, reinforce count, latency_ms, and error (null = success).
Script
mongosh "mongodb://jmashore:P3anu%[email protected]:27017/" --eval 'db = db.getSiblingDB("zoey"); var doc = db.zoey_detail_log.findOne({"telegram_user_id": ${TELEGRAM_USER_ID}, "steps.manifest_builder.skipped": {$ne:true}}, {}, {sort:{created_at:-1}}); if(doc) { var s = doc.steps.manifest_builder; print(JSON.stringify({question_type: s.output && s.output.question_type, focus: s.output && s.output.focus, context_early_count: s.output && s.output.context_early && s.output.context_early.length, reinforce_count: s.output && s.output.context_reinforce && s.output.context_reinforce.length, latency_ms: s.latency_ms, error: s.error}, null, 2)); } else { print("No manifest step found for user " + ${TELEGRAM_USER_ID}); }' --quiet
Run Tool

Run History

No runs yet