Expand description
specfold-core: typed Markdown documents, their owners, the graph between them and the checks over it. The CLI crate is a thin layer over this library.
Re-exports§
pub use config::Config;pub use corpus::Corpus;pub use corpus::LoadOptions;pub use corpus::census;pub use corpus::trace;pub use graph::Graph;pub use model::Doc;pub use model::DocId;
Modules§
- assets
- The asset corpus: agent skills, rules, subagents and instruction files declared under
[[assets]]in spec.toml. Assets have no ids and are only read; checks report on them, and onlyspec sync assetswrites them, into roots that declarecopy_of. - audit
- Audits: what passes every check yet needs attention (diagnose), how documents changed over time (history), and packs for judgement a machine cannot make alone (pack).
- authoring
- Writing documents: create, change, move and fix. Every operation returns a plan; nothing touches the disk until the plan is applied.
- check
- Checks over the corpus: rules, their scope, and the findings they report.
- config
- Project configuration (spec.toml).
- corpus
- The corpus: every document under every owner’s spec directory, and counts over it.
- files
- Attachments: non-Markdown files that belong to a document, kept in the repository when small and in a store when large.
- graph
- The graph derived from documents. It is computed on every run and never stored.
- guards
- Guards: named checks over any file in the repository and over commit messages, such as the gate that keeps internal names out of a public package.
- import
- Importing documents from another layout through a project’s import map.
- markdown
- Reading and writing the Markdown files documents are made of.
- model
- The data model: identifiers, types, lifecycle and documents.
- placement
- Placement: which owner a document belongs to and the path it lives at.
- plugins
- Plugins: external programs that add rules, importers, exporters, audits and event handlers over a JSON protocol. Only programs named in spec.toml ever run.
- remotes
- Documents in other repositories.
[remotes.<name>] path = "../shared"lets a reference or a relation name a document there as<name>:<id>(shared:adr:org/20261030000000). The other repository is read from a directory already on disk and never written. A remote whose directory is absent (a CI job without that checkout) is skipped, not reported; a remote that is present but lacks the id is an error like any missing document. - runner
- Runs the shell commands documents name (
verify,generated_by): with a deadline, in parallel, each distinct command once, and with a missing program reported as its own verdict. - search
- Searching the corpus by words, type, owner, status and tags.
- translation
- Translated documents: a translation names its source with
rel.translation_ofand records the source it was made from assource_rev, a hash of the source body (the main file and the bundle’s chapters). No git history is needed to see that a translation is behind: the hash is compared with the source as it is now. Where git has the recorded revision, the sections and paragraphs that changed since are named as well. - workspace
- The repository around the documents: its owners, what it publishes and its version control.