Skip to main content

Crate specfold_core

Crate specfold_core 

Source
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::graph::Graph;
pub use corpus::Corpus;
pub use corpus::LoadOptions;
pub use corpus::census;
pub use corpus::trace;
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 only spec sync assets writes them, into roots that declare copy_of.
authoring
Writing documents: create, change, move, fix and import them, and keep their attachments. 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; guards over any file and commit message; and audits of what passes yet needs attention.
config
Project configuration (spec.toml).
corpus
The corpus: every document under every owner’s spec directory, the graph derived from it, searches and counts over it, and the translations among its documents.
export
Exporting the corpus: the extended plugin payload (bodies and resolved links) and the built-in markdown exporter that writes a tree for Obsidian, MkDocs, Docusaurus or a GitHub wiki.
model
The data model: identifiers, types, lifecycle and documents, and the Markdown files documents are made of.
paths
Path arithmetic every context shares: lexical clean-up, relative links, containment, and the real form of a path that may not exist yet. Nothing here reads the working directory.
plugins
External programs: plugins that add rules, importers, exporters, audits and event handlers over a JSON protocol, and the shell commands documents name. Only programs named in spec.toml or a document ever run.
suggest
What specfold suggests: the closest known name when one does not match, and the shell words of the commands it proposes.
workspace
The repository around the documents: its owners, where a document is placed, the projects inside it and in other repositories, what it publishes and its version control.