Git Workflow
Use native Git for ordinary UTF-8 repository work. Invoke Encoding Guard only when command output or a path crosses a real unknown/legacy encoding boundary.
Classify the repository
- Resolve the repository root and read its applicable
AGENTS.mdfiles. - Honor an explicit
Repository Ownershipclassification there first. - Otherwise run
scripts/repository_registry.py lookup --repo ROOTthrough conda envcodex. Use Encoding Guard only if an actual encoding boundary corrupts the output. - If the result is unknown, ask whether the repository is
first-partyorthird-party. Do not infer ownership from its path or remote. - Record the answer with
scripts/repository_registry.py remember --repo ROOT --classification VALUE.
Read repository-classification.md when resolving an override, changed remote, or registry conflict.
Commit a completed stage
- Inspect status, diff, staged diff, recent commit style, and applicable repository instructions.
- Confirm the current stage is complete and the relevant validation actually passed. A waiver or skipped check is not a pass.
- Continue only for a known
first-partyrepository. - Stage only files and hunks owned by the current task. Preserve unrelated and pre-existing worktree changes.
- Reinspect the staged diff and run the repository's required pre-commit checks.
- Create one local commit describing the logical unit in the repository's established style.
- Verify the resulting commit and remaining worktree state.
Do not commit when work is incomplete, validation failed, the user declined, ownership is unknown or third-party, or relevant changes cannot be separated safely. Never push unless the user explicitly asks.