$npx -y skills add WILLOSCAR/research-units-pipeline-skills --skill pipeline-routerRoute an unbound research Goal to one Workflow or materialize its initial C0 kickoff block; use during initial binding, not for later checkpoint summaries or approval.
| 1 | # Pipeline Router |
| 2 | |
| 3 | Routing is a **commitment**: select one Workflow from the desired Artifact and |
| 4 | evidence method, record that choice, and expose the next human Decision. |
| 5 | |
| 6 | ## Inputs |
| 7 | |
| 8 | - `GOAL.md`, or the current user request when the Workspace is new. |
| 9 | - Existing `PIPELINE.lock.md`, `UNITS.csv`, `STATUS.md`, and `DECISIONS.md` when |
| 10 | present. |
| 11 | - `docs/PIPELINE_TAXONOMY.md` and candidate Pipeline front matter during |
| 12 | selection. |
| 13 | |
| 14 | ## Outputs |
| 15 | |
| 16 | - `PIPELINE.lock.md` for a newly bound Goal. |
| 17 | - The initial C0 checkpoint block in `DECISIONS.md`. |
| 18 | - `queries.md` when the selected retrieval Workflow starts at C0. |
| 19 | - A synchronized current Pipeline/checkpoint projection in `STATUS.md`. |
| 20 | |
| 21 | ## Steps |
| 22 | |
| 23 | ### 1. Establish the requested Artifact |
| 24 | |
| 25 | Read the Goal and identify: |
| 26 | |
| 27 | - the reader-facing deliverable; |
| 28 | - the evidence method it requires; |
| 29 | - the requested format or delivery profile; |
| 30 | - the decisions that materially change Workflow selection. |
| 31 | |
| 32 | When a routing discriminator is missing, write the smallest grouped question |
| 33 | set to `DECISIONS.md` and stop at that Decision. |
| 34 | |
| 35 | Completion criterion: every fact that can change the Workflow choice is known |
| 36 | or explicitly bounded in `DECISIONS.md`. |
| 37 | |
| 38 | ### 2. Select one Workflow |
| 39 | |
| 40 | Load `docs/PIPELINE_TAXONOMY.md`, then inspect only the candidate Pipeline |
| 41 | contracts. Choose from target Artifact and evidence method rather than keyword |
| 42 | matching alone. Treat delivery profiles and course-report use cases as overlays |
| 43 | inside their existing Workflow family. |
| 44 | |
| 45 | Completion criterion: exactly one executable Pipeline is selected and its |
| 46 | target Artifacts match the Goal. |
| 47 | |
| 48 | ### 3. Materialize the commitment |
| 49 | |
| 50 | Write `PIPELINE.lock.md` with: |
| 51 | |
| 52 | ```text |
| 53 | pipeline: <pipeline path> |
| 54 | units_template: <template path from Pipeline front matter> |
| 55 | locked_at: <YYYY-MM-DD> |
| 56 | ``` |
| 57 | |
| 58 | Initialize `UNITS.csv` from that template when the Workspace is new. Preserve a |
| 59 | valid existing lock; a route change is an explicit operator Decision followed |
| 60 | by reinitialization or migration, never a silent rewrite. |
| 61 | |
| 62 | Completion criterion: the lock, Unit template, and Workspace projection refer |
| 63 | to the same Pipeline. |
| 64 | |
| 65 | ### 4. Expose the C0 checkpoint |
| 66 | |
| 67 | Materialize the C0 kickoff block and approval checkbox in `DECISIONS.md`. Seed |
| 68 | `queries.md` from the Goal when retrieval is part of the selected Workflow. |
| 69 | Later checkpoints use `checkpoint-brief`. Historical Workspaces whose saved |
| 70 | Unit still invokes `pipeline-router` after C0 are delegated to |
| 71 | `checkpoint-brief` with a deprecation warning; the router never approves them. |
| 72 | |
| 73 | The deterministic helper may be used after selection: |
| 74 | |
| 75 | ```bash |
| 76 | uv run python .codex/skills/pipeline-router/scripts/run.py \ |
| 77 | --workspace workspaces/<name> \ |
| 78 | --checkpoint C0 |
| 79 | ``` |
| 80 | |
| 81 | Completion criterion: `DECISIONS.md` contains the C0 checkpoint and one |
| 82 | clear approval or answer surface; retrieval Workflows have a non-empty C0 query |
| 83 | seed. |
| 84 | |
| 85 | ### 5. Verify the route |
| 86 | |
| 87 | Check that the locked Pipeline exists, its Unit template exists, and the active |
| 88 | checkpoint is represented in both `STATUS.md` and `DECISIONS.md`. |
| 89 | |
| 90 | Completion criterion: the Pipeline Runner can continue from Workspace files |
| 91 | without making another routing inference. |
| 92 | |
| 93 | ## Context Pointers |
| 94 | |
| 95 | - Read `docs/PIPELINE_TAXONOMY.md` only while selecting or deliberately changing |
| 96 | a Workflow. |
| 97 | - After selection, the locked `pipelines/*.pipeline.md` is the execution |
| 98 | contract and the taxonomy leaves context. |
| 99 | - Use `assets/pipeline-selection-form.md` only when missing routing facts require |
| 100 | a human answer. |
| 101 | - Run the helper with `--help` when C0 materialization needs debugging; the |
| 102 | helper records the initial route projection but does not choose one. |