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

# Compiled prompt format

> Structure of the prompt and manifest produced by compileDispatchPlan in EISPATCH v1.1.0: marker, sections, capability labels, inputs, and outputs.

`compileDispatchPlan` in `core/compiler.mjs` turns your reviewed prompt, selected capabilities, and optional task sections into one text prompt plus a manifest. It is host-independent; `host` is recorded as metadata only.

## Marker

Every generated prompt starts with:

```text theme={null}
<!-- DISPATCH_COMPILED_PROMPT v1.0 -->
```

Hooks pass through any prompt that contains `<!-- DISPATCH_COMPILED_PROMPT`, which prevents an approved prompt from being intercepted again.

## Sections

In order:

1. The marker line.
2. `## Objective`, followed by the original prompt (trimmed, any language, unchanged).
3. One of:
   * **Breakdown mode** (at least one task): `## Task Breakdown & Assigned Capabilities`.
   * **Simple mode** with capabilities: `## Approved Capabilities & Node Instructions`.
   * **Simple mode** without capabilities: `## Approved Capabilities` with the line `No extra capabilities selected; proceed with default host tools only.`
4. `## Additional User Constraints`, only when `globalNotes` is not empty.
5. `## Execution Guardrail`, with the line `This prompt was explicitly reviewed and approved by the user in EISPATCH. Proceed with execution.`

### Simple mode capability lines

The section starts with `Use the following user-approved capabilities in support of the objective above:`. Capabilities are sorted by `order` (missing values sort last) and listed as:

```text theme={null}
1. **[KIND] `label`** *(advisory guidance)*
   - Instruction: <instruction>
   - Scoped Tools: `tool1`, `tool2`
```

### Breakdown mode task sections

The section starts with `Execute the following user-approved task sections in order, applying each section’s assigned capabilities:`. Tasks are sorted by `order` and numbered from 1:

```text theme={null}
### 1. <task title>
- Task focus: <task prompt>
  1. **[KIND] `label`** *(advisory guidance)*
     - Instruction: <instruction>
     - Scoped Tools: `tool1`, `tool2`
```

* `- Task focus:` appears only when the task prompt differs from the title.
* A task without capabilities gets `- Capabilities: Default host tools only.`

### Capability label rules

* `KIND` is the capability kind in uppercase: `MCP`, `SKILL`, `PLUGIN`, `SUBAGENT`, or `RULE`.
* The label is `host-enforced tool scope` only when the node has `enforceable: true`. Otherwise it is `advisory guidance`.
* `Instruction` is omitted when empty.
* `Scoped Tools` lists at most 8 tools, followed by `(+N more)` when there are more.

## Manual edits

If `manualFinalPrompt` is non-empty, `compiledPrompt` is that text verbatim. `generatedPrompt` still holds the structured version, and `manifest.manuallyEdited` is `true`.

## Inputs

**prompt** `string` *required*

The original objective.

**selectedNodes** `object[]` (default: \[])

Selected capability nodes for simple mode. Fields read: `kind`, `label`, `enforceable`, `instruction`, `tools`, `order`, and `capabilityId` or `id`.

**tasks** `object[]` (default: \[])

Task sections. When non-empty, breakdown mode is used and `selectedNodes` is ignored. Fields read: `id`, `title` (defaults to `Task N`), `prompt`, `order` (defaults to 999), and `capabilities` (nodes with the same fields as above).

**globalNotes** `string` (default: '')

Additional user constraints.

**manualFinalPrompt** `string` (default: '')

User-edited final text, sent verbatim when non-empty.

**host** `string` (default: generic)

Host identifier, stored in the manifest.

## Outputs

**compiledPrompt** `string`

The prompt to approve and dispatch.

**generatedPrompt** `string`

The structured prompt, even when a manual edit overrides it.

**manifest** `object`

**properties**

**version** `string`

`"1.0"`

**host** `string`

The `host` input.

**mode** `string`

`simple` or `breakdown`.

**taskCount** `number`

Number of tasks, or `0` in simple mode.

**approvedAt** `string`

ISO timestamp of when the plan was compiled.

**originalPrompt** `string`

The trimmed original prompt.

**manuallyEdited** `boolean`

`true` when `manualFinalPrompt` was used.

**controls** `object`

**properties**

**enforceable.allowedMcpServers** `string[]`

Unique labels of selected capabilities with `enforceable: true`.

**enforceable.enforcementNote** `string`

`Populated only when active host-level PreToolUse / BeforeToolSelection enforcement is enabled.`

**advisory.capabilities** `object[]`

Each non-enforceable capability as `{ id, kind, name, taskId? }`.

**advisory.enforcementNote** `string`

`Delivered via compiled prompt instructions; model adherence is advisory.`

**summary** `object`

`mode`, `taskCount`, `selectedCount`, `enforceableCount`, `advisoryCount`, `manuallyEdited`, and `charCount` (length of `compiledPrompt`).

> [!NOTE]
>
> The compiler only produces text and metadata. Whether a host restricts tools is decided by the host, not by EISPATCH. In v1.1.0, capabilities are advisory unless a node is explicitly marked `enforceable: true`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.