[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75362M917THP79D9APYRKTE":3,"skill-same:01M75362M917THP79D9APYRKTE":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75362M917THP79D9APYRKTE","weekly-digests",null,"Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for \"weekly digests\", \"week-by-week story\", \"serial timeline\", or \"narrative chapters\" of a project's history.","longhang2004\u002FTenvyr","longhang2004","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F149140492?v=4","01M752YHWXV1V7TNHCK1P2SNK3","Hàng Nhựt Long","01M752YHYMBBTCMQ391XSES647",0,"MIT","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-digests\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: weekly-digests\ndescription: Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for \"weekly digests\", \"week-by-week story\", \"serial timeline\", or \"narrative chapters\" of a project's history.\n---\n\n# Weekly Digests\n\nProduce a serial, multi-chapter narrative digest of a project's complete claude-mem history. Differs from `timeline-report` (one long report) — this generates one digest *per ISO week*, with each subagent reading the prior week's carry-forward block so the story stays coherent.\n\n**The chapter count equals the number of ISO weeks the timeline covers.** A project with 2 weeks of data produces 2 chapters; one with 30 weeks produces 30. There is no fixed length — count the weeks first, then drive the pipeline off that count.\n\n## When to Use\n\nTrigger when the user asks for:\n\n- \"Weekly digests\"\n- \"Week-by-week story\"\n- \"Serial timeline\"\n- \"Story chapters of [project]\"\n- \"Run a digest for each week\"\n- \"Continue the story week by week\"\n\nIf the user wants a single sweeping report, use `timeline-report` instead. This skill is for serial chapter format.\n\n## Prerequisites\n\n- claude-mem worker running\n- Project has at least one ISO week of observations (the pipeline degenerates gracefully — even N=1 works)\n- A clean output directory the user is comfortable writing into\n\n**Resolve the worker port** (do this once, reuse `$WORKER_PORT`):\n\n```bash\nWORKER_PORT=\"${CLAUDE_MEM_WORKER_PORT:-$(node -e \"const fs=require('fs'),p=require('path'),os=require('os');const uid=(typeof process.getuid==='function'?process.getuid():77);const fallback=String(37700+(uid%100));try{const s=JSON.parse(fs.readFileSync(p.join(os.homedir(),'.claude-mem','settings.json'),'utf-8'));process.stdout.write(String(s.CLAUDE_MEM_WORKER_PORT||fallback));}catch{process.stdout.write(fallback);}\" 2>\u002Fdev\u002Fnull)}\"\n```\n\n## Workflow\n\n### Step 1: Determine the Project Name\n\nSame worktree-detection pattern as `timeline-report`. In a worktree, the data source is the **parent project**:\n\n```bash\ngit_dir=$(git rev-parse --git-dir 2>\u002Fdev\u002Fnull)\ngit_common_dir=$(git rev-parse --git-common-dir 2>\u002Fdev\u002Fnull)\nif [ \"$git_dir\" != \"$git_common_dir\" ]; then\n  parent_project=$(basename \"$(dirname \"$git_common_dir\")\")\nelse\n  parent_project=$(basename \"$PWD\")\nfi\necho \"$parent_project\"\n```\n\n### Step 2: Fetch the Full Timeline and Save It\n\n```bash\nmkdir -p .scratch\ncurl -s \"http:\u002F\u002Flocalhost:${WORKER_PORT}\u002Fapi\u002Fcontext\u002Finject?project=PROJECT_NAME&full=true\" \\\n  > .scratch\u002Fcm-timeline.md\nwc -l .scratch\u002Fcm-timeline.md\n```\n\nSanity-check: confirm the file is non-empty and has the expected structure (preamble, then date headers like `### Mon DD, YYYY`, then numeric observation lines `\u003Cid> \u003Ctime> \u003Cemoji> \u003Ctitle>` and session boundary lines `S\u003Cn> \u003Cprompt> (Mon DD at HH:MMpm)`).\n\n### Step 3: Split the Timeline Into Per-ISO-Week Files\n\nWrite a Python script to `.scratch\u002Fsplit-timeline.py` that:\n\n1. Parses date headers (`### Mon DD, YYYY`).\n2. Groups days into ISO weeks via `date.isocalendar()` (Monday-start).\n3. Emits one file per week to `docs\u002Ftimeline-weeks\u002F\u003CYYYY>-W\u003CNN>-\u003CMonDD>-to-\u003CMonDD>.md`, preserving each day's section verbatim.\n4. Runs a dual-pass sanity check: total observations distributed must equal the count in the source file.\n\nOutput structure (filenames illustrative):\n\n```\ndocs\u002Ftimeline-weeks\u002F\n  README.md                       # weekly index table\n  YYYY-W\u003CNN>-MonDD-to-MonDD.md    # one per ISO week the timeline covers\n  ...\n```\n\nEach weekly file should preserve the original daily sections verbatim. Do not paraphrase at this stage — the digest agents need raw fidelity.\n\n**Count the resulting files** before launching the pipeline. That count is `TOTAL` and drives every subsequent step. Empty weeks (zero observations between active weeks) should be skipped — the pipeline only operates on weeks that have content.\n\n### Step 4: Build the Weekly Index README\n\nWrite `docs\u002Ftimeline-weeks\u002FREADME.md` with a markdown table: Week | Dates | Observations | Sessions | File. This becomes the operator's roadmap and helps the agents understand pacing (peak weeks vs trough weeks).\n\n### Step 5: Run the Consecutive Subagent Pipeline\n\n**Critical: subagents run sequentially, NOT in parallel.** Each agent receives the prior agent's carry-forward block. This is the entire point of the skill — without it you have N disjoint summaries; with it you have an N-chapter serial narrative.\n\nCreate the output directory:\n\n```bash\nmkdir -p docs\u002Ftimeline-weeks\u002Fdigests\n```\n\nFor each week, in chronological order, dispatch a Task subagent (general-purpose) with this prompt template. **Wait for each agent to complete before launching the next.** Capture the carry-forward block from the result and inject it as `STORY_SO_FAR` into the next prompt.\n\n#### Subagent Prompt Template\n\n```\nYou are writing chapter {N} of {TOTAL} in a serial week-by-week digest of the {PROJECT} project's development history. Chapters 1 through {N-1} are written. {SPECIAL_NOTE: e.g. \"This is the LARGEST week\", \"This is the TROUGH\", \"This is the FINAL chapter\", \"This is the ONLY chapter — both first AND final week\"}.\n\n**Source file (read in full):**\n{ABSOLUTE_PATH_TO_WEEK_FILE}\n\n**Output digest file (write):**\n{ABSOLUTE_PATH_TO_DIGEST_FILE}\n\n**Format key for the source file:**\n- Numeric lines like `1 7:59p 🔵 Save hook file is empty` are observations (ID, time, type-emoji, title)\n- `S##` lines are session boundaries (the user prompt that started the session)\n- Emoji legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note\n\n**Story so far (carry-forward from Week {N-1}):**\n\n{STORY_SO_FAR_BLOCK_OR_EMPTY_FOR_WEEK_1}\n\n**Your digest must include:**\n1. **Title line** — `# Week {N} ({WEEK_LABEL}): {DATE_RANGE} — [your chosen subtitle]`\n2. **One-line tagline** — what this week is about, in plain English\n3. **Narrative section** ({BUDGET}) — tell the story. Resolve threads from prior weeks where the data shows resolution. Introduce new arcs. Use specific observation details.\n4. **Threads continued \u002F opened \u002F resolved** sections\n5. **Cliffhanger \u002F What's next**\n6. **Carry-forward block** at the very bottom, fenced as ```carry-forward ... ``` — structured handoff for the next week's agent.\n\n**CARRY-FORWARD DISCIPLINE:**\n- Cap at ~350 words.\n- AGGRESSIVELY PRUNE: drop arcs that didn't surface this week unless they're actively unresolved cliffhangers.\n- Drop cast members absent 2+ weeks unless load-bearing for the long arc.\n- Quality over completeness. The next agent inherits what you mention; mention judiciously.\n\nRequired carry-forward sub-sections:\n- **Active arcs** — ongoing themes\u002Fprojects the next agent should watch for\n- **Cast** — notable named systems\u002Fpeople\u002Ftools (continuing + new)\n- **Unresolved** — open questions or unfinished work\n- **Tone notes** — how the story is being told (voice, perspective, register evolution)\n\n**Tone rules:**\n- Third-person narrator, sharp, observational. Not twee.\n- AI is \"Claude\"; human is \"{USER_FIRST_NAME}\".\n- Treat codebase components as characters — whatever the project's recurring named systems are (e.g. a worker, a queue, a process manager, a recurring bug, a flaky migration). Don't import names from another project; use what shows up in this project's observations.\n- Don't manufacture drama. Name what's there.\n- Track the user's prompt-register evolution week by week (frustration markers, escalation language, shifts in tone).\n- Note meta-recursion if the project is reflexive about its own behavior (e.g. a tool that documents its own work, an AI agent debugging itself, a system that catches its own regressions).\n- Watch for new villains or co-stars and name them.\n- For trough\u002Fsilent weeks: silence IS the story. Don't pad. Name what didn't happen.\n- For surge weeks (>2,000 obs): pick 4-7 spine arcs and tell them well. Don't catalog.\n\n**Important:** Do NOT speculate beyond what's in the source file.\n\nAfter writing the file, return:\n1. Path of the file you wrote\n2. The carry-forward block verbatim\n3. One-sentence summary of the week\n```\n\n#### Narrative Budget by Observation Count\n\nScale narrative length proportionally to the week's volume:\n\n| Obs count | Narrative section budget |\n| --- | --- |\n| \u003C 100 | 200–400 words |\n| 100–500 | 300–600 words |\n| 500–1,500 | 500–900 words |\n| 1,500–3,000 | 700–1,100 words |\n| 3,000+ | 800–1,300 words |\n\nPad these into the `{BUDGET}` slot of the prompt for each week.\n\n#### The First Week\n\nFor Week 1, pass an empty `STORY_SO_FAR_BLOCK` and an instruction noting it's the origin chapter — the agent should establish initial cast, tone, and arcs for everyone after.\n\n#### The Final Week\n\nThe final week gets a different ending: **no carry-forward block**. Instead, instruct the agent to write a `## Where We Are` section (~250 words) naming what's still open at the moment of writing. Tell the agent the project is ongoing — the digest stops; the story doesn't. Don't give the story a false ending.\n\n#### When N = 1 (single-week project)\n\nApply BOTH treatments to the same chapter: empty `STORY_SO_FAR_BLOCK` AND `## Where We Are` instead of a carry-forward block. The agent is writing both the origin and the close in one pass. Don't reference prior or future chapters that don't exist.\n\n### Step 6: Rename Files for Sortable Order\n\nThe agents write digests with names like `YYYY-W\u003CNN>-digest.md`. These already sort chronologically by ISO week (until a project crosses a year boundary inside one project name), but **add a zero-padded numeric prefix** so the order is unambiguous to humans browsing or scripting against the directory:\n\n```bash\ncd docs\u002Ftimeline-weeks\u002Fdigests\ntotal=$(ls *.md | wc -l | tr -d ' ')\nwidth=${#total}                  # 1 for N\u003C10, 2 for N\u003C100, 3 for N\u003C1000\n[ \"$width\" -lt 2 ] && width=2    # always pad to at least 2 for readability\ni=0\nfor f in *.md; do\n  printf -v prefix \"%0${width}d\" $i\n  mv \"$f\" \"${prefix}-$f\"\n  i=$((i+1))\ndone\n```\n\nResult for N=30: `00-...md` through `29-...md`. For N=4: `00-...md` through `03-...md`. For N=120: `000-...md` through `119-...md`. **Always zero-pad** — `1-...md` and `10-...md` sort wrong without it.\n\nDo NOT also prepend the order number to the digest title line inside each file. The filename prefix is for sorting; the title stays clean: `# Week N (W##): Date — Subtitle`.\n\n### Step 7: Report Completion\n\nTell the user:\n- Total weeks digested (N)\n- Output directory path\n- Date range covered\n- Any silent\u002Ftrough weeks worth flagging\n- A one-sentence capstone summarizing the arc — written by the final-chapter agent, or composed by the operator from the final agent's `## Where We Are` section.\n\n## Pipeline Discipline\n\nThese rules emerged from running the pipeline end-to-end. Encode them every time:\n\n1. **Sequential, not parallel.** The whole point is the carry-forward chain. Parallelism breaks it.\n2. **Carry-forward is bounded.** It will bloat without active pruning. Tell every agent: cap ~350 words, drop dormant arcs, drop absent cast.\n3. **Track register evolution explicitly.** The user's prompt-style across weeks is a story arc. Frustration markers shift over time (whatever they happen to be in this project's data). Name the shifts.\n4. **Treat components as characters.** Whatever recurring named systems show up in the observations are this project's villains and co-stars. Stable cast across weeks builds narrative coherence.\n5. **Honor silence.** Trough weeks (10–100 obs) are real chapters. Name what didn't happen. Don't pad.\n6. **Don't manufacture drama.** Just observe the data. If the project is reflexive, the recursion is the drama; you don't need to add more.\n7. **Final week: no false ending.** The digest stops; the project doesn't. Write `## Where We Are`, not \"the end.\"\n\n## Error Handling\n\n- **Empty timeline**: project name wrong, or worker not running. `curl -s \"http:\u002F\u002Flocalhost:${WORKER_PORT}\u002Fapi\u002Fsearch?query=*&limit=1\"` to verify.\n- **Worker not running**: start it via your usual method or check `ps aux | grep worker-service`.\n- **Subagent returns malformed carry-forward**: extract the carry-forward block by regex (` ```carry-forward ... ``` `) and pass forward verbatim. If missing, ask the agent to retry with the explicit instruction \"your reply MUST include the carry-forward block fenced as ```carry-forward ... ``` at the very end.\"\n- **One agent fails mid-pipeline**: retry that week with the same carry-forward. Don't skip — the chain breaks.\n- **Carry-forward growing past ~500 words**: tighten the discipline instruction in subsequent prompts. Force pruning explicitly.\n\n## Examples\n\n### Long-running project (~30 weeks)\n\nUser: \"Make weekly digests for [project] from beginning to end\"\n\n1. Resolve worker port, detect project name.\n2. Fetch full timeline → `.scratch\u002Fcm-timeline.md`.\n3. Run `.scratch\u002Fsplit-timeline.py` → N weekly files in `docs\u002Ftimeline-weeks\u002F` (e.g. 30).\n4. Generate `docs\u002Ftimeline-weeks\u002FREADME.md` index.\n5. Launch N subagents consecutively, one per week. Each gets the prior week's carry-forward. The first chapter starts with empty carry-forward; the final chapter writes `## Where We Are` instead of a carry-forward block.\n6. Rename digests with zero-padded order prefix (`00-...md` through `29-...md`).\n7. Report total chapters, date range, any troughs\u002Fpeaks, and the one-line capstone the final agent produced.\n\n### Short-lived project (~3 weeks)\n\nSame flow, just smaller. N=3, so:\n- Chapter 1: empty carry-forward, establish cast\u002Ftone\u002Farcs.\n- Chapter 2: receives chapter 1's carry-forward, builds on it.\n- Chapter 3: receives chapter 2's carry-forward, BUT gets the final-chapter treatment (`## Where We Are` instead of carry-forward block).\n- Filenames: `00-...md`, `01-...md`, `02-...md`.\n\n### Single-week project (N=1)\n\nApply both first-and-final-chapter treatment to the only chapter: empty carry-forward, `## Where We Are` close, no inter-chapter references. Filename: `00-...md`.\n","# Weekly Digests\n\nProduce a serial, multi-chapter narrative digest of a project's complete claude-mem history. Differs from `timeline-report` (one long report) — this generates one digest *per ISO week*, with each subagent reading the prior week's carry-forward block so the story stays coherent.\n\n**The chapter count equals the number of ISO weeks the timeline covers.** A project with 2 weeks of data produces 2 chapters; one with 30 weeks produces 30. There is no fixed length — count the weeks first, then drive the pipeline off that count.\n\n## When to Use\n\nTrigger when the user asks for:\n\n- \"Weekly digests\"\n- \"Week-by-week story\"\n- \"Serial timeline\"\n- \"Story chapters of [project]\"\n- \"Run a digest for each week\"\n- \"Continue the story week by week\"\n\nIf the user wants a single sweeping report, use `timeline-report` instead. This skill is for serial chapter format.\n\n## Prerequisites\n\n- claude-mem worker running\n- Project has at least one ISO week of observations (the pipeline degenerates gracefully — even N=1 works)\n- A clean output directory the user is comfortable writing into\n\n**Resolve the worker port** (do this once, reuse `$WORKER_PORT`):\n\n```bash\nWORKER_PORT=\"${CLAUDE_MEM_WORKER_PORT:-$(node -e \"const fs=require('fs'),p=require('path'),os=require('os');const uid=(typeof process.getuid==='function'?process.getuid():77);const fallback=String(37700+(uid%100));try{const s=JSON.parse(fs.readFileSync(p.join(os.homedir(),'.claude-mem','settings.json'),'utf-8'));process.stdout.write(String(s.CLAUDE_MEM_WORKER_PORT||fallback));}catch{process.stdout.write(fallback);}\" 2>\u002Fdev\u002Fnull)}\"\n```\n\n## Workflow\n\n### Step 1: Determine the Project Name\n\nSame worktree-detection pattern as `timeline-report`. In a worktree, the data source is the **parent project**:\n\n```bash\ngit_dir=$(git rev-parse --git-dir 2>\u002Fdev\u002Fnull)\ngit_common_dir=$(git rev-parse --git-common-dir 2>\u002Fdev\u002Fnull)\nif [ \"$git_dir\" != \"$git_common_dir\" ]; then\n  parent_project=$(basename \"$(dirname \"$git_common_dir\")\")\nelse\n  parent_project=$(basename \"$PWD\")\nfi\necho \"$parent_project\"\n```\n\n### Step 2: Fetch the Full Timeline and Save It\n\n```bash\nmkdir -p .scratch\ncurl -s \"http:\u002F\u002Flocalhost:${WORKER_PORT}\u002Fapi\u002Fcontext\u002Finject?project=PROJECT_NAME&full=true\" \\\n  > .scratch\u002Fcm-timeline.md\nwc -l .scratch\u002Fcm-timeline.md\n```\n\nSanity-check: confirm the file is non-empty and has the expected structure (preamble, then date headers like `### Mon DD, YYYY`, then numeric observation lines `\u003Cid> \u003Ctime> \u003Cemoji> \u003Ctitle>` and session boundary lines `S\u003Cn> \u003Cprompt> (Mon DD at HH:MMpm)`).\n\n### Step 3: Split the Timeline Into Per-ISO-Week Files\n\nWrite a Python script to `.scratch\u002Fsplit-timeline.py` that:\n\n1. Parses date headers (`### Mon DD, YYYY`).\n2. Groups days into ISO weeks via `date.isocalendar()` (Monday-start).\n3. Emits one file per week to `docs\u002Ftimeline-weeks\u002F\u003CYYYY>-W\u003CNN>-\u003CMonDD>-to-\u003CMonDD>.md`, preserving each day's section verbatim.\n4. Runs a dual-pass sanity check: total observations distributed must equal the count in the source file.\n\nOutput structure (filenames illustrative):\n\n```\ndocs\u002Ftimeline-weeks\u002F\n  README.md                       # weekly index table\n  YYYY-W\u003CNN>-MonDD-to-MonDD.md    # one per ISO week the timeline covers\n  ...\n```\n\nEach weekly file should preserve the original daily sections verbatim. Do not paraphrase at this stage — the digest agents need raw fidelity.\n\n**Count the resulting files** before launching the pipeline. That count is `TOTAL` and drives every subsequent step. Empty weeks (zero observations between active weeks) should be skipped — the pipeline only operates on weeks that have content.\n\n### Step 4: Build the Weekly Index README\n\nWrite `docs\u002Ftimeline-weeks\u002FREADME.md` with a markdown table: Week | Dates | Observations | Sessions | File. This becomes the operator's roadmap and helps the agents understand pacing (peak weeks vs trough weeks).\n\n### Step 5: Run the Consecutive Subagent Pipeline\n\n**Critical: subagents run sequentially, NOT in parallel.** Each agent receives the prior agent's carry-forward block. This is the entire point of the skill — without it you have N disjoint summaries; with it you have an N-chapter serial narrative.\n\nCreate the output directory:\n\n```bash\nmkdir -p docs\u002Ftimeline-weeks\u002Fdigests\n```\n\nFor each week, in chronological order, dispatch a Task subagent (general-purpose) with this prompt template. **Wait for each agent to complete before launching the next.** Capture the carry-forward block from the result and inject it as `STORY_SO_FAR` into the next prompt.\n\n#### Subagent Prompt Template\n\n```\nYou are writing chapter {N} of {TOTAL} in a serial week-by-week digest of the {PROJECT} project's development history. Chapters 1 through {N-1} are written. {SPECIAL_NOTE: e.g. \"This is the LARGEST week\", \"This is the TROUGH\", \"This is the FINAL chapter\", \"This is the ONLY chapter — both first AND final week\"}.\n\n**Source file (read in full):**\n{ABSOLUTE_PATH_TO_WEEK_FILE}\n\n**Output digest file (write):**\n{ABSOLUTE_PATH_TO_DIGEST_FILE}\n\n**Format key for the source file:**\n- Numeric lines like `1 7:59p 🔵 Save hook file is empty` are observations (ID, time, type-emoji, title)\n- `S##` lines are session boundaries (the user prompt that started the session)\n- Emoji legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note\n\n**Story so far (carry-forward from Week {N-1}):**\n\n{STORY_SO_FAR_BLOCK_OR_EMPTY_FOR_WEEK_1}\n\n**Your digest must include:**\n1. **Title line** — `# Week {N} ({WEEK_LABEL}): {DATE_RANGE} — [your chosen subtitle]`\n2. **One-line tagline** — what this week is about, in plain English\n3. **Narrative section** ({BUDGET}) — tell the story. Resolve threads from prior weeks where the data shows resolution. Introduce new arcs. Use specific observation details.\n4. **Threads continued \u002F opened \u002F resolved** sections\n5. **Cliffhanger \u002F What's next**\n6. **Carry-forward block** at the very bottom, fenced as ```carry-forward ... ``` — structured handoff for the next week's agent.\n\n**CARRY-FORWARD DISCIPLINE:**\n- Cap at ~350 words.\n- AGGRESSIVELY PRUNE: drop arcs that didn't surface this week unless they're actively unresolved cliffhangers.\n- Drop cast members absent 2+ weeks unless load-bearing for the long arc.\n- Quality over completeness. The next agent inherits what you mention; mention judiciously.\n\nRequired carry-forward sub-sections:\n- **Active arcs** — ongoing themes\u002Fprojects the next agent should watch for\n- **Cast** — notable named systems\u002Fpeople\u002Ftools (continuing + new)\n- **Unresolved** — open questions or unfinished work\n- **Tone notes** — how the story is being told (voice, perspective, register evolution)\n\n**Tone rules:**\n- Third-person narrator, sharp, observational. Not twee.\n- AI is \"Claude\"; human is \"{USER_FIRST_NAME}\".\n- Treat codebase components as characters — whatever the project's recurring named systems are (e.g. a worker, a queue, a process manager, a recurring bug, a flaky migration). Don't import names from another project; use what shows up in this project's observations.\n- Don't manufacture drama. Name what's there.\n- Track the user's prompt-register evolution week by week (frustration markers, escalation language, shifts in tone).\n- Note meta-recursion if the project is reflexive about its own behavior (e.g. a tool that documents its own work, an AI agent debugging itself, a system that catches its own regressions).\n- Watch for new villains or co-stars and name them.\n- For trough\u002Fsilent weeks: silence IS the story. Don't pad. Name what didn't happen.\n- For surge weeks (>2,000 obs): pick 4-7 spine arcs and tell them well. Don't catalog.\n\n**Important:** Do NOT speculate beyond what's in the source file.\n\nAfter writing the file, return:\n1. Path of the file you wrote\n2. The carry-forward block verbatim\n3. One-sentence summary of the week\n```\n\n#### Narrative Budget by Observation Count\n\nScale narrative length proportionally to the week's volume:\n\n| Obs count | Narrative section budget |\n| --- | --- |\n| \u003C 100 | 200–400 words |\n| 100–500 | 300–600 words |\n| 500–1,500 | 500–900 words |\n| 1,500–3,000 | 700–1,100 words |\n| 3,000+ | 800–1,300 words |\n\nPad these into the `{BUDGET}` slot of the prompt for each week.\n\n#### The First Week\n\nFor Week 1, pass an empty `STORY_SO_FAR_BLOCK` and an instruction noting it's the origin chapter — the agent should establish initial cast, tone, and arcs for everyone after.\n\n#### The Final Week\n\nThe final week gets a different ending: **no carry-forward block**. Instead, instruct the agent to write a `## Where We Are` section (~250 words) naming what's still open at the moment of writing. Tell the agent the project is ongoing — the digest stops; the story doesn't. Don't give the story a false ending.\n\n#### When N = 1 (single-week project)\n\nApply BOTH treatments to the same chapter: empty `STORY_SO_FAR_BLOCK` AND `## Where We Are` instead of a carry-forward block. The agent is writing both the origin and the close in one pass. Don't reference prior or future chapters that don't exist.\n\n### Step 6: Rename Files for Sortable Order\n\nThe agents write digests with names like `YYYY-W\u003CNN>-digest.md`. These already sort chronologically by ISO week (until a project crosses a year boundary inside one project name), but **add a zero-padded numeric prefix** so the order is unambiguous to humans browsing or scripting against the directory:\n\n```bash\ncd docs\u002Ftimeline-weeks\u002Fdigests\ntotal=$(ls *.md | wc -l | tr -d ' ')\nwidth=${#total}                  # 1 for N\u003C10, 2 for N\u003C100, 3 for N\u003C1000\n[ \"$width\" -lt 2 ] && width=2    # always pad to at least 2 for readability\ni=0\nfor f in *.md; do\n  printf -v prefix \"%0${width}d\" $i\n  mv \"$f\" \"${prefix}-$f\"\n  i=$((i+1))\ndone\n```\n\nResult for N=30: `00-...md` through `29-...md`. For N=4: `00-...md` through `03-...md`. For N=120: `000-...md` through `119-...md`. **Always zero-pad** — `1-...md` and `10-...md` sort wrong without it.\n\nDo NOT also prepend the order number to the digest title line inside each file. The filename prefix is for sorting; the title stays clean: `# Week N (W##): Date — Subtitle`.\n\n### Step 7: Report Completion\n\nTell the user:\n- Total weeks digested (N)\n- Output directory path\n- Date range covered\n- Any silent\u002Ftrough weeks worth flagging\n- A one-sentence capstone summarizing the arc — written by the final-chapter agent, or composed by the operator from the final agent's `## Where We Are` section.\n\n## Pipeline Discipline\n\nThese rules emerged from running the pipeline end-to-end. Encode them every time:\n\n1. **Sequential, not parallel.** The whole point is the carry-forward chain. Parallelism breaks it.\n2. **Carry-forward is bounded.** It will bloat without active pruning. Tell every agent: cap ~350 words, drop dormant arcs, drop absent cast.\n3. **Track register evolution explicitly.** The user's prompt-style across weeks is a story arc. Frustration markers shift over time (whatever they happen to be in this project's data). Name the shifts.\n4. **Treat components as characters.** Whatever recurring named systems show up in the observations are this project's villains and co-stars. Stable cast across weeks builds narrative coherence.\n5. **Honor silence.** Trough weeks (10–100 obs) are real chapters. Name what didn't happen. Don't pad.\n6. **Don't manufacture drama.** Just observe the data. If the project is reflexive, the recursion is the drama; you don't need to add more.\n7. **Final week: no false ending.** The digest stops; the project doesn't. Write `## Where We Are`, not \"the end.\"\n\n## Error Handling\n\n- **Empty timeline**: project name wrong, or worker not running. `curl -s \"http:\u002F\u002Flocalhost:${WORKER_PORT}\u002Fapi\u002Fsearch?query=*&limit=1\"` to verify.\n- **Worker not running**: start it via your usual method or check `ps aux | grep worker-service`.\n- **Subagent returns malformed carry-forward**: extract the carry-forward block by regex (` ```carry-forward ... ``` `) and pass forward verbatim. If missing, ask the agent to retry with the explicit instruction \"your reply MUST include the carry-forward block fenced as ```carry-forward ... ``` at the very end.\"\n- **One agent fails mid-pipeline**: retry that week with the same carry-forward. Don't skip — the chain breaks.\n- **Carry-forward growing past ~500 words**: tighten the discipline instruction in subsequent prompts. Force pruning explicitly.\n\n## Examples\n\n### Long-running project (~30 weeks)\n\nUser: \"Make weekly digests for [project] from beginning to end\"\n\n1. Resolve worker port, detect project name.\n2. Fetch full timeline → `.scratch\u002Fcm-timeline.md`.\n3. Run `.scratch\u002Fsplit-timeline.py` → N weekly files in `docs\u002Ftimeline-weeks\u002F` (e.g. 30).\n4. Generate `docs\u002Ftimeline-weeks\u002FREADME.md` index.\n5. Launch N subagents consecutively, one per week. Each gets the prior week's carry-forward. The first chapter starts with empty carry-forward; the final chapter writes `## Where We Are` instead of a carry-forward block.\n6. Rename digests with zero-padded order prefix (`00-...md` through `29-...md`).\n7. Report total chapters, date range, any troughs\u002Fpeaks, and the one-line capstone the final agent produced.\n\n### Short-lived project (~3 weeks)\n\nSame flow, just smaller. N=3, so:\n- Chapter 1: empty carry-forward, establish cast\u002Ftone\u002Farcs.\n- Chapter 2: receives chapter 1's carry-forward, builds on it.\n- Chapter 3: receives chapter 2's carry-forward, BUT gets the final-chapter treatment (`## Where We Are` instead of carry-forward block).\n- Filenames: `00-...md`, `01-...md`, `02-...md`.\n\n### Single-week project (N=1)\n\nApply both first-and-final-chapter treatment to the only chapter: empty carry-forward, `## Where We Are` close, no inter-chapter references. Filename: `00-...md`.\n",{"name":5,"description":7},"main","fa33bab5e066f61f678d15d8654b7f16fcb5aef0","skills\u002Fweekly-digests","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr","https:\u002F\u002Fgithub.com\u002Flonghang2004","https:\u002F\u002Flonghang2004.github.io\u002Fportfolio-website\u002F","2026-10-17 00:52:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add longhang2004\u002FTenvyr --skill weekly-digests",{"tool":37,"command":38},"bunx","bunx skills add longhang2004\u002FTenvyr --skill weekly-digests",{"tool":40,"command":41},"pnpm","pnpm dlx skills add longhang2004\u002FTenvyr --skill weekly-digests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-digests\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M75368XG3WHG7S884RH1FQEG","wowerpoint","Turn one document into a kawaii NotebookLM slide-deck PDF. Use for \"wowerpoint this\", \"make a deck about \u003Cfile>\", \"turn this report into slides\", or any request to render a single document as shareable narrative slides.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fwowerpoint\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7536783K0EKKQ66A56RJ262","what-the","What the? Use when the user wants a plain-English breakdown of something technical — the who, what, where, why, and when.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fwhat-the\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7535ZRATN41PZHPPWZEBM8E","version-bump","Automated semantic versioning and release workflow for Claude Code plugins. Handles version increments across package.json, marketplace.json, plugin.json manifests, build verification, git tagging, GitHub releases, and changelog generation. NPM publishing (so `npx claude-mem@X.Y.Z` resolves) is handed off to the human maintainer, who raised npm security.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fversion-bump\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7535VQDD9MXAYXH6N2E8FFJ","understand","Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Funderstand\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7535T2XNDGZP1GD2AD8VHEW","understand-onboard","Use when you need to generate an onboarding guide for new team members joining a project","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Funderstand-onboard\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7535QQM4BVPW9S85GDJP944","understand-knowledge","Analyze a Karpathy-pattern LLM wiki knowledge base and generate an interactive knowledge graph with entity extraction, implicit relationships, and topic clustering.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Funderstand-knowledge\u002FSKILL.md",[],[]]