allocating-menu-enrno

Finds free EnrNo identifiers in Divalto ERP g3f.dhfi menu files by scanning M2 records.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? When adding a custom menu entry to a Divalto ERP domain, the EnrNo field in the g3f.dhfi menu file must be unique to preserve index integrity. Manually picking a number risks collisions with existing entries or with future standard ERP updates. ## Core Features & Use Cases - Free EnrNo Allocation: Scans all M2 records (Ce=2) in g3f.dhfi and returns the first free EnrNo in the requested range, with support for requesting multiple consecutive numbers. - Semantic Range Handling: Distinguishes the standard range (< 100000, reserved for the ERP) from the custom range (>= 100000, recommended for user customizations). - Multi-Structure Trap Protection: Always applies the Ce=2 filter to avoid misreading the M0 header record with M2 offsets (RETEX R-006). - Use Case: Before writing a new M2 menu record for a custom business entity, run the script to obtain a collision-free EnrNo such as 100000 in the custom range. ## Quick Start Ask the assistant to find a free EnrNo in the custom range of the g3f.dhfi file for your ERP module before creating a new menu entry.

Frequently Asked Questions about allocating-menu-enrno

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

FAQPage Schema
How do I find a free EnrNo in a Divalto g3f.dhfi menu file?

Run find_free_enrno.py with --file pointing to g3f.dhfi and --range custom. The script scans all M2 records and returns the first free EnrNo as JSON, typically 100000 when the custom range is empty.

What EnrNo range should I use for custom menu entries in Divalto ERP?

Use the custom range (100000 to 999999) for user-created menu entries. The standard range below 100000 is reserved for ERP-native allocations, and using it risks collisions when installing ERP updates.

Why must the Ce=2 filter be applied when scanning g3f.dhfi?

The g3f.dhfi file contains two record types: M0 (Ce=0, header) and M2 (Ce=2, menu choices). Without the Ce=2 filter, the M0 record is decoded with M2 offsets, producing aberrant EnrNo values that corrupt the statistics.

Can I allocate multiple consecutive EnrNo values at once?

Yes, pass --count N to the script to receive N free numbers in ascending order. For example, --range custom --count 3 returns [100000, 100001, 100002] when the custom range is empty.

What do the exit codes of find_free_enrno.py mean?

Exit code 0 means at least one free EnrNo was found. Exit code 1 means the range is saturated or no M2 records were read. Exit code 2 indicates an error such as a missing file, unreachable read_isam.py, or invalid JSON output.