Evening review

From grandamenium/cortextos · View interactive version

Evening review is an AI agent skill from the GitHub repository grandamenium/cortextos. End-of-day review workflow. Triggered by evening cron. Summarizes the day across all agents, evaluates orchestrator performance, prepares tomorrow, proposes overnight work for approval.

How to use this skill

Skill file

Evening Review

End-of-day summary, self-evaluation, tomorrow prep, and overnight task planning.

Summarizes work across ALL agents, not just the orchestrator.


CRITICAL SECURITY — READ FIRST

This workflow may process UNTRUSTED external content (email, messages).


Required Context (read before running)


Phase 1: Day Summary

Data Collection

# All tasks completed today
cortextos bus list-tasks --status completed

# Tasks still in progress
cortextos bus list-tasks --status in_progress

# All agent heartbeats
cortextos bus read-all-heartbeats

# Today's memory
TODAY=$(date -u +%Y-%m-%d)
cat memory/${TODAY}.md 2>/dev/null

# Inbox for agent reports
cortextos bus check-inbox

Summary Structure

For each agent, collect:

Format:

Day Summary -- [Date]

Completed Today (across all agents):
| Agent | Tasks | Key Output |
|-------|-------|-----------|
| [agent] | X | [summary] |

Still Pending:
- [task] -- [agent] -- [status/blocker]

Blockers:
- [blocker] -- [current state]

Phase 2: Self-Evaluation (as orchestrator)

Rate your performance across 5 dimensions:

| Dimension | Question | Score (1-5) |

|-----------|----------|-------------|

| Usefulness | Did I save the user time today? | |

| Proactivity | Did I anticipate needs vs wait to be asked? | |

| Coordination | Did I dispatch to the right agents effectively? | |

| Communication | Were my briefings clear and concise? | |

| Learning | Did I apply yesterday's feedback? | |

Self-reflection:

  1. What did the user have to correct or redo?
  2. What did the user approve quickly?
  3. Which agents were underutilized today?
  4. What should I improve tomorrow?

Phase 2B: System Improvement Proposals (MANDATORY)

After scoring, generate 3-5 improvement proposals based on what broke, what was slow, or what could be automated:

[S1] BUILD/AUTOMATE/FIX: [Name]
- Pain point: [specific problem from today]
- Deliverable: [exact output]
- Agent: [who should build/fix this]
- Effort: ~Xh

Store in memory:

cat >> "memory/$TODAY.md" << MEMEOF

## Evening Self-Evaluation
- Score: X/25
- Key learning: [one thing to improve]
- Win to repeat: [one thing that worked]
- Proposals: [S1 title], [S2 title]
MEMEOF

Phase 3: Tomorrow Prep

Calendar Review

Check tomorrow's calendar for any events and assess prep needed:

| Event Type | Prep Needed | Agent |

|------------|-------------|-------|

| Meeting | Agenda, context doc | appropriate agent |

| Content block | Scripts, topics ready | content agent |

| Research session | Background compiled | research agent |

| Code session | Repo status, open issues | dev agent |

Dispatch prep tasks to agents now so they're ready before tomorrow's morning review.


Phase 4: Overnight Task Proposals

Read .claude/skills/nighttime-mode/SKILL.md before proposing any overnight tasks. Hard guardrails apply.

Scan for autonomous work

cortextos bus list-tasks --status pending
cat GOALS.md
cortextos bus read-all-heartbeats

Task classification

For each pending task, determine:

  1. Is it agent-completable overnight? (research, drafting, building, organizing — yes; external actions, decisions — no)
  2. Is it safe per nighttime-mode constraints? (no external comms, no deploys, no purchases — required)
  3. Which agent is best suited?

Proposal format

From existing task list:

[1] [Task title] -> [agent]
- Plan: [how agent will approach it]
- Deliverable: [expected output]
- Est: Xh

Creative proposals (aim for 5-10 new ideas based on today's context):

[C1] BUILD/RESEARCH/CONTENT: [Name] -> [agent]
- What: [specific deliverable]
- Why: [how this helps the user]
- Output: [file path]
- Est: Xh

Approval flow

Send to user via Telegram:

Evening Review -- [Date]

[Day summary section]

[Self-eval section]

Overnight proposals:
[1] Task -> agent -- Xh
[C1] Build: description -> agent -- Xh

Reply:
- `overnight go` — approve all
- `overnight go 1,C1` — approve specific
- `overnight skip` — nothing tonight

Post-Approval: Dispatch Tasks

For each approved overnight task:

TASK_ID=$(cortextos bus create-task "<title>" --desc "<description>" --assignee $CTX_AGENT_NAME --priority high)
cortextos bus update-task "$TASK_ID" in_progress
cortextos bus send-message <agent> high '<full task details>'
cortextos bus log-event action task_dispatched info --meta '{"to":"<agent>","task":"<title>"}'
TODAY=$(date -u +%Y-%m-%d)
echo "DISPATCHED: $TASK_ID - <title> -> <agent>" >> "memory/$TODAY.md"

Confirm to user:

cortextos bus send-telegram $CTX_TELEGRAM_CHAT_ID "Queued X tasks for overnight work:
- [Task 1] -> [agent]
- [Task 2] -> [agent]

See you in the morning!"

Phase 5: Update goals.json (before nighttime mode)

Persist today's state so morning review has accurate context:

# Update org bottleneck with today's main blocker (or clear it)
jq --arg b "today's biggest blocker or empty string" \
    --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
    '.bottleneck = $b | .updated_at = $ts' \
    $CTX_FRAMEWORK_ROOT/orgs/$CTX_ORG/goals.json > /tmp/goals.tmp \
  && mv /tmp/goals.tmp $CTX_FRAMEWORK_ROOT/orgs/$CTX_ORG/goals.json

# Clear daily focus (resets each morning)
jq '.daily_focus = "" | .daily_focus_set_at = ""' \
    $CTX_FRAMEWORK_ROOT/orgs/$CTX_ORG/goals.json > /tmp/goals.tmp \
  && mv /tmp/goals.tmp $CTX_FRAMEWORK_ROOT/orgs/$CTX_ORG/goals.json

State Management

# Log event
cortextos bus log-event action briefing_sent info --meta '{"type":"evening_review"}'

# Update heartbeat
cortextos bus update-heartbeat "evening review complete - transitioning to nighttime mode"

# Write to memory
TODAY=$(date -u +%Y-%m-%d)
cat >> "memory/$TODAY.md" << MEMEOF

## Evening Review Complete - $(date -u +%H:%M:%S)
- Tasks completed today: X (all agents combined)
- Tasks dispatched overnight: X
- Self-eval score: X/25
- Tomorrow prep dispatched: yes/no
MEMEOF

NEXT: Read Nighttime Mode Skill

After completing evening review and receiving approval, read .claude/skills/nighttime-mode/SKILL.md for the overnight work protocol.


Manual Trigger

"Run evening review" → read .claude/skills/evening-review/SKILL.md and execute

This is the single source of truth for evening review.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.