# Year in OpenCode · Wrapped

A shareable, copy-and-paste brief for creating a private, local year-in-review of OpenCode usage — including a polished report, a 9:16 Instagram Story deck, and (where local tools allow) a genuinely animated MP4.

This file is intended to be shared with a friend and pasted into their OpenCode agent. The agent should adapt to their machine and database schema rather than assume your stats, paths, or setup.

---

## Copy-and-paste brief

```text
Please create a local, privacy-conscious “Year in OpenCode · Wrapped” based on my own OpenCode usage data. Treat this as a small data-analysis and visual-design project: inspect the available data and tools first, explain the plan briefly, then build and verify the deliverables in a new folder in my current workspace.

## Non-negotiable privacy and safety rules

- Everything must stay on this machine. Do not upload, publish, send, or share my database, messages, report, images, video, or any other output. Do not make network calls or load remote assets, fonts, scripts, or analytics.
- Never modify, delete, truncate, vacuum, migrate, or otherwise write to the live OpenCode database. Do not run commands that could alter it.
- Identify the actual OpenCode database location for this OS/version. Do not assume a path or schema without checking.
- Work only from a separate, verified snapshot/backup. If the database is SQLite and OpenCode may be running, prefer SQLite’s online backup API to create a consistent snapshot. Do not make an unsafe raw copy of a live database/WAL. Open the snapshot read-only for analysis.
- Keep the original database and all existing user files untouched. Create outputs in a clearly named new folder; do not overwrite existing files without asking.
- Treat the report as private. For shareable Story slides, omit project/repository names, session titles, prompts, message text, local paths, usernames, and other identifying details. Use aggregate statistics only. Do not quote private conversations.
- If a metric cannot be verified from the data, omit it or clearly label the limitation. Never invent or silently estimate a number.

## First: inspect and plan

1. Inspect the OS, OpenCode data location, database format/schema, workspace contents, and available local tools (for example Python, SQLite, a browser, and FFmpeg). Do not install software or fetch anything from the internet without asking.
2. Briefly tell me what you found, what data window is actually covered, what you plan to generate, and any missing tools or assumptions. Then continue unless a decision is needed to prevent risk or destructive changes.
3. Snapshot the database safely. Verify the snapshot exists, is distinct from the live DB, opens read-only, and passes SQLite `PRAGMA integrity_check` (or the equivalent integrity check for its database format). Do all analysis against that snapshot only.
4. Determine the covered date range from records. Do not call it a complete calendar year if the data only covers part of the year. Put the real date range on the report/deck.

## Analyze carefully

Produce transparent, reproducible aggregates from the snapshot. Inspect the schema and understand which rows represent user messages, assistant replies, tool calls, sessions, and subagents before counting anything.

Useful metrics, when supported by the data, may include:
- Total input, output, reasoning, cache-read, and cache-write tokens; distinguish fresh tokens from cached tokens. Avoid double-counting session rollups and message-level usage. Prefer one well-understood source of truth and document it.
- Number of user prompts, assistant replies, main sessions, subagent sessions, active days, and longest activity streak.
- Tokens by month, hour-of-day, weekday, model, or agent; show the date range and explain definitions.
- Logged cost (only if available and meaningful), tool-call counts and errors, files changed, lines added/deleted, and commits/pushes only when these can be reliably derived from local records.
- A playful, clearly-for-fun usage “archetype” based on actual behavior, with a short explanation. Avoid making psychological or sensitive inferences.

Use consistent definitions and disclose relevant caveats. For example, distinguish a main session from its subagent sessions, and distinguish message-level token totals from any session-level summaries. Do not imply that logged cost equals a bill unless verified.

## Deliverables

Create a new folder such as `year-in-opencode-wrapped/` containing as many of these as local tools support:

1. **Private report** — a self-contained `report.html` and machine-readable `report.json`, plus the analysis script/source. The report may include details useful to the owner, but keep it local and clearly mark it private.
2. **Shareable Story deck** — 9 vertical slides at exactly 1080×1920 pixels (9:16), plus per-slide HTML/source and a local index/preview. Render individual PNGs in order. Story visuals must use only safe aggregate stats and generic labels; inspect every slide for accidental personal details before finishing.
3. **Animated HTML player** — local/self-contained, no remote dependencies. Auto-advance through the slides with a progress indicator, readable transitions, and tasteful animation: staggered text entrances, number count-ups, chart/bar growth, and a cache-share ring or equivalent when relevant. Include pause/resume and previous/next controls (keyboard and/or click/tap). Honor reduced-motion preferences where practical.
4. **Animated MP4** — if a local browser-rendering path and FFmpeg (or an equivalent local encoder) are available, render frames from the actual animated timeline and encode a vertical H.264 MP4. Animate the content itself; do not make a video that merely zooms or pans over static screenshots. Aim for 1080×1920, 30 fps, roughly 30–45 seconds, H.264/yuv420p, broadly compatible playback, and no audio unless I ask for it. Keep the static Story deck intact. If the tooling is unavailable, explain exactly what is missing and leave a reproducible local render script rather than claiming the MP4 was made.
5. **README** — explain what each artifact is, how to open or share it, what date range it covers, its privacy limitations, and how to rebuild it locally.

Do not spend time copying or moving a large database backup into the deliverables folder. Keep the backup in a clearly marked local backup folder and document its path. Do not include the database itself in a shareable archive.

## Visual direction: match “Year in OpenCode · Wrapped”

Make this feel like a premium, editorial year-in-review — energetic and personal, but not noisy or over-crowded.

- Canvas: 1080×1920, 9:16. Keep titles, key figures, and footers inside safe margins so Instagram UI does not cover them.
- Background: near-black `#08090d` / `#05060a`, with subtle soft radial glows rather than busy textures.
- Palette: warm coral `#ff9d6b`, pink `#ff6b9d`, mint `#6ee7d0`, periwinkle blue `#7aa2ff`, and occasional gold `#ffd479`. Use restrained gradients and glows; ensure contrast and legibility.
- Typography: system fonts only, no remote font downloads. Use strong oversized numerals, bold editorial headlines, small letter-spaced uppercase section labels, quiet secondary copy, fine divider lines, and consistent footers/page numbering.
- Layout: generous negative space, clear hierarchy, aligned edges, consistent margins, and one main idea per slide. Avoid tiny type, unnecessary decorations, and dense paragraphs.
- Branding: use the exact name **“Year in OpenCode · Wrapped”** and the appropriate year. Do not reuse another person’s numbers, dates, identity, or project details.

