Predefined elements

From SteelMorgan/1c-agent-based-dev-framework · View interactive version

Predefined elements is an AI agent skill from the GitHub repository SteelMorgan/1c-agent-based-dev-framework. Before creating a new setting, search for a predefined value

How to use this skill

Skill file

Reuse-first for settings and predefined values

Trigger: the task needs a setting, a named predefined value, a threshold, a flag, a code, a reference to an object, or another parameter that should live centrally.

Principle

Settings duplicated across copies or hardcoded as literals in code diverge between installations and silently break logic. If the project already has a centralized store for settings or named predefined values, the agent must first look for the value there and use the standard access layer for it.

MUST

| Requirement | Description |

|-----------|----------|

| Search first | Before creating a new setting or hardcoding a value, find the existing value by business key through the project's standard mechanism. If found, reuse it and do not create a duplicate |

| Read through wrappers | If the project has a service module, API, or БСП access wrapper for settings, use it instead of a direct query to storage |

| No hardcoding | Do not hardcode codes, references, thresholds, and flags that should be manageable settings. The value must be read by a meaningful business key |

| New key only when absent | Create a new setting only after checking that no existing key and no collisions by purpose exist |

| One key in one place | Declare the string business key only once: a constant, an exported function, or a single access point. Do not duplicate the literal across the code |

| Document the purpose | For a new setting, record the purpose, value format, logic owner, and acceptable default value in task artifacts or project documentation |

SHOULD

What this rule does NOT cover

Related rules


depends_on:


Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.