Commit Graph

31 Commits

Author SHA1 Message Date
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
Nick Shirokov d6660a4d00 Remove docs/ references from skills to avoid confusion
Skills are self-contained — all templates and instructions are
in SKILL.md. Removed spec references that could mislead the
model into trying to read files that may not exist. Updated
README to note that docs/ is not needed when copying skills.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:49:44 +03:00
Nick Shirokov 4bc86decf8 Improve usage examples with real-world scenarios
README: replace abstract examples with realistic scenarios — processor
with form for data manipulation, BSP print form with spreadsheet
template, incremental additions. Emphasize natural language over slash
commands.

epf-add-template SKILL.md: add Russian name mapping for template types
(табличный документ, текстовый документ).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:37:42 +03:00
Nick Shirokov 34e88d2914 Add natural language usage examples to README
Show that users can describe tasks in free form — Claude will pick
the right skills automatically. Slash commands still work for precise
control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:32:33 +03:00
Nick Shirokov b3dac25729 Add epf-add-help skill and help specification
New skill /epf-add-help creates built-in help files (Help.xml + HTML page)
for external data processors. Also adds IncludeHelpInContents to form
metadata if missing.

New spec docs/1c-help-spec.md documents the help file format, HTML
template, and help button integration on forms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:13:47 +03:00
Nick Shirokov c2348b6b68 Add BSP skills for additional processors/reports registration
New skills for working with BSP (Standard Subsystems Library) mechanism:
- epf-bsp-init: adds СведенияОВнешнейОбработке() to object module
- epf-bsp-add-command: adds commands to existing BSP processor

Both skills use code templates in SKILL.md (no PowerShell scripts) —
Claude modifies BSL code directly via Read/Edit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:48:43 +03:00
Nick Shirokov aaa4f65be1 Update README: argument hints, auto DefaultForm, usage guide
- Added parameters column to skills table
- Noted that remove skills are manual-only
- Removed --main from quick start (first form is auto-main)
- Added "Подключение к проекту" section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:16:31 +03:00
Nick Shirokov d34cbf7272 Add argument-hint to all skills, disable auto-invocation for remove skills
- argument-hint: shows expected parameters when typing /command
- disable-model-invocation on epf-remove-form and epf-remove-template
  prevents Claude from invoking destructive operations autonomously

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:02:25 +03:00
Nick Shirokov e3daaf233d Auto-set DefaultForm for the first form added
When adding the first form to a processor, DefaultForm is now set
automatically without requiring the --main flag. The --main flag
is still available to reassign DefaultForm to a different form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 19:31:19 +03:00
Nick Shirokov 43333f1481 Initial commit: EPF skills for Claude Code
7 skills for working with 1C external data processor XML sources:
- epf-init: scaffold a new processor (root XML + ObjectModule.bsl)
- epf-add-form: add a managed form with BSL module
- epf-add-template: add a template (HTML/Text/SpreadsheetDocument/BinaryData)
- epf-remove-form: remove a form and update root XML
- epf-remove-template: remove a template and update root XML
- epf-build: build EPF from XML (documentation only)
- epf-dump: dump EPF to XML (documentation only)

Includes XML format spec and build/dump command reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 19:05:27 +03:00