From 6681758121b11e5b8d0d5fee87468a7bb7a44ef4 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 9 Feb 2026 22:53:13 +0300 Subject: [PATCH] Add /form-add skill for configuration objects Create forms (metadata XML + Form.xml + Module.bsl) for Document, Catalog, InformationRegister and other configuration object types. Supports Object/List/Choice/Record purposes with automatic ChildObjects registration and DefaultForm setup. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/form-add/SKILL.md | 91 ++++ .claude/skills/form-add/scripts/form-add.ps1 | 435 +++++++++++++++++++ README.md | 3 +- docs/1c-form-spec.md | 151 +++++++ docs/form-guide.md | 29 +- 5 files changed, 707 insertions(+), 2 deletions(-) create mode 100644 .claude/skills/form-add/SKILL.md create mode 100644 .claude/skills/form-add/scripts/form-add.ps1 diff --git a/.claude/skills/form-add/SKILL.md b/.claude/skills/form-add/SKILL.md new file mode 100644 index 00000000..af103fec --- /dev/null +++ b/.claude/skills/form-add/SKILL.md @@ -0,0 +1,91 @@ +--- +name: form-add +description: Добавить управляемую форму к объекту конфигурации 1С +argument-hint: [Purpose] [--set-default] +allowed-tools: + - Bash + - Read + - Write + - Edit + - Glob + - Grep +--- + +# /form-add — Добавление формы к объекту конфигурации + +Создаёт управляемую форму (metadata XML + Form.xml + Module.bsl) и регистрирует её в корневом XML объекта конфигурации (Document, Catalog, InformationRegister и др.). + +## Usage + +``` +/form-add [Purpose] [Synonym] [--set-default] +``` + +| Параметр | Обязательный | По умолчанию | Описание | +|-------------|:------------:|--------------|----------------------------------------------| +| ObjectPath | да | — | Путь к XML-файлу объекта (Documents/Док.xml) | +| FormName | да | — | Имя формы (ФормаДокумента) | +| Purpose | нет | Object | Назначение: Object, List, Choice, Record | +| Synonym | нет | = FormName | Синоним формы | +| --set-default | нет | авто | Установить как форму по умолчанию | + +## Команда + +```powershell +powershell.exe -NoProfile -File .claude\skills\form-add\scripts\form-add.ps1 -ObjectPath "" -FormName "" [-Purpose ""] [-Synonym ""] [-SetDefault] +``` + +## Purpose — назначение формы + +| Purpose | Допустимые типы объектов | Основной реквизит | DefaultForm-свойство | +|---------|-------------------------|-------------------|---------------------| +| Object | Document, Catalog, DataProcessor, Report, ChartOf*, ExchangePlan, BusinessProcess, Task | Объект (тип: *Object.Имя) | DefaultObjectForm (DefaultForm для DataProcessor/Report) | +| List | Все кроме DataProcessor | Список (DynamicList) | DefaultListForm | +| Choice | Document, Catalog, ChartOf*, ExchangePlan, BusinessProcess, Task | Список (DynamicList) | DefaultChoiceForm | +| Record | InformationRegister | Запись (InformationRegisterRecordManager) | DefaultRecordForm | + +## Что создаётся + +``` +/Forms/ +├── .xml # Метаданные формы (UUID) +└── / + └── Ext/ + ├── Form.xml # Описание формы (logform namespace) + └── Form/ + └── Module.bsl # BSL-модуль с 5 регионами + ПриСозданииНаСервере +``` + +## Что модифицируется + +- `` — добавляется `
` в `ChildObjects` (перед `