Technical design standard

From SteelMorgan/1c-agent-based-dev-framework · View interactive version

Technical design standard is an AI agent skill from the GitHub repository SteelMorgan/1c-agent-based-dev-framework. For technical-design.md with MUST/SHOULD/MAY for 1C

How to use this skill

Skill file

Technical Design Standard (Technical Design)

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.


2. Document Language

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).


3. When Technical Design Is Needed

| 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 |


4. Mandatory Structure of technical-design.md

Title and Metadata

# Технический дизайн: [Краткое название]

| Поле | Значение |
|------|----------|
| Спецификация | [SPEC-NNN](ссылка на spec.md) |
| Дата | YYYY-MM-DD |
| Статус | Черновик / Ревью / Утверждён |
| Explorer | [explorer-context.md](ссылка) |
| Декомпозиция | [task-breakdown.json](ссылка) |
| Каталог ADR | [task_dir/adr/](ссылка) |

Sections and mandatory rules

| § | 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.


5. Section Descriptions

§ 1. Overview

1.1 Goals

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.

1.2 Non-goals

What the design explicitly does NOT solve. The most valuable section for preventing scope creep. Each non-goal is a deliberate exclusion.

1.3 Background

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.

1.4 Constraints

Constraints affecting the architecture:


§ 2. Solution Strategy

High-level description of the chosen approach (2–3 paragraphs):

This is the strategy, not the details. The details are in §3 and §4.


§ 3. Structural Blocks

3.1 System Context (C4 Level 1)

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.

3.2 Module Map (C4 Level 2–3)

Affected and new modules, their relationships:

| Модуль | Тип | Новый/Существующий | Ответственность |
|--------|-----|--------------------|-----------------|
| ОМ.РаботаСКонтрагентами | Общий модуль | Существующий (модификация) | Валидация, получение данных |
| МодульОбъекта.Контрагенты | Модуль объекта | Существующий (модификация) | Обработчики записи |

For complex tasks, a textual call diagram between modules.

3.3 Interfaces and Contracts

Signatures of key procedures/functions with contracts:

// Функция ПроверитьИНН(ИНН: Строка): Булево
//
// Параметры:
//   ИНН — Строка(10) или Строка(12), не пустая
// Возврат:
//   Истина — если ИНН корректен по алгоритму проверки контрольных разрядов
// Исключение:
//   Если ИНН пустая строка — ВызватьИсключение
// Директива: &НаСервереБезКонтекста

§ 4. Data and Metadata

4.1 Metadata Objects

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:

4.2 Data Flow

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.


§ 5. Cross-Cutting Concepts

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."


§ 6. Key Decisions

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
[Как проверить, что решение реализовано корректно]

§ 7. Risks and Drawbacks

7.1 Drawbacks

What will become worse, more complex, more expensive. If drawbacks is empty — the design has not been analyzed enough.

7.2 Risks
| # | Риск | Вероятность | Влияние | Mitigation |
|---|------|-------------|---------|------------|
| 1 | Производительность запроса при >100K записей | Средняя | High | Индекс + лимит выборки |

§ 8. Assumptions and Open Questions

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.


§ 9. Migration and Rollback (Conditional)

Condition: section MUST if existing metadata objects are changed or data migration is required. Otherwise — N/A: new objects, no migration required.

9.1 Migration Plan
9.2 Rollback Strategy

§ 10. Traceability

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.


6. Quality Criteria for technical-design.md

Reviewer checklist (scope=arch):

Structure and Completeness

Overview (§1)

Solution Strategy (§2)

Structural Blocks (§3)

Data and Metadata (§4)

Cross-Cutting Concepts (§5)

Key Decisions (§6)

Risks and Drawbacks (§7)

Traceability (§10)

Task decomposition (JSON)

Framework consistency


7. Typical mistakes

| 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) |


8. Related skills

Inputs: spec-standard. Outputs: task-breakdown-*. Criteria: coding-standards, ssl-patterns. Metadata generation: xml-generation.


depends_on:


Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.