mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-18 07:35:52 +03:00
When a subsystem definition includes `children: [...]`, the parent XML
was emitted with `<ChildObjects><Subsystem>Name</Subsystem></ChildObjects>`
refs, but the referenced `Subsystems/{Parent}/Subsystems/{Child}.xml`
files were never created. Before 96d1dea (-StrictLog) the platform
silently dropped the refs on load (exit 0), so verify-snapshots showed
these cases green. With the new strict log parsing, `full` and
`with-children` started failing on "Файл объекта не существует".
Both PS1 and PY ports now emit a minimal valid child subsystem stub
(full MetaDataObject, empty Synonym/Content/ChildObjects) via new
Write-ChildSubsystemStub / write_child_subsystem_stub helpers. Stub
creation is guarded by Test-Path / os.path.exists, so a subsequent
compile of the same child via -Parent does not get clobbered, and
re-running the parent compile is idempotent. Дубли в children[]
дедуплицируются через seen-set.
Also removed the "Что генерируется" section from SKILL.md — filesystem
layout is covered by the OutputDir param + [OK] stdout lines; the
section was noise for model consumers.
Bumped subsystem-compile.ps1 v1.4→v1.5 and subsystem-compile.py
v1.3→v1.5 (PY caught up with PS1 version pin).
Verification:
- verify-snapshots --skill subsystem-compile: 5/7 → 7/7
- runner --filter subsystem-compile (PS1): 7/7
- runner --filter subsystem-compile --runtime python: 7/7 (dual-port drift clean)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.5 KiB
2.5 KiB
name, description, argument-hint, allowed-tools
| name | description | argument-hint | allowed-tools | ||||
|---|---|---|---|---|---|---|---|
| subsystem-compile | Создать подсистему 1С — XML-исходники из JSON-определения. Используй когда пользователь просит добавить подсистему (раздел) в конфигурацию | [-DefinitionFile <json> | -Value <json-string>] -OutputDir <ConfigDir> [-Parent <path>] |
|
/subsystem-compile — генерация подсистемы из JSON
Принимает JSON-определение подсистемы → генерирует XML + файловую структуру + регистрирует в родителе (Configuration.xml или родительская подсистема).
Параметры и команда
| Параметр | Описание |
|---|---|
DefinitionFile |
Путь к JSON-файлу определения |
Value |
Инлайн JSON-строка (альтернатива DefinitionFile) |
OutputDir |
Корень выгрузки (где Subsystems/, Configuration.xml) |
Parent |
Путь к XML родительской подсистемы (для вложенных) |
NoValidate |
Пропустить авто-валидацию |
powershell.exe -NoProfile -File '.claude/skills/subsystem-compile/scripts/subsystem-compile.ps1' -Value '<json>' -OutputDir '<ConfigDir>'
JSON-определение
{
"name": "МояПодсистема",
"synonym": "Моя подсистема",
"comment": "",
"includeInCommandInterface": true,
"useOneCommand": false,
"explanation": "Описание раздела",
"picture": "CommonPicture.МояКартинка",
"content": ["Catalog.Товары", "Document.Заказ"],
"children": ["ДочерняяА", "ДочерняяБ"]
}
Минимально: только name. Остальное — дефолты.
Примеры
# Минимальная подсистема
... -Value '{"name":"Тест"}' -OutputDir config/
# С составом и картинкой
... -Value '{"name":"Продажи","content":["Catalog.Товары","Report.Продажи"],"picture":"CommonPicture.Продажи"}' -OutputDir config/
# Вложенная подсистема
... -Value '{"name":"Дочерняя"}' -OutputDir config/ -Parent config/Subsystems/Продажи.xml