Summary
The embedded AGENTS.md (compiled into the assembly, per-audience) standardizes NetClaw's core operating/safety/grounding rules — great for consistency and benchmarking. But there is no user-editable counterpart for deployment-specific operating guidance. Add support for a disk ~/.netclaw/identity/AGENTS.md that layers on top of the embedded operating rules and is inherited by sub-agents.
The gap
An operator needs per-deployment operating guidance that is (a) editable without recompiling, (b) present on every turn, and (c) inherited by sub-agents. Today the only user-editable, every-turn identity files are SOUL.md and TOOLING.md — and neither reaches sub-agents:
SubAgentSpawner.ResolveOperatingRules (~SubAgentSpawner.cs:337-341): sub-agents inherit the embedded AGENTS operating rules from the parent "…without exposing personal identity layers (SOUL.md, TOOLING.md)."
- So the AGENTS layer is the only identity layer sub-agents receive, and it is currently embedded-only — an operator has no way to add guidance that binds sub-agents.
This matters because fan-out sub-agents do real outward-facing work (e.g. composing customer-facing content), so deployment-specific etiquette/house-rules must constrain them too — but there's no user-editable place those rules can live and reach the sub-agents.
Current implementation
ISystemPromptProvider.GetSystemPrompt (ISystemPromptProvider.cs:187-210): soul from disk, tooling from disk, but agents from the embedded resource (CachedAgents / CachedAgentsPublic); projectInstructions from the project dir.
ISystemPromptProvider.GetOperatingRules(audience) (ISystemPromptProvider.cs:28-33): returns the embedded AGENTS operating rules; consumed by sub-agents via SubAgentSpawner.ResolveOperatingRules → SubAgentActor.BuildSystemPrompt (SubAgentActor.cs:1333, layer 1).
NetclawPaths.AgentsPath (NetclawPaths.cs:21) already defines ~/.netclaw/identity/AGENTS.md, but nothing reads it.
Proposal
- Read the disk
AgentsPath and append it after the embedded operating rules — embedded first, so the standardized/safety core stays authoritative and cannot be weakened by the user layer; the disk file is purely additive deployment guidance.
- Do the compose in a shared helper used by both the
agents assembly in GetSystemPrompt and GetOperatingRules(audience), so the user layer reaches main sessions and sub-agents through the single existing seam (no separate wiring for sub-agents).
- Missing file → silently skipped, consistent with
SOUL.md/TOOLING.md.
- Audience handling: layer for Team/Personal; for Public, suppress the disk layer by default (or support an explicit
AGENTS.public.md disk variant) to avoid leaking internal operating guidance to a public audience.
- Apply the same placeholder substitution to the disk layer as the embedded content, for consistency.
Non-goals / notes
- The embedded AGENTS.md remains the authoritative safety/grounding core; the disk layer is additive and must not be able to relax it.
- Per-entity data/facts still belong in live tools, not this file — this is for durable operating guidance, not data.
Anchors: ISystemPromptProvider.cs:28-33,187-210 · NetclawPaths.cs:21 · SubAgentSpawner.cs:337-341 · SubAgentActor.cs:1333
Summary
The embedded
AGENTS.md(compiled into the assembly, per-audience) standardizes NetClaw's core operating/safety/grounding rules — great for consistency and benchmarking. But there is no user-editable counterpart for deployment-specific operating guidance. Add support for a disk~/.netclaw/identity/AGENTS.mdthat layers on top of the embedded operating rules and is inherited by sub-agents.The gap
An operator needs per-deployment operating guidance that is (a) editable without recompiling, (b) present on every turn, and (c) inherited by sub-agents. Today the only user-editable, every-turn identity files are
SOUL.mdandTOOLING.md— and neither reaches sub-agents:SubAgentSpawner.ResolveOperatingRules(~SubAgentSpawner.cs:337-341): sub-agents inherit the embedded AGENTS operating rules from the parent "…without exposing personal identity layers (SOUL.md, TOOLING.md)."This matters because fan-out sub-agents do real outward-facing work (e.g. composing customer-facing content), so deployment-specific etiquette/house-rules must constrain them too — but there's no user-editable place those rules can live and reach the sub-agents.
Current implementation
ISystemPromptProvider.GetSystemPrompt(ISystemPromptProvider.cs:187-210):soulfrom disk,toolingfrom disk, butagentsfrom the embedded resource (CachedAgents/CachedAgentsPublic);projectInstructionsfrom the project dir.ISystemPromptProvider.GetOperatingRules(audience)(ISystemPromptProvider.cs:28-33): returns the embedded AGENTS operating rules; consumed by sub-agents viaSubAgentSpawner.ResolveOperatingRules→SubAgentActor.BuildSystemPrompt(SubAgentActor.cs:1333, layer 1).NetclawPaths.AgentsPath(NetclawPaths.cs:21) already defines~/.netclaw/identity/AGENTS.md, but nothing reads it.Proposal
AgentsPathand append it after the embedded operating rules — embedded first, so the standardized/safety core stays authoritative and cannot be weakened by the user layer; the disk file is purely additive deployment guidance.agentsassembly inGetSystemPromptandGetOperatingRules(audience), so the user layer reaches main sessions and sub-agents through the single existing seam (no separate wiring for sub-agents).SOUL.md/TOOLING.md.AGENTS.public.mddisk variant) to avoid leaking internal operating guidance to a public audience.Non-goals / notes
Anchors:
ISystemPromptProvider.cs:28-33,187-210·NetclawPaths.cs:21·SubAgentSpawner.cs:337-341·SubAgentActor.cs:1333