rdy documentation v0.57.0

Concepts

Suspects and tensions

Documentation drifts in two ways. A block can go stale because something it rests on has moved. Two blocks can disagree. rdy notices both without an opinion: it computes suspects from pins, and it computes tensions from the edges and the text it holds. Coverage turns both into a list of work and into the confidence rdy gives agents. This doc describes what rdy catches, how each is cleared, and the one gap it accepts.

Suspects

A suspect is a reference or premise whose target has changed, or been superseded, since rdy pinned it. Every ref in a body, every depends_on or conditional_on premise, and every implements, decided_by and reflects link carries a pin at write time. The pin is the target's content hash: the hash of its content without pins, derived fields or its order key. When the target's content moves, the pin no longer matches, and the citing block is suspect. A suspect is a fact rdy computes live from the graph, never an opinion. A landing records the suspects open at its approval.

Suspect
A suspect is a reference or premise whose target has changed, or been superseded, since rdy pinned it. Suspects follow refs, premises, implements, decided_by and reflects links to sources; a reflects doc goes suspect when its anchored code changes.

A content hash does not depend on pins. Blocks that cite each other in a circle can therefore pin each other in one write, and drift inside the circle still turns suspect. A repin changes only pins, so it never makes another block suspect, with one exception. A repin of a conflicted block from one side's version writes that side's content, so the blocks that cite it can turn suspect.

A block's content hash leaves out its order key. So a move within its parent changes the block's version hash and keeps its content hash. The blocks that cite it stay clear, and its dismissals, change-plan answers and pair reviews hold. A move to another parent changes the content hash, because the parent is part of the content. A write may still insert into a tie that canon holds, such as one from before rdy 0.26.0 or from an import. That write still re-keys the smaller side of the run. A concurrent edit of that sibling in another view can then conflict. In a stable doc, the re-key needs the write's justification, else it opens unjustified_change on the sibling.

A landing stops order-key ties by re-keying its own blocks. The landing's placed blocks are those it creates, and those whose parent or order key it changes. Where a placed block would tie with a sibling, the sibling keeps its key, and the placed block takes a new one after it. When only placed blocks tie, the one with the lowest id keeps the key. Each new key lies before the next distinct key, in canon with the landed changes and in the proposing view. So a block that the view placed later keeps its place.

The acceptance change holds the new keys, and its message says give new order keys. A landing never re-keys a block it did not place, and it adds no new tie. It refuses with E_ORDER_DEPTH when no key fits, and with E_FROZEN when a frozen decision would need a new key. It refuses with E_STALE_BASE when a block it must re-key changed in the proposing view after the proposal. The author then proposes again.

Local suspects follow refs and five link kinds: the premises depends_on and conditional_on, implements, decided_by and the store-only reflects link to a source. A block goes suspect when a source it reflects changes or is deleted. A doc that has a reflects field is also suspect when the code it anchors changes, because for reflects the code is the truth. A write that carries reflects: {code: true} records the code state again, so it clears that block's code_changed suspect. Every other rewrite of a suspect block leaves the suspect. Blocks whose type carries the presentational trait never make a block suspect.

Suspects also follow edges to blocks cited from a linked project, with the same rules. A delivery changes no pin, so the pinned version stays in force. A ref, or a link of the five kinds above or deviates_from, whose pin differs from the current delivered content makes its block suspect. A pinned target that the current delivered selection no longer holds makes it suspect as deleted. A cited block that is superseded or revoked makes the block suspect through any edge but its own supersedes or revokes link. When the delivered selection holds the successor, the suspect names it.

A suspect reaches an editor in three places. rdy_suspects and rdy suspects list every suspect in a scope that follows a local edge or an edge to a block cited from a linked project. rdy_context lists the suspects of one block. A briefing lists the open suspects on the blocks it covers. Its will_go_stale section names the blocks that would become suspect if a covered block changed. After a write, every response carries the suspects the write made, and those it left on blocks it rewrote, as consequences with a follow-up.

Claim

A suspect follows declared edges only; a block that depends on another in meaning, with no edge between them, never goes suspect.

