rdy documentation v0.61.0

Concepts

Canon, views and proposals

Work in rdy happens in views, and it lands in canon. A view is a private line where an agent or a person writes, and nobody else is affected. Canon is the one accepted line, and only the gate moves it. Between the two sits the proposal: a closed set of changes, with a version, that a person approves. This doc describes each of them, how conflicts are kept as data, and how a tag freezes a version of canon.

Changes

A change is the unit of writing. It holds a set of ops. Each op creates, updates, moves or deletes one block and names the block version it builds on. It holds provenance: actor, run, role and time, with an optional intent or alternative link, all taken from the session. Where stable content needs it, it holds a justification, as Decisions describes.

Base version
Each op in a change names the block version it was based on. A write whose base is no longer the block's current version in its own view is refused with E_STALE_BASE; the fix is to read again.
Change
A change is the unit of writing: a set of ops with provenance and, where stable content needs it, a justification. The store computes its dependencies from the base versions its ops name; writers never declare them. Changes to different blocks commute.
Change pool
The change pool is the one shared set of every committed change, visible to every client at once. Visibility never waits for a merge.
Op
An op is one step inside a change: create, update, move or delete one block. It names the base version it was built on.
Provenance
Provenance is who made a change and in what context: actor, run, role, time, and optional intent and alternative links. It comes from the session, never from the writer's declaration, and rdy show --blame shows it per block version.

The store computes a change's dependencies from the base versions its ops name. Writers never declare them. Dependencies make the pool of changes a DAG, and a change enters a view only together with its dependencies. Changes to different blocks commute: they combine in any order.

Claim

rdy refuses a write with E_STALE_BASE when its base is no longer the block's current version in its own view; the fix is to read again.

Every committed change enters one shared pool, visible to every client at once. Visibility never waits for a merge. The pool and the records it holds have their home in "The store" in How rdy is built.

Views

A view is a named base landing plus a set of included changes. Writes commit into a view, and a proposal is made from one. A view records its owner: the session that created it, or that first wrote into it. An agent's session gets its own view by default, named from its run, or work-<actor> without a run. A person's default view is work, and an agent never writes there.

Exclude
Exclude removes changes from a view. Excluding a change that other included changes depend on is refused unless the dependents are excluded too (--cascade).
Fork
A fork creates a new view with the same base, pin and included set as another view. Reads and forks work on any view; only the owner changes a view.
Include
Include adds changes from any view into your own, with every missing dependency. Including another agent's work is a set operation, not a merge; the change ids do not change.
Operation log
The operation log is the chain of a view's operations: create, fork, include, exclude, rebase, undo, close and own. Any view operation can be undone, and nothing is ever removed from the chain.
Undo
rdy undo reverses a view operation: it appends the inverse op to the operation log. Rebases cannot be undone; a landing is undone by a revoking decision.
View
A view is a named base landing plus a set of included changes. It is where work happens: writes commit into a view, and a proposal is made from it. A view records its owner, and unpinned views rebase automatically when canon moves.
View owner
The owner is the actor and run that created a view. A non-human session may commit, include, exclude, undo or close only in views it owns; a human may do so in any view.

One machine. Three agents write in their own views. A gathering view includes their changes. A proposal is made from that view, and an approval lands it in local canon.

open full size

Diagram source
flowchart LR
    A["View of agent A"] -- include --> G["Gathering view"]
    B["View of agent B"] -- include --> G
    C["View of agent C"] -- include --> G
    G -- propose --> P["Proposal"]
    P -- approve --> L["Local canon<br/>one new landing"]
One machine. Three agents write in their own views. A gathering view includes their changes. A proposal is made from that view, and an approval lands it in local canon.
Table 1
OperationWhat it does
createA new view at canon's head, or at a tag or landing with --base; a view on an older base is pinned
forkA new view with the same base, pin and included set as another view
includeAdds changes from any view, with every missing dependency; a set operation, never a merge
excludeRemoves changes; refused with E_HAS_DEPENDENTS while other included changes depend on them, unless --cascade removes those too
compareLists, per block, what is added, deleted, changed, moved or conflicted between two views, or a view and canon
undoAppends the inverse of a view operation
closeStops the view from rebasing and taking commits or proposals, and withdraws its open proposal; an undo reopens only the view, and nothing is deleted
rebaseMoves the view onto a new canon; rdy does this itself on every landing

