- Keep each root command file, such as
code,c, orvn, as a thin entrypoint. - Put command implementations in
lib/<command>without an-implsuffix. - Give every function its own extensionless file in the relevant
lib/<command>directory. - Use clear, descriptive names for functions and their files.
- Prefer small functions that each represent a complete logical responsibility.
- Add subdirectories below
lib/<command>only when they make a larger implementation easier to navigate.
- Keep the repository architecture guide at
docs/architecture.md. - Keep a concise
readme.mdin eachlib/<command>directory as a guide to its responsibilities and key files. - Read the relevant
lib/<command>/readme.mdbefore changing that implementation. - Update the local readme when a command's structure or responsibilities change.
- Read
init/AGENTS.mdbefore changinginit/.zshrcor related bootstrap files. - Do not add manual
sourcesteps for command or implementation files;tbrloads extensionless files automatically during shell startup.