- Read
README.mdbefore making changes. - Treat
README.mdas the single source of truth for architecture, module/file layout, build/run commands, test/validation workflows, and tool usage. - Do not duplicate architecture or workflow documentation in this file.
- If your changes affect structure, ownership/lifecycle flow, file locations, or developer workflow, update
README.mdin the same change.
- Language: C (C11-compatible style preferred).
- Indentation: 4 spaces, no tabs.
- Braces: Allman style for functions, control flow, and aggregate declarations.
- Naming:
snake_casefor functions/variables; choose descriptive file and symbol names. - Function names should start with a verb and clearly describe behavior.
- Keep functions small and purpose-driven; add comments only where logic is non-obvious.
- During refactors, moves, or renames, preserve existing comments when they remain accurate.
- If behavior, ownership, control flow, naming, or API contracts change, update or remove stale comments in the same change.
- For new/changed public declarations in headers, document purpose, behavior/contract, parameters, return value, and ownership/lifecycle expectations.
- Keep commits focused on one logical change.
- Use imperative, concise commit subjects.
- If changes are unrelated, split them into separate commits.
- After any UI-related code change, verify the visual result at the end of the task.
- Run
scripts/capture_app_window.shto capture the app window, then compare the captured image against the expected UI outcome before finishing. - Save validation screenshots to
/tmp(for example,/tmp/cui-check.png), not toassets/. - Treat these captures as ephemeral one-time checks and delete any accidental validation screenshots created under
assets/.