Commit Graph

59 Commits

Author SHA1 Message Date
Nick Shirokov 55b1ef4e06 Merge branch 'dev' 2026-02-10 13:31:23 +03:00
Nick Shirokov e229fc4873 Auto-register role in Configuration.xml
role-compile: after generating files, automatically inserts
<Role>Name</Role> into Configuration.xml ChildObjects (idempotent).
role-validate: checks that the role is registered, warns if not.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:29:50 +03:00
Nick Shirokov 3a4c1905f4 Fix Cyrillic encoding in role-info console output
Add [Console]::OutputEncoding = UTF8, matching role-compile
and role-validate scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:21:00 +03:00
Nick Shirokov 7aaa9fc070 Remove @use preset, merge DataProcessor/Report into @view
The @use preset name conflicted with the Use right semantics.
DataProcessor and Report require Use+View together (View cannot
be set without Use), so @view is the natural fit. Services
(WebService, HTTPService, IntegrationService) use explicit rights.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:18:08 +03:00
Nick Shirokov 8b8bc1225a Refactor role-compile SKILL.md with progressive disclosure
Extract detailed preset tables, Russian synonym tables, and extra
examples into dsl-reference.md (318 lines). Compact SKILL.md from
340 to 107 lines. Add role-dsl-spec.md project spec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:13:59 +03:00
Nick Shirokov dc10422f10 Add script-based /role-compile and /role-validate skills
Convert /role-compile from instruction-based to PowerShell script with JSON DSL:
- Presets (@view, @edit, @use) for common right sets
- String shorthand and object form with RLS support
- Russian synonym translation for object types and rights
- Auto UUID generation, UTF-8 BOM output

Add /role-validate for structural validation of Rights.xml:
- XML well-formedness, namespace, global flags
- Right name validation per object type with typo suggestions
- RLS condition and template checks
- Optional metadata validation (UUID, Name, Synonym)

Update README and role-guide with new skills documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:29:59 +03:00
Nick Shirokov 65afdf2e55 Add 1C Data Composition Schema (DCS) XML format specification
Comprehensive spec covering DataCompositionSchema format based on
analysis of 930 schemas from accounting configuration (8.3.24):
dataSource, dataSet (Query/Object/Union), fields with roles and
restrictions, parameters, dataset links, calculated/total fields,
area templates, and settings variants with structure items.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:32:33 +03:00
Nick Shirokov f87c94e832 Merge branch 'dev' 2026-02-09 22:53:50 +03:00
Nick Shirokov 6681758121 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 <noreply@anthropic.com>
2026-02-09 22:53:13 +03:00
Nick Shirokov 89f0788585 Rename form-add to form-edit for clarity
The skill modifies existing forms (adds elements/attributes/commands),
not creates new ones. "form-edit" better reflects its purpose.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 22:05:33 +03:00
Nick Shirokov d27dfbf8e1 Add role-guide.md and update README with role skills
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:54:52 +03:00
Nick Shirokov fc24524c75 Add /role-info and /role-compile skills
role-info: PS1 script parsing Rights.xml into compact summary grouped
by object type. Supports -ShowDenied and -OutFile for UTF-8 output.
78K lines XML -> 1924 lines for largest role, ~100 for typical ones.

role-compile: Template-based SKILL.md (no script) with XML templates,
rights catalog per object type, and typical right sets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:21:04 +03:00
Nick Shirokov 2c96c90d45 Add 1C role XML format specification
Complete reference: file structure, rights catalog by object type,
nested object rights, RLS conditions, restriction templates.
Verified across platform versions 8.3.20/8.3.24/8.3.27 and
both ACC and ERP configurations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:06:01 +03:00
Nick Shirokov 8fc30c9b9a Merge dev: form skills (info, compile, validate, add, patterns)
Complete managed form pipeline:
- /form-info: compact XML analysis
- /form-compile: JSON DSL to Form.xml generation
- /form-validate: structural validation
- /form-add: add elements/attributes/commands to existing forms
- /form-patterns: layout guide with archetypes and conventions