Repin

A suspect asks one question: does the citing block still hold? The answer is one of two follow-ups. update means the citing block must change to match its target, and the editor rewrites it. confirm means it still holds, and the editor repins it. An entry from a reach or a neighbor, or on an accepted decision, needs no repin. A repin cannot clear a superseded or revoked target. There the editor points the block at the decision in force, or removes the link. A repin is a repin op in rdy_write. It re-pins the block's references and links, all of them or the targets named, to the targets' current versions. The op records that the editor checked the block and found it consistent. A repin that changes no pin is refused, because it would record nothing.

Repin
Repin clears a suspect: it pins the reference or premise again, to the target's current content, and so records that it still holds. The confirm follow-up is a repin, with two exceptions. An entry from a reach or a neighbor, or on an accepted decision, needs no repin. An entry on a superseded or revoked target needs a new link, because a repin cannot clear it.

Rewriting a suspect block does not repin it. When a write creates or updates a block that stays suspect, the reply names that suspect again. The entry has kind suspect, already_written: true and a fix:

  • A changed target asks confirm: check the block, then repin it.
  • A deleted, superseded or revoked target asks update, because a repin cannot clear it. Point the block at another target, or remove the reference or the link.
  • A block that is a live or partly superseded decision always asks reaffirm.

rdy_propose and rdy approve list the same entries, and neither refuses for one. So a suspect never lands unseen.

When the suspect block is an accepted decision, the follow-up is reaffirm instead. A re-affirmation is a light record that the decision still holds, and it leaves the frozen decision untouched. Decisions describes it. An agent re-affirms with a reaffirm op in its own view, a write like a repin. On stable content it needs a current briefing like any other write. A person can also re-affirm on a reaffirm card, which lands at once.

A re-affirmation clears what a repin cannot. For a changed target, it pins the target's current content, as a repin does. For a superseded, revoked or deleted target, it records the decisions that retire the target, or deleted. The suspect stays clear while that set is unchanged. A new supersession or revocation of the target makes the decision suspect again. A decision that records deleted for a target keeps its citation of that target. That citation is not dangling, so the deletion can land.

A repin, a repin: true plan answer and a re-affirmation leave every pin to cited content as it is. Only an adopt answer on an adopt card moves those pins, as Decision intake describes.

Tensions

A tension is a recorded disagreement between changes or blocks. It has a kind, a severity, two or more sides and a status. A side is an in-flight change, named by its change id, or a canon version named canon@<landing>. A side may also be a block cited from a linked project, shown foreign:<alias>@<12 hex>: the hex names the delivery that carried its version. Include and fork put one change id in several views, and it is still one side, so a change never collides with itself.

Blocking and advisory
A tension is blocking or advisory. A blocking tension refuses a landing when every side of it would be in canon; an advisory one informs. Deterministic tensions carry the pack's severity. A tension from an agent verdict is advisory until a person accepts the reviewer's advice to block. Each advisory tension that involves a proposal version is a tension plan item. The version is not ready until the author answers it, and the tension stays advisory.
Tension
A tension is a recorded disagreement between changes or blocks, with a kind, severity, sides and a status: open, resolved or dismissed. Commands succeed and report tensions; only the gate refuses, and only a blocking one. A tension is resolved by a change or decision, or dismissed by a recorded review.

Every tension has a stable id, the hash of its kind, its severity and the versions it involves. When a side changes, the old tension is resolved and a new one opens if the trigger still holds. That is why a dismissal is safe: it names the exact versions it dismissed.

Constraint

Every command succeeds and reports the tensions it found; only the gate refuses, and only on a blocking tension.

Tensions come in two families. rdy computes deterministic tensions on every change. A reviewer agent judges semantic tensions after rdy selects the candidate pair. The two families share one lifecycle and one place at the gate.

Deterministic tensions

rdy computes nine kinds of deterministic tension on every change event, against the inflight scope. Detection touches only the blocks linked to the changed blocks and their near matches. An area is a named part of the documentation that a pack declares, as "Areas" in How rdy is built describes.

