The new iwe create command gives you two ways to add a document: hand it the
complete markdown and it lands on disk byte for byte, or name a template and fill
it in with --var and --set. Either way you can validate against your document
schema before anything is written. The iwe_create MCP tool moves to the same
shape, so an agent writes the document it intended — and if_exists: "skip" makes
a repeated call safe.
iwe
Added
iwe createcreates documents in two explicit modes: content mode (iwe create <key> --content, or piped input) writes the complete document you pass byte for byte, and template mode (--template NAME) composes it from a named template, with your frontmatter written above the rendered output. Both accept--strictto validate against the document schema before writing.iwe create --var NAME=VALUEsets one template variable and uses the value verbatim as a string, so markdown like--var body='## Notes'arrives untouched;--vars-yamland--vars-jsontake all the variables at once and keep their types, so templates can branch on booleans and loop over lists.--set FIELD=VALUEsets one frontmatter field written above the rendered document, repeat it for more. All of them require--template.
Fixed
iwe update -cno longer strands new frontmatter below the old block: content that carries its own frontmatter now replaces the existing one, and frontmatter closed with...is preserved (previously discarded).
iwec
Changed
iwe_createnow takes the complete document:contentcarries the frontmatter block and the title heading and is written verbatim,keyis required, andif_exists: "skip"makes creation idempotent (wastitleplus a body, with the heading and the key generated for you).
Fixed
iwe_createno longer overwrites a file that exists on disk but has not reached the in-memory graph yet — the existence check now looks at the file as well, soif_existsdecides in both cases.
Library crates (liwe, diwe)
liwe
Added
split_raw_frontmattersplits a leading YAML frontmatter block off markdown text, matching the parser's rules.prepend_frontmatterprepends a frontmatter mapping to a rendered document, dropping reserved keys.