feat: land superpaper v1 notes scaffold

Add the ledger schema, class router, lint codes, ingest/build
pipeline, and three work-tree examples: align derivation,
superfig delegation, and supertensor delegation.
This commit is contained in:
dela
2026-08-17 10:01:30 +08:00
parent c2bec6f55a
commit 3a322aa8dc
89 changed files with 3522 additions and 11 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env python3
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts"))
from router import accepted, check_row, suggest
def expect(cond, msg):
if not cond:
raise SystemExit(f"FAIL: {msg}")
expect(suggest({"loss-curve"}) == "numeric", "loss-curve class")
expect(accepted("numeric") == frozenset({"screenshot", "matplotlib"}), "numeric accepted")
expect(suggest({"table"}) == "raster", "table class")
expect("matplotlib" not in accepted("raster"), "raster rejects matplotlib")
expect(suggest({"axis", "architecture"}) == "SPLIT:tensor+fig", "split order")
expect(
check_row({"axis", "architecture"}, "superfig") == "SP011",
"mixed row",
)
expect(check_row({"rewrite-figure"}, "align", phase=1) is None, "align ok")
expect(check_row({"rewrite-figure"}, "superderive", phase=1) == "SP010", "derive v1")
expect(suggest(set()) == "none", "empty")
expect(suggest({"notation"}) == "none", "notation")
expect(check_row(set(), "none", status="included") == "SP013", "none included")
expect(
check_row({"rewrite-figure"}, "align", include="figures/F1/build/F1.pdf") == "SP014",
"align include",
)
expect(
check_row({"architecture"}, "superfig", status="included", include=None) == "SP015",
"vector null include",
)
expect(
check_row({"table"}, "screenshot", status="included", include="nope.png", fig_id="F2")
== "SP016",
"screenshot path",
)
print("router_test ok")