# design-check - Phase 4 report object and export

## Report object

```
{ project, module, platform, figmaUrl, figmaFileKey, timestamp,
  lang: <prefs.global.outputLanguage>,
  coverage: { targets: <scoped inventory targets, as the id array or the target objects>,
              covered: <audited id array>,
              skipped: [ { id, group, reason } ],
              truncatedInventory: <inventory.truncated>,
              floor: <config coverage.floor, optional> },
  variants: [ { name, figmaNodeId, perceptualPct, passed, compareSize, liveSize,
                images, findings, fixPrompt, componentRefs,
                walk: { components: <inventoried>, converged: <count>,
                        didNotConverge: [ { component, attempts } ],
                        notVerified: [ { item, tag, reason } ] } } ] }
```

- `walk` separates a checked screen from a viewed one. Field definitions live in `features/design-conformance.md`.
- Pass ids, not counts: the engine then names each unaccounted target in the report instead of printing an anonymous tally.
- `compareSize` and `liveSize` come straight from the `design_visual_compare` result.

## Render + export

```
mcp__multi-agent-toolkit__design_report({ report, out_dir: state.designCheck.reportDir,
  formats: ["html", "pdf"] + (confluence enabled ? ["confluence"] : []) })
```

- **HTML**: self-contained (base64 images, CSS-positioned annotations over the live capture, stacked findings, fix prompt), with the coverage gate banner at the top.
- **PDF**: via Playwright if present; if unavailable the tool returns `pdfError` - report it and note the HTML can be printed manually.
- **Confluence**: only if `figmaConfig.confluence.enabled` (or prefs). Reuse the pipeline's Confluence adapter (the channels command's storage-format upload) with the report HTML as the page body and the PNGs as attachments. Disabled → graceful skip with a one-line note.

## Cleanup

Remove the worktree (`git worktree remove --force`) unless the user asked to keep the built app. The report dir is never removed.