A read is open and a change needs ownership. Fork, compare and reads work on any view, and an include may take its changes from any view. Commit, include, exclude, undo, close and propose change the target view. A non-human session may do them only in a view it owns, and E_VIEW_OWNER refuses the rest. A view with no owner takes a commit, and that commit claims it. A human session may do them in any view. A replay changes the target view too, and only the session that owns the view may replay into it, a human session included. Nobody can write changes into another agent's view; they offer them, and the owner includes them. Ownership stays per machine and never syncs: on each machine, a person hands a view to an agent there.

Every view operation is appended to the view's own chain, which is its operation log. rdy undo appends an inverse and never removes an entry. The undo of a commit or an include excludes those changes, and the undo of an exclude includes them again. The undo of a close reopens the view, but not its withdrawn proposal. An unpinned view also rebases onto the current canon in the same step; a pinned view keeps its base. A closed view takes no other undo. A rebase cannot be undone, and a landing is undone by a revoking decision, never by the log.

An undo never re-includes landed work, and it never excludes changes that have all landed; E_UNDO_LANDING refuses it. On a pinned view, a re-include can need a dep that landed after the pin. An undo refuses it. rdy view include adds that dep, because an include is an explicit act.

Only a view that someone pushes leaves the machine. Anyone on the team may pull a pushed view and keep writing in it, and each change keeps its author. A view push needs the hub's latest head for that view, and a pull adds the unpushed local ops after the hub's. This is how a team shares one canon.

A pushed view round trip. You push the view guest-links to the hub. A teammate pulls it, writes in it and pushes it back, and you pull it. Your agent owns your copy, the hub copy has no owner, and their agent owns theirs.

open full size

Diagram source
flowchart LR
    subgraph YM["Your machine"]
        Y["guest-links<br/>owner: your agent"]
    end
    subgraph HB["Hub"]
        H["guest-links<br/>no owner"]
    end
    subgraph TM["Teammate's machine"]
        T["guest-links<br/>owner: their agent"]
    end
    Y -- "1. push" --> H
    H -- "2. pull" --> T
    T -- "3. write, then push" --> H
    H -- "4. pull" --> Y
A pushed view round trip. You push the view guest-links to the hub. A teammate pulls it, writes in it and pushes it back, and you pull it. Your agent owns your copy, the hub copy has no owner, and their agent owns theirs.

Two writers on one pushed view. The hub's chain is H then t1, and your chain is H then y1 and y2, so your push is refused. After a pull your chain is H, t1, y1' and y2'. y1 and y2 stay readable, marked replaced.

open full size

Diagram source
flowchart LR
    subgraph HUB["Hub copy of guest-links"]
        h0["H"] --> h1["t1"]
    end
    subgraph BEFORE["Your copy before the pull"]
        b0["H"] --> b1["y1"] --> b2["y2"]
    end
    subgraph AFTER["Your copy after the pull"]
        a0["H"] --> a1["t1"] --> a2["y1'"] --> a3["y2'"]
        r["y1, y2<br/>kept, marked replaced"]
    end
    BEFORE -. "push refused" .-> HUB
    HUB -- pull --> AFTER
Two writers on one pushed view. The hub's chain is H then t1, and your chain is H then y1 and y2, so your push is refused. After a pull your chain is H, t1, y1' and y2'. y1 and y2 stay readable, marked replaced.

Rebase on landing

When a proposal lands, every open, unpinned view with work rebases onto the new canon in the same batch. The proposal's own view rebases too, pinned or not. The changes the landing carried drop out of the view, and its remaining changes are merged on the new canon. Ops are not rewritten and change ids do not change. A change whose base the landing superseded becomes a conflict with canon as one side. The rebase records conflicts only on the blocks that both the landing and the view touch.

Pinned view
A pinned view keeps its base: it is created on a tag or an older landing, or with --pin, and does not rebase when canon moves. The exception is its own proposal's landing, which rebases it onto the new canon. Its collisions with canon are reported when a proposal from it reaches the gate.
Rebase (view)
When a proposal lands, every live, unpinned view with work rebases onto the new canon in the same batch, and so does the proposal's own view, pinned or not. Its remaining changes are merged on the new canon, and a change whose base the landing superseded becomes a conflict with canon as one side. Rebase never fails.
Claim

