KB-2CCB

01 — Overview & Control: Law & Capability Discovery for Official Lists Automation

5 min read Revision 1
architecturediscoveryofficial-listsreuse-firstread-onlyanti-forgetting

01 — Overview & Control

Mission: LAW_AND_CAPABILITY_DISCOVERY_FOR_OFFICIAL_LISTS_AUTOMATION Date: 2026-05-30 · Class: law discovery + capability inventory + anti-forgetting verification + reuse-first assembly plan Execution mode: READ-ONLY. Zero PG / Directus / Qdrant mutation. KB docs are the only artifacts written. Host/DB: contabo VPS · live PG read via query_pg (databases allowed: directus, incomex_metadata, workflow; substrate lives in directus.public = 274 tables + iu_core schema).

Why this mission exists

The concern is not lack of ideas. It is forgetting: many laws, DOTs, registries, pivots, birth mechanisms, IU/KG mechanisms and scanners were already designed or partly built, but they are scattered. The biggest risk is to forget an existing law/capability and then design a new layer that duplicates or bypasses prior work.

This mission does not implement. It discovers, verifies, maps, and produces a reuse-first plan.

Core question answered

"How do we make official lists live, auto-counted, pivot-based, IU/KG-connected, birth-governed, DOT-refreshable, and UI-visible by reusing what already exists?"

Short answer (the headline anti-forgetting finding): Every one of those six properties already has a live mechanism in PG. We do not need new engines:

  • auto-counted / pivot-basedpivot_definitions (37) + pivot_count()/pivot_query()/pivot_matrix() + refresh_pivot_results()pivot_results (126) → refresh_meta_catalog_from_pivot()meta_catalog.record_countv_registry_counts / v_registry_summary. (Điều 26 Luật Pivot/Đếm.)
  • birth-governedbirth_registry (954,161) + fn_pre_birth_check (5 checks) + fn_birth_gate (soft/warning). (Điều 0-G.)
  • DOT-refreshabledot_tools (309) + dot_iu_command_catalog (54) + orphan/refresh scanners (fn_refresh_orphan_dot, fn_birth_onboarding_full_scan) + Điều 23 unmonitored/unregistered detection + Điều 35 paired-DOT governance.
  • IU/KG-connectedinformation_unit (219) + iu_relation (60) + universal_edges (2199) + view v_kg_edges_all (2259). (Điều 38/39/44.)
  • UI-visibleui_pages (37 live Nuxt routes) + static UI-Preview-Master manifest (61 design surfaces) + design_templates. (Điều 28.)
  • approval-governedapproval_requests (211) + apr_approvals (42, cross-sign ≥2) + workflow_change_requests (3). (Điều 32/37.)

Package contents (13 docs)

  1. Overview & control (this doc)
  2. Law discovery index
  3. Law-to-capability matrix
  4. Live PG capability inventory
  5. KB/design capability inventory
  6. Anti-forgetting ledger (+confidence scores)
  7. Official list inventory (15 lists)
  8. DOT Registry List pilot (deep-dive #1)
  9. UI Preview Master List pilot (deep-dive #2)
  10. Reuse-first assembly plan (REUSE/EXTEND/WRAP/RECONCILE/DEFER/NEW)
  11. Risk review
  12. Next prompts
  13. Self-review

Method

  1. Mapped all 274 directus.public tables + iu_core; pulled pg_proc functions matching dot/pivot/birth/registry/scan/audit/metadata/iu/kg/event/approval (200 matches) and baseline counts of 29 key registries.
  2. Fanned out 5 parallel read-only discovery agents (Laws; Pivot+Counting+DOT; Birth/Collection/Meta + IU/KG; Event/Workflow/Approval/Personnel/Trigger/Form; UI-Preview-Master). Each agent restricted to SELECT + KB semantic search; volatile functions inspected via pg_get_functiondef only, never executed.
  3. Reconciled findings; verified the 15 mandatory laws (read or NOT_FOUND with evidence); built anti-forgetting ledger before any recommendation.

Forbidden-action compliance

No INSERT/UPDATE/DELETE/DDL. No volatile function executed. No Directus/Qdrant write. No write_file/ingest_document. Only KB upload_document for this report package. Baseline registry counts at entry == exit (no mutation path taken).

Final verdict

PASS. All acceptance criteria met (see doc 13). The substrate is richer than prior session memory captured — particularly the pivot+counting subsystem, which is the exact "auto-counted, pivot-based" engine the mission asked for and was at risk of being re-invented.

Back to Knowledge Hub knowledge/dev/reports/architecture/law-capability-discovery-official-lists-automation-2026-05-30/01-overview-and-control.md