Skip to content
Templiqx
Esc
navigateopen⌘Jpreview
On this page

ADR: Legacy template import (safe subset)

Status

Accepted (2026-07-26) — explicit unsupported classification; no broad importer. Evidence: the V5 DOCX slice is implemented (adapters/templiqx-docx-v5) and fixture-gated in crates/templiqx-conformance/tests/crm3.rs.

Context

Estates may carry Handlebars, Carbone, or other legacy template dialects. Templiqx already migrates an explicit DOCX V5 subset via LegacyImportAdapter with fixture-gated claims. Broader legacy import risks executable helpers, dynamic partials, and silent approximation.

Decision

  1. Only explicitly selected dialects are imported. V5 DOCX is the measured slice; V1 BeanShell and V2 markers are detected and classified, never executed.
  2. Unsupported by design in portable core:
    • arbitrary JavaScript, Rust, shell, BeanShell, Handlebars helpers/decorators;
    • dynamic partial lookup and prototype traversal;
    • unbounded inheritance or runtime helper registries.
  3. Future dialects require: fixture IDs, expected migration reports, and ADR acceptance before catalog claims.

Consequences

  • migrate_legacy remains the host-facing import seam; hosts add adapters for opco-specific subsets with their own corpora.
  • Named slots, YAML LSP, and Rust authoring facades are separate proposals with prerequisites — not hidden extensions to v1alpha1 syntax.
  • migrate_legacy may additionally emit a draft templiqx/v1alpha1 contract derived solely from classified-migrated placeholders. Drafts are inert data: never executed, always author-reviewed, and gated by the same fixture discipline as migration itself (fixture + expected draft + migrate → validate round-trip test).

Alternatives considered

  • Generic Handlebars compatibility layer. Rejected — executable helper surface conflicts with non-executable contract model.
  • Silent best-effort import. Rejected — fixture discipline requires honest category reporting.

Last updated on July 28, 2026

Was this page helpful?