Interventions
An intervention changes or removes the declared relation while keeping the frame, the input and the encounter as they are. The plan of trials is derived from the frame alone, before any call.
The trials
Each trial is asked quorum times. The full cost is the inputs times the planned trials times quorum, which calls_needed(frame) gives without a call.
| Trial | What changes | What it tests | Cost |
|---|---|---|---|
baseline | nothing | the level being explained | quorum calls |
repeat | nothing | whether that level is stable enough to compare | quorum calls |
ablation | the anchors are removed | required influence | quorum calls |
ablation-<anchor> | one anchor removed, the others kept (eachAnchor) | how several anchors carry it, as evidence only | one quorum per anchor |
cumulative | anchors plus the spans they may fall back on | support carried elsewhere | quorum calls |
sham-* | as much text of the anchors' kinds (or the kind sham.kind names for one), never an anchor, a bypassed span or a declared fallback | specificity of the change | one quorum per draw |
presentation | mapped words renamed in one pass, body and input | whether wording rather than meaning drives the scorer | quorum calls |
placement | one span moved after another, its text unchanged | whether the structure rather than the meaning drives the scorer | quorum calls |
inversion | the anchors' sense inverted in their own words; the input left as it is | whether the answer follows the relation's sense, reaching allowed.inversion | quorum calls |
input-inversion | what is asked inverted (a case, a question); the evidence left as it is | whether the answer follows what is asked, reaching allowed.inputInversion | quorum calls |
bypass | a named connection is cut | no hidden fallback; with allowed.bypass, only that opening clears it | quorum calls |
control | spans any reader needs | whether the scorer can move at all; cooled needs it to | quorum calls |
A sham never cuts a span declared under cumulative. The frame says that span may carry the relation, so cutting it would test nothing. This is a change to how shams are planned; no kept example's plan changes, as none drew one.
A sham matches the anchors by length in characters, within their kind, so kind is how a frame chooses the unit a sham matches. To cut as many lines as the anchors, give each block a kind that names its line count, such as lines-8.
An anchor that is the only span of its kind gets no sham, so under the default policy its frame is never carried, as plan says before a call. "sham": {"draws": 2, "kind": {"failure": "console"}} draws the shams of the anchor failure from the spans of kind console, and the anchor keeps the kind it has.
What each trial can establish
A trial shows something when the answer moves and something else when it holds, and neither settles everything.
| Trial | A move means | No move means | What it cannot establish |
|---|---|---|---|
baseline | the starting level | nothing yet: it is what the others are read against | that the relation matters |
repeat | a split level is unstable at this quorum | the observed level recurred | that the input is representative |
ablation | the anchors influenced the outcome | no operative influence here | that another span is not a fallback |
ablation-<anchor> | that anchor is needed on its own | the other anchors carry it without this one | a category: it is evidence only |
cumulative | support moved elsewhere | the initial cut removed the effect | carriage on its own |
sham | the scorer responds to irrelevant same-kind text | the ablation's change is more specific | that every possible irrelevant change is controlled |
presentation | wording drives the observation | the tested wording change is invariant | that all paraphrases are |
placement | the span's place drives the observation | the tested move is invariant | that every reordering is |
inversion | the answer follows the relation's sense | after a carried ablation, the reading drops the sense: coupled but misaligned | that every way of stating the sense is read |
input-inversion | the answer follows what is asked | after a carried ablation, the reading drops what is asked: coupled but misaligned | that every way of asking is read |
bypass | a hidden connection still carries the relation | no tested fallback is visible | receiving-system materialization |
control | the scorer can move under a required removal | the scorer or task is insensitive | that it moves for the right reason |
Bypass and control are different
Both cut more than the anchors, but they answer different questions.
- Bypass: cuts the connection that makes the relation operative, and asks whether some fallback still produces the required outcome. With
allowed.bypass, the bypass must land on that designated opening to clear the check; without it, any move from baseline clears it, a weaker claim to state as such. - Control: cuts what any competent reader of the task needs, a check that the reader can tell at all. If the ablation and the control both leave the observation, a reader that never moves looks like an idle relation, so under
carriage: all-checksa finding iscooledonly beside a control that moved.
Presentation is one pass
presentation maps words to their replacements and applies the mapping once, longest phrase first, to the body and the input alike, so swaps cannot collapse and chains cannot compound. A mapping that reaches nothing the reader reads would repeat the baseline, and is refused. The tutorial's frame renames three words:
"presentation": {
"quill": "heron",
"retry_after": "wait_hint",
"backoff": "pause"
}Placement is one move
placement moves one span to follow another and changes no text, asking what presentation cannot: does a clause's place decide, such as a grant before or after an instruction? A move that changes the level reads as coupled but misaligned, and a move that leaves the order as it is would repeat the baseline, so it is refused. This moves the grant after the audit line:
"placement": {"span": "grant", "after": "audit"}Inversion asks for a direction
Every other trial asks whether the answer rests on the anchors; inversion asks whether it follows their sense. It maps phrases of the anchors to their inversions, applied once as presentation is, to the anchors alone: a phrase found in any other span is refused, and the case and question stay as they are. allowed.inversion names what the inverted answer must reach, and the baseline's own label never counts:
"interventions": {
"inversion": {
"the incident commander approves the restore":
"the incident commander does not approve the restore"
}
},
"allowed": {"ablation": ["open"], "inversion": ["Yes", "No", "open"]}It is read after a carried ablation. An inversion that stays at the baseline, or reaches a label allowed.inversion does not list, is coupled but misaligned; one with no agreed level leaves direction open. It is a change to the method, read only when a frame declares it, so no earlier frame reads differently.
Its limits are three. A who-question may rightly keep its answer when a description of the person is inverted, so a person declares the phrase. A conditional answer reads only as conditional, so an inversion inside its condition does not show at that grain; and it inverts words, so a reader that works on graphs needs its own guard as well.
Input inversion turns what is asked
inputInversion maps phrases of the input to their inversions, applied once to each input and never to the evidence: a case negated, or the description in a question. allowed.inputInversion names what the answer may reach, and the reading is the inversion's: a stay, or an outcome the frame does not allow, is coupled but misaligned. A map can swap two phrases in one pass:
"inputInversion": {
"has approved": "has not approved",
"has not approved": "has approved"
}An input the map does not reach is asked as it stands, and its level is not read as a stay. Opening is not failing: a negated description often leaves a question open, which the frame allows by listing open.
Each anchor alone says how several carry it
With several anchors, the ablation cuts them all at once, so it cannot tell a chain from two routes. eachAnchor also cuts each anchor alone, right after the ablation, as trials named ablation-<anchor>:
"interventions": {"ablation": true, "eachAnchor": true}What they show is evidence only, never a category. Once the ablation has moved the answer, one line says how the anchors carry it:
| Each anchor cut alone | The evidence |
|---|---|
| every one moves it | each anchor carries it |
| neither of two moves it | the anchors carry it independently; either suffices |
| none of three or more moves it | no anchor alone is needed; the others carry it without it |
| some do, some do not | s1 carries it; s2 adds nothing alone |
| one has no agreed level | s2 alone has no agreed level |
Where the ablation left the answer, an anchor that moves it alone is named as the oddity it is, since cutting more should not move it less. An anchor that adds nothing alone is cited but not needed while the others stand, which is worth seeing before it is worth a rule.
A frame with one anchor that declares eachAnchor is refused, as its one trial would be the ablation again. A bypass that cuts one anchor alone reads the same body as that anchor's trial, and both are asked: the bypass settles no hidden fallback, while the anchor's trial is evidence.
Cost
For one input the call count is the planned trials times quorum, and a sham with {"draws": n} adds up to n trials; a draw with no match is left out, and the finding says so. Among spans of the same kind and length, the frame's own seed picks each draw, one span at a time, so a frame with hundreds of such spans takes noticeably longer to plan; varying their lengths or kinds avoids it. This lists the plan and its cost without spending anything:
from midwife.pipeline import calls_needed, plan
for trial in plan(frame):
print(trial.id, len(trial.removed), trial.body_hash)
print("full run:", calls_needed(frame), "calls")run(..., only={"baseline", "ablation"}) runs a subset. A planned trial left out makes the finding unresolved, so use a partial run for diagnosis, never for a final carried verdict. A one-anchor trial left out is only said to have no agreed level, since it is evidence.
Choosing a useful first set
Start small, and add a trial when its question becomes yours.
- A deterministic scorer: start with
repeat,ablation, oneshamandpresentation. - A separate connection: add
bypasswhen a binding line, cut, should expose an opening. - A plausible cooled result: add
control, which cooled needs. - Support that could shift: add
cumulativeonly when support could move to another span rather than disappear. - A sampled model: use a quorum of at least three, and decide
agreebefore the run; raising the quorum after seeing labels changes the frame's hash.