Event validation, element-level stdCommand, ERP patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:03:45 +03:00
Nick Shirokov ecfb473827 Add /form-patterns skill for loading layout guide into context
Self-contained SKILL.md with all patterns inlined (no external file
dependencies). Archetypes, naming conventions, ERP patterns, DSL examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:02:00 +03:00
Nick Shirokov dc9e1fe3db Add advanced ERP patterns to form layout guide
Collapsible groups, status banners, popup menus, custom command bars,
hyperlink labels — with DSL examples for each pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:35:02 +03:00
Nick Shirokov 5c07dec82c Add form layout patterns guide with real-world conventions
Design patterns extracted from 1C:Accounting 8.3.24 forms:
- 5 archetypes: document, processor, list, catalog, wizard
- Naming conventions for groups, elements, event handlers
- Layout principles (2-column header, footer totals, filter pairs)
- Two complete DSL examples (processing form, list with filters)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:12:17 +03:00
Nick Shirokov c5fa794cf3 Add event validation and element-level stdCommand support
- stdCommand dot syntax: "Товары.Add" → Form.Item.Товары.StandardCommand.Add
- Event name validation: warn on unknown events per element type (13 types, ~60 events)
- Form-level event validation (19 known events)
- Document events reference and popup element in SKILL.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:39:29 +03:00
Nick Shirokov 7e0e30730c Add unknown key warnings to form-add, update form-guide.md
form-add: warn about unrecognized DSL keys in element definitions,
matching the same validation added to form-compile earlier.

form-guide.md: update form-info output examples to reflect new
Title-in-header format and DSL-friendly command display
(-> Name [cmd], -> Close [std]).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:03:17 +03:00
Nick Shirokov ad412dffa2 Expand form-compile SKILL.md with full DSL reference and patterns
Replace minimal docs with comprehensive reference:
- Per-element-type property tables (input, check, label, group,
  table, pages, button, cmdBar) with all supported keys
- Top-level structure documentation (title, properties, events, etc.)
- Table+attribute linkage section explaining the ValueTable pattern
- Three pattern examples: file import dialog, wizard with steps,
  list with filter and table
- Attribute and command definition examples

This helps the model generate correct JSON DSL from natural language
requirements on the first attempt without guessing undocumented keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:58:15 +03:00
Nick Shirokov c665800916 Improve form skills: validation, docs, round-trip consistency
form-compile: warn about unknown DSL keys in element definitions,
document stdCommand/command button keys and EPF-specific notes.

form-validate: check that form-level Title uses multilingual XML,
not plain text (which causes XDTO errors at build time).

form-add: warn about duplicate element names, clarify after-not-found
message when using into+after together.

form-info: show Title in header instead of Properties line, display
commands as DSL-friendly format (-> Name [cmd], -> Close [std])
instead of raw Form.Command/Form.StandardCommand paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:44:32 +03:00
Nick Shirokov d05199d048 Replace hidden/disabled with visible/enabled in form DSL
Rename DSL keys to match 1C property names (Visible, Enabled):
- form-compile/form-add: accept "visible": false and "enabled": false
  as primary keys, keep hidden/disabled as synonyms
- form-info: output [visible:false] and [enabled:false] flags
- Update SKILL.md docs and form-guide.md

Improves round-trip consistency: form-info output now directly maps
to form-compile/form-add input keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:05:14 +03:00
Nick Shirokov a9e59265dd Fix ID scanning in form-add and title emission in form-compile
form-add: Scan column IDs (same pool as attribute IDs) to prevent
duplicate ID collisions. Use XPath .//*[@id] instead of ChildItems
recursion to capture companion element IDs (ExtendedTooltip, ContextMenu).

form-compile: Extract title from properties and route through Emit-MLText
instead of generic Emit-Properties, which produced plain text <Title>
rejected by 1C XDTO schema.

