17 Commits

Author SHA1 Message Date
Paul O'Reilly
2b3b4e2783 claude-sessions: skip profile dirs with no profile part 2026-10-27 16:57:48 +13:00
Paul O'Reilly
a9e425a29b claude-sessions: profile picker when creating a new session 2026-10-27 16:56:53 +13:00
Paul O'Reilly
d23778942d claude-sessions spawn: add --headless/--create for non-interactive use
Claude-Session: https://claude.ai/code/session_01JXneLTuvb5Gxim3DTN2tQa
2026-10-26 00:26:51 +13:00
Paul O'Reilly
c32ea467e4 claude-sessions: folder browser, unique topic, and location column in menu
Claude-Session: https://claude.ai/code/session_01JXneLTuvb5Gxim3DTN2tQa
2026-10-26 00:26:18 +13:00
Paul O'Reilly
11ee50e9c7 claude-sessions: default new session to cwd project, attach after new/resume
Claude-Session: https://claude.ai/code/session_01SCd4vYV3ig6CpcPV9PCsC6
2026-10-13 10:01:31 +13:00
Paul O'Reilly
53170c320e feat: add systemd service config and install script
config/systemd/user/claude-sessions-save.service: source of truth
for the shutdown service, version-controlled alongside the scripts
it calls.

scripts/install-systemd.sh: idempotent install script — copies the
service file to ~/.config/systemd/user/, reloads the daemon, and
enables + starts the service. Run on any new machine to wire up
graceful Claude session shutdown.
2026-10-12 16:11:18 +13:00
Paul O'Reilly
2335a73a02 feat: claude-sessions lifecycle manager + shutdown script
claude-sessions: session registry manager with subcommands:
  - list: live tmux sessions + resumable registry entries
  - recover: scan profile dirs for sessions active before restart
  - spawn/resume: start or resume sessions
  - register: called by claude-tmux to auto-populate registry
  - gc: prune stale entries and backfill session IDs from .jsonl
  - (no args): interactive numbered menu

claude-sessions-shutdown: called by systemd at halt/reboot;
  sends /exit-session to each Claude tmux session, waits up to
  90s for graceful exit, force-kills stragglers.

Symlinks: ~/sbin/claude-sessions, ~/sbin/claude-sessions-shutdown
2026-10-12 15:47:02 +13:00
Paul O'Reilly
de0c5ecf0a feat(status): mirror topic into tmux status bar
set-topic.sh now renames the tmux session to the project part of the
topic and stores the full topic in @claude_topic when run inside tmux.
Pairs with ~/.tmux.conf status-right showing #{@claude_topic}.

Claude-Session: https://claude.ai/code/session_01Xt2b3uQtakYGhH5Y653vwd
2026-09-09 11:54:18 +12:00
Paul O'Reilly
f41c22d0ac Add question-reframing guidance to CLAUDE.md; commit accumulated project files
- CLAUDE.md: add "Question the question" and "One clarifying question" rules
  to Tone and Interaction — XY problem detection, false premise checks, and
  explicit reframe pattern before answering
- Add claude/ detail-file directory (topic docs referenced from CLAUDE.md)
- Add ABOUT.md, FUTURE.md
- Update memory/, scripts/, settings.yaml with accumulated session changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 09:37:28 +12:00
Paul O'Reilly
6fd0dac218 Add transcript backup tracking system and pre-compact hook improvements
- pre-compact-backup.sh: derive transcript path from session_id+cwd (no
  longer relies on transcript_path field that Claude Code stopped providing);
  register each backup in tracking.json after saving
- extract-transcripts.py: new script managing tracking.json — register,
  list, extract conversation text, mark-processed modes
- list-transcripts-here.sh: thin wrapper for extract-transcripts --list
  using $(pwd); needed because SKILL.md bang commands reject $() substitution
- install-hooks.sh: now also symlinks skill-helper scripts into
  ~/.claude/scripts/ via a curated SKILL_HELPERS list
- Memory docs: new script-extract-transcripts.md, script-list-transcripts-here.md;
  updated skill-log.md, script-install-hooks.md, MEMORY.md index

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 14:06:09 +12:00
Paul O'Reilly
cace9600ca Migrate best practices to skynet/best-practices repo
Remove all best-practices topic files and .distill-state.json from
claude-foundations. BESTPRACTICES.md now redirects to the standalone
repo at ~/dev/claude/projects/best-practices/. Remove the now-unnecessary
sync-best-practices.sh script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:48:51 +13:00
agent-runtimes-bot
cc54064754 Reference skynet/best-practices repo, add sync script 2026-03-27 22:07:06 +00:00
Paul O'Reilly
e7c8214499 Add statusline scripts, context-load improvements, and prior distill updates
- Add statusline.sh and set-topic.sh for per-session status line topics
- Update context-load with improved directory walking and output format
- Update CLAUDE.md with status line docs and early-call safety note
- Update MEMORY.md and README.md with new script/skill entries
- Add memory files: script-statusline, skill-decompose, skill-orchestrate, gotchas-gitea
- Add networking.md best practice (nftables, systemd sockets, Docker forwarding, TLS)
- Update best practices from prior distill: documentation, kubernetes, scripting,
  secrets-management, skills-development
- Prune reflected session logs, add new session logs
- Update reflection state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:11:40 +13:00
Paul O'Reilly
c3557a3d97 Add formatters, hooks, memory entries and context-load improvements
- formatters/js, md, yaml: new/updated formatter scripts
- hooks/set-wezterm-profile.sh: new hook for WezTerm profile switching
- scripts/context-load: improvements from recent sessions
- HOOKS.md, MEMORY.md: updated documentation and index entries
- memory/log, memory/reference-infrastructure-docs.md: session logs and reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:54:49 +13:00
Paul O'Reilly
e94417b896 Add best practices, hooks, memory files, and scripts from recent sessions
Includes: spec-driven and test-driven development best practices,
reproduce-before-fixing debugging workflow, require-plan-file hook,
find-project-root script, session logs, memory files for decisions/
gotchas/process-lessons, and updates to existing best practice topics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 09:47:47 +13:00
Paul O'Reilly
d3a92326de Add composable multi-language linting and formatting system
PostToolUse hook auto-formats files after Edit/Write/MultiEdit with
git-blob checkpoints for safe revert. Pre-commit hook for staged files.
Canonical formatter scripts for py, sh, ts, sql, json (+ symlinks for
js, yaml, md). Install and setup scripts for project opt-in.

Includes best-practices/linting.md, HOOKS.md docs, README.md, and
session log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:50:36 +13:00
Paul O'Reilly
a463dc0793 Add context-load/start-claude scripts and clean up CLAUDE.md
context-load walks from cwd upward, loading CLAUDE.md, CONTEXT.md,
MEMORY.md, and BESTPRACTICES.md files with directory trees and git
status. start-claude wraps the claude CLI with --append-system-prompt.

CLAUDE.md: removed Ansible/Helm sections (in best-practices/), folded
Validate Before Deploying into Process Principles, deduped secrets
bullet, fixed best-practices path references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:49:40 +13:00