Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
685 changes: 685 additions & 0 deletions docs/reports/SENTINEL_V24_AGI_ASI_GOVERNANCE_ROADMAP_2026_2035.md

Large diffs are not rendered by default.

1,186 changes: 1,186 additions & 0 deletions rag-agentic-dashboard/data/gcir-zk-recursive-2035.json

Large diffs are not rendered by default.

282 changes: 282 additions & 0 deletions rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
#!/usr/bin/env python3

Check notice on line 1 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L1

Module name "gen-gcir-zk-recursive-2035-html" doesn't conform to snake_case naming style (invalid-name)

Check notice on line 1 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L1

Module name "gen-gcir-zk-recursive-2035-html" doesn't conform to snake_case naming style
"""WP-067 HTML renderer — GC-IR formal bridge, recursive zk-proof attestation & recoverability synthesis blueprint."""
import json
from pathlib import Path
from html import escape

ROOT = Path(__file__).resolve().parent
SRC = ROOT / "data" / "gcir-zk-recursive-2035.json"
OUT = ROOT / "public" / "gcir-zk-recursive-2035.html"
OUT.parent.mkdir(parents=True, exist_ok=True)
DOC = json.loads(SRC.read_text(encoding="utf-8"))

Check warning on line 11 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Precaution / Precaution Basic

PY009: Deserialization of Untrusted Data

Potential unsafe usage of 'json.loads' that can allow instantiation of arbitrary objects.


def e(x):

Check notice on line 14 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L14

Missing function or method docstring (missing-function-docstring)

Check notice on line 14 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L14

Missing function or method docstring
return escape(str(x))


SKIP = (
"mid", "sid", "tiid", "gbid", "zcid", "ppid", "opid", "epid", "rsyid",
"rpid", "rsid",
"title", "abstract", "content", "invariant", "stage", "circuit", "theme",
"extension", "source", "window",
)


def kv_pairs(d, skip=SKIP):

Check notice on line 26 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L26

Missing function or method docstring (missing-function-docstring)

Check notice on line 26 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L26

Missing function or method docstring
parts = []
for k, v in d.items():
if k in skip:
continue
if isinstance(v, list):
inner = "".join(
f"<li>{e(x) if not isinstance(x, dict) else e(json.dumps(x))}</li>"
for x in v
)
parts.append(f"<div class='kv'><b>{e(k)}</b><ul>{inner}</ul></div>")
elif isinstance(v, dict):
inner = "".join(f"<li><b>{e(kk)}</b>: {e(vv)}</li>" for kk, vv in v.items())
parts.append(f"<div class='kv'><b>{e(k)}</b><ul>{inner}</ul></div>")
else:
parts.append(f"<div class='kv'><b>{e(k)}</b>: {e(v)}</div>")
return "".join(parts)


def section_html(s):

Check notice on line 45 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L45

Missing function or method docstring (missing-function-docstring)

Check notice on line 45 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L45

Missing function or method docstring
return f"<div class='sec'><h4>{e(s['sid'])}. {e(s['title'])}</h4>{kv_pairs(s)}</div>"


def module_html(m):

Check notice on line 49 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L49

Missing function or method docstring (missing-function-docstring)

Check notice on line 49 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L49

Missing function or method docstring
secs = "".join(section_html(s) for s in m["sections"])
purpose = m.get("purpose") or ""
return (
f"<section class='module' id='{e(m['mid'])}'>"
f"<h3>{e(m['mid'])} — {e(m['title'])}</h3>"
f"<p class='sum'>{e(purpose)}</p>{secs}</section>"
)


def list_array(arr, label_keys, anchor, title):

Check notice on line 59 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L59

Missing function or method docstring (missing-function-docstring)

Check notice on line 59 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L59

Missing function or method docstring
rows = []
for it in arr:
head_parts = [e(it.get(label_keys[0], ""))] + [e(it.get(k, "")) for k in label_keys[1:]]
head = " · ".join(p for p in head_parts if p)
rows.append(f"<div class='card'><div class='card-head'>{head}</div>{kv_pairs(it)}</div>")
return f"<section id='{anchor}'><h3>{title} ({len(arr)})</h3>{''.join(rows)}</section>"


