framework_eng/skills/spec-writing/technical-design-standard/SKILL.md
For technical-design.md with MUST/SHOULD/MAY for 1C
npx skillsauth add steelmorgan/1c-agent-based-dev-framework technical-design-standardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Technical design (technical-design.md) is a bridge between the specification (WHAT) and task decomposition (HOW). It records architectural decisions, module structure, contracts, and end-to-end concepts. It extends the high-level Technical Design section from the specification.
Basis: Google Design Docs, arc42, MADR 4.0, Stripe RFC (Drawbacks), C4 Model.
Technical design MUST be written in Russian — section headings, descriptions, rationales, tables. The exception is code and metadata identifiers (module names, attributes, variables, BSL signatures), as well as established terms (ADR, RFC 2119, C4, MUST/SHOULD/MAY).
| Task type | TD needed | Rationale | |------------|----------|-------------| | New functionality (medium/complex) | MUST | Fixes the architecture before development starts | | Enhancement of a standard configuration with structural changes | MUST | The approach choice must be justified (extension vs configuration) | | Integration with an external system | MUST | Contracts and data flow are critical | | Simple bug fix | MAY | Only if the bug requires architectural changes | | Refactoring with changes to the module structure | SHOULD | Transparency about change boundaries is needed | | External processing (EPF) with a form | SHOULD | Metadata structure and UI require design. MUST if the EPF includes background operations, access rights, or data exchange |
# Технический дизайн: [Краткое название]
| Поле | Значение |
|------|----------|
| Спецификация | [SPEC-NNN](ссылка на spec.md) |
| Дата | YYYY-MM-DD |
| Статус | Черновик / Ревью / Утверждён |
| Explorer | [explorer-context.md](ссылка) |
| Декомпозиция | [task-breakdown.json](ссылка) |
| Каталог ADR | [task_dir/adr/](ссылка) |
| § | Section | Mandatory | Condition | |---|--------|---------------|---------| | 1 | Overview | MUST | Always | | 2 | Solution Strategy | MUST | Always | | 3 | Structural Blocks | MUST | Always | | 4 | Data and Metadata | MUST | Always | | 5 | Cross-Cutting Concepts | SHOULD | MUST if the task affects >2 modules or changes cross-cutting behavior | | 6 | Key Decisions | MUST | Always (minimum 1 decision) | | 7 | Risks and Drawbacks | MUST | Always | | 8 | Assumptions and Open Questions | SHOULD | MUST if there are uncertainties blocking part of the design | | 9 | Migration and Rollback | Conditional MUST | MUST if existing metadata objects are changed or data migration is required | | 10 | Traceability | MUST | Always |
Rule: if a section does not apply to the task, mark it as N/A with a brief reason. Do not remove the section.
What the technical solution should achieve. Formulations using RFC 2119 (MUST/SHOULD/MAY) are not needed - they are already in the specification. Here, these are the technical goals of the design.
What the design explicitly does NOT solve. The most valuable section for preventing scope creep. Each non-goal is a deliberate exclusion.
The current state of the system (TOGAF Baseline). Which modules/objects exist, how they work now. Link to explorer-context.md as the primary source - do not duplicate it, only expand where needed for the design.
Constraints affecting the architecture:
High-level description of the chosen approach (2–3 paragraphs):
This is the strategy, not the details. The details are in §3 and §4.
The system in the context of external systems and users. For integration tasks, an обязательная diagram (text or ASCII) is required.
For tasks within a single configuration, MAY be a brief description of the affected subsystems.
Affected and new modules, their relationships:
| Модуль | Тип | Новый/Существующий | Ответственность |
|--------|-----|--------------------|-----------------|
| ОМ.РаботаСКонтрагентами | Общий модуль | Существующий (модификация) | Валидация, получение данных |
| МодульОбъекта.Контрагенты | Модуль объекта | Существующий (модификация) | Обработчики записи |
For complex tasks, a textual call diagram between modules.
Signatures of key procedures/functions with contracts:
// Функция ПроверитьИНН(ИНН: Строка): Булево
//
// Параметры:
// ИНН — Строка(10) или Строка(12), не пустая
// Возврат:
// Истина — если ИНН корректен по алгоритму проверки контрольных разрядов
// Исключение:
// Если ИНН пустая строка — ВызватьИсключение
// Директива: &НаСервереБезКонтекста
Table of all affected metadata objects:
| Объект | Тип | Новый/Сущ. | Изменения | DSL |
|--------|-----|-----------|-----------|-----|
| Справочник.Контрагенты | Справочник | Сущ. | +Реквизит ИНН (Строка 12) | — |
| РС.ИсторияИзменений | Регистр сведений | Новый | Период, Объект, Автор, Описание | — |
| Форма.ФормаЭлемента | Управляемая форма | Новый | Поле ИНН, кнопка Проверить | [form-dsl.json](artifacts/form-dsl.json) |
| Роль.МенеджерПродаж | Роль | Новый | Права на справочник и регистр | [role-dsl.json](artifacts/role-dsl.json) |
JSON DSL rule:
task_dir/artifacts/ MUST; inline fragment in the design MAY (only key elements needed to understand the architecture)How data moves through the system for key scenarios:
Пользователь → Форма.Контрагент
→ МодульОбъекта.ПриЗаписи()
→ ОМ.РаботаСКонтрагентами.ПроверитьИНН()
→ РС.ИсторияИзменений.Запись
For integrations — data flow between systems with protocols and formats specified. For each integration point SHOULD specify an NFR contract: timeout, retry policy, idempotency, authentication, error mapping.
Cross-cutting solutions that permeate all modules. SHOULD specify a solution for each applicable aspect:
| Aspect | Solution | Justification | |--------|---------|-------------| | Error handling | Try/Exception with ЗаписьЖурналаРегистрации | coding-standards rule 18 | | Logging | ЖР via БСП (ЗаписьЖурналаРегистрации) | ssl-patterns: standard mechanism | | Access rights | Role via xml-gen, RLS not required | Data does not contain segregation by organization | | Transactions | StartTransaction/Try for writing to the register | coding-standards rule 18 | | Client/Server | &НаСервереБезКонтекста for business logic | coding-standards rule 3 | | Use of БСП | ОбщегоНазначения.СообщитьПользователю for validation | ssl-patterns: filling check | | Platform limitations | [describe if there are workarounds] | — |
If all aspects are standard and do not require special solutions, indicate: "Standard patterns are used, see coding-standards and ssl-patterns. There are no special solutions."
Brief table of architectural decisions:
| # | Решение | Варианты | Выбор | Обоснование | ADR |
|---|---------|---------|-------|-------------|-----|
| 1 | Хранение истории | A) ЖР, B) Отдельный регистр | B | Нужны запросы и отчёты по истории | [ADR-001](adr/ADR-001.md) |
| 2 | Валидация ИНН | A) Свой алгоритм, B) Внешний сервис | A | Нет зависимости от сети | — (тривиальное) |
Rule: for each non-obvious decision (≥2 alternatives with different trade-offs) — a separate ADR file in task_dir/adr/.
Separation from spec ADRs (MUST): the file-based task_dir/adr/*.md (MADR) records only technical design decisions (Phase 2+): architecture, modular structure, contracts. Business decisions at the requirements level (choice of alternative, scope decisions, user answers in clarification) remain in the inline "Decision Log (ADR)" of the specification (spec-standard). Each file ADR that follows from a spec decision MUST REFER to its number. Duplicating the same decision in both places is PROHIBITED.
ADR Format (MADR 4.0 lean):
# ADR-NNN: [Название решения]
Status: Accepted
Date: YYYY-MM-DD
## Context
[Почему возник вопрос]
## Decision Drivers
- [Фактор 1]
- [Фактор 2]
## Considered Options
1. [Вариант A] — описание
2. [Вариант B] — описание
## Decision Outcome
Выбран вариант [X].
### Consequences
- Good: [что улучшится]
- Bad: [что ухудшится]
### Confirmation
[Как проверить, что решение реализовано корректно]
What will become worse, more complex, more expensive. If drawbacks is empty — the design has not been analyzed enough.
| # | Риск | Вероятность | Влияние | Mitigation |
|---|------|-------------|---------|------------|
| 1 | Производительность запроса при >100K записей | Средняя | High | Индекс + лимит выборки |
Assumptions — accepted under uncertainty. They do not block the design, but may affect implementation:
- Предполагаем, что максимальное кол-во контрагентов < 500K
- БСП версии 3.1+ (иначе нужен fallback для ДлительныеОперации)
Open questions — left unanswered. They do not block the architecture, but require clarification before or during implementation.
Condition: section MUST if existing metadata objects are changed or data migration is required. Otherwise — N/A: new objects, no migration required.
Traceability matrix: requirement from the specification → design section → task from decomposition.
| Spec Requirement | Design Section | Task IDs |
|------------------|---------------|----------|
| MUST-1: Валидация ИНН | §3.3 Interfaces, §4.1 Metadata | T-001, T-003 |
| MUST-2: История изменений | §4.1 Metadata, §4.2 Data Flow | T-002 |
| SHOULD-1: Отчёт по истории | §4.1 Metadata (SKD) | T-005 |
Rule: each MUST from the specification MUST be covered by at least one design section and one task. SHOULD — SHOULD be covered.
Reviewer checklist (scope=arch):
task_iddepends_on entries are valid and contain no cyclesspec_refs point to existing specification sectionstask_type is correct (code/test/migration/docs/analysis/architecture)done_criteria are testable and specific| Mistake | Consequence | |--------|------------| | Non-goals are empty | Scope creep | | Drawbacks are empty | Reviewer cannot assess trade-offs | | JSON DSL is fully inline | The document becomes bloated, overview is lost → DSL in artifacts/ | | Specification duplication | Violation of single source of truth | | Traceability is absent | It is impossible to verify requirement coverage | | All sections are filled in for a simple task | Formal overhead → use N/A | | Constraints are not specified | Incompatible approach (EDT vs Designer, БСП version) |
Inputs: spec-standard. Outputs: task-breakdown-*. Criteria: coding-standards, ssl-patterns. Metadata generation: xml-generation.
depends_on:
development
1C server maintenance webhooks: container restart and external component cache cleanup
development
Interactive DAP debugging of a single BSL procedure
tools
Rules for using RLM tools for project search and navigation in 1C/BSL
development
Creates web applications and routes on Winow (a web server on OneScript and Autumn). Use when working with a web server on OneScript, routing, or Winow controllers.