From 455cb53aa8d10e7f55c068f1cabbbf316dedeca9 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sun, 3 May 2026 02:52:27 -0700 Subject: [PATCH] docs: authorize autonomous commits and pushes for this project Standing authorization so any Claude Code instance commits work after each logical change (build+tests green) and pushes to the upstream branch, without waiting to be asked. Force-push and pushes to main from a feature branch still require explicit approval. --- CLAUDE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 4660df5..d960f8e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,3 +26,16 @@ Simple file-sharing platform. TypeScript + Fastify + SQLite. - Break large functions into smaller ones, extract duplicate code. - Search for duplicated code in tests and extract into reusable helpers. - Commit after every logical set of changes. Keep commits small and focused. + +## Autonomous Commits (Standing Authorization) + +Any Claude Code instance working on this project has standing authorization to commit work without asking. Apply this proactively, not when reminded. + +- After every logical set of changes that builds and tests cleanly (`npm run build && npm test`), create a commit immediately. Do not wait for the user to ask. +- Use Conventional Commits (`feat:`, `fix:`, `refactor:`, `docs:`, `test:`, `chore:`, `perf:`, `ci:`) with a concise subject. Add a body only when the *why* isn't obvious from the diff. +- One logical change per commit. If you touched multiple unrelated things, split into separate commits. +- After committing, also push to the tracked remote (`git push`) — standard `git push` to the current branch's upstream is authorized. **Never** force-push (`--force`, `--force-with-lease`) and **never** push to `main` from a feature branch directly without an explicit request. +- **Never** stage `.env`, `data/`, secrets, or anything matching a credential pattern. Prefer `git add ` over `git add -A`/`git add .`. +- If the build or tests fail, do **not** commit. Fix or revert, then either commit a working state or report the failure. +- Skip the commit if there are no changes (don't create empty commits). +- If you find yourself amending or rewriting prior commits, stop and ask first — autonomy covers new commits, not history rewrites.