Claude Cursor GitHub Copilot Skill

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so

LLM Mart · 0 points · 19 views 68 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download specstoryai-getspecstory-workthreads-1e49496.zip · 37 KB

Install

skills CLI npx skills add https://github.com/specstoryai/getspecstory/tree/dev/workthreads
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install specstoryai-getspecstory@llmmart
Git git clone https://github.com/specstoryai/getspecstory.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole specstoryai/getspecstory collection as a plugin from our marketplace. Git is the plain clone.

README

Workthreads

A weekly work-thread rollup from your SpecStory coding histories.

Workthreads reads the .specstory/history transcripts your coding agents already write and answers, at a glance: what happened this week, what got finished, and what is still open and needs a next step. It groups the window's sessions into threads of work per project and labels each one:

  • new - first activity within the last 7 days
  • open - unresolved, still active (the "open loops")
  • closed - latest outcome was success and it has gone quiet (flagged reverted when a beat ran a rollback command)

A lead can use it for a weekly standup; an individual can use it to re-orient after time away ("what was I in the middle of?").

How it clusters (deterministic, no LLM in the engine)

The engine is robust against both failure modes of naive clustering:

  • A session is one line of work - a long multi-prompt session collapses into one thread, not one-thread-per-prompt.
  • Cross-session merge needs >= 2 shared rare keys (a distinct file or symbol; ubiquitous files like package.json and short abbreviations are ignored) - so a single shared utility file or a plain word never bridges unrelated work.
  • Bounded threads - a hard session cap stops a whole codebase from chaining into one mega-thread.

Output is deterministic (stable sort, no wall-clock in the body), so two runs on the same corpus are byte-identical.

Install

From a clone of this repo:

cd workthreads
./install.sh

That bundles the engine and the skill into ~/.agents/skills/workthreads and symlinks it into ~/.claude/skills/workthreads, so /workthreads is available from any Claude Code session in any project. It is self-contained - it does not read from any other skill's directory. Re-run ./install.sh any time to update.

Requirements: Node >= 22.5 (for node:sqlite), and the SpecStory CLI capturing histories into .specstory/history/.

Use

Start a new Claude Code session (skills load at session start), then:

/workthreads

or just ask in plain English: "give me the weekly rollup", "what's still open?", "what did we finish this week?". With no arguments it asks three short questions - Scope (which repos), Window (how many days, default 7), Goal (full rollup / just open loops / recently closed / status) - then runs.

The digest groups threads by project under New / Open / Recently closed, each with evidence refs (path:line), last-activity date, and a one-line rationale. It is also saved to a dated file (.specstory/workthreads/<YYYY>-W<week>.md) so rollups are durable and diffable week over week.

Sample shape:

workthreads digest - 31 thread(s) across 3 active project(s) (window: last 7 days)

## marketing
  New
    - run the first-cut skill on the maker video  [new]  · last 2026-06-19 · 1 session, 20 beats
  Open
    - resend contact-topic sync still failing  [open]  · last 2026-06-20 · 2 sessions, 7 beats
  Recently closed
    - extract survey emails for non-solo respondents  [closed]  · last 2026-06-18 · 1 session, 6 beats

Develop

The engine is plain Node (ESM, zero dependencies, node:sqlite). Run the tests:

cd workthreads
npm test

License

Apache-2.0.

Skill manifest

Workthreads

A lead needs a weekly answer across the team's repos: what work happened this week, what got finished, and what is still open and needs a next step. Workthreads produces that rollup from SpecStory histories - the .specstory/history transcripts your coding agents already write. It reports lines of work and their lifecycle (new / open / recently closed).

A deterministic engine (scripts/workthreads.mjs threads) does the retrieval, clustering, and classification; you do the synthesis - you turn its evidence into the lead's weekly report. Do not try to read raw transcripts yourself; they can be hundreds of thousands of lines. Run the engine and write the rollup from its output.