Deterministic tension
A deterministic tension is one rdy computes on every change. The kinds are edit collision, fork, premise shift, area overlap, duplicate definition, unjustified change, deprecated reference, value disagreement and restatement drift. Its id is a hash of its kind, its severity and its involved items, each a side label, a block and a version. So a landing that changes a side's label re-keys the tension. A pack may tune severities.
Restatement drift
Restatement drift is a deterministic tension. A change edits a block whose previous text matched another block's text at the pack's drift_threshold, and the edit removes shared text. The other block may still state the old fact. It is advisory.
Value disagreement
Value disagreement is a deterministic tension. A block tied to a value entity states a different number in the value's exact unit. It blocks in stable content and is advisory in draft.
Table 1
KindTriggerDefault severity
Edit collisionTwo in-flight changes edit one block from one base, in different live views, or in one view as a recorded conflict; never between members of one alternative setBlocking
ForkTwo live or in-flight decisions supersede the same decision, or the same named partBlocking
Premise shiftA change edits or supersedes a block that another in-flight change depends on, cites or references at a pinned versionBlocking
Area overlapIn-flight decisions affect the same area and touch overlapping blocks, or an open intent covers blocks another view changesAdvisory
Duplicate definitionTwo or more defines blocks define one entity name or alias under the name matcher, or two or more normative blocks of three words or more have the same normalized text (for a decision, its statement, never its body); one tension per groupBlocking in stable content, advisory in draft
Unjustified changeA view's net change to stable normative content has no valid justification; a reflects that names a source the view does not hold is not valid. Recording a decision, or editing a proposed one, never counts.Blocking, and a pack cannot lower it in stable content
Deprecated referenceNew content references deprecated content, or names a deprecated definition's name or aliases in plain textAdvisory
Value disagreementA block tied to a value entity states a different number in the value's unitBlocking in stable content, advisory in draft
Restatement driftA change edits a block whose previous text closely matched another block's textAdvisory

One name matcher serves every name user. Case folds. The last word of a name or text phrase also yields two shorter forms: one without a final es, one without a final s (not ss). Each needs at least 3 characters left. A name with no word characters has no name key. Two names match when their key sets meet, and duplicate definition keeps its severity. Names or aliases that overlap, directly or through another block, form one duplicate-definition group.

Five of the kinds also apply across projects, with a side cited from a linked project. rdy computes them in the citing project, from the content that its links deliver. Their triggers across projects:

  • duplicate definition: a local block and a cited block have the same normalized normative text, or define one name; or two delivered instructions from two team sets have the same normalized text;
  • value disagreement: a local block tied to a cited value states another number in its unit;
  • restatement drift: a local block closely matched earlier text of a cited block, and the current delivered version removes text that they share;
  • deprecated reference: a local block refs or links to a cited block whose delivered facts say deprecated, superseded or revoked, or names a deprecated cited definition;
  • premise shift: an in-flight change holds a premise pin to a cited block, and the current delivered content differs from the pin.

Across projects every kind is advisory, unless the citing project's pack raises it with tensions_across: {<kind>: blocking}. The pack's tensions severities, the lifecycle and the cited project's pack have no force there. Core refuses only a kind that the citing pack made blocking, or a semantic tension whose advice a person in the citing project accepted. A tension whose sides are canon or cited is a standing condition in the canon scope. A live deviation resolves the tensions between the blocks it governs and its target, and each shows deviated: <decision>. Cited entities feed these five kinds only, never coverage or mention suggestions.

Value disagreement compares numbers, not words:

  • A value takes part when it has a unit and a decimal value.
  • A block takes part when it references the value or links to it by describes or affects.
  • A number counts when the value's exact unit text follows it, directly or after one space, in the same case.
  • rdy has no unit aliases and converts no units.

Each pair of a block and a value gives one tension. In canon it stays open until the numbers agree or the block no longer ties to the value.

