---
url: 'https://adk.nht.io/api/batteries/orchestration/outline/functions/planRead.md'
---

# Function: planRead()

```ts
function planRead(
  store: PlanStore,
  planId: string,
  sel:
    | {
        phase: string;
      }
    | {
        node: string;
      },
): Promise<PlanSlice>;
```

Defined in: [src/batteries/orchestration/outline.ts:117](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/outline.ts#L117)

Read a self-locating slice of a plan by the exact identifier the outline printed.

## Parameters

| Parameter | Type                                                                                  | Description                                                                                             |
| --------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `store`   | [`PlanStore`](../../../../@nhtio/adk/batteries/orchestration/interfaces/PlanStore.md) | the plan store to read from.                                                                            |
| `planId`  | `string`                                                                              | the id of the plan to read.                                                                             |
| `sel`     | | { `phase`: `string`; } | { `node`: `string`; }                                | the selection: `{ phase }` to read a whole phase, or `{ node }` to read the slice around a single node. |

## Returns

`Promise`<[`PlanSlice`](../../../../@nhtio/adk/batteries/orchestration/types/interfaces/PlanSlice.md)>

the self-locating slice of the plan.

## Remarks

The selection is either a phase name (`{ phase }`) or a node id (`{ node }`) — the SAME
identifiers the outline printed, never line numbers. The returned slice carries its phase and
the immediate predecessors/successors of the slice as a whole (`boundary`), so a model can keep
linking new nodes without re-fetching the outline.

Scoped reading is available, not mandatory: a small plan should be read whole, and the outline
hop is not compulsory.

## Throws

if the phase or node id is unknown, naming the valid set — never an empty slice.
