Layering contract
- Global config: personal defaults you want in every repo (model, shared agents, shared safety defaults).
- Project config: repository truth (stack facts, test/build rules, repo-local permissions, local tools).
- Rule of thumb: if a setting would surprise you in a different repo, keep it out of global config.
Strict boundary guidance
- Do not duplicate the same rule in both global and project scopes.
- Keep stable cross-repo behavior global; keep repo policy local.
- Prefer extending with project
knowledge_baseandinstructionsbefore overriding agent prompts.
Decide where config belongs
| Need | Use | Why |
|---|---|---|
| Short, stable repo facts | knowledge_base | Always injected, low maintenance |
| Longer evolving policy docs | instructions | Versioned in repo, easy to review |
| Reusable capability packs | skills | Portable behavior across repos |
| Runtime integrations/actions | custom tools (tools, MCP, tool/*.ts) | Executes actions, not prose guidance |
Strict memory pattern
Recommended project pattern:- Mutable memory file:
.zeroxzero/memory.md. - Stable facts: keep in
knowledge_base. - Default edit policy: deny edits to memory.
- Exception: allow only the plan agent (
agent.plan; or your custom planner) to edit memory.
Prompt override caution
agent.<name>.prompt fully replaces that agent prompt in the project. Use it only when you
intentionally want a prompt rewrite. For normal repo adaptation, prefer knowledge_base and
instructions.
Type-safe YAML workflow
- Add schema hints in YAML files.
- Let
yaml-language-servervalidate while editing. - Rely on runtime schema validation during config load.
- Verify merged result with
0x0 debug config.
Recommended templates
Global skeleton (~/.config/0x0/config.yaml):
./.0x0/config.yaml):