Restatement drift compares texts. An edit of block X drifts from block Y when all of these hold:

  • X and Y are normative or informative blocks, and neither is a decision.
  • X's previous body has eight words or more.
  • X's previous body and Y's body match at or above the pack's drift_threshold, 60 percent by default.
  • The edit removes a shingle that the two bodies share.

A shingle is three words in a row, in lowercase letters and digits. The match is the shared shingles as a percentage of all their shingles.

A drift tension resolves when Y changes, or when a review dismisses it. A later edit of X keeps it open. A view that edits both blocks opens no drift between them. In canon, Y's newest landing must come strictly before X's in the log. Landings compare by their place in the log, never by the approver's clock. Drift is a tension, not a suspect, so suspects still follow declared edges only.

A pack tunes the severity of each kind in its tensions section, as blocking or advisory. A pack cannot lower unjustified_change in stable content: an entry that tries gets W_PACK_SEVERITY when the pack loads, and the tension stays blocking. The engine traits decide what counts as normative or as a definition, so the checks work under any pack.

An edit collision and a premise shift are the common ones. Two agents who edit the same block from the same base collide. The first to land wins nothing; the other's view rebases, and the collision becomes a conflict in that view, with canon as one side. A premise shift catches the quieter case: one agent changes a block that another in-flight change cites. The citing change still stands on the old version until its author updates or repins the citation.

An unjustified change is judged on a view's net change, with one tension per block. A view changes a block only when the block's net version in the view differs from canon's, so a revert to canon's text raises nothing. A justification counts only on a change that writes the block, because it names decisions or sources, never the blocks it covers. Recording a decision, or editing one before a landing accepts it, never counts. A proposal judges its own net change, and a tension listing scoped to a view judges that view's net change the same way.

A change of store-only fields only is no change for this check. A block's net version may differ from canon's only in store-only fields and in the pins its reaffirmed field names. Then rdy raises no unjustified change, whether the pack makes the kind advisory or blocking. Any other difference keeps the rule above.

A change whose reflects names a source that the judged view does not hold counts as unjustified, even when it also cites the code. rdy judges each view on its own. It never judges whether a source is true or how well the text fits it: it checks only that a source exists, as below. A deleted source, an include, an exclude, an undo or a landing can change the verdict with no write to the block.

rdy checks that a source exists where it can look. It looks for a release source's tag, by its exact name, in any linked code repo checkout. It looks for a commit source's commit in the checkout that its locator names, <repo>@<40 or 64 hex digits>. It tests that the object exists, not that the checkout's HEAD reaches it. It never checks a spec source, and it never fetches. The result is a read-time fact, found, missing or unchecked, in briefings and rdy_context.

unchecked means the machine cannot say. The cause is a spec, a malformed locator, no readable checkout, a failed git command, or more than 256 sources in one read. rdy never stores the fact. It never reaches readiness, the policy verdict, a briefing token, confidence or a rule's coverage. A missing source with a linked checkout gives the coverage issue source_not_found in Connected, on each scored block that reflects or cites it. That issue counts in the coverage that people read. The coverage gate and the assessment leave it out, because it depends on the machine.

Semantic tensions

rdy is model-free, so it never judges whether two blocks disagree in meaning. It selects the candidates and prepares the case. An agent judges. The result is a semantic tension.

Case file
A case file is what rdy gathers for one semantic judgment. It holds both blocks with their headings, text and governing decisions, the entities both name, and a verdict schema. rdy hashes it, and a verdict names that hash, so rdy refuses a verdict on a stale case. rdy prepares case files; agents judge.
Independence
Independence is the rule that a reviewer, or the dismisser of a blocking tension, is a different actor from the author of every side. Another run of the same actor is not independent. The agent that relays may be the proposal's author, because independence applies to the approver, not the relay.
Review
A review is an immutable record of a semantic judgment. It holds the subject, the case-file hash, the verdict, the blocks it cites with a note on each, and the reviewer. A dismissal of a tension is a review with verdict dismiss. A reviewer's verdict on a candidate pair is a review with verdict tension or no_tension.
Reviewer
A reviewer is a session with the reviewer role that claims a review request, receives its case file and submits a verdict. rdy derives tension requests from candidate pairs. The author or a person asks for a check review. Nothing routes a request to gate a proposal.
Semantic tension
A semantic tension is one that a reviewer agent's verdict creates, after rdy selects a candidate pair by fixed rules. The rules are a premise edge, the same describes target, a shared entity, the same section or the same area. It is advisory. The verdict may advise that it block, and it blocks only when a person accepts that advice. It stays open in canon until a side's text changes or a review dismisses it.
Verdict
A verdict is a reviewer's answer to a case file, and it may cite the blocks it judges, each with a note. A candidate pair takes tension or no_tension, and a check takes pass, fail or concern. A tension verdict opens a semantic tension. A no_tension verdict settles the pair until the content of either block changes.

