diff --git a/.config/pi/agent/AGENTS.md b/.config/pi/agent/AGENTS.md index 78d6a1d..ad018d8 100644 --- a/.config/pi/agent/AGENTS.md +++ b/.config/pi/agent/AGENTS.md @@ -1,20 +1,37 @@ -# Git instructions +# Instructions + +## Git and versioning - Adhere to https://www.conventionalcommits.org for commit messages -- Maintain a `CHANGELOG.md` file adhering to https://keepachangelog.com and try - to map the conventional commit messages to the respective sections of keep a - changelog -- When creating branches, prefix them with "pi-" +- Maintain a `CHANGELOG.md` adhering to https://keepachangelog.com, mapping + conventional commit types to the appropriate Keep a Changelog sections. + Update the `Unreleased` section as work happens, not only at release time. +- Version releases with https://semver.org +- For branches that Pi creates, prefix them with `pi-`. Branches I create + myself are not subject to this rule. -# Test instructions +# Testing -- Write tests in the natural tooling for the used programming language -- When doing HTTP tests, use Cypress +- Write tests using the natural/idiomatic tooling for the language in use +- When doing HTTP E2E tests, use Cypress -# Style instructions +## Tooling + +- When doing fresh Node code, use pnpm instead of npm. Use what's there on + existing code bases + +## Code style -- Avoid emojis in code outputs unless it adds significant visual help - Use `NOTE:`, `FIXME:`, `XXX:` markers in comments where beneficial -- Never use emojis in Markdown files +- Prefer early returns and guard clauses over nested conditionals +- Add comments where intent or trade-offs are not obvious from the code + itself. Do not narrate what the code plainly does +- For code, target 80 characters per line and accept up to 120 when it improves + readability. Do not spend effort shortening lines that are reasonable as-is +- Avoid emojis in code outputs unless they add significant visual value. + +## Documentation style + - Keep line length to 80 characters in Markdown files, but do not split URLs or - code fragments (variable/function names etc.). + code fragments (variable/function names) +- Never use emojis in Markdown files diff --git a/.config/pi/agent/APPEND_SYSTEM.md b/.config/pi/agent/APPEND_SYSTEM.md index e81d63d..b9c1bde 100644 --- a/.config/pi/agent/APPEND_SYSTEM.md +++ b/.config/pi/agent/APPEND_SYSTEM.md @@ -1,4 +1,24 @@ -Additional preferences: +# Workflow -- If something is potentially dangerous, mention it by prefixing it with "[DANGER] [DANGER] [DANGER] " -- When doing Node code, use pnpm instead of npm +- Always present a plan before making changes +- After editing code, proactively run the project's tests, linter, and + typechecker. Report failures; do not silently retry more than once +- When unsure between two reasonable approaches, ask me. Do not pick silently +- Push back when you think I am wrong. Ask for my reasoning or context before + complying with requests that look mistaken + +# Communication + +- Match reply length and depth to the complexity of the question. +- When making non-obvious claims or decisions, append a confidence tag: + `[confidence: high]` or `[confidence: low]`. + Use `[confidence: low]` whenever you are guessing or extrapolating +- If something is potentially dangerous, prefix it with "[DANGER!] " + +# Git + +- Never run git operations (commit, push, branch, merge, rebase, tag, reset, + checkout that changes state) on your own. You may ask permission to run a + specific git command; wait for my explicit yes +- Reading git state (`git status`, `git log`, `git diff`, `git show`) is fine + without asking