Commit graph

10 commits

Author SHA1 Message Date
faab47afbd feat(01-01): restructure personas with pipeline workflow
- default: generic helpful assistant
- homelab: infrastructure management (was default)
- brainstorm: creative ideation → produces BRAINSTORM.md with
  vision, MVP, v1.0, v2.0 feature sets
- planner: takes BRAINSTORM.md → produces PRD, BRD, SoW
- research: unchanged

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:13:21 +00:00
3fec4ed848 fix(01-01): update persona models to claude-sonnet-4-5-20250929
Plans hardcoded an outdated model. Updated all 4 personas to Sonnet 4.5.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:06:08 +00:00
a27ac010ec feat(01-03): add /archive command to compress and remove sessions
Archives session directory with tar+pigz to sessions_archive/,
terminates any running subprocess first, clears active session if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:01:14 +00:00
3cc97adcd0 fix(01-03): don't treat SIGTERM as crash, fix async callbacks in crash handler
- Only auto-restart on positive exit codes (genuine crashes), not negative
  return codes (signals like SIGTERM from our own process management)
- Add iscoroutinefunction check for on_error in crash handler max-retry path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:58:27 +00:00
d08f3527cd fix(01-03): fix import collision between local telegram/ and pip package
The telegram/ directory's __init__.py shadowed the python-telegram-bot pip
package. Remove __init__.py and use direct sibling imports instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:57:22 +00:00
3a62e01f6f feat(01-03): wire session manager and Claude subprocess into Telegram bot
- Add /new and /session commands to create and switch sessions
- Route plain text messages to active session's Claude subprocess
- Auto-spawn subprocess when switching to session with no process
- Update help text with session commands
- Handle async callbacks in ClaudeSubprocess (inspect.iscoroutinefunction)
- Preserve all existing bot commands (/status, /pbs, etc.)
- Use block=False for non-blocking message handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:40:43 +00:00
8fce10c5ba feat(01-02): create ClaudeSubprocess module for process management
- Spawns Claude Code CLI with stream-json output in session directories
- Reads stdout/stderr concurrently via asyncio.gather (no pipe deadlock)
- Handles process lifecycle with clean termination (no zombies)
- Queues messages during processing using asyncio.Queue
- Auto-restarts on crash with --continue flag (max 3 retries)
- Parses stream-json events (assistant, result, system) to callbacks
- Supports persona configuration (system_prompt, model, max_turns)
- Uses terminate() + wait_for() + kill() fallback pattern

Based on research: .planning/phases/01-session-process-foundation/01-RESEARCH.md
2026-02-04 17:33:49 +00:00
ba8acf00b3 feat(01-01): create persona library with default templates
- Four persona templates: default, brainstorm, planner, research
- JSON schema: name, description, system_prompt, settings
- Each persona has distinct system_prompt for different modes
- Settings include model and max_turns configuration
- Fix SessionManager paths to use homelab directory
2026-02-04 17:33:16 +00:00
447855ceec feat(01-01): create SessionManager module
- SessionManager class with session lifecycle management
- Session CRUD: create, list, switch, get, update
- Session validation: alphanumeric, hyphens, underscores only
- Persona inheritance from library on session creation
- Session status tracking: idle, active, suspended
- Metadata persistence with JSON on disk
- Active session tracking and switching logic
2026-02-04 17:32:16 +00:00
c50c348004 Add Telegram bot and shared storage documentation
- Telegram bot (@georgsen_homelab_bot) for two-way communication
  - Commands: /status, /pbs, /backups, /beszel, /kuma, /ping
  - Photos and files saved to inbox for Claude to read
  - Runs as systemd user service
- Shared storage via ZFS bind mounts
  - rpool/shared/mikkel on PVE host
  - Mounted to ~/stuff in mgmt, dev, general containers
  - SMB access via \\mgmt\stuff (Tailscale MagicDNS)
- Updated helper scripts list in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 14:21:51 +00:00