--- name: ckb-document description: Prepare a new document from a document template in templates/ - read the template, treat each section's comment as an instruction (ask the user, pull from a named wiki page or file, keep to a length), fill the placeholders and write the result to outputs/documents/. Also lists the templates available and writes a new template on request. Use for "prepare a new document using template X", "new document from template X", "create a status report from the template", "what templates do I have", "list templates", or "make a template for X". Not for the tooling layer: "upgrade the template" is ckb-upgrade. --- # Document skill ## Purpose The template is the brief, the wiki is the evidence, the user fills what neither covers. Templates are the user's files: read them, write a new one only on request, never rewrite an existing one. Nothing here touches `wiki/`, so Rule B does not apply; Rule D does. ## Template format ```markdown --- type: template tldr: One line saying what kind of document this produces. output: outputs/documents/{{date}}-handover-{{slug}}.md # optional --- # Handover: {{subject}} ## Current state *Prepared from the knowledge base on {{date}}.* ``` How to read it: | Element | Meaning | |---|---| | `` | An instruction for this section. Follow it, then drop it. It may say to ask the user, name a source (a wiki page, a `raw/` file, a `linked/` or `libs/` page, a URL), set a length or tone, or say when to drop the section. | | Any other text | Boilerplate. Copy it verbatim: headings, closing lines, signatures. | | `{{date}}`, `{{author}}`, `{{slug}}` | Filled in without asking: today, the session identity (name, or `Name ` in frontmatter), a short kebab-case slug of the document's subject. | | Any other `{{name}}` | Asked for once, unless a comment says where it comes from. The same placeholder repeated gets the same value. | | `output:` | Where the document goes. Default: `outputs/documents/{{date}}-