Skip to content

.rtb/manifest.yaml

Every project rendered by rtb generate project carries a manifest at .rtb/manifest.yaml. It records which preset produced the tree, the values substituted into it, a content hash per generator-owned file, and which paths you have opted out of regeneration.

It is written by generate project, updated by every later generate and remove, and rebuilt wholesale by regenerate manifest.

A complete example

rtb_version: 0.9.0
preset: minimal
preset_version: 5
fields:
  description: A greeting tool
  project_name: greeter
generated:
  .gitignore: b3:b7c9c59177ea1776449ada5a62563b078bb595519c5d24ce899d6f88f0145a76
  Cargo.toml: b3:fb4e837530c686e819a73e6e55d082ec1fd3e32fcc209222641efb6495a3b528
  README.md: b3:9aaa91c704037287541c5ded40559f7bc1e2b79a56675d975edb66906955bce4
  src/commands/mod.rs: b3:f757c3492d13d9ea7f2ebbe3bbc469d8051024a86678ab9a7e3e7b1a816caf32
  src/main.rs: b3:df25af204f2ecd458d7da91fad8f43dda29550936ff3317720b27d1a7aa0fcbb

Keys

Key Type Required Written by Meaning
rtb_version string yes every write The rtb version that last touched the file. Future migrations key off it.
preset string yes generate project Which bundled preset rendered the tree.
preset_version integer yes generate project Internal schema version of that preset.
fields map of string to string defaults to empty generate project The values substituted into the templates, after NFC normalisation and validation.
generated map of path to hash defaults to empty every generate / remove Generator-owned files and the hash of the bytes last written.
protected list of paths defaults to empty generate command protect Paths regeneration must never touch. Omitted from the file entirely when empty.
commands map of command path to metadata defaults to empty generate command Per-command authoring options. Omitted when empty.

commands entries

Only the options you actually passed are recorded; a plain rtb generate command greet records no entry at all.

Field Type From
short single character --short
aliases list of strings --aliases
long string --long
parent string --parent
args list of name:type strings --args

These exist because that metadata lives outside the marker regions in a command file, so regeneration would otherwise lose it.

Hash format

Every value in generated: is a BLAKE3 digest of the file's bytes, prefixed b3:. The prefix is an algorithm marker, not decoration: if the hash function ever changes, an old manifest still parses and the mismatch is detectable, rather than the old digests being silently read as new ones.

Paths are relative to the project root and stored in a sorted map, so a manifest rewrite that changed nothing produces no diff.

Strictness and failure modes

  • Unknown keys are rejected. The schema deserialises with deny_unknown_fields, so a typo or a hand-added key is a parse error, not a silently ignored line.
  • A missing manifest is fatal for every command except generate project. That is what makes "am I inside a scaffolded tool?" a definite question rather than a guess.
  • A stale entry is not an error. If a file listed in generated: has been deleted, regenerate manifest drops the entry — and drops any protected: reference to it at the same time, so protected can never name a path that no longer exists.

Do not parse it from your own tooling

Pre-1.0 the keys may change. The file is rtb's private state, versioned by rtb_version for rtb's own migrations. Read it for debugging; do not build a tool that depends on its shape.