Claude tools
Python utilities under claude/tools/. Each page documents every function/method with parameters, an execution-flow diagram, and the full source.
File helpers
| Tool | Purpose |
|---|---|
| file_count | Print a file's line count |
| file_read | Read a file with offset/limit windowing |
| file_edit | Create/edit files with git checkpoints and diffs |
| file_grep | Search file/directory contents |
| context_parser | Parse context.md for session carryover state |
Session management
| Tool | Purpose |
|---|---|
| session_cli | session command dispatcher (18 handlers) |
| session_start | Session-start document generator |
| session_close | Session-close renderer (Jinja2) |
| statusline_session | Statusline session summary |
session/ package
| Module | Purpose |
|---|---|
| session-session | SessionController — lifecycle, goals, handoff, strict end |
| session-models | All dataclasses (sessions, goals, portfolio) |
| session-context | ContextFileManager durability layer |
| session-archive | SessionArchiver history store |
| session-carryover | WorkCarryoverManager deferred-work list |
| session-facts | FactGenerator — Prolog facts from project state |
| session-handover | HandoverManager handoff assembly |
| session-portfolio | PortfolioController multi-project state |
| session-prolog_interface | Prolog query interface over session facts |
| session-exceptions | Session exception hierarchy |
Audit / sync
| Tool | Purpose |
|---|---|
| kg_sync_jsonl | Incremental JSONL → knowledge-graph sync |
| test_block | One-line probe script |
| test_tools | unittest suite for the file helpers |
Call pattern
Back to Claude configuration.