Found during E2E testing of full pipeline (epf-init → form-compile →
form-add → epf-build).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:40:23 +03:00
Nick Shirokov 99f57a5ff2 Add form-add skill for modifying existing Form.xml
Adds elements, attributes, and commands to existing managed forms
via JSON input. Supports positional insertion (into/after), auto ID
allocation from correct pools, companion generation, and event handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:34:56 +03:00
Nick Shirokov a813c7fd46 Add form-validate skill for structural validation of Form.xml
Checks: unique IDs (per pool), companion elements, DataPath→attribute
refs, button→command refs, event handlers, command actions, MainAttribute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:13:51 +03:00
Nick Shirokov cc2595b57a Add form-compile skill for generating Form.xml from JSON DSL
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:57:58 +03:00
Nick Shirokov 580124a971 Add form-info skill for compact analysis of 1C managed forms
Parses Form.xml (up to 28K lines) and outputs a compact summary (40-180 lines):
element tree with group orientation, data bindings, events, visibility flags,
attributes with types, commands, and parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:09:42 +03:00
Nick Shirokov 044bc18974 Add img-grid skill and page auto-sizing to mxl-compile
- New skill /img-grid: overlays numbered grid on images to help
  determine column proportions for MXL template generation
- Add "page" field to MXL DSL ("A4-landscape", "A4-portrait", or
  number) that auto-calculates defaultWidth from column proportions
- Update DSL spec, mxl-compile SKILL.md, MXL guide, README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:44:31 +03:00
Nick Shirokov 3819a5f7af Reorganize docs: README as hub + per-group guides
Split monolithic README into:
- README.md — concise hub with quick start and group links
- docs/epf-guide.md — EPF skills guide (content from old README)
- docs/mxl-guide.md — MXL skills guide (new scenarios and examples)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 21:36:44 +03:00
Nick Shirokov 56b1458545 Add ПФ_MXL_ naming convention for print form templates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 21:16:41 +03:00
Nick Shirokov bca022fba8 Add relative column width support ("Nx" syntax) to mxl-compile
Allows specifying column widths as multiplier of defaultWidth (e.g. "2x",
"0.5x") alongside absolute values. Makes template generation from images
easier — model specifies proportions instead of exact pixel values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:47:32 +03:00
Nick Shirokov 0e680d151d Remove unused styles, add empty row compression to DSL
- Decompiler: remove styles not referenced by any cell or rowStyle
- Decompiler: compress consecutive empty rows into {"empty": N}
- Compiler: support {"empty": N} row placeholder
- DSL spec: document empty field on rows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:09:13 +03:00
Nick Shirokov 8092015807 Optimize mxl-decompile output: deduplicate fonts, remove noise
- Font deduplication: identical fonts reuse existing name (6→4 on Акт)
- Don't emit "rowStyle": "default" for empty styles
- Don't emit "cells": [] on empty rows
- Don't emit "default": {} in styles section
- Result: ~10% smaller JSON output, cleaner for Claude to read/write

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:48:00 +03:00
Nick Shirokov 03a6820f69 Add 1C managed form XML format specification
Comprehensive spec based on analysis of 7723 forms from
Бухгалтерия предприятия 3.0.180: all 15 UI control types,
form-level properties, events, attributes/type system,
parameters, commands, and namespace declarations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:34:51 +03:00
Nick Shirokov bfbef3c361 Add mxl-decompile skill for Template.xml → JSON DSL conversion
Reverse of /mxl-compile: reads Template.xml and produces compact
JSON definition with auto-generated font/style names, rowStyle
detection, span/rowspan mapping, and column width compression.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:07:08 +03:00
Nick Shirokov 298d503c64 Extract MXL DSL spec to docs/mxl-dsl-spec.md
Shared spec for mxl-compile and future mxl-decompile.
Compiler SKILL.md now references the spec instead of inlining it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:39:40 +03:00
Nick Shirokov 1ed5d783e8 Rename numberFormat to format in mxl-compile DSL
The field covers all 1C format strings: numbers, dates, booleans.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:35:44 +03:00
Nick Shirokov f0bb8c860f Add rowspan and numberFormat support to mxl-compile
- rowspan: vertical cell merging with rowStyle gap-fill awareness
- numberFormat: style field generates nested <format> in palette
- Updated SKILL.md: new fields, removed from limitations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:33:41 +03:00
Nick Shirokov 2f260ddb7f Add underline/strikeout fonts, individual borders, thick lines
- Fonts: underline and strikeout fields (default false)
- Borders: individual sides (left, right), comma combos ("top,bottom")
- Lines: borderWidth "thick" generates width=2 line entry
- SKILL.md updated with new fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:22:13 +03:00
Nick Shirokov 2771424c71 Fix XML escaping in mxl-compile text content
Add Esc-Xml helper to escape &, <, >, " in cell text and
template content to prevent invalid XML generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:18:24 +03:00
Nick Shirokov 96890598f9 Add mxl-compile skill: DSL compiler for SpreadsheetDocument
JSON DSL format compiles to valid 1C Template.xml with correct
format palettes, merges, named areas, and rowStyle gap-filling.
Tested on simple (4 areas) and invoice (7 areas) templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:08:04 +03:00
Nick Shirokov 50dc9ceec9 Перевести SKILL.md навыков mxl-info и mxl-validate на русский
Для единообразия с остальными навыками проекта.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 16:29:57 +03:00
Nick Shirokov 455c12e6b6 Extract template parameters without -WithText flag
Parameters from [ParamName] placeholders in template text are now always
extracted and shown with [tpl] suffix. Numeric-only placeholders like [5]
(footnote references in legal forms) are filtered out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 16:17:50 +03:00
Nick Shirokov 1a79e84598 Improve mxl-info output and document how to read it
Script improvements:
- Sort areas by position (top-to-bottom) instead of alphabetically
- Extract detailParameter (drill-down links)
- Show column set sizes in header and per-area [colset 20cols]
- Detect Rows+Columns intersections with GetArea hint

