Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Purpose: Help developers and AI agents choose the correct template type for their use case. Last Updated: 2026-02-01

Quick Decision

I need to create…Use This Template TypeSpec/Location
Reusable automation workflowWorkflow TemplateFW-28
Printable PDF (policy, letter, report)Document TemplatePF-64
Reusable form structureForm TemplateFW-01
Configurable business wizardWizard TemplatePF-41
Specification documentSpec TemplateTemplate Index

Decision Tree

I need to create a template for:

├─ AUTOMATING WORKFLOWS?
│   │
│   └─ YES → Workflow Template (FW-28)
│       └─ Creates: Reusable automation patterns
│       └─ Storage: fw_workflow_templates

├─ GENERATING PRINTABLE DOCUMENTS?
│   │
│   ├─ Is it a policy, procedure, letter, or report?
│   │   │
│   │   └─ YES → Document Template (PF-64)
│   │       └─ Creates: PDF with letterhead and sections
│   │       └─ Storage: pf_document_templates
│   │
│   └─ Is it a form to fill out?
│       │
│       └─ YES → Not a template issue - use Form Builder (FW-01)

├─ CREATING REUSABLE FORM STRUCTURES?
│   │
│   └─ YES → Form Template (FW-01)
│       └─ Creates: Clonable form definition
│       └─ Storage: fw_forms (is_template=true)

├─ CONFIGURING BUSINESS WIZARDS?
│   │
│   └─ YES → Wizard Template (PF-41)
│       └─ Creates: Module wizard configuration
│       └─ Storage: pf_wizard_templates

└─ WRITING DOCUMENTATION?

    └─ YES → Spec Template (specs/_templates/)
        └─ Creates: Markdown specification
        └─ Storage: File system only

Template Types Explained

1. Workflow Template (FW-28)

What it is: Pre-built workflow automation pattern that can be cloned and customized. Best for:
  • ✅ Employee onboarding automation
  • ✅ Invoice approval workflows
  • ✅ Incident response automation
  • ✅ Notification sequences
Storage: fw_workflow_templates table Key features:
  • Visual workflow builder integration
  • Template marketplace for sharing
  • Template parameterization
  • Version tracking
  • Usage statistics
Example:
"Employee Onboarding Workflow" template:
├─ Trigger: Employee created
├─ Action: Send welcome email
├─ Action: Create Slack channel
├─ Action: Assign training tasks
└─ Action: Schedule 30-day check-in

2. Document Template (PF-64)

What it is: Structure template for printable documents with letterhead, sections, and approval chains. Best for:
  • ✅ Policies (CARF/HIPAA-aligned sections)
  • ✅ Procedures (step layout, verification blocks)
  • ✅ Business letters (letterhead, signature)
  • ✅ Report covers (title page, confidentiality)
  • ✅ Offer letters (HR documents)
Storage: pf_document_templates, pf_letterheads tables Key features:
  • Letterhead management (logo, address, branding)
  • Section configuration (required/optional)
  • Approval chain templates
  • Version history
  • PDF generation via edge function
Example:
"Healthcare Policy Template":
├─ Letterhead: Organization branding
├─ Sections: Purpose, Scope, Policy Statement, Compliance
├─ Numbering: POL-26-001
├─ Approval Block: 3 signature lines
└─ Footer: Confidentiality notice, page numbers

3. Form Template (FW-01)

What it is: Form definition marked as a template that can be cloned to create new forms. Best for:
  • ✅ Standardized incident reports
  • ✅ Assessment form patterns
  • ✅ Survey templates
  • ✅ Intake form structures
Storage: fw_forms table with settings.is_template=true Key features:
  • Clone to create new form
  • Preserves field structure and validation
  • Organization-specific templates
  • Quick-start for common form types
Example:
"Incident Report Template":
├─ Page 1: Incident Details (date, time, location)
├─ Page 2: Involved Parties (names, roles)
├─ Page 3: Description (narrative, contributing factors)
└─ Page 4: Actions Taken (immediate, follow-up)

4. Wizard Template (PF-41)

What it is: Configurable wizard definition for module-specific business processes. Best for:
  • ✅ Employee onboarding wizard
  • ✅ Resident admission wizard
  • ✅ Payroll run wizard
  • ✅ Organization setup wizard
Storage: pf_wizard_templates table Key features:
  • System templates (defaults)
  • Organization customization
  • Custom step components
  • Visibility conditions
  • Validation rules per step