This skill is harness-portable (agentskills.io format). Where it names a specific tool (e.g. AskUserQuestion), treat that as "use your harness's equivalent; fall back to plain chat."

How the engine splits the work

  • The engine groups the window's beats by project and clusters them into threads (a line of work that can span several sessions). It assigns each thread one lifecycle status relative to today:
    • new - first activity within the last 7 days.
    • open - unresolved, still active (the open loops).
    • closed - latest outcome was success and the thread has gone quiet; flagged reverted when a beat ran a rollback command (git revert / git reset --hard / git checkout -- ...).
  • Output is deterministic (stable sort, no wall-clock timestamps in the body), so two runs on the same corpus are byte-identical.

Default flow: the weekly rollup

  1. Index the corpus into workthreads' own DB. Point at the team's repos and build/update it:

    node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" index --projects <parent-of-repos> --db <db>
    # or a single tree:  --scan <root>     or a single history dir:  --dir <dir>
    
  2. Run threads cross-project for the last 7 days and capture the evidence:

    node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7            # human digest
    node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7 --json     # machine-readable
    

    The digest prints, per project, three sections in order - New, Open, Recently closed - each thread with its evidence refs (path:line), last-activity date, status, and a reverted marker. --json emits an array of threads (project, status, reverted, the files touched, last-activity date).

  3. Write the rollup from that evidence, in the lead's shape:

    • (a) a high-level result: session count and active projects in the window;
    • (b) per-project highlights of completed work (the closed threads);
    • (c) open loops - the open threads, unresolved or needing verification, with a suggested next step each;
    • (d) notable rollbacks / abandoned efforts (the reverted threads);
    • (e) cite evidence refs (path:line) so each claim is checkable. Add a caveat that the week may still be in progress, so open and new threads are snapshots, not final outcomes.
  4. Save it to a dated file so the rollup is durable and diffable week over week:

    .specstory/workthreads/<YYYY>-W<week>.md
    

    (ISO week number, e.g. .specstory/workthreads/2026-W25.md). Also offer threads --out <file> to drop the raw digest beside your written summary.

Guided start

If the user just invokes the skill with no specifics, ask three short questions (use AskUserQuestion or plain chat), then run the default flow with the answers:

  • Scope - which repos / parent directory holds the team's .specstory/history corpus?
  • Window - how many days back? (default 7 for the weekly rollup; --days N to widen.)
  • Goal - the whole rollup, just the open loops, just recently closed, or a quick status line? Tailor which sections you emphasize to the answer.

Conventions

Node ESM only, zero dependencies, Node >= 22.5. No em dashes anywhere (use " - "). The engine path never calls an LLM or the network; all judgment (the written narrative, suggested next steps, emphasis) is yours.

