Cjm Harness Transcripts banner
cj-mills cj-mills

Cjm Harness Transcripts

Development community

Description

Parse agent-harness session transcripts (Claude Code JSONL first): the append-only record DAG, derived active path, user-facing prose extraction both sides, and transcript-to-session-key mapping. Pure-parse, zero deps.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

cjm-harness-transcripts

Harness-transcript extraction library: reads Claude Code session transcripts (JSONL DAGs), walks the active path, and extracts the user-facing prose — assistant markdown bodies, cleaned user prompts, and curated tool-parameter prose (e.g. SendUserFile captions) — as ExtractedMessages ready to mint onto a context-graph session spine.

Modules

  • cjm_harness_transcripts — cjm-harness-transcripts: parse agent-harness session transcripts (Claude Code
  • cjm_harness_transcripts.extract — User-facing prose extraction — both sides, one truth.
  • cjm_harness_transcripts.mapping — Transcript ↔ session-key mapping, derived at pull time.
  • cjm_harness_transcripts.records — The transcript record layer: tolerant JSONL loading + the append-only DAG.

API

`cjm_harness_transcripts.extract`

  • ExtractedMessage class — One user-facing message off the active path, ready to become a Message node.
  • clean_user_text function — Strip harness wrapper blocks from a user prompt; collapse the scar tissue.
  • extract_messages function — The active path's user-facing messages, chronological.

`cjm_harness_transcripts.mapping`

  • BootInfo class — The first user prose of a transcript — the mapping's evidence.
  • TranscriptMatch class — One ranked candidate pairing for a session key.
  • find_transcripts_for_key function — All plausible transcripts for a session key, best first.
  • parse_record_timestamp function — A transcript record timestamp (ISO-8601, trailing Z) as an aware datetime.
  • parse_session_key function — A session key (local start timestamp, e.g. 2026-08-20_17-05-20) as an aware datetime.
  • read_boot_info function — The transcript's first user record bearing prose, or None (empty/tool-only file).

`cjm_harness_transcripts.records`

-