Repository navigation
Description
Refs: #438
Depends on: drafted alongside B–J; final PR lands after E/F/I merge (docs must describe shipped reality)
Can parallel with: ongoing per-phase updates
Related: #372 (i18n contributor docs), #384
Context
The multilingual print architecture spans a shared kernel, a semantic document model, multiple renderers/transports, a label catalog derived from canonical translations, and two template systems with different trust models. Without in-repo documentation, every future contributor would need to rediscover this epic's decisions. This issue owns turning the shipped architecture into maintainable docs.
Architectural Decisions Relevant to This Issue
- Docs live under
docs/following existing conventions (docs/README.mdindex,docs/i18n.md,docs/tax-packs.md,docs/printers.mdprecedents). Update the index; do not fork a parallel doc site. - Document decisions and contracts, not volatile line numbers. Function/file references are fine; exact line numbers are not.
- Every guarantee stated must be testable or verifiable by pointer to the test that enforces it.
Scope / What to do
Create/update documentation covering:
- Printing architecture — pipeline diagram (PrintData + PrintContext → PrintDocument → renderers → transports), layer ownership table, what each layer may never do.
- PrintDocument schema — v1 block vocabulary, extension policy (how blocks are added), direction/bidi rules, LTR islands.
- Language behavior — receipt/KOT/UI language separation,
PrintLanguagePolicy, registry-driven dropdowns, bilingual presentation rules (inline vs stacked), adding-a-language checklist for print coverage. - Labels — canonical-messages-as-source rule, generated derived view workflow (
npm run generate:print-labels), borrowed-keys manifest, drift CI, exemption list (branding constants; technical literals on the test page: protocol names, encodings/codepages, byte/hex output, addresses/ports, model identifiers, capability identifiers). - Template provenance & security — core vs compliance-pack vs merchant-created vs imported; signed-pack lifecycle summary with pointers to tax-packs docs; merchant schema versioning; import envelope contract and its non-executable guarantees.
- Printer capability model — capability list, how renderers declare/consume them, warning semantics (no silent content loss).
- Contributor recipes — add a renderer; add a transport; author a merchant template JSON; preserve compliance provenance when contributing a country pack.
- Testing guide — parity harness usage, fixture matrix, width coverage expectations.
Structure: prefer updating docs/printers.md + one new docs/printing-architecture.md over many fragments; cross-link i18n/tax-packs docs instead of duplicating.
Compatibility / Migration
Docs-only. Where behavior differs between pre/post epic phases during rollout, mark sections with the issue that introduced the behavior.
What NOT to do
- Do NOT restate implementation tutorials that duplicate code comments/TSDoc.
- Do NOT promise future features as present (visual editor, raster, localized product data remain documented as future work with pointers to epic Later section).
- Do NOT copy internal planning conversation content verbatim; write for a cold reader.
Acceptance Criteria
- All eight topics covered;
docs/README.mdindex updated. - Every architectural claim links to enforcing code/test or epic issue.
- Contributor can, using only these docs: add a language with print coverage; add labels correctly through canonical messages + generator; explain why imported templates cannot execute code.
- Markdown renders cleanly; relative links resolve.
Verification
git diff --check
# link check per repo convention:
npx markdown-link-check docs/printing-architecture.md docs/printers.md 2>/dev/null || \
grep -oE '\]\(([^)h#][^)]*)\)' docs/printing-architecture.md | sort -u # manual relative-path audit fallbackPlus review by a contributor who did not participate in the epic (cold-read sign-off requested in PR).
Documentation
This issue is documentation; it also defines where future print docs must live (update docs/README.md ownership notes if needed).
Activity
khaira777 commentedon Aug 23, 2026
Implementation is ready in #485. The documentation review, tests, and CI are green (8 passed; 4 skipped). The PR body carries
Fixes #449and will close this issue when merged.docs(printing): fix architecture section anchors
khaira777 commentedon Aug 23, 2026
Follow-up: the Greptile P2 anchor issue is fixed in commit b76240d on #485. The Part II and provenance fragments now resolve, markdown-link-check passed, and the review thread is resolved; refreshed CI/Greptile checks are in progress.
docs(printing): document multilingual print architecture and template…
docs(printing): fix architecture section anchors
docs(printing): document multilingual print architecture and template…
docs(printing): fix architecture section anchors
docs: document multilingual print architecture and contribution workf…