Files (getspecstory)
  • docs
    • 2026-06-24-WORKTHREADS-AS-BUILT.md 5.5 KB
      # Workthreads - As Built (2026-06-24)
      
      What the `george-report` branch delivers, how it works, and the decisions behind it.
      This is the single source of record for the work; it replaces the per-run deadreckon
      audit docs.
      
      ## What shipped
      
      A new, **standalone** Claude/agent skill: **`/workthreads`** - a weekly work-thread
      rollup over SpecStory coding histories. It lives in a self-contained top-level
      [`workthreads/`](../workthreads) directory and can be installed on its own.
      
      Relative to `dev`:
      
      - **`workthreads/`** - new: the entire skill (engine, CLI, SKILL.md, README, tests,
        fixtures, installer).
      - **`lore/`** - unchanged (identical to `dev`).
      - **`.gitignore`** - added entries for local deadreckon / specstory artifacts.
      - **`docs/`** - this one file.
      
      ## What the skill does
      
      Given the `.specstory/history` transcripts coding agents already write, it groups a
      time window's sessions into **threads of work, per project**, and labels each:
      
      - **new** - first activity within the last 7 days
      - **open** - unresolved, recently active (the "open loops")
      - **closed** - latest outcome was success and it has gone quiet; flagged **reverted**
        when a beat ran a rollback command (`git revert` / `git reset --hard` /
        `git checkout -- ...`)
      
      It renders a digest (per project: New / Open / Recently closed, with evidence refs,
      last-activity date, and a one-line rationale), supports `--json` and `--out`, and is
      deterministic (stable sort, no wall-clock in the body). The **engine produces the
      structure; the agent writes the narrative rollup** from that evidence - no LLM or
      network call in the engine path.
      
      ## Architecture
      
      ```
      workthreads/
      ├── SKILL.md                 the agent contract (guided start, default weekly-rollup flow)
      ├── README.md                what it is, install, use
      ├── install.sh               self-contained installer (bundles the engine)
      ├── package.json             node >=22.5, `npm test`
      ├── scripts/
      │   ├── workthreads.mjs       CLI: `index` and `threads`
      │   └── lib/                  patterns, parse, discover, db, indexer, threads (zero deps)
      ├── tests/threads.test.mjs    11 tests over committed fixtures + synthetic stress corpora
      └── fixtures/                 threads-foo / threads-bar (known-lifecycle transcripts)
      ```
      
      `workthreads.mjs` has two subcommands: `index` (builds a SQLite corpus from
      `.specstory/history`, default `~/.specstory/workthreads.db`) and `threads` (clusters +
      classifies + renders). `--projects`/`--scan`/`--dir` let `threads` index-then-render
      in one shot.
      
      ### Clustering (the load-bearing part)
      
      The engine clusters beats into threads with three rules, in order:
      
      1. **A session is one line of work.** All of a session's beats are unioned - a long
         multi-prompt session becomes ONE thread, not one-thread-per-prompt.
      2. **Cross-session merge needs >= 2 shared RARE keys.** A key is a file or a
         distinctive symbol (snake_case / camelCase / ALL_CAPS_WITH_UNDERSCORE). Ubiquitous
         keys - any in more than 4 sessions, plus config files (`.env`, `package.json`, tool
         dirs) and short abbreviations (`AI`, `API`, `EOF`) - are ignored. Two sessions merge
         only when they share at least two such keys, so a lone shared utility file or a
         plain word never bridges unrelated work.
      3. **Bounded union.** A thread is capped at 5 sessions; a merge that would exceed the
         cap is refused.
      
      Lifecycle status is assigned per thread relative to today, precedence: **closed**
      (latest outcome success, quiet >= 3 days, last activity <= 30 days) > **new** (first
      activity <= 7 days) > **open** (activity <= 14 days). Threads grouped by project.
      
      ### Why it is this way
      
      Two failure modes were found and fixed against the real corpus:
      
      - **Under-merge (fragmentation):** naive per-beat clustering produced **372**
        single-prompt "threads" - a single coherent session shattered. Fixed by rule 1.
      - **Over-merge (mega-threads):** single-linkage on shared files/symbols chains a whole
        codebase into one giant thread (observed: 4368 beats collapsed into 2). No per-edge
        threshold prevents this - a shared codebase is inherently densely connected. Fixed by
        rules 2 and 3 together (rare-key requirement + hard session cap).
      
      Net on the real corpus: **372 fragments -> ~30 coherent threads**, max 5 sessions per
      thread, no cross-project bleed.
      
      ## Install and use
      
      ```zsh
      cd workthreads && ./install.sh
      ```
      
      Bundles the engine + SKILL.md into `~/.agents/skills/workthreads` and symlinks it into
      `~/.claude/skills/workthreads`, so `/workthreads` works from any Claude Code session in
      any project. Re-run to update. Then, in a new session: `/workthreads` (or "give me the
      weekly rollup"). The rollup is also saved to `.specstory/workthreads/<YYYY>-W<week>.md`.
      
      ## Design decisions
      
      - **Standalone, not coupled.** Workthreads has no runtime dependency on any other
        skill. It carries its own copy of the shared engine modules - **independence over
        DRY**, a deliberate choice. (An earlier iteration reused lore's engine; that coupling
        was removed and `lore/` reverted to `dev`.)
      - **Engine deterministic, agent judges.** Clustering/classification/rendering are pure
        and byte-reproducible; the weekly narrative is the agent's job.
      - **Conventions:** Node ESM, zero npm dependencies, Node >= 22.5, no em dashes.
      
      ## Verification
      
      - `workthreads` tests: **11/11** (`cd workthreads && npm test`).
      - `lore` tests: **32/32** (unaffected by the split).
      - Output deterministic (two runs byte-identical).
      - Exercised against the real `~/.specstory` corpus and from an unrelated project
        directory via the installed skill.
      
  • fixtures
    • threads-bar
      • .specstory
        • history
          • 2026-06-06_09-00-00Z-scaffold-search-index.md 282 B
            ## 2026-06-06 09:00:00Z
            
            <!-- Claude Code Session bbbb1111-2222-4333-8444-000000000004 (2026-06-06_09-00-00Z) -->
            
            _**User**_
            
            scaffold the SEARCH_INDEX module
            
            ---
            
            _**Agent (claude-opus-4-20250514)**_
            
            Tool use: **Write** `src/SEARCH_INDEX.swift`
            
            Result:
            
            ```
            wrote 24 lines
            ```
            
          • 2026-06-20_11-00-00Z-fix-search-index.md 354 B
            ## 2026-06-20 11:00:00Z
            
            <!-- Claude Code Session bbbb1111-2222-4333-8444-000000000005 (2026-06-20_11-00-00Z) -->
            
            _**User**_
            
            fix the SEARCH_INDEX crash
            
            ---
            
            _**Agent (claude-opus-4-20250514)**_
            
            Tool use: **Bash** Build the index
            
            `swift build src/SEARCH_INDEX.swift`
            
            Result:
            
            ```
            crash: index out of range
            ```
            
            ---
            
            _**User**_
            
            no, it still crashes
            
          • 2026-06-21_15-00-00Z-start-notif-badge.md 273 B
            ## 2026-06-21 15:00:00Z
            
            <!-- Claude Code Session bbbb1111-2222-4333-8444-000000000006 (2026-06-21_15-00-00Z) -->
            
            _**User**_
            
            start the NOTIF_BADGE prototype
            
            ---
            
            _**Agent (claude-opus-4-20250514)**_
            
            Tool use: **Write** `src/NOTIF_BADGE.swift`
            
            Result:
            
            ```
            created
            ```
            
    • threads-foo
      • .specstory
        • history
          • 2026-06-02_09-00-00Z-begin-checkout-flow.md 503 B
            <!-- Generated by SpecStory, Markdown v2.1.0 -->
            
            # 2026-06-02 09:00:00Z
            
            <!-- Claude Code Session aaaa1111-2222-4333-8444-000000000001 (2026-06-02 09:00:00Z) -->
            
            _**User (2026-06-02 09:00:00Z)**_
            
            begin the CHECKOUT_FLOW implementation
            
            ---
            
            _**Agent (claude-opus-4-6 2026-06-02 09:00:05Z)**_
            
            <tool-use data-tool-type="write" data-tool-name="Write"><details>
            <summary>Tool use: **Write**</summary>
             `src/CHECKOUT_FLOW.swift`
            </details></tool-use>
            
            Created the initial scaffold for the checkout flow.
            
          • 2026-06-09_10-00-00Z-finish-checkout-flow.md 550 B
            <!-- Generated by SpecStory, Markdown v2.1.0 -->
            
            # 2026-06-09 10:00:00Z
            
            <!-- Claude Code Session aaaa1111-2222-4333-8444-000000000002 (2026-06-09 10:00:00Z) -->
            
            _**User (2026-06-09 10:00:00Z)**_
            
            finish the CHECKOUT_FLOW implementation
            
            ---
            
            _**Agent (claude-opus-4-6 2026-06-09 10:00:05Z)**_
            
            <tool-use data-tool-type="shell" data-tool-name="Bash"><details>
            <summary>Tool use: **Bash**</summary>
            
            `swift build src/CHECKOUT_FLOW.swift`
            
            ```text
            Build complete
            ```
            </details></tool-use>
            
            ---
            
            _**User (2026-06-09 10:06:00Z)**_
            
            perfect, that works
            
          • 2026-06-12_14-00-00Z-payment-retry-rollback.md 905 B
            <!-- Generated by SpecStory, Markdown v2.1.0 -->
            
            # 2026-06-12 14:00:00Z
            
            <!-- Claude Code Session aaaa1111-2222-4333-8444-000000000003 (2026-06-12 14:00:00Z) -->
            
            _**User (2026-06-12 14:00:00Z)**_
            
            implement the PAYMENT_RETRY feature
            
            ---
            
            _**Agent (claude-opus-4-6 2026-06-12 14:00:05Z)**_
            
            <tool-use data-tool-type="write" data-tool-name="Write"><details>
            <summary>Tool use: **Write**</summary>
             `src/PAYMENT_RETRY.swift`
            </details></tool-use>
            
            Added a first cut of the retry logic.
            
            ---
            
            _**User (2026-06-12 14:10:00Z)**_
            
            no, that approach is wrong, revert it
            
            ---
            
            _**Agent (claude-opus-4-6 2026-06-12 14:10:05Z)**_
            
            <tool-use data-tool-type="shell" data-tool-name="Bash"><details>
            <summary>Tool use: **Bash**</summary>
            
            `git revert HEAD`
            
            ```text
            [main 1a2b3c4] Revert "Added a first cut of the retry logic."
            ```
            </details></tool-use>
            
            ---
            
            _**User (2026-06-12 14:12:00Z)**_
            
            perfect, reverted now
            
  • scripts
    • lib
      • db.mjs 3.8 KB · in bundle
      • discover.mjs 3.3 KB · in bundle
      • indexer.mjs 7.4 KB · in bundle
      • parse.mjs 10.4 KB · in bundle
      • patterns.mjs 14.4 KB · in bundle
      • threads.mjs 12.4 KB · in bundle
    • workthreads.mjs 3.3 KB · in bundle
  • tests
    • threads.test.mjs 8.4 KB · in bundle
  • install.sh 1.1 KB
    #!/usr/bin/env bash
    # Install the workthreads skill so it is available from any Claude Code session.
    #
    # Self-contained: bundles workthreads' own engine. No dependency on any other skill.
    # Re-run any time to update. Pass a target dir to override the default.
    set -euo pipefail
    
    HERE="$(cd "$(dirname "$0")" && pwd)"          # .../workthreads
    DEST="${1:-$HOME/.agents/skills/workthreads}"
    
    if [ ! -f "$HERE/scripts/workthreads.mjs" ]; then
      echo "error: engine not found at $HERE/scripts - run this from the workthreads/ directory of a clone." >&2
      exit 1
    fi
    
    mkdir -p "$DEST"
    rm -rf "$DEST/scripts"
    cp -R "$HERE/scripts" "$DEST/scripts"          # bundle the self-contained engine
    cp "$HERE/SKILL.md" "$DEST/SKILL.md"           # SKILL.md calls ${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs
    
    mkdir -p "$HOME/.claude/skills"
    ln -sfn "$DEST" "$HOME/.claude/skills/workthreads"
    
    echo "installed workthreads:"
    echo "  skill  -> $DEST"
    echo "  linked -> $HOME/.claude/skills/workthreads"
    echo "Open a new Claude Code session, then run /workthreads (skills load at session start)."
    
  • package.json 304 B
    {
      "name": "specstory-workthreads",
      "version": "1.0.0",
      "description": "A weekly work-thread rollup from SpecStory coding histories. Standalone skill.",
      "type": "module",
      "license": "Apache-2.0",
      "engines": { "node": ">=22.5" },
      "scripts": {
        "test": "node --test tests/*.test.mjs"
      }
    }
    
  • README.md 3.2 KB
    # Workthreads
    
    _A weekly work-thread rollup from your SpecStory coding histories._
    
    Workthreads reads the `.specstory/history` transcripts your coding agents already
    write and answers, at a glance: **what happened this week, what got finished, and
    what is still open and needs a next step.** It groups the window's sessions into
    **threads of work per project** and labels each one:
    
    - **new** - first activity within the last 7 days
    - **open** - unresolved, still active (the "open loops")
    - **closed** - latest outcome was success and it has gone quiet (flagged
      **reverted** when a beat ran a rollback command)
    
    A lead can use it for a weekly standup; an individual can use it to re-orient after
    time away ("what was I in the middle of?").
    
    ## How it clusters (deterministic, no LLM in the engine)
    
    The engine is robust against both failure modes of naive clustering:
    
    - **A session is one line of work** - a long multi-prompt session collapses into one
      thread, not one-thread-per-prompt.
    - **Cross-session merge needs >= 2 shared *rare* keys** (a distinct file or symbol;
      ubiquitous files like `package.json` and short abbreviations are ignored) - so a
      single shared utility file or a plain word never bridges unrelated work.
    - **Bounded threads** - a hard session cap stops a whole codebase from chaining into
      one mega-thread.
    
    Output is deterministic (stable sort, no wall-clock in the body), so two runs on the
    same corpus are byte-identical.
    
    ## Install
    
    From a clone of this repo:
    
    ```zsh
    cd workthreads
    ./install.sh
    ```
    
    That bundles the engine and the skill into `~/.agents/skills/workthreads` and
    symlinks it into `~/.claude/skills/workthreads`, so `/workthreads` is available from
    **any** Claude Code session in **any** project. It is self-contained - it does not
    read from any other skill's directory. Re-run `./install.sh` any time to update.
    
    Requirements: Node >= 22.5 (for `node:sqlite`), and the SpecStory CLI capturing
    histories into `.specstory/history/`.
    
    ## Use
    
    Start a new Claude Code session (skills load at session start), then:
    
    ```
    /workthreads
    ```
    
    or just ask in plain English: _"give me the weekly rollup"_, _"what's still open?"_,
    _"what did we finish this week?"_. With no arguments it asks three short questions -
    **Scope** (which repos), **Window** (how many days, default 7), **Goal** (full rollup
    / just open loops / recently closed / status) - then runs.
    
    The digest groups threads by project under **New / Open / Recently closed**, each
    with evidence refs (`path:line`), last-activity date, and a one-line rationale. It is
    also saved to a dated file (`.specstory/workthreads/<YYYY>-W<week>.md`) so rollups are
    durable and diffable week over week.
    
    Sample shape:
    
    ```
    workthreads digest - 31 thread(s) across 3 active project(s) (window: last 7 days)
    
    ## marketing
      New
        - run the first-cut skill on the maker video  [new]  · last 2026-06-19 · 1 session, 20 beats
      Open
        - resend contact-topic sync still failing  [open]  · last 2026-06-20 · 2 sessions, 7 beats
      Recently closed
        - extract survey emails for non-solo respondents  [closed]  · last 2026-06-18 · 1 session, 6 beats
    ```
    
    ## Develop
    
    The engine is plain Node (ESM, zero dependencies, `node:sqlite`). Run the tests:
    
    ```zsh
    cd workthreads
    npm test
    ```
    
    ## License
    
    Apache-2.0.
    
  • SKILL.md 4.9 KB
    ---
    name: workthreads
    description: SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still an open loop, and what was just started. Use when someone asks "what happened this week", "what is still open", "what did the team finish", "give me the weekly rollup", or wants a status report over a .specstory/history corpus.
    argument-hint: "Enter = guided setup · or plain English, e.g. 'last 7 days, just the open loops'"
    allowed-tools: Bash, Read, Write, AskUserQuestion
    license: Apache-2.0
    metadata:
      author: Greg Ceccarelli
      version: "1.0.0"
    ---
    
    # Workthreads
    
    A lead needs a weekly answer across the team's repos: what work happened this week, what got
    finished, and what is still open and needs a next step. **Workthreads** produces that **rollup**
    from SpecStory histories - the `.specstory/history` transcripts your coding agents already write.
    It reports **lines of work and their lifecycle** (new / open / recently closed).
    
    A deterministic engine (`scripts/workthreads.mjs threads`) does the retrieval, clustering, and
    classification; **you do the synthesis** - you turn its evidence into the lead's weekly report.
    Do not try to read raw transcripts yourself; they can be hundreds of thousands of lines. Run the
    engine and write the rollup from its output.
    
    This skill is **harness-portable** (agentskills.io format). Where it names a specific tool
    (e.g. `AskUserQuestion`), treat that as "use your harness's equivalent; fall back to plain chat."
    
    ## How the engine splits the work
    
    - The engine groups the window's beats **by project** and clusters them into **threads** (a line
      of work that can span several sessions). It assigns each thread one lifecycle **status** relative
      to today:
      - **new** - first activity within the last 7 days.
      - **open** - unresolved, still active (the open loops).
      - **closed** - latest outcome was success and the thread has gone quiet; flagged **reverted**
        when a beat ran a rollback command (`git revert` / `git reset --hard` / `git checkout -- ...`).
    - Output is deterministic (stable sort, no wall-clock timestamps in the body), so two runs on the
      same corpus are byte-identical.
    
    ## Default flow: the weekly rollup
    
    1. **Index the corpus** into workthreads' own DB. Point at the team's repos and build/update it:
       ```bash
       node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" index --projects <parent-of-repos> --db <db>
       # or a single tree:  --scan <root>     or a single history dir:  --dir <dir>
       ```
    
    2. **Run `threads` cross-project for the last 7 days** and capture the evidence:
       ```bash
       node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7            # human digest
       node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7 --json     # machine-readable
       ```
       The digest prints, per project, three sections in order - **New**, **Open**, **Recently
       closed** - each thread with its evidence refs (`path:line`), last-activity date, status, and a
       `reverted` marker. `--json` emits an array of threads (`project`, `status`, `reverted`, the files
       touched, last-activity date).
    
    3. **Write the rollup** from that evidence, in the lead's shape:
       - (a) a high-level result: session count and active projects in the window;
       - (b) per-project **highlights** of completed work (the `closed` threads);
       - (c) **open loops** - the `open` threads, unresolved or needing verification, with a suggested
         next step each;
       - (d) notable **rollbacks / abandoned efforts** (the `reverted` threads);
       - (e) cite evidence refs (`path:line`) so each claim is checkable.
       Add a caveat that **the week may still be in progress**, so `open` and `new` threads are
       snapshots, not final outcomes.
    
    4. **Save it to a dated file** so the rollup is durable and diffable week over week:
       ```
       .specstory/workthreads/<YYYY>-W<week>.md
       ```
       (ISO week number, e.g. `.specstory/workthreads/2026-W25.md`). Also offer `threads --out <file>`
       to drop the raw digest beside your written summary.
    
    ## Guided start
    
    If the user just invokes the skill with no specifics, ask three short questions (use
    `AskUserQuestion` or plain chat), then run the default flow with the answers:
    
    - **Scope** - which repos / parent directory holds the team's `.specstory/history` corpus?
    - **Window** - how many days back? (default **7** for the weekly rollup; `--days N` to widen.)
    - **Goal** - the whole **rollup**, just the **open loops**, just **recently closed**, or a quick
      **status** line? Tailor which sections you emphasize to the answer.
    
    ## Conventions
    
    Node ESM only, zero dependencies, Node >= 22.5. No em dashes anywhere (use " - "). The engine path
    never calls an LLM or the network; all judgment (the written narrative, suggested next steps,
    emphasis) is yours.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related