extra-figma-code-connect #87
Open
khaliulin wants to merge 47 commits into
Open
Conversation
…dangling 0, R11 0)
…убрать временный migrated
….padding→space.400)
…dback/data/media/controls); оставить Aura-compat colorScheme
…, убрать мусорные ключи colorScheme, валидатор на baseline-фикстуре
…ext/border (35 ролей), компоненты переразведены (намеренные сдвиги)
…extend-токенов, 0 чужих ссылок)
…(semantic = colorScheme(5 ролей)+dimension+typography+shadow)
…ереразведены на под-пути ролей (3 lineHeight снап: stepper/metergroup→caption, panelmenu→body.md)
Implement .figma.md format validator with TDD approach. Validates frontmatter (required YAML fields), section order, and code fence language annotations. Includes three fixtures: valid example, missing frontmatter, and wrong section order violations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add three reference documents for static Figma Code Connect feature: - tokens.md: Figma variables mapped to CSS/Tailwind (colors, spacing, radius, typography, shadows, opacity) - icons.md: PrimeIcons usage guide with common icon examples - missing.md: Backlog table for tracking unimplemented tokens and icons All three documents follow Russian documentation standard and serve as anchors for `.figma.md` component files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ening fence only Opening fences require a language tag (html/ts/scss); closing fences must be bare ``` per CommonMark/GitHub spec. Updated validator logic (odd-index check), fixtures, schema.md, README.md, and button.figma.md accordingly. Added invalid-missing-open-fence-language fixture + test. Added variant='text' Do/Don't rule to button.figma.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Code Connect file for ExtraInputTextComponent with Figma hit: componentSet nodeId 15:13444, componentKey b8bc649d..., fileKey HOLKdvQJ8jCLeX17s9d0Yf (UI Kit DS v2.0). Maps all @inputs (placeholder, size, readonly, showClear, fluid, disabled via CVA), 6 variants, Do/Don't rules. Validator exits 0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace false figma-code-connect/button|input-text|dialog layout with
real colocated layout: src/lib/components/{button,inputtext,dialog}/<name>.figma.md.
Fix input-text/ → inputtext/ folder name.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace unused `draft` with `orphan-code` in schema.md. Add validator check that rejects unknown status values. Quote updated date in valid.figma.md fixture. Add invalid-bad-status fixture + test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add validator error when a closing (odd-indexed) code-fence carries a language tag. Add invalid-closing-fence-language fixture + test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, confirm-dialog, inputgroup, tooltip)
…card, message, skeleton)
…sk, inputotp, password, toggleswitch, togglebutton)
… rating, progressbar, progressspinner, metergroup)
…dmenu, panelmenu, breadcrumb, tabs)
…ast, stepper, timeline, scroll-panel)
…tbox, paginator, carousel, galleria)
…r, drawer Drawer)
…enu, message, panelmenu, tieredmenu)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что и зачем
Статический файловый аналог Figma Code Connect — даёт LLM/Claude тот же контекст связки «Figma-компонент ↔ Angular-компонент», что и оригинальный Code Connect, но без рантайма Figma CLI и без TypeScript-DSL.
Потребитель: LLM при генерации Angular-кода по Figma-дизайну.
Триггер: агент получает
nodeId/componentKeyиз Figma MCP → ищет файл черезgrep→ читает контракт.Архитектура
scripts/figma-code-connect/validate.mjsnpm run validate:figma-ccsrc/lib/figma-code-connect/{README,schema,conventions,tokens,icons,missing}.mdsrc/lib/components/<name>/<name>.figma.md*.component.tsdocs/superpowers/{specs,plans}/2026-06-22-figma-code-connect-static*.mdФормат файла: Markdown с YAML frontmatter. Жёсткий порядок секций:
## Overview→## Props mapping→## Variants→## Slots→## Related→## Do / Don't. Code-fence — язык на открывающем (CommonMark).Пилоты (с реальными Figma nodeId через MCP)
extra-button— fileKeyKhh7arsuXss3ncqy1Dz3OZ, 12 вариантов.extra-input-text— fileKeyHOLKdvQJ8jCLeX17s9d0Yf(linked library), ControlValueAccessor + 6 вариантов.extra-dialog— fileKeyHOLKdvQJ8jCLeX17s9d0Yf, 4 варианта, два структурных слота (*extraDialogHeader,*extraDialogFooter).figma.fileKey— per-component (linked-library модель Figma), это намеренно.Проверки
npm run validate:figma-cc→ exit 0node --test scripts/figma-code-connect/validate.test.mjs→ 6/6selector:иnodeId:возвращает ровно один файл на пилотЧто валидатор enforces
component,selector,import.*,figma.*,status,updated)status ∈ {stable, beta, deprecated, orphan-code}Зависимости
Новая dev-зависимость:
js-yaml@^4.1.0. Рантайм-зависимости не изменены.angular.json,.env,*.component.tsне модифицировались.Backlog (out-of-scope этого PR)
.figma.md↔*.component.tsне валидируется автоматическиupdated:не освежается на изменение исходникаinputgroup,form-field,confirm-dialog) — файлы ещё не созданыnodeIdмежду файлами не проверяетсяprebuild-hook для валидатора — opt-in, не подключёнИстория коммитов
15 коммитов, conventional-commit формат. История содержит mid-flight fix'ы из review-loop'ов (фиксы headings, code-fence rule, inline icon, README map) — оставлены как есть для прозрачности процесса.
Контекст
docs/superpowers/specs/2026-06-22-figma-code-connect-static-design.mddocs/superpowers/plans/2026-06-22-figma-code-connect-static.md