Reference
File formats
since 0.10.0 This reference gives every file rdy reads or writes outside the store. These are the export tree, its block entries, the dump file and the sync batch. They also include the working-copy YAML, the four configuration files, the credential file and pack files. The store's own objects are in "Store format" in How rdy is built. Commands and their flags are in CLI.
Export format 3
rdy import <dir> --view <view> reads a folder tree into a view, and rdy check lints one. rdy 0.4.0 and earlier wrote the tree with rdy export; since rdy 0.5.0, no command writes one. The tree has one manifest, one authors file and two directories.
<out>/rdy-export.yaml the manifest
<out>/authors.yaml who last wrote each block
<out>/docs/ the folder tree
<out>/docs/wallets/_folder.yaml the wallets folder block
<out>/docs/wallets/transactions.yaml the doc and every block in it
<out>/docs/wallets/cards/_folder.yaml a sub-folder
<out>/docs/overview.yaml a top-level doc
<out>/blobs/<hash> one file per blob, named by content hashThe manifest holds three keys.
| Key | Value |
|---|---|
format | 3 |
pack | the name of the project's pack, for example rdy-standard |
scope | the scope that was exported, for example canon or view:work |
The file system is authoritative for the name and parent of folders and docs. A folder is a directory, and its name is the directory name. A doc is a file, and its name is the file stem. Neither entry carries name or parent; a name or parent on either is refused on import with E_FILE_FORMAT. A rename of a file or directory is a rename of the doc or folder.
_folder.yaml holds one block entry, the folder: id, type: folder, order and fields without name. A directory is written even when its folder is empty. A doc file holds a list of block entries. The first is the doc, without parent or name; every block inside keeps an explicit parent and order. Sibling order is the order key, and directory listing order is ignored.
An asset block names its blob by hash in fields.blob, and the file sits in blobs/. A blob field on a block of another type is an ordinary field, and export copies no file for it. Import refuses an asset whose blob is neither in blobs/ nor already in the project. Dotfiles are never part of an export, and import refuses a symbolic link anywhere in the tree with E_FILE_FORMAT. A format-3 import creates the folders and the blocks in one write, with one change per author.
since 0.2.0
authors.yaml holds one row per block: id, actor, run, role, at_ms and landed_ms. actor, run, role and at_ms come from the change that last wrote the block, and at_ms is that change's time in milliseconds. landed_ms is the time of the landing that carried the change. A row has no run or landed_ms when there is none. Rows follow the log order of the changes that wrote them, then block id within one change. rdy export refuses the inflight scope with E_BAD_INPUT.
since 0.2.0
rdy import reads authors.yaml when it is there. It writes one change per author, oldest first, with the run, role and time of that author's newest block. Changes with the same time keep the order of authors.yaml: each takes the place of its author's last row at that time. An import merges each author's blocks into one change, so a later export does not always keep the row order. Blocks without a row go in a last change, the importer's. Each author's change has the message import from <dir>: <n> block(s) by <actor>, imported by <importer>, where <dir> is the directory's name, never its path. Import does not store landed_ms; it is there for people to read. A row that fails is E_BAD_INPUT: an unknown key, a block outside the export, or an at_ms outside 0 to now plus 24 hours.
Markdown import source
since 0.49.0
rdy import --md and rdy_import with md: true read a folder of Markdown files. YAML stays the working copy's source format: Markdown is an import source only, and rdy never writes it back.
rdy opens only files whose names end in .md or .markdown, in any case. Other regular files are counted and reported as non_markdown_file rows, never opened. rdy leaves out every entry named .rdy or .git. A root .rdyignore follows the working copy's rules, with at most 65,536 bytes and 1,024 patterns, else E_CONFIG. A link, a reparse point, an entry that is not a regular file or directory, or a name that is not plain UTF-8 is E_BAD_INPUT. So are two paths that are one when case is ignored, and a source that changes while rdy reads it.
since 0.49.0
Front matter is closed. It starts with --- on the first line and ends with --- or ..., at most 65,536 bytes. rdy takes two keys only: title, a non-empty string, and doc_type, a string. Any other key, a value of the wrong kind, or YAML that does not parse leaves the whole front matter as literal text, with a front_matter row. A doc_type that the pack does not hold is E_DOC_TYPE, <path>:<line>:<col>: unknown doc_type "<value>". A file that is not UTF-8 is E_FILE_FORMAT.
since 0.49.0
Each directory becomes a folder, and each Markdown file becomes a doc in its folder. A name is the slug of the directory name or the file stem, else <kind>-<slug>, else the kind alone. A repeat under one parent, ignoring case, takes -2, -3 and so on. A doc's title is the front matter title, else the text of its first heading, else the file stem. Its doc type is the front matter doc_type, else the pack default.
A heading becomes a section, nested by heading level. A fenced or indented code block becomes a code block, and a fenced block keeps the first word of its info string as the language. A table becomes a table. A paragraph, a list, a block quote and other running text become prose.
since 0.49.0
A link with a scheme or a leading // is external and stays a clickable link. A relative link, or one that starts with / from the source root, must resolve to exactly one included Markdown file. A link to /a/b tries a/b.md, a/b.markdown, a/b/index.md and a/b/index.markdown. A resolved link becomes a reference to that doc. A fragment names a heading by its GitHub-style anchor, and a repeated anchor takes -1, -2 and so on. Any other link stays literal text, with a link row.
rdy escapes every {{ in the source, so imported text never makes a reference by accident. HTML, images, footnotes, strikethrough, task lists and GitHub alerts stay literal text. Each gives an unmapped row of kind html, image or extension.
since 0.49.0
rdy checks every bound while it reads, and a source over one is E_LIMIT, Markdown import exceeds <bound>: <limit>.
since 0.49.0
| Bound | Limit |
|---|---|
| Source regular files, including reported non-Markdown files | 4,096 |
| Markdown bytes per file | 16 MiB |
| Total captured Markdown and ignore bytes | 64 MiB |
| Front matter per file | 65,536 bytes |
| Generated blocks | 100,000 |
| Folder depth | 32 |
| Parser nesting | 128 |
| Relative path bytes | 4,096 |
| Unmapped rows | 10,000 |
since 0.49.0
The source digest is a BLAKE3 hash, 64 lowercase hexadecimal characters. It covers each included directory and file path and its kind, the bytes of each Markdown file, and the bytes of the root .rdyignore. A reported file adds its path only. A preview gives the digest, and expected_source refuses an import whose source no longer has it.
since 0.3.0
Dump format 1
since 0.32.0
rdy dump writes one dump file, and rdy load reads it, alone or as the first file of a dump chain. The dump is the long-lived exchange format: every later rdy reads every released dump format. Dump format 1 is released with rdy 0.3.0 and store format 10, and rdy 0.4.0 writes it with store format 11. rdy 0.5.0 writes it with store format 12. rdy 0.6.0 writes dump format 2 with store format 13, and rdy 0.7.0 writes it with store format 14, as the next section says. rdy 0.10.0 writes it with store format 15. rdy 0.13.0 writes dump format 3 for every dump, with store format 16, rdy 0.18.0 writes it with store format 17, and rdy 0.20.0 with store format 18. rdy 0.26.0 writes dump format 4, which carries a feature store. Two numbers version a dump. dump_format versions the container: the prelude, the framing, the record kinds and the fields of each record. In formats 1 to 3, the header's store_format names the encoding of the copied store frames, and a reader checks the pair. Format 4 holds the store's features in its place.
Integers are little endian, and a hash is the BLAKE3 hash of the bytes it covers. A dump starts with the 8 bytes RDYDUMP\n, then dump_format as a u32. Records follow, each framed as a store frame: len: u32, kind: u8, hash: [u8; 32], then the payload. A record's hash is the hash of its payload. The order is closed:
- one
HEADER; - zero or more
FILErecords; - zero or more
BATCHrecords, each followed by exactly itsframesstore frames; - one
TRAILER, then the end of the file.
| Record | Kind | Payload |
|---|---|---|
HEADER | 0xF0 | store_format: u32, log_end.segment: u32, log_end.offset: u64, rdy_len: u16, rdy: [u8; rdy_len] |
FILE | 0xF1 | path_len: u16, path: [u8; path_len], then the file's bytes |
BATCH | 0xF2 | start.segment: u32, start.offset: u64, frames: u32, digest: [u8; 32], kinds: [u8; 32] |
TRAILER | 0xFF | batches: u64, frames: u64, files: u32, digest: [u8; 32] |
| store frame | its store kind | the frame's bytes, exactly as the log holds them |
since 0.3.0
log_end is the end of the source log when the dump was written. rdy is the version of the rdy that wrote the dump, such as 0.4.0, in UTF-8 and at most 256 bytes. It is for people only, and no reader checks it. A FILE record's path is UTF-8 and one of a closed set: .rdy.yaml, .rdyignore, or .rdy/packs/<name>. <name> uses only A-Z a-z 0-9 . _ -, does not start with ., ends in .yaml or .yml, and is at most 255 bytes, its suffix counted. A reader refuses any other path as damage, E_DUMP, before a load writes anything. A dump holds at most 256 FILE records, each file at most 16 MiB, with paths in strictly ascending order.
A BATCH record copies one sealed batch of the source log. start and digest are the fields of the batch's marker, and frames is at least 1. That many store frames follow, byte for byte as the log holds them. kinds is the hash of each frame's kind byte and hash, in order. A frame's kind is one that the header's store format assigns, as the next paragraph lists. It is never 14, the batch marker, and never an unassigned kind.
since 0.32.0
The pair (1, 10) assigns the frame kinds 1 to 9, 13, and 15 to 19. The pair (1, 11) assigns the same kinds and 10, the ANSWER kind. rdy 0.4.0 reads both pairs. The pair (1, 12) assigns the same kinds as (1, 11), because store format 12 adds only the refs meta/repo_id and meta/origin. rdy 0.5.0 reads all three pairs. rdy 0.6.0 reads these three pairs and (2, 13). rdy 0.7.0 also reads (2, 14), rdy 0.10.0 also reads (2, 15), and rdy 0.13.0 also reads (3, 16). rdy 0.18.0 also reads (3, 17), and rdy 0.20.0 also reads (3, 18).
The trailer's batches, frames and files count the records before it. Its digest is the hash of kind: u8, len: u64 and hash of each record, in order, from HEADER to the last record before the trailer. len is the payload's length. A record's hash covers only its payload. So kinds binds each frame's kind, and the trailer's digest binds each record's kind and length, and their order.
since 0.3.0
A reader checks every record's hash, the order, each frame's kind, each batch's frame count and both its digests, and the trailer's counts and digest. Any failure refuses the whole dump with E_DUMP, and no rdy repairs a dump. rdy load also refuses a dump whose batches do not end at the header's log_end, or that holds no batch.
since 0.6.0
Dump format 2
since 0.10.0
Dump format 2 is released with rdy 0.6.0 and store format 13, as the pair (2, 13). It keeps the prelude, the framing and the HEADER, FILE, BATCH and TRAILER records of format 1. Its frame kinds are those of (1, 12), and 20 to 22, the redaction kinds. It adds one record, DROPPED, of kind 0xF3. The readers of format 1 are unchanged, and a dump of format 1 never holds a DROPPED record. rdy 0.7.0 writes store format 14 in dump format 2, as the pair (2, 14). Its frame kinds are those of (2, 13), and 11, the SIGNATURE kind. rdy 0.10.0 writes store format 15 in dump format 2, as the pair (2, 15). Its frame kinds are those of (2, 14), because store format 15 adds only refs.
since 0.6.0
A DROPPED record stands where a batch's store frame would be. It is one source frame whose payload an applied redaction removed. Its payload is exactly 102 bytes: original_kind: u8, original_hash: [u8; 32], original_len: u32, apply_hash: [u8; 32], has_residue: u8, residue_hash: [u8; 32]. original_kind is BLOCK, CHANGE or BLOB_CHUNK. A block or a change has a residue, and has_residue is 1. A chunk has none: has_residue is 0, and residue_hash is 32 zero bytes. original_len is at most 64 MiB.
A DROPPED record counts as one source frame. Its place in the source log is the batch's start plus the original sizes of the frames before it. The BATCH record's digest and kinds use the original kind and hash. The trailer's digest uses the record as it is: kind 0xF3, length 102 and the record's own hash.
since 0.13.0
The apply that authorizes a dropped frame comes later in the stream than the frame. So rdy load writes the frame's original header and then zeros of its original length. Before it writes FORMAT, it checks that the log's own sealed applies authorize each dropped frame's exact span. A stopped load checks each drop against the apply in the files that it reads after the stop. A dangling or forged drop refuses the load with E_DUMP, and no store is made. A load holds at most 1,000,000 dropped frames for this check. The frames not yet authorized claim at most 1 GiB of zeros in all.
since 0.10.0
A holder's dump holds no FILE record, because a holder has no project files. Its first batch sets meta/store_mode, so its load makes a holder again. A load refuses a holder's dump that holds a FILE record, with E_DUMP.
since 0.10.0
The gate keeps the fixture dumps v2-s13, v2-s14 and v2-s15 of the pairs (2, 13) to (2, 15), beside the three fixtures of format 1. For (2, 15), it also keeps v2-s15-holder, the dump of a holder. No later rdy rewrites any of them, and every later rdy must load each one.
since 0.13.0
Dump format 3
since 0.13.0
Dump format 3 is released with rdy 0.13.0 and store format 16, as the pair (3, 16). It holds two kinds of dump: a full dump and an increment. It keeps the prelude, the framing and the FILE, BATCH and DROPPED records of format 2. Its HEADER and TRAILER keep their kinds, 0xF0 and 0xFF, with new payloads. A frame's kind is one that the header's store format assigns: for (3, 16), the kinds of (2, 15), and 23, the REDACTION_CARRIED kind. rdy wrote format 3 for every dump until format 4, and every later rdy reads formats 1, 2 and 3.
since 0.29.0
Store format 17 keeps dump format 3, as the pair (3, 17), released with rdy 0.18.0. Its frame kinds are those of (3, 16), and 24, the PLAN kind. The gate adds the fixtures v3-s17, v3-s17-chain-full, -chain-1 and -chain-2 beside those of (3, 16). The holder's files add -holder after v3-s17, and each set has an expect file. The table after the digests of (3, 16) pins their twelve digests, and no later rdy rewrites them.
since 0.13.0
| Record | Kind | Payload |
|---|---|---|
HEADER | 0xF0 | kind: u8 (0 full, 1 increment), store_format: u32, repo_id: [u8; 16], base.segment: u32, base.offset: u64, base_batch: [u8; 48], prev: [u8; 32], end.segment: u32, end.offset: u64, end_batch: [u8; 48], rdy_len: u16, rdy: [u8; rdy_len] |
TRAILER | 0xFF | batches: u64, frames: u64, files: u32, removals: u32, has_first_removed: u8, first_removed.segment: u32, first_removed.offset: u64, digest: [u8; 32] |
since 0.13.0
A batch's marker fields are start.segment: u32, start.offset: u64, frames: u32 and digest: [u8; 32], 48 bytes in all. end is the end of the last batch that the file holds, and end_batch is that batch's marker fields. In a full dump, base is segment 0 at offset 0, and base_batch and prev are zero bytes. In an increment, base is the end of the file before it, and base_batch is that file's end_batch. prev is that file's trailer digest. rdy is the writer's version, for people only, as in format 2.
since 0.13.0
removals counts the REDACTION_APPLY frames that the file holds. first_removed is the lowest log place that any of those applies removes, and has_first_removed is 1 when there is one. A holder's apply removes the holder's own copies of its spans, and a hole that only a carried record explains is no span. A place before base says that earlier files of the chain still hold removed content. The trailer's digest covers each record's kind, length and hash from HEADER on, as in format 2. So prev chains each file to the file before it.
since 0.13.0
A reader checks every rule of format 2, and these too. The first BATCH of an increment starts at base, or at offset 0 of the next segment where the source log rolled. The batches end at end, the last batch's marker fields equal end_batch, and an increment holds at least one batch. The trailer's removals and first_removed match the applies in the file, and a chain load resolves an apply whose request an earlier file holds. A load also checks that each batch starts where the batch before it ends, or at offset 0 of the next segment. Any failure refuses the file with E_DUMP, and a place past the largest u64 reads dump position overflows.
since 0.13.0
In dump format 3, a DROPPED record's apply_hash can name a REDACTION_CARRIED record. The load accepts that drop when a carried record in the same file names its exact span with held: false. A later apply in the chain that covers the span leaves the drop as it is. The loaded store then takes that apply as the span's proof.
since 0.13.0
For each released pair (3, s), the gate keeps a full dump and a three-file dump chain of a project and of a holder. For (3, 16) they are v3-s16 and v3-s16-chain-full, -chain-1 and -chain-2. The holder's files add -holder after v3-s16, and each set has an expect file. They sit beside the fixtures of formats 1 and 2, the table below pins every digest, and no later rdy rewrites them. Every later rdy must load each one whole. It must also load each chain at two fixed stops before a redaction apply, and each full dump at one.
since 0.13.0
| File | BLAKE3 |
|---|---|
v3-s16.rdydump | 5de4badbd1e5692e12b8465f06fce5f6cea1f42fd619a18cde756584c792c2b5 |
v3-s16.expect.json | 0df206615c985815d676a5ca91efd865899209464f06f575ea235976425e6232 |
v3-s16-chain-full.rdydump | 7deafdc1a6b2d42a5f71165ca2961d7f32c9c8f4f2a0012a1798d230d1935a62 |
v3-s16-chain-1.rdydump | 23f64d4625407f257e5a0ceb55a133c7472188f21a2ea78e291e49fd02d9069c |
v3-s16-chain-2.rdydump | d8735bd462d05edf2d371bed9cf56ce3ca04080fd06882b5e1a02d3e2e2b8111 |
v3-s16-chain.expect.json | 2b00f08d44c55b74e6e97375f52acd9e6ed9458ab15790bb31fd6d391a05b615 |
v3-s16-holder.rdydump | dc4ca5b0fcce7e097db9ecf64196ce00a26ad6c0233df11341a578f8d9e7f26e |
v3-s16-holder.expect.json | c188d8ff41afdb9ecd2e6a172a20e285aef89826dcf3442bab9730ce446b1372 |
v3-s16-holder-chain-full.rdydump | bf1a88b6d553393f34ad812131bdcb4497347c5a1ec16273a8a8e86c2565f300 |
v3-s16-holder-chain-1.rdydump | f4069d58ca2dc9705f8b95cf1ae1d5795edf8af5a87ba8a30cc01289debf4262 |
v3-s16-holder-chain-2.rdydump | 3aa9e3303fe228c02b79e3e219494992a7f4b6250e602bf0bcaea6f869150057 |
v3-s16-holder-chain.expect.json | 369da6d39efc8aeb46369ed36aff7b52e5f5b20f6ba22d0c73531639159bef80 |
The BLAKE3 digest of each file of the pair (3, 16), set when it was written.
since 0.29.0
| File | BLAKE3 |
|---|---|
v3-s17.rdydump | 94157e0d99fbd0170ea7eeca37315e141a4776485923bd27264bbc00e70442b5 |
v3-s17.expect.json | 397680b93467ef7a9dce3fdb0e16cb1a71d8bbcdbe734ce96907d657578fd44a |
v3-s17-chain-full.rdydump | c0ee2f5236c226df0eaac875b317872d10bbc2f0f441145ea9df139317636872 |
v3-s17-chain-1.rdydump | 1189a0c637444c8f9ec13ad4f6b1ee93dc12c7b2d912b4f877d253bc6e3e313d |
v3-s17-chain-2.rdydump | 1c72ece30389ba89621cf4b01702b0a640628280d0297f3ca04418fbff73b42b |
v3-s17-chain.expect.json | 9dcb2982bcae43cf79476b6ecaff2e13f528bb1a86d5f2caf0ec4e98c0f775b8 |
v3-s17-holder.rdydump | 004dbd2f0eb39bcf227aa4a1dfc1fe58980094bd3bbb80b52bbcb70cc8124d91 |
v3-s17-holder.expect.json | 8c21ae51e8a2bd0689189935d56bac40506fb77890606cf70cdf0d967f39ff69 |
v3-s17-holder-chain-full.rdydump | ec0e4a4f6f3f5c6efde8229b8b65205adfa4a18de8098f4945864021f4ebf5eb |
v3-s17-holder-chain-1.rdydump | 1ff73bc53aeb46cb50f0de29997165298bcd14e14b4876bf3909db17eecd9be2 |
v3-s17-holder-chain-2.rdydump | bbff1ff5ce76e60d8ec2c6aacab90b9c471edf0ec4b359017dfa884c7e2bc35a |
v3-s17-holder-chain.expect.json | b38ac9d6944e139dd4e0966c5a58648d76a937c8858910f11b92446200b55e2f |
since 0.32.0
Store format 18 keeps dump format 3, as the pair (3, 18), written by rdy 0.20.0. Its frame kinds are those of (3, 17), and a CHANGE frame may carry the reflects justification. The gate adds the fixtures v3-s18, v3-s18-chain-full, -chain-1 and -chain-2 beside those of (3, 17). The holder's files add -holder after v3-s18, and each set has an expect file. The table below pins their twelve digests, and no later rdy rewrites them.
since 0.32.0
| File | BLAKE3 |
|---|---|
v3-s18.rdydump | b69978453eaf0bc06b5e8040cd152836c1a290a913603cd53a5a2e5ece53c615 |
v3-s18.expect.json | c2bf21e87c2c4babf30750ec8d619f204367ea8d94eeae600ff394f1429603c0 |
v3-s18-chain-full.rdydump | 7c734b3043f0b5e3873621eb97799ae7c0aab1638f1f130c9a268da9ef6e0002 |
v3-s18-chain-1.rdydump | b1203e3fdc5bd5a8f15622d23b4cc8951bfe193ac59b23372900aecd81ceb947 |
v3-s18-chain-2.rdydump | 5837691a6d83e7537fb4e62211aaaf54f33e9948e41be0343fc23bc6f85c28e9 |
v3-s18-chain.expect.json | 1d93b0abc3570711b46075d5405b4df54af86fd9eeb45512ab8d511e930c7785 |
v3-s18-holder.rdydump | 0ba16663f3cc01684e1a01e36d2941cb7ae4f92d6940be4cc3a4b833ad3afbe7 |
v3-s18-holder.expect.json | c6cad8a5b549df4c840ae698c8d5e6cd67830525370e76fc4f372ba638a7dccf |
v3-s18-holder-chain-full.rdydump | 2ac0183140a5c494bcd6d63e41eb6cc3437d684096b904d856a453be9bcfd907 |
v3-s18-holder-chain-1.rdydump | 06a8b3bfa187101dc1179d0b9b7708e86a826068bf767bf79cf03919fd116b9e |
v3-s18-holder-chain-2.rdydump | d160d815ecde5f20f4eda78cc1b0710199b56add6e5063916b61a7f25b74e974 |
v3-s18-holder-chain.expect.json | 07ae3d4064f82907bbb9e4be41a062bad173d7a6dbe86265302db67607410b88 |
since 0.26.0
Dump format 4
since 0.26.0
Dump format 4 carries a feature store, and rdy 0.26.0 writes it for every dump. It keeps every rule of format 3: the prelude, the framing, the FILE, BATCH and TRAILER records, and the chain facts. Its HEADER holds the store's feature manifest where format 3 holds store_format. A reader applies the store's feature rules to that manifest. An invalid manifest is E_DUMP, and an unknown incompatible feature is E_STORE_FORMAT. Every later rdy reads formats 1 to 4, and the nine released pairs keep their readers.
since 0.26.0
| Record | Kind | Payload |
|---|---|---|
HEADER | 0xF0 | kind: u8 (0 full, 1 increment), features_len: u32, features: [u8; features_len], repo_id: [u8; 16], base.segment: u32, base.offset: u64, base_batch: [u8; 48], prev: [u8; 32], end.segment: u32, end.offset: u64, end_batch: [u8; 48], rdy_len: u16, rdy: [u8; rdy_len] |
DROPPED | 0xF3 | 104 bytes: logical_kind: u8, encoding: u16, original_hash: [u8; 32], original_len: u32, apply_hash: [u8; 32], has_residue: u8, residue_hash: [u8; 32] |
| store frame | its raw kind | the frame's bytes as the log holds them; a versioned frame keeps kind | 0x80 and its encoding prefix |
since 0.26.0
features is the manifest's canonical JSON, at most 65,536 bytes. A frame's encoding must be one that its kind registers. The BATCH record's digests use each frame's raw kind. A DROPPED record adds the removed frame's encoding after its kind, and that encoding is 0 until a removed versioned record has its residue adapter. A chain may add features from file to file, and it never drops or changes one.
since 0.26.0
The gate keeps two fixture sets of format 4, v4-f1-e0 and v4-f1-e1, and a test pins their bytes. v4-f1-e0 holds the format's first set, and v4-f1-e1 adds the carried kinds and the records of encoding 1. Each set holds a full dump and a three-file dump chain of a project and of a holder, each with an expect file. The stem names the test set, not a store format.
since 0.48.0
A dump of a store with foreign_copy carries its FOREIGN frames and the frames in their kinds' optional encodings, and its manifest names the feature. A dump of any other store carries neither. The gate also keeps the format-4 fixture v4-f1-e1-foreign-copy, with its expect file.
since 0.10.0
Sync batch format 2
since 0.10.0
A sync batch carries part or all of one tag's history from one store to another, as one file. An upload is one or more batches of one tag. Each batch has its own header, trailer and prerequisites, so batches may arrive in any order and may repeat. A batch is not a dump: it holds no project file, local ref, batch marker or source place. rdy stream check checks one batch, and a holder's take checks all the batches of an upload together.
since 0.48.0
Integers are little endian. A batch starts with the 8 bytes RDYSYNC\n, then stream_format as a u32, which is 2 for a tag history and 3 for a link delivery. Records follow, each framed as a store frame, as in a dump. The order is closed. Format 2 holds one HEADER, zero or more object records, one TRAILER, then the end of the file. Format 3 adds one DELIVERY after the HEADER. An object record is a portable object's raw frame, as the store holds it, or a DROPPED record.
since 0.48.0
| Record | Kind | Payload |
|---|---|---|
HEADER | 0xF0 | features_len: u32, features: [u8; features_len], repo_id: [u8; 16], purpose: u8 (0 tag_history, 1 link_delivery), tag: [u8; 32], prerequisites: u32, then that many keys of a logical kind: u8 and hash: [u8; 32], in strictly ascending order |
DELIVERY | 0xF4 | format 3 only: the stream-only record {publication, selection, versions, shells} in postcard, as below |
| object | its raw store kind | the object's bytes, as the source log holds them; a versioned frame keeps its encoding prefix |
DROPPED | 0xF3 | the 104 bytes of a format-4 dump's DROPPED record, with no place in a source log |
TRAILER | 0xFF | records: u64, bytes: u64, digest: [u8; 32]: exactly 48 bytes |
since 0.48.0
tag is the hash of the upload's root TAG. Every batch of an upload repeats the same features, repo_id, purpose and tag. A take refuses a batch with a feature that this rdy may only read, with E_STORE_FORMAT. A batch has no sequence number, upload id or end mark. records counts the object records, and bytes counts every byte before the trailer's frame. In format 3, records and digest also cover the DELIVERY. digest is the hash of each record's kind, length and hash, from HEADER to the last object record, as a dump's trailer has it.
since 0.26.0
Sync batch format 2 replaces format 1. Its header holds the store's feature manifest, as canonical JSON of at most 65,536 bytes, in place of store_format. A reader applies the store's feature rules to it, so an invalid manifest or an unknown incompatible feature is E_STORE_FORMAT. A reader refuses format 1 with E_STORE_FORMAT: sync batch format 1 is not supported, with the fix write the stream with the pinned rdy build. The gate keeps the bytes of the fixture v1-s15 and pins that refusal. It keeps v2-f1-e0 and v2-f1-e1 for format 2.
since 0.32.0
An object record's logical kind is 1 to 7, 9 to 11, 13, 15 to 18, 20 to 22 or 24 to 28. A ref update, a batch marker, a TRANSITION record and a REDACTION_CARRIED record never travel. Each record decodes within its bounds, and no object repeats in one batch. A record's dependency is an earlier record of the batch or a prerequisite. The prerequisites are exactly the keys that the records need and the batch lacks, and the root TAG when the batch lacks it. So a batch may hold no object record, and its root is then a prerequisite.
since 0.10.0
A dropped record's key is the removed object's kind and hash. Its apply may come before or after it in the batch, because a removal proof follows what it removes. An apply that the batch lacks is a prerequisite, like any other reference. A batch check only says that one batch is valid. It never says that an upload is complete or that a removal is approved: a take checks those over all the upload's files.
since 0.10.0
One batch, and one upload, hold at most 2,147,483,648 bytes, 1,000,000 object records and 1,000,000 dependency edges. A dependency chain holds at most 100,000 records. A header holds at most 100,000 prerequisites, so at most 3,300,057 bytes. An upload has at most 1,024 batch files. At most 1,000,000 dropped records may wait for their proof, with at most 1 GiB of original bytes in all. A batch over a bound is E_LIMIT.
since 0.10.0
One typed record holds at most 16 MiB, a text at most 1 MiB, and a list or map at most 100,000 elements. It nests at most 64 levels and decodes at most 1,000,000 values. Containers and leaves count as values, and fixed-width scalars do not. Each struct, option, enum, list, map, string and byte string is one value, and a hash is two. A blob chunk holds at most 1 MiB and has no typed decode.
since 0.48.0
Sync stream format 3 carries the purpose link_delivery: a profile's filtered view at a tag, which the cited side's Snapshot::link_export writes. A tag history stays at format 2, and a reader reads formats 2 and 3. Only the adapter writes and takes a link delivery, and a batch of the wrong purpose is E_STREAM_PURPOSE. Its order is one HEADER, one DELIVERY, zero or more object records and one TRAILER, and it has no prerequisites. Each object record is the BLOCK of one selected version, or a DROPPED record for a redacted one.
since 0.48.0
DELIVERY, kind 0xF4, is a stream-only record {publication, selection, versions, shells}. It holds the publication {tag, profile, profile_version?}, the selection digest, each selected block's ForeignVersion and each shell's {id, version}. These are facts that the citing side cannot compute. HEADER.tag is the hash of the cited tag's TAG object, for provenance only. The stream never carries that TAG, and the citing store never holds a foreign one. So the root-TAG rule of a tag history does not apply, and the check and the take never ask for that TAG.
since 0.48.0
Two deliveries are the same when each selected block's version or residue, its derived facts, the shells, and the set kind and team match. The take then writes nothing, and a new tag alone writes nothing. A change to the shells alone writes a delivery with no added, changed or removed block.
Block entries
Every entry in a doc file or _folder.yaml is one mapping with these keys. The same shape is what rdy show <id> prints and rdy edit <block> opens.
since 0.2.0
| Key | Type | Required | Meaning |
|---|---|---|---|
id | string | yes on export; absent for a new block in a staged file | the block's id, such as c-7KQ2M |
type | string | yes | the block type from the pack |
parent | string | blocks inside a doc | the parent block's id; absent on a doc or folder entry |
order | string | yes | the sibling order key: base-62, compared byte-wise, at most 24 characters |
fields | map | when the type has fields | the typed fields the pack declares, such as title, lifecycle, doc_type, alt |
body | string | when the type requires a body | the inline text, with {{id}} refs and the inline Markdown subset |
links | map | optional | link kind to a list of {target, part}; part is optional |
pins | map | optional, export only | block id to the content hash a ref or link was pinned at |
- id: d-1DENT
type: doc
order: a1
fields:
title: Transactions
doc_type: components
lifecycle: stable
- id: s-Q4RRZ
type: section
parent: d-1DENT
order: a1
fields:
title: Transfers
- id: c-7KQ2M
type: claim
parent: s-Q4RRZ
order: a1
body: "A leaver opens a new wallet and transfers their balance on the {{t-MEDGR}}."
links:
describes:
- target: m-W2HXRfields holds YAML values of the kinds the pack declares: str, int, bool, list, map or enum. A body on a type whose body rule is forbidden, or a missing body where it is required, is a schema error. A link kind the pack does not list in link_types is refused.
fields.reflects is an engine field, and a pack that defines it does not load, with E_CONFIG. It holds the code paths a block follows: a list of at most 32 path globs, relative to a code repo's top folder. A glob is segments joined by single / characters, with no / at either end. A whole ** segment matches any number of segments, * matches any run of characters inside one segment, and ? matches one character. Other characters are limited to A-Z a-z 0-9 . _ -, and a glob is at most 256 bytes.
A block of any doc asset type may carry the field. The validator refuses it with these codes:
E_FIELD_UNKNOWNon a supporting type, such as a decision;E_FIELD_KINDfor a value that is not a list of strings;E_LIMITfor more than 32 globs;E_BAD_GLOBfor a glob that does not compile.
since 0.2.0
fields.key_auto is an engine field. rdy sets it to true next to a key it derived from a path, and only on a doc or a folder. The validator refuses it on any other type with E_FIELD_UNKNOWN. It refuses it with E_FIELD_KIND when the value is not true or no key stands beside it. The field is store-only: the working copy never writes it, and rdy refuses a staged file that sets it. An export writes it, and an import keeps it.
fields.reaffirmed and fields.reflects_at are engine fields, and only rdy writes them. reaffirmed sits on an accepted decision, and reflects_at on a block that declares reflects. A pack that defines either does not load, with E_CONFIG. The validator refuses either in a create or an update with E_FIELD_UNKNOWN. Both are store-only: the working copy never writes them, and rdy refuses a staged file that names them with E_WC_INVALID. An export omits them, and an import never sets them. A staged file or a write that leaves them out does not clear them. Only the rules for each field change them.
since 0.48.0
fields.adopted_as is an engine field on an accepted decision, with the same rules as reaffirmed. Its value is the map {content, encoding, id, repo}. A write that names it is refused with the fix remove adopted_as; use rdy_supersede with adopted_as. A pack type that defines a field adopted_as or deviates_from does not load: type <name>: field <f> is reserved for the engine.
The working-copy YAML
The working copy is the docs/ tree of an export, laid at the project root and bound to a view. Folders are directories with _folder.yaml, docs are <name>.yaml, and blobs live in _blobs/<hash>.<ext>. The block entries are the ones above, with the metadata split applied. See "Working copy" in How rdy is built.
since 0.2.0
A doc file holds only content and presentation fields, inline refs, reader links, structure and the folder path; version pins, provenance and justification links stay in the store.
since 0.32.0
The store-only link kinds are decided_by, implements, reflects and any link to a decision, question, finding or source. A store-only field or link kind in a staged file is refused with E_WC_INVALID, and the diagnostic names the tool to use instead. A link kind missing from a file means "not stated", never "deleted", so a commit never drops a store-only link. Supporting blocks are never written into the tree, and a commit never deletes them; a supporting block in a file is refused with E_WC_INVALID. A publication profile is a supporting block too.
A new block in a staged file has no id; the client assigns one before the commit, and the write-back fills it in. A figure block may name an image by relative path; the commit stores it as a blob and rewrites the reference to the hash form. Write-back rewrites every committed file in canonical form and drops YAML comments.
Three kinds of file sit beside the docs and are never docs. <doc>.theirs.yaml and _folder.theirs.yaml hold the store's side of a conflict after rdy update. Dot-entries, non-YAML files outside _blobs/, directories without _folder.yaml, and anything .rdyignore matches are ignored, never errors. A *.yaml file that does not parse as a doc is listed as untracked.
Local state lives in .rdy/wc/ and is never a store object: bound.yaml (the bound view and its head), base/ (the checked-out version of every block and file), stage/ (staged copies), conflicts.yaml, pending.yaml (the write-back journal) and lock. An extra worktree holds a .rdy-worktree file that points at the project and keeps its state in .rdy/worktrees/<name>/.
.rdy.yaml
since 0.4.0
.rdy.yaml at the project root is the shared project config. It travels with the project, and every clone reads the same values.
since 0.49.0
| Key | Meaning |
|---|---|
pack | the pack the project uses |
name | the project's name, as the site shows it; absent, rdy uses the project directory's name |
description | the project's description, as the site shows it |
serve.start_timeout | seconds a client waits for the daemon to start; default 30 |
serve.idle_timeout | seconds a detached daemon stays up with no connection; default 600; a live page in view counts as a connection |
serve.site_port | the live site's port, from 1024 to 65535; absent, rdy derives one from the project path; also valid in the local and user config |
serve.site_lan | true also serves the live site on this machine's private network address; default false; also valid in the local and user config |
serve.ui | true serves the approver UI on the loopback listeners; default true; set it in the local or user config only: in .rdy.yaml it warns, and rdy ignores it |
serve.mcp_http | true turns on MCP over HTTP at /~mcp on the live site's loopback listener; default false; set it in the local or user config only: in .rdy.yaml it warns, and rdy ignores it |
views.idle_days | days without a write before rdy view ls flags a view idle; default 14 |
reviews.lease_ttl | minutes a claimed review request stays leased, a whole number; default 10, and 0 disables leases |
reviews.require_up_to_date | true refuses every approval whose base moved, instead of the clean-rebase rule |
coverage.target | the coverage at which onboarding is done, a whole number from 0 to 100; default 80 |
coverage.gate | off (default) or no_lower; no_lower makes a version that lowers coverage not ready; another word warns, and rdy uses off; .rdy.yaml only |
decisions.home | the doc or folder where new decisions go, as its path, key or id; optional, and without it they go to the project root; .rdy.yaml only |
propose.cadence | when agents propose: break (default), task, changes or asked; also valid in the local and user config; another word warns, and rdy uses break |
propose.changes | the count of changes that makes a proposal due under changes; 1 to 1000, default 10; also valid in the local and user config |
| ADR sources | each source's repo and folder; a pin to a revision is a foreign pin in canon, never a config entry |
code_repos | the linked code repos: at most 16 names; .rdy.yaml only |
site.logo, site.favicon | the project's own logo and favicon, self-hosted |
site.credit | false removes the "Built with rdy" line |
site.theme | theme token overrides per mode, or theme_dir naming .rdy-theme/ |
site.theme.strict | true makes a contrast failure an error instead of W_THEME_CONTRAST |
site.base_path | the path a static site is served under, starting and ending with /; default /; only the not-found page reads it, and the live site ignores it; .rdy.yaml only |
remotes | each remote by name: url, an HTTPS URL, and mode, share or publish; one share remote at most; also valid in local and user config |
since 0.4.0
.rdy.yaml never holds actor, tokens or key pins, and the working copy never treats it as a doc.
Only the project config affects rendering; user and local config never change the site's output.
.rdyignore
since 0.4.0
.rdyignore at the project root uses gitignore syntax. A file it matches is skipped by import and by every working-copy command, and it is never an error. The working copy never treats the file as a doc.
.rdy/local.yaml
since 0.4.0
.rdy/local.yaml is this user's configuration for this project: the local config. It is never carried by clone or dump.
since 0.49.0
| Key | Meaning |
|---|---|
actor | this user's actor for this project, overriding the user config; in rdy's actor form, else E_BAD_INPUT with a fix that names this file |
serve.site_lan_address | the private IPv4 address the live site uses while serve.site_lan is true; also valid in the user config, never in .rdy.yaml |
serve.ui | true or false: whether the live site serves the approver UI for this checkout; default true; also valid in the user config, never in .rdy.yaml |
serve.mcp_http | true or false: whether MCP over HTTP serves for this checkout; default false; also valid in the user config, never in .rdy.yaml |
| overrides | any project-level preference, overriding .rdy.yaml for this user |
code_paths | each linked code repo's checkout path, by name; a relative path starts at the project root; also valid in the user config, where a path must be absolute; never in .rdy.yaml |
| signing settings | the signing settings of the user config, for this project only; never in .rdy.yaml |
remotes | remotes for this checkout; an entry replaces the user config's or .rdy.yaml's entry of that name |
hub.installs.<origin>.pinned_origins | up to 16 other HTTPS origins for that install, replacing the user config's list; trusted for the uploads of rdy publish, and later for the sync client; never in .rdy.yaml |
| remote tokens | a static token for a remote; hub sign-in tokens live in credentials.yaml, beside the user config |
User config
since 0.4.0
~/.config/rdy/config.yaml is one person's configuration across projects: the user config. When XDG_CONFIG_HOME is set, the path is $XDG_CONFIG_HOME/rdy/config.yaml.
since 0.49.0
| Key | Meaning |
|---|---|
actor | the human actor, such as human:<handle>, in rdy's actor form, else E_BAD_INPUT with a fix that names this file. Absent, rdy shapes human:$USER into the form. It writes lower case, writes each other character as -, and folds each run of - into one. It keeps at most 64 characters, with no -, _ or . at either end. An empty result gives human:unknown |
serve.site_lan_address | the private IPv4 address the live site uses while serve.site_lan is true, in every project whose local config sets none |
serve.ui | whether the live site serves the approver UI, in every project whose local config sets none; default true |
serve.mcp_http | whether MCP over HTTP serves, in every project whose local config sets none; default false |
| personal defaults | preferences that apply in every project unless a project or local file overrides them |
| signing settings | signing.key, signing.agent_key, signing.sign and signing.allowed_signers; "Configuration" in How rdy is built gives their values |
remotes | remotes for every project of this user; a project or local entry of that name replaces one |
hub.installs.<origin>.ca_file | an absolute path to a PEM bundle that the TLS check of that install also trusts; user config only |
hub.installs.<origin>.pinned_origins | up to 16 other HTTPS origins for that install; read and checked, first used by the publish and sync clients |
instructions.person | the absolute path of the person's meta project, which holds their own agent instructions; user config only; default .rdy/meta in the home directory |
credentials.yaml
credentials.yaml sits beside the user config and holds this user's hub sign-ins, one record per install. Its only key, installs, maps each install's origin to a record whose state is pending, ready or reauth_required. A pending record holds machine_name, device_code, user_code, verification_uri, expires_at_ms, next_poll_at_ms and interval_seconds. A ready record holds access_token, refresh_token, expires_at_ms, account and handle. A reauth_required record holds its state alone, and an install with no record is signed out. Only rdy writes the file; a record that does not parse is E_CONFIG, and its fix is remove the invalid credential file, then sign in again.
Precedence
since 0.4.0
Settings are read from four levels, and the most specific wins: local config, then project config, then user config, then the defaults.
since 0.4.0
A key valid only at some levels is ignored elsewhere, and its W_CONFIG_UNKNOWN warning names the file it belongs in.
since 0.4.0
actor is valid in the user config and in the local config, never in .rdy.yaml, where it would make everyone the same actor. rdy config --show-origin prints each effective value and the file it came from. An agent that uses the CLI as a tool sets $RDY_ACTOR and $RDY_RUN instead of any file.
instructions.person is valid only in the user config. So a project never moves a person's meta project.
Pack files
A pack is one YAML file. The built-in pack is rdy-standard; a project's own packs live in .rdy/packs/*.yaml. A key that repeats in one mapping makes the file invalid, and the pack does not load (E_CONFIG). rdy pack check resolves the project's pack and reports problems.
since 0.48.0
| Key | Type | Meaning |
|---|---|---|
name | string | the pack's name |
version | string | the pack's version; a project pins one |
extends | string | the pack this one extends; its types are inherited and may be overridden |
link_types | list | the link kinds a block may carry, such as describes, implements, decided_by, affects |
default_doc_type | string | the doc type rdy new doc uses when none is given |
block_types | map | each block type by name; see below |
doc_types | map | each doc type by name, with its skeleton |
areas | map | each area by name, with a description and paths |
tensions | map | severity overrides per tension kind, blocking or advisory |
tensions_across | map | severity overrides for tensions across projects, blocking or advisory, for the five cross-project kinds; see below |
coverage | map | the coverage dimension weights, dismissed_weight, drift_threshold and max_docs_per_level; see below |
rules | list | at most 64 rule checks; see below |
A block type has these keys.
| Key | Type | Meaning |
|---|---|---|
prefix | string | the id prefix, such as c for a claim |
traits | list | engine traits: normative, informative, defines, describes, asset, structural, presentational |
fields | map | each field by name: kind (str, int, bool, list, map, enum), required and, for an enum, values |
children | list | the block types allowed below this one |
body | enum | optional (the default), required or forbidden |
class | enum | doc_asset (the default) or supporting; a type a child pack overrides keeps the parent's class unless it sets one; decision, question, publication_profile, finding and source are always supporting |
tracking | list | Fields left out of the content hash. They stay writable on an accepted or rejected decision. Each must be a field of the type, and none may be key, reflects, reaffirmed, reflects_at, status, decided_at, lifecycle, or a decision's statement or options. A child pack adds to its parent's list. |
since 0.33.0
Every type with the defines trait also holds the optional bool field everyday. A pack may declare the field only in that form. Any other declaration does not load: type <name>: field everyday must be an optional bool. A max_docs_per_level out of range reads coverage.max_docs_per_level is <n>; it must be 1 to 100000.
since 0.41.0
Every pack also holds three as-built fields. decision holds the optional string built, which is always a tracking field. Each content type, a doc_asset type other than doc and folder, holds the optional bool field planned and the optional string since. doc holds planned only. A pack may declare these fields only in those forms. Any other declaration does not load: type <name>: field <field> must be an optional bool, or must be an optional string.
since 0.41.0
built is planned, none or a release version, and since is a release version. A release version has one optional leading v, then <major>.<minor>.<patch> with an optional pre-release part, and no +build part. A bad value refuses the write with E_VALIDATION, and its issue is E_BAD_INPUT. For built, it reads Field "built" must be planned, none or a release version., with the fix Write built as planned, none, or a version such as 1.2.0. For since, it reads Field "since" must be a release version., with the fix Write since as a version such as 1.2.0 or v1.2.0-rc.1.
since 0.41.0
A value over 256 bytes gives the issue E_LIMIT, Field "<field>" exceeds its limit., with the fix Use at most 256 bytes in "<field>". A value of the wrong kind is E_FIELD_KIND. A working-copy file takes planned and since like other fields, and a commit checks them. built stays in the store with its decision. rdy reads built and since as metadata, never as text. No store format or dump format changed for these fields.
since 0.41.0
Every pack also holds the engine type publication_profile, and a pack that declares it does not load. Its id prefix is pf, and it is a supporting type with no body. It sits directly under a doc and needs a key. Its fields are title, audience (org or public) and select (1 to 1024 distinct doc or folder ids). The optional fields are description, trail (a bool), planned and since. planned is hide or mark. With none, a public profile hides planned blocks, and an org profile marks them. since is show or off. With none, the pill shows in docs of type reference only. Another value gives the issue E_FIELD_ENUM. title holds at most 256 bytes, and description at most 4096. The store format does not change for it.
since 0.49.0
Every pack also holds the engine type authority_policy. A pack that declares it does not load. Its id prefix is ap, its key is authority-policy, and it is a supporting type. It has no body, and it sits directly under a doc, as a publication profile does. Its fields are:
agent_may_accept: at most 64 rules. A version lands under the policy when one rule covers all of it. Each rule has these fields, andareas,two_way_areasandbasismay be absent:name, an rdy name of 1 to 64 bytes, unique in the policy;actors, 1 to 64 actor patterns in rdy's actor form, where a pattern may end in one*, as inagent:ana/*;areas, at most 64 pack areas, where an empty list means every area;lifecycle,draftorany;justifications, 1 to 3 ofimplements,editorialandreflects;decisions,noneortwo_way, with 1 to 64two_way_areasfortwo_wayand none fornone;basis, up to 4 ofdelegated,precedent,eliminationandnone, neverdirect_ruling,recorded_rulingorreconstructed; an empty list accepts no decision;max_blocks, 1 to 100,000, andmax_items, 0 to 100,000: the most blocks the version may change and the most plan items it may hold.
roles: at most 64 policy roles, each a name mapped to 1 to 256human:<name>actors andteam:<name>labels.require: at most 64 entries{when, role}, wherewhenisone_way,decision,area:<name>,deferral,reaffirm,ownerorany.when: ownertakes norole. When several entries match an item, the first in the list names its policy role. Anadoptitem matches onlyone_way,area:<name>,ownerandany. Its blocks are those whose pins it moves or rebinds, and the repo link.owners: at most 10,000 entries{path, owners}.pathis a folder, a doc path or a block id, of 1 to 240 bytes.ownersholds 1 to 256human:<name>actors andteam:<name>labels.rules_from_chat: optional,landorcard. With no field or no policy, it readsland.landletsrdy_ruleland on the person's words.cardmakes it return the card, andrdy_rule {scope, answer}takes the answer. rdy reads this field from canon, never from a draft. Any other value isE_FIELD_ENUM, and a value that is not text isE_FIELD_KIND. A live policy that does not validate stopsrdy_rulewithE_VALIDATION, and it does not read as no policy. A required policy role still applies to the person, withE_PERMISSION.
A project holds one live policy block. A second one fails at write with E_KEY_CLASH, and at propose or landing with E_VALIDATION. An agent: or ci: entry in roles or owners, and two owners entries with one path, fail validation with E_VALIDATION.
Every pack also holds the engine type instruction, with the prefix ai. It is a doc_asset type with the trait normative, and it has no key. It sits under a doc, or under a section when the pack has that type. Its body is required and holds the whole rule. Its fields are applies_to, 1 to 1024 selectors of at most 256 bytes each, and locked, a bool that is false by default. A decided_by link to a decision gives its reason, and every instruction needs one.
A selector is all, area:<name>, type:<name> or act:<act>. A name has 1 to 64 characters of a to z, 0 to 9, _ and -, and starts with a letter or digit. An act is write, decide, propose, relay, review, publish or redact. An area: selector for an area that the pack lacks warns on the write with W_INSTRUCTION_SELECTOR, and it names nothing until the pack defines the area. An instruction with all is required. rdy shows the other selectors as hints in the rdy_instructions menu and never filters by them.
since 0.41.0
locked counts only in a set's own project, so a local lock has no force over another layer. Every doc also holds the optional bool field required, and required: true makes the doc's instructions a required ruleset. A pack may add optional fields to instruction, and any other declaration of it does not load. A pack type that takes the prefix ai does not load either. An instruction block turns on no store feature. Like every content type, instruction also takes planned and since. rdy_instructions still delivers every landed instruction, whatever its as-built status, because the status changes only what a publication shows.
since 0.48.0
Every pack also holds the engine type repo_link, with the prefix rl, and a pack that declares it does not load. It is a supporting type with no body, no traits and no key, and it sits directly under a doc. Its fields are:
alias,[a-z][a-z0-9-]{0,23}, unique among the project's liverepo_linkblocks;repo, the cited project's repo id in 32 lowercase hex digits, never the project's own;profile, the block id of the link's publication profile in the cited project, apf-id;title, optional.
A bad value is E_VALIDATION, repo link <alias>: invalid alias, invalid repo id or invalid profile id, with the fix correct the repo_link block: rdy_write / rdy edit. A repo_link block owns the foreign entries whose repo and publication.profile equal its fields. It turns on the store feature foreign_copy.
since 0.28.0
Every pack also holds the engine types finding (prefix F) and source (prefix S), both always supporting and informative. A finding holds statement and evidence, and a source holds title, kind (release, commit or spec), locator and an optional version. The engine adds both to the children of every type that lists decision. It also sets the children of folder to folder, doc, decision, question, finding and source, whatever a pack lists. A pack may omit or repeat their core fields, and it may add optional fields. Any other change does not load: pack <p> cannot redefine <type> (<what>); it may only add optional fields, where <what> is prefix, children, body, traits or field <name>. A pack type that takes the prefix F or S does not load, and the store format does not change for them.
since 0.32.0
The engine adds the link kind reflects to every pack. A pack that declares it in link_types does not load: reflects is an engine link kind and cannot be declared by a pack.
since 0.48.0
The engine also adds the link kind deviates_from, which only a decision may carry, to a block in a linked project. A pack that declares it does not load: deviates_from is an engine link kind and cannot be declared by a pack. On any other type it is E_LINK_TYPE, with the fix remove deviates_from; record the departure as a decision: rdy_decide with deviates_from / a decision with deviates_from in rdy edit.
since 0.32.0
A doc type's skeleton is a list of {title, required} sections. An area's paths are globs over folder and doc paths. The tension kinds are edit_collision, fork, premise_shift, area_overlap, duplicate_definition, unjustified_change, deprecated_reference, value_disagreement and restatement_drift. edit_collision, fork, premise_shift and unjustified_change default to blocking. duplicate_definition and value_disagreement default to blocking in stable content and advisory in draft. The rest default to advisory. In stable content unjustified_change stays blocking whatever the pack sets: an entry that lowers it gets W_PACK_SEVERITY when the pack loads.
since 0.33.0
The coverage section has four keys, and each is optional:
weightsmaps each dimension,grounded,consistent,current,connected,completeorgoverned, to a whole-number weight. A dimension that is not listed weighs 1, and 0 omits it from the overall score.dismissed_weightis the percent of one check that a dismissed tension costs, from 0 to 100; default 50.drift_thresholdis the match percent at which restatement drift counts, from 1 to 100; default 60.max_docs_per_levelis the most docs one level holds directly before each getscrowded_level, from 1 to 100000; default 8.
A number out of range, every weight at 0, or an unknown key makes the pack invalid. A pack that extends another overrides each weight and number it sets.
name: acme-docs
version: "0.1.0"
extends: rdy-standard
areas:
payments:
description: money in and out
paths: [wallets, payments/**]
tensions:
deprecated_reference: blockingsince 0.32.0
The pack key rules holds at most 64 rule checks. Each rule has name, select, require, severity, message and fix. name has 1 to 64 characters with no space at either end, and it is unique. select and require are filters in the grammar of rdy_query. severity is advisory, the default, or blocking. message and fix each hold 1 to 2000 characters. A block that matches select and fails require raises the rule.
since 0.32.0
A pack that extends another takes the parent's rules, then its own, and a name used twice stops the pack from loading. So does a bad expression, an unknown key in a rule, or a rule that reads fields.decided_at in a test or in has. The landing sets that field, so no rule can judge it before the landing. rdy q still reads it. The errors are in Errors and warnings.
since 0.48.0
The pack key tensions_across maps a tension kind to blocking or advisory for tensions across projects. Across projects every kind is advisory unless this key raises it. Its keys are the five kinds that apply across projects: duplicate_definition, value_disagreement, restatement_drift, deprecated_reference and premise_shift. Any other key, semantic included, warns with W_CONFIG_UNKNOWN: pack <name>: tensions_across has no kind "<k>"; rdy ignores it. That kind stays advisory. The tensions map refuses an unknown kind, so the two keys differ.