oc_chat
Loading...
Searching...
No Matches
oc_chat.registry.cli.roadmap Namespace Reference

Functions

None add_roadmap_subcommands (argparse._SubParsersAction subcommands)
int _cmd_import (argparse.Namespace args)
int _cmd_render (argparse.Namespace args)
None _emit_render_envelope (Exception error, bool as_json)
int _cmd_reconcile (argparse.Namespace args)
JoinWriteResult _write_links (argparse.Namespace args, object report)
None _print_reconcile (object report, dict[str, object] payload, *, bool show_all, int limit)
int _cmd_audit (argparse.Namespace args)
int _cmd_bump (argparse.Namespace args)
int _cmd_status (argparse.Namespace args)
tuple[object, SQLiteBackend, Registry] _open (str|None registry_path)
None _print_result (dict[str, object] payload, bool as_json)

Variables

str _DISCIPLINE_LANDED = "2026-08-14"
str _ADVANCES_REQUIRED_FROM = "205"

Detailed Description

CLI commands for registry-backed ROADMAP data.

Purpose
-------
Expose roadmap import, export, audit, bump, and status commands.

Responsibilities
----------------
- Resolve registry and workspace paths through standard discovery.
- Dispatch roadmap corpus ingest, artifact export, and drift audit helpers.
- Dispatch the Plan 205 reconciliation check, which sits beside ``render
  --check`` and answers a different question from it.
- Emit compact human or JSON command output.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - CLI lifecycle
    L3 - command argument summaries
    L4 - subcommand dispatch details

Contracts
---------
- Mutating bump operations route through the registry seam.
- Export writes only to the requested output directory.

Dependencies
------------
- argparse (CLI parsing)
- oc_chat.registry.roadmap.reconcile (the Plan 205 claims-vs-state check)
- oc_chat.registry.api (Registry facade over the live registry backend)
- oc_chat.registry.backends.sqlite (SQLiteBackend for the live registry and the status counts)
- oc_chat.registry.cli.source (source and hash-preimage subcommand wiring)
- oc_chat.registry.discovery (registry and workspace path discovery)
- oc_chat.registry.regenerate.envelope (error envelope and exit code for render failures)
- oc_chat.registry.render.roadmap (render check and living set writer)
- oc_chat.registry.roadmap.audit (audit_corpus for the audit command)
- oc_chat.registry.roadmap.ingest (ingest_corpus for the import command)
- oc_chat.registry.roadmap.operations (roadmap_version_bump for the bump command)
- oc_diagnostics (structured debug logging via _dbg)

Function Documentation

◆ _cmd_audit()

int oc_chat.registry.cli.roadmap._cmd_audit ( argparse.Namespace args)
protected

Definition at line 362 of file roadmap.py.

Here is the call graph for this function:

◆ _cmd_bump()

int oc_chat.registry.cli.roadmap._cmd_bump ( argparse.Namespace args)
protected

Definition at line 373 of file roadmap.py.

Here is the call graph for this function:

◆ _cmd_import()

int oc_chat.registry.cli.roadmap._cmd_import ( argparse.Namespace args)
protected

Definition at line 204 of file roadmap.py.

Here is the call graph for this function:

◆ _cmd_reconcile()

int oc_chat.registry.cli.roadmap._cmd_reconcile ( argparse.Namespace args)
protected
Compare roadmap CLAIMS against roadmap STATE (Plan 205).

Advisory by default: it exits 0 with violations present. That is deliberate.
The first full-tree run reports the whole pre-existing backlog, and a check
that must be green before it can land is a check that gets weakened until it
is. ``--fail-on-violations`` is the opt-in for a gate that has been cleaned.

Definition at line 266 of file roadmap.py.

Here is the call graph for this function:

◆ _cmd_render()

int oc_chat.registry.cli.roadmap._cmd_render ( argparse.Namespace args)
protected
Render (or --check) the living GeneratedView set (§6).

Resolves the worktree-local **authored-projection** store + the ``source/``
tree — NEVER the shared live registry (the living set renders from the
verified projection, not the runtime store).

Definition at line 216 of file roadmap.py.

Here is the call graph for this function:

◆ _cmd_status()

int oc_chat.registry.cli.roadmap._cmd_status ( argparse.Namespace args)
protected

Definition at line 393 of file roadmap.py.

Here is the call graph for this function:

◆ _emit_render_envelope()

None oc_chat.registry.cli.roadmap._emit_render_envelope ( Exception error,
bool as_json )
protected
Emit the §10 JSON envelope (or a compact line) for a render failure (N1).

Definition at line 257 of file roadmap.py.

Here is the caller graph for this function:

◆ _open()

tuple[object, SQLiteBackend, Registry] oc_chat.registry.cli.roadmap._open ( str | None registry_path)
protected

Definition at line 410 of file roadmap.py.

Here is the caller graph for this function:

◆ _print_reconcile()

None oc_chat.registry.cli.roadmap._print_reconcile ( object report,
dict[str, object] payload,
* ,
bool show_all,
int limit )
protected
Render the human view, banner first so it can never read as a drift line.

Definition at line 314 of file roadmap.py.

Here is the caller graph for this function:

◆ _print_result()

None oc_chat.registry.cli.roadmap._print_result ( dict[str, object] payload,
bool as_json )
protected

Definition at line 416 of file roadmap.py.

Here is the caller graph for this function:

◆ _write_links()

JoinWriteResult oc_chat.registry.cli.roadmap._write_links ( argparse.Namespace args,
object report )
protected
Persist the plan-link join into the LIVE registry, never the projection.

Definition at line 304 of file roadmap.py.

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

◆ add_roadmap_subcommands()

None oc_chat.registry.cli.roadmap.add_roadmap_subcommands ( argparse._SubParsersAction subcommands)
Attach the ``roadmap`` command group.

Definition at line 93 of file roadmap.py.

Variable Documentation

◆ _ADVANCES_REQUIRED_FROM

str oc_chat.registry.cli.roadmap._ADVANCES_REQUIRED_FROM = "205"
protected

Definition at line 90 of file roadmap.py.

◆ _DISCIPLINE_LANDED

str oc_chat.registry.cli.roadmap._DISCIPLINE_LANDED = "2026-08-14"
protected

Definition at line 89 of file roadmap.py.