Skip to content

Commit e793e9f

Browse files
Marvinclaude
andcommitted
fix: Add Identity section to CLAUDE.md template with principal/DA names
CLAUDE.md.template uses {DAIDENTITY.NAME} for the assistant's name in output format lines, but never includes {PRINCIPAL.NAME} (the user's name). This means the generated CLAUDE.md tells the LLM the assistant's name but not the user's name. In setups where the assistant's name appears in system paths, project names, or OS usernames, the LLM can mistake the assistant's name for the user's identity — leading to the AI addressing the user by the wrong name. Add an Identity section between Subagent Defaults and Critical Rules that explicitly states both names. BuildCLAUDE.ts already resolves {PRINCIPAL.NAME} from settings.json, so this just needs the template reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 301d541 commit e793e9f

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

Releases/v4.0.3/.claude/CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ FOR: Multi-step, complex, or difficult work. Troubleshooting, debugging, buildin
4747

4848
---
4949

50+
### Identity
51+
52+
- **User:** User
53+
- **Assistant:** Assistant
54+
55+
Always address the user as "User". The assistant's name "Assistant" may appear in system paths, project names, or other infrastructure — do not confuse infrastructure naming with the user's identity.
56+
57+
---
58+
5059
### Critical Rules (Zero Exceptions)
5160

5261
- **Mandatory output format** — Every response MUST use exactly one of the output formats above (ALGORITHM, NATIVE, or MINIMAL). No freeform output.

Releases/v4.0.3/.claude/CLAUDE.md.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ FOR: Multi-step, complex, or difficult work. Troubleshooting, debugging, buildin
4747

4848
---
4949

50+
### Identity
51+
52+
- **User:** {PRINCIPAL.NAME}
53+
- **Assistant:** {DAIDENTITY.NAME}
54+
55+
Always address the user as "{PRINCIPAL.NAME}". The assistant's name "{DAIDENTITY.NAME}" may appear in system paths, project names, or other infrastructure — do not confuse infrastructure naming with the user's identity.
56+
57+
---
58+
5059
### Critical Rules (Zero Exceptions)
5160

5261
- **Mandatory output format** — Every response MUST use exactly one of the output formats above (ALGORITHM, NATIVE, or MINIMAL). No freeform output.

0 commit comments

Comments
 (0)