KB-4BDF

P3D B3-F1c-c dot_tools Registration (COMPILED, NOT EXECUTED)

5 min read Revision 1

P3D — B3-F1c-c dot_tools Registration (COMPILED)

Date: 2026-05-13 Mode: COMPILE-ONLY. NOT EXECUTED. compiled_from_assumptions: false Precedent: DOT-TAC-BIRTH-VERIFY (live row, closest semantic match: birth + cron + verify, empty file_path). Companion precedent: DOT-103 / dot-registry-count-refresh (the dot_tools row paired with the [DOT-REG] Count Refresh (6h) Directus Flow).


Probed dot_tools schema (live)

id              integer NOT NULL
status          varchar
sort            integer
user_created    char
date_created    timestamp
user_updated    char
date_updated    timestamp
code            varchar NOT NULL
name            varchar NOT NULL
name_en         varchar
description     text
classification  varchar
owner           varchar
script_path     varchar
token_type      varchar
category        varchar
usage_count     integer
_dot_origin     text
tier            text
domain          text NOT NULL
operation       text
paired_dot      text
trigger_type    text   -- distinct values: cron, dual, event, manual, on-demand, on-deploy
cron_schedule   text
file_path       text
last_executed   timestamptz
coverage_status text
extra_metadata  jsonb

Distinct classification values include: scanner, governance, registry, propose, detect, health-check-executor, health-check-verify, metadata, schema, vòng_đời, etc. No literal birth.* classification exists.


Compiled registration INSERT (NOT EXECUTED)

-- =========================================================================
-- B3-F1c-c dot_tools registration
-- DO NOT EXECUTE. Awaiting GPT review.
-- Mirrors DOT-TAC-BIRTH-VERIFY column choices (birth + cron + verify, empty
-- file_path because dispatch is via a Directus Flow, not a /opt/incomex/dot
-- shell script).
-- =========================================================================

BEGIN;

INSERT INTO dot_tools (
  code,
  name,
  name_en,
  description,
  classification,
  trigger_type,
  cron_schedule,
  file_path,
  domain,
  tier,
  operation,
  _dot_origin,
  extra_metadata,
  status,
  date_created
) VALUES (
  'DOT-BIRTH-ONBOARD-FULLSCAN',
  'dot-birth-onboarding-full-scan',
  'Birth Onboarding Full Scan',
  'B3-F1c-c. Periodically invokes fn_birth_onboarding_full_scan() via Nuxt endpoint to verify birth-registry completeness across all governed collections. Dispatched by Directus Flow (not a /opt/incomex/dot script).',
  'scanner',                          -- closest existing classification (verified via SELECT DISTINCT)
  'cron',                             -- matches DOT-TAC-BIRTH-VERIFY
  '0 */6 * * *',                      -- CANDIDATE; must equal dot_config policy.birth_full_scan.cadence_cron
  NULL,                               -- empty: dispatch is via Directus Flow, mirrors DOT-TAC-BIRTH-VERIFY
  'data_quality',                     -- matches DOT-TAC-BIRTH-VERIFY domain
  'A',                                -- audit-grade tier (cf. DOT_GOV_VERIFY, DOT-FIX-REPAIR-DETECT)
  'verify',                           -- mirrors DOT-TAC-BIRTH-VERIFY
  'knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3f1c-c-third-pass-approved-for-agent-probe-compile-2026-05-13.md',
  jsonb_build_object(
    'paired_directus_flow_name', '[BIRTH] Onboarding Full Scan (candidate 6h)',
    'nuxt_endpoint',             '/api/birth/onboarding/full-scan',
    'pg_function',               'public.fn_birth_onboarding_full_scan',
    'policy_keys',               jsonb_build_array(
                                   'policy.birth_full_scan.enabled',
                                   'policy.birth_full_scan.cadence_cron'
                                 ),
    'candidate_cadence_requires_review', true
  ),
  'active',
  CURRENT_TIMESTAMP
);

COMMIT;

Column choice rationale

Column Value Source
code DOT-BIRTH-ONBOARD-FULLSCAN Hyphenated style matches DOT-TAC-BIRTH-* sibling rows
classification scanner Verified live via SELECT DISTINCT classification
trigger_type cron Matches DOT-TAC-BIRTH-VERIFY precedent
file_path NULL Flow-dispatched, no /opt/incomex/dot script (matches DOT-TAC-BIRTH-VERIFY)
domain data_quality Matches DOT-TAC-BIRTH-VERIFY
tier A Audit/verify tools are tier A (cf. DOT_GOV_VERIFY, DOT_KG_HEALTH)
operation verify Matches DOT-TAC-BIRTH-VERIFY
extra_metadata jsonb Same shape style as live {} rows; adds pairing pointers

No column reference is invented. Every column in the INSERT exists in the live probed schema.

B3-F1c-c Scheduler Artifacts | COMPILE-ONLY | 2026-05-13

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/artifacts/p3d-birth-system-b3f1c-c-dot-tools-registration.sql.md