Rebase never fails. A collision becomes a recorded conflict, and the view's owner learns of it through the inbox.

A pinned view does not rebase when canon moves. It keeps its base, for example a line of work compared against a frozen version. The one exception is the proposal's own view: when its proposal lands, it rebases onto the new canon, pinned or not. Its collisions with canon are not recorded as conflicts; the gate reports them when a proposal from it reaches the gate. An empty unpinned view floats: its effective base is canon's head, read at use.

Replaying changes

A replay re-applies chosen changes onto a view you own, as new changes, without their dependencies. Use it when work rests on changes that will not land, such as a proposal the approver set aside. An include cannot do this, because it brings every dependency, and an exclude of the base takes the work built on it too. Run it with rdy view replay <view> <change>..., or with the replay op of rdy_view.

Replay
A replay re-applies chosen changes onto a view as new changes, without their dependencies; a block whose version differs from the source op's base becomes a conflict, unless the replayed text already equals it. The replay from a decision point is the guided workflow for a large reversal built on it. You open a pinned view at the landing before the old decision, land the new decision there, and replay later changes onto it. Changes that relied on the old decision come through as conflicts. Decisions re-applied by a replay need re-affirmation, or they stay conflicts.

Each replayed op applies to the view's current version of its block. Where that version differs from the version the source op was built on, the block becomes a conflict, with the replayed text as one side. A replayed op whose result already equals the view's version records no conflict, at the replay and in every later merge. A create needs its parent in the view, or from a clean replay in the same call, as an include counts every id it creates. Without it, the replay is refused with E_DEPS_MISSING. The source changes may be in flight or landed, and neither their view nor canon changes.

A replayed change keeps its source's justification, message and briefing token. You author it, and it records the change it came from in replayed_from. A replay of a change bound to an alternative-set member stays bound to that member. Its dependencies are the changes that made the view's versions it builds on, as for any write, and never its source's dependencies. So excluding or undoing such a change takes the replay with it. A replay is a view operation: it returns consequences, and rdy undo removes it.

A replay takes 1 to 1,000 changes, with at most 10,000 ops and 16,777,216 encoded bytes in all. It applies them in their dependency order among themselves, with ties broken by full hash. Only an open view that you own takes a replay, for a person too. One rdy undo removes every change of one replay. rdy view show and rdy_view name each replayed change's source. A failed replay writes nothing.

A person can watch a view while an agent writes in it. rdy site --scope view:<name> gives the view's link, and each open page updates as the agent writes. The page shows the view in review mode, against canon.

Conflicts as data

A conflict arises when two included changes edit one block from one base. It also arises when an included change collides with canon after a rebase. A replay records one when the view's version of a block differs from the replayed op's base, and the replayed result differs from that version. rdy records it in the view as data: the block, the base and each side, with both versions kept in the store. Its id is the hash of block, base and sorted sides, so the same conflict has the same id in every view.

Conflict
A conflict is data recorded in a view when two sides edit one block from one base. The sides are two included changes, an included change and canon after a rebase, or a replayed change and the view's version. The view keeps both sides and reads the block as its base version, marked. Any later change that writes the block depends on every side and so resolves it. The gate refuses only conflicts on blocks the proposal writes.
Constraint

Commands succeed and report conflicts. Only the gate refuses, and only for conflicts on blocks the proposal writes.

A conflicted block reads as its base version, marked with the conflict id and a one-line summary of each side. Neither side wins silently. Any later change in the view that writes the block depends on every side, so it resolves the conflict. The writer bases that change on the conflict's base or on one side's version; any other base is E_STALE_BASE, and no base is E_BAD_INPUT. A conflict with one side excluded is gone. On a block that a landing froze, the one resolving write is to take the landed side: the block then reads the frozen version.

A conflict inside one view is not an input error, because nobody wrote against stale state on purpose. A stale base in the writer's own view stays E_STALE_BASE, because the writer read old state. Conflicts between views also open tensions, as Suspects and tensions describes.

A canon side may differ from an includer's base only by its order key. That side is no conflict for an edit that keeps the base's parent and order key. The view keeps the includer's version, with its old order key, until the includer's landing. At that landing, the block takes canon's order key with the includer's other fields. So a body edit never undoes a move that landed first. A move, a parent change, a re-key or a delete against such a side still conflicts. The edit-collision tension follows the same rule.

