> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecygov.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and use reusable document templates in Prophecy

> Build reusable document templates for staff reports, resolutions, and other city documents, then generate AI-drafted documents in one step.

Templates in Prophecy are reusable document formats that capture the structure, sections, and formatting rules for the documents your city produces regularly — staff reports, resolutions, ordinances, grant applications, and more. Once a template exists, Prophecy can use it to generate a complete draft in chat, saving staff hours of formatting work on every new document.

## Browsing your city's templates

Open **Templates** from the left sidebar to see all templates available to your city. You can search by name to filter the list. Templates created by other staff members and shared with the city appear here alongside your own.

Click any template to see its sections, rules, and a preview of the expected document structure.

## Creating a new template

Prophecy offers two ways to create a template: from existing documents or from a written description.

<Tabs>
  <Tab title="From existing documents">
    Upload one or more reference documents — previous staff reports, approved resolutions, or other examples — and Prophecy analyzes their structure to generate template elements automatically.

    <Steps>
      <Step title="Click New template">
        Open the **Templates** page and click **New template**.
      </Step>

      <Step title="Upload reference files">
        Upload the documents you want Prophecy to learn from. Accepted formats are the same as the Data Vault: PDF, DOCX, DOC, XLSX, XLS, PPTX, PPT, CSV, TXT.
      </Step>

      <Step title="Add a title and description">
        Give the template a name (for example, "Staff Report — Planning Commission") and a brief description of what it's for. Prophecy can also generate these from your files if you leave them blank.
      </Step>

      <Step title="Review generated elements">
        Prophecy extracts sections and rules from your reference documents and presents them for review. Edit, reorder, or remove any element before saving.
      </Step>

      <Step title="Save the template">
        Click **Save**. The template is now available for use in chat.
      </Step>
    </Steps>
  </Tab>

  <Tab title="From a description">
    If you don't have an existing document to upload, describe what you need and Prophecy builds a template structure from your description.

    <Steps>
      <Step title="Click New template">
        Open the **Templates** page and click **New template**.
      </Step>

      <Step title="Enter a title and description">
        Provide a clear title and describe the document type, its purpose, and any specific sections or requirements.
      </Step>

      <Step title="Generate elements">
        Click **Generate**. Prophecy creates a set of template elements based on your description.
      </Step>

      <Step title="Review and adjust">
        Edit the generated elements to match your city's conventions.
      </Step>

      <Step title="Save the template">
        Click **Save** to make the template available to your city.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Template elements and section rules

Each template is made up of **elements** — named sections with rules that guide how Prophecy fills them in. A section rule might specify:

* What content belongs in that section (for example, "Summarize the fiscal impact in two sentences")
* What format to use (numbered lists, prose paragraphs, tables)
* What to include or avoid

Clear, specific rules produce better drafts. After creating a template, you can edit individual elements at any time from the template detail page.

## Generating a draft from a template in chat

Once a template exists, you can generate a full draft document from AI chat without leaving your conversation.

<Steps>
  <Step title="Open a chat">
    Start a new chat or continue an existing one.
  </Step>

  <Step title="Ask Prophecy to draft a document">
    Type a request like "Draft a staff report for the proposed park renovation using our staff report template." Prophecy identifies the relevant template and the relevant source documents.
  </Step>

  <Step title="Review the draft">
    Prophecy writes the draft inline in the chat, section by section, citing its sources. Review the content and ask for revisions as needed.
  </Step>

  <Step title="Export when ready">
    When the draft meets your needs, export it as a Word document (see below).
  </Step>
</Steps>

<Tip>
  The more context you give Prophecy — the meeting date, the relevant agenda item, or a Data Vault file — the more accurate and complete the draft will be.
</Tip>

## Exporting a draft as a Word document

After Prophecy generates a draft in chat, you can download it as a DOCX file for editing in Word or Google Docs.

1. In the chat, ask Prophecy to "save this as a Word document" (or similar).
2. Prophecy formats the draft and presents a download card.
3. Click **Download** to save the `.docx` file to your computer.

The exported file preserves the section structure defined by the template.

## Sharing templates with your city

Templates you create are visible to other staff members in your city by default once shared. To make a template available city-wide, open the template and use the share option. City admins can also manage which templates appear for all staff.

<Note>
  Templates are city-specific. Templates created for your city are not visible to staff at other cities.
</Note>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can I use a Word document as the basis for a template?">
    Yes. When creating a template, you can upload a DOCX file as a reference document. Prophecy extracts the heading structure and section content to generate template elements.
  </Accordion>

  <Accordion title="Can I edit a template after saving it?">
    Yes. Open the template from the Templates page and edit any element, section rule, or title. Changes take effect immediately for future drafts.
  </Accordion>

  <Accordion title="What happens if I delete a template?">
    The template is removed from the city's template library. Any documents previously drafted using it are not affected.
  </Accordion>

  <Accordion title="Can I generate a draft without a template?">
    Yes. You can ask Prophecy to draft any document in chat without specifying a template. Templates simply ensure the output follows your city's established structure and formatting conventions.
  </Accordion>
</AccordionGroup>
