Codewhale documentation

Find the guidance you need.

Start with installation and first run, or go straight to modes, permissions, tools, providers, Fleet, MCP, and the Runtime API. These pages are the product documentation; each one cites the source documents in the repository for full detail.

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.

User-global 用户全局

Use /constitution for standing personal law across projects. It is structured data rendered to prose, not a raw prompt editor.

Repo-local 仓库本地

.codewhale/constitution.json is optional project policy for protected invariants, branch rules, verification, and escalation.

Runtime 运行时

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.