# Prompts

Prompts are pre-built conversation starters that guide the AI through a structured multi-step workflow. You can invoke them directly by name, or simply describe your goal and the AI will use the appropriate prompt automatically.

## `execute_activity`

**Mode:** All modes

Guides the AI through executing a specific activity on an entry — from fetching the form to submitting the result.

| Argument   | Required | Description                                             |
| ---------- | -------- | ------------------------------------------------------- |
| `module`   | Yes      | Module name                                             |
| `activity` | Yes      | Activity to execute (e.g., `Approve`, `create`, `edit`) |
| `entryId`  | No       | Entry ID. Omit for create operations.                   |

**Workflow the AI follows:**

1. Call `get_form` to discover required fields, types, options, and confidence threshold
2. Map available context to form fields; ask the user for any missing required fields
3. Assess confidence against the activity threshold
4. Call `submit_activity` with the prepared input and AI traceability object
5. Report the result

**Example invocation:**

> "Execute the Approve activity on leave request LR-0055."

***

## `diagnose_entry`

**Mode:** All modes

Guides the AI through a full investigation of an entry — current state, field values, history, and available next steps.

| Argument  | Required | Description          |
| --------- | -------- | -------------------- |
| `module`  | Yes      | Module name          |
| `entryId` | Yes      | Entry ID to diagnose |

**Workflow the AI follows:**

1. Call `get_entry` for current state and field values
2. Call `get_entry_history` for the full audit trail
3. Call `get_module_schema` (tier=extended) for available activities and transitions
4. Identify: current state, how the entry got there, available next actions, any flagged AI intentions
5. Summarize findings

**Example invocation:**

> "Diagnose entry INV-1042." "Why is PO-0234 stuck in Pending Approval?"

***

## `design_factsops_workflow`

**Mode:** Configure, Frontend

Guides the AI through designing a complete FACTSOps workflow module from scratch — fields, states, activities, flows, colors, and actor types.

| Argument   | Required | Description                                                                                     |
| ---------- | -------- | ----------------------------------------------------------------------------------------------- |
| `entity`   | Yes      | What the workflow manages (e.g., `leave request`, `invoice`, `KYC application`)                 |
| `industry` | No       | Industry context for compliance-aware defaults (e.g., `healthcare`, `hr`, `financial_services`) |

**Workflow the AI follows:**

1. Call `design_workflow` with a description synthesized from the entity and industry
2. Complete the scaffolded template: states, activities, flows, actors, confidence thresholds, colors, AI hints
3. Call `validate_design` to check structural integrity
4. Present the schema to the user for review
5. Call `create_module` to persist it
6. Call `get_module_schema` to confirm

**Example invocation:**

> "Design a purchase order approval workflow." "Design a patient referral workflow for a healthcare clinic."

***

## `modify_module`

**Mode:** Configure, Frontend

Guides the AI through modifying an existing module's schema — adding or renaming fields, states, activities, or flows — while preserving all existing data and stable IDs.

| Argument | Required | Description                                                                          |
| -------- | -------- | ------------------------------------------------------------------------------------ |
| `module` | Yes      | Module name to modify                                                                |
| `change` | Yes      | Description of the change (e.g., `add a Priority field`, `add an Escalate activity`) |

**Workflow the AI follows:**

1. Call `get_module_canvas` to retrieve the full definition with stable IDs
2. Apply the requested change, preserving all existing IDs
3. Call `validate_design` (mode=update) to check the modified schema
4. Present the diff to the user for review
5. Call `update_module` to merge the changes

**Example invocation:**

> "Add a Priority field to the Purchase Order module." "Rename the 'Pending Review' state to 'Under Review' in the Invoice module."


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://inistate.gitbook.io/home/mcp-integration/reference/prompts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
