TD — IU-0 / Text-as-Code: Law–Process–Code Linking Gap
TD — IU-0 / Text-as-Code: Law–Process–Code Linking Gap
Date: 2026-05-04 Owner: GPT-5.5 Thinking / Incomex Hội đồng AI Severity: High structural debt Related: Đ38/Đ39 Text-as-Code, Đ43 Context Graph, Đ44 Information Unit, Pack 2A confusion
Problem
Pack 2A review repeatedly missed relevant process/law context even though the documents existed in KB:
knowledge/ops/processes/birth-process-v1.mdclearly defines QT-001 and QT-002.- Đ3/Đ4/Đ35/Đ43 description governance documents exist.
- DOT tools and context graph exist.
The system did not fail because documents were absent. It failed because law, process, runtime code/tool, and design intent are not yet linked at the “information unit” level.
Root cause
Current KB documents are large, document-level artifacts. Search can find them if queried with the right keywords, but agents do not have a reliable structured place that says:
- This law section governs this process step.
- This process step maps to this DOT tool/script.
- This tool writes/reads these DB objects.
- This design pack must cite these law/process/code units.
Without official “miếng thông tin” linking, agents use local context and keyword guesses. This causes missed process documents when sessions change or scope grows.
Consequence
At current tiny scale, User can catch issues manually. At larger scale, this becomes unmanageable:
- laws exist but are not retrieved;
- process docs exist but are not classified;
- DOT tools exist but are not discovered early;
- design docs drift from process reality;
- repeated prompt/review loops appear as bureaucracy.
Strategic fix
The root fix is to get Information Unit / Text-as-Code into official use.
Need law/process/code linkage at the slice level:
- parent/child IU units;
- law section ↔ process step ↔ DOT tool ↔ DB object ↔ health check links;
- canonical addresses such as
Đ4.§2.1,birth-process.QT-001,dot-collection-register.contract,IU-0.Pack2A; - graph queries that can answer “which process applies?” before design.
Immediate mitigation
Until IU/Text-as-Code is operational, every non-trivial design must use Context Graph + Process Gate:
- Context graph: PROJECT_MAP, LAWS_INDEX, DOT_REGISTRY, DB_MAP, RED_ZONES.
- Law resolver.
- Process resolver: search
knowledge/ops/processes/*and architecture/process docs for named procedures. - Tool resolver.
- Runtime resolver.
- Unknowns → read-only discovery.
Link to roadmap
This TD reinforces the priority of Đ44/IU-0:
- Pack 2A governance registration clears catalog readiness.
- Pack 2B must define birth path for IU data rows before CRUD.
- Minimal CRUD pilot must then allow storing/editing linked information units.
- Only after IU is usable can Đ38/Đ39 Text-as-Code reliably bind law/process/code and reduce these context misses.
Acceptance criteria for closure
This TD can close when:
- IU supports canonical law/process/design/code units.
- A design pack can link directly to required law/process units, not just full docs.
- Process Resolver can query IU graph for applicable QT/procedure.
- Đ38/Đ39 Text-as-Code can link legal provisions, operational procedures, and code/DOT artifacts.
- Pack 2B+ uses IU links instead of long-doc/manual search for governance decisions.