Tasks: Common Docs Structural Move (Mission B)

Mission: common-docs-structural-move-01KW3SBK · Branch: docs/2165-mission-b-structural-move · Closes: #2165, #2054, #2192 · Folds: #1815 · change_mode: bulk_edit

15 work packages execute the plan's serial spine (the 8-IC structure, IC-split per the plan's /tasks sizing guidance). This is a bulk_edit missionoccurrence_map.yaml (2920 occ / 751 files / 23 path-pairs) is the classification authority; the no-overlap guard is relaxed for the bulk move/rewrite WPs, and the occurrence-map category partition disjoints the actual edits.

Lane shape (the spine, NOT a parallel fan-out): WP01 (land-first runtime reads) → WP02 (pre-move baseline capture) → WP03 (the gating tree move) → then the move window fans out: WP04 (re-section) ∥ WP05WP06 (ADR conversion) ∥ WP07 (redirects) ∥ WP08 (refs) ∥ WP09 (docfx/TOC) ∥ WP10 (shadow trees), with the FR-010 backfill chain WP11WP12WP13WP14 (flip rulers blocking + C-005 dry-run) → WP15 (ADR amendment + LEAK retirement). The IC-04 (ADR) ∥ IC-05 (refs) parallelism is enabled by the era_less_pinned filenames in the occurrence map.

Mission-critical invariants (merge-blockers): C-002 (no ADR content mutation — content-invariance proof, WP05/WP06); C-006 (glossary read-path preserved, WP01/WP03); C-004 (docs/3x distil-not-blind-delete, WP10); C-005 (the WP14 full-gate dry-run must go RED on a re-introduced violation — gate-unmask cannot self-validate). Every MOVE WP's DoD includes "redirect/back-compat in place so no reference or runtime read breaks."

> Note: the orchestrator runs map-requirements + finalize-tasks. requirement_refs in each WP frontmatter + the "Requirement refs" body block are hints for that pass.

Subtask Index

