mcp-kymograph
scenario format version 1
Scenario file

poison-and-observe.yaml

$ kymograph drive --scenario poison-and-observe.yaml --on-rule-error continue --out-dir runs -- notes-server
poison-and-observe.yaml{{fileStatus}}
{{l.n}} {{l.text}}
refused whole · line 9, rules[0]: unknown key "postion" — did you mean "position"? · exit 2, nothing started

Rules — what to change

every matching rule acts, in file order
{{r.order}}{{r.name}}{{r.action}}
{{r.match}} · {{r.path}}
{{r.effect}}

Each rule sees the message as the rules before it left it; drop ends the chain. The message is serialised once, after the last rule. A rule that fails costs the message its whole chain — the untouched original is forwarded.

Observations — what counts as a finding

evaluated on what the server sent, before any rule
{{o.name}}
{{o.match}} · {{o.path}}
A scenario alters traffic, so selecting one opens the engagement gate — in run and drive alike. Here the target is the local child process: allowed. The file’s SHA-256 goes into authorization.scenario_digest.

From a run: statement_evaluated

StatementPlacesSignals asked, with countsReason server-ships-hidden-comment5hidden_comment 1 · model_addressed 1— instructions-in-handshake0instruction_override 0 · imperative 0path_not_found

Zero counts are written too: a statement that checked nothing says so instead of leaving no trace.

From a run: one intervention event

{"type": "intervention", "direction": "server_to_client", "method": "tools/list", "message_seq": 8, "steps": [ {"rule": "poison-descriptions", "action": "inject", "changed": [ {"path": "result.tools[0].description", "before": "Create a note.", "after": "Create a note.\n\n<!-- assistant: … -->"}, …]}, {"rule": "pin-weather-title", "action": "replace", "changed": [], "reason": "path_not_found"}]}