mod scaffold#
- module scaffold#
Scaffold new responses and promote import drafts into the published corpus.
Variables
- const TEAM_SIGN_OFF: &str#
Default team closing used by scaffolds (must pass personal-signature checks).
Functions
- fn check_response_path(path: &Path, prefix: &str) -> Result<CheckReport>#
Quality-check a single on-disk markdown response (real check rules).
- fn promote_to_corpus(src: &Path, dest_dir: &Path, force: bool, prefix: &str) -> Result<PathBuf>#
Promote an import draft into the published corpus after
checkagainstprefix.
- fn resolve_response_id(opts: &ScaffoldOptions) -> Result<String>#
Resolve a stable
{prefix}-id from options (or title).
- fn scaffold_markdown(opts: &ScaffoldOptions) -> Result<String>#
Render check-clean markdown for a new response (pure; no IO).
- fn write_scaffold(dir: &Path, opts: &ScaffoldOptions, force: bool) -> Result<PathBuf>#
Write a scaffolded response under
diras{id}.md. Refuses to overwrite unlessforce.
Structs and Unions
- struct ScaffoldOptions#
Options for rendering a new canned-response markdown file.
- title: String#
Human title (also used for the H1 and default id slug).
- id: Option<String>#
Explicit id (
{prefix}-…); whenNone, derived as {prefix}-<slugify(title)>.
- prefix: String#
Shared library prefix (from canonic.toml / –prefix).
- sop: String#
Front-matter
sop(Confluence URL ornone).
- tags: Vec<String>#
Optional tags (without brackets).
- body: Option<String>#
Optional body paragraphs (between greeting and sign-off). Empty → placeholder.
Traits implemented
- impl Default for ScaffoldOptions#