Skip to content

Commit a1df159

Browse files
mono0xclaude
andcommitted
Align Codex git/gh guidance with the auto mode soft denies
Make the guidance route-agnostic (gh, the GitHub API, MCP tools, a browser), scope it to every repository including the user's own, and state that consent is per action. Name the history-rewriting and ref-deleting operations explicitly while marking plain `git rebase <upstream>` and `git pull --rebase` as ordinary work, and relax the flat `git commit --amend` ban to the carve-out the Claude classifier already applies: an unpushed commit created in the same session. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 69baf96 commit a1df159

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/dot_codex/AGENTS.md.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
- Always respond in Japanese. Keep code, commands, identifiers, and established technical terms in their original language.
22
- Prefer additive git/gh operations: a new commit or `git revert` over rewriting history, a comment over closing a PR or issue.
3-
- Do not run `git commit --amend`, force push, discard uncommitted work, or create PRs and issues unless the user asked for that specific action. Finishing a task is not such a request.
3+
- Ask before mutating GitHub state (merging, closing, or reopening PRs and issues; editing repo settings; deleting releases, tags, or runs) or publishing under the user's identity (PRs, comments, reviews, issues, releases) — in any repository, the user's own included, by any route: `gh`, the GitHub API (`gh api`, `curl`), MCP tools, or a browser. Any `gh api` call that is not a plain GET is such a mutation; read-only inspection needs no permission.
4+
- Consent is per action: a request for one PR does not authorize a later comment, review, or a second PR. Finishing a task is not a request to open a PR.
5+
- Do not force push (`--force`, `--force-with-lease`), delete branches, tags, or refs, rewrite history (`rebase -i`, `--onto`, `--root`, `filter-branch`, `filter-repo`, `reflog expire`), or discard uncommitted work unless the user asked for that specific operation. Plain `git rebase <upstream>` and `git pull --rebase` are ordinary work; `git commit --amend` is fine only for a commit you created this session and have not pushed.
46
{{ include "dot_claude/CLAUDE.md" -}}

0 commit comments

Comments
 (0)