openpencil/packages/fig/docs
Danila Poyarkov f133957b0b
fix(tests): let the app Playwright suite load every spec (#842)
`bun run test` stopped before running anything. Moving Figma
observation records out of tests/fixtures also moved
styled-saved-glyphs.json, which the saved-glyph and occurrence-text
canvas specs import, so both failed to load. The record moves back to
the fixture tree, and its observation note links to it there.

The real-LLM smoke spec threw at import when OPENROUTER_API_KEY was
unset. `bun run test` excludes it by tag but still loads the file, so
the throw aborted the whole run. The key is now read when the test
runs, so `test:real-llm` still fails without one.
2026-10-03 12:39:53 +04:00
..
observations fix(tests): let the app Playwright suite load every spec (#842) 2026-10-03 12:39:53 +04:00
architecture.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
document-sessions.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
export.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
instance-evaluation.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
materialization.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
README.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
source-model.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
validation.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00

FIG package architecture

These documents explain the .fig reader and its editing/export contracts. They are package implementation documentation, not a release-status log.

Reading order

Document Question
Architecture Which package owns each stage?
Source model What are records, resources, and identities?
Instance evaluation How do bindings and overrides resolve?
Materialization How do occurrences become editable nodes?
Document sessions How do incremental loads and recovery work?
Export How are runtime identities and claims encoded?
Validation What constitutes compatibility evidence?
archive -> source model -> instance evaluation -> materialization
                                                    |
                                  document sessions + editor actions
                                                    |
                                                  export
                                                    |
                                            Figma validation

Status vocabulary

  • Required invariant: a correctness constraint, whether or not all cases satisfy it yet.
  • Implemented: behavior present in the linked modules and covered by the cited tests.
  • Known limitation: a boundary not yet implemented or validated; not a supported fallback.

Every consumer uses this reader; the previous importer and its repair pipeline are gone, so there is one interpretation path, not a legacy mode. Remaining work is fidelity and performance acceptance against Figma, tracked per document as known limitations.

Keep temporary file keys, benchmark runs, experimental findings, and current blockers in ignored scratch/ notes or the integration PR. Fixture provenance belongs alongside fixtures. The public roadmap owns product-level direction.