Proposals and versions

A proposal is a set of changes, closed under dependencies, put forward for canon. It is made from a view with rdy_propose or rdy propose. It carries the view's whole included set, or a named subset from rdy_propose. A subset must itself be closed, or E_DEPS_MISSING lists what is missing. A proposal records canon_at, canon's head when the version was written. A proposal may name an alternative set and the member it chooses.

Proposal
A proposal is a set of changes, closed under dependencies, put forward for canon. It may name an alternative set and the member it chooses. The proposal is also the batch unit of decision intake: one iteration, one proposal, one approval.
Proposal version
Each update to a proposal makes a new proposal version, P-x@n, under a stable proposal id. Approval is bound to a version: the approver lands what they saw, and a proposal that moved is refused with E_PROPOSAL_MOVED.

Each rdy_propose on a view whose proposal has not landed makes a new version. The proposal keeps one stable id, shown as P-x, and each version is P-x@n. A version may add or replace changes, and each is closed under dependencies. The result lists the view's conflicts and marks as blocking the ones on blocks the version writes. A proposal travels with its plan answers and the author's summary, as Briefings and consequences and The gate and approvals describe.

An approval names one version, and rdy lands only that version. Version binding describes what happens when the proposal or canon moves after the approval. The proposal is also the batch unit of decision intake: one iteration, one proposal, one approval.

Closing a view withdraws its open proposal for good. The latest version then reads withdrawn (view <name> closed), and nothing is deleted. A withdrawn proposal leaves the queue, the tension checks and the site's version menu. Approving or landing it is refused with E_VIEW_CLOSED. The undo of the close reopens the view, but not the proposal. To continue the work, propose the view again, and the new version is open.

Canon as one line

Canon is the view of the accepted documentation. Only a gate advances it: this project's gate, or the hub's gate for the landings that a pull or a take brings. Each landing writes a landing record. The record names the proposal version, the approval with its assurance and evidence, the previous landing, and the changes it landed. The chain of landing records is canon's history, and the site renders from canon.

Canon
Canon is the view of the accepted documentation. Only the gate advances it, and it is one linear chain of landings; release lines inside canon are not offered.
Landing
A landing is the atomic, immutable record that a proposal entered canon. It holds the proposal version, the approval with its assurance and evidence, the previous landing, and the ids of the changes it landed. The chain of landings is canon's history. A landing is never rewritten; a later dispute is its own object that names the landing.
Snapshot
A snapshot maps every block id to a version at one landing. Each landing names its snapshot, and the merge that builds it is one deterministic function.
Constraint

Canon is one linear chain of landings. Release lines and branches inside canon are not offered.

A landing is atomic. One store write carries the acceptance of the proposal's decisions, the final proposal version, the snapshot delta and the landing record. The same write rebases every other view. Either all of it is recorded or none of it is. A landing is never rewritten; a later dispute is its own object that names the landing. A mistaken landing is undone by a revoking decision, going forward, with nothing deleted.

Each landing's snapshot comes from one deterministic merge of canon and the proposal's changes, never from running the changes again one by one. The same merge builds every view and checks every proposal, so what the gate saw is what lands. "The store" in How rdy is built describes the records.

On a project under Share, views land in local canon, as on any project. A pull replays the unpushed local landings onto the hub's tip, and each one passes the gate again. A replayed landing gets a new hash, and the original stays readable, marked replaced. A push sends the unpushed local landings to the hub, and the hub's gate rules decide what it takes. When the hub refuses a push, taking the hub's canon moves local canon to the hub's tip, and the local landings stay readable, marked replaced. Local work never waits for the hub: a landing, a tag and a read never need it.

Four cases of canon with a hub. One: the hub takes a push, and its canon becomes L1 L2 A B. Two: local canon is behind, so a pull replays A onto the hub's tip as A', and A stays readable, marked replaced. Three: the hub refuses a push, local canon takes the hub's canon L2 T, and A stays readable with its changes available to a view. Four: the hub's gate rules allow a force push, the hub's canon becomes L2 A, and T stays readable on the hub, marked replaced.

open full size