distinctive = [
("tlaInvariants", "tla-invariants", "TLA+ Invariants -> zk Circuits (M1)", ["tiid", "invariant", "kind"]),
("gcirBridges", "gcir-bridges", "GC-IR Bridge Stages (M1)", ["gbid", "stage"]),
("zkCircuits", "zk-circuits", "zk Circuits (M2/M3)", ["zcid", "circuit", "proof"]),
("proofPipelines", "proof-pipelines", "Recursive Proof Pipelines (M2/M3)", ["ppid", "stage"]),
("oscalProofExtensions", "oscal-proof-extensions", "OSCAL Proof Extensions (M4)", ["opid", "extension"]),
("evidencePipelines", "evidence-pipelines", "Evidence Ingestion Pipelines (M4)", ["epid", "source"]),
("researchSyntheses", "research-syntheses", "Research Apex Syntheses (M7)", ["rsyid", "theme"]),
("roadmapPhases", "roadmap-phases", "2026-2035 Roadmap Phases", ["rpid", "window"]),
]


toc_modules = "".join(

Check notice on line 80 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L80

Constant name "toc_modules" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 80 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L80

Constant name "toc_modules" doesn't conform to UPPER_CASE naming style
f"<li><a href='#{e(m['mid'])}'>{e(m['mid'])} — {e(m['title'])}</a></li>"
for m in DOC["modules"]
)
toc_distinct = "".join(

Check notice on line 84 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L84

Constant name "toc_distinct" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 84 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L84

Constant name "toc_distinct" doesn't conform to UPPER_CASE naming style
f"<li><a href='#{anchor}'>{e(label)}</a></li>"
for _, anchor, label, _ in distinctive
)

modules_html = "".join(module_html(m) for m in DOC["modules"])

Check notice on line 89 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L89

Constant name "modules_html" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 89 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L89

Constant name "modules_html" doesn't conform to UPPER_CASE naming style
distinctive_html = "".join(

Check notice on line 90 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L90

Constant name "distinctive_html" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 90 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L90

Constant name "distinctive_html" doesn't conform to UPPER_CASE naming style
list_array(DOC[key], keys, anchor, label)
for key, anchor, label, keys in distinctive
)


def table_rows(rows, cols):

Check notice on line 96 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L96

Missing function or method docstring (missing-function-docstring)

Check notice on line 96 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L96

Missing function or method docstring
head = "".join(f"<th>{e(c)}</th>" for c in cols)
body = "".join("<tr>" + "".join(f"<td>{e(r.get(c, ''))}</td>" for c in cols) + "</tr>" for r in rows)
return f"<table><thead><tr>{head}</tr></thead><tbody>{body}</tbody></table>"


def table_dict(d, key_label, val_label="value"):

Check notice on line 102 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L102

Missing function or method docstring (missing-function-docstring)

Check notice on line 102 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L102

Missing function or method docstring
head = f"<tr><th>{e(key_label)}</th><th>{e(val_label)}</th></tr>"
rows = []
for k, v in d.items():
if isinstance(v, dict):
vstr = "; ".join(f"{kk}={vv}" for kk, vv in v.items())
elif isinstance(v, list):
vstr = "; ".join(json.dumps(x) if isinstance(x, dict) else str(x) for x in v)
else:
vstr = str(v)
rows.append(f"<tr><td>{e(k)}</td><td>{e(vstr)}</td></tr>")
return f"<table><thead>{head}</thead><tbody>{''.join(rows)}</tbody></table>"


