Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

P8: CONTRIBUTING names the writeInference field for new write operations

garrytan8204ad489773
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f22459886f..11981f8898 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -304,8 +304,17 @@ and it automatically appears in the CLI, MCP server, and tools-json:
domain needs no façade change; a brand-new domain module gets one spread line
in `operations.ts`. Shared contract types live in `src/core/ops/contract.ts`,
the security/scope fences in `src/core/ops/context.ts`.
-2. Add tests
-3. That's it. The CLI, MCP server, and tools-json are generated from operations.
+2. If the operation writes (`mutating: true`), set `writeInference` on it: `'none'`
+ (no model call before commit), `'embedding'` (may embed before commit, never a
+ generative model), `'async_derived'` (generative work only after commit, e.g. a
+ queued extraction job), `'opt_in_media'` (generative preprocessing before commit
+ only behind a user opt-in), `'explicit_llm'` (the op is itself a model call) or
+ `'non_content'` (administrative state). Unset resolves to `'none'`, the strictest
+ promise, and `test/write-path-zero-llm.serial.test.ts` fails the build if a commit
+ path calls a generative model. Types and the existing classification:
+ `src/core/ops/write-inference.ts`.
+3. Add tests
+4. That's it. The CLI, MCP server, and tools-json are generated from operations.
For CLI-only commands (init, upgrade, import, export, files, embed, doctor, sync):
1. Put the implementation in `src/commands/mycommand.ts`.