generating-objet-metier

Generates and validates DIVA Module Check .dhsp files from Jinja2 templates and naming tokens.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Writing a DIVA business object layer (Module Check) by hand means reproducing roughly 52 standard functions, correct naming tokens, and strict ISO-8859-1/CRLF encoding for every entity, which is error-prone and slow. ## Core Features & Use Cases - Module Check generation: Produces a complete .dhsp file (header, includes, Init_Module, ~52 standard functions, foreign-key checks) from a Jinja2 template and naming tokens, either computed automatically from entity parameters or supplied as JSON. - Foreign key support: Repeatable --fk CHAMP:TARGET[:ZOOM] arguments generate module imports and Check_Field validation procedures, with exemptions for accounting targets (C3-C9). - Built-in validation: validate_mchk.py checks rules M01-M05 (Init_Module, INIT record, OutputMode stacking, OverWrittenBy, encoding) plus 22 mandatory function signatures and naming coherence. - Use Case: Ask to generate the Module Check for the Retail entity FamRglt (table RtlFamRglt, key RgltFam) and receive a validated, ISO-8859-1/CRLF-encoded .dhsp file ready for the DIVA 3-file pattern. ## Quick Start Ask the assistant to generate the Module Check file for a DIVA entity by providing its domain, entity name, SQL table, key field, and description.

Frequently Asked Questions about generating-objet-metier

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

FAQPage Schema
How do I generate a DIVA Module Check .dhsp file?

Run generate_mchk.py with --params and provide --domaine, --entite, --table, --champ-cle, --description, and --output. The script computes naming tokens automatically and renders the Jinja2 template into an ISO-8859-1/CRLF .dhsp file.

How do I add foreign key validation to a Module Check?

Pass repeatable --fk arguments in the format CHAMP:TARGET[:ZOOM], for example --fk RacPays:T013:9053. The generator adds the module import and Check_Field validation procedures; accounting targets C3-C9 skip the module import.

What encoding does a DIVA .dhsp file require?

DIVA .dhsp files must be encoded in ISO-8859-1 with CRLF line endings and no UTF-8 BOM. The generator writes this format automatically, and validate_mchk.py rule M05 flags any file that deviates.

What does validate_mchk.py check in a Module Check file?

It verifies rules M01-M05 (Init_Module presence, INIT record initialization, OutputMode stacking in PostFetch, OverWrittenBy, encoding), the presence of 22 mandatory function signatures, and naming coherence against the provided tokens JSON.

What happens when the entity name collides with the SQL table name?

DIVA identifiers are case-insensitive, so a NomVue identical to the table name causes a collision error. The script exits and asks you to rerun with --nom-vue to supply an alternative view name.