Skip to content

journal — Claude Code

Generate the daily work journal — collect today's AI usage across Claude Code, Copilot CLI, and Codex CLI plus git activity into a digest, then write the narrative, technical, and next-day-plan summaries. Use when the user asks for their work journal, daily summary, "what did I do today", or to plan tomorrow.

In practice

What it does

Turns today's Claude Code, Copilot CLI, and Codex CLI activity plus git history into a written journal: a digest of metadata, then narrative, technical, and next-day-plan summaries. Everything it produces lives under a gitignored folder — nothing here is ever committed.

When to reach for it

  • End of day, to write down what actually happened instead of relying on memory later.
  • Planning tomorrow from what's still open across kits, WIP repos, and the inbox.
  • Folding a meeting or email to-do into tomorrow's plan without wiring up a real connector.
  • Not a live activity monitor — it reads a snapshot of today's local logs, once, when you run it.

Worked example

Step Command Writes
Collect python3 bin/journal_collect.py journal/<date>/digest.json
Snapshot python3 bin/telemetry_snapshot.py telemetry/ (durable, best-effort)
Summarize python3 bin/journal_summarize.py --date <date> --dry-run prompts only — you write the three docs in-session
Plan python3 bin/journal_plan.py build journal/plan/<date>.md
Track journal_plan.py check / done <id> / defer <id> --to <date> updates that same file

--dry-run prints the exact prompts without dispatching anything, because the current session is already paid for; a headless run (journal_summarize.py --date <date>, no --dry-run) dispatches a routed model instead, escalating once before giving up. journal_plan.py prompt follows the same in-session precedent for enriching a plan card's own text.

Failure modes & fallbacks

  • A document still fails after one escalation in headless mode — the script exits with a distinct code rather than silently shipping only two of the three summaries.
  • The user wants it to run unattended. Read references/scheduling.md: a launchd install/uninstall/status/run surface whose installer writes the schedule but never loads it — the activation step stays a manual one.
  • The user wants Teams/Outlook/Copilot Studio context folded in. Read references/ask-the-tools.md: an offline prompt pack you run yourself and paste results back into the inbox — there is no Graph/OAuth/MCP connector, by design, ever.

Cost & safety

Collecting and snapshotting are model-free and read-only over three local log directories; the digest itself carries only counts, ids, titles, and short strings — never transcript text. Writing the summaries is the one step that sends that digest to a model. Codex figures anywhere in the journal are labeled API-equivalent relative-burn proxies, never a bill — they never enter a priced total.

  • memory — durable facts across sessions, versus this skill's dated record of one day.
  • cost-report — the deeper spend analysis behind what the journal summarizes.
  • Deep dive: daily journal — the full pipeline and privacy model.

The skill card — what the model reads

This is the SKILL.md body the model reads, transformed for this page: the source's own leading title, if it had one, is removed; every remaining heading is demoted one level to nest under this section; and relative links are rewritten to site or GitHub URLs. ${CLAUDE_PLUGIN_ROOT} and {{POLYTROPOS_ROOT}} are install-time path variables, left intact exactly as the model sees them. The unmodified original is skills/journal/SKILL.md.

Resolve the plugin root before shelling out: use ${CLAUDE_PLUGIN_ROOT} if it is set; otherwise resolve ../.. relative to this SKILL.md to an ABSOLUTE path (bash cwd is not the skill dir). Call that root $ROOT below.

Collect the digest

Run the collector to build today's digest from local, read-only sources:

python3 "$ROOT/bin/journal_collect.py"

Useful flags: --date YYYY-MM-DD for a specific day (default: today), --repo PATH to add a git repo to scan (repeatable), --print to echo the digest to stdout as well as writing it. The collector is deterministic and read-only over ~/.claude, ~/.copilot, and ~/.codex — it never calls a model and never touches the network. It writes only under the gitignored journal/<date>/ directory (digest.json), nowhere else. The digest now also deepens Codex with the day's rollout files and, when tokens are found, carries a clearly-labeled API-equivalent relative-burn proxy under sources.codex_cli.extra.codex_proxy — never a bill (billed_usd stays null), never counted into usd_priced.

Persist today's telemetry (right after collecting)

Capture the day's analytics into the durable store — the transcript dirs the digest reads from ROTATE, and this snapshot is what survives:

python3 "$ROOT/bin/telemetry_snapshot.py"

