Status: Proposed architecture for engineering review
Date: November 30, 2026
Related document: Software vision and concept
This document defines intended contracts and boundaries. Package names, directory layouts, APIs, YAML fields, and code samples are illustrative proposals, not existing implementation. Exact dependency and platform versions will be selected and pinned during implementation.
@rosetta/* packages free of client-specific code and assets.flowchart TD
Core["@rosetta/core: contracts, rules, compiler and validation"]
Profile["Consumer: brand profile, extensions and project policy"]
Resolved["Resolved manifest: versions, capabilities and provenance"]
Adapters["Platform adapters: native implementations and generators"]
Native["Native code, styles, controls and templates"]
Figma["Figma bridge: library synchronization and compliance"]
Catalog["Generated catalog: guidance, interactive examples, controls and support matrix"]
Core --> Resolved
Profile --> Resolved
Resolved --> Adapters
Adapters --> Native
Resolved --> Figma
Resolved --> Catalog
Adapters --> Catalog
Arrows represent build/data flow. Package dependencies point inward to core: core imports no CMS adapter, Figma API, React runtime, or client package. Adapters do not import one another. Shared adapter utilities can be extracted into neutral support packages when actual reuse warrants it.
Core contains the generic rule evaluator and declarative editor model. Platform and Figma adapters inspect their environments and normalize observations into core validation inputs. The framework does not require a network service at render time.
Proposed implementation layout:
docs/ # Vision, architecture, decisions and contributor guides
packages/
core/ # Shared configuration, guidance/examples, schemas, compiler, rules
static/ # Reference semantic HTML/Sass/TypeScript implementation
wordpress/ # Native WordPress adapter and distribution tooling
drupal/ # Native Drupal adapter and distribution tooling
aem/ # Native AEM adapter and distribution tooling
email/ # Email markup/style compiler and channel constraints
banners/ # Banner output and placement constraints
figma/ # Library synchronization, registry and compliance plugin
cli/ # Build, inspect, validate, generate and migration commands
apps/
catalog/ # Generated documentation UI and interactive preview host
fixtures/ # Neutral profiles, sample content and conformance cases
Use a TypeScript monorepo with workspace packages and a single lockfile. A workspace manager and build orchestrator will be selected in an implementation decision record; neither is part of the public component contract. Do not scaffold empty adapters merely to claim support.
| Package | Owns | Distribution and constraints |
|---|---|---|
@rosetta/core |
Declarative foundations, rules, components, templates, editor model, schemas/types, resolution/compiler interfaces, normalized validation | Node build tooling plus a browser-safe validation entry point; no platform runtime imports |
@rosetta/static |
Concrete semantic HTML, Sass and optional TypeScript behavior | Static-site build integration; no mandatory frontend framework |
@rosetta/wordpress |
Block render/edit implementations, control mappings, templates/patterns, assets | Node package plus installable plugin/theme integration artifacts |
@rosetta/drupal |
Native render/templates, content/editor mappings and libraries | Node package plus module/theme artifacts compatible with the selected Drupal version |
@rosetta/aem |
HTL, Java models where required, dialogs, templates/policies and client libraries | Node package plus Maven/content-package integration artifacts |
@rosetta/email |
Email templates, rendering, style resolution/inlining and compatibility constraints | Built HTML/assets and a build API; no assumed JavaScript execution |
@rosetta/banners |
Placement definitions, rendering, motion and asset packaging | Placement-specific HTML/assets or approved static exports |
@rosetta/figma |
Shared import/sync engine, platform/profile libraries, identity registry and validation command | Plugin bundle plus design manifests for each module |
@rosetta/cli |
Orchestration and actionable diagnostics | Executable Node tooling using core contracts |
Node modules are the development and distribution interface, not a claim that PHP, Java, or email runtimes can import npm modules. Native deployment artifacts must be independently installable through their target platform’s normal mechanisms.
Each design-bearing package exports a design manifest and an example contract derived from the shared core configuration and resolved capabilities. Adapters supply renderers and target-specific evidence, rather than independent documentation definitions. Infrastructure packages such as CLI expose their contracts and documentation without manufacturing a visual component library. Core and every platform adapter must be usable as a Figma library source through the shared Figma bridge.
Use YAML for human-authored definitions and JSON Schema for structural validation. Compile into a typed, normalized JSON intermediate representation (IR). Generate TypeScript types from the schema so authored configuration and tooling contracts cannot drift independently. YAML supports data only: no executable tags, evaluated expressions, or arbitrary embedded code.
The core model includes:
| Definition | Required content |
|---|---|
| Foundations/tokens | Typed primitive values, semantic aliases, component aliases, modes, responsive contexts and descriptions |
| Design rule | Stable ID, applicability, allowed values or generator, enforcement level, explanation, remediation and version |
| Component | Stable namespaced ID, content schema, properties/defaults, variants, states, slots, composition limits and accessibility contract |
| Template | Region structure, allowed components, cardinalities, required content, layout policy and authoring permissions |
| Editor model | Fields, tabs/groups, labels/help, control intent, conditional visibility, repeaters, validation and role restrictions |
| Capability record | Target, implementation/version, status, supported properties/states, limitations, fallbacks and evidence links |
| Example | Stable ID, neutral content, initial configuration, states, expected output, channel applicability and inline-control selection referencing component/editor properties |
| Documentation | Structured purpose, usage, limitations, design/content/accessibility guidance, authoring instructions, example references and implementation evidence links; source content for generated pages |
Generic reusable definitions, including documentation guidance and example configuration, live in core. Component implementations, documentation pages, property tables, and interactive control models consume the same resolved definitions. Reviewed prose is authored in this configuration and rendered by the documentation generator; generated pages are not independently edited or assembled from component README files. Adapter descriptors map them to native behavior and identify constraints; they must not silently invent new design semantics. A reusable platform-only feature first extends the generic core vocabulary, then receives a namespaced capability and implementation. Consumer extensions register their own definitions against the same schemas and remain outside @rosetta/*.
For example, a card definition declares title/body/action fields and permitted image placement. Its editor metadata describes a media picker, not an AEM-specific dialog widget. An adapter maps that intent to a native widget or reports it as unsupported. A runtime-dependent rule, such as whether a referenced asset exists, is declared generically and evaluated by the platform integration.
Template composition rules must be enforced in generated editors and at build/save validation boundaries where feasible. Hiding an invalid editor choice alone does not validate imported or previously saved content.
A consumer project might contain:
rosetta.config.ts # Select versions, targets and trusted extension modules
design/profile.yaml # Brand tokens and project policy
design/components/ # Consumer-specific component contracts
design/templates/ # Consumer-specific compositions
src/rosetta-adapters/ # Concrete implementations of consumer extensions
generated/rosetta/ # Regenerable, consumer-owned output
rosetta.config.ts is trusted build code; design YAML remains data. A client can publish private packages under its own namespace. Such packages may depend on Rosetta; Rosetta never depends on them.
Resolution proceeds in a documented order:
Merge objects by key, replace arrays as a whole, and treat omitted fields as inherited. null is invalid unless the field explicitly permits it; deletion uses a declared operation. Keyed collections use stable IDs. Duplicate IDs, unknown keys, unresolved aliases, cycles, missing implementations, ambiguous replacements, and incompatible versions fail the build.
Every resolved value records provenance: core default, consumer profile, project rule, context, and local selection. Diagnostics show both the effective value and the responsible input location.
Policies identify who can change a value: consumer configuration, template composition, author selection, or instance override. A consumer may change configurable design policy; an author can only select within the resolved project policy. Schema safety and adapter impossibilities cannot be overridden into validity. Brand changes also trigger contrast and other invariant checks.
The following proposed configuration demonstrates per-side padding abstraction. Token references use a proposed $token object form, resolved by the compiler.
schemaVersion: 1
profileId: neutral-example
tokens:
space.base:
type: dimension
value: { value: 8, unit: px }
rules:
padding:
base: { $token: space.base }
range:
minMultiplier: 0
increment: 0.5
maxMultiplier: 4
sides:
top: { maxMultiplier: 3 }
right: { minMultiplier: 1, increment: 1 }
bottom: { minMultiplier: 1 }
left: { minMultiplier: 1, increment: 1 }
defaults:
top: 1
right: 1
bottom: 1
left: 1
contexts:
compact:
base: { value: 4, unit: px }
For each side and context, merge the common range with side overrides, then explicit context range/side overrides. Require positive base and increment, nonnegative minimum, and maximum greater than or equal to minimum. Let a be the minimum, d the increment, and b the maximum:
N = (b - a) / d
allowed multipliers = { a + k*d | k is an integer, 0 <= k <= N }
padding value = base * selected multiplier
Require N to be an integer. Reject an off-grid maximum instead of silently rounding or appending an irregular endpoint. Use exact decimal/rational arithmetic during generation, with canonical serialization; do not accumulate binary floating-point errors. Reject scales above a configurable generation limit (proposed default: 64 entries per side/context). Every default must be in its effective allowed set.
The example yields top multipliers 0, 0.5, …, 3, right/left 1, 2, 3, 4, and bottom 1, 1.5, …, 4. The compact context retains those multipliers and changes their physical values. These sets drive editor choices, token values, Figma numeric variables, documentation tables and interactive control options, styling, and compliance checks.
Serialized content stores a canonical multiplier or stable scale entry ID, not a human label or array index. An off-grid value is invalid even if it is numerically within the bounds. If an updated profile removes a saved choice, validation reports migration work instead of clamping the value.
Physical top/right/bottom/left is supported directly. Profiles may opt into logical block/inline sides for writing-direction support; the same property cannot mix physical and logical declarations. Adapters map logical values to their target and declare any limitations. Canonical dimension units and explicit Figma conversion contexts are required: a rem value needs a known root-size assumption before a pixel comparison can be trusted. Unknown context produces an uncheckable result.
This is the initial generator pattern, not a requirement to express every property as a numeric scale. Colors use semantic roles and allowed bindings; composition uses cardinality and slot constraints; motion uses duration/easing policies. Use typed generators appropriate to each domain.
The build pipeline is:
YAML + core definitions + consumer extensions + pinned adapter descriptors
-> schema validation and reference resolution
-> policy merge, scale expansion and invariant validation
-> resolved manifest with capability intersection and provenance
-> platform code/assets + editor schemas + design manifests + docs/examples/inline controls
-> native and cross-artifact verification
-> versioned release artifacts
The resolved manifest includes schema/core/adapter/profile versions, supported targets, normalized definitions, selected values, expanded scales, rule IDs, token aliases, source provenance, extension IDs, compatibility requirements, and a deterministic content hash. Output records the generator version and input hash. Equal inputs and toolchains should produce equal output without timestamps embedded in generated content.
Proposed TypeScript boundary:
type Support = 'supported' | 'constrained' | 'unsupported' | 'planned';
interface PlatformAdapter {
readonly id: string;
readonly version: string;
readonly compatibleCore: string;
describeCapabilities(): CapabilityManifest;
validate(input: ResolvedManifest): Diagnostic[];
generate(input: ResolvedManifest): Promise<ArtifactSet>;
examples(input: ResolvedManifest): ExampleManifest;
design(input: ResolvedManifest): DesignManifest;
}
Referenced types will be defined in core. Artifact sets include safe relative paths, content hashes, native dependency requirements, and regeneration ownership. Generators must not overwrite files outside declared output roots. Dry-run/diff output is required before replacing existing generated artifacts.
Adapters combine deterministic generation with maintained native source. Schemas can generate repetitive control definitions and style maps; complex interactions, lifecycle integration, and accessibility behavior require explicit implementation. Generated code imports maintained implementation code through stable entry points. Consumers extend through registered contracts, templates, and implementations rather than editing generated files.
The capability matrix is evaluated at component/property/state/editor-feature level, not only package level. Record reasons and alternatives for constraints. Separate support status from maturity (experimental, stable, deprecated) and implementation presence. A planned or unsupported feature cannot satisfy a production build. A constrained feature builds only when its limitations are met or an explicit, documented fallback is selected. Never silently drop a field or substitute a different interaction.
| Target | Concrete approach | Validation boundary |
|---|---|---|
| WordPress | Generic component schema maps to block metadata, TypeScript editor code, PHP rendering where needed, patterns/templates and styles | Native editor registration, serialization/save round trips, server rendering and frontend behavior |
| Drupal | Generic fields map to version-specific content/editor integration, Twig/render structures and asset libraries; choose the component/paragraph/block integration during the pilot | Installation/configuration, permissions, content persistence, rendering and cache behavior |
| AEM | Generic editor schema maps to dialogs and policies; content maps to HTL and Java models as needed; styles/scripts become client libraries | Package installation, dialogs, saved content, model/render behavior and template policies |
| Static | Semantic HTML/template functions, Sass and optional TypeScript interactions | Built output, browser behavior, accessibility and integration into a consumer build |
| Constrained content/templates become table or other approved email markup; resolve tokens and inline supported styles | Selected email-client matrix, dark mode, links, images and fallbacks | |
| Banners | Placement schema maps to dimensions, packaged assets, motion and click behavior | Size budgets, runtime/network constraints, reduced motion and selected placement specifications |
WordPress’s official documentation recommends block.json as canonical registration metadata. Rosetta generates that target artifact from its broader platform-neutral model; it is not the cross-platform source of truth. See WordPress block metadata.
For capable web targets, all configurable presentation values receive CSS custom properties with usable defaults, including dimensions, typography, spacing, colors, borders, shadows, motion, and state-specific values. Structural rules such as selectors and layout algorithms are implementation code. Media query boundaries and other syntax that cannot consume runtime variables are generated from profile configuration; changing them requires a rebuild.
For example, authored Sass compiles to declarations following this pattern:
.rosetta-button {
color: var(--rosetta-button-text, var(--rosetta-color-on-action, #fff));
background-color: var(--rosetta-button-fill, var(--rosetta-color-action, #1649b8));
padding-top: var(--rosetta-button-padding-top, var(--rosetta-space-1, 8px));
border-radius: var(--rosetta-button-radius, var(--rosetta-radius-control, 4px));
}
Numbers/colors here are neutral illustrative defaults. The full implementation must cover all supported properties and states. Prefer fallback chains at use sites so locally defined component defaults do not mask inherited consumer overrides. Consumers scope semantic variables to a profile root, allowing multiple brands on a page where the integration supports it. Document cascade order and avoid default !important rules.
Sass supplies mixins, structure, and compilation helpers; public theme values remain runtime variables. Static selectors/classes reference approved generated scale entries. Arbitrary CSS changes may remain technically possible but require policy validation. For email and constrained ad environments, the same profile is compiled into supported literal values; runtime variable support is never assumed.
An npm installation does not itself install a Figma library or add a menu action. Rosetta will provide these through @rosetta/figma:
Figma requires publication before shared library assets can be consumed across files; see Figma’s library guide and publication workflow. Account permissions and current plan capabilities must be verified during the initial spike. Do not assume unattended library publication through the plugin.
Avoid a Cartesian product of every side’s spacing, viewport, brand, and component state as Figma variants. Represent scales with variables and supported property controls; use variants for meaningful structural/state differences. Where Figma cannot constrain a numeric property, the validator enforces its allowed set. Responsive behavior is represented with documented contexts and reference frames, not claimed as a complete browser simulation.
Changes flow from reviewed definitions/profile to generated assets. Design exploration is encouraged, but an unreviewed Figma edit does not silently rewrite core contracts. Adoption requires a definition change and regenerated artifacts. Sync should produce a diff, preserve existing component identities, and flag destructive replacements for migration.
Distribute one shared plugin command named Validate Rosetta Compliance, declared in the plugin manifest. It loads the module/profile manifest selected for the current design. Library import alone cannot add this action; plugin installation/distribution is a separate setup step. Figma supports plugin command menus and dynamic page access through its plugin manifest.
Default action: scan the current page, including its framework descendants. Offer selected-frame and full-file scope. A full-file scan must load/traverse the relevant pages explicitly, show progress, support cancellation, and report unloaded or inaccessible content. The report names the scope; a partial scan cannot be presented as full-design compliance.
Validation sequence:
Examples:
| Finding | Evidence and behavior |
|---|---|
| Unsupported padding override | A registered card uses a multiplier outside the effective side/context scale; show allowed values and source policy |
| Primary button color is not an approved design token | Required semantic binding is absent or points to the wrong role; matching hex values alone do not satisfy token binding policy |
| Content card is detached from framework component | Tagged expected card is a frame without a valid registered component connection; report a connection failure and recovery guidance |
| Unsupported platform state | A web-only interaction appears in an email-target design; show target capability and any approved alternative |
| Unknown component provenance | Untagged content appears in a required framework region; report unverified content, without asserting its history |
Use component keys and resolved variable/style identity rather than display names. Alias resolution must check semantic role, active mode and permitted override policy. Figma provides instance connection and override APIs, including getMainComponentAsync; see InstanceNode.
Detachment detection is necessarily bounded. A retained Rosetta tag plus a missing connection is strong evidence of invalid connection, but metadata can be removed or copied. A manually recreated, untagged card cannot reliably be proven to be a detached instance. Check expected composition and report unrecognized content; any visual similarity heuristic is advisory. Do not claim complete historical detachment detection.
Inspection should be read-only. Suggested fixes may be previewed and applied explicitly with undo support; a scan must not rewrite a design. Use locally bundled manifests or approved authenticated registry endpoints, cache versioned data for offline use, and report stale manifest use. Do not upload design content for validation by default.
Proposed scoring policy, versioned with the rules:
score = 100 * passed weight / (passed weight + failed weight), rounded to one decimal.coverage = evaluated applicable weight / total known applicable weight. Unknown/uncheckable applicable checks remain in this denominator. Also show the count of unrecognized nodes/regions, which cannot be assigned a reliable check weight.not evaluated, not 100%. A scan with unknown applicability cannot claim complete coverage.Approved exceptions retain the underlying finding and its failed weight in the raw score. Report a separate disposition for workflow gates, with owner, reason, exact scope, approval reference, and expiry. Unknown checks cannot be waived into a technical pass. Scores are comparable only for the same rule/profile/target/scope; they are not security, accessibility, or regulatory certifications.
The catalog is generated from configuration in @rosetta/core, using the same resolved manifest as component generation. Consumer profiles and registered extensions apply through the normal resolution process; adapter descriptors supply platform capabilities, implementation mappings, and evidence. The catalog application provides page templates and preview infrastructure. It must not maintain a second set of component properties, defaults, allowed values, example configurations, or usage guidance.
Generate complete component/template pages, including reviewed guidance stored in the core configuration. Editorial review remains necessary at the source-definition level. Consumer-specific guidance belongs in the consumer’s registered definitions. Every page must show:
Generate inline controls from the resolved property and editor metadata: labels, help text, types, defaults, enumerated choices, expanded numeric scales, conditional visibility, and validation rules. Example definitions select which properties to expose by stable ID and set initial values without redefining their rules. Controls must respect the selected profile, target, and context. Unsupported choices are disabled or omitted with an explanation; planned capability is clearly labeled and cannot appear as a working implementation.
Changing an inline control updates the live preview and displayed example configuration or usage snippet. Provide a reset to the resolved example defaults. A spacing-policy change in core or a consumer profile must regenerate the documented range, control options, preview inputs, and component output together. Preview changes are local exploration and do not modify the source configuration or client profile. Controls must have accessible labels and keyboard operation.
Use Storybook as the proposed web component workbench, with its stories and control metadata generated from these same definitions. Adapters map configured examples to actual implementations and supply target-rendered fixtures and test evidence. Handwritten renderer code may be needed for complex behavior, but must not duplicate the configuration that defines documentation and control choices.
Provide role-based views: design rules and feasible compositions; authoring tasks and controls; project/accounts capability and gap discovery; engineering APIs and integration. Filter the catalog by adapter, release, profile and support status.
A browser preview does not establish native CMS authoring support. Label whether an example uses the actual target renderer, a reference renderer, or a pre-rendered fixture. Run native editor/render integration tests separately. Email and banner examples may offer inline configuration controls that select or regenerate previews, while channel limitations and test evidence remain visible. Do not imply that browser interaction proves email-client or placement support.
Publish the catalog as a versioned static web application with browser-side interactive controls. Pre-rendered fixtures can support targets whose runtimes are unavailable in the browser; do not require all platform runtimes or CMS credentials for everyday browsing. Storybook remains a proposed workbench; Material UI provides inspiration for the documentation experience.
| Layer | Required evidence |
|---|---|
| Core | Schema/reference failures; deterministic resolution; override provenance; exact decimal scales; boundary/off-grid/default rejection; capability intersection |
| Generator | Reproducible outputs; safe output paths; generated types and schemas agree; stale output detection; native artifact syntax/build validity |
| Adapter | Contract conformance; explicit unsupported behavior; native installation, authoring/persistence/rendering; sanitization and permission boundaries |
| Components/templates | Semantic markup, keyboard/focus behavior, supported states, content extremes, localization/writing direction, responsive behavior and visual regression |
| Profile/theming | Two distinct neutral profiles; defaults and overrides; scoped coexistence; contrast and token binding checks; variable coverage of configurable presentation |
| Figma | Idempotent sync; identity preservation; seeded illegal padding/color/connection/target cases; missing metadata and inaccessible content; honest score/coverage |
| Email/banners | Selected client/placement matrix, literal style output, assets, link/click behavior, size and motion constraints |
| Catalog/release | Generated guidance/tables/control metadata match resolved definitions; inline-control changes update previews and snippets; reset, conditional choices, keyboard access, capability labels, links, manifest hashes and coordinated versions |
Accessibility expectations are part of core contracts and native acceptance. Proposed baseline is WCAG 2.2 AA for applicable web output, subject to agency agreement and channel-specific applicability. Automated checks must be complemented by keyboard and assistive technology review; Figma checks cannot prove runtime accessibility. The normative standard is WCAG 2.2.
The first vertical-slice acceptance scenario changes a core spacing rule and then the base unit and a side’s increment in a neutral profile, regenerates all artifacts, and verifies matching choices in the native editor, Figma, generated documentation tables, inline controls, and rendered output. Exercise an inline control and verify that its preview and usage snippet reflect the selected value; resetting must restore the resolved defaults. No separate documentation or story edit should be needed. An off-grid design value must fail, an allowed override must pass, and a capability unsupported by the selected target must fail without silent fallback. Repeat with a second profile to expose client assumptions.
Use semantic versions and explicit compatibility ranges for core schemas, adapters, plugin manifests, and consumers. Start with a coordinated release train for the pilot; adapters declare compatible core versions even if early package versions move together. A consumer lockfile pins the actual dependency graph. Release manifests bind package versions, schema version, profile hash, generator version, Figma registry mapping, and catalog build.
Changes that remove allowed values, alter defaults with visible effect, change serialized data, or remove template slots require migration assessment. A small code diff can be a breaking design/content change. Publish migration guidance and tools for saved content, profile definitions and design instances. Deprecate before removal where feasible; keep legacy render paths while content migration is pending. Never rewrite saved client content automatically during an install.
Proposed CI sequence:
The future internal Kubernetes service serves static files behind agency access controls. It needs no CMS credentials at runtime. CI owns build and promotion; infrastructure ownership, namespace, ingress/auth, registry, retention, and rollback procedures remain decisions. Use immutable version URLs plus an optional stable alias, with rollback to a previous image and manifest. Code, catalog and Figma publication are not an atomic transaction: retain prior releases and expose mismatches rather than advertising compatibility prematurely.
Keep public-neutral framework docs separate from consumer-branded catalogs and fixtures. Scan package/archive contents for client assets, identifiers and secrets before publication. Native adapters enforce output escaping, rich-text sanitization and author permissions; configuration is never a reason to bypass those controls.
Reference root: ~/Work/Novo Nordisk/github/nni-hcp. The following files were inspected read-only on November 30, 2026. This is a targeted architectural sample, not an exhaustive component audit or proof of current production behavior.
| Observed evidence, relative to reference root | Rosetta implication |
|---|---|
README.md, package.json |
AEM implementation uses HTL, TypeScript, Sass, Java/Maven and Webpack; custom JSX is described as DOM creation without React-style VDOM updates. Do not infer React semantics from .tsx alone. |
docs/content-non-public/adr/2021/css-properties.md |
Existing decision documents overridable colors with default visual behavior and constrained branding scope. Generalize the override API and scope contract. |
docs/content/authoring/advanced-topics/brand-css.md |
Documented custom properties cover buttons, cards, tabs, accordion and typography. Generate such references from token/property contracts. |
aem/nni-hcp-ui/jcr_root/apps/nni-hcp/components/display/button/v1/button/clientlibs/src/button.scss |
Button implementation exposes color variables but also contains fixed dimensions and brand color imports. Reuse the pattern, replacing client defaults and making all configurable presentation values explicit. |
aem/nni-hcp-ui/jcr_root/apps/nni-hcp/components/config/layout.md, margin-values.md |
Shared controls and gutter multipliers demonstrate reusable authoring policy; replace manually enumerated lists and fixed responsive ratios with generated ranges/context rules. |
docs/content/design/grid.md |
Documents a 12-column grid and three viewport references. Treat these as baseline choices, not universal core constants. |
aem/nni-hcp-ui/jcr_root/apps/nni-hcp/components/display/button/v1/button/README.md, _cq_dialog.xml |
Component docs describe release/platform status and author controls; dialogs reuse shared configuration includes. Generate documentation, examples and inline-control metadata from the shared core configuration used for components; do not preserve separate component README pages as the documentation source. |
aem/nni-hcp-ui/jcr_root/apps/nni-hcp/components/layout/container/v1/container/README.md |
Explicitly retains a deprecated component for older authored content. Plan component/content migrations and legacy compatibility. |
aem/nni-hcp-core/src/main/java/com/nnihcp/components/layout/Spacer.java |
Accepts a freeform height string with a default and unit normalization. Rosetta needs declared policy and validation rather than treating arbitrary spacing as compliant. |
docs/gather-docs.sh, README.md |
Co-located Markdown is gathered into a Docker-built MkDocs site. Retain audience guidance as structured core configuration and generate complete pages, examples and inline controls from the same resolved definitions as components, replacing the gathered-Markdown approach. |
docs/content/overview/site-elements.md; source inventory under component display/layout/page directories |
Includes resource cards/libraries, content/resource pages, navigation, filters, media, tabs and accordion, alongside healthcare-specific modules. Use an inventory to separate reusable patterns from client business behavior. |
Proposed extraction mapping:
| Baseline family | Neutral Rosetta concept | Consumer responsibility |
|---|---|---|
| Button, text, image, separator | Action/link, text, media, divider | Brand typography/assets/content and approved overrides |
| Container, grid, spacing | Layout primitives and policy generators | Project layout profile and exceptions |
| Accordion, tabs, filter | Disclosure, tabbed content, collection filtering | Data source, labels and business filtering logic |
| Resource card/listing and resource pages | Content card, collection, detail template | Resource models, fulfillment and data integrations |
| Content-page/slab patterns | Page regions and reusable compositions, subject to detailed audit | Client navigation, legal content and specialized sections |
| Dosing, savings, indications and other healthcare features | No direct core inclusion; evaluate only generic subpatterns | Domain rules, integrations, approvals and content |
Before any code extraction, inventory actual usage, behavior, authoring fields, dependencies, rights to reuse, accessibility gaps, and migration needs. Reimplement a neutral vertical slice with tests; do not import the reference repository as a runtime dependency or copy its branded values into framework defaults.
| Topic | Proposed position / required next evidence |
|---|---|
| First targets | Static reference plus Figma, then an AEM pilot based on available source; confirm against agency demand |
| Schema expressiveness | Start with typed rules, fields, slots and a bounded generator registry; prove real components before adding a general expression language |
| Abstraction complexity | Limit generated ranges and meaningful variants; measure editor/library size and build performance on the pilot |
| Figma feasibility | Verify shared library permissions, identity-preserving sync, cross-file variable binding and scan performance; explicitly test lost provenance |
| Native support | Select exact CMS versions and Drupal integration strategy; do not equate generated preview HTML with supported native authoring |
| Client separation | Test at least two neutral profiles and inspect artifacts for leaked branding; consumers own business extensions |
| Runtime customization | Document public variables and compile-time boundaries; validate policy in addition to allowing technical overrides |
| Generated documentation | Prove that a core/profile change updates pages, inline choices and live previews without separate documentation edits; confirm preview strategy for each target |
| Maintenance capacity | Assign core, adapter, design and authoring owners; fund migrations and catalog upkeep as continuing work |
| Internal distribution | Confirm registry, licensing, access policy and Kubernetes operations before broad publication |
The first implementation decision records should settle schema/versioning conventions, profile resolution, adapter contracts, Figma publication/identity, and the pilot target. This architecture should be revised against vertical-slice evidence before expanding the catalog or promising all-platform parity.