# Document templates A document template is a Markdown file that lays out a document's sections and tells the agent what each section should hold. Say "prepare a new document using template status-report" and the agent reads the template, follows its hints, asks you where a hint says to ask, pulls from the wiki where a hint names a source, and writes the finished document to `outputs/documents/`. These are *your* files. The agent never edits a template on its own; it only writes a new one when you ask for it ("make a template for a handover note"). `ckb-reset` leaves this folder alone and `ckb-upgrade` never overwrites it. ## Format ```markdown --- type: template tldr: One line saying what kind of document this produces. output: outputs/documents/{{date}}-handover-{{slug}}.md --- # Handover: {{subject}} ## Current state ## Open items *Prepared from the knowledge base on {{date}}.* ``` The rules the agent follows: - Every `` is an instruction, not text. It is read, acted on and dropped from the finished document. Write it the way you would brief a colleague: what goes in the section, where to find it, how long it should be, and whether to ask you first. - Everything outside a comment is copied as written: headings, boilerplate, signatures, legal lines. - `{{date}}`, `{{author}}` and `{{slug}}` are filled in by the agent (today, the git identity, a short slug of the document's subject). Any other `{{name}}` is asked for once, unless a comment says where it comes from. - `output:` is optional. Without it the document lands in `outputs/documents/` under the template's name, today's date and the slug. - A hint that names a source the agent cannot find, or a question you don't answer, becomes a one-line `TODO:` in the document rather than invented text. The example in this folder, `status-report.md`, uses every one of these. Copy it to start your own. Only files with `type: template` in their frontmatter count as templates; this README does not.