Repository navigation
build(deps): bump actions/setup-node from 6 to 7 - #48
Closed
dependabot[bot] wants to merge 70 commits into
Closed
dependabot[bot] wants to merge 70 commits into
dependabot[bot] wants to merge 70 commits into
Conversation
Step 01: lay down directory structure, license, conventions files, package metadata, Nix dev shell, and CI skeletons. No clast code yet — that starts in step 02.
Implements step 03: the bin/clast dispatcher parses global flags (--help, --version, --json, --verbose, --quiet, --journal-dir, --projects-dir) and dispatches to subcommands. whereami ships as the first real subcommand; the other nine are stubbed with "not yet implemented (planned for step NN)" messages that exit 2. clast_usage is expanded to a real top-level usage block. whereami shares field computation between human and --json output paths; registered/slug and last_snapshot are stubbed until steps 05 and 04. Adds test/test-dispatcher.sh and test/test-whereami.sh and wires both into the test-clast.sh aggregator. All 52 assertions pass; make lint is clean.
The previous workflow invoked shellcheck directly without -x, so SC1091 (unfollowable source) fired on every `source` directive. Step 02 silently passed because the file-existence guard skipped shellcheck entirely when bin/clast was absent; step 03 added bin/clast and exposed the misconfiguration. Delegating to the Makefile keeps the lint command in one place.
Copilot review (PR #1) caught that the non-git and git-dir test blocks ran assertions inside `( ... )` subshells. The pass/fail counters are local to the subshell, so a regression in git_root detection would print FAIL but still let clast_test_summary report success. Run the clast invocations with `(cd $dir && ...)` to scope the chdir to one command's subshell, and keep assertions in the parent. test-whereami count goes from 7 → 10 — three previously-lost assertions are now actually wired up.
step-03: dispatcher and whereami subcommand
…e/rebuild Implements the five manifest functions per docs/repo-bootstrap.md and the schema in docs/cli-contract.md#manifest-line: append (single-line >> for crash-safe concurrent writes), lookup (most-recent-wins via tac + fromjson?), has_capture, iterate, and rebuild_from_disk (best-effort, lossy source fields as null/0). Wired in via test-clast.sh; corrupt-manifest fixture exercises malformed-line skipping.
Addresses Copilot review on #2: append now reports a clear error when the manifest >> redirect fails; rebuild verifies stat, date, per-line writes, and the post-sort rewrite, removing the temp file and bailing on any failure so a half-written manifest never gets mv'd into place.
docs(steps): add step-04 manifest-lib plan
* docs(steps): add step-05 registry-lib-and-subcommand plan * feat(registry): add clast-registry-lib.bash and clast registry subcommand Implements list/add/resolve/remove against $(clast_journal_dir)/projects.json, wires the lib into the dispatcher, and lights up whereami's registered/slug fields via clast_registry_resolve. Adds multi-project/ fixture plus lib- and subcommand-level test suites. * fix(registry): exit 2 with clear error when --slug/--remote lacks a value Previously `clast registry add /tmp/x --slug` (or `--remote`) hit a bare `shift 2` past argv under `set -e`, exiting with status 1 and a shell-level error instead of the documented usage-error path.
* docs(steps): add step-06 snapshot-subcommand plan * feat(snapshot): implement clast snapshot subcommand Adds lib/clast/clast-subcommands/snapshot.bash with the documented --dry-run / --since / --include-segment flags, wires it into the dispatcher (replacing the step-06 stub), extends the multi-project fixture with a synthetic projects-tree/, and adds test/test-snapshot.sh covering empty/simple/multi-project cases, idempotence, mtime-keyed dedup, day-cutoff bucket math, slug grouping via the registry, and the documented-future corrupt-manifest hook. * fix(snapshot): accept --json positionally; gate missing-ts warn on --verbose Address PR #4 review feedback: - Subcommand parser now accepts `--json` after `snapshot` (mirrors registry), so `clast snapshot --dry-run --json | jq` from the README works in either ordering. - The "missing first-line timestamp; falling back to mtime" warning is now gated on CLAST_VERBOSE so malformed-but-capturable sessions don't spam hook/cron stderr. * test(snapshot): freeze TZ=UTC for day-cutoff scenario Address PR #4 follow-up review: the day-cutoff math formats the adjusted epoch with local `date`, so the 2026-05-30T01:30Z fixture's bucket depends on the runner's timezone. Pin TZ=UTC for that scenario and tighten the assertions to name exact buckets per session_id.
* docs(steps): add step-07 query-subcommands plan * feat(query): implement clast projects, sessions, show Read-side of the CLI: list projects with activity in a date window, list sessions (optionally filtered by registry slug), and dump per-session metadata + first/last turns. All three subcommands stream the manifest once, derive per-session counts/timestamps from snapshots on demand, and honor --json / --quiet plus the standard window flags (--day, --since, --until, --project, --full, --turns). Adds the multi-project journal-seed fixture (manifest + transcripts + registry, plus one deliberate orphan manifest line) and a 76-assertion test/test-query.sh covering every documented flag combination. * fix(query): address Copilot review feedback - projects/sessions: default --until to today when --since is given without an upper bound (matches docs/cli-contract.md defaults). - projects/sessions: gate "snapshot missing or unreadable" warning behind CLAST_VERBOSE so normal runs stay quiet on stderr. - show: check -r (readable) instead of -f for the snapshot file so permission errors take the orphan/doctor path. - show: harden first_prompt/last_prompt extraction against malformed JSONL by capturing the user-message stream once into a tolerated variable. - show: only collect turns when --full is requested; --json without --full no longer slurps the entire transcript. - test-query: tighten projects --json schema check with jq -e asserting all eight documented keys are present. - docs/steps: fix a copy-paste count in the step-07 plan (the multi-day window yields two distinct projects, not three).
* docs(steps): add step-08 entries-subcommand plan * feat(entries): implement clast entries list/read/write Adds the curated-entry layer: list view over entries/ with date/project/tag filters, read convenience, and an atomic writer that composes the documented YAML frontmatter from a session_id + body. Includes the multi-project entries-seed fixture and a 91-test integration suite covering frontmatter key order, slug-collision suffixing, tag intersection, and the cross-check that step 07's sessions curated probe finds entries written here.
* docs(steps): add step-09 breadcrumb-subcommand plan * docs(steps): pin TZ=UTC and use CLAST_BIN in step-09 test plan Address Copilot review on PR #7: HH:MM in breadcrumb append lines is formatted in local time, so test assertions and the smoke snippet flake on non-UTC hosts. Mirror test-snapshot.sh by exporting TZ=UTC at suite setup and in the manual smoke block. Also adopt the existing CLAST_BIN="$PWD/bin/clast" convention so the new suite reads like the rest of the test tree. * docs(steps): address second Copilot pass on step-09 - Move global `--json` before the subcommand in every example (task 11 scenarios + verification snippet). The dispatcher only parses global flags before the subcommand name; subcommands read CLAST_JSON from env and do not re-parse --json. - Normalize task 11 to use "$CLAST_BIN" consistently (had a few leftover `bin/clast …` invocations after the prior pass). - Replace the `_clast_now_epoch` instruction in task 5 with the public `CLAST_NOW_EPOCH` env hook + `date +%s` fallback. The underscore- prefixed function is internal to clast-lib.bash and this step does not modify libs. - Call out in task 4 that cli-contract.md#clast-breadcrumb's 'prompt to register' wording is stale (describes the future /breadcrumb skill, not the CLI). The exit-1-with-hint behavior is authoritative; rewording the contract is a follow-up docs pass. * docs(steps): address third Copilot pass on step-09 - Expand the unscoped-breadcrumb filename example in Context to the full `YYYY-MM-DD-_global.md` pattern instead of the bare suffix shorthand, with a note about the leading-underscore collision-guard. - Correct task 4: `clast_log_warn` writes unconditionally to stderr (it is not gated on `CLAST_VERBOSE`). Reword the 'slug not in registry' bullet to reflect that and explain the intent (catch typos), rather than implying the warn is verbose-only. - Narrow the 'subcommands do not re-parse --json' claim to breadcrumb specifically. `whereami` does accept a subcommand-level `--json` for ergonomics; making the rule global was inaccurate. Updated both task 11's read scenario and the verification snippet. * docs(steps): expand step-09 depends_on to include 06 and 07 Copilot pass 4 caught that the plan body reuses `multi-project/projects-tree/` (added in step 06) and `multi-project/journal-seed/projects.json` (added in step 07), and describes the dispatcher in its post-step-07 state. The runtime lib dependencies are still just 02/03/05, but `depends_on` should reflect what someone executing steps sequentially actually needs in place.
* docs(steps): add step-10 stats-and-doctor plan * feat(stats,doctor): implement clast stats and clast doctor Stats summarizes journal activity over a date window using manifest + filesystem stat only (no JSONL body parsing); doctor runs six sanity checks (manifest validity, registry validity, orphan snapshots, missing snapshots, day-bucket consistency, day-cutoff sanity) and, with --fix, performs the two safe repairs: rebuild manifest from disk and remove orphan snapshots. Replaces the two stubs in bin/clast; adds test-stats.sh (46 cases) and test-doctor.sh (39 cases) and wires both into the suite. * fix(stats,doctor): address Copilot review findings - stats: resolve project from dirname(source) before falling back to the snapshot segment so path moves don't misclassify sessions. - doctor: orphan_snapshots tolerates a missing manifest (a fresh or partially synced journal with stray transcripts should report orphans rather than abort under set -e). - doctor: registry_validity now also flags two slugs sharing the same alias, not just an alias colliding with another slug. - doctor: --json --fix without --yes errors out (exit 2) instead of writing the orphan prompt to stdout and corrupting the JSON object. * fix(stats,doctor): address Copilot round-2 review - doctor: --fix no longer runs orphan removal when a non-manifest critical finding (e.g. unparseable projects.json) is still present; the only repair allowed under critical is the manifest rebuild. - stats: drop the unused kept_rows accumulator. - README: soften the wording so it no longer implies the linked cli-contract section is the complete flag schema; point readers at `clast stats --help` / `clast doctor --help` for the current set.
…t hook (step 11) (#9) * docs(steps): add step-11 plugin-scaffold-and-hook plan * feat(plugin): scaffold .claude-plugin manifest + SessionStart snapshot hook Add the plugin substrate so Claude Code recognizes this repo as a plugin and fires `clast snapshot` automatically on every session start: - .claude-plugin/plugin.json — plugin manifest (name/version/description/ homepage/author/license), version kept in lockstep with package.json. - hooks/hooks.json — single SessionStart hook pointing at snapshot.sh via the literal ${CLAUDE_PLUGIN_ROOT} template token. - hooks/snapshot.sh — best-effort, double-forked `clast snapshot`; silent no-op when the CLI isn't on PATH, no set -euo pipefail, explicit exit 0. Marked executable in the index (100755) so the plugin loader runs it. Remove the now-displaced .claude-plugin/.gitkeep and hooks/.gitkeep; retain .claude-plugin/skills/.gitkeep (skills land in later steps). test-clast.sh gains a _assert_plugin_assets check (jq parse on both JSON files + exactly-one-hook guard + shellcheck on the hook). package.json and Makefile lint targets now cover hooks/snapshot.sh. README documents the local plugin-install path and the auto-snapshot behavior. * test(doctor): pin snapshot mtimes in corrupt --fix rebuild case The `doctor corrupt --fix: exit 0` assertion was wall-clock-flaky and red in CI: clast_manifest_rebuild_from_disk derives each entry's captured_at from the snapshot file's mtime, which is "now" for a freshly-copied fixture. When the suite runs within ±30min of the 04:00 day-cutoff (CI ran at 03:53 UTC), day_cutoff_sanity emits a warn and doctor exits 1 instead of 0. Pin the corrupt-manifest snapshot mtimes to noon before invoking `doctor --fix` so the rebuilt captured_at is deterministic and clear of the cutoff window. Pre-existing failure surfaced by CI on this branch; the fix is test-only. * fix(test,docs): address PR review on bundled doctor de-flake - test/test-doctor.sh: pin snapshot mtimes to @${CLAST_NOW_EPOCH} instead of a duplicated literal timestamp. FROZEN_EPOCH is noon UTC, so this keeps the rebuilt captured_at clear of the 04:00 cutoff while staying in sync with the suite's frozen clock (no drift if the frozen time changes). - docs/steps/step-11: reconcile the step narrative with the bundled fix. The Context, Goal, and Out-of-scope sections now note that the implementing PR carries a pre-existing, test-only test-doctor.sh de-flake that is orthogonal to the plugin substrate, so the doc is internally consistent with the diff. --------- Co-authored-by: Claude <noreply@anthropic.com>
* docs(steps): add step-13 skill-wakeup plan * feat(skills): add /wakeup read-only briefing skill Creates .claude-plugin/skills/wakeup/SKILL.md with YAML frontmatter (name + description with all canonical trigger phrases) and the full wakeup body: resolve project, gather data via clast registry/entries/ breadcrumb/sessions, synthesize 2–5k-token briefing, plus inlined synthesis prompt with explicit briefing structure (step-13 addition). Extends test/test-clast.sh plugin-assets block with four helper functions: frontmatter-shape, trigger-phrase, CLI-command-present, and read-only-invariant (negative-grep) assertions. Updates README.md with /day-wakeup and /wakeup paragraphs. https://claude.ai/code/session_01DeL6e76aF7VrW5bp2LK8yf * fix(skills): use global --json flag before subcommand in /wakeup clast --json is a global flag consumed before subcommand dispatch (bin/clast:23-29); placing it after the subcommand exits 2 with unknown flag. Fix `clast entries --project … --json` and `clast sessions … --json` to `clast --json entries …` and `clast --json sessions …`. Update test assertion strings to match. https://claude.ai/code/session_01DeL6e76aF7VrW5bp2LK8yf --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat(breadcrumb): implement clast breadcrumb (write/read/list) * fix(breadcrumb): address Codex review feedback
* feat(skills): add /day-wakeup curation skill * fix(skills): use global json flag in day-wakeup
* docs(steps): add step-14 install-scripts plan * feat(install): add install.sh and uninstall.sh for prefix install * fix(install): ship package metadata for version lookup
* docs(steps): add step-15 nix-flake-package plan * feat(nix): add packages.default and overlays.default to flake * fix(nix): wrap additional runtime tools
* docs(steps): add step-16 npm-publish-prep plan * chore(npm): add prepublishOnly, pack-check, and version-sync invariants * fix(npm): use portable version sync whitespace match
* docs(steps): add step-17 ci-workflows plan * ci: flesh out test, nix, and release workflows
* docs(steps): add step-18 docs-and-examples plan * docs: ship v1.0 examples, changelog, and release runbook * docs: address codex release feedback
* docs(steps): add step-19 v1.0-release plan
* chore(release): add contrib/release script and reset version to 0.0.0
- Adopt direnv-session-loader-style contrib/release: bumps package.json
+ flake.nix in lockstep, regenerates CHANGELOG.md via git-cliff,
runs gates, commits 'release: vX.Y.Z', pushes, then creates and
pushes the annotated v{version} tag.
- Reset package.json and flake.nix to 0.0.0 so contrib/release --patch
produces v0.0.1 (first real release).
- Reset CHANGELOG.md to bootstrap shape; git-cliff regenerates content
on the next release.
- Tune cliff.toml: skip release: / chore / test / refactor / style /
step-NN: prefixes; map feat/fix/docs/ci/build/perf to clean sections.
- Add git-cliff to the Nix dev shell buildInputs.
- Extend 'make lint' to cover contrib/release.
- Rewrite docs/releasing.md around the new one-command flow.
- Restore the pre-1.0 banner in README.md.
* docs(steps): add step-20 stale-help-fix plan * fix(cli): drop stale "(planned)" labels from --help and add regression test The top-level usage block in lib/clast/clast-lib.bash labeled projects, sessions, show, entries, breadcrumb, and registry as "(planned)" since step 03 — each shipping step missed updating it. Drop the suffixes and add a dispatcher-test invariant so future adds either ship with a dispatcher branch or fail CI immediately. * docs(steps): widen step-20 depends_on to cover all referenced gates Codex review on PR #22 flagged that depends_on listed only the subcommand-shipping steps (03, 05, 07, 08, 09) while the verification block invokes make check-version-sync (16), make npm-pack-check (16), and make nix-smoke (15). Add 15, 16, and 19 so the frontmatter matches the actual prerequisites.
* feat(retro): add front-matter index pass (clast-retro step-01)
Read every curated journal entry's front-matter and emit a per-entry
index of the four fields the day→project grouping depends on:
session_id, project_path, snapshot_path, curated_source_mtime.
- lib/clast/clast-retro-lib.bash: clast_retro_index [<entries_dir>]
prints a JSON array (one record per entries/*.md, sorted by path);
absent/empty/literal-null fields become JSON null; missing dir → [].
Pure code, read-only — no bucketing/dedup/render/LLM (steps 02/03).
- lib/clast/clast-lib.bash: promote the front-matter primitives
(clast_read_frontmatter, clast_yaml_unquote) to shared helpers so the
repo has one front-matter reader.
- entries.bash: delegate its two private helpers to the shared ones
(behavior-preserving).
- test/test-retro.sh (+ retro fixtures): cover the filename≠work-day
divergence, null project_path, and missing snapshot_path/mtime.
* feat(retro): bucket entries by work day + dedup sessions (clast-retro step-02)
Consume the step-01 index and produce the day→project manifest the brief's
Proposed-approach §1 calls for. Pure code, deterministic, no LLM.
- lib/clast/clast-retro-lib.bash: clast_retro_manifest [--from D] [--to D]
[--window work-days|file-dates]. Derives each entry's work day from the
snapshot_path dir (falling back to curated_source_mtime, then "unknown"),
dedups by session_id (later day wins; contributing entry paths merged into
entries[] for step-03 to concatenate), groups day→project, and honors the
date window under both scopes (work-days filters resolved sessions;
file-dates filters entries by filename date pre-dedup). Read-only.
- lib/clast/clast-lib.bash: promote clast_day_bucket_for_epoch as the single
source of truth for the cutoff-adjusted day-bucket rule; clast_today
delegates to it.
- snapshot.bash: _clast_snapshot_bucket_for_epoch delegates to the shared
helper (behavior-preserving).
- test/test-retro-manifest.sh (+ fixtures): cross-midnight dedup, mtime
fallback, both-missing→unknown, work-day-vs-filename divergence, null-project
grouping, and both window scopes.
* feat(retro): wire `clast-plumbing retro` + deterministic render (clast-retro step-03)
Completes Round 1: a deterministic `clast retro` subcommand that runs the
step-02 manifest and renders day→project sections in work-day order from the
raw entry bodies. No LLM.
- clast-subcommands/retro.bash: clast_cmd_retro parses --from/--to/--window
(default work-days), honors --json (emits the manifest verbatim), --quiet,
and -h. Human render walks the manifest: day headers in date order (unknown
last), project groups (null project last), session bullets (title + short
session id), and each session's entry bodies concatenated verbatim (merged
cross-midnight sessions show both, with filename separators).
- bin/clast-plumbing: wire the `retro` case; clast_usage lists it.
- clast-lib.bash: add clast_entry_body; promote clast_entry_title from
entries.bash (which now delegates).
- test/test-retro-cmd.sh: subprocess suite — JSON≡manifest, day ordering,
work-day-vs-filename bucketing, merged-body concatenation, null-project
header, window scopes, error/quiet/help paths, empty corpus.
Command home is plumbing because Round 1 is fully deterministic; the porcelain
`clast retro` (Round 2) will call `clast-plumbing retro --json` and add the
model summarize pass — keeping retro one command per layer.
* feat(retro): model-condensed session summaries, cached (clast-retro step-04)
Round 2: a porcelain `clast retro` that condenses each session's body into
retro bullets via the LLM, reusing the deterministic Round 1 manifest for
structure. Per-session_id, content-fingerprinted cache makes re-runs free.
- clast-porcelain-subcommands/retro.bash: clast_cmd_retro shells out to
`clast-plumbing retro --json --bodies`, summarizes each session through the
clast_porcelain_* LLM layer, and renders day→project with the bullets.
Cache at <journal>/.retro-summaries/<session_id>.json keyed by a sha256
fingerprint of the body; --refresh forces re-summarize; --json emits the
manifest with a summary per session. Wired into bin/clast + usage.
- prompts/retro-summary-{system,user}.md: new condense prompt pair (distinct
from the wake-draft curation prompts).
- clast-plumbing retro --bodies (json only): inject each session's merged body
+ title. Body assembly extracted to clast_retro_session_body in
clast-retro-lib.bash and shared with the Round 1 human render (one code path).
- test/test-retro-summary.sh: function-level suite with the LLM stubbed —
cache miss/hit/refresh, per-session fingerprint invalidation, prompt
assembly, --json summaries, arg validation. test-retro-cmd gains --bodies
coverage.
* feat(retro): friendly project names + null fallback (clast-retro step-05)
Round 3 readability: project groups render a friendly display name instead of
the raw path.
- clast-retro-lib.bash: clast_retro_friendly_name — path-derived (decode a
leading-`-` encoded segment; $HOME → ~; under home ≥3 components → last two,
e.g. ~/Workspaces/dev/xesapps → dev/xesapps, else ~/rest; deep non-home →
last two; short non-home verbatim; empty/null → "(no project)").
- clast_retro_manifest: inject `project_name` per project group (kept alongside
the raw project_path). Both renders (plumbing + porcelain) now print
project_name in the [...] header.
- Tests: unit cases for the namer (HOME pinned), manifest project_name
assertions, and HOME-relative render checks in test-retro-cmd /
test-retro-summary.
Friendly-naming is path-derived (the registry slug is already dash-joined, so
label/slug wouldn't yield dev/xesapps). Null sessions stay one "(no project)"
group — grouping contract unchanged; per-segment splitting deferred.
* feat(retro): provenance note + interrupted-session flagging (clast-retro step-06)
Round 3, final step. Completes the initiative.
- clast_retro_manifest: add `curation_dates` per day (unique filename dates of
that day's entries) — the data behind the once-per-day provenance note.
- clast_retro_is_interrupted (clast-retro-lib): a session body with a Goal
and/or Open threads but no "What shipped" is interrupted. `--bodies` now adds
an `interrupted` boolean per session so the porcelain reads it from the
manifest; the plumbing render computes it from the body it reads.
- Both renders: emit a once-per-day note "(filed <dates>; work day
reconstructed from session snapshots)" when work day != filename date, and
tag interrupted sessions "* <title> (<sid>) [interrupted]" rather than
dropping or overstating them.
- test/test-retro-prov.sh (+ retro-prov fixtures): predicate unit cases,
manifest curation_dates/interrupted, and the note/flag in both renders
(porcelain with the LLM stubbed).
Validated on the real corpus: 65/70 sessions in the 06-10→06-24 window were
curated on a different day, so the provenance note is the common case.
* docs(retro): document clast-plumbing retro + clast retro
- reference/cli.md: add the `clast-plumbing retro` contract (synopsis, flags,
default + --json output, provenance/interrupted/friendly-name behavior,
exit codes).
- guides/run-without-claude-code.md: add the `clast retro` porcelain section
(caching, --refresh, --json), list it in the intro + prompt-templates, and
note it's non-interactive / cron-safe.
* fix(retro): pass large bodies/manifests to jq off argv (Codex P2)
A merged session body, or the full --bodies manifest for a wide window, can
exceed MAX_ARG_STRLEN (~128 KiB). Passing them via `jq --arg`/`--argjson`
(argv) then fails with "Argument list too long" — silently yielding body: ""
or aborting `clast retro` after summaries were generated.
Feed them through stdin / --rawfile / --slurfile (process substitution)
instead, matching clast_porcelain_llm_chat:
- _clast_retro_inject_bodies: body via --rawfile; manifest via stdin, pairs
via --slurpfile.
- _clast_retro_inject_project_names: manifest via stdin, pairs via --slurpfile.
- porcelain summary fold-back: manifest via stdin, summary pairs via --slurpfile.
test-retro-cmd: a >128 KiB entry body is preserved through --bodies and renders.
* chore: add retro
* fix(retro): strip raw bodies from clast retro --json (Codex P2)
The porcelain always calls clast-plumbing with --bodies to feed the
summarizer, then emitted that same manifest for --json, leaking each
session's raw body alongside the model summary. Neither the JSON nor the
render path consumes .body, so del(.body) while folding summaries keeps
--json condensed and consistent with the plumbing's lean-by-default
output. Raw bodies remain available via clast-plumbing --json retro
--bodies. Adds a regression test asserting no session carries a body.
* fix(retro): null-safe session_id key in --bodies/summary merges (Codex P2)
A legacy or hand-curated entry with no session_id indexes as JSON null.
The lean manifest rendered fine, but the --bodies merge (and the porcelain
summary fold that consumes it) keyed the session lookup with `$x[.session_id]`
/ `$sum[.session_id]`, which aborts jq with "Cannot index object with null"
and takes `clast retro` down with it.
Key both the reduce build and the lookup through `tostring` so a null
session_id resolves to the "null" key the pairs side already produces via
`jq -r`. Regression tests drive a session-id-less entry through both the
plumbing `--bodies` path and the porcelain `--json` path.
* fix(retro): keep id-less sessions distinct; fix doc flag order (Codex P2)
Two Codex P2 findings on the latest review:
1. dedup collapse — clast_retro_manifest grouped sessions by `.session_id`, so
two legacy/hand-curated entries that both omit session_id (JSON null)
collapsed under a shared null key into one session, merging unrelated bodies
and picking a single work day/project. Dedup now falls back to `.path`
(`group_by(.session_id // .path)`), which is unique per entry, so id-less
sessions each stay their own singleton.
Splitting them re-exposed a keying collision downstream: the --bodies merge,
the porcelain summary fold, and the per-session summary cache all keyed on
session_id (all "null"). All three now key on `session_id // .entries[0]`
(unique per session), and the cache filename falls back to a hashed
`noid-<fp>` for id-less sessions. Session ordering also falls back to
entries[0] for determinism.
2. doc flag order — docs/guides/run-without-claude-code.md showed
`clast-plumbing retro --json --bodies`, which exits 2: `--json` is a global
flag and must precede the subcommand. Corrected to `--json retro --bodies`.
Regression tests drive two id-less entries through both the plumbing --bodies
path and the porcelain --json path, asserting they stay distinct with their own
bodies/summaries/cache files (no collapse, no cross-contamination).
* feat(wake): auto-skip no-op sessions before the LLM Classify each captured session deterministically and let `/wake` and `clast wake` auto-dismiss "no-op" sessions — ones where Claude never replied — before any LLM call. This covers the common throwaway shapes: empty sessions, slash-command-only sessions (/clear, /model, /config), and sessions abandoned before a response. - New `clast-classify-lib.bash`: `clast_session_msg_counts` counts real user prompts (excluding <command-name>/<local-command-*> wrappers and meta messages) and assistant replies via a streaming jq pass. - Cache `user_msg_count`/`assistant_msg_count` on the manifest line at snapshot time (11-arg `clast_manifest_append`); `doctor --fix` rebuild backfills them. `sessions`/`show --json` expose the counts plus a derived `substantive` flag, recomputing from the transcript for legacy lines and failing safe (substantive=true) when unknown. - Both wake flows auto-dismiss `substantive == false` sessions with a recorded reason (reversible via `undismiss`), gated by the `CLAST_WAKE_AUTODISMISS_NOOP` env toggle. - Fix latent bug: `show` first_prompt/last_prompt no longer leak slash-command wrapper text. `substantive := assistant_msg_count > 0` — deliberately not gated on user count, so custom slash-command sessions (e.g. /review) that leave zero prose prompts but drive real assistant work stay substantive. New test-classify.sh + fixtures; extended manifest/snapshot/query suites. Docs: cli.md (manifest line, sessions/show fields), data-model.md, config.md ([wake] env vars). * perf(snapshot): classify only sessions that will be captured Move the clast_session_msg_counts call below the clast_manifest_has_capture dedupe check. Unlike the head/tail/wc metadata reads, classification streams the whole transcript through jq; running it before the dedupe check meant every already-captured session was re-parsed on each snapshot (i.e. every wake/hook run) only to be discarded. Skipped files now stay cheap. Addresses Codex review feedback on #35.
Enable weekly Dependabot updates for the github-actions ecosystem so the workflow actions (checkout, setup-node, install-nix-action) stay current and the recurring Node-20-runner deprecation warnings get cleared. npm ecosystem is intentionally omitted: clast has no runtime or dev npm dependencies (package.json ships only the CLI).
…ll-nix-action v31) (#40) Combines Dependabot PRs #37, #38, #39 into one atomic change. All three edit the same workflow files on adjacent lines, so merging them together avoids the sequential-rebase churn and verifies the bumps in a single CI run. checkout v5+/setup-node v5+ move the action runtime to Node 24, clearing the Node-20-runner deprecation warning. - actions/checkout v4 -> v7 (no with: inputs; default checkout) - actions/setup-node v4 -> v6 (node-version + registry-url unchanged) - cachix/install-nix-action v25 -> v31 (nix_path input unchanged)
* feat(retro): show progress while summarizing clast retro ran silent through the manifest build and the per-session LLM summarize loop, then dumped the whole report at once. Emit progress to stderr so stdout (render or --json) stays clean: - announce the manifest build before the slow plumbing call - report the resolved window + discovered work days up front - print a [i/total] line per session, with a "querying model..." sub-note only on cache misses (hits stay silent) Gated: silent when stderr is not a tty or CLAST_QUIET is set; CLAST_RETRO_PROGRESS=always forces it on for tests. * feat(retro): default to last 7 days; time each model call Two follow-ups to the progress work, from reviewing a real all-time run (211 sessions, ~2 months, one sequential model call each): - Default the window to the last 7 days when neither --from/--to is given. Add --all to opt back into the whole corpus. Explicit --from/--to still override. An unbounded retro is one model call per new session, so the bounded default keeps the common run fast and cheap. - Time each model call and report "done in Xs (model total Ys)" per query, plus a closing "summarized N session(s); M queried the model" tally. _clast_retrosum_summary now returns 3 on a fresh call vs 0 on a cache hit so only real model calls are timed and counted. Retro summarizes the curated `clast wake` entries (not raw transcripts) but via its own cache, so a first cold run still calls the model once per session; the timing/tally make that cost legible. * test(retro): resolve in-repo prompts so stderr-silence assertion holds in CI The new "progress: silent by default" assertion captures stderr and asserts it is empty, but a cold-cache summarize loads the retro prompt templates. On a fresh checkout (CI has no installed prompts and no CLAST_LIB) the loaders emit "cannot find prompts directory" to stderr, failing the assertion. Export CLAST_LIB to the in-repo lib so prompts always resolve. Verified under an empty HOME (no installed fallback). Addresses Codex P1 review feedback on #41.
clast wake ran each draft generation silently between "Generating draft..." and the printed draft. Add the same timing clast retro shows so the two are comparable: after each successful generation, print "done in Xs (model total Ys)", and add a "Model time" line to the run summary. The total sums only the model calls (not the reviewer's time at the menu). Extract the timing helpers (clast_porcelain_now / clast_porcelain_elapsed) into clast-porcelain-lib.bash so wake and retro share one implementation; retro now calls the shared helpers instead of its own copies.
clast wake required a tty and a keypress per session. Add --auto: auto-accept every generated draft and write it, with no triage menu and no per-session prompt, so wake can run from cron/scripts. --auto also drops the tty requirement (nothing is read from the terminal). Sessions whose draft fails to generate are skipped rather than prompting for retry. The scan window still honors CLAST_WAKE_SINCE (default -14d). Implemented by forcing the accept path (choice="a"), reusing the existing write logic verbatim, and gating the interactive prompts/triage on !auto. Adds test/test-wake-auto.sh — the first automated coverage of a wake path, possible now that --auto is non-interactive: stubs the LLM and shadows the bareword clast-plumbing to verify auto-accept, failure-skip, the no-tty refusal without --auto, and arg handling.
Add a length threshold so unattended --auto runs don't write low-value drafts. In --auto, a draft whose body is shorter than CLAST_WAKE_AUTO_MIN_CHARS (default 60) is skipped — not dismissed — so the session stays uncurated and can be handled in a later interactive pass. 0 disables the guard; interactive mode is unaffected (the reviewer decides). 60 sits between a degenerate draft (~45 chars) and a minimal but real entry (~100). Extends test-wake-auto.sh: short draft skipped/not written, and the threshold is tunable (0 writes everything; a high value skips even a normal draft).
`recorded="$recorded–$end_short"` let bash read the en dash (U+2013) as part of the identifier in a UTF-8 locale, expanding the unset name `recorded–`. Under `set -euo pipefail` that aborted the whole run for any session whose end time differed from its start time. Latent since the recorded-window line landed; `wake` had no test coverage until now, so nothing exercised it.
The porcelain grew `clast wake --auto` but the skill still told the model that unattended curation was "not a v1 feature" — the two porcelains contradicted each other. Give /wake an Auto mode with the same semantics as the CLI flag: skip triage and the per-session question, accept every draft, and apply the same CLAST_WAKE_AUTO_MIN_CHARS length guard (skip, don't dismiss). Opt-in only; the interactive path stays the default. Add a plugin-asset assert so the skill can't silently drift back.
Use clast retro --all so the provenance/interrupted assertions are not tied to the rolling seven-day default window. Claude-Session: https://claude.ai/code/session_01PyjLYz2GFRVgYS3nAtUoXm
feat(wake): add --auto for non-interactive curation
hooks/hooks.json declared hooks as a flat array of {event, command}
objects, but Claude Code expects `hooks` to be a record keyed by event
name, each holding matcher groups of {type, command} handlers. The
manifest failed schema validation at load ("expected record, received
array"), so the SessionStart snapshot hook never ran.
plugin.json had also never been wired into the release machinery — it
carried the scaffold's 0.1.0 since its initial commit while package.json
and flake.nix moved in lockstep to 0.0.7. Set it to the true version and
add it as a third source to the sync check, so drift now fails the gate
rather than accumulating silently.
contrib/release bumps and stages plugin.json alongside package.json and
flake.nix.
Claude-Session: https://claude.ai/code/session_01PyjLYz2GFRVgYS3nAtUoXm
The plugin asset check pinned the broken shape in place:
jq -e '.hooks | type == "array" and length == 1' hooks/hooks.json
`hooks` is a record keyed by event name, not an array, so this assertion
was guarding the exact manifest that fails Claude Code's schema at load.
Assert the real structure instead — SessionStart mapping to a single
command handler that runs snapshot.sh — so a manifest that would never
load cannot pass the gate again.
Claude-Session: https://claude.ai/code/session_01PyjLYz2GFRVgYS3nAtUoXm
…-version-sync fix(plugin): correct hooks.json schema and sync plugin.json version
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6 to 7. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v6...v7) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Author
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
dependabot
Bot
deleted the
dependabot/github_actions/main/actions/setup-node-7
branch
September 14, 2026 17:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps actions/setup-node from 6 to 7.
Release notes
Sourced from actions/setup-node's releases.
... (truncated)
Commits
8207627Migrate to ESM and upgrade dependencies (#1574)04be95cAdd cache-primary-key and cache-matched-key as outputs (#1577)7c2c68ddocs: Update caching recommendations to mitigate cache poisoning risks (#1567)6a61c03Merge pull request #1569 from jasongin/update-actions-cache-5.1.030eb73bResolve high-severity audit issues4e1a87aUpdate dist360237fStrict equality4f8aac5Bump@actions/cacheto 5.1.0, log cache write deniedf4a67bbOnly usemirrorTokeningetManifestif it's provided (#1548)0355742Remove dummy NODE_AUTH_TOKEN export (#1558)You can trigger a rebase of this PR by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)