Ask the compiler, not a stale template.
These commands form the everyday interface. Run the one that answers the question you actually have.
| I need to… | Run | What it gives me |
|---|---|---|
| See available document types | docc types | Known types with their descriptions and themes. |
| Know a type’s requirements | docc describe ch_letter | The full contract: frontmatter, body, semantic syntax, blanks and rules. |
| Start a valid source file | docc example ch_letter > brief.md | A compact example owned and tested by the schema. |
| Find every problem before output | docc check brief.md | All collected diagnostics with positions and hints. |
| Produce the Word document | docc build brief.md | Validation first, then a .docx beside the source. |
| Understand parsed content as data | docc read brief.md | Frontmatter, body, spans and fields in JSON. |
| See configuration in effect | docc doctor | The resolved schemas, themes and profile source. |
| Get editor diagnostics | docc lsp | The language server over standard input and output. |
| Use a managed profile | docc profile use REPOSITORY | An installed, pinned profile bound to the project. |
--json on supported commands. Successful command results stay structured on stdout; build validation diagnostics remain a separate JSON object on stderr.One source, one feedback loop.
Discover. Start with types, describe and example. They make the document contract visible before you draft.
Author. Edit Markdown and frontmatter. Keep facts as data and prose as prose.
Check. Run docc check during drafting or let the LSP surface the same diagnostics in the editor.
Build. Render only the passing source. The profile supplies the fixed look; the compiler supplies the proof that the declared requirements passed.
Review inputs. Treat a changed source, schema, theme or profile lockfile as a real document change. Rebuilds are deterministic.
# A minimal, explicit CI check. docc check --strict docs/*.md # A machine-readable variant for another tool. docc check --json docs/*.md
Go deeper by the question you have.
When a document does not build, start with the source line.
Read the error code, caret and hint. Correct the authored file first. If the reported issue is about a type requirement, inspect docc describe <type>. If it is about what profile or theme is active, use docc doctor or docc profile status.
docc check brief.md # Correct source facts or structure from the diagnostics. docc describe ch_letter # Revisit the type contract. docc doctor # Verify the schema and theme selection.