IDDescriptionWPParallel
T001Read the occurrence map's runtime-read contractWP01
T002Author the resolution-test harness (RED-first)WP01
T003authority_paths.py: dual-read ADR + glossary literalsWP01
T004Shim-registry readers: dual-read to docs/migrations/WP01
T005Remediation string lock-step (cli/commands/doctor.py:509)WP01
T006Non-src/ read 5: generate_contextive_glossaries.pyWP01
T007Non-src/ read 6: governance.yaml authority_pathsWP01
T008Prove all 6 reads resolve + suite greenWP01
T009Install DocFX (pinned)WP02
T010Build the PRE-move treeWP02
T011Snapshot the _site URL set into the manifestWP02
T012Unit test the captureWP02
T013Commit the baseline manifest BEFORE WP03WP02
T014Move the living-design surfaces → docs/architecture/WP03
T015Move migration + shim artifacts → docs/migrations/WP03
T016Move research/initiatives/journeys/loose-plans → docs/plans/WP03
T017Move glossary + audiences → docs/context/ (C-006)WP03
T018CHANGELOG relocate-with-aliasWP03
T019Append move pairs to redirect map repr + verify section index.mdWP03
T020Verify the move + suite greenWP03
T021Enumerate + classify every docs/development/ pageWP04[D]
T022Classify docs/engineering_notes/WP04[D]
T023Move durable pages → operations/guides/configurationWP04[D]
T024Move ephemeral pages → docs/plans/WP04[D]
T025Assert the inventory file STAYED PUTWP04[D]
T026Verify the re-section + suite greenWP04[D]
T027Parser 1: markdown-table headerWP05[D]
T028Parser 2: bold-inline headerWP05[D]
T029Parser 3: dash-bullet header (the missed dialect)WP05[D]
T030Frontmatter emitter (bare status, MADR vocabulary)WP05[D]
T031Content-invariance check (reuse _inventory.parse_frontmatter)WP05[D]
T032Test the converter on all 3 dialects + invarianceWP05[D]
T033Prove the 47 mirrors byte-identical, THEN dropWP06[D]
T034Convert + move the 97 era ADRs → docs/adr/<era>/WP06[D]
T035Migrate the 20 era-less ADRs → docs/adr/3.x/ at pinned filenamesWP06[D]
T036Run content-invariance over all 117WP06[D]
T037Census check: count == 117WP06[D]
T038Close the flat shimWP06[D]
T039Verify + suite greenWP06[D]
T040Derive the redirect map from occurrence_map.yaml moves:WP07[D]
T041generate(redirect_map, site_dir) -> emitted_stubsWP07[D]
T042check_coverage(baseline, redirect_map, site_dir) -> uncovered[]WP07[D]
T043Test the generator + coverageWP07[D]
T044Wire into docs-pages.yml (between build + upload)WP07[D]
T045Verify coverage == 100% against the committed baselineWP07[D]
T046Drop the WP01 dual-read OLD branchesWP08[D]
T047Rewrite the remaining src/ references (the ~39 non-runtime)WP08[D]
T048Rewrite tests/ fixtures + assertionsWP08[D]
T049Rewrite kitty-specs/ + docs/ prose referencesWP08[D]
T050Targeted-ref-update: ci-quality.yml glob (CRITICAL)WP08[D]
T051Targeted-ref-update: glossary functional refs + governance verifyWP08[D]
T052CHANGELOG reference rewrite (alias-aware)WP08[D]
T053Verify the sweep + suite greenWP08[D]
T054Rewrite docs/docfx.json content + exclude globsWP09[D]
T055Rewrite every toc.yml href to the 13 sectionsWP09[D]
T056Update docs/llms.txt + docs/index.md navWP09[D]
T057DocFX build green on the post-move treeWP09[D]
T058Verify + coordinate #648WP09[D]
T059Delete docs/1x + docs/2x with redirect entriesWP10[D]
T060Distil docs/3x live charter contentWP10[D]
T061Fix the 3 docs/3x nav refsWP10[D]
T062Record the #2053 landing zoneWP10[D]
T063Verify-before-delete the 4 docs/architecture/ orphansWP10[D]
T064Verify + redirect coverage for the shadow deletesWP10[D]
T065Define the tag → doc_status mapping tableWP11
T066Build the backfill tool (frontmatter_backfill.py)WP11
T067Build the 50–180 description length gateWP11
T068Derive related edges from in-body linksWP11
T069Test the toolingWP11
T070Verify + suite greenWP11
T071Run WP11's backfill tool over the treeWP12
T072Author description for every page (50–180)WP12
T073Author/complete related edges (0 dangling)WP12
T074Validate the full frontmatter setWP12
T075Verify + hand off to WP13WP12
T076Regenerate the lockfile from frontmatterWP13
T077Drive drift to 0WP13
T078Prove generate == committed (deterministic)WP13
T079Verify + hand off to WP14WP13
T080R3 code change 1: thread strict=TrueWP14
T081R3 code change 2: escalate severity to errorWP14
T082R3 code change 3: remove the opt-in guard (default-on)WP14
T083CI wiring in docs-freshness.ymlWP14
T084Ruler-blocking regression testsWP14
T085C-005 full-gate dry-run (RED on re-introduced violation)WP14
T086Verify + suite green on the clean treeWP14
T087Confirm the lockfile gate is proven blocking (FR-014 precondition)WP15
T088Amend the reconciliation ADR Neutral note (FR-013)WP15
T089Retire LEAK-FRONTMATTER-MISMATCH (FR-014)WP15
T090Confirm no enforcement gapWP15
T091Verify + suite greenWP15
T092Move how-to + tutorials → docs/guidesWP16
T093Move reference → docs/apiWP16
T094Move explanation → docs/architectureWP16
T095Move recovery → docs/operationsWP16
T096Regenerate redirect_map + re-verify coverageWP16
T097Verify re-section + suite greenWP16
T098Build the relative-link resolverWP18
T099Dry-run + report unresolvableWP18
T100Apply the relative-link rewritesWP18
T101Body-link-resolution gateWP18
T102Test the fixerWP18
T103Verify + suite greenWP18

Work Packages

WP01 — Land-first runtime-critical reads — tasks/WP01-runtime-critical-land-first-reads.md

  • Goal: Re-point the 6 land-first runtime reads (4 src/ + 2 non-src/) as dual-read (old ∪ new) with resolution tests, BEFORE any move (C-003). Requirements: FR-005, NFR-005, C-003. Independent test: test_runtime_read_resolution.py proves all 6 new paths resolve via the reader (RED-first).
  • Subtasks: T001–T008. Deps: none (spine head). Risk: dropping the dual-read before WP03 = runtime break; C-006 extraction source.

