Your layered approach is remarkably close to what we formalized in Soul Spec (soulspec.org) — an open standard for exactly this problem.
The mapping:
- Project-level context → SOUL.md (personality, principles)
- Team-specific constraints → AGENTS.md (behavioral rules, workflow)
- Role-specific prompts → IDENTITY.md (role definition, metadata)
- Package metadata → soul.json (versioning, dependencies — like package.json for personas)
We went through the same months of trial and error with a multi-agent system before landing on this structure. The fact that you arrived at the same layered pattern independently is strong validation.
What Soul Spec adds beyond the file structure:
- SoulScan: 53-pattern safety verification (prompt injection, boundary drift, permission escalation)
- Soul Rollback: Detects when agent behavior drifts from its declared persona
- Cross-platform: Same files work in Claude Code, Cursor, Windsurf, OpenClaw — no vendor lock-in
- Registry: 100+ shared personas at clawsouls.ai
On your question about structure complexity vs performance — we haven't done a formal study across repos, but our experience with 300+ memory files shows that separating identity (immutable) from experiential memory (mutable) is the single biggest factor in preventing persona drift over time.
If you're managing 14 team directories, Soul Spec could replace the ad-hoc CLAUDE.md format with something versionable and portable. Happy to discuss migration — it's literally a file rename in most cases.
Full spec: https://soulspec.org