Skip to content
Esc
navigateopen⌘Jpreview
On this page

Create a Document Draft

List repository Document Types, follow the selected Creation Policy, initialize a Document Draft, and finish it with a clean Check Report.

Use this guide when a repository defines a Document Type and you need to initialize or route creation correctly.

List Document Types

List the selected repository’s Document Types and Creation Policies.

presswork create --list-types

The catalog reports the Repository Root, each Document Type, its Creation Policy, and an external workflow name when one is declared. It does not list creation fields. The Basic Profile returns an empty catalog when the repository has no configured Document Types.

Follow the Creation Policy

  • For presswork, continue with Document Creation.
  • For external, use the named external workflow. Presswork refuses to initialize the draft.
  • For manual, create and index the document with repository tools. Presswork refuses to initialize the draft and continues to validate the result.

Supply the required fields

For a presswork Creation Policy, find the matching documentTypes declaration in the selected repository’s presswork.json and open its loaded Template. Required creation fields are the union of placeholders in the declaration’s filename, the loaded Template, and indexEntry. The Presswork Configuration reference owns this contract.

Pass the Document Type and repeat --field for every required input. This example applies to the repository-specific proposal declaration shown in the Presswork Configuration reference.

presswork create proposal \
  --field slug=first-proposal \
  --field "title=First proposal"

Field names and values must satisfy the Document Type declaration. Each field is a unique name=value pair.

Successful Document Creation reports the created repository-relative path, updated Index Document, unfinished draft status, and pending Template requirements. It does not overwrite an existing destination or choose another filename.

Finish the draft

Resolve every Template placeholder and presswork: Template Directive in the new Document Draft. Then produce the machine-readable Check Report.

presswork check --json

The documentation work is complete only when presswork check --json exits 0, the report has complete: true, and both violations and operationalDiagnostics are empty arrays.

Use Presswork Configuration to define Document Types, CLI for exact options, or Rules and diagnostics for stable identifiers.