šŸ› fix: P-08 design check asks for Figma frames only for Experience work

Merged
AT
1mo ago
+102-8

Slice: #30

State #161 of P-08: the design check asks for Figma frames only for Experience work.

A consumer repository's design check refused a Process slice because one of its States linked no Figma frame. Process States are steps of process work with nothing to draw.

  • src/design.ts: the slice's GraphQL query also reads parent { number body issueType { name } }. workItemKind reads the parent's Kind: line, bold (**Kind:** Process.) or plain (Kind: Process (…)), case-blind. A kind other than Experience prints āœ“ pr-design: #<slice> builds <Kind> work item #<n>; frames are for Experience work and passes before any Figma call. Experience, no Kind: line, no body and no parent, and a parent that is not a Work item, are checked exactly as before, so work whose kind is not named fails closed. Any named kind other than Experience skips, as the brief asks: Kind: lines name Process and the other non-design kinds, and the line is written by the owner-approved Work item.
  • The Decision parser in src/decisions.ts reads only the plain form and the whole line, so the design check keeps its own small reader rather than change that one.
  • src/design.test.ts: a Process parent with a frameless State passes with no Figma call; an Experience parent with a planted frameless State is still refused with "links no Figma frame"; a parent with no Kind: line, or no body, is still checked; bold and plain forms are read; workItemKind cases.
  • README and docs/decisions.md say so.

pnpm check: 915 tests pass, coverage 99.3% lines.

šŸ¤– Generated with Claude Code


Summary by cubic

Fixes the design check so it asks for Figma frames only on Experience work items; a Process slice whose States link no frame now passes.

  • Reads the slice's parent Work item in the same GraphQL query as its States, and reads the parent's Kind: line bold or plain, case-blind.
  • A kind other than Experience prints a āœ“ line and passes without calling Figma, but only when the parent is a Work item; Experience, no Kind: line, no body, no parent, and a non-Work-item parent are checked as before, so an unknown kind fails closed.
  • Adds coverage for the kind reader and for Process, Experience, kind-less, and non-Work-item parents.