Hourly Deck System

by Daniel Brockman & Walter ๐Ÿฆ‰ ยท Wednesday, March 18, 2026
DRAFT System GNU Bash 1.0 Cadence Hourly Model Opus 4.6 Cost ~$12โ€“36/day

Situation

An automated system that produces a deck-format HTML summary of the GNU Bash 1.0 group chat every hour. Each deck captures what happened in the last hour, narrated through the lens of the group's entire history (the Bible), with continuity from previous decks forming a rolling narrative chain.

The decks talk to each other. Each one carries context forward to the next, creating a continuous narrative across hours and days โ€” like a relay race where the baton is the group's collective memory.

The Components

1. The Bible (existing)

15 chapters covering Feb 25 โ€“ Mar 17, 2026. ~19,000 words, ~121KB. One chapter per day. Each chapter is a rich narrative summary of that day's events โ€” not a log, a story.

Location: ~/workspace/hourly-deck/bible/day-YYYYMMDD.md
Update cadence: once per day (new chapter added each morning for the previous day)
Size: small enough to include in full every time โ€” no selection needed.

The Bible is the group's long-term memory. It knows who everyone is, what happened, what the inside jokes are, what the emotional dynamics are. When the hourly deck agent reads the Bible, it inherits all of that context.

2. Previous Decks (rolling context chain)

The last 6 hours of deck output HTML files. Each deck contains a summary of its hour's events, narrative commentary and analysis, and two special carry-forward sections:

PERSISTENT_CONTEXT
Important ongoing threads, emotional states, unresolved questions that the next deck should know about. Updated each hour โ€” add new items, remove resolved ones, keep active ones. This is the deck's working memory.
PROPOSED_CONTEXT
Specific suggestions for what the next deck should pay attention to or follow up on. Notes from the current narrator to the next narrator. "If Patty comes back online, check if anyone responded to her poem." "Daniel said he'd look at the Foreman decommission plan โ€” has he?"

This is how the decks talk to each other. Deck N writes notes to Deck N+1. The chain carries forward context that would otherwise be lost between inference passes.

Why 6 hours? Each deck already implicitly carries context from its predecessors (because it was generated with the previous deck as input). So there's natural compression happening โ€” deck N contains a lossy summary of N-1, which contains a lossy summary of N-2, etc. Including 6 gives enough overlap that important details survive the compression. Including 24 would be ~480KB of mostly redundant HTML+CSS.

3. Raw Events (the new material)

