Skip to content

feat(figma): thread Figma through CLI and orchestrator (Phase D — T2F.8, T2F.9) - #1

Open
canonical-muhammadbassiony wants to merge 1 commit into
feat/figma-phase-c-mappingfrom
feat/figma-phase-d-cli
Open

feat(figma): thread Figma through CLI and orchestrator (Phase D — T2F.8, T2F.9)#1
canonical-muhammadbassiony wants to merge 1 commit into
feat/figma-phase-c-mappingfrom
feat/figma-phase-d-cli

Conversation

@canonical-muhammadbassiony

Copy link
Copy Markdown
Owner

Summary

Threads Figma integration through the CLI and orchestrator, completing Phase D of spec 002.

Tasks Implemented

  • T2F.8: Added --figma-url flag to cmd/bauer/main.go, wired into CLIFlags.FigmaURL. The orchestrator forks on cfg.FigmaURL != "": the figma-aware path calls generateChunksWithFigma() which fetches design data via sources.FetchFigma, runs mapping.Resolver.Build, persists figma artifacts (extraction, comments, mappings), and generates prompts via engine.RenderChunksFromResolved.
  • T2F.9: Added optional MCP guidance block to prompts. FigmaURL field added to figmaChunkContext (with json:"-"), RenderChunk passes it through, and figma-context.md has a {{if .FigmaURL}} conditional section with instructions for AI agents that have MCP access.

Files Changed

  • cmd/bauer/main.go--figma-url flag, wired through FlagsSource
  • internal/orchestrator/orchestrator.gogenerateChunksWithFigma() method; Execute forks on FigmaURL
  • internal/prompt/engine.goFigmaURL in context; RenderChunksFromResolved() method
  • internal/prompt/templates/figma-context.md — MCP guidance block ({{if .FigmaURL}})

How to Review

git diff feat/figma-phase-c-mapping..feat/figma-phase-d-cli -- .

Part of the Bauer v2 stacked PR series (Branch 7 of 12).

…uidance in prompts

T2F.8: cmd/bauer --figma-url flag wired through CLIFlags and Config
T2F.8: orchestrator.Execute forks on cfg.FigmaURL for figma-aware prompt generation
T2F.8: generateChunksWithFigma fetches design, runs mapping.Resolver, writes artifacts
T2F.9: figmaChunkContext.FigmaURL field enables MCP guidance block in template
T2F.9: figma-context.md optional MCP section renders when FigmaURL is set
T2F.9: Engine.RenderChunksFromResolved writes figma-aware prompt files to disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant