···2626 (e.g., when passing the method as a callback that needs `this` binding)
2727- use braces for control statements, even single-line bodies
2828- use bare blocks `{ }` to group related code and limit variable scope
2929+- prefer `switch` over `if`/`else if` chains when branching on a single discriminant value
2930- avoid barrel exports (index files that re-export from other modules); import directly from source
3031- use `// #region <name>` and `// #endregion` to denote regions when a file needs to contain a lot
3132 of code
···3839 it does error, prefer finding a solution that satisfies the type system naturally before resorting
3940 to an assertion
40414242+### commit workflow
4343+4444+we use conventional commits with these rules:
4545+4646+- accepted types: `feat`, `fix`, `refactor`, `docs`, `chore`
4747+ - docs
4848+ - Markdown document changes (README.md and similar)
4949+ - chore
5050+ - build/tooling/dependency changes
5151+ - test-only changes
5252+ - mass-autofixes from linters and formatters
5353+- no scopes; write `feat: ...` / `refactor: ...`, never `feat(runtime): ...`
5454+- append `!` after the type to mark breaking changes, e.g. `feat!:` or `refactor!:`
5555+5656+granularity — each commit should represent one logical change:
5757+5858+- split distinct changes into separate commits rather than bundling them
5959+- pair each README update with the commit it documents, rather than batching doc updates across
6060+ multiple changes
6161+4162### documentation
42634364- documentations include README, code comments, commit messages
···6384 pause and ask for clarification when you're still unsure after looking into it
6485- in plan mode, present the plan for review before exiting to allow for feedback or follow-up
6586 questions
6666-- when debugging problems, isolate the root cause first before attempting fixes; suggest adding
6767- logging and let the user reproduce and share the output, unless you can verify directly (e.g., by
6868- running tests or reading existing error output)
6969-7070-### Claude Code-specific
7171-7272-- Explore subagent may not be accurate; verify findings as needed
7373-- only spawn subagents when there is genuine independent work to parallelize (e.g. searching across
7474- many files, answering a question requiring broad exploration.) never use them as file I/O proxies
7575- — read files directly in the main context, and prefer direct tool calls when they suffice.
8787+- when debugging problems, isolate the root cause first before attempting fixes: add logging,
8888+ reproduce the issue, narrow down the scope, and confirm the exact source of the problem
8989+- exploration results done by subagents/subtasks may not be accurate; verify findings as needed
9090+- do not use subagents/subtasks as file I/O proxies ("read and return the file contents")