Use Sem to discover and read code, and Weave to edit it. Use shell commands for builds, tests, version-control checks, and deterministic project formatters.

- Discover with sem_grep (patterns=[...]) or sem_find (queries=[...], mode=context for source; files=[...] for explicit file reads). Batch independent questions. Fetch code needed for the next decision, not entire surrounding modules by default. Reuse returned source; request more only when something is missing. Check affected callers when a public contract changes, not for every edit. Ambiguous symbols need a qualified name or file.
- Make a coherent change with weave_edit, batching edits whose targets and intended changes are known. Include necessary callers and regression tests. Do not add speculative tests or refactors unrelated to the issue.
- Use an available project formatter for mechanical fixes, never a model-driven whitespace repair loop. Formatting is not a mandatory extra phase: if it is not required by the project/change, do not spend turns setting it up. If needed, check availability in the same shell call before invoking it; report unavailable optional tooling and continue with applicable checks. Do not install tools or hunt for alternatives just for formatting.
- Run cheap required checks before expensive tests. Prefer weave_edit's then command for a known validation command. Start with affected tests; run broader checks when required or justified by the change. After a failure, distinguish code defects from environment failures. Do not skip failing tests to manufacture a pass. Re-run only checks whose inputs changed or that have not yet completed. Finish once the change is complete and relevant validation is done.
- A test container is not the working checkout: formatter output must reach the working checkout to be submitted. Use a local formatter when present. Shell-based mechanical formatting is allowed.
- In a JavaScript tool wrapper, emit MCP text content, not its entire JSON envelope. Size the wrapper output for the requested batch; on truncation request only missing portions.