Diagram source
flowchart TB
    subgraph C1["1. Push taken"]
        direction LR
        c1l["Local: L1 L2 A B"] -- push --> c1h["Hub: L1 L2 A B"]
        c1o["Hub before: L1 L2"] -.-> c1h
    end
    subgraph C2["2. Behind, so pull replays"]
        direction LR
        c2h["Hub: L2 T"] -- pull --> c2r["Local: L2 T A'<br/>A kept, marked replaced"]
        c2l["Local before: L2 A"] -.-> c2r
    end
    subgraph C3["3. Hub refuses, take the hub's canon"]
        direction LR
        c3l["Local: L2 A"] -- "push refused" --> c3h["Hub: L2 T"]
        c3h -- take --> c3r["Local: L2 T<br/>A kept, marked replaced<br/>its changes can go into a view"]
    end
    subgraph C4["4. Force push, allowed by the hub's gate rules"]
        direction LR
        c4l["Local: L2 A"] -- "force push" --> c4r["Hub: L2 A<br/>T kept, marked replaced"]
        c4h["Hub before: L2 T"] -.-> c4r
    end
Four cases of canon with a hub. One: the hub takes a push, and its canon becomes L1 L2 A B. Two: local canon is behind, so a pull replays A onto the hub's tip as A', and A stays readable, marked replaced. Three: the hub refuses a push, local canon takes the hub's canon L2 T, and A stays readable with its changes available to a view. Four: the hub's gate rules allow a force push, the hub's canon becomes L2 A, and T stays readable on the hub, marked replaced.

Tags and versions

A tag is an immutable, content-addressed record that names one landing with a Semantic Versioning name, such as v1.2.0. It freezes a version: tag:v1.2.0 always reads exactly the documentation and decisions that canon held at that landing. Canon is not frozen. After v1.2.0 it keeps moving towards the next version, and sessions keep landing proposals as usual.

Tag
A tag is an immutable, content-addressed record that names one landing with a Semantic Versioning name, such as v1.2.0. An approver creates one with rdy tag, in person or relayed. Versions are unique and increase along canon. A tag is a local record; to make it readable by an audience is to publish it.
Version
A version is what a tag names: the frozen snapshot of everything in canon at that landing. tag:v1.2.0 always reads the same documentation and decisions. Canon moves on toward the next version; a published version is never changed, and a correction ships in the next one.
Version position
The version position says where a state stands relative to versions: the highest version at or below its base landing, the landings since, and for a view its unlanded changes. Every page of the site, rdy status and rdy_overview show it.
Constraint

Versions are deliberate, never automatic. Writes, proposals and landings never create one; only an approver who runs rdy tag does.

Requirement

A tag name is a SemVer 2.0.0 version, with one optional leading v, without build metadata; anything else is refused with E_BAD_TAG_NAME. A new tag name holds at most 256 bytes, and a longer one is refused with E_BAD_INPUT.

Versions are unique and they increase along canon. v1.0.0 and 1.0.0 are one version, and a second tag for it is E_TAG_EXISTS. A new version must sort above every existing version by SemVer precedence. Its landing must be at or after the landing of the current highest version. Otherwise E_VERSION_ORDER names the current highest version and its landing. By default a tag names canon's head, and --landing <id> names an earlier landing in the chain. Only a session with the approver role creates a tag, in person or relayed. A tag is never moved or deleted.

The current version is the highest version. Every surface reports a version position: the highest version at or below the state's base landing, the landings since, and a view's unlanded changes. The site's header shows the version, such as v1.2.0, or unversioned, with a +3 chip for the landings since. Its colophon reads v1.2.0, 3 updates since, and a rendered tag shows as a frozen snapshot. rdy status, rdy tags, rdy log and rdy_overview show the same position in their own words.

As-of reads

