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

# Plan Pipeline

> Intake floor-plan PDFs and track them through cleanup, vectorization, and calibration

The Plan Pipeline is the admin workspace for getting floor plans into Forager. Upload a PDF, attach it to a location node, and watch it move through every processing stage — from raw upload to a calibrated vector plan ready for asset placement.

<Note>
  Plan Pipeline is admin-only. It appears as **Plan Pipeline** in the left navigation when you sign in as an admin. Non-admins do not see it.
</Note>

## Intake: uploading a plan

At the top of the page, the **Intake a floor plan** panel lets you attach a PDF to any location node in your company.

1. Choose a node from the dropdown. Nodes are grouped **Needs a plan** (no plan yet) and **Replace existing plan**.
2. Select a floor-plan PDF (25 MB maximum).
3. Click **Upload & process**.

Processing starts automatically once the upload lands — you do not need to trigger anything separately. Replacing an existing plan resets that node's pipeline state, so simplification and vectorization re-run from scratch and the previous plan's calibration is cleared.

## The pipeline board

The summary cards count how many plans sit in each phase; click a card to filter the table below it. The **Failed / stuck** card turns red when it has any entries.

| Stage             | Meaning                                                                           |
| ----------------- | --------------------------------------------------------------------------------- |
| Uploaded          | Plan attached, awaiting processing                                                |
| Simplified        | Bitmap simplified, not yet vectorized                                             |
| Vectorizing       | Segmentation server is processing the plan                                        |
| Needs calibration | Vectorized — awaiting on-device scale calibration                                 |
| SVG ready         | Vector-rich PDF served directly as SVG (skips segmentation)                       |
| Complete          | Vectorized and scale-calibrated                                                   |
| Failed            | Processing failed — retry available                                               |
| Stuck             | Pending with no progress for over 15 minutes — likely a dead job; retry available |

The table shows each plan's node name and hierarchy path, current stage, render mode, pixel dimensions, scale, and when it last changed. Type in the search box to find a node by name — including nodes that have no plan yet.

## Inspecting a plan

Click any row to open the detail panel. It shows the full pipeline state and signed download links to the plan's artifacts: the original PDF, the simplified plan, the vector GeoJSON, and the mbtiles. Links appear only for artifacts that have been generated.

## Retrying

Failed and stuck rows show a **Retry** button both inline in the table and in the detail panel. Retrying re-runs processing from the current PDF. Use it when a job died mid-run or after fixing a source PDF and re-uploading.

<Note>
  Scale calibration itself happens in the Forager mobile app (draw a reference line over a known distance). The Plan Pipeline tracks calibration status but does not perform it — a plan in **Needs calibration** is waiting for a field tech to calibrate it on-device.
</Note>
