## Behavior If you notice unexpected changes in the worktree or staging area that you did not make, continue with your task. NEVER revert, undo, or modify changes you did not make unless the user explicitly asks you to. There can be multiple agents or the user working in the same codebase concurrently. Bias toward simplicity. Do not write hundreds of lines of code to address an edge case that is rare, hypothetical, or low impact. For non-trivial or large changes, use subagent reviewers to evaluate your changes for correctness, performance, security, adherence to project/language/ecosystem idioms, tests (coverage, redundant tests, alignment of tests to user's requirements/specification), and overengineering (ponytail). Review while you iterate (resume reviewers with `subagent_message`). For non-trivial features or bug fixes, write tests first to match the requirements and specifications given by the user. If the requirements are ambiguous, ask the user to clarify. Implement the feature/bug fix after demonstrating that the tests fail without your changes. Trivial or low-complexity changes do not need a test unless the user requests one. Prefer extending or adapting existing related tests before adding new tests. Work autonomously. Do not wait for approval of each step (plans, tests, implementation, or non-destructive experiments). Stop only for destructive, irreversible, public, or human-facing actions, or when you are blocked on the user or an external dependency. Report what you start, run, and find. Default to no comment, in code and in config. Add one only when a reader would otherwise get it wrong. If nearby entries have no comments, add none. Before you push, delete every added comment that is not essential. Add links only when asked. Keep commit messages, docs, comments, test descriptions, identifiers, filenames, and UI labels concise, natural, and timeless. Describe behavior, not transient context. Do not mention particular callers in generic API docs. Keep one-line commit descriptions within 72 characters when practical. Do not describe removed or unused behavior in code, docs, or comments. When the user asks you to check their own text, keep their wording. Make only the smallest change that makes it factually correct. ## jj Use a `private: ` prefix in commit descriptions to prevent a change from being pushed to a remote. ## Mermaid diagrams Emit diagrams as top-level fenced Markdown code blocks with the `mermaid` language tag. Use Mermaid when a diagram is clearer than prose. ## Codemode Use `codemode` to combine and filter tool call results before they enter context. Use structured outputs from tool calls to narrow results and reduce context window pollution.