Protocol caveats: a step condition sits in a note beneath the step - #591
Merged
Conversation
A constraint qualifying one instruction sits outside its `>` note in two spellings: an indented sub-bullet, which the step regex turns into a peer step; and a `when` / `if` / `otherwise` clause inside the step's own sentence, where the outcome and a branch off it read as one instruction. Two clauses restating one predicate in different words read as two branches over one condition. Do-not-flag names the selection ladder explicitly — `If` / `Else if` / `Otherwise` arms over one choice are a branch table, whichever way indented — alongside the ordered sub-actions and precedence ladders already kept. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each protocol step states its outcome, and the conditional caveat, fallback or error path qualifying it sits in a `>` note beneath. A lone caveat is the note's prose; two take a bullet each. A line opening with `>` folds into the instruction above rather than reading as another step to perform. The clippy and fmt-check compose steps state their status value alone, with the failure path in the note. Clippy's note names its predicate once, where the surfacing and the addressing had been two clauses over the same condition. Twenty-two techniques across atlassian-operations, cargo-operations, gitnexus-operations, knowledge-base-search, dco-provenance and validate-build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The aggregate URI points at the schemas the table above lists, so the sentence survives the table gaining a schema. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a protocol step carries a caveat — an error path, a memory-limit fallback, a stale-index retry —
that caveat was written either as an indented bullet under the step or as an extra clause in the
step's own sentence. Neither is what the reader or the parser needs.
An indented bullet is read as a separate step to perform, because the parser that splits a protocol
into steps discards leading whitespace before it looks at the line. So a line meaning "if this went
wrong, do that instead" arrives as another thing to do. An extra clause buries the branch mid-sentence,
so a reader has to evaluate every clause in the step to work out which parts apply to their run.
This puts each caveat in a blockquote note beneath the step it qualifies, which folds into that step
rather than reading as another one, and leaves the step stating its outcome alone. It also extends
the catalogue entry that governs this so it names both spellings, not just the indented one.
What happens today
The catalogue entry for this defect describes only one spelling: a caveat written as an indented
sub-bullet. It says nothing about the clause-inside-the-sentence form, even though the design
principle it points at names that form explicitly. So the inline spelling was governed by a stance
with no operative test anywhere, and passed audits by falling between the two.
27 caveats across 22 technique files carry the indented form, spread over six families —
atlassian-operations, cargo-operations, gitnexus-operations, knowledge-base-search, dco-provenance
and validate-build. Most are error paths and retry instructions: run the analyzer again when the
index is stale, halve the job budget when a compile runs out of memory, fetch the available
transitions when the one requested is not offered.
Two more carry the inline form. The clippy step composes its status value and then, in the same
sentence, says what to do when the run failed — twice, in two different wordings of one condition
("when the check did not pass" beside "if the linter emitted denied warnings"), which read as two
branches over a single predicate. The formatting-check step does the same thing with its own failure
path.
The fix
Name both spellings in the catalogue entry. The detection criteria now cover the indented
sub-bullet and the clause inside the step's own sentence, including the case of two clauses restating
one condition in different words. The carve-outs are stated more precisely too: a complete selection
ladder — an "if / else if / otherwise" chain over one choice — is a branch table and stands whichever
way it is indented, alongside the ordered sub-actions and precedence ladders already exempt.
Move each caveat into a note. A lone caveat becomes the note's prose; where a step has two, each
takes a bullet inside one note. The steps themselves are unchanged.
State the clippy and formatting-check outcomes alone. Each compose step now states its status
value, with the failure path in the note beneath. Clippy's note names its condition once.
Stop counting the schema table's rows. A sentence describing what the aggregate schema address
covers said "the five schemas" directly beneath a five-row table listing them. It now names the
table, so it survives the table gaining a schema.
Why now is cheap
The paired server change widens the guard that measures this class, and that guard can only be shown
to work while the defects are still present. Measured against this corpus before these commits, it
names 28 sites — 27 real, plus one selection ladder that the carve-out then excludes. The same guard
reported a clean run on every one of them beforehand, because it could only parse protocols written
with heading-separated phases and 221 of the corpus's 569 technique files use a flat numbered list.
That measurement is the evidence the guard detects anything at all, and it is unavailable once these
files are converted.
Scope
24 files: the anti-pattern catalogue, the schema construct inventory, and 22 technique definitions.
Acceptance criteria
Non-goals
Mutually exclusive branches written as top-level peer bullets are the same underlying defect and are
left alone: separating them from a step that legitimately handles several cases in sequence needs
judgement a line pattern cannot supply.
The guard suite has one pre-existing failure unrelated to this change — three stale entries in the
binding-fidelity triage list, naming GitNexus operation techniques, with no live bugs behind them.
Verified identical before and after these commits by re-running against this branch with the changes
set aside. Whether each is a real closure is someone's decision, not this change's.
Paired change
The guard that detects this class is widened in a server-side pull request. Its clean-corpus
assertion turns over when this merges and the submodule pointer moves, so that one is expected red
until then. This corpus change runs green against either version of the guard, since the version on
the main line cannot see these files.
Investigation detail
The reviewer's original observation, the guard's blind-spot measurement, and the full site list:
.engineering/artifacts/planning/2026-09-03-manual-technique-review/