Expand description
AGENTS.md generation and injection.
Provides marker-based section injection into AGENTS.md files.
Core logic uses pure &str → String functions for testability,
with a thin I/O wrapper for file operations.
Structs§
- Worktree
Assignment - Reads a file (or treats a missing file as empty), injects
section, and writes the result back. Per-worktree assignment context passed by the session launch flow.
Functions§
- build_
agent_ marker - Builds the agent marker file content with optional extended fields.
- build_
inter_ agent_ rules - Builds the standard inter-agent rules block that the supervisor injects
into every coding agent’s
AGENTS.md. - generate_
worktree_ section - Generates a marker-delimited assignment section for a worktree’s AGENTS.md.
- get_
agent_ marker_ path - Returns the path to the agent marker file for a given worktree.
- has_
git_ paw_ section - Returns
trueifcontentcontains a git-paw section start marker. - inject_
into_ content - Injects
sectionintocontent: appends if no git-paw section exists, replaces the existing one if present. - inject_
section_ into_ file - install_
git_ hooks - Installs git-paw’s
post-commitdispatcher andpre-pushblock hook. - remove_
git_ paw_ section - Removes the git-paw managed block (start marker through end marker,
inclusive — plus any blank lines immediately adjacent) from
content. - remove_
session_ boot_ block - Reads
path(treating a missing file as empty), removes any git-paw managed block, and writes the result back. Idempotent: a file with no markers is a no-op and the original content is preserved byte-for-byte. - replace_
git_ paw_ section - Replaces the git-paw section (start marker through end marker, inclusive)
with
new_section. If the end marker is missing, replaces from the start marker to EOF. - setup_
worktree_ agents_ md - Reads the root repo’s AGENTS.md, injects the worktree assignment section, writes the result to the worktree root, and protects it from being committed.
- update_
agent_ marker - Updates an existing agent marker file with additional fields.