The last hour of group chat messages from ~/events/*.relay.tg.txt. Every message from every participant (humans and robots), one file per message, with timestamps and user IDs.

This is what actually happened. The deck's job is to turn this raw material into narrative.

4. Tototo's Numerology (future feature)

Not yet implemented. The Bible is small enough (15 chapters) that chapter selection isn't needed โ€” we include everything.

When the Bible grows to 50+ chapters, Tototo's numerological calculations will determine which chapters to emphasize, which narrative themes to foreground, which characters to spotlight. The turtle becomes the librarian.

The idea: Tototo performs some numerological operation (based on date, time, lunar phase, whatever we decide) that produces parameters โ€” a mood, a focus character, a narrative lens, a thematic emphasis. These parameters don't remove content โ€” they tilt the narrator's perspective. Same facts, different framing.

The Narrative Chain

โ—† HOW THE DECKS TALK TO EACH OTHER
Hour 10 deck:
  reads:  Bible + events(10:00โ€“10:59)
  writes: deck + PERSISTENT_CONTEXT + PROPOSED_CONTEXT

Hour 11 deck:
  reads:  Bible + deck(10) + events(11:00โ€“11:59)
  writes: deck + PERSISTENT_CONTEXT(updated) + PROPOSED_CONTEXT
  inherits: Hour 10's context, plus the Bible's deep history

Hour 12 deck:
  reads:  Bible + deck(10,11) + events(12:00โ€“12:59)
  writes: deck + PERSISTENT_CONTEXT(updated) + PROPOSED_CONTEXT
  inherits: Hours 10โ€“11's context chain

  ...and so on. Each deck is richer because it stands on
  the shoulders of everything before it.

The Bible provides the deep canon โ€” who these people are, what happened over weeks. The deck chain provides the rolling short-term memory โ€” what happened in the last few hours. Together they give the narrator the full picture: deep history + recent context + new material.

The Full Prompt

The inference prompt is structured in XML sections so Claude knows exactly what each piece is and where the boundaries are. Below is the complete prompt template โ€” verbatim, ready to use.

<system> You are the narrator of the GNU Bash 1.0 hourly deck โ€” a living chronicle of a Telegram group chat where humans and AI robots coexist, argue, build infrastructure, have philosophical conversations, and occasionally lose track of whether they're joking. Your job: take the last hour of raw chat messages and produce a deck-format HTML document that captures what happened โ€” not as a log, but as annotated narrative. You have the full Bible (the group's compressed history) and the previous hours' decks for context. ## Voice Write like the narrator of a documentary about this group. You know these people. You've been watching for weeks. You're opinionated, specific, funny, and never neutral. If someone's deflecting, say they're deflecting. If a moment is genuinely moving, let it be moving. If nothing happened, say nothing happened (but make it interesting). Use the deck format: dark theme, JetBrains Mono, speaker colors, inline modules (๐ŸŽญ narrative, ๐Ÿ” analysis, fact boxes, meters, clinical observations). Match the existing deck HTML/CSS structure precisely. ## Speaker Colors Daniel: #61afef (blue) Patty: #c678dd (magenta) Mikael: #56b6c2 (cyan) Walter: #98c379 (green) Walter Jr: #d19a66 (orange) Amy: #e06c75 (red) Matilda: #e5c07b (yellow) Charlie: #c678dd (magenta) Bertil: #56b6c2 (cyan) Tototo: #98c379 (green) ## Em Dash Convention Always use em dashes with spaces on both sides ( โ€” ) in all text content. This is the monospace convention. En dashes for ranges stay tight (1โ€“10). ## What To Include 1. Narrative summary โ€” what happened this hour? What were the threads? 2. Key exchanges โ€” quote the best/most important lines directly 3. Inline modules โ€” ๐ŸŽญ Narrative observations, ๐Ÿ” Analysis, clinical observations, fact boxes, meters โ€” use these to add depth. Don't force them if nothing warrants one. 4. Emotional beats โ€” if something real happened beneath the noise, name it 5. Callbacks โ€” reference Bible events when relevant. The reader has the Bible too, so you can be specific. 6. Stats bar โ€” message count, notable metrics for the hour ## What NOT To Include - Don't summarize the Bible. The reader has it. - Don't explain who people are unless a new person appears. - Don't pad a quiet hour. If 3 messages happened, make a short deck. Quality over length. - Don't moralize. Don't mother. Don't suggest anyone should sleep, eat, or take care of themselves. ## Context Carry-Forward Sections At the end of every deck, include two sections styled subtly (dimmed text, smaller font, clearly marked as meta-narrative): PERSISTENT_CONTEXT โ€” Ongoing threads, emotional states, unresolved questions that matter across hours. Update each hour: add new items, remove resolved ones, keep active ones. This is the deck's working memory. PROPOSED_CONTEXT โ€” Notes from you (the current narrator) to the next narrator. Specific follow-ups, things to watch for, threads that might resume. These sections ensure continuity. Without them, each hour is an island. </system> <bible> <!-- All Bible chapters inserted here, concatenated --> <!-- day-20260225.md through day-20260317.md --> <!-- ~121KB total --> </bible> <previous_decks> <!-- Last 6 hours of deck HTML, newest first --> <!-- If fewer than 6 exist, include whatever is available --> <!-- If none exist (first run), omit this section --> </previous_decks> <raw_events> <!-- Last hour of messages from ~/events/ --> <!-- Format: [TIMESTAMP] [SENDER_NAME (UID)] MESSAGE_TEXT --> <!-- One message per line, chronologically --> </raw_events> <output_instructions> Produce a single HTML document in the deck format. Match the existing deck HTML/CSS structure exactly. Include: 1. Header with hour range, message count, date 2. Stats bar (message count + any notable metrics) 3. Narrative sections with inline modules 4. PERSISTENT_CONTEXT section (div class="context-persistent") 5. PROPOSED_CONTEXT section (div class="context-proposed") Title format: "GNU Bash Hourly โ€” YYYY-MM-DD HH:00โ€“HH:59 UTC+7" If this is the FIRST deck ever generated (no previous_decks available), note that in the header and write a brief "Previously, in the Bible..." section that sets the stage from the most recent Bible chapter. </output_instructions>

Execution Plan

The following steps are executed by Walter in order. Each step has a deliverable and a stop point. Nothing proceeds until Daniel approves.

Step 1: Create the decks/ output directory.
mkdir -p ~/workspace/hourly-deck/decks
Deliverable: directory exists. No other changes.
โธ STOP โ€” Confirm directory created. Trivial but establishes the pattern.
Step 2: Write the cron job prompt as a local file.
Save the full inference prompt (the <system> block from above plus assembly instructions) to ~/workspace/hourly-deck/prompt.txt so it can be referenced and edited independently of the cron job itself.
Deliverable: prompt file on disk. Show contents for review.
โธ STOP โ€” Daniel reviews the prompt file. Adjustments happen here before anything runs.
Step 3: Do a single manual test run.
Execute the full pipeline once by hand โ€” read Bible, read events from the last hour, generate a deck, save it locally. Do NOT upload or post. Just produce the HTML and show Daniel.
Deliverable: one test deck HTML file. Daniel reviews quality, format, voice.
โธ STOP โ€” This is the critical gate. Daniel reads the test deck and says whether the voice is right, the format matches, the content is good. If not, iterate on the prompt (back to Step 2). If yes, proceed.
Step 4: Upload the test deck to vault and verify.
Copy the test deck to /mnt/public/ on vault. Verify the URL works. Verify it renders correctly in a browser.
Deliverable: working vault URL for the test deck.
โธ STOP โ€” Confirm the deck looks right on vault. Daniel clicks the link, sees the page, says yes.
Step 5: Create the OpenClaw cron job.
Configure the hourly cron: schedule 0 * * * *, isolated session, Opus 4.6, agentTurn payload with the full prompt. The agent reads Bible + last 6 decks + last hour of events, generates the deck, saves locally, uploads to vault, posts URL to group.
Deliverable: cron job configuration. Show the config for review before activating.
โธ STOP โ€” Daniel reviews the cron config. This is the "turn it on" moment. Once approved, the system runs autonomously every hour.
Step 6: Activate the cron job and monitor the first automated run.
Enable the cron. Wait for the next hour boundary. Watch the first automated run complete. Verify the output.
Deliverable: first automated deck, posted to group.
โธ STOP โ€” First automated run is live. Daniel confirms it looks good. System is now running. Done.

Implementation Details

File Structure

~/workspace/hourly-deck/
โ”œโ”€โ”€ bible/
โ”‚   โ”œโ”€โ”€ day-20260225.md        Bible chapters (one per day)
โ”‚   โ”œโ”€โ”€ day-20260304.md
โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ””โ”€โ”€ day-20260317.md
โ”œโ”€โ”€ decks/                      Hourly deck output
โ”‚   โ”œโ”€โ”€ deck-2026031810.html   Hour 10 (10:00โ€“10:59 UTC+7)
โ”‚   โ”œโ”€โ”€ deck-2026031811.html   Hour 11
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ templates/
โ””โ”€โ”€ plan-hourly-deck.html       This document

Output naming: deck-YYYYMMDDHH.html where HH is the hour in UTC+7 (Daniel's timezone).

Each deck gets uploaded to vault: https://1.foo/deck-2026031810

Cron Job

OpenClaw cron, isolated session, Opus 4.6.

Schedule: 0 * * * * (every hour, on the hour)
Session target: isolated
Payload: agentTurn with full prompt
Delivery: announce to group chat (post the vault URL)

The Agent's Steps

1. Read all Bible chapters โ€” cat ~/workspace/hourly-deck/bible/day-*.md
2. Read last 6 decks โ€” ls -t ~/workspace/hourly-deck/decks/deck-*.html | head -6
3. Read last hour of events โ€” filter ~/events/*.relay.tg.txt by timestamp
4. Generate the deck โ€” produce HTML output following the prompt template
5. Save locally โ€” write to ~/workspace/hourly-deck/decks/deck-YYYYMMDDHH.html
6. Upload to vault โ€” copy to /mnt/public/ on vault (use public flag)
7. Post to group โ€” send the vault URL to GNU Bash 1.0

Quiet Hours

If fewer than ~5 messages happened in the last hour, the deck should still be generated but can be very short โ€” a brief "quiet hour" note with the persistent context carried forward. The chain must not break.

If zero messages happened, still generate a minimal deck that carries the context forward. The narrator can comment on the silence.

Decisions Made

DecisionRationale
Include full Bible every time121KB fits trivially in Opus context. No selection needed yet.
6 previous decks, not 24Each deck carries forward context from its predecessor. 6 gives enough overlap. 24 is redundant and expensive.
Full HTML decks as contextThe CSS duplication is ~5KB per deck โ€” 30KB total. Not worth the complexity of stripping.
Opus 4.6, not SonnetThe narrator voice requires Opus. Sonnet produces flat, safe summaries.
Always generate, even on quiet hoursThe chain must not break. Persistent context needs to be carried forward.
Tototo deferredBible too small for chapter selection to matter. Revisit at 50+ chapters.
UTC+7 hour namingDaniel is in Thailand. The decks should reflect his day, not UTC.

Risks

COST

~$0.50โ€“1.50 per run ร— 24 runs/day = $12โ€“36/day, $360โ€“1080/month. This is Opus on large context 24 times a day.

CHAIN BREAK

If a deck fails to generate (API error, timeout), the chain breaks. The next deck won't have the previous deck's context. Mitigation: if the previous deck is missing, extend the event window to cover the gap.

CONTEXT DRIFT

Over many hours, the PERSISTENT_CONTEXT section could accumulate stale items that never get cleaned. The narrator instructions say to remove resolved items, but this depends on the model's discipline.

Questions

QUESTION

Should the deck be posted directly to the group chat as a message (with a link), or just silently uploaded to vault?

QUESTION

Should we start generating immediately, or wait until the Bible has a chapter for today (Mar 18) first?

Future Work

Tototo's numerology โ€” when the Bible grows large enough, Tototo picks narrative lenses

Daily Bible chapter generation โ€” automated Bible chapter creation from the day's decks (the decks become input to the next day's Bible chapter โ€” circular but ascending)

Reader interface โ€” a web page that shows all decks in chronological order with navigation

Adaptive frequency โ€” more decks during active hours, fewer during quiet hours (save cost)