All notable changes to punkgo-jack will be documented in this file.
The format is loosely based on Keep a Changelog.
- Codex CLI recording. jack now records the full input/output of Codex CLI
sessions by parsing its rollout files (
$CODEX_HOME/sessions/**/rollout-*.jsonl).punkgo-jack reindex --source codexbackfills every local session;setup codexinstalls hooks (SessionStart,Stop) that rescan the active session for freshness. Codex runs only trusted hooks, so after setup a one-time/hooks→ trust step inside Codex is required before live recording starts. Verified across 410 real rollouts.- Content capture — a Codex turn's input/output/tool text is stored in the content-addressed blob store (SHA-256, deduped) and referenced by hash; metadata + hashes live in jack.db, bodies in the blob store.
- Secret redaction (secret-zero). Captured bodies are scrubbed before
storage: provider token shapes (OpenAI/Anthropic/GitHub/AWS/Google/Slack/JWT),
PEM private-key blocks,
scheme://user:pass@hostcredentials,Bearer/Basictokens, sensitiveKEY=valueassignments, and live environment secret values. - Kernel receipts (E1). Each Codex turn also emits a kernel
observeevent (Merkle/TSA receipt), extending the "every AI action gets a receipt" thesis to Codex. Emitted via a durable outbox (idempotent across reindex).
[capture]config (config-over-code): per-source capture policy. Defaultcodex = "full",claude-code/cursormetadata-only. Override in~/.punkgo/config.tomlor viaPUNKGO_CAPTURE_<SOURCE>.- jack.db v2 schema:
turn_contenttable (per content block) +turns.source. Forward-only migration; legacy DBs upgrade in place. - MCP surface:
turn_detailreturns captured content (bodies, when present); the existingsession_listsourcefilter now also selectscodexsessions;hidden_tokensreports Codex reasoning analytics (block count + opaque byte size). - Claude Code hooks: 4 new human-in-the-loop events (
PermissionRequest,Elicitation,ElicitationResult,MessageDisplay) — 15 → 19 hooks — plus payload enrichment (effort,prompt_id,permission_mode,agent_id,agent_type, SessionStartmodel).
- Source-neutral write core: Claude Code and Codex feed one shared
write_normalized_turnpath (no forked indexer). Claude Code behavior is unchanged (metadata-only).
roastcommand and all personality-diagnosis code. The built-inpunkgo-jack roastfeature (16 dog-breed personality cards, SVG/PNG card rendering, meme radar) is gone. jack now focuses solely on cryptographic receipts and transcript recording. The hosted quiz continues at roast.punkgo.ai.- Dropped dependencies:
resvg,usvg,tiny-skia— and theroast-pngcargo feature, which was the default.defaultis now empty, shrinking the binary and the dependency tree. - Deleted code:
src/roast/(analysis, config, render, embedded assets) and the now-unuseddata_fetchhelpersfetch_checkpoint,event_type,event_target. - Deleted assets:
assets/dogs/(16 PNGs),assets/roast-hero.png,assets/roast-grid-16.png, and local roast design artifacts underdesign/.
- Dropped dependencies:
- Reindex report matches DB exactly — three-layer dedup (Rust HashSet + INSERT OR IGNORE + final SELECT COUNT) ensures
turns upsertedalways equals the actual row count. Fixes report inflation from parent↔subagent turn overlaps.
Accuracy and correctness fixes for the transcript indexer. Recommended upgrade from 0.6.0.
- Reindex report now matches reality —
turns_upsertedshows actual DB rows, not attempted writes.--sessionand--sincereport only the sessions you asked for, not the whole table. - Subagent turns indexed on hook fire —
subagent_stopnow scans the subagent's own transcript file instead of the parent's. No more waiting for a full reindex to pick up subagent turns. reindex --sessionfinds subagent files — previously only matched the parent file by name and missed allagent-*.jsonlfiles in the session's subdirectory.- Stable turn ordering across merged files — parent and subagent turns within the same session no longer collide on sort order.
reindex --dry-runis truly read-only — no longer createsjack.dbas a side effect.- Prompt metadata cleaned up — large prompts stored once (blob), not twice (raw + blob). Export shows full prompts for claude-code events instead of truncating to 200 bytes.
The Transcript Archaeologist. Jack learns to read Claude Code's local transcript archive and build a searchable index of every turn, every thinking signature, every redacted token.
punkgo-jack reindexCLI — backfill from~/.claude/projects/*.jsonl. Flags:--full,--since,--session,--dry-run. 389 files / 39 sessions / 44,949 turns indexed in 6.4 seconds on the dev machine.- jack.db — new SQLite index at
~/.punkgo/state/jack/jack.db, separate from kernel. Tables:sessions,turns,thinking_signatures,pending_scans. Rollback = delete the file. - 6 new MCP tools —
punkgo_session_list,punkgo_session_detail,punkgo_turn_detail,punkgo_hidden_tokens,punkgo_model_variants,punkgo_reindex. - 5 new Claude Code hooks — InstructionsLoaded, PreCompact, PostCompact, StopFailure, PermissionDenied. Hook count 10 → 15. Cursor filters all 5 automatically.
- Transcript scanner (
src/transcript/) — streaming jsonl reader, metadata-only output, stable byte-offset turn ordering. - Signature parser (
src/signature/) — extracts model variant strings from thinking block signatures. Detected variants:numbat-v6-efforts-10-20-40-ab-prod,claude-opus-4-6,claude-haiku-4-5-20251001. 99.4% hit rate on real data. - Three indexer recovery paths — hook-triggered incremental, full backfill, startup reconciliation with durable
pending_scansqueue. externalize_or_inlineblob helper — routes large adapter content to blob store (> 4 KB). Env override:PUNKGO_MAX_INLINE_BYTES.
- Silent truncation removed —
last_assistant_message(500 bytes), user prompt (200 bytes), and Bash command display (200 bytes) no longer truncated. Full content preserved via blob store. - Subagent session merge — subagent jsonl files now correctly fold into their parent session instead of creating orphan session rows.
- Fork-safe turn upsert — forked sessions no longer steal turns from the original session. First-write-wins on
turn_uuidacross sessions.
meta["last_assistant_message"]is now{"inline": "..."}or{"blob_hash": ...}instead of a bare string.turns.turn_orderis now the canonical jsonl byte offset (stable across incremental and full reindex paths).sessions_upsertedin reindex reports reflects unique parent sessions (39), not file count (389).
rusqlite 0.32(bundled),regex 1,once_cell 1added as dependencies.- 298 unit tests, 20-session independent oracle cross-check on real data.
- Dead fallback code in signature parser removed (proven unreachable for current regex family).
punkgo-jack roastcommand — AI personality diagnosis based on your coding session data- Analysis engine — personality typing, RPG stat generation (six meme-named axes: Yapping/Googling/Grinding/Shipping/Tunnel Vision/Plot Armor), worst-moment extraction
- 16 MBTI dog breed personalities — config-driven via
roast_config.toml, each with breed name, catchphrase, quips, and background color - 103 quip templates — randomized meme sentences per personality type
- SVG card rendering — Personality Card (400x520) and Vibe Card (400x320) with dog image embedding, radar chart, CSS animations
- PNG export —
--png/--svgdirect file output viaresvgwith inline styles for compatibility - JSON output —
--jsonflag for programmatic consumption - Time range filters —
--today,--week,--monthsession scoping roast helpsubcommand — usage guide- Shared
data_fetchmodule — extracted fromexport.rsfor reuse across roast and export commands - 16 dog images —
assets/dogs/dog-{name}.png, compiled viainclude_bytes!
- Strip BOM prefix in CTA text for natural English ("the" prefix removal)
- PNG rendering: inline styles for
resvgcompatibility (external CSS not supported) - Session exit tips removed —
CONOUT$//dev/ttyunreliable with async hooks
- Fix setup hang on macOS —
punkgo-kerneldhas no--versionflag; calling it started a full daemon that never exits, hangingpunkgo-jack setup(macOS advisory flock doesn't prevent duplicate daemons). Removedcheck_kernel_version()andparse_major_minor()entirely. IPC protocol (punkgo-core) ensures wire compatibility.
- 10 hook events — added Stop, SubagentStart, SubagentStop, Notification (Claude Code 6→10, Cursor 6→9)
- Claude Code adapter: extract
last_assistant_message,agent_type,notification_type - Cursor adapter: extract
status,loop_count,modified_files,tool_call_count cursor_default_response: allowsubagentStartpermission- README: Dual-Tool Coexistence section (Third-party Skills handling)
- Cursor BOM metadata loss — Windows UTF-8 BOM (
\xEF\xBB\xBF) in stdin caused all Cursor event metadata to be silently dropped since v0.4.1. Fixed withstrip_prefix('\u{FEFF}')before JSON parse.
- Semantic TSA rate limit — replaced clock-based rate limit with
tree_sizecheck. Anchor when tree grows, skip when unchanged, force re-anchor if TSR file lost. Removed dead code:rate_limit_path,check_clock_rate_limit,now_epoch_secs.
- TSA anchoring on by default — free DigiCert public service, rate-limited to once per 5 minutes
- Setup: print survey link (
punkgo.ai/why) after successful setup - Setup: check kernel version compatibility, warn if outdated
- README: "Why I built this" section with ICP positioning, simplified Quick Start to two commands
install.sh: platform-aware install dir (~/.punkgo/bin/on Windows), PATH detection + guidance, skipchmod +xon Windows,mkdir -pbefore install
- RFC 3161 TSA anchoring —
punkgo-jack anchorcommand submits Merkle checkpoint root hash to a timestamp authority (default: DigiCert). Proves "this checkpoint existed before time T" - TSA response validation — full RFC 3161 parsing via
x509-tsp: PKIStatus check, hash cross-verification, genTime extraction verify-tsrcommand — standalone TSA token verification:punkgo-jack verify-tsr <tree_size>- TSA status in
verify— Merkle verification now automatically shows TSA anchor status when a TSR file exists - TSA status in
receipt— session receipts show anchor timestamp, searches for nearest covering checkpoint ~/.punkgo/config.toml— first configuration file for jack. TSA is opt-in:[tsa] enabled = true- Configuration layer model — env vars override config file override defaults (
PUNKGO_TSA_ENABLED,PUNKGO_TSA_URL, etc.) - Rate limiting — configurable minimum interval between TSA submissions (default: 5 min, set to 0 for CI)
- Session crash recovery —
anchor --stale-onlyregistered on SessionStart hook catches un-anchored checkpoints from crashed sessions - Hook multi-command support — SessionEnd and SessionStart hooks now register both
ingestandanchorcommands - DigiCert TSR fixture test — end-to-end validation with a real RFC 3161 response from DigiCert TSA
- Added:
ureqv2 (sync HTTP),tomlv0.8,x509-tspv0.1,cmsv0.2,derv0.7,spkiv0.7,const-oidv0.9 - Updated:
punkgo-core0.4.0 → 0.5.0
- All query commands (presence, history, export) default to showing all agents when
--actoris not specified try_seed_actornow uses per-actor purpose field instead of hardcoded "claude-code-adapter"setup cursormessaging: informs user that duplicates are auto-detected (no manual action needed)
- Cursor IDE support:
punkgo-jack setup cursor/unsetup cursor - Dedicated
CursorAdapterwith Cursor-specific tool name mapping (Shell,Delete), metadata enrichment (cursor_version,model,user_email,duration_ms,workspace), andconversation_idnormalization - Automatic source detection:
--actor cursorvs--actor claude-codein presence/history/export - Cursor-compatible hook responses per event type (
permission,continue) CURSOR_VERSIONenv var detection for zero-overhead skip of claude-code hooks in Cursor environment- Empty stdin resilience for Cursor session events
hook_events()now accepts source parameter for per-tool hook commands--quietmode outputs typed JSON responses (Cursor requirement)--summaryomitted for Cursor hooks (Cursor treats stderr as error)- Presence footer simplified: removed "ask Claude" prompt
- Help text updated with cursor support
- Submit errors now spill to spillover before returning (no data loss)
- Error propagation from
run_innercaught by wrapper (always exit 0 with valid JSON)
- IPC endpoint discovery: jack now reads
~/.punkgo/state/daemon.addrinstead of using a hardcoded address - Removed
kill_stale_daemon()— daemon lifecycle managed by kernel's flock-based locking - Falls back to legacy endpoint for backward compatibility with older kernels
- After daemon auto-start, re-reads
daemon.addrto pick up the new per-PID endpoint
- Stale socket/pipe issues after daemon crash on all platforms
Energy model fix and daemon lifecycle improvements.
- Fixed energy starvation bug: agents were starved by root's dominant
energy_share(floor()rounded to 0) - Energy distribution now targets agents only — humans (including root) get one-time initial balance
- Default actor seed:
energy_balance100,000 (was 10,000),energy_share50.0 (was 0.1) - Session summary energy display: fixed field name mismatch (
"balance"→"energy_balance"), removed stale hardcoded initial balance
kill_stale_daemon(): auto-kills leftover daemon processes before starting a new one- Windows IPC endpoint changed to file-path pipe (
\\.\pipe\punkgo-kernel) — fixes "Access Denied" withGenericNamespaced - Session start energy check (
check_energy_level): warns if actor energy is critically low
- Zero migration: existing databases work automatically (SQL filters by
actor_type = 'agent') - Requires punkgo-kernel ≥ 0.3.0
Release readiness — cross-platform fixes, blob store, energy model, dependency diet.
- Rust edition changed from
"2024"(invalid) to"2021"(stable) rebuild-auditcommand now requires--features rebuild-audit(removes sqlx from default build)
- Large tool_input fields (>1KB) externalized to
~/.punkgo/blobs/<sha256> - Metadata stores only hash reference (
sha256:...), keeping event log compact - Content-addressed dedup: same file content = one blob
- Graceful fallback to inline storage on blob store failure
- Two-layer cost model:
total_cost = action_cost + append_cost - Action cost: observe=0, create=10, mutate=15, execute=25+output/256
- Append cost (universal):
1 + payload_bytes/1024— reflects Landauer principle - Blob store reduces append cost by shrinking payload (economic incentive alignment)
- CLI commands (
history,presence) accept--actor <ID>flag - Default actor resolution: CLI flag > session state > query all actors
report,receipt, MCPsession_receiptuse session actor_id automatically- Removes 5 hardcoded
actor_id: "claude-code"from read-side queries - Adapter identity (
claude-code) correctly preserved on write side
- Statusline daemon detection:
pgrep(Unix) withtasklist(Windows) fallback - Previously Windows-only (
tasklist), now works on macOS/Linux - Deduplicated
home_dir()— single implementation insession.rs
- Spillover file capped at 10MB — events silently dropped with warning above cap
- Error messages now include actionable guidance ("Is punkgo-kerneld running?")
- Added Cargo.toml metadata:
description,license,repository,homepage,keywords,categories - README: accurate tagline, "What Gets Recorded" table, energy model section
IMPROVEMENTS.mdmoved todocs/internal/(not user-facing)sqlxmoved to optionalrebuild-auditfeature (3.7MB binary without it)- CLI help:
flushandrebuild-auditlisted in Commands section (was misplaced)
- 81 tests with
--features rebuild-audit, 78 without (audit_rebuild gated)
End-to-end session receipt system — sessions, history CLI, spillover resilience.
- Client-side session lifecycle:
start_session(),current_session(),increment_event_count(),end_session() - Session state persisted to
~/.punkgo/current_session.jsonacross process boundaries - Session ID (UUID) attached to all tool event metadata
- Session receipt summary printed to stderr on SessionEnd (
--summaryflag)
punkgo-jack history— tabular event listing with--limit,--todayfilterspunkgo-jack show <EVENT_ID>— full event detail with Merkle inclusion proof verificationpunkgo-jack receipt [SESSION_ID]— session receipt with consistency proof verificationpunkgo-jack flush— replay spillover events to daemon
- Added
PreToolUsehook — observe-only, records intent before tool execution - Added
UserPromptSubmithook — records user prompts asuser_promptevents - Now 6 hooks total (was 4): PreToolUse, PostToolUse, PostToolUseFailure, UserPromptSubmit, SessionStart, SessionEnd
- Configurable response capture via
PUNKGO_CAPTURE_RESPONSEenv var (full/summary/none) - New ingest flags:
--receipt(one-line receipt to stderr),--summary(session summary on end)
- New tool:
punkgo_session_receipt— session summary with event distribution and Merkle verification - Now 7 MCP tools total (was 6)
- Events saved to
~/.punkgo/spillover.jsonlwhen daemon is unreachable punkgo-jack flushreplays spillover events when daemon is back- Ingest never blocks Claude Code — returns exit 0 even on daemon failure
- Actor creation enhanced:
actor_type,purpose,energy_sharefields, energy bumped to 10000 - Hook registration expanded to 6 hooks (added PreToolUse, UserPromptSubmit)
- SessionEnd hook now includes
--summaryflag
- 58 tests (was 34): +8 session, +4 history, +4 spillover, +5 adapter, +2 MCP tools, +1 ingest
Initial release as punkgo-jack — local MCP adapter and hook ingest bridge for punkgo-kernel.
- MCP stdio server via
rmcp(JSON-RPC 2.0, protocol version 2024-11-05) DaemonBackend: IPC-based backend connecting topunkgo-kerneldvia Unix socket / Windows named pipe- Endpoint discovery:
--endpointflag >PUNKGO_DAEMON_ENDPOINTenv > platform default - 6 MCP tools:
punkgo_ping— connectivity and backend health checkpunkgo_log— record a human-friendly audit note (facade over kernelsubmit_observe)punkgo_query— query recent events with local filtering (actor, action_type, keyword, time range)punkgo_verify— Merkle inclusion proof (bylog_indexorevent_id) and consistency proofpunkgo_stats— kernel total count + sampled derived stats (action_type / actor / day buckets)punkgo_checkpoint— latest C2SP-format checkpoint from the kernel audit log
- Reads hook JSON from stdin, transforms via adapter, submits to kernel via IPC
- Claude Code adapter: 11 tool type mappings (Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, Task, mcp__*, fallback)
- Schema:
punkgo-jack-ingest-v1 - Supports
--dry-run,--quiet,--event-typeoverride,--endpointoverride - Exit code strategy: 0 success, 1 failure (never 2, to avoid blocking Claude Code)
punkgo-jack setup claude-code— auto-inject hooks into~/.claude/settings.json- PostToolUse, PostToolUseFailure, SessionStart, SessionEnd
- Merge strategy preserves existing user hooks; idempotent
punkgo-jack unsetup claude-code— remove punkgo hooks, preserve other config- Auto-seeds actor on setup (best-effort, daemon may not be running)
punkgo-corev0.2.3 (protocol types with Serialize/Deserialize)punkgo-runtimev0.2.3 (dev-dependencies only, forEmbeddedBackendin tests)rmcp0.16,interprocess2.4,uuid1,chrono0.4