ZCode should treat ~/.zcode/AGENTS.md as the user's default instruction file and merge it with the workspace AGENTS.md resolved for the current session.
workingDirectory upward until the detected project root, or filesystem root when no project root is detected.~/.zcode/AGENTS.md.HOME resolves the user directory first. On Windows-style environments, USERPROFILE is used when HOME is absent. If neither is set, Node's homedir() is used.priorityFiles includes AGENTS.md. Custom priority sets that omit AGENTS.md must not load ~/.zcode/AGENTS.md.When both sources exist, ZCode injects both in this order:
~/.zcode/AGENTS.md.AGENTS.md.Workspace instructions appear later so they can narrow or override broad user defaults for work inside the repository.
Each loaded source is rendered as its own labeled block under the request-level # agentsMd section:
Contents of <path> (user default instructions):Contents of <path> (workspace instructions):The combined block is still request-level meta user context and continues to precede # currentDate.
# agentsMd names the aggregated request-user-context
field rather than a specific source file. It is rendered exactly once whenever that field contains
at least one non-empty source. A non-empty Project Memory index therefore also renders the title,
even when no AGENTS.md source is loaded.
ResolvedUserInstructions keeps its historical single-source fields for compatibility, while also exposing a sources array for multi-source rendering. Existing callers that only inspect filePath or content continue to receive a deterministic primary path and merged content.