Operate, inspect, and optimize the Daily SHITRAT loop. Use when running Daily SHITRAT, reviewing a Daily SHITRAT attempt, doing a Daily SHITRAT Dream/optimizer pass, checking brain daily artifacts, fixing report/Discord metadata, or preparing ShitRat-authored PR plans.
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Operate the Daily SHITRAT loop and its optimizer pass without losing the trail.
This skill has two modes:
brain daily attempt.Use this skill when the user says any of:
| Purpose | Path |
|---|---|
| Daily automation memory | /Users/joel/.codex/automations/daily-shitrat-agent-turn/memory.md |
| Optimizer memory | /Users/joel/.codex/automations/daily-shitrat-run-optimizer/memory.md |
| Daily data root | /Users/Shared/joelclaw/data/brain-daily |
| Optimizer outputs | /Users/Shared/joelclaw/data/brain-daily/optimizer/YYYY-MM-DD/ |
| Brain CLI repo | /Users/joel/Code/joelhooks/joelclaw-brain |
| Discord bridge repo | /Users/joel/Code/joelhooks/pi-discord-threads |
| Codex sessions | /Users/joel/.codex/sessions/**/rollout-*.jsonl |
Resolve Codex memory with a default. An unset CODEX_HOME is not evidence that memory is missing:
CODEX_HOME="${CODEX_HOME:-/Users/joel/.codex}"
DAILY_MEMORY="$CODEX_HOME/automations/daily-shitrat-agent-turn/memory.md"brain daily start unless Joel explicitly asks for a new Daily SHITRAT attempt.brain-daily/optimizer/YYYY-MM-DD/.brain daily latest --base-dir /Users/Shared/joelclaw/data/brain-daily
find /Users/Shared/joelclaw/data/brain-daily -maxdepth 3 -name latest.json -printIf a run exists for the day, reuse it. If it is sealed, inspect, repair metadata, or publish reports; do not start another attempt unless Joel asked for that exact action.
Read input memory before broad scans:
CODEX_HOME="${CODEX_HOME:-/Users/joel/.codex}"
sed -n '1,220p' "$CODEX_HOME/automations/daily-shitrat-agent-turn/memory.md"brain daily progress \
--phase scan \
--status active \
--summary "Read input memory and latest manifest; inspecting sealed attempt metadata"Progress receipts must say what was read, decided, blocked, repaired, or verified. scan-started alone is too weak.
Keep ledger sequence contiguous. Before sealing, verify brain-dump.jsonl, checksum, manifest, report metadata, and latest pointer.
Prefer brain daily finish --publish-report for a normal completion. It should be robust if another actor sealed first: inspect the sealed attempt, merge final Discord metadata, and re-render/re-publish report metadata instead of failing the loop.
Dream work is a local analog of the "read input memory, write output memory" pattern. It is not an Anthropic Dreams API call.
CODEX_HOME="${CODEX_HOME:-/Users/joel/.codex}"
sed -n '1,260p' "$CODEX_HOME/automations/daily-shitrat-agent-turn/memory.md"
test -f "$CODEX_HOME/automations/daily-shitrat-run-optimizer/memory.md" && sed -n '1,260p' "$CODEX_HOME/automations/daily-shitrat-run-optimizer/memory.md"
find /Users/Shared/joelclaw/data/brain-daily -maxdepth 3 -name latest.json -printmanifest.jsonbrain-dump.jsonlbrain-dump.sha256wzrrd-report/index.htmlUse the saved memory integration for summaries. Raw rollout content, including local summary scripts that read it, requires the exact scope-bound evidenceDrilldownReceipt. A suspicious summary or missing result does not itself authorize extraction. Keep private queries in structured MCP arguments.
Write optimizer outputs under:
/Users/Shared/joelclaw/data/brain-daily/optimizer/YYYY-MM-DD/Required files:
dream-memory.md: proposed reorganized memory for the next Daily SHITRAT run.run-quality.json: facts, metrics, source paths, transcript ids, and verification commands.recommendations.md: concise findings and prioritized changes.patch-plan.md: exact proposed repo/code/prompt changes./Users/joel/.codex/automations/daily-shitrat-run-optimizer/memory.mdDo not overwrite the daily automation memory.
Analyze the loop, not just system health. Look for:
Good facts include counts, paths, timestamps, sequence numbers, command names, transcript ids, checksum status, report URLs, and Discord message ids/URLs.
Manifest and latest state must persist publish metadata:
report.publish.urlreport.publish.expiresAtdiscord.threadUrldiscord.startedMessageUrldiscord.finalMessageUrlIf the Discord bridge returns ids but omits URLs, Brain should derive:
guildId and threadIdguildId, threadId, and messageIdbrain daily report --publish after seal may update report metadata and repair derived Discord URLs. It must not mutate brain-dump.jsonl.
If final Discord metadata lands after the first report publish, re-render and re-publish so the local and published report HTML include finalMessageUrl.
Use strong event names and canonical records:
agent.receipt for source reads, progress, decisions, and verifications.agent.finding for one canonical finding per problem or confirmed healthy state.agent.blocker for actual blockers, not generic caution.agent.pr_plan for ShitRat-authored GitHub-visible work.agent.sleep for explicit "do not do this" carryover.Collapse duplicate findings, blockers, PR plans, and carryover before final summary. The report renderer should also canonicalize duplicates and flag vague PR plans.
Every agent.pr_plan must be action-shaped:
Do not write a PR plan like "open a PR for the fixes." That is not actionable.
Verify these whenever touching Daily SHITRAT code or prompts:
report.publish.url and expiresAt should persist into manifest and latest.brain daily report --publish after seal should update report metadata.brain daily finish --publish-report should tolerate another actor sealing first.brain daily transcript-summary.From /Users/joel/Code/joelhooks/joelclaw-brain:
bun test --timeout 15000
bun run typecheck
bunx oxfmt --check src/daily.ts src/cli.ts test/daily.test.ts
bun run src/main.ts daily report --date YYYY-MM-DD --base-dir /Users/Shared/joelclaw/data/brain-daily
shasum -a 256 /Users/Shared/joelclaw/data/brain-daily/YYYY-MM-DD/attempt-001/brain-dump.jsonlFor transcript review:
bun run src/main.ts daily transcript-summary --session /absolute/path/to/rollout.jsonlFor progress during a live run:
brain daily progress --phase scan --status active --summary "Read latest manifest and verified report publish metadata"A good Daily SHITRAT closeout names:
Keep it short. Joel needs the shape, the evidence, and the next useful constraint.
aa0116c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.