You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: home/dot_agents/AGENTS.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,14 @@ These rules apply to every coding session, across every project.
8
8
9
9
These constraints are unconditional. Apply them without being asked.
10
10
11
-
-**No em dashes.** Use commas, colons, or restructure the sentence. Never generate `—`, `---`, or `—`.
12
-
-**Never guess schemas or APIs.** Read the authoritative source first: Go structs, official docs, or the project's own examples. Blog posts and AI-generated examples are not acceptable. To inspect repo source, `git clone` first and read locally; never `curl` GitHub API endpoints or fetch raw URLs, even when docs don't render.
11
+
-**No em dashes.** Use commas, colons, or restructure the sentence. Never generate inline `—` or `—` as punctuation. (Markdown horizontal rules — `---` alone on a line — are fine.)
12
+
-**Never guess schemas or APIs.** Read the authoritative source first: Go structs, official docs, or the project's own examples. Blog posts and AI-generated examples are not acceptable.
13
+
-**Clone, don't curl.** To inspect repo source, `git clone` first and read locally. Never `curl` GitHub API endpoints or fetch raw URLs, even when docs don't render.
13
14
-**All Python through mise.** Never invoke `python`, `pip`, `uv`, or `uvx` directly. Use `mise x -- <command>` for all Python toolchain work.
14
15
-**Never accept a limitation without investigating.** Keep working until the problem is actually solved. Suggesting workarounds as a final answer is not acceptable.
15
16
-**Deliver the answer, not instructions to derive it.** When the user asks you to find, fetch, or compute a specific value, produce the value. Do not respond with a snippet for them to run, a formula to apply, or "tell me which one and I'll convert it" when you have the tools to do the lookup yourself. The user delegated the work; punting it back defeats the purpose.
16
17
-**Don't say "Docker containers."** Docker is a brand name, not a container type. Write "containers" or "OCI images" in prose. Action references like `docker/login-action` are fine as-is.
17
-
-**Never commit secrets.** No API keys, tokens, `.env` files, credentials, or private keys in any repo. If staged accidentally, unstage and remove from history before pushing.
18
+
-**Never commit secrets.** No API keys, tokens, `.env` files, credentials, or private keys in any repo. If staged accidentally, unstage and remove from history before pushing. If already pushed, rotate the secret immediately; force-push history rewrite only with explicit user confirmation.
18
19
-**Never log PII.** No email, phone, name, address, or payment data in logs, traces, or monitoring payloads.
19
20
20
21
---
@@ -27,11 +28,9 @@ After every non-trivial task, run a retrospective before closing out.
27
28
28
29
## Memory
29
30
30
-
Global memory is `~/.agents/AGENTS.md` (source: `~/.local/share/chezmoi/home/dot_agents/AGENTS.md`).
31
+
Global memory is `~/.agents/AGENTS.md`. Edit the chezmoi source at `~/.local/share/chezmoi/home/dot_agents/AGENTS.md`, not the deployed file.
31
32
Local memory is the `AGENTS.md` in the current project root (or nearest ancestor).
32
33
33
-
Never edit `~/.agents/AGENTS.md` directly; it is chezmoi-managed.
34
-
35
34
For rules specific to the chezmoi dotfiles repo itself, the target is `~/.local/share/chezmoi/AGENTS.md`.
36
35
37
36
When updating any memory file: review nearby rules for contradictions, duplication, and scope conflicts; reconcile in the same edit. Keep cross-cutting rules in global memory; keep project-specific rules in local memory.
@@ -44,7 +43,10 @@ When updating any memory file: review nearby rules for contradictions, duplicati
44
43
- Commit message format: `type(scope): description`. Types: `feat`, `fix`, `chore`. Check `git log --oneline` to match repo style.
45
44
- After any branch switch (including `gh pr checkout`), verify with `git branch --show-current`. If `gh pr checkout` fails or lands on the wrong branch, use `git checkout <branch>` directly.
46
45
- A stale `.git/index.lock` blocks all git operations. Remove it with `rm -f .git/index.lock` before retrying the blocked command.
47
-
-**Worktree context.** When the cwd is inside a Claude Code worktree (e.g. `.claude/worktrees/<id>`), git and gh commands act on the worktree branch. The main repo's working tree may be locked by another agent; do not `git checkout` or `gh pr checkout` against it. To pull a PR branch, materialize it into a new worktree: `git -C /path/to/main-repo fetch origin <branch> && git -C /path/to/main-repo worktree add <path> origin/<branch>`. Use `git -C <path>` for all subsequent commands, and confirm the active branch with `git -C <path> branch --show-current` before reading or editing files.
46
+
-**Worktree context.**
47
+
- When the cwd is inside a Claude Code worktree (e.g. `.claude/worktrees/<id>`), git and gh commands act on the worktree branch. The main repo's working tree may be locked by another agent; do not `git checkout` or `gh pr checkout` against it.
48
+
- To pull a PR branch, materialize it into a new worktree: `git -C /path/to/main-repo fetch origin <branch> && git -C /path/to/main-repo worktree add <path> origin/<branch>`.
49
+
- Use `git -C <path>` for all subsequent commands. Confirm the active branch with `git -C <path> branch --show-current` before reading or editing files.
48
50
-**Cloning for tag comparison.**`--depth=1 --no-single-branch` does not fetch tags. When you need to compare specific tags, either clone without `--depth`, or run `git fetch --tags` after the shallow clone.
49
51
-**Inspecting a PR's diff.** Always diff the remote PR branch against `origin/main` (e.g. `git diff origin/main...origin/<pr-branch>`), not local HEAD. Local HEAD may be on an unrelated branch, so a diff against it is meaningless and returns empty output without any error.
50
52
@@ -64,4 +66,4 @@ When updating any memory file: review nearby rules for contradictions, duplicati
64
66
## Toolchain
65
67
66
68
- When a CLI can be managed by `mise`, run it through `mise x -- <command>`. Do not invoke managed tools directly.
67
-
- When entering a new worktree that has a `mise.toml`, run `mise trust <worktree-path>/mise.toml` before any `mise x --` call. Otherwise every mise invocation fails with `Config files in <path> are not trusted`.
69
+
- When entering a new worktree that has a `mise.toml` or `.mise.toml`, run `mise trust <worktree-path>/{mise,.mise}.toml` (or the specific file present) before any `mise x --` call. Otherwise every mise invocation fails with `Config files in <path> are not trusted`.
0 commit comments