Universal entry point for agents working in this repo. Read this first.
Only document what an agent cannot quickly recover by reading the code. Code
is the source of truth for what the code does. Docs exist for where things
live (context/MAP.md) and why the tradeoffs were made (context/DECISIONS.md).
Everything else rots — do not write it.
- Never commit to
maindirectly. Always work on a branch and open a PR. - Never commit secrets.
EDGAR_IDENTITYandDISCORD_WEBHOOK_URLare supplied via environment / CI secrets, never hard-coded. - Never commit cache output.
sec-cache/,signal-sweep-cache/, andtranscript-cache/are regenerated on demand and are git-ignored. - Lint and format must pass before a PR (see
context/CONVENTIONS.md). CI runsruff check,ruff format --check, andmarkdownlint-cli2.
Do not read everything by default. Read on demand:
- Touching module structure or data flow → read
context/MAP.mdfirst. - Changing or re-litigating a tradeoff → read
context/DECISIONS.mdfirst. - Writing code → read
context/CONVENTIONS.md. - Starting any task → run
todo listfor open items, thentodo claimbefore execution so parallel sessions do not collide.
- Module added / moved / removed, or data flow changed → update
context/MAP.md. - Intentional tradeoff made → append to
context/DECISIONS.md(mandatory; this is the most-forgotten artifact). - New repeatable pattern or standard adopted → add to
context/CONVENTIONS.md. - User-facing behavior or usage changed → update
README.md.
- Changelog / worklog — that is git history.
- Feature or status lists — code already shows what exists.
- Restatements of what the code plainly does.
- Decisions with no real tradeoff.
A convention is one imperative line with no "because". The moment it needs a
"because", it is a decision — move the rationale to context/DECISIONS.md and let
the convention link to it.
The todo tool is stateful, not a scratchpad: todos are persisted under
.pi/todos with status, tags, body notes, subtasks, and claim/release
assignment. Keep active working context in the todo body while a task is live.
Closed/done todos are garbage-collected (default ~7 days after creation), so
when closing a todo that involved a real tradeoff, graduate the durable part
into context/DECISIONS.md first. Closing is not archiving.
A task is done only when the matching durable artifacts reflect the change. An unrecorded tradeoff means not done.