SKILL.md: add "Reading the Output" section explaining area order,
column sets, intersections, detailParameter, and text content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 16:11:54 +03:00
Nick Shirokov 76a0dd80be Add mxl-info and mxl-validate skills for SpreadsheetDocument analysis
- /mxl-info: extracts compact template structure (areas, parameters,
  column sets) from Template.xml. Supports -WithText for cell content,
  -Format json, and output truncation protection.
- /mxl-validate: 12 structural checks (format/font/line indices,
  column bounds per column set, named area ranges, merge bounds,
  columnsID references). Exit code 1 on errors.

Tested on 3 real templates: label (simple), invoice (medium),
УКД (complex — 7 column sets, Rectangle areas).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:59:49 +03:00
Nick Shirokov fdf661192d Add platform version compatibility section to spreadsheet spec
Documented cross-version comparison (8.3.20, 8.3.24, 8.3.27):
Template.xml is byte-identical, only MetaDataObject/Form version
attribute changes (2.17 → 2.20). Confirmed backward compatibility —
8.3.27 accepts version="2.17" files without issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:01:58 +03:00
Nick Shirokov be3a31ea94 Add advanced spreadsheet features: multiple column sets, verticalUnmerge, Rectangle areas
Based on УКД (universal correction document) template analysis.
Multiple <columns> with UUID allow rows to use independent
column grids. Merges and named areas also reference column sets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:25:11 +03:00
Nick Shirokov 061c73b23d Add SpreadsheetDocument XML format specification
Based on real templates from 1C:Accounting — invoice (horizontal
areas, 33 columns) and label (vertical area, drawing, barcode).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:19:20 +03:00
Nick Shirokov 9f9a022659 Add .claude/settings.local.json to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:20:35 +03:00
Nick Shirokov 215319382a Simplify scenario 1 example in README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:16:25 +03:00