Skip to content

Design-system coupling: scope AIO coverage to the contexts a UI step targets #60

Closed as not planned

Description

@Hafeok

Problem

product design-system couple (and couple_ds in product-core/src/pf/manifest.rs) checks every AIO referenced by any UI step against every context of use the What declares. That is stricter than the model it checks:

  • A product with a phone app and a car-display app (Android Auto) declares form_factor: car-display. The car screens use four AIOs (map-browse, display-value, display-collection, trigger-action). The check demands reify rules on the car display for all sixteen AIOs the phone screens use — card entry, camera scan, time picker, … — none of which any car-display step surfaces or offers. Ten "non-conforming" findings that describe nothing real.
  • A context declared for a platform whose code hasn't been read yet (platform: iOS) fails for every AIO, which is correct, but is indistinguishable in the output from the previous case.

Proposal

Scope coupling to the contexts a step actually targets:

  1. Let a UI step (or an application root / system) declare target_contexts (the §3.2.2 target_platforms / target_classes fields already exist on the schema — use those, or a contexts list), defaulting to all declared contexts when absent.
  2. couple checks each AIO only against the contexts of the steps that use it: for step in steps: for ctx in step.contexts: for aio in step.aios: require reify(aio, ctx).
  3. Report findings grouped by context, and mark contexts with zero rules separately ("no design system covers context X") from partial coverage.

Acceptance

  • A car-display step using only aio-map-browse on a manifest with a car rule for it couples cleanly, while a phone step using aio-edit without a phone rule still fails.
  • A context with no rules at all is reported once, not once per AIO.

Activity

  1. Hafeok commented on Nov 3, 2026

    @Hafeok
    CollaboratorAuthor

    Closed as not carried under D1.24`` and the definition's chapter 8:``` the Rust tool is frozen at rust-final and its tree left `main` in #166 (`53bd547`). This concerns design systems and the How, which chapter 8 puts outside the rewrite: it carries the What alone. A system's design system is declared in the What as an `sdlc:DeclaredTarget`; its catalogue is a package and its binding is Writ's. Disposition approved on #165.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Effort

    None yet

    Progress

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions