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
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>
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).
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.
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.
1---2name: workthreads3description: 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.4license: Apache-2.05---6
7# Workthreads
8
9A lead needs a weekly answer across the team's repos: what work happened this week, what got
10finished, and what is still open and needs a next step. **Workthreads** produces that **rollup**
11from SpecStory histories - the `.specstory/history` transcripts your coding agents already write.
12It reports **lines of work and their lifecycle** (new / open / recently closed).
13
14A deterministic engine (`scripts/workthreads.mjs threads`) does the retrieval, clustering, and
15classification; **you do the synthesis** - you turn its evidence into the lead's weekly report.
16Do not try to read raw transcripts yourself; they can be hundreds of thousands of lines. Run the
17engine and write the rollup from its output.
18
19This skill is **harness-portable** (agentskills.io format). Where it names a specific tool
20(e.g. `AskUserQuestion`), treat that as "use your harness's equivalent; fall back to plain chat."
21
22## How the engine splits the work
23
24- The engine groups the window's beats **by project** and clusters them into **threads** (a line
25 of work that can span several sessions). It assigns each thread one lifecycle **status** relative
26 to today:
27 - **new** - first activity within the last 7 days.
28 - **open** - unresolved, still active (the open loops).
29 - **closed** - latest outcome was success and the thread has gone quiet; flagged **reverted**
30 when a beat ran a rollback command (`git revert` / `git reset --hard` / `git checkout -- ...`).
31- Output is deterministic (stable sort, no wall-clock timestamps in the body), so two runs on the
32 same corpus are byte-identical.
33
34## Default flow: the weekly rollup
35
361. **Index the corpus** into workthreads' own DB. Point at the team's repos and build/update it:
37 ```bash
38 node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" index --projects <parent-of-repos> --db <db>
39 # or a single tree: --scan <root> or a single history dir: --dir <dir>
40 ```
41
422. **Run `threads` cross-project for the last 7 days** and capture the evidence:
43 ```bash
44 node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7 # human digest
45 node "${CLAUDE_SKILL_DIR}/scripts/workthreads.mjs" threads --db <db> --days 7 --json # machine-readable
46 ```
47 The digest prints, per project, three sections in order - **New**, **Open**, **Recently
48 closed** - each thread with its evidence refs (`path:line`), last-activity date, status, and a
49 `reverted` marker. `--json` emits an array of threads (`project`, `status`, `reverted`, the files
50 touched, last-activity date).
51
523. **Write the rollup** from that evidence, in the lead's shape:
53 - (a) a high-level result: session count and active projects in the window;
54 - (b) per-project **highlights** of completed work (the `closed` threads);
55 - (c) **open loops** - the `open` threads, unresolved or needing verification, with a suggested
56 next step each;
57 - (d) notable **rollbacks / abandoned efforts** (the `reverted` threads);
58 - (e) cite evidence refs (`path:line`) so each claim is checkable.
59 Add a caveat that **the week may still be in progress**, so `open` and `new` threads are
60 snapshots, not final outcomes.
61
624. **Save it to a dated file** so the rollup is durable and diffable week over week:
63 ```
64 .specstory/workthreads/<YYYY>-W<week>.md
65 ```
66 (ISO week number, e.g. `.specstory/workthreads/2026-W25.md`). Also offer `threads --out <file>`
67 to drop the raw digest beside your written summary.
68
69## Guided start
70
71If the user just invokes the skill with no specifics, ask three short questions (use
72`AskUserQuestion` or plain chat), then run the default flow with the answers:
73
74- **Scope** - which repos / parent directory holds the team's `.specstory/history` corpus?
75- **Window** - how many days back? (default **7** for the weekly rollup; `--days N` to widen.)
76- **Goal** - the whole **rollup**, just the **open loops**, just **recently closed**, or a quick
77 **status** line? Tailor which sections you emphasize to the answer.
78
79## Conventions
80
81Node ESM only, zero dependencies, Node >= 22.5. No em dashes anywhere (use " - "). The engine path
82never calls an LLM or the network; all judgment (the written narrative, suggested next steps,
83emphasis) is yours.