Every read takes a scope: canon, view:<name>, inflight (canon plus every live view's changes), proposal:P-x@n, tag:<version> or landing:<hash>. proposal:P-x@n reads one proposal version as its base plus its changes, and proposal:P-x reads the latest version. tag: and landing: are as-of reads of canon at the landing they name, and tag:1.2.0 and tag:v1.2.0 resolve to the same version. A landing hash may be a unique prefix of at least six characters. As-of scopes and proposal versions are read-only, and a write always targets a view by name. A view name may not be canon or inflight, nor contain :, so no view can take tag:, landing: or proposal: (E_RESERVED_VIEW).

As-of read
An as-of read reads canon as it was at a tag or a landing, through the tag: or landing: scope. It is a transaction-time read; a valid-time read, "as it should have been", is rdyhub's.
Scope
A scope says which state a read sees: canon, view:<name>, inflight (canon plus every live view's changes), tag:<version> or landing:<hash>. The last two are as-of reads.

An as-of read is a transaction-time read: what canon held then. A valid-time read, "as it should have been", is rdyhub's.

Roll forward only

A version, once published, stays frozen. A correction ships in the next version, and rdyhub may attach an errata notice to an older published version without a change to its content. Because canon is one line, there are no maintenance releases of an older version from the same project: after v2.0.0-rc.1, v1.9.0 is refused. A product that supports an older version keeps its docs in a separate project, forked at that version's tag.

Maintenance line
A maintenance line is a supported older product version with its own docs. Canon is linear, so a project never branches. Each supported version is its own project, forked at a tag, so it has its own repo id. rdyhub groups the sibling projects into a release family with one site.

A tag is a local record. A tag that an audience can read is published, and publishing happens on rdyhub. Publishing needs an account with the authorizer role to authorize the disclosure, as The gate and approvals describes.

Alternatives and intents

An alternative set groups the views that answer one question, each worked on in its own member view, usually a fork of a common start. Members are visible to each other: a session in one member sees the others in rdy_overview, and in rdy_context for the blocks they touch. rdy alt compare shows each member against canon side by side, with each member's tensions.

Alternative
Alternatives are changes that answer the same question, each worked in its own member view of an alternative set. Members are visible to each other and compared side by side. At the gate one member lands and the others are written into the decision's considered options and kept.
Alternative set
An alternative set is a stable object that groups the member views that answer one question, with a status of open, chosen or abandoned. A proposal from a member view must name the set and its chosen member.
Intent
An intent is an advisory, expiring note that an agent posts on an area or blocks with its angle. It never locks anything; a write under another session's intent succeeds and says so.
Requirement

A proposal from a member view names its set and its own member as the chosen one; E_ALT_UNCHOSEN and E_ALT_MEMBER refuse the rest.

Requirement

A change that one member alone held at the set's creation, or at that member's join, stays bound to it, whatever views include later.

A change that two or more members held is common ground, and it binds to no member. Bindings fixed earlier never change when a member joins. add and remove change the members of an open set only; a chosen or abandoned set takes neither. A removed member releases its bindings, and a change it shared stays common ground. A bound change lands only in a proposal from its member's view that chooses that member, else E_ALT_MEMBER.

At the gate one member lands. The landing records the choice, sets the set to chosen, and closes the other member views, kept and never deleted. Each closed view's reason reads alternative chosen: as-<id> chose <member>. These closes withdraw the losing members' open proposals. The unchosen members are written into the decision's considered options. rdy alt abandon closes every member with the reason alternative set abandoned: as-<id>: <reason>.

A chosen set keeps its losers bound. A losing member's changes land only in a proposal that records a decision superseding or refining the choice, else E_ALT_CHOSEN. When the choosing landing recorded no decision, a revisit lands with a new decision of its own. A loser never releases itself: the decision must come from a change that is not bound to a losing member. An abandoned set binds nothing.

An intent is an advisory note with an expiry that an agent posts on an area or on blocks, with its angle. The default expiry is two hours, the minimum one minute and the maximum seven days; a renewal writes a new version. An intent never locks anything: a write under another session's intent succeeds and says so in its response. Intents feed area-overlap tensions, inbox events and the inflight section of a briefing.

At the landing that chooses a member, rdy writes each unchosen member into the options of one decision. That decision is the proposed decision the version creates that answers the set's question, through an answers link. Without one, it is the only decision the version creates. A decision in canon is never the target, because an accepted decision is frozen. Each entry reads <label> (as-<id>/<view>, not chosen), after the options the author wrote. A version that chooses and names no such decision is not ready, with E_ALT_DECISION.

Before the landing, the card shows these entries as the fact Considered options, a JSON list, after Decisions. The fact Alternative set follows it, as as-<id>@<set version>. When the set's label, question, members or target change after the assessment, the approval refuses with a fresh card, as for a moved version. The acceptance change writes the options that the card showed.

A snapshot of rdy documentation at v0.61.0.