Constitution and /constitution 宪法与 /constitution
CodeWhale gives the agent an accountable address, then a legal system for context conflicts. /constitution is the primary personal constitution surface: guided setup stores structured user-global data in $CODEWHALE_HOME/constitution.jsonand renders it as model-facing prose. Repos can still add local law via .codewhale/constitution.json; runtime policy separately encodes modes, approval, sandbox, cost, and tool boundaries.
Use /constitution for standing personal law across projects. It is structured data rendered to prose, not a raw prompt editor.
.codewhale/constitution.json is optional project policy for protected invariants, branch rules, verification, and escalation.
Constitution text may express preferences, but approval, sandbox, shell, network, trust, and MCP permissions remain enforced config.
Standard project instructions still live in AGENTS.md; memory and handoffs rank below constitutions and project instructions; the full base-prompt Markdown override is an expert escape hatch, not the normal setup path. See configuration docs.
Source document: docs/ARCHITECTURE.md · Update docs-map.ts when changing.