### Reference slide sequence (keep this order for a close match)

Build these nine slides in order. Keep the composition recognizable, but substitute the owner's verified data and reflow gracefully if a metric is unavailable. Never fill a missing metric with a guess.

1. **Cover — “Year in OpenCode · Wrapped [YEAR]”**
   - Small uppercase brand/eyebrow near the upper-left; one oversized headline token total near the visual center; a small “tokens” label beneath it.
   - A short line of verified supporting stats (for example prompts, sessions, active days) below a fine divider.
   - Put the actual data range and a subtle “swipe →” cue low on the slide. Add the standard brand/page footer.
   - Use a warm coral-to-pink gradient on the hero figure/headline; keep the remaining space calm and dark.
2. **The headline — “A year of one long conversation.”**
   - Four generously spaced rows: prompt count, main-session count (subagents noted separately), active days, and best streak. Align large numbers left and short labels/right-side context right; separate rows with hairline dividers.
   - A quiet verified hands-on-time or activity-range summary can sit near the bottom. Never label subagents as main sessions.
3. **Where the tokens went**
   - Large mint/blue donut or ring showing the verified cache-read share (or another meaningful token split), with the percentage in its center.
   - Below it, two clear rows for cached/context tokens and fresh tokens, plus a short plain-language observation. If token categories cannot be reconciled, replace the ring with an explicitly labeled simple breakdown.
4. **Month by month — “The year, in chunks.”**
   - A single large 12-month vertical bar chart, with compact month labels. Scale bars to the maximum and animate them from the baseline upward.
   - At the bottom, call out the verified busiest day and amount, if available. Use the real covered months; visually distinguish months outside the data window rather than implying zero activity.
5. **When you work — “A [data-supported] creature.”**
   - A 24-hour vertical histogram with sparse hour labels (for example every three hours), blue/periwinkle bars, and a clearly identified peak hour.
   - Below a divider, show up to three large supporting facts, such as overnight share or weekend share, only when computed from timestamps and explained consistently.
6. **Models / agents — “Different tools for different moods.”**
   - A stacked horizontal or segmented bar for model/agent usage and a concise legend with names and percentages. Sort descending and group tiny categories as “Other” only if the grouping is accurate.
   - Keep labels readable; never expose account identifiers, API keys, provider endpoints, or private config values.
7. **Tools and output — “Mostly poking at your files.”**
   - Show up to five most-used tool categories as horizontal tracks, ranked by verified call count. Below a divider, show up to two reliable output metrics (for example files edited and lines written) and a small error-count note without shaming language.
   - Do not infer git changes from tool names alone; include commits/pushes only if directly verified.
8. **Your usage archetype**
   - One playful archetype name in oversized type, one brief reason based on at least two actual aggregate metrics, and a few small secondary “traits” as chips.
   - Keep it light and explicitly for fun. No personality, health, political, or other sensitive inferences.
9. **Closing — “That’s a wrap.”**
   - Echo the main token total and one compact memorable line using verified facts.
   - Include a small privacy note (“Made locally from a read-only copy. Nothing uploaded.”) only if true, the Wrapped year, and the standard page footer.

