| name | repo-rules-reader |
| description | Read specified repo rule files (AGENTS.md, docs/REPO_STYLE.md, docs/PYTHON_STYLE.md, docs/PYTEST_STYLE.md, docs/CLAUDE_HOOK_USAGE_GUIDE.md, docs/CHANGELOG.md) and answer targeted repo-rule questions, with missing-file handling and explicit-path checks. For docs/CHANGELOG.md, report only the latest dated entry. Use when a prompt asks for repo instruction answers about code execution, pytest style, Claude hook usage, or recent changes. |
Read Repo Rules
Overview
Answer key repo-rule questions with enough context to be useful, while preserving missing-file stop
conditions.
Workflow
- Verify each requested file path exists using explicit paths only, such as
ls <paths> or
test -f. If any requested file is missing, output MISSING: <path> and stop.
- Read only the requested repo rule files. For the default repo-rule output, read:
AGENTS.md, docs/REPO_STYLE.md, docs/PYTHON_STYLE.md, docs/PYTEST_STYLE.md,
docs/CLAUDE_HOOK_USAGE_GUIDE.md, and docs/CHANGELOG.md.
- Read normal rule files with the Read tool, using
file_path and optional offset/limit
(e.g. Read(file_path=..., limit=200)). Do not use sed -n or head/tail on file paths;
the Claude hook denies those forms.
- For docs/CHANGELOG.md, identify the latest dated entry and read only that entry section, from
its heading to the line before the next dated heading or the end of file.
- Answer the prompt's exact questions when provided. When the prompt asks for the default
repo-rule output, answer these six questions:
- AGENTS.md: how should agents run repo-local Python code? Include
source source_me.sh && python3 when the file says so.
- docs/REPO_STYLE.md: what repo-wide workflow or file organization rule matters for the
current task?
- docs/PYTHON_STYLE.md: what Python implementation rule matters for the current task?
- docs/PYTEST_STYLE.md: what is considered a fragile pytest?
- docs/CLAUDE_HOOK_USAGE_GUIDE.md: how should Claude search or grep files?
- docs/CHANGELOG.md: what is the most recent change?
- Ground each answer in the file content. Keep answers concise unless more context is needed to
avoid ambiguity.
- Use the prompt's requested order and prefixes when provided, such as
AGENTS: ...,
REPO_STYLE: ..., PYTHON_STYLE: ..., PYTEST_STYLE: ...,
CLAUDE_HOOK_USAGE_GUIDE: ..., and CHANGELOG: ....
- When the prompt requests exact lines, exact prefixes, or no extra text, follow that format
exactly and do not add commentary.
- Use explicit requested paths for listings; avoid recursive listings such as
ls -R.