oc_chat
Loading...
Searching...
No Matches
seed_142_todo_narrative Namespace Reference

Classes

class  TodoReport

Functions

dict[str, tuple[str, str]] parse_sections (str todo_text)
TodoReport backfill (Path todo_md, Path source_dir)
int _main ()

Variables

tuple _SECTIONS
 _BOUNDARY_RE = re.compile(r"^(## |# |\*End of )", re.MULTILINE)
 _TRAILING_RULE_RE = re.compile(r"\n*-{3,}\s*$")

Detailed Description

ROADMAP-TODO deferred-decision narrative -> note records (Plan 142 rework Phase 2).

Purpose
-------
The legacy `oc_chat/roadmap/ROADMAP-TODO-v3.38.md` (695 l.) is retired as a render
OUTPUT (``__init__.RETIRED_OUTPUTS``), but its **deferred-decision narrative** — the
organizing prose / why-deferred rationale AROUND the already-migrated 53 backlog
items — had no registry home. Migrate the three deferred-work ``## `` sections
**verbatim** into ``source/notes/<id>.md`` records (mirroring the Phase-3 framing
notes), so the living EXTENDED render carries them (no resurrected 4th file):

  ``## Orchestration Registry (M11) — gates, backlog & deferred design questions``
  · ``## Active deferred items`` · ``## Post-12-week backlog``

The ``## Recently completed`` per-round log (l.370–686) is intentionally **subsumed
by the changelog** (same disposition as the What's-New narrative);
the file's title + ``> Appendix`` framing describes the retired 4-file model and is
not migrated. (All accounted for in ``tools/142_todo_narrative_coverage.md``.)

No contract change: ``Note`` is the pre-existing P1.1 model. Idempotent.

Responsibilities
----------------
- ``parse_sections`` (slice the 3 deferred ``## `` sections), ``backfill`` (write
  the note records), reported ``sections`` for the audit.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - seed lifecycle
    L3 - per-section extraction
    L4 - per-record emission

Contracts
---------
- Deterministic; writes only ``source/notes/<id>.md``; never touches the live
  legacy TODO; every record validates + re-canonicalises.

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.regenerate (imported for the contracts bootstrap it runs)
- option_c_registry_contracts (the Note model and SCHEMA_VERSION for each deferred-decision note record)
- oc_chat.registry.source.canonical (format_record_text - writes each note's frontmatter and verbatim body)

Function Documentation

◆ _main()

int seed_142_todo_narrative._main ( )
protected

Definition at line 130 of file seed_142_todo_narrative.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ backfill()

TodoReport seed_142_todo_narrative.backfill ( Path todo_md,
Path source_dir )
Write each deferred section to ``source/notes/<id>.md`` (verbatim body).

Definition at line 111 of file seed_142_todo_narrative.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_sections()

dict[str, tuple[str, str]] seed_142_todo_narrative.parse_sections ( str todo_text)
Return ``{note_id: (title, verbatim_body)}`` for the 3 deferred sections.

Definition at line 96 of file seed_142_todo_narrative.py.

Here is the caller graph for this function:

Variable Documentation

◆ _BOUNDARY_RE

seed_142_todo_narrative._BOUNDARY_RE = re.compile(r"^(## |# |\*End of )", re.MULTILINE)
protected

Definition at line 86 of file seed_142_todo_narrative.py.

◆ _SECTIONS

tuple seed_142_todo_narrative._SECTIONS
protected
Initial value:
1= (
2 ("## Orchestration Registry (M11)", "m11-deferred",
3 "Orchestration Registry (M11) — gates, backlog & deferred design questions"),
4 ("## Active deferred items", "active-deferred",
5 "Active deferred items (still relevant, folded forward, or explicitly deferred)"),
6 ("## Post-12-week backlog", "post-12-week-backlog",
7 # OCT-LINT: disable=no_hardcoded_secrets reason="Roadmap section headings + note ids are not secrets"
8 "Post-12-week backlog (from unified-roadmap-v3 §5)"),
9 ("## Branch / plans / docs hygiene", "branch-plans-docs-hygiene",
10 "Branch / plans / docs hygiene (running list)"),
11)

Definition at line 75 of file seed_142_todo_narrative.py.

◆ _TRAILING_RULE_RE

seed_142_todo_narrative._TRAILING_RULE_RE = re.compile(r"\n*-{3,}\s*$")
protected

Definition at line 87 of file seed_142_todo_narrative.py.