report_full_html = (

Check notice on line 116 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L116

Constant name "report_full_html" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 116 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L116

Constant name "report_full_html" doesn't conform to UPPER_CASE naming style
"<section id='report-sections-full'><h3>Whitepaper Sections — &lt;title&gt; / &lt;abstract&gt; / &lt;content&gt;</h3>"
+ "".join(
f"<div class='card'><div class='card-head'>{e(rs['rsid'])} · {e(rs['title'])}</div>"

Check warning on line 119 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L119

Detected strings that are implicitly concatenated inside a list.
f"<div class='kv'><b>abstract</b>: {e(rs['abstract'])}</div>"
f"<div class='kv'><b>content</b>: {e(rs['content'])}</div></div>"
for rs in DOC["reportSections"]
)
+ "</section>"
)

schemas_html = f"<section id='schemas'><h3>Schemas ({len(DOC['schemas'])})</h3>{table_dict(DOC['schemas'], 'schema', 'fields')}</section>"
code_html = (

Check notice on line 128 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L128

Constant name "code_html" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 128 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L128

Constant name "code_html" doesn't conform to UPPER_CASE naming style
"<section id='code'><h3>Code &amp; Artifacts (TLA+ / Circom / Groth16 / SnarkPack / Rego / OSCAL / OpenAPI)</h3>"
+ "".join(
f"<div class='kv'><b>{e(k)}</b><ul>" + "".join(f"<li><pre>{e(item)}</pre></li>" for item in v) + "</ul></div>"
for k, v in DOC["code"].items()
)
+ "</section>"
)
kpis_html = f"<section id='kpis'><h3>KPIs / Indices ({len(DOC['kpis'])})</h3>{table_dict(DOC['kpis'], 'index', 'target/cadence')}</section>"
rcm_html = f"<section id='rcm'><h3>Risk Control Matrix ({len(DOC['riskControlMatrix'])})</h3>{table_rows(DOC['riskControlMatrix'], ['risk','control','owner','evidence'])}</section>"

Check notice on line 137 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L137

line too long (181 > 159 characters) (E501)
trace_html = f"<section id='trace'><h3>Traceability ({len(DOC['traceability'])})</h3>{table_rows(DOC['traceability'], ['from','to','via'])}</section>"
flows_html = f"<section id='data-flows'><h3>Data Flows ({len(DOC['dataFlows'])})</h3>{table_rows(DOC['dataFlows'], ['flow'])}</section>"
regs_html = f"<section id='regulators'><h3>Regulators ({len(DOC['regulators'])})</h3>{table_rows(DOC['regulators'], ['name','scope'])}</section>"
rollout_html = f"<section id='rollout-90'><h3>90-Day Rollout ({len(DOC['rollout90'])})</h3>{table_rows(DOC['rollout90'], ['day','task'])}</section>"
evidence_html = (
f"<section id='evidence-pack'><h3>Regulator Evidence Pack ({len(DOC['evidencePack'])})</h3>"
+ "<ul>" + "".join(f"<li>{e(x)}</li>" for x in DOC["evidencePack"]) + "</ul></section>"
)

tail_html = schemas_html + code_html + kpis_html + rcm_html + trace_html + flows_html + regs_html + rollout_html + evidence_html


exs = DOC["executiveSummary"]
exec_html = f"""
<section id='exec'><h3>Executive Summary</h3>
<p><b>Headline:</b> {e(exs['headline'])}</p>
<p><b>Scope:</b> {e(exs['scope'])}</p>
<p><b>Investment:</b> {e(exs['investment'])}</p>
<p><b>Target Indices:</b> {e(exs['targetIndices'])}</p>
<p><b>Board Recommendation:</b> {e(exs['recommendation'])}</p>
<div class='kv'><b>Differentiators</b><ul>{''.join(f'<li>{e(x)}</li>' for x in exs['differentiators'])}</ul></div>
</section>
"""


directive = DOC["directive"]
indices_rows = "".join(f"<li><b>{e(k)}</b>: {e(v)}</li>" for k, v in DOC["indices"].items())

Check notice on line 164 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L164

Constant name "indices_rows" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 164 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L164

Constant name "indices_rows" doesn't conform to UPPER_CASE naming style
tier_rows = "".join(f"<li><b>{e(k)}</b>: {e(v)}</li>" for k, v in DOC["tiers"].items())

Check notice on line 165 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L165

