IU Smart-Brick Demo — User-Visible Report (2026-05-29)
IU Smart-Brick — User-Visible Demo Report
A plain-language walkthrough of what the Information Unit can do today. Every line is backed by a live database run on 2026-05-29 (read-only for A/B/C/F; safe rollback transactions for D/E). The database was left exactly as it was found.
1. Source document → pieces → reconstructed original
We took the law document Điều 37 (already cut into 17 IU pieces) and asked the system to rebuild it.
- 17 pieces, in positions 1…17, no gaps, no duplicates, perfect order.
- Each piece has a content fingerprint (sha256). The whole reconstruction has a single fingerprint:
33e5a1a309833e94e251e829dc5644c5(Điều 35 = 36 pieces →b079d61527d3aef34adeaa4cf4d4dee1). Re-run it any time; same fingerprint = nothing drifted.
| order | section | size (chars) |
|---|---|---|
| 1 | title | 513 |
| 3 | goal | 1234 |
| 8 | principles | 3929 |
| 9 | schema | 4619 |
| 17 | changelog | 1090 |
Reconstruction is fully automatic. Automatic cutting of a brand-new raw file still needs an approved cut-manifest first (the "where to cut" decision is curated upstream) — that is the one open gap.
2. Filter by domain / specialty
"Show me every IU in the knowledge-systems domain."
| field | value |
|---|---|
| tag | legal_domain:knowledge_systems |
| matches | 16 IUs |
| consistency | consistent (16 normalized = 16 denormalized) |
| sample | dieu39…#0-tam-nhin, #10-roadmap, #1-26-bai-toan, … |
The two internal copies of the domain tags (the indexed one and the per-IU cached one) agree exactly.
3. Walk the tree (parent → child → grandchild)
Subtree of D38-DIEU35-S4:
D38-DIEU35-S4 (root, depth 0)
├── D38-DIEU35-S4-P1 (child, depth 1)
│ ├── D38-DIEU35-S4-P1-1 (grandchild, depth 2)
│ ├── D38-DIEU35-S4-P1-2 (grandchild, depth 2)
│ └── D38-DIEU35-S4-P1-3 (grandchild, depth 2)
├── D38-DIEU35-S4-P2 (child, depth 1)
├── D38-DIEU35-S4-P3 (child, depth 1)
└── D38-DIEU35-S4-P4 (child, depth 1)
8 nodes. 0 orphans. 0 cycles. The recursive function is the source of truth.
4. Compose a new document from bricks (the headline demo)
We assembled a fresh document from existing + new IU bricks, then edited it live — all inside a transaction that was rolled back, so nothing was kept.
| step | action | resulting order |
|---|---|---|
| initial | compose (1 law brick + 3 new bricks) | title · alpha · beta · gamma |
| add | + DIEU-37 #goal | title · alpha · beta · gamma · goal |
| remove | − title (reversible) | alpha · beta · gamma · goal |
| reorder | beta → front | beta · alpha · gamma · goal |
| split | gamma → gamma-1 + gamma-2 | (gamma kept; 2 children born draft) |
| merge | alpha + beta → merged | (merged born draft; sources kept) |
| render | final document | beta · alpha · gamma · goal |
- Split and merge each recorded an auditable governance ledger row (
iu_split_set/iu_merge_set) referencing a review-decision. The source pieces were never destroyed (additive, reversible). - The two real law pieces we borrowed were never modified — still version 1, untouched.
5. Trigger in / out (events)
- Out: the system emitted a
structure_piece_splitevent carrying refs only (canonical addresses + counts — no document body, no secrets, no vectors). A worker picked it up and routed it in dry-run mode: recorded, not actually delivered anywhere. - Dead-letter replay: we forced two stuck events. One pointing at a non-existent route → stayed stuck (event preserved, as designed). One pointing at a known dry-run route → replayed and resolved. No real delivery, no job ran.
- In: the inbound trigger on
iu_sql_linkis wired and route-registered, ready to turn an external SQL-object insert into an IU event.
6. SQL links to live database objects
The 3 registered SQL links all resolve to real PG objects and the wrapper agrees with the direct check:
| link | object | kind | resolves | wrapper==direct | enabled |
|---|---|---|---|---|---|
| 1 | v_iu_section_type_vocab_sync | view | ✅ | ✅ | false |
| 2 | fn_iu_three_axis_envelope_refresh | function | ✅ | ✅ | false |
| 3 | tac_publication | table | ✅ | ✅ | false |
enabled=false does not block validation — exactly the safe-by-default policy.
7. One-page PASS/FAIL summary
| # | Capability | Result |
|---|---|---|
| A | Cut → reconstruct (order + hash) | ✅ PASS (auto-cut gap = needs approved manifest) |
| B | Domain/specialty filter | ✅ PASS |
| C | Parent/child/grandchild tree | ✅ PASS |
| D | Compose / add / remove / reorder / split / merge / render | ✅ PASS |
| E | Trigger out / in + dead-letter replay | ✅ PASS |
| F | SQL links to live objects | ✅ PASS |
Bottom line: the Information Unit behaves as a real, governed "smart brick." It cuts-and-rebuilds losslessly, filters on domain and on tree structure, composes and restructures documents with a full audit ledger, emits and replays events safely, and binds to live database objects — all while never delivering anything for real, never mutating production law content, and leaving the database byte-for-byte unchanged. Ready for a limited production pilot.
Safety: read-only proofs for A/B/C/F; bounded-gate BEGIN…ROLLBACK for D/E; gates closed, never-flip keys intact, 0 idle transactions, 0 persisted rows.