Section 11B — Strip Structural Markdown Parsers (Now-Dead Provider)
SUPERSEDED by
decisions/05-three-plan-types.md(INV-22, user directive 2026-05-31). The markdown-parser strip is CANCELLED. The structural markdown parsers (read.pymd branches,write.pylegacy-body writers,content_hash.pymd funcs,_frontmatter.py,plan_io.pymd surface,checkbox_scan.py) are RETAINED — they serve the permanently-supported legacy-markdown plan type + the json-dynamic grow path. This section’s strip deliverables below are HISTORICAL — do not execute them. JSON-native content surfaces stay as already specified; nothing is deleted.
Cites §01 north star (invariant 9, 18); gated on §10 (corpus uniformly JSON-first) + §11A (skill markdown-walk consumers removed) — the end-stage debt removal. Under v7 (§07A) status left markdown entirely (work_items[].status, engine-written), so the §01 refinement-5 checkbox-scanner carve-out no longer retains a status reader — the v6 scanner is deleted here, not retained.
Goal
See frontmatter. Strip STRUCTURAL parsing; the carve-out specifics:
- v7 status =
work_items[].status(engine-written JSON, read by serve_next), NOT a markdown checkbox scan. - The v6 checkbox scanner (
scripts/plan_corpus/checkbox_scan.py) is DELETED here, not retained — the §01 refinement-5 line-level-vs-structural carve-out applied to the v6 status scanner and is moot under v7 (status left markdown entirely). - JSON-native surfaces (
update_sidecar,render --view,get_sidecar) survive.
Ordering — provider after consumer (ABSOLUTE)
- These
plan_corpusmarkdown parsers are the PROVIDER; the §11A skill markdown-walk was the CONSUMER. - §11A removed the consumer first (eager Python imports would otherwise break on a deleted parser); §11B removes the now-dead provider. Linear chain: §10 -> §11A -> §11B -> §12.
- The success criterion “no structural-markdown-parse call site remains in scripts/plan_orchestrator/” is satisfiable ONLY because §11A already stripped the orchestrator markdown-walk.
11B.1 — Delete read.py + write.py + plan_io.py md-parse surfaces
- read.py: delete
_load_plan_markdown(:355), theformat=="markdown"branches inbody_text(:163)/raw_frontmatter(:203),legacy_md_path(:148), theelif md_sections:fallback inload_plan(:427+), the md branch in_populate_content_hash_drift(:506). - write.py: delete
_append_checklist_row_to_section_body(:693, incl.^#{1,6}\sheading regex) +_locate_section_file(:639);append_finding_checklist_itemphase-(b) call. RETAINupdate_sidecar+check_item(JSON-native). - plan_io.py: delete the md-parse surface (
parse_plan/extract_section_info/_parse_frontmatter) once_load_plan_markdownis gone. - Delete
scripts/plan_corpus/checkbox_scan.py— the §03.2 v6 id-keyed checkbox scanner (the v6 INV-10 SOLE status-derivation path), DEPRECATED by §07A.3 (deprecation marker cites §11B as hard-deletion owner). Obsoleted by v7work_items[].status(engine-written JSON, read by serve_next) — there is NO retained checkbox status scanner under v7. Deletion gated on §10 (no v6 plan.json relies on the v6 status contract) + §11A (no skill consumer). Grep-verify zero live callers before deleting. - Subsection close (11B.1) — all
[x];status: complete.
11B.2 — Delete content_hash.py + _frontmatter.py md funcs
- content_hash.py: delete
compute_section_hash(:174),_split_frontmatter(:58),_strip_excluded_frontmatter(:81),detect_drift(:205),read_recorded_hash(:222),compute_full_section_hash(:248),assert_read_base_fresh(:260) — all designed for.mdfiles; JSON gets flock arbitration via write.py. - _frontmatter.py: delete
split_frontmatter_strict/lenient+_FRONTMATTER_REonce no production consumer remains (006 retained only as archive-restore). - Subsection close (11B.2) — all
[x];status: complete.
11B.3 — Grep-verify + test-all
- Grep-verify zero structural-parse call sites remain in
scripts/plan_corpus/+scripts/plan_orchestrator/: nosplit_frontmatter, no^#{1,6}\sheading regex, noyaml.safe_loadon.md, no_load_plan_markdown, noextract_section_info/section_infofragment-builder feeding thenext_actionpayload (INV-18; pairs with §11A.3 orchestrator-side removal). - Confirm the v7 status path intact:
work_items[].status(engine-written via the §07A.3 work_item status API + serve_next) is the sole status mechanism; the v6checkbox_scan.pyis gone. Confirm JSON-native survivors:render.py --view,read.py:get_sidecar,write.py:update_sidecar. -
./test-all.shgreen (timeout 150); dead-import sweep clean. - Subsection close (11B.3) — all
[x];status: complete.
Absorbed defects (bug-tracker triage 2026-05-26)
Subsumed by §11B.2, which DELETES compute_section_hash (content_hash.py) along with the .md hash funcs — the read_text-vs-STRICT-no-normalization contradiction is moot once the function is gone (JSON gets flock arbitration, no .md hashing). Deliverable MUST resolve; tracker entry closed obe-via-absorb pointing here.
| Bug | Symptom subsumed |
|---|---|
| BUG-07-125 | compute_section_hash normalizes body line-endings, contradicting its STRICT no-normalization docstring (function deleted §11B.2) — low-confidence absorb (cheap one-line read_bytes fix if §11B is far off) |
11B.R Third Party Review Findings
- None.
11B.N Completion Checklist
- 11B.1-11B.3
[x]andstatus: complete. - All success criteria have
[x]checkboxes. - Grep confirms zero structural-markdown-parse call sites; v6
checkbox_scan.pydeleted; v7work_items[].statusis the sole status path. -
./test-all.shgreen;python -m scripts.plan_corpus check plans/scripts-first-restructure/section-11B-*.mdexit 0. -
/tpr-reviewpassed (final, full-section).
References
- §11A (strip-skills) — the consumer strip that MUST precede this provider strip.
- Pass 1C strip list (file:line): read.py
:148/:163/:203/:355/:427/:506; write.py:639/:693; content_hash.py:58/:81/:174/:205/:222/:248/:260; _frontmatter.py:42/:47/:77; plan_io.py md surface. - §03.2 retained scanner; refinement 5 (structural-vs-line-level carve-out); §01 invariant 9.