Constant name "tier_rows" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 165 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L165

Constant name "tier_rows" doesn't conform to UPPER_CASE naming style
sev_rows = "".join(f"<li><b>{e(k)}</b>: {e(v)}</li>" for k, v in DOC["severities"].items())

Check notice on line 166 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L166

Constant name "sev_rows" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 166 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L166

Constant name "sev_rows" doesn't conform to UPPER_CASE naming style
Comment thread
OneFineStarstuff marked this conversation as resolved.
invest = DOC["investment"]
invest_rows = "".join(f"<li><b>{e(k)}</b>: {e(v)}</li>" for k, v in invest.items())

Check notice on line 168 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L168

Constant name "invest_rows" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 168 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L168

Constant name "invest_rows" doesn't conform to UPPER_CASE naming style
audiences_list = "".join(f"<li>{e(a)}</li>" for a in DOC["audiences"])

Check notice on line 169 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

codefactor.io / CodeFactor

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L169

Constant name "audiences_list" doesn't conform to UPPER_CASE naming style (invalid-name)

Check notice on line 169 in rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

rag-agentic-dashboard/gen-gcir-zk-recursive-2035-html.py#L169

Constant name "audiences_list" doesn't conform to UPPER_CASE naming style

meta_html = f"""
<section id='directive'><h3>Strategic Directive</h3>
<p><b>Scope:</b> {e(directive['scope'])}</p>
<div class='kv'><b>Outcomes</b><ul>{''.join(f'<li>{e(x)}</li>' for x in directive['outcomes'])}</ul></div>
<div class='kv'><b>Do NOT</b><ul>{''.join(f'<li>{e(x)}</li>' for x in directive['doNot'])}</ul></div>
</section>

<section id='audiences'><h3>Intended Audiences ({len(DOC['audiences'])})</h3><ul>{audiences_list}</ul></section>

<section id='indices'><h3>Performance Indices ({len(DOC['indices'])})</h3><ul>{indices_rows}</ul></section>

<section id='tiers'><h3>Tiers (T0-T3)</h3><ul>{tier_rows}</ul></section>

<section id='severities'><h3>Severity Levels</h3><ul>{sev_rows}</ul></section>

<section id='investment'><h3>Investment Envelope (2026-2035)</h3><ul>{invest_rows}</ul></section>
"""


