These practices come from the way M31A's runtime actually behaves: it proposes tool calls, you authorize them, and every turn is recorded.
Give the agent a map, not a guess
- Keep
M31A.mdshort and specific: build commands, forbidden paths, review requirements, and naming conventions. - Add extra directories with
--include-directoriesonly when the task needs them; more context costs tokens. - Use
/memory showto confirm which instructions are actually loaded.
Prefer narrow requests
text
Bad: Fix the app.
Good: Fix the null check in packages/cli/src/commands/mcp/list.ts and add a
regression test for an empty server list.Narrow prompts produce narrower diffs, which are easier to approve and review.
Match the approval mode to the task
| Task | Suggested mode |
|---|---|
| Exploring an unfamiliar repository | plan or default |
| Focused edits with known tools | auto_edit |
| Throwaway sandbox experiments | yolo in a container |
Cycle modes with Shift+Tab or start with --approval-mode. Do not use YOLO in a repository you do not trust.
Review before you accept
- Read the tool call, not just the final answer.
- Use
/tools descwhen a tool name is unfamiliar. - After an edit run the project's own checks; see
/statsfor the turn's tool usage. - If the direction is wrong,
/rewindis cheaper than layering corrections.
Control context cost
- Run
/compressbetween phases of a long task. - Keep
model.compressionThresholdtuned for your model's context window. - Avoid pasting entire log files when a filtered excerpt answers the question.
- Use
tools.shellsettings to keep shell output readable.
Automate repeatable work
- Turn repeated instructions into skills.
- Use hooks for audit logging, not for authorization.
- Put recurring prompts in scheduled runs.
- Use headless mode with
jsonoutput in CI.
Keep secrets out of the loop
- Export credentials as environment variables; never place them in
M31A.mdor committed settings. - Enable
security.environmentVariableRedaction.enabled. - Review
/export-sessionoutput before sharing it.
Work in isolation when it matters
- Use
--worktreefor parallel or risky work. - Use container sandboxing for unfamiliar code.
- Keep checkpoints enabled for multi-hour sessions.
Next steps
See Troubleshooting and the Tutorials index.