Example:
"Employee Onboarding Wizard Template":
├─ Step 1: Personal Information (form)
├─ Step 2: Employment Details (form)
├─ Step 3: Credentials Setup (custom component)
├─ Step 4: System Access (custom component)
└─ Step 5: Review & Complete (review)

5. Spec Template (Developer)

What it is: Markdown template for writing specifications and documentation. Best for:
  • ✅ Feature specifications
  • ✅ Implementation plans
  • ✅ Task breakdowns
  • ✅ Wizard UX specs
  • ✅ Document template specs
Storage: specs/_templates/ directory (file system only) Key templates:
  • SPEC_TEMPLATE.md - Complex features
  • SPEC_TEMPLATE_LITE.md - Simple features
  • WIZARD_SPEC_TEMPLATE.md - Module wizards
  • DOCUMENT_TEMPLATE_SPEC.md - Printable documents
  • TASKS_TEMPLATE.md - Task breakdown

Side-by-Side Comparison

AspectWorkflowDocumentFormWizardSpec
PurposeAutomationPrintable PDFData captureBusiness processDocumentation
StorageDatabaseDatabaseDatabaseDatabaseFile system
OutputWorkflow rulesPDF filesNew formsWizard configMarkdown
Marketplace✅ Yes❌ No❌ No✅ Phase 3❌ No
Versioning✅ Yes✅ Yes❌ No✅ Phase 2Git
Org-specific✅ Yes✅ Yes✅ Yes✅ Yes❌ No

Common Mistakes

❌ Using Workflow Template for Documents

Wrong: Creating a workflow template to generate PDF policies Problem: Workflow templates define automation logic, not document structure Solution: Use Document Template (PF-64) for printable documents

❌ Using Document Template for Automation

Wrong: Trying to automate approval flow using document templates Problem: Document templates define structure, not automation Solution:
  • Use Document Template (PF-64) for the document structure
  • Use Approval Chain Template (also in PF-64) for approval workflow
  • Or use Workflow Template (FW-28) for complex automation

❌ Using Form Template for Documents

Wrong: Creating a form template to generate a policy document Problem: Forms are for data capture, not document generation Solution: Use Document Template (PF-64) for printable documents

❌ Confusing Spec Templates with Document Templates

Wrong: Using DOCUMENT_TEMPLATE_SPEC.md to create a policy (instead of defining a policy template) Problem:
  • Spec templates are for writing specifications
  • Document templates are for defining printable document structures
Solution:
  • Use DOCUMENT_TEMPLATE_SPEC.md to write a spec for a new document template
  • Use PF-64 API to create the actual document template

Integration Matrix

Template TypeIntegrates With
Workflow TemplateFW-06 (Workflow Builder), FW-03 (Automation Engine)
Document TemplatePF-11 (Documents), PF-10 (Notifications), GR-01 (Policies)
Form TemplateFW-01 (Form Builder), FW-05 (Multi-Page Forms)
Wizard TemplatePF-41 (Module Wizards), Module step registries
Spec TemplateDeveloper documentation, AI agents

FAQ: Forms vs Document Templates

”How do I turn a form submission into a PDF?”

Forms (FW) capture data. Document Templates (PF-64) format printable documents. To export a form submission as a PDF:
  1. Quick Export: Open any submission at /fw/submissions/:id and click “Download PDF” for an instant export
  2. Branded Export: Click “Export with Letterhead” to choose your organization’s letterhead and formatting
  3. Signed Export: If the form has signature fields (FW-33), use “Signed PDF” to include captured signatures

”Should I create a form or a document template?”

You Want To…Use This
Collect data from usersForm (FW-01)
Create a professional printable documentDocument Template (PF-64)
Collect data AND generate a nice PDF from itForm (FW-01) + Letterhead (PF-64)
Define standard policy/procedure formatDocument Template (PF-64)
Create a reusable data entry formForm Template (FW-01, is_template=true)

“Where do I manage templates?”

Template TypeLocation
Letterheads & Document TemplatesSettings → Templates (/settings/templates)
Workflow Automation TemplatesForms & Workflow → Templates (/fw/templates)
Form Templates (reusable forms)Forms & Workflow → Form Templates (/fw/form-templates)
Wizard TemplatesForms & Workflow → Wizards (/fw/wizards)


Last Updated: 2026-02-05