Expand description
Agent instruction file management (upsert, skill install, hooks).
Agent instruction file management for seshat init.
Writes and maintains Seshat usage instructions in AI agent config files (AGENTS.md, CLAUDE.md), installs the Seshat skill file, and registers Claude Code hooks — all idempotently using HTML comment markers.
Enums§
- Hooks
Result - Outcome of
install_hooks_claude_code. - Skill
Result - Outcome of
install_skill. - Upsert
Result - Outcome of an
upsert_instructionscall.
Constants§
- AGENTS_
MD_ CONTENT - Compact instructions for AGENTS.md / CLAUDE.md.
Contains idempotency markers
<!-- seshat:start -->/<!-- seshat:end -->. - HOOK_
PRE_ TOOL - Soft PreToolUse hook — one nudge per session before Grep/Glob/Read (exit 0).
- HOOK_
SESSION_ START - Soft SessionStart hook — prints a reminder at session start (exit 0).
- SKILL_
MD_ CONTENT - Full reference skill for on-demand loading by Claude Code / OpenCode.
Functions§
- claude_
home - Resolve the Claude home directory (
~/.claude). - install_
hooks_ claude_ code - Install Seshat hooks for Claude Code and register them in
settings.json. - install_
skill - Install the Seshat skill file into an agent’s skills directory.
- opencode_
config_ dir - Resolve the OpenCode global config directory.
- upsert_
instructions - Write or update the Seshat instruction section in an agent instruction file.
- write_
backup_ for_ settings - Write a timestamped backup of settings.json for hook installation.