Chezmoi Management
chezmoi-managed files (including the global AGENTS.md) have one fact owner: the source file in the chezmoi source directory. Editing the runtime copy directly creates a competing owner.
The synchronization and repository steps below are mandatory managed-file closure, not optional general self-review. They remain required when this skill applies even when implementation-only defaults suppress ordinary validation.
Use when
Use when a change touches a chezmoi-managed file (e.g. .codex/AGENTS.md), or when you need to locate how a managed runtime file is sourced. For read-only source-location requests, do not apply, commit, or push.
Method
- Edit the source. Locate the managed path under the source root (e.g.
.codex/AGENTS.md→dot_codex/AGENTS.md) and edit the source file only. - Apply to the runtime copy. Run
chezmoi applyso the runtime copy is regenerated from the source. Non-interactive runs may block on the prompt "…has changed since chezmoi last wrote it?" — usechezmoi apply --forceto overwrite without prompting, and run from the destination directory with a destination-relative target (e.g.chezmoi apply --force -- .codex/AGENTS.md). - Verify no diff. Confirm the runtime copy matches the source (identical hashes) and
chezmoi managedagrees. - Commit and push. The source directory is its own git repository; commit and push the change there.
Success signal
The runtime copy was regenerated from the source, matches it exactly, and the source repository carries the committed change.