Conventions
Code style
- Use
serdederive for all data types - Use
anyhowfor application errors,thiserrorfor domain errors - Use
toml_editfor format-preserving TOML edits (add-label) - Use
std::process::Commandfor git operations (notgit2) - Use
regex+once_cell::Lazyfor compiled regex patterns - Keep sync, draft, mailbox, contact logic in separate modules
Instruction files
AGENTS.mdis canonical (committed).CLAUDE.mdis a symlink.- Personal overrides:
CLAUDE.local.md/AGENTS.local.md(gitignored). - Each module directory can contain its own
AGENTS.mdwith package-specific conventions. - Keep the root
AGENTS.mdfocused on cross-cutting concerns. - Actionable over informational. Instruction files contain the minimum needed to generate correct code. Reference material belongs in
README.md. - Update with the code. When a change affects patterns, conventions, or module boundaries, update instruction files as part of the same change.
- Combined root + package files should stay well under 1000 lines.
Version management
- Never bump versions automatically — the user will bump versions explicitly.
- Commits that include a version change should include the version number in the commit message.
- Use
BREAKING CHANGE:prefix in VERSIONS.md entries for incompatible changes. - Update
SPEC.mdwhen corky functionality changes (commands, formats, algorithms).
Workflow
Follow a research → plan → implement cycle:
- Research — Read the relevant code deeply. Document findings in
research.md. - Plan — Write a detailed implementation plan in
plan.md. - Todo — Produce a granular todo list from the approved plan.
- Implement — Execute the plan. Run
make checkcontinuously. - Precommit — Run
make precommitandcorky audit-docsbefore committing.