WP02 — Redirect baseline-URL capture (PRE-move) — tasks/WP02-baseline-url-capture.md

  • Goal: Install DocFX, build the pre-move tree, snapshot + commit the baseline-URL manifest (the NFR-002 denominator). Requirements: FR-006, NFR-002. Independent test: test_capture_baseline_urls.py (normalisation over a fixture _site).
  • Subtasks: T009–T013. Deps: WP01. Risk: capturing post-move = unfalsifiable 100%.

WP03 — Tree move (architecture/ non-ADR fold) — tasks/WP03-tree-move-architecture-fold.md

  • Goal: Fold architecture/ (non-ADR) into docs/ per the moves: spine; glossary→context/ (C-006); CHANGELOG relocate-with-alias; inventory STAYS PUT. Requirements: FR-001, FR-004, FR-009, C-006. Independent test: WP01 resolution tests stay green; glossary read-path resolves.
  • Subtasks: T014–T020. Deps: WP02. Risk: glossary seed read-path (merge-blocker); accidentally moving the inventory file. Gates WP04–WP10.

WP04 — Re-section development + engineering_notes — tasks/WP04-resection-development-engineering-notes.md

  • Goal: Per-file durable-vs-ephemeral re-section (FR-012/#2054); inventory yaml stays put. Requirements: FR-001, FR-012. Independent test: per-file classification table is auditable; inventory-path-stable guard.
  • Subtasks: T021–T026. Deps: WP03. Parallel with WP05.

WP05 — ADR converter + 3 parsers — tasks/WP05-adr-converter-three-parsers.md

  • Goal: 3 parsers (table/bold-inline/dash-bullet) + content-invariance check (reuse _inventory.parse_frontmatter). Requirements: FR-002, FR-003, C-002, NFR-001. Independent test: a fixture per dialect green; a mutation fixture RED (false-green-proof).
  • Subtasks: T027–T032. Deps: WP03. Parallel with WP04/WP07/WP08/WP09. WP06 consumes it.

WP06 — Run the 117-unique ADR conversion — tasks/WP06-adr-conversion-117-unique.md

  • Goal: Convert 117 → docs/adr/<era>/; 20 era-less → adr/3.x/ (pinned); drop 47 mirrors; census == 117; content-invariance for all 117. Requirements: FR-002, FR-003, C-002, NFR-001. Independent test: count-117 census + invariance over all 117.
  • Subtasks: T033–T039. Deps: WP05. Parallel-safe with WP08 via era_less_pinned.

WP07 — Redirect-stub generator + coverage — tasks/WP07-redirect-stub-generator.md

  • Goal: redirect_stub_generator.py + redirect map (derived from moves:, single-writer) + coverage-vs-baseline; wire into docs-pages.yml between build+upload. Requirements: FR-006, NFR-002. Independent test: emit correctness + no-404 + coverage-RED-on-gap.
  • Subtasks: T040–T045. Deps: WP02, WP03. Parallel in the move window.

WP08 — Bulk reference rewrite — tasks/WP08-bulk-reference-rewrite.md

  • Goal: ~2920 refs via the occurrence map + targeted-ref-updates (ci-quality.yml glob CRITICAL, glossary, CHANGELOG alias) + drop WP01 dual-read old branches. Requirements: FR-005, FR-009. Independent test: stale-architecture/-reference grep clean; resolution tests still green after old-branch drop.
  • Subtasks: T046–T053. Deps: WP03, WP06. Bulk overlap with WP09/WP12 under docs/** (category-disjoint, sequenced).

WP09 — docfx.json + TOC rewrite — tasks/WP09-docfx-toc-rewrite.md

  • Goal: docfx.json globs + every toc.yml → 13-section; DocFX build green (FR-007). Requirements: FR-007. Independent test: docfx docs/docfx.json green; no dangling href.
  • Subtasks: T054–T058. Deps: WP03. Bulk overlap with WP08/WP12 (serialized config only). Coordinates #648.

WP10 — Shadow-tree resolution — tasks/WP10-shadow-tree-resolution.md

  • Goal: docs/1x+2x delete+redirect; docs/3x distil+move+redirect (C-004); 4 architecture orphans verify-before-delete. Requirements: FR-008. Independent test: no shadow tree survives; shadow URLs covered by stubs; docs/3x charter content present in context/.
  • Subtasks: T059–T064. Deps: WP03, WP07. Risk: C-004 blind-delete (merge-blocker).

WP11 — Frontmatter backfill TOOLING + description gate — tasks/WP11-frontmatter-backfill-tooling.md

  • Goal: tag→doc_status mapping + frontmatter_backfill.py + the net-new 50–180 description length gate + related-edge derivation. Requirements: FR-010, NFR-003, NFR-004. Independent test: tag→doc_status correctness + idempotence; length-gate boundaries (49/181 RED).
  • Subtasks: T065–T070. Deps: WP04.

WP12 — Frontmatter backfill AUTHORING (~580 pages) — tasks/WP12-frontmatter-backfill-authoring.md

  • Goal: Author per-page description (50–180) + related; run the backfill. Requirements: FR-010, NFR-003, NFR-004. Independent test: description_length_check.py all green (no placeholders); related_validator.py 0 dangling.
  • Subtasks: T071–T075. Deps: WP11. High-touch content WP. Bulk overlap with WP08/WP09 (frontmatter fields only).

WP13 — Lockfile regen → drift 0 — tasks/WP13-lockfile-regen-drift-zero.md

  • Goal: Regenerate the lockfile FROM the backfilled frontmatter; drift (252 removed / 296 changed) → 0; generated == committed. Requirements: FR-010, NFR-006. Independent test: two regens identical; committed == fresh regen.
  • Subtasks: T076–T079. Deps: WP12, WP08. Precondition for WP14.

WP14 — Flip the 3 rulers to blocking — tasks/WP14-flip-rulers-blocking.md

  • Goal: R1/R2 --strict + R3 lockfile gate (3 code changes: thread strict=True [no-op] + severity→error + remove the opt-in guard) + CI wiring in docs-freshness.yml + C-005 full-gate dry-run. Requirements: FR-011, C-005, NFR-006, SC-005. Independent test (DoD-critical): the full-gate dry-run goes RED on a re-introduced violation over the whole tree.
  • Subtasks: T080–T086. Deps: WP13, WP06, WP10. Risk: gate-unmask cannot self-validate; flipping before drift=0 self-blocks merge.

WP15 — ADR-note amendment + LEAK retirement — tasks/WP15-adr-amendment-leak-retirement.md

  • Goal: Amend the reconciliation ADR Neutral note → 3 doctrine tactics (FR-013, sanctioned self-amendment); retire LEAK-FRONTMATTER-MISMATCH now the lockfile gate is blocking (FR-014). Requirements: FR-013, FR-014. Independent test: no enforcement gap; the amendment is scoped out of the invariance check.
  • Subtasks: T087–T091. Deps: WP14. Spine tail.

WP16 — Divio re-section (FR-009 IC-01 correction) — tasks/WP16-divio-resection.md

  • Goal: Fold the 120 existing Divio pages (how-to+tutorials→guides, reference→api, explanation→architecture, recovery→operations) into the 13-section structure per FR-009 — the IC-01 correction the original spine missed (surfaced by WP09 review; without it the pages orphan and guides/api stay empty). Regenerate WP07's redirect_map to cover the now-moved published URLs. Requirements: FR-001, FR-009. Independent test: source→dest byte reconciliation (no data loss); the 120 Divio URLs redirect-covered against the 168 baseline; docs/api populated. Bulk overlap: writes guides/operations/architecture (WP04/WP03) + redirect_map (WP07) as sequenced leeway.
  • Subtasks: T092–T097. Deps: WP03, WP04, WP07. Lands before WP08/WP12/WP14 (they depend on it for the complete assembled tree).
  • Goal: Fix the bare-relative intra-doc body links broken by the restructure (WP08-review IC — hundreds of ../../3.x/adr/…-style links; not occurrence-map refs so WP08 didn't own them, and no existing gate catches them). A moves:-driven resolver rewrites each to its new location + a body-link-resolution gate so the class can't recur. Added in-mission (operator decision, mirrors WP16). Requirements: FR-005, NFR-004. Independent test: every bare-relative intra-doc body link in docs/ resolves on disk; unresolvable links reported not guessed.
  • Subtasks: T098–T103. Deps: WP04, WP06, WP08, WP10, WP16 (the full final tree). Lands before WP14 (its body-link gate joins the full-gate dry-run).