It imports the analytics modules and calls their builders directly — read-only over ~/.claude, ~/.codex, and ~/.copilot, spawning no CLI and writing only under the gitignored telemetry/ (dated envelopes, one per source per day; same-day re-runs overwrite, except that a failed re-run never replaces a good envelope). The envelope's filename date is the LOCAL day — the same day this journal is keyed on, so an evening run files under today, not tomorrow (captured_at inside each envelope stays UTC). Best-effort: if it fails, note the failure and continue with the journal — the snapshot never blocks the summaries.

Write the summaries (in this session — default)

Get the exact prompts for today's digest:

python3 "$ROOT/bin/journal_summarize.py" --date <date> --dry-run

This prints the three prompts (narrative, technical, next-day-plan) without dispatching any model — the current session is already paid for, so write the documents yourself instead of spawning a nested call. Read journal/<date>/digest.json for the facts, follow each printed prompt's required headings exactly, and use only digest facts — no invented details, no transcript text. Save your three drafts as journal/<date>/narrative.md, journal/<date>/technical.md, and journal/<date>/next-day.md. When done, summarize the three documents for the user and link their paths — do not paste full drafts back into chat. When signals.harness is present, follow the next-day prompt's ## Harness plan section — per-task harness + model tier + ready-to-paste command + one-line WHY, advisory only.

Or run it headless

For an unattended run (e.g. from the nightly schedule) let the script dispatch a model itself:

python3 "$ROOT/bin/journal_summarize.py" --date <date>

This tries a routed cheap/mid model tier first, with at most one escalation to the next tier, and exits with code 3 if any of the three documents still failed after that escalation. Use --start-tier to pick the starting tier and --model to pin one model id explicitly (this skips escalation).

Inbox & schedule

Drop meeting notes or email to-dos into journal/inbox.md as plain lines; the next collection folds them into the digest so they resurface as next-day to-dos. Read references/scheduling.md when the user wants the journal to run unattended: the launchd install/uninstall/status/run surface and the manual launchctl step it never performs for them.

Next-day runbook

Once a digest exists, build tomorrow's runbook — a dated, checkable plan of next-day tasks:

python3 "$ROOT/bin/journal_plan.py" build

It writes journal/plan/<date>.md — one dated, checkable card per planned task (drawn from open kit tasks, WIP repos, the inbox, and journal/plan/seed.md), each with a What/How, an ideal-harness line, and ready-to-paste commands for Claude Code, Copilot CLI, and Codex CLI with cost estimates from the pricing files (Codex figures are API-equivalent proxies, never a bill). Unchecked cards from earlier days carry forward automatically.

Enrich the What/How steps in this session (the current session is already paid for — the summaries precedent): run

python3 "$ROOT/bin/journal_plan.py" prompt

follow the printed prompt exactly (rewrite ONLY the What/How bodies, keep every other line byte-identical — the H1, checkboxes, field lines, and Harness blocks), and save the revised document back over the same journal/plan/<date>.md path.

On the day tasks are due, check and track them:

python3 "$ROOT/bin/journal_plan.py" check
python3 "$ROOT/bin/journal_plan.py" done <id> --date <file-date>
python3 "$ROOT/bin/journal_plan.py" defer <id> --to <date> --date <file-date>

(or just edit the checkboxes in the markdown by hand — the file is yours). On quiet days, hand-add lines to journal/plan/seed.md (same plain-line format as the inbox) and rebuild.

Advisory only: the runbook prepares and tracks — it never schedules or executes anything. Every command above is text you choose to run, and there is no scheduler here by design (the user tabled it).

External tools (Teams / Outlook / Copilot Studio)

The journal has no Graph/OAuth/MCP connectors and never will by default: it never adds network, OAuth, Graph, or MCP calls to fetch this content — any Teams/Outlook/Copilot Studio context comes in only as offline text you carry over by hand. Read references/ask-the-tools.md when the user wants that context folded into the journal: the offline ask-the-tools prompt pack and the manual paste-back loop.

Privacy

Writing the summaries sends the digest — project and repo names, commit subjects, kit task titles, and any inbox text — to a model. The digest itself is metadata-only: it never carries transcript or message text, only counts, ids, titles, and short strings like the above. Everything the journal produces stays under the gitignored journal/ directory; nothing here is committed to git. Pasted ask-the-tools bullets become inbox text, so they also travel to the model when you write the summaries.