rt-claw Precommit
Prepare one focused, signed commit. Never stage unrelated local changes silently.
Workflow
- Inspect branch and status:
git status -sbgit diff --statgit diff --cached --stat
- Confirm which files belong to the commit when the worktree is mixed.
- Review staged content:
git diff --cached
- Check for hardcoded credentials:
- API keys, app IDs, tokens, passwords, private URLs, and local secrets
sdkconfigand local config files that should remain ignored
- Run required checks:
scripts/check-patch.sh --stagedmake check-agent-skillswhen.agents/changed- at least one relevant build or test target for the changed area
- Commit with the repository convention:
- subject format:
subsystem: description - include
Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com> - do not include AI or Claude co-author lines
- subject format:
Validation Choices
| Change area | Narrow validation |
|---|---|
| docs or agent guidance | scripts/check-patch.sh --staged if source files are staged; otherwise manual diff review |
.agents/ |
make check-agent-skills |
shared claw/ or include/ |
make build-linux and relevant unit tests |
| OSAL | build affected backend and at least one shared target |
| platform | platform-specific build target |
| tests | run the changed or narrowest affected test |
Rules
- Do not use
git add -Awhen unrelated changes are present. - Do not commit build artifacts from
build/. - Do not commit changes under
vendor/. - Do not skip failed checks without reporting why.