$npx -y skills add WILLOSCAR/research-units-pipeline-skills --skill outline-refinerPlanner-pass coverage + redundancy report for an outline+mapping, producing outline/coverage_report.md and outline/outline_state.jsonl. Trigger: planner, dynamic outline, outline refinement, coverage report, 大纲迭代, 覆盖率报告. Use when: you have outline/outline.yml + `out
| 1 | # Outline Refiner (Planner pass, NO PROSE) |
| 2 | |
| 3 | Goal: make the outline *auditable* by adding an explicit planner stage that answers: |
| 4 | - Do we have enough mapped evidence per H3? |
| 5 | - Are the same few papers reused everywhere? |
| 6 | - Are subsection axes still generic/scaffold-y? |
| 7 | - Is the outline likely to produce a paper-like structure (final ToC budget: ~6–8 H2; fewer, thicker H3s)? |
| 8 | |
| 9 | This is a deterministic “planner” unit: it must not write survey prose. |
| 10 | |
| 11 | ## Inputs |
| 12 | |
| 13 | Required: |
| 14 | - `outline/outline.yml` |
| 15 | - `outline/mapping.tsv` |
| 16 | |
| 17 | Optional (best-effort diagnosis; may be missing early in the pipeline): |
| 18 | - `outline/OUTLINE_BUDGET_REPORT.md` (if present: explains recent merges; helps interpret mapping/coverage changes) |
| 19 | - `papers/paper_notes.jsonl` (for evidence levels) |
| 20 | - `outline/subsection_briefs.jsonl` (for axis specificity) |
| 21 | - `GOAL.md` (for scope drift hints) |
| 22 | |
| 23 | ## Outputs |
| 24 | |
| 25 | - `outline/coverage_report.md` (bullets + small tables; NO PROSE) |
| 26 | - `outline/outline_state.jsonl` (append-only JSONL; one record per run) |
| 27 | |
| 28 | ## Workflow (planner pass, NO PROSE) |
| 29 | |
| 30 | 1. Parse `outline/outline.yml` to enumerate H2 sections + H3 subsections (section sizing / budget). |
| 31 | - If `outline/OUTLINE_BUDGET_REPORT.md` exists, use it as the merge/change log so the coverage report can explain *why* structure changed. |
| 32 | 2. Read `outline/mapping.tsv` and compute per-H3 coverage and reuse hotspots. |
| 33 | 3. If `papers/paper_notes.jsonl` exists, summarize evidence levels (fulltext/abstract/title) for mapped papers. |
| 34 | 4. If `outline/subsection_briefs.jsonl` exists, compute axis specificity (generic vs specific axes) per H3. |
| 35 | 5. Optionally use `GOAL.md` to flag obvious scope drift (keywords not reflected in outline). |
| 36 | 6. Write `outline/coverage_report.md` and append a run record to `outline/outline_state.jsonl`. |
| 37 | |
| 38 | ## Freeze policy |
| 39 | |
| 40 | - If `outline/coverage_report.refined.ok` exists, the script will not overwrite `outline/coverage_report.md`. |
| 41 | |
| 42 | ## Script |
| 43 | |
| 44 | ### Quick Start |
| 45 | |
| 46 | - `uv run python .codex/skills/outline-refiner/scripts/run.py --help` |
| 47 | - `uv run python .codex/skills/outline-refiner/scripts/run.py --workspace <workspace>` |
| 48 | |
| 49 | ### All Options |
| 50 | |
| 51 | - `--workspace <dir>`: workspace root |
| 52 | - `--unit-id <U###>`: unit id (optional; for logs) |
| 53 | - `--inputs <semicolon-separated>`: override inputs (rare; prefer defaults) |
| 54 | - `--outputs <semicolon-separated>`: override outputs (rare; prefer defaults) |
| 55 | - `--checkpoint <C#>`: checkpoint id (optional; for logs) |
| 56 | |
| 57 | ### Examples |
| 58 | |
| 59 | - Planner-pass diagnostics after `section-mapper`: |
| 60 | - `uv run python .codex/skills/outline-refiner/scripts/run.py --workspace <workspace>` |
| 61 | |
| 62 | ## Troubleshooting |
| 63 | |
| 64 | ### Issue: report is missing evidence-level or axis-specificity columns |
| 65 | |
| 66 | **Cause**: |
| 67 | - Optional inputs are missing (no `papers/paper_notes.jsonl` and/or no `outline/subsection_briefs.jsonl`). |
| 68 | |
| 69 | **Fix**: |
| 70 | - Run `paper-notes` and/or `subsection-briefs`, then rerun `outline-refiner`. |