state.sh used SESSION_FILE for session.json (global tracking data).
Both hook handlers override SESSION_FILE to sessions/<pgrp>.json for
per-session isolation. buddymon_session_reset() at session-stop end
was writing _version:1 data INTO sessions/<pgrp>.json, leaving stale
wrong-format session files that broke buddy lookup.
Fix: rename state.sh variable to SESSION_DATA_FILE — no more collision.
Also:
- Add matcher:'*' to SessionStart and Stop hooks (CC 2.x compatibility)
- Add dead-session GC to session-start.sh (cleans up orphaned PGRP files)
- Add 5 new privacy/security bug_monsters:
LeakWraith (uncommon) — exposed credentials
CipherNull (uncommon) — weak/broken crypto (MD5, ECB, rand() for secrets)
ConsentShadow (rare) — tracking/analytics without consent (CF flagship villain)
ThrottleDemon (common) — ignored 429s and missing backoff
PrivacyLich (legendary) — GDPR/CCPA/breach debt; unkillable, only containable
Bash PostToolUse additionalContext is silently dropped by CC — encounters
are written to state but never surfaced. Fix with a two-phase approach:
- PostToolUse (Bash): detects error, writes encounter with announced:false
- UserPromptSubmit: fires on next user message, checks for unannounced
encounter, surfaces it once, marks announced:true so dedup loop breaks
Removes debug scaffolding and the format_encounter_message call from the
Bash hook (announcement is now fully owned by user-prompt-submit.py).
- plugin.json: flatten repository to string, remove extra fields that
failed CC schema validation (caused 'Unknown skill' on reload)
- hooks.json: remove escaped quotes from command paths (matched hookify
reference implementation)
- install.sh: register 'local' marketplace in known_marketplaces.json
so CC doesn't GC the cache symlink on /reload-plugins
Claude Code plugin — collectible creatures discovered through coding.
- Bug monsters spawn from error output (NullWraith, RacePhantom, ShadowBit, 11 total)
- 5 Buddymon with affinities, challenges, and evolution chains
- SessionStart hook injects active buddy + challenge into system context
- PostToolUse hook detects error patterns, new languages, and commit events
- Stop hook tallies XP and checks challenge completion
- Single /buddymon command with start/assign/fight/catch/roster subcommands
- Local state in ~/.claude/buddymon/ (roster, encounters, active, session)