The beads sections come from live. The vault and dev-server text mirrors the global CLAUDE.md, replacing the older sysjournal-only section.
5.9 KiB
5.9 KiB
Global Codex Configuration
Tool Preferences
Search And Navigation
- Always use
rgovergrepfor code search. - Prefer narrow searches over broad sweeps.
- Use precise file globs and code-aware navigation when available.
- Prefer MCP tools when they provide better precision than shell commands.
Code Manipulation
- Read the relevant code before editing.
- Prefer structural understanding over blind text replacement.
- Make the smallest change that solves the problem.
- Do not rewrite surrounding code without a concrete reason.
Verification
- Every change needs verification.
- Verification can be tests, a build, a targeted command, or frontend validation with Playwright.
- For non-trivial work, state the verification method before implementing.
Language Patterns
Python
- Prefer
blackorruff formatfor formatting. - Prefer
rufffor linting. - Use type hints on public code.
- Prefer
pytest. - Check for
.venv/orvenv/before assuming interpreter paths.
Go
- Use
gofmt. - Prefer
go vetfor linting andgo test ./...for verification. - Check
go.modfor module structure. - Do not ignore errors with
_unless there is a defensible reason.
TypeScript
- Prefer
prettierandeslintwhen present. - Check
package.jsonfor the repo's actual test and build commands. - Check
tsconfig.jsonbefore changing compiler-sensitive code. - Prefer strict typing patterns.
Workflow Principles
Research First
Before changing unfamiliar code:
- Identify the relevant files and relationships.
- Understand the local pattern in that area.
- Check for similar implementations elsewhere.
- Look for tests that define expected behavior.
Plan Before Implement
For non-trivial work:
- State what is changing and why.
- Name the files or components likely to change.
- Define how the change will be verified.
- Note obvious risks or breakpoints.
Preserve Context
- Keep findings compressed and structured.
- Reuse existing project artifacts like
.claude/progress.md,PITFALLS.md, and projectCLAUDE.mdwhen they exist. - If a repo already uses
.claude/planning or checkpoint files, continue to respect them rather than inventing a second system.
Session Workflow
Starting A Session
- Check for
.claude/progress.mdand load it as prior context when present. - Read
PITFALLS.mdif present. - Read project instructions from
AGENTS.md. Codex is also configured to treat projectCLAUDE.mdas a fallback instruction file.
During Work
- Research unfamiliar areas before editing.
- Make plans for non-trivial work.
- Review changes before commit when risk is non-trivial.
Ending A Session
- If the repo uses
.claude/progress.md, update it when useful. - If there are uncommitted changes, leave the next session enough context to resume cleanly.
Shell
- Use zsh-compatible syntax when writing shell commands or scripts.
- Assume
~/.zshrccan affect shell behavior.
Anti-Patterns
- Do not search broadly and read dozens of files without narrowing scope.
- Do not change code before understanding the local pattern.
- Do not skip verification.
- Do not rewrite code that does not need to change.
- Do not add comments, docstrings, or annotations to untouched code without a clear reason.
Obsidian vaults
~/Documents/Obsidian-Work and ~/Documents/Obsidian-Personal are the user's
long-term memory. Both vaults carry their own instructions, and those are
authoritative. This file is per-machine and drifts; the vault copies sync.
- The
obsidian-notesskill owns the protocol —vaultandsysjournalusage, recall-before-answering, folder ownership, guardrails. If this agent has not loaded it, read~/Documents/Obsidian-Personal/Meta/skills/obsidian-notes/SKILL.md. - Each vault's
Meta/Note Conventions.mdowns its note rules, and they are deliberately different between the two. Read withvault conventions --vault <work|personal>before authoring anything substantial.
Two things to know without reading anything:
- Recall first.
vault search <terms>before answering from scratch about a work project or customer, the user's machines and home network, or anything they may have solved before. Terms are ANDed — 2–3 specific words. - Host/environment changes go to
sysjournal, nevervault. The skill's "Which tool" table draws the line and states the trigger.
~/Documents/Obsidian25 is the pre-split original. It is not yet frozen: a
VPS cron still writes _planning/, _agent/ and Health/Garmin/ there nightly.
Never hand-write anywhere in it, and treat those three folders as owned by their
programs in every vault.
Dev servers
- Always bind dev, desk and preview servers to
0.0.0.0, never127.0.0.1orlocalhost. The user views them from another machine. This applies to every server started for the user to look at, including test-harness servers. If the app refuses non-loopback Host headers, turn that check off for the dev run too (e.g. an-allow-lanflag). Report the URL with the host's LAN name or IP.
Beads (bd)
Some repos track execution work in beads. A repo is wired in when bd where succeeds there.
- In a wired repo, the session-start hook injects the workflow from
.beads/PRIME.md. If it is missing from context — after compaction, or in a harness without the hook — runbd prime. - Beads holds execution work: tasks, blockers, discovered follow-ups, handoff. Intent stays in
.design/when the repo has one; a bead never stands in for a plan. - Memory stays where it is: the harness memory and the Obsidian vaults. Never
bd remember. - Beads syncs itself: each write pushes to origin, and the session-start hook pulls first. Don't
run
bd dolt pushby hand unless a sync failure was reported. At handoff, say which beads changed. - To wire a repo in, run
~/code/agent-templates/beads/setup <repo>— never plainbd init, which rewritesAGENTS.mdand commits tool config.