The story is an editorial summary, not a dashboard crammed into nine panels. Preserve this narrative/order where possible, but omit or adapt any slide that would otherwise require fabricated or unsupported data. Do not put personal project names, session titles, prompts, file paths, or identifiers on any story slide.

### Layout and type scale reference

Use these as starting measurements in the 1080×1920 design coordinate system; adjust sparingly to suit the content while maintaining the same visual language:

- Base background `#08090d`; primary text `#f4f6fb`; secondary `#a7afc1`; muted `#7f879a` / `#6d7587`.
- Shared horizontal inset: about 80 px. Top content begins around 250 px; bottom content/footer stays comfortably above the last 120 px. Reserve the top 150–200 px and bottom 100–140 px for Story UI safety.
- Section eyebrow: about 25 px, bold, uppercase, letter spacing around `0.3em`, muted slate. Headline: about 74 px, heavy, tight line-height. Hero figure: about 200–210 px. Supporting lead: about 36–38 px; labels: about 28–32 px; footnotes: at least 22–24 px.
- Use system UI sans-serif stack only. Use tabular numerals where numbers align. Avoid long all-caps copy and ensure text does not collide or overflow at 1080×1920.
- Shared top marker: nine short rounded segments; highlight the current slide with the warm accent. Shared footer: “YEAR IN OPENCODE · WRAPPED” at lower left and `NN / 09` at lower right, muted and letter-spaced.
- Give each slide one or two soft radial glows chosen from the palette. Keep glows low contrast so they never reduce text legibility. Use fine, low-opacity divider rules and generous empty space.

### Motion reference (apply to both HTML player and rendered video)

- Target a 45-second loop: 9 slides × approximately 5 seconds, 1080×1920, 30 fps. A 30-second version is acceptable if necessary, but keep each slide readable.
- Start each slide on a clean frame. Use a short fade-through-near-black transition (roughly 0.15–0.25 seconds); do not crossfade two dense text slides on top of each other. Keep the page/slide indicator synchronized with the visible slide.
- First ~1.2 seconds of each slide: reveal the eyebrow/headline and supporting text with a restrained opacity + 16–26 px upward movement, staggered by roughly 50–100 ms. Use ease-out motion, no bounce.
- Count eligible numeric metrics from 0 to their exact displayed values over roughly 0.8–1.1 seconds. Preserve commas, decimal precision, units, and suffixes; do not animate years, dates, labels, or values that would become misleading. Let all figures settle and remain readable for the rest of the slide.
- Grow month/hour bars upward from the baseline over roughly 0.8–1.0 seconds with a slight stagger. Grow horizontal tracks from left to right. Draw a donut/ring clockwise from 0 to the exact underlying percentage. Charts must finish at values proportional to the real data.
- Animate the thin top progress indicator linearly across each slide's hold time. Provide pause/resume and previous/next controls in HTML, but hide player instructions/controls in the exported video.
- Avoid perpetual motion, camera zooms over still screenshots, flashing, elastic overshoot, and any transition that briefly obscures important information. Honor `prefers-reduced-motion` in the HTML player.
- Use one deterministic timeline as the source for HTML playback and frame-by-frame MP4 rendering. The exported video must show the same count-ups, chart growth, and slide transitions as the player—not a separate still-image approximation.

## Build and verify

- Keep scripts straightforward and rerunnable. Use local-only dependencies/assets. If generating HTML, make it self-contained where practical.
- For static slides, render at the exact target viewport and verify image dimensions. Inspect all nine PNGs, not just the contact sheet.
- For animation, use a deterministic timeline so frame rendering does not depend on arbitrary sleeps or playback timing. Ensure counters settle on the correct source values, charts reach their real values, no old slide text overlaps the next slide, and transitions do not leave black/blank frames unexpectedly.
- Encode and probe the final MP4 (for example with `ffprobe`) to verify dimensions, frame rate, duration, codec, and that the file plays. Extract and inspect representative frames from the beginning, middle, slide transitions, and ending.
- Check that HTML, scripts, and output do not contain private project names, session titles, raw prompts, or local paths in the shareable deck. The separate private report can contain owner-useful details but must remain local.
- Do not call something “done” unless the corresponding artifact exists and has been verified. Report any partial result honestly.

## Finish

Give me a concise inventory with exact local paths, a plain-language summary of the verified date range and key findings, and the steps to open the report/player or use the MP4. State clearly that nothing was uploaded. Mention any metrics omitted or caveats, and leave the original database and static deliverables unchanged.
```

---

## Sharing this file

Send your friend this Markdown file, or copy the text inside **Copy-and-paste brief** into their OpenCode session. They should run it in a workspace where OpenCode can access their own local data. The instructions deliberately require their agent to inspect their setup and use their own verified snapshot; no database, generated report, or personal statistics from this project should be shared with it.
