Expand description
Writing documents: create, change, move and fix. Every operation returns a plan; nothing touches the disk until the plan is applied.
Re-exports§
Modules§
- edit
- Changing a document’s body: replace or append to one section, or to the whole body. Without
this, agents edited files by hand and the
updateddate and lifecycle went unchecked. - fix
- Applying the fixes that need no judgement: exact replacements reported by rules, missing frontmatter keys, and a chosen target for an ambiguous reference.
- forbid
- Refusing to write a document where
[forbid] pathswould make Z1 reject it, before anything is written. - mv
- Moving or renaming a document, and rewriting every reference to it.
- new
- Creating a document: compute its owner and path, assign its key, write its frontmatter and body skeleton.
- plan
- Every write is planned first and applied only on request, so a preview and the real run do exactly the same thing.
- refs
- Rewriting references to a document when its id changes.
- set
- Changing frontmatter through assignments (
key=value,key+=value,key-=value), with the lifecycle enforced andupdatedkept current.