# Synthesis

**Address:** `miadi-foundation:agent-harness-and-controlled-language/synthesis.md` · **Date:** 2026-11-20
· **Lanes:** [A](./lanes/A-controlled-language.md), [B](./lanes/B-agent-harness-guards.md),
[C](./lanes/C-capture-and-prompts.md) · **Sources:** 57, 49 verified ([`source-ledger.yaml`](./source-ledger.yaml))

## What the practice is called

Guillaume, 2026-11-20: "I don't know exactly how we call what we are actually doing, which basically
is ensuring right usage of vocabulary." In the fields read here it is **controlled vocabulary
enforcement**: terminology work binds a term to its domain (ISO 1087, A-F1), a controlled language
restricts a word to one sense (Kuhn, ASD-STE100, A-F2), and the enforcement is done by a **harness
guard**, an edit-time check in the interface between an agent and its tools (SWE-agent's linter,
B-F1). The capture side is **low-overhead telemetry on the request path** (Dapper, OpenTelemetry,
C-F3 to C-F7). The prompt side is **prompt management**, prompts kept as versioned artefacts (C-F10
to C-F12), the factory's own `prompt management` capability in
`foundations/tracing-provider-vocabulary/vocabulary.md`.

## Where the fields agree

1. **A word rule has a domain and a sense, and the check has to know both.** A term belongs to one
   domain (A-F1). Controlled languages and style guides ban a word in one sense and keep it in
   another (A-F2, A-F8). A surface match cannot tell senses apart (A-F7). So the scope comes from
   what a text is, and the sense comes from the phrasing or from the writer.
2. **Tools that check prose parse structure first and grade what they find.** Vale skips code and
   URLs before any rule runs and has three levels, of which only `error` fails (A-F4, A-F5). Sentinel
   has advisory, soft-mandatory with a recorded override, and hard-mandatory; Kubernetes has Deny,
   Warn and Audit; ESLint's `warn` leaves the exit code alone (B-F11).
3. **Every checker expects false positives and offers a visible way past them.** alex and Vale take
   an inline comment that names the rule (A-F6, A-F4). XSTest calls over-refusal "lexical
   overfitting" (B-F7). OR-Bench finds that most models "simply trade over-refusal for safety"
   (Spearman 0.89, B-F8). False refusals are measured on paired sets, never assumed rare.
4. **A refusal helps when it shows the fix in the writer's terms.** SWE-agent's linter rejects an
   edit and shows the error: resolved rate 18.0% with it, 15.0% without (B-F1). Shneiderman reports
   28% better repair with specific messages (A-F9). A remedy has to fit the sentence: "resolve
   tension" is a verb phrase and cannot fill a noun slot (A-F10). Anthropic advises error responses
   that state "specific and actionable improvements" (B-F9).
5. **Enforcement points log their decisions.** Claude Code keeps no record of a PreToolUse refusal
   except the tool error and a debug line (B-F4). OPA logs each decision with a `decision_id`, and
   Llama Guard names violated categories with fixed codes (B-F11, B-F6). A guard that does not log
   cannot be calibrated.
6. **A surface rule invites substitution.** Specification gaming and adversarial Goodhart (A-F11):
   a writer refused one word can choose another with the same frame. A pass is not evidence of
   creative orientation. What the rule guards is a frame (Lakoff and Johnson, Fritz, A-F12), so the
   refusal names the frame.
7. **Capture belongs off the request path, and a loss is counted.** Dapper writes locally and
   collects later at the lowest priority (C-F3). OpenTelemetry's span processor "should not block",
   drops when its queue is full and counts the drop (C-F6, C-F7). Matching Claude Code hooks run in
   parallel, so a prompt waits for the slowest one, and a UserPromptSubmit command hook defaults to
   30 s (C-F1, C-F5). That is the 30 s Guillaume saw. `"async": true` runs a hook in the background
   (C-F2). Capture fails open (C-F9).
8. **Prompts change often and silently, and agents can write them.** 21.9% of 1,262 prompt changes
   were documented in their commit (C-F10). Registries keep immutable versions and movable labels
   (C-F11). APE, DSPy and meta-prompting have models write prompts against a metric, and promptfoo
   turns checks into assertions that fail CI (C-F12).

## What each finding changes in the specification

`rispecs/agent-harness-hooks/03-specify.md` in jgwill/miadi-orchestration-kit, revised the same day.

| section | findings | change |
|---|---|---|
| S1 file kind | A-F1, A-F4, A-F7 | scope by declared kind and structure, never by a file name alone |
| S2 senses | A-F2, A-F3, A-F5, A-F6, A-F8, A-F10, A-F11, A-F12 | the entry carries its forbidden sense, its signalling phrases and its allowed senses; the message offers a drop-in rewrite and names the frame; graded levels are offered to the list's owner (H-1) |
| S3 refusal contract | B-F1 to B-F12 | a stable rule code and a decision id per refusal; each guard states that it fails open; paired must-pass and must-refuse fixtures; a refusal on Write that moves to Bash is counted |
| S4 attribution | B-F4, C-F7 | the guard's own record, so the capture never infers a person from an error |
| S5 latency | C-F1 to C-F9 | `async: true` for capture that returns nothing; start and end markers so a cancelled hook is counted; the transcript window is recorded |
| S6 prompt door | C-F10 to C-F12 | a stated reason and a check before a version is saved, assertions before a label moves |
| S8 guard fit | A-F11, B-F8 | count rewrites, overrides and false refusals; never report passes as compliance |

## Predictions, scored

[`PREDICTIONS.md`](./PREDICTIONS.md) was written before any lane returned.

| id | result |
|---|---|
| PR1 | partly: "belonging to one domain" is quoted from ISO 1087; one concept per term could not be quoted, the monosemy clause was not available |
| PR2 | held |
| PR3 | held, with A-F10's addition: the replacement has to fit the sentence |
| PR4 | held: no deterministic remedy was found |
| PR5 | held, measured: 18.0% against 15.0% |
| PR6 | wrong in one part: the command default is 600 s, but UserPromptSubmit's is 30 s; JSON adds `defer` |
| PR7 | wrong in one part: OPA does log every decision |
| PR8 | held |
| PR9 | held, and Kubernetes adds Warn and Audit |
| PR10 | held |
| PR11 | held: `async: true` exists |
| PR12 | held in part: the 21.9% figure is from the abstract only |

## Cautions

- No source measures how the wording of a refusal changes an agent's recovery (lane B). SWE-agent
  measures the guard as a whole.
- No study was found of prompts that agents write for other agents and keep in a registry (lane C).
- The Claude Code pages are living documents, read on 2026-11-20 against Claude Code 2.1.329.
- The ISO standards were read through samples and catalogs only.
