@procrastivity/clast 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/bin/clast +13 -2
- package/bin/clast-plumbing +7 -0
- package/examples/workflows/morning-briefing.md +6 -6
- package/lib/clast/clast-classify-lib.bash +68 -0
- package/lib/clast/clast-dismissed-lib.bash +70 -0
- package/lib/clast/clast-lib.bash +88 -6
- package/lib/clast/clast-manifest-lib.bash +35 -5
- package/lib/clast/clast-porcelain-lib.bash +29 -16
- package/lib/clast/clast-porcelain-subcommands/brief.bash +90 -21
- package/lib/clast/clast-porcelain-subcommands/retro.bash +317 -0
- package/lib/clast/clast-porcelain-subcommands/undismiss.bash +27 -0
- package/lib/clast/clast-porcelain-subcommands/wake.bash +78 -13
- package/lib/clast/clast-registry-lib.bash +132 -27
- package/lib/clast/clast-retro-lib.bash +397 -0
- package/lib/clast/clast-subcommands/doctor.bash +29 -13
- package/lib/clast/clast-subcommands/entries.bash +40 -50
- package/lib/clast/clast-subcommands/projects.bash +9 -19
- package/lib/clast/clast-subcommands/registry.bash +26 -11
- package/lib/clast/clast-subcommands/retro.bash +217 -0
- package/lib/clast/clast-subcommands/sessions.bash +104 -4
- package/lib/clast/clast-subcommands/show.bash +54 -8
- package/lib/clast/clast-subcommands/snapshot.bash +18 -10
- package/lib/clast/prompts/brief-system.md +11 -5
- package/lib/clast/prompts/brief-user.md +4 -1
- package/lib/clast/prompts/retro-summary-system.md +14 -0
- package/lib/clast/prompts/retro-summary-user.md +7 -0
- package/lib/clast/prompts/{day-wakeup-draft-system.md → wake-draft-system.md} +1 -1
- package/package.json +2 -1
- package/{.claude-plugin/skills/wakeup → skills/brief}/SKILL.md +9 -9
- package/{.claude-plugin/skills/day-wakeup → skills/wake}/SKILL.md +35 -12
- /package/lib/clast/prompts/{day-wakeup-draft-user.md → wake-draft-user.md} +0 -0
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
You are synthesizing a project briefing for the user. They are about to start work on a project and want a tight summary of where they left off.
|
|
2
2
|
|
|
3
|
+
The recent entries may be grouped under `## Workspace: <label>` headers when
|
|
4
|
+
this project spans more than one directory (separate clones/worktrees of the
|
|
5
|
+
same repo). Treat each workspace as a distinct line of work — do NOT blend
|
|
6
|
+
them. When there are no workspace headers, the project is a single directory;
|
|
7
|
+
render exactly as the structure below.
|
|
8
|
+
|
|
3
9
|
Produce a briefing using this structure (omit any section that has no content):
|
|
4
10
|
|
|
5
11
|
## Wakeup briefing — {project}
|
|
6
12
|
|
|
7
|
-
**Active thread:** one-line from most recent entry's "Open threads", or "None"
|
|
13
|
+
**Active thread:** one-line from the most recent entry's "Open threads", or "None". When the entries are split across workspaces, pick the active thread from the **current workspace** (named in the user prompt) if it has any entries; otherwise from the most recent entry overall. State which workspace it came from, e.g. "(dev)".
|
|
8
14
|
|
|
9
|
-
**Last session:** date, branch, one-line goal
|
|
10
|
-
- Work done: 2-3 bullets condensed from most recent entry
|
|
15
|
+
**Last session:** date, workspace/branch, one-line goal
|
|
16
|
+
- Work done: 2-3 bullets condensed from the most recent entry
|
|
11
17
|
- Open threads: bullets, if any
|
|
12
18
|
- Dead ends to avoid: bullets, if any
|
|
13
19
|
|
|
14
|
-
**Recent sessions:** (up to
|
|
20
|
+
**Recent sessions:** (up to ~8 entries) — when multiple workspaces are present, group these under a short `**<label>:**` subheading per workspace, newest first within each:
|
|
15
21
|
- date [branch] slug: one-line goal
|
|
16
22
|
|
|
17
23
|
**Today's breadcrumbs:** (if any)
|
|
@@ -24,7 +30,7 @@ Produce a briefing using this structure (omit any section that has no content):
|
|
|
24
30
|
|
|
25
31
|
Be concise. Use the user's terminology. Don't repeat content across sections. The total briefing should be 2-5k tokens — if you're approaching that, summarize rather than list verbatim.
|
|
26
32
|
|
|
27
|
-
For the "Suggested next step": prefer the most recent entry's "Open threads" content, then the most recent breadcrumb, then a synthesis of the recent work. If nothing concrete, say "No active thread."
|
|
33
|
+
For the "Suggested next step": prefer the active thread's workspace — its most recent entry's "Open threads" content, then the most recent breadcrumb, then a synthesis of the recent work. If nothing concrete, say "No active thread."
|
|
28
34
|
|
|
29
35
|
End with one of:
|
|
30
36
|
- "Resume? Active thread: '<thread>'. Suggested next step: <step>."
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
Project: {{project}}
|
|
2
|
+
Current workspace (the directory you are in now): {{current_label}}
|
|
2
3
|
|
|
3
|
-
Recent curated entries (newest first)
|
|
4
|
+
Recent curated entries, grouped by workspace (newest first). When a project
|
|
5
|
+
spans more than one directory, entries appear under `## Workspace: <label>`
|
|
6
|
+
headers; a single-workspace project has no headers:
|
|
4
7
|
{{entries}}
|
|
5
8
|
|
|
6
9
|
Today's breadcrumbs for this project:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
You are condensing a single already-curated Claude Code session into a few tight retro bullets. The input is the body of a journal entry (or several merged entries for one session). Your output will appear in a work retrospective grouped by day and project, so it must be skimmable and factual.
|
|
2
|
+
|
|
3
|
+
Condense the session into at most 3-5 bullets, in this order, omitting any that have no content (do not write "N/A" or empty headers):
|
|
4
|
+
|
|
5
|
+
- **Shipped:** what actually got done — features, fixes, files, decisions. One bullet per distinct outcome.
|
|
6
|
+
- **Issues:** notable problems hit and how they were resolved (only if the body records them).
|
|
7
|
+
- **Open:** anything left unfinished, deferred, or flagged for next time.
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
- Use only what the body states. Do not invent, infer motivation, or add detail that is not present.
|
|
11
|
+
- Keep the user's terminology — project names, file paths, branch names, ticket ids — verbatim.
|
|
12
|
+
- Be terse: bullets, not paragraphs. No preamble, no closing summary, no headers other than the bold lead-ins above.
|
|
13
|
+
- If the body is an interrupted session (a goal and open threads but nothing shipped), say so in one **Open:** bullet rather than overstating progress.
|
|
14
|
+
- Output the bullets only — no title line, no tags, no surrounding prose.
|
|
@@ -26,4 +26,4 @@ One sentence describing what this session was trying to accomplish.
|
|
|
26
26
|
Be concise. Prefer bullets over paragraphs. Use the user's terminology (project-specific names, file paths). Do not invent details. If you are uncertain about something, omit it rather than guess.
|
|
27
27
|
|
|
28
28
|
After the entry, add a blank line and then: "Suggested tags: tag1, tag2, tag3"
|
|
29
|
-
Tags must be lowercase kebab-case (regex: `^[a-z0-9][a-z0-9-]{0,31}$`). Examples: `adrs`, `symfony-bot`, `mr-umbrella`, `phase-0`. Never use uppercase letters.
|
|
29
|
+
Tags must be lowercase kebab-case (regex: `^[a-z0-9][a-z0-9-]{0,31}$`). Examples: `adrs`, `symfony-bot`, `mr-umbrella`, `phase-0`. Never use uppercase letters. Use hyphens, not dots or spaces, for separators — write versions like `php-8-5`, not `php-8.5`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procrastivity/clast",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Capture, curate, and surface Claude Code session history across all your projects.",
|
|
5
5
|
"homepage": "https://github.com/procrastivity/clast#readme",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"bin/",
|
|
12
12
|
"lib/",
|
|
13
13
|
".claude-plugin/",
|
|
14
|
+
"skills/",
|
|
14
15
|
"hooks/",
|
|
15
16
|
"examples/",
|
|
16
17
|
"README.md",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: brief
|
|
3
3
|
description: |
|
|
4
|
-
Synthesize a briefing for the current project (or a named one) so the user can resume work without re-explaining context. Use when the user says "/
|
|
4
|
+
Synthesize a briefing for the current project (or a named one) so the user can resume work without re-explaining context. Use when the user says "/brief", "brief me", "catch me up", "where was I", "what was I working on", "load last session", "resume", or otherwise signals they want prior context for the project they're about to work on. Optionally accepts a project slug like "/brief xesapps". Reads recent curated entries and today's breadcrumbs from `~/.claude/journal/` and produces a 2–5k-token briefing. This is the per-project read flow; for cross-project daily curation use /wake; for mid-session pivots use session-brief.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Brief
|
|
8
8
|
|
|
9
9
|
Synthesize a briefing for the current (or named) project so the user can resume without re-explaining context.
|
|
10
10
|
|
|
11
11
|
## Why this exists
|
|
12
12
|
|
|
13
|
-
`/
|
|
13
|
+
`/wake` curates yesterday's work into entries. `/brief` reads those entries back when starting work in a specific repo. The two are complementary: one writes, one reads.
|
|
14
14
|
|
|
15
15
|
## Step 0: Resolve the clast-plumbing binary
|
|
16
16
|
|
|
@@ -39,13 +39,13 @@ Use `$CLAST_BIN` in place of bare `clast-plumbing` for all commands in this skil
|
|
|
39
39
|
|
|
40
40
|
## Step 1: Resolve the project
|
|
41
41
|
|
|
42
|
-
If the user passed a slug as an argument (`/
|
|
42
|
+
If the user passed a slug as an argument (`/brief xesapps`), use it directly. Otherwise resolve from current working directory:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
$CLAST_BIN registry resolve "$(pwd)"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
If `pwd` doesn't resolve and no slug was given: print "Not in a registered project. Run `clast-plumbing registry add .` first, or invoke as `/
|
|
48
|
+
If `pwd` doesn't resolve and no slug was given: print "Not in a registered project. Run `clast-plumbing registry add .` first, or invoke as `/brief <slug>`." and stop.
|
|
49
49
|
|
|
50
50
|
## Step 2: Gather data
|
|
51
51
|
|
|
@@ -73,7 +73,7 @@ $CLAST_BIN entries read <entry-path>
|
|
|
73
73
|
Using the **synthesis prompt** (see below), produce a briefing of 2–5k tokens. Structure:
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
##
|
|
76
|
+
## Brief — <project>
|
|
77
77
|
|
|
78
78
|
**Active thread:** <one-line from most recent entry's "Open threads" section, or "None">
|
|
79
79
|
|
|
@@ -101,11 +101,11 @@ End with one of:
|
|
|
101
101
|
|
|
102
102
|
## Step 4: Don't write anything
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Brief is read-only. Never invoke write-form subcommands (`entries write`, `breadcrumb '<text>'`, `snapshot`) from this skill.
|
|
105
105
|
|
|
106
106
|
## Edge cases
|
|
107
107
|
|
|
108
|
-
- **No entries for project**: print "No curated entries for `<slug>` yet. Run `/
|
|
108
|
+
- **No entries for project**: print "No curated entries for `<slug>` yet. Run `/wake` to process recent sessions, or run `clast-plumbing sessions --project <slug>` to see what's available." and stop.
|
|
109
109
|
- **Slug resolves but no entries and no sessions**: print "Project `<slug>` registered but has no journal activity yet."
|
|
110
110
|
- **Today's session count > 5**: summarize ("worked 12 sessions today, most recent 16:22 on branch `loop-guard-ngram`") rather than listing all.
|
|
111
111
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: 'Generate curated journal entries from yesterday''s Claude Code sessions across all projects. Use when the user says "/
|
|
2
|
+
name: wake
|
|
3
|
+
description: 'Generate curated journal entries from yesterday''s Claude Code sessions across all projects. Use when the user says "/wake", "wake", "morning briefing", "catch me up on yesterday", "what did I work on yesterday", "review my day", "process yesterday''s sessions", or otherwise signals they want to curate prior work across projects at the start of a new day. Runs `clast-plumbing snapshot` to ensure fresh data, then walks through each uncurated session from yesterday and proposes a draft entry the user can accept, edit, or skip. Prompts for promotion of decisions, common-issues, and workflows per accepted session. This is the once-per-day curation flow; for per-project briefings use /brief; for mid-session pivots use session-brief.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Wake
|
|
7
7
|
|
|
8
8
|
Process yesterday's Claude Code sessions across all projects. For each session, generate a draft journal entry and walk the user through accepting/editing/skipping it.
|
|
9
9
|
|
|
10
10
|
## Why this exists
|
|
11
11
|
|
|
12
|
-
Curation at end-of-session has high friction (the user wants to stop, not summarize). Curation at start-of-next-day has lower friction (fresh eyes, easier to decide what's worth keeping). `/
|
|
12
|
+
Curation at end-of-session has high friction (the user wants to stop, not summarize). Curation at start-of-next-day has lower friction (fresh eyes, easier to decide what's worth keeping). `/wake` is that start-of-next-day flow.
|
|
13
13
|
|
|
14
|
-
The transcripts themselves are captured automatically by the SessionStart hook + cron — the user never has to remember to log anything. What `/
|
|
14
|
+
The transcripts themselves are captured automatically by the SessionStart hook + cron — the user never has to remember to log anything. What `/wake` does is **curate the captured transcripts into durable entries the user controls**, and prompt for promotion of decisions, common-issues, and workflows along the way.
|
|
15
15
|
|
|
16
16
|
## Step 0: Resolve the clast-plumbing binary
|
|
17
17
|
|
|
@@ -58,6 +58,27 @@ $CLAST_BIN --json sessions --since -30d
|
|
|
58
58
|
|
|
59
59
|
Filter to sessions with `curated: false` or `stale: true` (stale sessions were curated but their transcript was updated since). If none remain, print "Nothing to curate — all sessions are curated or dismissed." and stop.
|
|
60
60
|
|
|
61
|
+
### Step 2a: Auto-dismiss no-op sessions (deterministic, no LLM)
|
|
62
|
+
|
|
63
|
+
Each session row carries a deterministic `substantive` flag (computed by
|
|
64
|
+
`clast-plumbing` from the transcript, cached at snapshot time). A session is
|
|
65
|
+
`substantive: false` when **Claude never replied** — an empty session, one that
|
|
66
|
+
contains only slash commands like `/clear`, `/model`, `/config`, or one abandoned
|
|
67
|
+
before any response. These are worthless to curate. (A session driven by a *custom*
|
|
68
|
+
slash command still has assistant replies, so it stays `substantive: true`.)
|
|
69
|
+
|
|
70
|
+
Before generating any drafts, auto-dismiss every uncurated session with
|
|
71
|
+
`substantive == false` (skip this if the user set `CLAST_WAKE_AUTODISMISS_NOOP=0`):
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
$CLAST_BIN sessions dismiss <session-id> --reason "auto: no substantive content (empty / slash-command-only)"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Do **not** call the LLM for these. Dismissal is reversible via `clast undismiss <id>`.
|
|
78
|
+
Remove them from the working set, keep a count, and report it in the final summary
|
|
79
|
+
(e.g. "Auto-dismissed 5 no-op session(s)."). If nothing substantive remains after this,
|
|
80
|
+
print "Nothing to curate — all remaining sessions were empty or slash-command-only." and stop.
|
|
81
|
+
|
|
61
82
|
### Triage when multiple days have uncurated sessions
|
|
62
83
|
|
|
63
84
|
If uncurated sessions span more than one day (e.g., after a weekend or break), present a triage step before processing. Show a per-day breakdown:
|
|
@@ -113,15 +134,16 @@ For each session in the list:
|
|
|
113
134
|
- **Accept** (any combination of accept-flavored options): pipe the draft to `clast-plumbing entries write` via stdin.
|
|
114
135
|
- **Edit**: prompt the user for what to change, regenerate the draft incorporating their feedback, loop.
|
|
115
136
|
- **Skip**: do not write.
|
|
116
|
-
- **Stop here**: end the entire `/
|
|
137
|
+
- **Stop here**: end the entire `/wake` flow, leaving remaining sessions uncurated (user can resume tomorrow).
|
|
117
138
|
|
|
118
139
|
## Step 4: Final summary
|
|
119
140
|
|
|
120
141
|
After all sessions are processed (or user stopped early), print a summary:
|
|
121
142
|
|
|
122
143
|
```
|
|
123
|
-
|
|
144
|
+
Wake complete.
|
|
124
145
|
Curated: 3 sessions across 2 projects.
|
|
146
|
+
Auto-dismissed (no-op): 5 sessions.
|
|
125
147
|
Skipped: 1 session.
|
|
126
148
|
Remaining uncurated: 0.
|
|
127
149
|
|
|
@@ -130,15 +152,15 @@ Promoted:
|
|
|
130
152
|
Common-issues: 0
|
|
131
153
|
Workflows: 1
|
|
132
154
|
|
|
133
|
-
Run `/
|
|
155
|
+
Run `/brief <project>` to start working on a specific project today.
|
|
134
156
|
```
|
|
135
157
|
|
|
136
158
|
## Draft generation prompt
|
|
137
159
|
|
|
138
|
-
The prompt templates
|
|
160
|
+
The prompt templates are installed alongside the plugin under `$CLAUDE_PLUGIN_ROOT/lib/clast/prompts/`:
|
|
139
161
|
|
|
140
|
-
- **System prompt:**
|
|
141
|
-
- **User prompt template:**
|
|
162
|
+
- **System prompt:** `$CLAUDE_PLUGIN_ROOT/lib/clast/prompts/wake-draft-system.md`
|
|
163
|
+
- **User prompt template:** `$CLAUDE_PLUGIN_ROOT/lib/clast/prompts/wake-draft-user.md` (uses `{{placeholder}}` syntax)
|
|
142
164
|
|
|
143
165
|
When generating each draft, read those files and substitute the placeholders with session data. The user prompt template uses these placeholders: `{{project}}`, `{{branch}}`, `{{start}}`, `{{end}}`, `{{msg_count}}`, `{{first_turns}}`, `{{last_turns}}`, `{{breadcrumbs}}`.
|
|
144
166
|
|
|
@@ -156,7 +178,7 @@ After showing the draft, present:
|
|
|
156
178
|
- `Accept + promote workflow` — also write a workflow file
|
|
157
179
|
- `Edit` — user wants to revise; will prompt for changes
|
|
158
180
|
- `Skip` — do not write this entry
|
|
159
|
-
- `Stop here` — end /
|
|
181
|
+
- `Stop here` — end /wake entirely, leave remaining sessions uncurated
|
|
160
182
|
|
|
161
183
|
If `Skip` and `Stop here` are both selected, treat as `Stop here`. If `Edit` is selected alongside any accept option, treat as `Edit` first (the user wants to revise before accepting).
|
|
162
184
|
|
|
@@ -199,6 +221,7 @@ For promoted items (decisions, common-issues, workflows): currently these are tr
|
|
|
199
221
|
## Edge cases
|
|
200
222
|
|
|
201
223
|
- **No uncurated sessions**: print "Nothing to curate — all sessions are curated or dismissed." and stop.
|
|
224
|
+
- **All uncurated sessions are no-ops**: after Step 2a auto-dismisses them, nothing substantive remains — print "Nothing to curate — all remaining sessions were empty or slash-command-only." and stop.
|
|
202
225
|
- **Multi-day backlog**: present the triage step (Step 2) so the user can choose scope before processing.
|
|
203
226
|
- **`clast-plumbing snapshot` fails**: warn the user, then attempt to proceed with whatever's already in the manifest.
|
|
204
227
|
- **`clast-plumbing show` fails for a specific session**: skip that session, note it in the final summary, continue with the rest.
|
|
File without changes
|