Skip to content

Integrate csb with dz claude-session-metadata catalog #10

@djdarcy

Description

@djdarcy

Integrate csb with dz claude-session-metadata catalog

Context

Recuva recovery of the 654 missing jsonls (Jan 23 - Apr 2 gap) failed -- SSD TRIM wiped deleted sectors. However, dz claude-session-metadata (formerly claude-lost-sessions) has built a structured catalog at ~/claude/lost-sessions/ with 156 lost session entries. Each entry contains:

  • summary.md -- UUID, start/end times, duration, command counts, tools used, first/last commands
  • known-docs/ -- symlinks to authored/edited markdown docs from that session's timeframe
  • folders-worked-on/ -- symlinks to project directories the session touched
  • sesslog@ -- symlink to the original sesslog folder

This data is recoverable from sesslogs + private/claude/ folders even when the transcript.jsonl is gone. See design analysis at 2026-04-08__07-41-13__full-context-sessions-and-csb-integration.md in the dazzlecmd project.

Brainstorms / Quick Todos

1. csb show <id> enrichment

When showing a session, check if ~/claude/lost-sessions/<timestamp>__*__<uuid-prefix>/ exists. If so, display:

  • [LOST] marker at top
  • Known-docs count + clickable paths
  • Folders-worked-on count
  • Link to the catalog summary.md

For live sessions, check ~/claude/live-sessions-test/ (or wherever the future full-sessions/ catalog lives).

2. csb list lost/live markers

Add [LOST] / [LIVE] flags next to session names when the catalog has an entry. Could be a column or inline tag:

1. CHROME-PLUGIN__jump-to-my-reply  [LIVE+CATALOG]  today (2026-04-10)
2. cc-hooks-names-and-logging  [LOST+CATALOG]  2026-01-24
3. (some session)  [LIVE] (no catalog entry yet)

3. csb catalog <id> -- explicit catalog view

New subcommand that renders the catalog summary.md with rich formatting. Could open in browser or display in terminal with rich markdown.

4. csb catalog --build -- trigger metadata tool

Wrapper that invokes dz claude-session-metadata --all --apply from csb. Convenient if a user doesn't have dz on PATH or doesn't know about the separate tool.

5. Catalog path configuration

Add config keys for catalog paths:

{
  "catalog_paths": {
    "lost": "~/claude/lost-sessions",
    "live": "~/claude/full-sessions"
  }
}

This way the integration is loosely coupled -- csb reads from wherever the catalog lives.

6. csb resume <id> catalog awareness

Before resuming, check if the session has a catalog entry with known-docs. If so, print them so the user has context:

Resuming: cc-hooks-names-and-logging
  Known docs from this session:
    - 2026-01-29__03-27-06__full-postmortem_claude-session-logger-initial-release.md
    - 2026-01-29__14-46-10__bidirectional-project-sesslog-linking.md
  Folders worked on:
    - C:\code\claude-projects\claude-session-logger\github
    - C:\code\claude-projects\claude-session-logger\local
  claude --resume 833a100e-d959-47aa-9db2-d22fdb6d7659

7. SQLite index of catalog data

For fast csb search across known-docs/folders, we could index the catalog data into the csb SQLite DB. New tables:

  • catalog_entries (session_id, catalog_path, has_transcript, built_at)
  • known_docs (session_id, doc_path, exists)
  • catalog_folders (session_id, folder_path, exists)

Then csb search "plugin architecture" could hit both session names AND authored docs from those sessions.

8. Archaeological view -- cross-session doc traversal

Given that known-docs symlinks exist, we can trace "which sessions created/edited this doc?":

csb doc-sessions "2026-01-29__03-27-06__full-postmortem_claude-session-logger-initial-release.md"
> cc-hooks-names-and-logging (833a100e) [LOST] -- created
> (some other session) (47961256) [LIVE] -- edited

Priority ordering (rough)

# Feature Effort Value
5 Config for catalog paths Low Foundation for all others
1 csb show enrichment Low High (immediate visibility)
2 csb list [LOST]/[LIVE] markers Low High (at-a-glance status)
6 csb resume context print Low Medium (resume UX)
3 csb catalog <id> Medium Medium
4 csb catalog --build wrapper Low Low (dz already works)
7 SQLite catalog index High High (enables fast search)
8 csb doc-sessions Medium Niche but powerful

Prerequisites

  • Merge Phase 1 of design doc: dz claude-session-metadata --all flag for unified lost+live catalog
  • Decide on final catalog path (~/claude/sessions/ unified? or lost-sessions/ + full-sessions/?)
  • Agree on catalog filename format (currently YYYY-MM-DD__HH-MM__NAME__UUID-PREFIX/)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions