@procrastivity/clast 0.0.1
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/.claude-plugin/plugin.json +11 -0
- package/.claude-plugin/skills/day-wakeup/SKILL.md +194 -0
- package/.claude-plugin/skills/wakeup/SKILL.md +115 -0
- package/LICENSE +21 -0
- package/README.md +182 -0
- package/bin/.gitkeep +0 -0
- package/bin/clast +172 -0
- package/examples/config/config.toml.sample +32 -0
- package/examples/cron/clast-snapshot.service +10 -0
- package/examples/cron/clast-snapshot.timer +15 -0
- package/examples/cron/crontab.sample +16 -0
- package/examples/workflows/morning-briefing.md +137 -0
- package/hooks/hooks.json +8 -0
- package/hooks/snapshot.sh +15 -0
- package/lib/clast/.gitkeep +0 -0
- package/lib/clast/clast-decode-lib.bash +184 -0
- package/lib/clast/clast-lib.bash +233 -0
- package/lib/clast/clast-manifest-lib.bash +232 -0
- package/lib/clast/clast-registry-lib.bash +252 -0
- package/lib/clast/clast-subcommands/.gitkeep +0 -0
- package/lib/clast/clast-subcommands/breadcrumb.bash +454 -0
- package/lib/clast/clast-subcommands/doctor.bash +607 -0
- package/lib/clast/clast-subcommands/entries.bash +697 -0
- package/lib/clast/clast-subcommands/projects.bash +309 -0
- package/lib/clast/clast-subcommands/registry.bash +207 -0
- package/lib/clast/clast-subcommands/sessions.bash +275 -0
- package/lib/clast/clast-subcommands/show.bash +283 -0
- package/lib/clast/clast-subcommands/snapshot.bash +294 -0
- package/lib/clast/clast-subcommands/stats.bash +354 -0
- package/lib/clast/clast-subcommands/whereami.bash +108 -0
- package/package.json +39 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "clast",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Capture, curate, and surface Claude Code session history across all your projects.",
|
|
5
|
+
"homepage": "https://github.com/procrastivity/clast",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Beau",
|
|
8
|
+
"url": "https://github.com/procrastivity"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: day-wakeup
|
|
3
|
+
description: 'Generate curated journal entries from yesterday''s Claude Code sessions across all projects. Use when the user says "/day-wakeup", "day wakeup", "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 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 /wakeup; for mid-session pivots use session-brief.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Day Wakeup
|
|
7
|
+
|
|
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
|
+
|
|
10
|
+
## Why this exists
|
|
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). `/day-wakeup` is that start-of-next-day flow.
|
|
13
|
+
|
|
14
|
+
The transcripts themselves are captured automatically by the SessionStart hook + cron — the user never has to remember to log anything. What `/day-wakeup` 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
|
+
|
|
16
|
+
## Step 1: Ensure fresh data
|
|
17
|
+
|
|
18
|
+
Run `clast snapshot` (idempotent; silent on no-op). This guarantees we're not missing anything that ran since the last hook fire.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
clast snapshot
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Errors here are non-fatal — proceed even if it fails, just warn the user.
|
|
25
|
+
|
|
26
|
+
## Step 2: Enumerate uncurated sessions from yesterday
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
clast --json sessions --day yesterday
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Filter to sessions with `curated: false`. If everything from yesterday is already curated, print "Nothing to curate from yesterday — already done." and stop.
|
|
33
|
+
|
|
34
|
+
Group sessions by project for presentation. Order: most recent project first, sessions chronological within each project.
|
|
35
|
+
|
|
36
|
+
## Step 3: For each session, generate a draft
|
|
37
|
+
|
|
38
|
+
For each session in the list:
|
|
39
|
+
|
|
40
|
+
1. Read session details:
|
|
41
|
+
```bash
|
|
42
|
+
clast --json show <session-id> --full --turns 8
|
|
43
|
+
```
|
|
44
|
+
This returns metadata + first 8 and last 8 turns of the transcript (text only, no tool calls — kept compact).
|
|
45
|
+
|
|
46
|
+
2. Read breadcrumbs for this project from yesterday:
|
|
47
|
+
```bash
|
|
48
|
+
clast breadcrumb --read --project <slug> --day yesterday
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
3. Generate a draft entry using the **draft generation prompt** (see below).
|
|
52
|
+
|
|
53
|
+
4. Display the draft to the user inside a fenced markdown code block, with a brief preamble: "Here's a draft for the X session in <project> at HH:MM:".
|
|
54
|
+
|
|
55
|
+
5. Present the **promotion question** (see below) via AskUserQuestion.
|
|
56
|
+
|
|
57
|
+
6. Handle the response:
|
|
58
|
+
- **Accept** (any combination of accept-flavored options): pipe the draft to `clast entries write` via stdin.
|
|
59
|
+
- **Edit**: prompt the user for what to change, regenerate the draft incorporating their feedback, loop.
|
|
60
|
+
- **Skip**: do not write.
|
|
61
|
+
- **Stop here**: end the entire `/day-wakeup` flow, leaving remaining sessions uncurated (user can resume tomorrow).
|
|
62
|
+
|
|
63
|
+
## Step 4: Final summary
|
|
64
|
+
|
|
65
|
+
After all sessions are processed (or user stopped early), print a summary:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Day wakeup complete.
|
|
69
|
+
Curated: 3 sessions across 2 projects.
|
|
70
|
+
Skipped: 1 session.
|
|
71
|
+
Remaining uncurated: 0.
|
|
72
|
+
|
|
73
|
+
Promoted:
|
|
74
|
+
Decisions: 1
|
|
75
|
+
Common-issues: 0
|
|
76
|
+
Workflows: 1
|
|
77
|
+
|
|
78
|
+
Run `/wakeup <project>` to start working on a specific project today.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Draft generation prompt
|
|
82
|
+
|
|
83
|
+
When generating each draft, use this prompt internally (with the placeholders filled in):
|
|
84
|
+
|
|
85
|
+
````markdown
|
|
86
|
+
You are drafting a journal entry for a Claude Code session that the user just reviewed. The entry will be written to the user's journal and may be read days or weeks later to refresh context on what was happening.
|
|
87
|
+
|
|
88
|
+
Session metadata:
|
|
89
|
+
- Project: {project}
|
|
90
|
+
- Branch: {branch}
|
|
91
|
+
- Start: {start}
|
|
92
|
+
- End: {end}
|
|
93
|
+
- Approximate messages: {msg_count}
|
|
94
|
+
|
|
95
|
+
First 8 turns of the session:
|
|
96
|
+
{first_turns}
|
|
97
|
+
|
|
98
|
+
Last 8 turns of the session:
|
|
99
|
+
{last_turns}
|
|
100
|
+
|
|
101
|
+
Breadcrumbs the user left during this session's day:
|
|
102
|
+
{breadcrumbs}
|
|
103
|
+
|
|
104
|
+
Draft a journal entry in this exact markdown structure. Omit any section that has no content (don't write "N/A"):
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
# Session: <short human-readable title>
|
|
108
|
+
|
|
109
|
+
## Goal
|
|
110
|
+
One sentence describing what this session was trying to accomplish.
|
|
111
|
+
|
|
112
|
+
## What shipped
|
|
113
|
+
- Bullet list of what actually got done (files written, features built, fixes landed). Extract from the transcript.
|
|
114
|
+
|
|
115
|
+
## Issues + fixes
|
|
116
|
+
- **Issue:** what broke. **Fix:** what resolved it.
|
|
117
|
+
|
|
118
|
+
## Dead ends touched
|
|
119
|
+
- **Tried:** approach. (You can usually see this in the transcript as "tried X then switched to Y".)
|
|
120
|
+
- Note: if you can't tell *why* an approach was abandoned from the transcript, leave that for the user to fill in. Don't speculate.
|
|
121
|
+
|
|
122
|
+
## Open threads
|
|
123
|
+
- Anything still unfinished or deferred. Use the breadcrumbs and the last turns of the session as signal.
|
|
124
|
+
|
|
125
|
+
## Notes
|
|
126
|
+
- Anything else useful for the next session in this project.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Be concise. Prefer bullets over paragraphs. Use the user's terminology (project-specific names, file paths). Don't invent details. If you're uncertain about something, omit it rather than guess.
|
|
130
|
+
|
|
131
|
+
Suggest tags after the entry, separated by a blank line, prefixed with "Suggested tags:". The user will confirm.
|
|
132
|
+
````
|
|
133
|
+
|
|
134
|
+
## AskUserQuestion: promotion options per session
|
|
135
|
+
|
|
136
|
+
After showing the draft, present:
|
|
137
|
+
|
|
138
|
+
- **question**: "What would you like to do with this draft?"
|
|
139
|
+
- **header**: "Session draft"
|
|
140
|
+
- **multiSelect**: true
|
|
141
|
+
- **options**:
|
|
142
|
+
- `Accept`
|
|
143
|
+
- `Accept + promote decision` — also write a decision file
|
|
144
|
+
- `Accept + promote common-issue` — also write a common-issue file
|
|
145
|
+
- `Accept + promote workflow` — also write a workflow file
|
|
146
|
+
- `Edit` — user wants to revise; will prompt for changes
|
|
147
|
+
- `Skip` — do not write this entry
|
|
148
|
+
- `Stop here` — end /day-wakeup entirely, leave remaining sessions uncurated
|
|
149
|
+
|
|
150
|
+
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).
|
|
151
|
+
|
|
152
|
+
When a promote option is selected, prompt the user for the title and content of that promoted item before writing.
|
|
153
|
+
|
|
154
|
+
## Editing handler
|
|
155
|
+
|
|
156
|
+
If the user selects `Edit`:
|
|
157
|
+
|
|
158
|
+
1. Ask "What should change?"
|
|
159
|
+
2. Take their answer as a feedback note.
|
|
160
|
+
3. Regenerate the draft, including their feedback in the prompt as "Revisions requested by user: <feedback>".
|
|
161
|
+
4. Show the new draft.
|
|
162
|
+
5. Present the same promotion options again. Loop until the user stops editing.
|
|
163
|
+
|
|
164
|
+
## Writing the entry
|
|
165
|
+
|
|
166
|
+
When the user accepts:
|
|
167
|
+
|
|
168
|
+
1. Extract the suggested tags from the draft (the user may have edited them).
|
|
169
|
+
2. Pipe the entry body (without the suggested-tags trailer) to `clast entries write`:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
clast entries write \
|
|
173
|
+
--session <session-id> \
|
|
174
|
+
--slug <session-slug> \
|
|
175
|
+
--tags <tag1>,<tag2>,<tag3> \
|
|
176
|
+
--title "<title>" \
|
|
177
|
+
--body-stdin
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
(Sending the markdown body via stdin, ending with EOF.)
|
|
181
|
+
|
|
182
|
+
3. If the write succeeds, append a one-line confirmation to the running summary.
|
|
183
|
+
|
|
184
|
+
For promoted items (decisions, common-issues, workflows): currently these are tracked inside the entry's body for v1. **TODO for v1.1: separate `clast decisions write` / `clast common-issues write` / `clast workflows write` subcommands and a directory structure to match.** Note this in the user-facing summary so the user knows they're folded into the entry for now.
|
|
185
|
+
|
|
186
|
+
<!-- step-12 addition: v1 promotion section convention --> When folding promoted items into the accepted entry body, append `## Decision`, `## Common issue`, or `## Workflow` (h2, singular, capitalized), each followed by the prompted-for title (h3) and body before invoking `clast entries write`.
|
|
187
|
+
|
|
188
|
+
## Edge cases
|
|
189
|
+
|
|
190
|
+
- **No sessions from yesterday**: print "No sessions from yesterday." and stop.
|
|
191
|
+
- **All sessions already curated**: print "All sessions from yesterday already curated." and stop.
|
|
192
|
+
- **`clast snapshot` fails**: warn the user, then attempt to proceed with whatever's already in the manifest.
|
|
193
|
+
- **`clast show` fails for a specific session**: skip that session, note it in the final summary, continue with the rest.
|
|
194
|
+
- **User says "do them all without prompting"**: not a v1 feature. Each session gets its own AskUserQuestion. The friction is intentional — it's where curation happens.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wakeup
|
|
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 "/wakeup", "wakeup", "wake up", "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 "/wakeup 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 /day-wakeup; for mid-session pivots use session-brief.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Wakeup
|
|
8
|
+
|
|
9
|
+
Synthesize a briefing for the current (or named) project so the user can resume without re-explaining context.
|
|
10
|
+
|
|
11
|
+
## Why this exists
|
|
12
|
+
|
|
13
|
+
`/day-wakeup` curates yesterday's work into entries. `/wakeup` reads those entries back when starting work in a specific repo. The two are complementary: one writes, one reads.
|
|
14
|
+
|
|
15
|
+
## Step 1: Resolve the project
|
|
16
|
+
|
|
17
|
+
If the user passed a slug as an argument (`/wakeup xesapps`), use it directly. Otherwise resolve from current working directory:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
clast registry resolve "$(pwd)"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If `pwd` doesn't resolve and no slug was given: print "Not in a registered project. Run `clast registry add .` first, or invoke as `/wakeup <slug>`." and stop.
|
|
24
|
+
|
|
25
|
+
## Step 2: Gather data
|
|
26
|
+
|
|
27
|
+
In parallel:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Recent curated entries for this project (newest first)
|
|
31
|
+
clast --json entries --project <slug> --limit 5
|
|
32
|
+
|
|
33
|
+
# Today's breadcrumbs for this project
|
|
34
|
+
clast breadcrumb --read --project <slug> --day today
|
|
35
|
+
|
|
36
|
+
# Today's session activity (if any — user might have started already)
|
|
37
|
+
clast --json sessions --day today --project <slug>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For each entry returned, also read the body if it'll fit (file sizes are typically 1–5KB each):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
clast entries read <entry-path>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step 3: Synthesize the briefing
|
|
47
|
+
|
|
48
|
+
Using the **synthesis prompt** (see below), produce a briefing of 2–5k tokens. Structure:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
## Wakeup briefing — <project>
|
|
52
|
+
|
|
53
|
+
**Active thread:** <one-line from most recent entry's "Open threads" section, or "None">
|
|
54
|
+
|
|
55
|
+
**Last session:** <date> on branch `<branch>`: <one-line goal>
|
|
56
|
+
- Work done: <2-3 bullets condensed from most recent entry>
|
|
57
|
+
- Open threads: <bullets, if any>
|
|
58
|
+
- Dead ends to avoid: <bullets, if any>
|
|
59
|
+
|
|
60
|
+
**Recent sessions:** (up to 5)
|
|
61
|
+
- <date> [<branch>] <slug>: <one-line goal>
|
|
62
|
+
|
|
63
|
+
**Today's breadcrumbs:** (if any)
|
|
64
|
+
- HH:MM — <text>
|
|
65
|
+
|
|
66
|
+
**Today's sessions:** (if user has already worked today)
|
|
67
|
+
- HH:MM start: <branch>, <msg-count> messages
|
|
68
|
+
|
|
69
|
+
**Suggested next step:** <derived from active thread + breadcrumbs>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
End with one of:
|
|
73
|
+
|
|
74
|
+
- "Resume? Active thread: '<thread>'. Suggested next step: <step>."
|
|
75
|
+
- "No active thread. Last session ended cleanly. What are you working on today?"
|
|
76
|
+
|
|
77
|
+
## Step 4: Don't write anything
|
|
78
|
+
|
|
79
|
+
Wakeup is read-only. Never invoke write-form subcommands (`entries write`, `breadcrumb '<text>'`, `snapshot`) from this skill.
|
|
80
|
+
|
|
81
|
+
## Edge cases
|
|
82
|
+
|
|
83
|
+
- **No entries for project**: print "No curated entries for `<slug>` yet. Run `/day-wakeup` to process recent sessions, or run `clast sessions --project <slug>` to see what's available." and stop.
|
|
84
|
+
- **Slug resolves but no entries and no sessions**: print "Project `<slug>` registered but has no journal activity yet."
|
|
85
|
+
- **Today's session count > 5**: summarize ("worked 12 sessions today, most recent 16:22 on branch `loop-guard-ngram`") rather than listing all.
|
|
86
|
+
|
|
87
|
+
## Synthesis prompt
|
|
88
|
+
|
|
89
|
+
<!-- step-13 addition: inlined synthesis prompt with explicit structure re-statement -->
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
You are synthesizing a project briefing for the user. They are about to start work on the `{slug}` project and want a tight summary of where they left off.
|
|
93
|
+
|
|
94
|
+
Recent curated entries (newest first):
|
|
95
|
+
{entries_json_with_bodies}
|
|
96
|
+
|
|
97
|
+
Today's breadcrumbs for this project:
|
|
98
|
+
{breadcrumbs_today}
|
|
99
|
+
|
|
100
|
+
Today's session activity for this project:
|
|
101
|
+
{sessions_today}
|
|
102
|
+
|
|
103
|
+
Produce a briefing using this structure (omit any section that has no content):
|
|
104
|
+
|
|
105
|
+
- Active thread: one-line from most recent entry's "Open threads", or "None"
|
|
106
|
+
- Last session: date, branch, one-line goal, work done (2-3 bullets), open threads, dead ends to avoid
|
|
107
|
+
- Recent sessions: up to 5 entries with date, branch, slug, one-line goal
|
|
108
|
+
- Today's breadcrumbs: timestamped list if any
|
|
109
|
+
- Today's sessions: list if user has already worked today
|
|
110
|
+
- Suggested next step: derived from active thread + breadcrumbs
|
|
111
|
+
|
|
112
|
+
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.
|
|
113
|
+
|
|
114
|
+
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."
|
|
115
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Beau (procrastivity)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# clast
|
|
2
|
+
|
|
3
|
+
Capture, curate, and surface Claude Code session history across all your projects.
|
|
4
|
+
|
|
5
|
+
> 🚧 Pre-1.0 — APIs may change before v1.0.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
- **CLI** (`clast`) — snapshot, browse, and query your Claude Code session JSONL history.
|
|
10
|
+
- **Plugin** — installs skills (`/day-wakeup`, `/wakeup`) that surface recent session context.
|
|
11
|
+
- **SessionStart hook** — quietly snapshots active sessions in the background each time Claude Code starts.
|
|
12
|
+
|
|
13
|
+
## Capture your sessions
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
clast snapshot # copy any new sessions into the journal
|
|
17
|
+
clast snapshot --dry-run --json | jq # preview what would be captured
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`clast snapshot` is idempotent and silent on no-op, safe to run from cron or
|
|
21
|
+
a SessionStart hook. See [`docs/cli-contract.md#clast-snapshot`](./docs/cli-contract.md#clast-snapshot)
|
|
22
|
+
for the full flag reference.
|
|
23
|
+
|
|
24
|
+
## Read your sessions
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
clast projects # which projects had activity today
|
|
28
|
+
clast sessions --since -7d # sessions captured in the last week
|
|
29
|
+
clast show <session-uuid> --full # metadata + first/last turns
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Window flags (`--day`, `--since`, `--until`) accept ISO dates and
|
|
33
|
+
relative keywords. See
|
|
34
|
+
[`docs/cli-contract.md#clast-projects`](./docs/cli-contract.md#clast-projects),
|
|
35
|
+
[`docs/cli-contract.md#clast-sessions`](./docs/cli-contract.md#clast-sessions),
|
|
36
|
+
and [`docs/cli-contract.md#clast-show`](./docs/cli-contract.md#clast-show)
|
|
37
|
+
for the full flag and output schemas.
|
|
38
|
+
|
|
39
|
+
## Curate an entry
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
clast entries # list curated entries
|
|
43
|
+
clast entries read 2026-05-30-1430-xesapps-foo.md # cat a single entry
|
|
44
|
+
printf 'Notes...\n' | clast entries write \
|
|
45
|
+
--session <session-uuid> --slug short-slug --body-stdin # write a new entry
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`clast entries write` looks up the session in the manifest, composes the
|
|
49
|
+
documented frontmatter from the captured snapshot + registry, and writes
|
|
50
|
+
`entries/YYYY-MM-DD-HHMM-<project-slug>-<session-slug>.md` atomically. See
|
|
51
|
+
[`docs/cli-contract.md#entry-frontmatter`](./docs/cli-contract.md#entry-frontmatter)
|
|
52
|
+
for the full frontmatter schema and
|
|
53
|
+
[`docs/cli-contract.md#clast-entries`](./docs/cli-contract.md#clast-entries)
|
|
54
|
+
for the flag reference.
|
|
55
|
+
|
|
56
|
+
## Leave a breadcrumb
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
clast breadcrumb --project xesapps 'check migration before deploy'
|
|
60
|
+
clast breadcrumb --global 'remember to bump the cache version'
|
|
61
|
+
|
|
62
|
+
clast breadcrumb --read --project xesapps
|
|
63
|
+
clast breadcrumb --read --global
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Breadcrumbs are append-only one-line notes for `/wakeup` and `/day-wakeup`.
|
|
67
|
+
See [`docs/cli-contract.md#clast-breadcrumb`](./docs/cli-contract.md#clast-breadcrumb)
|
|
68
|
+
for the full command contract.
|
|
69
|
+
|
|
70
|
+
## Inspect and audit the journal
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
clast stats # one-line activity summary for today
|
|
74
|
+
clast stats --since -7d # rollup over the last week
|
|
75
|
+
|
|
76
|
+
clast doctor # check manifest, registry, snapshots
|
|
77
|
+
clast doctor --fix # rebuild a broken manifest, prune orphans
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
See [`docs/cli-contract.md#clast-stats`](./docs/cli-contract.md#clast-stats)
|
|
81
|
+
and [`docs/cli-contract.md#clast-doctor`](./docs/cli-contract.md#clast-doctor)
|
|
82
|
+
for the contract reference, and `clast stats --help` / `clast doctor --help`
|
|
83
|
+
for the current set of flags.
|
|
84
|
+
|
|
85
|
+
## Install to a prefix
|
|
86
|
+
|
|
87
|
+
`./install.sh` installs to `/usr/local` by default; for a non-root local install, run:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
./install.sh ~/.local
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`make install` wraps the same script. Use `./uninstall.sh ~/.local` (or
|
|
94
|
+
`make uninstall` for the default prefix) to remove the installed files. See
|
|
95
|
+
[`docs/repo-bootstrap.md#installsh--uninstallsh`](./docs/repo-bootstrap.md#installsh--uninstallsh)
|
|
96
|
+
for the rationale.
|
|
97
|
+
|
|
98
|
+
## Install with Nix
|
|
99
|
+
|
|
100
|
+
With Nix flakes enabled, you can use `clast` directly from the public flake:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
nix run github:procrastivity/clast -- whereami
|
|
104
|
+
nix profile install github:procrastivity/clast
|
|
105
|
+
nix build .#default && ./result/bin/clast --version
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
For Home Manager or nix-darwin users, `overlays.default` exposes `pkgs.clast`.
|
|
109
|
+
See [`docs/repo-bootstrap.md#nix-flake`](./docs/repo-bootstrap.md#nix-flake)
|
|
110
|
+
for the full overlay wiring.
|
|
111
|
+
|
|
112
|
+
## Install via npm
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
npm install -g @procrastivity/clast
|
|
116
|
+
npx -p @procrastivity/clast clast --version
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The npm package ships the same install set as `install.sh` and Nix: `bin/`,
|
|
120
|
+
`lib/`, `.claude-plugin/`, `hooks/`, `examples/`, `README.md`, and `LICENSE`.
|
|
121
|
+
After a global install, register the plugin with
|
|
122
|
+
`claude plugin install $(npm root -g)/@procrastivity/clast`.
|
|
123
|
+
|
|
124
|
+
## Install as a Claude Code plugin
|
|
125
|
+
|
|
126
|
+
For a local checkout, install the plugin with:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
claude plugin install <path-to-clast-checkout>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The plugin can be installed from any local checkout, or via `npm install -g`
|
|
133
|
+
(which puts `.claude-plugin/` under `npm root -g`); a centralized marketplace
|
|
134
|
+
listing is a separate distribution channel deliberately not pursued for v1.
|
|
135
|
+
Today the plugin ships a single `SessionStart` hook: every time a Claude Code
|
|
136
|
+
session starts it backgrounds `clast snapshot`, so your journal stays current
|
|
137
|
+
with zero manual effort. The hook is best-effort and silent: if the `clast` CLI
|
|
138
|
+
isn't on your `PATH` yet, sessions still start cleanly. See
|
|
139
|
+
[`docs/skill-prompts.md#hook-sessionstart`](./docs/skill-prompts.md#hook-sessionstart)
|
|
140
|
+
for the hook's design rationale.
|
|
141
|
+
|
|
142
|
+
### `/day-wakeup`
|
|
143
|
+
|
|
144
|
+
At the start of each day, run `/day-wakeup` inside any Claude Code session after
|
|
145
|
+
the plugin is installed. It performs once-per-day cross-project curation of
|
|
146
|
+
yesterday's sessions into durable journal entries, walking each uncurated session
|
|
147
|
+
through a draft you can accept, edit, skip, or mark for in-entry promotion. See
|
|
148
|
+
[`docs/skill-prompts.md#skill-1-day-wakeup`](./docs/skill-prompts.md#skill-1-day-wakeup).
|
|
149
|
+
|
|
150
|
+
### `/wakeup`
|
|
151
|
+
|
|
152
|
+
When starting work on a specific project, run `/wakeup` (or `/wakeup <slug>` from
|
|
153
|
+
anywhere) to get a per-project read-only briefing synthesized from recent curated entries,
|
|
154
|
+
today's breadcrumbs, and any sessions already started today. `/wakeup` never writes — it
|
|
155
|
+
only reads. See
|
|
156
|
+
[`docs/skill-prompts.md#skill-2-wakeup`](./docs/skill-prompts.md#skill-2-wakeup).
|
|
157
|
+
|
|
158
|
+
## Development
|
|
159
|
+
|
|
160
|
+
**With Nix (recommended).** Run `direnv allow` (or `nix develop`) at the repo root. The dev shell provides `bash`, `jq`, `git`, `shellcheck`, and `pre-commit` — everything `clast` needs at runtime plus the dev tooling.
|
|
161
|
+
|
|
162
|
+
**Without Nix.** Install `bash 5+`, `jq`, `git`, and `shellcheck` via your package manager, then run `make deps-check` to verify they're on PATH.
|
|
163
|
+
|
|
164
|
+
## CI / Release
|
|
165
|
+
|
|
166
|
+
Pull requests run lint, tests, version sync, npm pack shape, Nix smoke, flake check, and Nix build automatically.
|
|
167
|
+
Releases trigger on `v*` tags, and the tag version must match `package.json` exactly.
|
|
168
|
+
The release workflow publishes to npm with provenance and creates a GitHub Release with the npm tarball attached.
|
|
169
|
+
Configure the `NPM_TOKEN` repo secret before the first release tag.
|
|
170
|
+
|
|
171
|
+
## Documentation
|
|
172
|
+
|
|
173
|
+
- [`docs/overview.md`](./docs/overview.md) — project overview and design.
|
|
174
|
+
- [`docs/cli-contract.md`](./docs/cli-contract.md) — CLI reference.
|
|
175
|
+
- [`docs/skill-prompts.md`](./docs/skill-prompts.md) — plugin reference.
|
|
176
|
+
- [`docs/repo-bootstrap.md`](./docs/repo-bootstrap.md) — repo layout and packaging.
|
|
177
|
+
- [`docs/releasing.md`](./docs/releasing.md) — release runbook.
|
|
178
|
+
- [`examples/`](./examples/) — cron, systemd-timer, and workflow samples.
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
MIT — see [LICENSE](./LICENSE).
|
package/bin/.gitkeep
ADDED
|
File without changes
|