These are the hard rules to keep agent work predictable and safe in this repo.
- Read
CLAUDE.mdfirst, then followdocs/FEATURE_ARCHITECTURE_STANDARD.mdfor new medium and large features. - Use
pnpmfor project commands. Do not switch tonpmoryarn. - Use the desktop Electron app (
pnpm dev) for normal local development and smoke checks unless browser-mode internals are explicitly requested. - Do not test agent teams, launch/provisioning, terminal runtime, task assignment, smoke-flow, or agent actions on real user projects. Use only new sandbox/test projects or explicitly test-only existing projects. Real projects such as
~/dev/projects/ai/claude-runtimemust not be used even for opening a runtime/terminal without fresh direct user permission. - Do not run
pnpm lint:fixunless the user explicitly asks for broad formatting changes. - Keep new production source files at or below 800 physical lines. Existing oversized files are frozen in
scripts/ci/source-file-size-baseline.json; do not add exceptions or raise legacy caps. Runpnpm guard:source-file-sizeto verify the ratchet. - For Team Provisioning, do not add facade-inheritance layers, whole-service
ServiceHostcasts, or newprotected abstractdependency slots. Use explicit composition, followdocs/team-management/team-provisioning-target-architecture.md, and runpnpm guard:team-provisioning-architecture. - Keep main, preload, renderer, and shared responsibilities separate.
- Build interactive UI controls from reusable Radix UI headless primitives under
src/renderer/components/uiwhen a shared primitive exists. Do not add one-off native or hand-rolled controls for selects, dialogs, popovers, tabs, menus, tooltips, switches, or checkboxes. - Use
wrapAgentBlock(text)instead of manually concatenating agent block markers. - Preserve task/subagent filtering, structured task refs, and message parsing semantics.
- Validate IPC and other main-process inputs defensively and fail gracefully.
- Treat
docs/team-management/debugging-agent-teams.mdas the first stop for team launch hangs, bootstrap issues, or missing teammate replies. - Do not revert unrelated user changes or other agents' edits.