Customs extend
Write friendly SQL, compile it to genuine ASYCUDA World (SYDONIA) customs SQL you can run read-only. A fully-sourced PostgreSQL reference model + query compiler + docs + Agent Skills for customs analytics, ML & selectivity.
npx -y skills add FrancoisChastel/sydonia-toolkit --skill customs-extendAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 21 days oldThe repository was created 21 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Add or modify tables and columns in the Sydonia Toolkit customs schema while preserving its conventions (snake_case, ref_/sys_ prefixes, identity PKs, FK-to-ref coded columns, numeric money/mass types) and — critically — its provenance trail (every CREATE TABLE tagged -- src: or -- inferred, coverage updated). Use when the user wants to extend, customise, add a table/column to, or adapt the customs / ASYCUDA schema for their own needs.
SKILL.md
3.1 KB, 690 tokens by cl100k_base, as published. Nobody here has run it
Customs extend
Grow the schema without eroding what makes it trustworthy: consistent
conventions and an honest provenance trail. Read reference/conventions.md for
the full rulebook; this is the workflow.
When to use
"Add a table/column", "extend/customise the schema", "model X in the customs data", "adapt this for our country's fields". For pure data (rows), use customs-seed instead.
Workflow
-
Decide provenance honestly. Is this grounded in a document you actually have (cite its
SOURCES.mdID), or is it your modelling judgement (inferred)? Never invent a citation. A larger honest inferred set beats a fabricated documented one. -
Write the DDL to convention (full list in
reference/conventions.md):- Schema-qualify
asycuda.(or rely on the file'sSET search_path). snake_case;ref_for code tables,sys_for system/RBAC.id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY.- Real business codes
UNIQUE NOT NULL. - Coded columns → FK to a
ref_*table, not an inline code+name pair. - Money
numeric(18,4); mass/qtynumeric(18,3); flagsboolean; timestimestamptz. - Status lifecycle → a
ref_*_statustable + a*_status_historychild. COMMENT ONanything non-obvious.
- Schema-qualify
-
Tag it. Put exactly one provenance line directly above the
CREATE TABLE:-- src: S014, S003 -- OR -- -- inferred CREATE TABLE asycuda.new_thing ( ... );Tag individually-inferred columns inline too.
-
Place it in the right module of
Sydonia/schema/asycuda.sql(the file is ordered Reference → Traders → Manifest → Declaration → Selectivity → Accounting → Transit → Audit), respecting FK dependency order. Use a deferredALTER TABLE … ADD CONSTRAINTfor forward references (see howdeclaration_item.warehouse_idis wired). -
Update the docs in the same change:
SOURCES.md— add any new cited source (ID, URL, note) and cache a copy undersources/.COVERAGE.md— add the table under its module, marked documented/partial/inferred.DATA_DICTIONARY.md— regenerate from the catalog (it is generated).
-
Re-validate. Run the customs-validate skill (or reload + grep) to confirm the schema still loads clean and every table is still tagged.
Guardrails
- Do not drop or rename existing tables/columns to "simplify" unless asked — other objects and the e2e example depend on them.
- Do not disable constraints to make something fit; model it correctly.
- Keep the model in the
asycudaschema; don't scatter objects intopublic.