managing-diva-dictionaries

Generates, inserts, and validates table definitions in Divalto DIVA .dhsd dictionary files.

6|Updated May 11, 2026
One-click install
npx skills add https://github.com/divalto/divalto-ia-devkit --skill managing-diva-dictionaries-divalto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-diva-dictionaries
Source: https://github.com/divalto/divalto-ia-devkit/tree/main/plugins/divalto-devkit/skills/managing-diva-dictionaries
Command: npx skills add https://github.com/divalto/divalto-ia-devkit --skill managing-diva-dictionaries-divalto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Adding a table to a Divalto DIVA dictionary (.dhsd) requires hand-editing five INI zones ([CHAMP], [TABLE], [BASE], [INDEX], [INDEXL]) with byte-exact position arithmetic, ISO-8859-1 encoding, and CRLF line endings, where a single gap or overlap silently corrupts data. This Skill automates block generation, position calculation, insertion, and validation so dictionary changes compile cleanly. ## Core Features & Use Cases - Five-zone block generation: generate_dhsd_block.py produces all required blocks with automatic contiguous position calculation, canonical audit fields (Ce1, Dos, UserCr, UserMo, UserCrDh, UserMoDh), and the U-field reserve. - Dictionary surcharge: generate_surcharge_field.py adds custom fields to standard tables via <dict>u.dhsd with cumulative U-container offsets, copied standard metadata, and multi-base [BASEU] handling. - Nature modification and validation: modify_field_nature.py re-propagates positions across all tables and indexes when a field Nature changes (shift or cannibalize filler policies), and validate_dhsd.py enforces 16 rules (D01-D16) including overlap, gaps, encoding, and surcharge cross-checks. - Use Case: When declaring a new business table FamRglt in rtlfdd.dhsd with three fields and a primary index, the Skill generates the blocks, inserts them alphabetically with backup, and validates the result with zero errors. ## Quick Start Ask the AI to add a new table with its fields, CE value, base name, and indexes to your .dhsd dictionary using the managing-diva-dictionaries skill.

Frequently Asked Questions about managing-diva-dictionaries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new table to a Divalto .dhsd dictionary?

Provide the table name, CE value, physical base name, field list with Natures, and indexes as JSON to generate_dhsd_block.py, then insert the five generated blocks with insert_dhsd_blocks.py. The scripts compute contiguous positions automatically and validate the result with validate_dhsd.py.

How do I add a custom field to a standard Divalto table?

Use generate_surcharge_field.py with the standard .dhsd path, table name, field name, Nature, and label to create or append to a <dict>u.dhsd surcharge file. It calculates the cumulative offset in the U-container and copies standard metadata to satisfy rules D14-D16.

Can I change a field Nature without breaking existing table positions?

Yes, modify_field_nature.py updates the global [CHAMP] declaration and re-propagates positions across every table and index using that field. The default shift policy grows the record, while the cannibalize policy shrinks the Filler to keep record size constant.

What validation rules does the .dhsd validator check?

validate_dhsd.py enforces 16 rules: field overlaps and gaps (D01-D02), missing U-field (D03), undeclared fields (D04), encoding and CRLF checks (D05-D06), unclosed sections (D07-D09), CE coherence (D10), and surcharge rules D14-D16 when a standard dictionary is provided.

What are the limitations of the surcharge field generator?

The script does not cover array fields (Nature with *), multi-table composite fields anchored on several U-containers simultaneously, or custom index creation in surcharge. Those cases require manual editing following the surcharge pattern references.

Why does validation report a missing U-field error on legacy tables?

Legacy tables often predate the U-field convention, so D03 fires as an error by default. Pass the --migration flag to downgrade D03 to a warning so real position signals like overlaps and gaps remain visible during version alignment.