html = f"""<!doctype html>
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{e(DOC['title'])}</title>
<style>
:root {{ --bg:#0b0f14; --fg:#e6edf3; --muted:#9aa7b2; --acc:#58a6ff; --card:#11161d; --line:#23303d; }}
* {{ box-sizing:border-box; }}
body {{ background:var(--bg); color:var(--fg); font-family:-apple-system,Segoe UI,Roboto,Ubuntu,sans-serif; margin:0; line-height:1.5; }}
header {{ padding:24px 40px; border-bottom:1px solid var(--line); background:#0d1218; }}
header h1 {{ margin:0 0 4px 0; font-size:22px; }}
header .meta {{ color:var(--muted); font-size:13px; }}
.layout {{ display:grid; grid-template-columns:280px 1fr; gap:0; }}
nav.toc {{ border-right:1px solid var(--line); padding:20px; position:sticky; top:0; height:100vh; overflow-y:auto; background:#0d1218; }}
nav.toc h4 {{ color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.05em; margin:14px 0 6px; }}
nav.toc ul {{ list-style:none; padding:0; margin:0; }}
nav.toc li a {{ color:var(--fg); text-decoration:none; font-size:13px; display:block; padding:4px 6px; border-radius:4px; }}
nav.toc li a:hover {{ background:#1a232e; color:var(--acc); }}
main {{ padding:24px 40px; max-width:1200px; }}
section.module, section {{ background:var(--card); border:1px solid var(--line); border-radius:8px; padding:18px 22px; margin-bottom:18px; }}
section h3 {{ margin-top:0; color:var(--acc); border-bottom:1px solid var(--line); padding-bottom:6px; }}
.sum {{ color:var(--muted); font-style:italic; }}
.sec {{ border-left:3px solid var(--acc); padding:6px 12px; margin:10px 0; background:#0e141b; border-radius:0 6px 6px 0; }}
.sec h4 {{ margin:4px 0 8px; color:#a5d6ff; font-size:14px; }}
.kv {{ font-size:13px; margin:4px 0; color:#d0d7de; }}
.kv b {{ color:#79c0ff; }}
.kv ul {{ margin:4px 0 4px 18px; padding:0; }}
.card {{ background:#0e141b; border:1px solid var(--line); border-radius:6px; padding:10px 12px; margin:8px 0; }}
.card-head {{ font-weight:600; color:#a5d6ff; margin-bottom:6px; font-size:13px; }}
table {{ width:100%; border-collapse:collapse; font-size:12px; }}
th, td {{ border:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top; }}
th {{ background:#0e141b; color:var(--acc); }}
tr:nth-child(even) td {{ background:#0d131a; }}
pre {{ background:#0a0f15; border:1px solid var(--line); border-radius:4px; padding:8px; font-size:11px; overflow-x:auto; color:#d0d7de; margin:0; white-space:pre-wrap; }}
.counts {{ display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }}
.counts span {{ background:#0e141b; border:1px solid var(--line); padding:4px 10px; border-radius:14px; font-size:12px; color:var(--muted); }}
.counts span b {{ color:var(--acc); }}
code {{ background:#0e141b; padding:1px 4px; border-radius:3px; font-size:12px; }}
@media (max-width:900px) {{ .layout {{ grid-template-columns:1fr; }} nav.toc {{ position:relative; height:auto; }} main {{ padding:20px; }} }}
</style>
</head><body>
<header>
<h1>{e(DOC['title'])}</h1>
<div class="meta">docRef <b>{e(DOC['docRef'])}</b> · v{e(DOC['version'])} · {e(DOC['status'])}</div>
<div class="meta">{e(DOC['classification'])}</div>
<div class="meta">Horizon: {e(DOC['horizon'])} · API prefix: <code>{e(DOC['apiPrefix'])}</code> · builds on {' · '.join(e(b) for b in DOC['buildsOn'])}</div>
<div class="counts">
{''.join(f"<span><b>{v}</b> {e(k)}</span>" for k,v in DOC['counts'].items())}
</div>
</header>
<div class="layout">
<nav class="toc">
<h4>Executive</h4>
<ul>
<li><a href='#exec'>Executive Summary</a></li>
<li><a href='#directive'>Strategic Directive</a></li>
<li><a href='#audiences'>Audiences</a></li>
<li><a href='#indices'>Indices</a></li>
<li><a href='#tiers'>Tiers</a></li>
<li><a href='#severities'>Severities</a></li>
<li><a href='#investment'>Investment</a></li>
</ul>
<h4>Modules (M1-M8)</h4>
<ul>{toc_modules}</ul>
<h4>Cryptographic Bridge & Research Apex</h4>
<ul>{toc_distinct}</ul>
<h4>Whitepaper & Tables</h4>
<ul>
<li><a href='#report-sections-full'>Whitepaper Sections</a></li>
<li><a href='#schemas'>Schemas</a></li>
<li><a href='#code'>Code &amp; Artifacts</a></li>
<li><a href='#kpis'>KPIs</a></li>
<li><a href='#rcm'>Risk Control Matrix</a></li>
<li><a href='#trace'>Traceability</a></li>
<li><a href='#data-flows'>Data Flows</a></li>
<li><a href='#regulators'>Regulators</a></li>
<li><a href='#rollout-90'>90-Day Rollout</a></li>
<li><a href='#evidence-pack'>Evidence Pack</a></li>
</ul>
</nav>
<main>
{exec_html}
{meta_html}
{modules_html}
{distinctive_html}
{report_full_html}
{tail_html}
</main>
</div>
</body></html>
"""

OUT.write_text(html, encoding="utf-8")
print(f"WP-067 HTML written: {OUT} ({OUT.stat().st_size} bytes)")
Loading
Loading