From 041dbc08a7c706f8b6522631c6c01c268781f2ab Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 16 Feb 2026 17:57:45 -0800 Subject: [PATCH] udpate --- .claude/AGENTS.md | 12 ++++++++++++ .config/opencode/AGENTS.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .claude/AGENTS.md create mode 100644 .config/opencode/AGENTS.md diff --git a/.claude/AGENTS.md b/.claude/AGENTS.md new file mode 100644 index 0000000..d2ac168 --- /dev/null +++ b/.claude/AGENTS.md @@ -0,0 +1,12 @@ +- Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting. +- **Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user.** Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval. +- NEVER edit `.env` or any environment variable files—only the user may change them. +- Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees. +- Moving/renaming and restoring files is allowed. +- ABSOLUTELY NEVER run destructive git operations (e.g., `git reset --hard`, `rm`, `git checkout`/`git restore` to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat these commands as catastrophic; if you are even slightly unsure, stop and ask before touching them. _(When working within Cursor or Codex Web, these git limitations do not apply; use the tooling's capabilities as needed.)_ +- Never use `git restore` (or similar commands) to revert files you didn't author—coordinate with other agents instead so their in-progress work stays intact. +- Always double-check git status before any commit +- Keep commits atomic: commit only the files you touched and list each path explicitly. For tracked files run `git commit -m "" -- path/to/file1 path/to/file2`. For brand-new files, use the one-liner `git restore --staged :/ && git add "path/to/file1" "path/to/file2" && git commit -m "" -- path/to/file1 path/to/file2`. +- Quote any git paths containing brackets or parentheses (e.g., `src/app/[candidate]/**`) when staging or committing so the shell does not treat them as globs or subshells. +- When running `git rebase`, avoid opening editors—export `GIT_EDITOR=:` and `GIT_SEQUENCE_EDITOR=:` (or pass `--no-edit`) so the default messages are used automatically. +- Never amend commits unless you have explicit written approval in the task thread. diff --git a/.config/opencode/AGENTS.md b/.config/opencode/AGENTS.md new file mode 100644 index 0000000..d2ac168 --- /dev/null +++ b/.config/opencode/AGENTS.md @@ -0,0 +1,12 @@ +- Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting. +- **Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user.** Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval. +- NEVER edit `.env` or any environment variable files—only the user may change them. +- Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees. +- Moving/renaming and restoring files is allowed. +- ABSOLUTELY NEVER run destructive git operations (e.g., `git reset --hard`, `rm`, `git checkout`/`git restore` to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat these commands as catastrophic; if you are even slightly unsure, stop and ask before touching them. _(When working within Cursor or Codex Web, these git limitations do not apply; use the tooling's capabilities as needed.)_ +- Never use `git restore` (or similar commands) to revert files you didn't author—coordinate with other agents instead so their in-progress work stays intact. +- Always double-check git status before any commit +- Keep commits atomic: commit only the files you touched and list each path explicitly. For tracked files run `git commit -m "" -- path/to/file1 path/to/file2`. For brand-new files, use the one-liner `git restore --staged :/ && git add "path/to/file1" "path/to/file2" && git commit -m "" -- path/to/file1 path/to/file2`. +- Quote any git paths containing brackets or parentheses (e.g., `src/app/[candidate]/**`) when staging or committing so the shell does not treat them as globs or subshells. +- When running `git rebase`, avoid opening editors—export `GIT_EDITOR=:` and `GIT_SEQUENCE_EDITOR=:` (or pass `--no-edit`) so the default messages are used automatically. +- Never amend commits unless you have explicit written approval in the task thread.