KB-47F5

02 — Law & Source Index

6 min read Revision 1
architecturelawsdieu26information-atom-lawspecies-taxonomybirth-law2026-05-30

02 — Law & Source Index

All laws below were searched live in the KB this session. Summaries are grounded in retrieved text; where a numbered Điều could not be retrieved verbatim, that is stated.

Foundational laws (retrieved & summarized)

Information Atom Law — Điều 0 (knowledge/dev/architecture/information-atom-law.md)

5 invariants: (1) everything is an entity with ID + registry + metadata; (2) relations don't self-destruct (deprecate→migrate→retire); (3) metadata only grows; (4) registry never shrinks (meta_catalog 14→never 13); (5) every entity has its own page/profile (Đ38/44). Foundation: every entity is born (birth_registry), belongs to 1 species + 1 composition_level, counted by pivot (Đ26), governed by governance_registry (Đ37).

Composition-Level Law — Điều 0-B v3.0 (composition-level-law.md)

Single question: "what does this entity contain inside?" → 6 levels: atom(0), molecule(1), compound(2), material(3), product(4), building(5). Structural relations = native FK/M2M (100% DB-enforced); functional/cross-type = entity_dependencies (soft, DOT-scanned). Prefer native FK; only use entity_dependencies when FK impossible.

Species Taxonomy v1.2 — S157 (species-taxonomy-complete.md)

Species ≠ composition layer. Species = meta-entity classification, orthogonal 7th dimension. Tables: entity_species (catalog, tree 3-tier parent_id+depth), species_collection_map (collection→species, is_primary), birth_registry (records species_code + composition_level per individual). Registries UI = 7 dimensions = 6 layers + 1 species.

Điều 26 — LUẬT PIVOT v4.0, S146 (dieu26-pivot-law.md) — THE counting constitution

  • §0: MỌI THỨ ĐẾM = PIVOT. pivot_count(code) is the ONLY counting method. No manual count, no hardcoded number, no scattered SELECT count(*).
  • MT3: numbers are NOT written; they self-compute from pivot_definition on live data.
  • MT5: meta_catalog = list of lists; it does NOT contain numbers — numbers live in pivot_results.
  • MT7: pivots read live source tables, never copies. MT8: pivot result served via Directus/API; Nuxt only displays.
  • 3 tables: pivot_definitions (code, scope, dimension, source_table, filter_sql), pivot_results (pivot_code, dimension_value, count, computed_at), meta_catalog (points to pivots).
  • §II-BIS: Tab Pivot 9 rows (Atoms…Buildings + Meta/Species + DOT + Collections). §II-QUINQUIES: pivot_matrix(rows, cols). §III: add a pivot = INSERT row + refresh_pivot_results(); no Nuxt code change.

Layer-3 Information Law v3.0, S122 (layer3-information-law.md)

Every object = a living DB about itself: identity, registry, metadata, labels=INPUT (entity_labels junction), relations 5+6 = OUTPUT, own page.

P3D Principle + GPT species note (2026-05-12)

TẦNG (tier) ≠ LỚP (composition_level) ≠ CHIỀU (pivot dimension). Anti-hardcode: never hardcode species/layer/number in Nuxt — read layers from composition_levels/reference, species from entity_species, numbers from pivot. "6 loài + 1 species" is explicitly shorthand for "6 composition layers + species dimension" — there is no literal "6 species + 1 species" construct in runtime.

Birth / Registry / DOT / governance / IU laws

  • Birth Registry Law (Đ0-G): every object born into correct species/collection; birth_registry (959,372 rows) is the per-individual ledger (entity_code, species_code, composition_level, collection_name, born_at). fn_birth_registry_auto / birth_auto_register triggers.
  • Đ2 Registry Law / Đ36 Collection Protocol: every entity has ID + registry + metadata + automated management; collections registered in collection_registry (168) + table_registry (21).
  • Đ23 DOT Scanning / Đ35 DOT Governance: capability ops via DOT; canonical catalogs dot_tools (309), dot_iu_command_catalog (54). (Numbered text not re-retrieved verbatim this session — cited from substrate + prior packages.)
  • Đ28 Nuxt/template boundary: Nuxt = render shell; business/count logic forbidden in frontend. Directly relevant to the audit.
  • Đ30 rollback / Đ31 audit: forward-only reversal, version-pin/freeze; audit trail via lifecycle_log (851) / measurement_log (31,984).
  • Đ37 Governance Organization: ownership via governance_registry (9) capability.can_create.
  • Đ38/39 IU/KG, Đ43, Đ44 (DRAFT): information_unit (219) + iu_relation (60); every entity → own IU/profile page; v_kg_edges_all view. (Đ43/44 are draft; cited from KB titles dieu44-trien-khai/*.)

Source documents read this session

dieu26-pivot-law.md, species-taxonomy-complete.md, information-atom-law.md, composition-level-law.md, layer3-information-law.md, dieu44-trien-khai/notes/gpt-understanding-species-and-six-composition-layers-2026-05-12.md, dieu44-trien-khai/principles/p3d-terminology-and-multidimensional-entity-db-principle-2026-05-12.md. Prior reports cross-referenced: s146-m4c-pivot-nuxt-render, s145-registries-page, s149-pivot-step2-report, s157b-species-complete-report, s186-short-roadmap-dieu38-with-pivot-nuxt-render.

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-foundation-reuse-audit-rebuild-blueprint-2026-05-30/02-law-source-index.md