For each block that an in-flight change writes, rdy picks candidate pairs by fixed rules, in rank order:

  • a premise edge between the two blocks;
  • the same describes target;
  • an entity that both texts name;
  • the same section;
  • the same pack area.

A pair holds only normative or content blocks, never a deprecated one. Inside a rule, the same doc comes first. A pair counts once, under its best rule. At most 20 pairs come from one change, so a busy area cannot flood the queue. Each pair becomes a review request with a case file.

Cross-view pairs follow the same rules. The premise, describes and entity rules also pair in-flight blocks across any two open views. These pairs rank after same-view pairs, inside the cap of 20 per change. The section and area rules stay within one view or against canon. So two agents that contradict each other in separate views get a review before either lands.

rdy labels a request rq- and the first 12 hex digits of its key. Its case file holds both blocks, each with its doc's headings, its text and up to 10 governing decisions. It also holds up to 10 entities that both texts name or both describe, the rule, a fixed question and the verdict schema. rdy hashes the case file, and the reviewer returns that hash with the verdict. A request exists while one of its blocks is an in-flight write. It ends when its last in-flight side lands, leaves every view or changes.

A reviewer-role session claims a request with rdy_review_next and answers with rdy_review_submit. For a candidate pair, the verdict is tension or no_tension. A tension cites at least one block of the pair, each with a note, and a no_tension may cite none. A tension verdict opens a semantic tension. A no_tension verdict settles the pair until the content of either block changes. The first verdict settles a pair, except that a tension after a no_tension still opens the tension. The reviewer's actor must differ from the author of both blocks, and another run of the same actor is not independent.

rdy leases a claimed request to its session, so two reviewers never claim the same request at once. The lease ends when the session submits or disconnects, or after reviews.lease_ttl minutes, 10 by default. Leases live in the daemon's memory, and a restart drops them. A submit needs no lease: rdy finds the request on a read snapshot and checks it again on the writer.

Requirement

A tension that an agent verdict creates stays advisory until a person accepts the reviewer's advice to block.

This rule keeps agent judgment out of the gate. Deterministic tensions block by their severity. A semantic tension informs. A pending review request never blocks the gate. What the gate never does describes why no verdict refuses a landing on its own.

A verdict may advise that its tension block, with a reason. The propose report and the read of P-x@n show each advised tension with the blocks the reviewer cites. The person answers once for the advised tensions of that version, and an agent relays it with rdy_answer or rdy_resolve. An accepted tension blocks until a side's content changes. The acceptance binds to the two texts, so every view or proposal that holds them is blocked too. An answer covers only the advised tensions the person saw: rdy refuses it when that set changed.

Severity is part of a tension id, so an acceptance gives the tension a new id. The reply lists each accepted tension with its new and its old id. It also lists every view where a tension on the same two texts now blocks.

Each block of a judged pair is a side wherever it holds the judged text. That is every in-flight change that writes that text, and canon when canon holds it. A canon side pairs only with a change whose view does not write that block. So another view's edit of the block leaves this view's tension as it was. A repin or a tracking-field edit keeps the text, so it never resolves a semantic tension.

The review queue also serves requests for agent checks. rdy_review_next {kind} takes tension, a check name or any, and any offers the check requests first. A check request is a stored record that the author or a person makes with rdy_review, and it names its case hash. rdy labels it rq- and its 64 hex digits. A check verdict is pass, concern or fail, recorded as a REVIEW that names its request. A check request ends when a verdict answers it, or when its case hash no longer holds. Tension requests stay derived from candidate pairs, and an accepted tension keeps its wider lifetime.

