Concepts
Blocks, docs and folders
Everything in rdy is a block: a paragraph, a requirement, a term, a diagram, a section, a doc, a folder, a decision. This doc describes what a block is and how a pack gives it a type. It then covers docs and folders, how you address a block, which blocks readers see, and how content moves from draft to stable.
Blocks
A block has a stable id, a type, typed fields and a body of inline text. It also has typed links to other blocks, a parent and an ordered list of children. Each edit makes a new block version, named by the BLAKE3 hash of its canonical encoding. The id never changes, across edits and across moves, so links and history survive a restructure.
- Block
- The block is the unit of everything in rdy. A block has a stable id, a type, typed fields, a body, typed links, a parent and ordered children. Each edit makes a new block version; the id stays the same across edits and moves.
- Block version
- A block version is one immutable state of a block, named by the BLAKE3 hash of its canonical encoding. History is the chain of versions. A ref or premise pins the target's content hash: the hash of its content without pins, derived fields or its order key.
- Body
- The body is a block's inline text. It may hold refs and a small inline Markdown subset: bold and italic with
*, code, links and lists; underscores are always literal, so__init__renders as typed.
- Link
- A link is a typed edge from one block to another, such as
decided_by,implements,describes,supersedesoranswers. Reader links live in the doc file; justification links live only in the store. A write that carriesimplements: D-xalso writes animplementslink to D-x from each content block it creates or rewrites.
id: c-7KQ2M
type: claim
parent: s-1DENT
body: "A leaver opens a new wallet and transfers their balance on the {{t-MEDGR}}."
links: { describes: [m-WALET] }The body may hold refs and a small inline Markdown subset: bold and italic with *, inline code, links, and bullet and numbered lists. Underscores are always literal, so __init__ renders as typed. Links are typed edges, such as describes, decided_by, implements or supersedes. Some link kinds live only in the store, as Doc assets and supporting types describes.
Types and traits
Every block has a type. A pack defines most types, and the engine defines a few that exist in every pack. A type declares its id prefix, its fields, whether a body is required or forbidden, which children it allows, and its traits.
- Block type
- A block type is the kind of a block, defined by a pack or by the engine. A type declares its fields, allowed children, allowed link kinds, its engine traits and its class, doc asset or supporting. The engine types
doc,folder,publication_profile,decision,question,finding,source,instruction,review,tensionandintentexist in every pack.
- Presentational trait
presentationalis the trait for callouts, tabs, layout hints and other flair. A presentational block needs no justification and no briefing, and it never makes a block suspect.
- Trait
- A trait is an engine behavior a block type declares, so that checks work under any pack:
normative,informative,defines,describes,asset,structuralandpresentational. The justification rule and the duplicate-definition check read traits, not type names.
A trait is an engine behavior, so that checks work the same under any pack. The justification rule, the duplicate-definition check and coverage read traits, never type names.
| Trait | Meaning | What the engine does with it |
|---|---|---|
normative | Its meaning is part of the documentation: a claim, requirement, constraint or interface contract | Needs a justification when stable; contradiction and duplication checks; coverage |
informative | Explains without binding: prose, an example, a note | Lighter checks; an editorial reason is enough |
defines | The one home of an entity: a term, component, actor or interface | Undefined-term and duplicate-definition checks; glossary and entity pages |
describes | Says something about an entity, through describes links | Divergence checks between blocks that describe one entity |
asset | Carries a binary blob or diagram source | Blob storage, alt-text checks, rendering |
structural | Organizes other blocks: a section, a doc, a folder | Skeleton and stub checks |
presentational | A callout, a tab set or a layout hint | No justification, no briefing, never makes a block suspect |
A presentational block is flair, not meaning, so the justification rule and the briefing rule skip it.
An entity is defined once. The block with the defines trait is its single home. Other blocks refer to it with a ref or a describes link, and never restate it. That is what makes "one component described differently in two places" something rdy can detect.
The engine types are doc, folder, publication_profile, decision, question, finding, source, instruction, review, tension and intent. A pack may add optional fields to them and may not remove or change their core fields. A finding records what surfaced, with its evidence as a field. A source names an external truth.
An instruction holds one rule for agents, with its why and how to apply it, in one body. It is normative content like any other, with no coverage exemption. Its required decided_by reason counts for Governed, and Grounded scores its entity ties and normative mentions. File formats gives its fields and selectors.
Packs
A pack is the schema of a project. It defines doc types with their skeletons, and block types with their fields, traits and classes. It also sets lifecycle defaults, areas, tension severities, rule checks and the render templates. A pack can extend another pack or replace it. Packs are versioned, a project pins one version, and rdy pack check validates a pack.
- Doc type
- A doc type is a kind of document a pack defines, with a skeleton of required and optional sections.
rdy-standardships types such as overview, principles and open questions. A pack names adefault_doc_typeforrdy new doc.
- Pack
- A pack is a schema that defines doc types and skeletons, block types with their fields, traits and classes, lifecycle defaults, areas, tension severities, rule checks and render templates. A pack can extend or replace another, and a project pins one version. The default pack is
rdy-standard; a docs pack is one more pack, not a core change.
- Skeleton
- A skeleton is the set of required and optional sections a doc type needs. Missing skeleton sections show in coverage, and a pack may refuse promotion to stable while any are missing.
The default pack is rdy-standard. Its doc types are page, overview, principles, constraints, components, flows, decisions-log and open-questions, and rdy new doc uses overview unless you name a type. Its content types are section, prose, claim, requirement, constraint, term, component, actor, interface, value, entity, flow, example, note, rationale, table, diagram, figure and code.
Packs are the extension point. A docs pack with procedures, parameters and endpoints is one more pack, not a change to rdy. So is a project pack with its own doc types. The pack format is in File formats.
Every pack holds the engine block type authority_policy, and no pack key changes it. The engine holds one template for every pack: an empty agent_may_accept, roles, require and owners. So the template accepts nothing by itself. rdy_policy {op: "init"}, or rdy policy init, writes a proposed decision and a policy block from that template, and the block implements the decision. It then proposes the view for a person to approve.
Docs and folders
A doc is a block whose children form the ordered tree of one document. It has a required name, a title, a doc_type from the pack and an optional lifecycle. A doc may hold content blocks directly, before its first section, so a short doc needs no section at all. A doc type's skeleton says which sections the doc needs, and missing ones show in coverage.
- Doc
- A doc is an engine-type block whose children form the ordered tree of one document. It has a required
name, atitle, adoc_typefrom the pack and an optional lifecycle; its parent is a folder or the top level. A doc may hold content blocks directly, not only sections.
- Folder
- A folder is an engine-type block that groups docs and other folders to any depth. Its
nameis the directory name on disk and the path segment on the site. A folder rename or move is one exact, versioned change, so links survive it.
- Section
- A section is a structural block that organizes other blocks inside a doc. A section may carry a lifecycle, and a doc type's skeleton says which sections it needs.
A folder groups docs and other folders, to any depth. Folders are blocks, not paths. A rename or a move is one exact, versioned change, and every link survives it. Empty folders are allowed. A folder is a directory in the working copy and a path segment on the site.
Names and paths
A name is the stored, file-safe identifier of a folder or a doc: 1 to 64 characters from [A-Za-z0-9._-], unique among siblings when case is ignored. When you give none, rdy assigns one from the title, once. It never changes by itself. A change to the title is not a rename; a rename is an explicit update of name. A name may not start with . or _, may not be index, and may not look like a block id. For the prefixes d and fd, this test ignores case, because a removed doc's file and a removed folder's directory are named by the block's id. So d-abcde and fd-7kq2m are refused, but c-abcde is a valid name.
- Name
- A name is the stored, file-safe identifier of a folder or doc: 1 to 64 characters from
[A-Za-z0-9._-], unique among siblings without regard to case. It is assigned once from the title and never changes implicitly; a rename is an explicit update ofname.
- Path
- A path is the names along a folder's or doc's chain of parents, joined with
/, such aswallets/transactions. Paths are derived, never stored, so a folder rename moves everything under it. Blocks inside a doc have no path of their own.
A path is the names along the chain of parents, joined with /: wallets/transactions. Paths are derived, never stored, so a folder rename moves everything under it with no further writes. Blocks inside a doc have no path of their own. A decision, a question, a finding or a source in a folder takes the folder's path. One at the project root has no path.
rdy new folder <path> and rdy new doc <path> create at a path and create missing parents in the same change. rdy ls prints the tree. A move changes a block's parent, not its id. rdy refuses to delete a folder or a section that still has children. See CLI.
Ids, keys and refs
This section describes the three ways to name a block: its id, its optional key and a ref to it.
Ids
An id is a block's stable identity: a type prefix plus five random Crockford base32 characters, such as c-7KQ2M, d-1DENT or D-W2HXR. Random ids let parallel writers create blocks without a central counter. Wherever a command or tool takes a block, an id and a path are interchangeable. Text that matches the id grammar is an id, and anything else is a path.
- Id
- An id is a block's stable identity: a type prefix plus five random Crockford base32 characters, for example
c-7KQ2MorD-W2HXR. It never changes across edits or moves. Wherever a tool or command takes a block, an id and a path are interchangeable.
Keys
A key is an optional short human id on any block, such as REQ-12, unique within the project. It starts with a letter, holds letters, digits and single -, _ or . separators, and is at most 32 characters. It may not look like a block id. Keys compare ignoring case and are stored as written. A key works wherever an id works: in a ref, in rdy show, and as a target in a write. Two views may give different blocks the same key. For an explicit key, the gate refuses the second landing and names both blocks. A key that rdy assigned gets the next free suffix instead, and the landing lists it.
- Key
- A key is an optional short human id on a block, such as
REQ-12, unique within the project and usable in a ref. A key ref resolves at write or import time and remembers that it was typed as a key. So the site shows the target's current key after a rename. A mirrored ADR's key is its ADR number.
A doc or folder created without a key gets one from its path. rdy lowercases the path, turns each / into ., cuts the result to 32 characters and adds a numeric suffix when the key is taken. When a doc or folder moves or is renamed, its own rdy-assigned key follows the new path, and the blocks under it keep theirs. A new or renamed top-level name takes priority over an rdy-assigned key, which is then derived again. An explicit key always wins and stays when the doc moves. A clash between an explicit key and a path refuses, and the error names both blocks with their ids.
rdy marks each key it derives with key_auto: true in the block's fields. A doc or folder created or imported without a key gets the marker, and so does each key that rdy keys assign gives. rdy show and rdy_context show it. rdy refuses a write that sends key_auto with E_VALIDATION, and its issue is E_FIELD_UNKNOWN. A key that a write sets belongs to the writer, even when it is the same value, so the write drops the marker. Only a key with the marker follows a move, or takes a new suffix on a clash at propose or at landing. A suffix that a landing would take after the version's assessment first refuses the approval with a fresh card, as The gate and approvals describes.
The results of a write, an import, a propose and a landing list the keys rdy derived under keys. At propose, rdy adds a change to the view that sets each new key. In a member view of an alternative set, that change records the set.
Refs
A ref is an inline reference in a body or a string field, written {{id}}, {{key}} or {{id|display text}}. Each ref becomes a references edge, pinned to the target's content hash at write time. When the target changes, the ref goes suspect; Suspects and tensions describes what follows. Without display text, the site shows the target's label.
- Ref
- A ref is an inline reference in a body, written
{{id}},{{key}}or{{id|display text}}. Each ref becomes areferencesedge pinned to the target's content hash at write time. A ref to a value shows the value. One ref grammar serves chat and intake cards.
rdy resolves a key ref at write or import time, and the store keeps the id. The ref remembers that the author typed it as a key. The site therefore shows the target's current key after a rename, and the working copy writes the key back. A key ref to a doc, a folder or a section shows the target's title instead. A ref typed as an id stays an id. Inside a code body nothing is a ref. Inside a diagram body only id-shaped text is a ref, so a Mermaid hexagon node, A{{Decide?}}, stays content. To write a literal {{ in prose, put a backslash before it.
One ref grammar serves chat and intake cards. Readers never see ids on the site. The one place an id reaches a reader is Copy ref, which copies [id] Doc › Section: "snippet…" for an agent chat, pinned to a version on a frozen page. Copy ref writes ids, never keys, because the id is the stable part. "Copy ref and the block toolbar" in How rdy is built describes it.
Doc assets and supporting types
Every block type has a class: doc asset or supporting. The class is a property of the type, declared in the pack, and pack types default to doc asset.
- Doc asset
- Doc asset is the class of block types that readers see: they appear in the folder tree, in working-copy files and on the site. Pack types default to doc asset, and
noteis a doc asset.
- Supporting type
- Supporting is the class of block types that record reasoning rather than content:
decision,question,rationale,review,tension,intent,findingandsource. Supporting blocks never appear in the working tree or on the site, and a commit never deletes them. A decision, a question, a finding or a source may sit in a doc, in a folder or at the project root. Any other supporting type keeps its pack's parent rule.
Doc assets are what readers see. They appear in the folder tree, in working-copy files and on the site. note is a doc asset.
Supporting types record reasoning rather than content: decision, question, rationale, review, tension, intent, finding and source. A supporting block never appears in the working tree or on the site, and a commit never deletes one. It lives only in the store. A decision, a question, a finding or a source may sit in a doc, directly in a folder or at the project root. Any other supporting type keeps the parent rule of its pack. A rationale may be a child of its decision and travels with it.
The class decides where a field or a link lives. A doc file holds content and presentation fields, inline refs, the links a reader follows, structure and the folder path. The store alone holds version pins, provenance, landings, approvals, justification links such as decided_by and implements, suspects, tensions, reviews and intents. A link kind missing from a file means "not stated", never "deleted". A commit therefore never drops a store-only link. "Working copy" in How rdy is built describes the files, and Decisions describes the decision record.
The class also decides which blocks may carry reflects, the engine field that names the code a block follows. A doc asset may carry it. A supporting block may not, because a decision links to code through Implements: trailers. The agent guide describes reflects.
The site can be built from the folder tree alone; the store is needed only to write and to reason.
Lifecycle
A doc or a section carries a lifecycle: draft, stable or deprecated. A block inherits the lifecycle of its nearest ancestor that sets one.
- As-built status
- As-built status says which release ships what a content block describes:
planned,since <version>orunversioned. rdy derives it at the scope you read, from the block's own overrides, a planned section or doc above it, and thebuiltfield of the decisions it cites. It is separate from lifecycle.
- Deprecated
- Deprecated is the lifecycle state of content that is retired but kept. Deprecated content stays readable and linkable. A new ref to it, or a plain mention of a deprecated definition's name or aliases, raises an advisory tension.
- Draft
- Draft is the lifecycle state of content that changes freely. Changes still pass schema checks and land through the gate, but they need no justification, and a briefing is encouraged but not required.
- Lifecycle
- Lifecycle is the state of a doc or section:
draft,stableordeprecated. A block inherits the lifecycle of its nearest ancestor that sets one. A move between states is a proposal of its own, whichrdy-standardgates on human approval.
- Stable
- Stable is the lifecycle state of content held to intent. Every change to a stable normative block needs a justification, and every write to stable content must cite a current briefing.
Draft content changes freely. A change still passes schema checks and lands through the gate, but it needs no justification, and a briefing is encouraged, not required.
Stable content is held to intent. Every change to a stable normative block carries a justification. A change without one raises an unjustified_change tension, which is always blocking in stable content. Every write to stable content cites a current briefing. Justification of stable changes explains the justifications, and Briefings and consequences explains briefings.
Deprecated content is retired but kept. It stays readable and linkable, and a new ref to it raises an advisory tension.
A move between states is an edit of the lifecycle field, proposed like any change. A move to stable always needs a person, because the authority policy never accepts one. For other moves the policy decides, and rdy-standard requires a person. A pack may refuse promotion to stable while a doc misses skeleton sections.
Beside its lifecycle, a content block has an as-built status: planned, since <version> or unversioned. A content block is a block of a doc_asset type other than a doc or a folder, so a pack's own types count too. rdy derives the status at the scope you read, so canon, a view, a tag and a proposal version can each give a different answer. Lifecycle and as-built status are independent: a stable block can be planned.
rdy takes the first of these that applies:
- the block's own
planned: true; - the block's own
since: <version>; planned: trueon its nearest section or doc;- the status that its decisions derive;
unversioned.
planned: false is no override. A section without the flag does not cancel a planned doc above it. since covers only its own block, and a doc takes planned but no since.
Only the decisions that a block cites directly through decided_by or implements derive its status. When any of them has built: planned, the block is planned. Otherwise it is since the latest release version among their built values. A decision with built: none, with no built, or that is missing or removed gives nothing. rdy reads each decision in the scope you read, whatever its status, and never follows a successor or an entity. With no build fact, the block is unversioned and counts as shipped.
A decision recorded before rdy 0.41.0 has no built, so the content that cites it stays unversioned until someone reviews the decision and sets the field. rdy never infers a release from other fields, from commits or from the version of the running rdy. Decisions describes built.
An override that differs from a planned or since status that the decisions derive gives the warning W_AS_BUILT_OVERRIDE. An override over an unversioned derivation never warns, so a planned note with no decision stays quiet. A reasoned confirm of the override's as-built plan item silences the warning once it lands. Decisions describes the warning and the item.
Source tools show every block with its status, and a source read never hides planned content. A publication profile hides or marks planned blocks. When it hides them, a planned doc or section that still holds a shown block keeps only its title and route. "Publications and profiles" in How rdy is built gives the rules.
Assets
An asset block carries a binary blob or a diagram source, with required alt text or a caption. rdy-standard has two: figure, which holds a blob hash, a media type and alt text, and diagram, whose body is Mermaid or D2 source.
- Asset
- An asset is a block that carries a binary blob or a diagram source, with required alt text or a caption. Blobs are content-addressed and chunked, so identical chunks are stored once. A diagram is stored as text (Mermaid or D2), so it versions and merges like any block. The site draws four types of Mermaid diagram and shows the other types and D2 as code.
Blobs are content-addressed and chunked, so identical chunks are stored once. rdy fsck verifies them, and a pack may cap asset sizes. Agents add a blob with rdy_asset. In the working copy, a figure file lives under _blobs/<hash>.<ext>. A figure written with a relative image path is stored as a blob at commit and rewritten to the hash form.
A diagram is stored as text, so it diffs, versions and merges like any block. The site draws Mermaid to SVG in Rust at build time, with no client script. It draws flowchart, class, sequence and state diagrams. A diagram of another type, and a D2 diagram, show their source in a code block. A ref inside diagram source becomes a graph edge like any other.
Each drawing is also its own file, assets/diagrams/<hash>.svg, with its own light and dark colors. The page links that file as "open full size". A reader can expand a drawing in place to the page width, with no client script.