Lifecycle and dismissal

A tension is open when rdy detects it. It is resolved when the trigger no longer holds. That happens when a change edits a side so the trigger is gone, a side leaves every live view and canon, or a decision settles it. rdy records the resolving change with the tension. Nothing resolves a tension by hand; a resolution is always a change or a decision.

rdy computes tensions over canon as well as between in-flight changes, for the kinds that describe a standing condition: fork, duplicate definition, deprecated reference, value disagreement, restatement drift, and semantic tensions once judged. Such a tension, with all its sides in canon, stays open until its trigger stops holding; a semantic one stays until a side's content changes or someone dismisses it. It never refuses a landing, and coverage counts it. The other kinds resolve when their last in-flight side lands.

The landing of one side does not resolve a tension, because the trigger still holds for the other side. In the landing batch, rdy re-keys every tension with a landed side. The batch logs the old one as resolved and the new one as opened, and each names the other in rekey. The new one has that side as canon@<landing>, and opens only if the trigger still holds against canon. An edit collision continues as the other view's recorded conflict. A premise shift resolves when its last in-flight side lands; in canon, a stale citation is a suspect.

A tension is dismissed by a recorded review. rdy_resolve with a dismiss reason, or rdy resolve <tension> --dismiss <reason>, writes a review with verdict dismiss. The tension id includes the involved versions, so the dismissal holds until either side changes. A dismissal clears the tension for the gate only: coverage keeps it as a dismissed coverage issue at a reduced weight.

Requirement

Only a reviewer-role or human session whose actor differs from the author of every side dismisses a blocking tension.

Any session may dismiss an advisory tension, except a semantic tension that carries advice to block. That one follows the rule for a blocking tension, so the author of a judged text cannot dismiss the advice. A dismissal by the wrong role fails with E_PERMISSION, and a dismissal by an author of a side fails with E_SELF_REVIEW. A different run of the same actor is not independent, because runs are self-declared. See Errors and warnings.

Tensions at the gate

The gate refuses a blocking tension only when at least one side is inside the proposal and every side would be in canon after the landing. A tension whose sides are all canon already never refuses a landing. A tension between two in-flight views refuses neither landing. It shows with blocking severity in the propose report and in the inbox. The first view lands, and the re-keying above gives the second view a canon-side conflict or tension that refuses until it is resolved or dismissed.

Claim

Two colliding views can always land one after the other, and an abandoned view can never block someone else's landing.

A tension with every side inside one proposal refuses that proposal, for example two forking decisions both proposed from one view. The gate issue is E_BLOCKING_TENSION. An unresolved conflict on a block the proposal writes is E_CONFLICT_UNRESOLVED, and rdy reports a continued collision once, as the conflict. Conflicts have their home in Canon, views and proposals.

Coverage

Coverage reports what the documentation has not yet grounded, linked, settled or applied, as coverage issues that name their fix. rdy computes it from the current state. Coverage and confidence describes coverage and the confidence it gives agents.

The accepted gap

Suspects follow pinned edges. Tensions follow the edges and the deterministic candidate rules. Blast radius follows declared edges. When two blocks contradict each other and share no edge, no section and no entity, the tools do not surface it. Related decisions narrow that gap too: they also list a decision whose text names the entity. rdy accepts the rest of the gap, rather than add a judgment to the gate.

Three things cover the rest. An editor's briefing lists the other content blocks of the section and the blocks tied to the same entities. Agents link what they write, so edges exist, and briefings follow those edges. A human approves every landing the authority policy does not. The last is the real guarantee, which is why the approval card shows computed facts beside the author's words.

Two tensions narrow the gap with no link at all. Value disagreement and restatement drift catch the common case: prose that restates a fact found elsewhere. Related decisions show a new decision the rulings it touches.

A snapshot of rdy documentation at v0.57.0.