Skip to content

docs(testing): define Storybook proof ownership architecture - #173

Draft
Vyachean wants to merge 4 commits into
developfrom
docs/storybook-proof-architecture
Draft

docs(testing): define Storybook proof ownership architecture#173
Vyachean wants to merge 4 commits into
developfrom
docs/storybook-proof-architecture

Conversation

@Vyachean

@Vyachean Vyachean commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Goal

Define one mechanical Storybook and UI-proof ownership model for coding agents, aligned with the current develop branch and the canonical Material Vue library under src/shared/ui/material.

This PR replaces the obsolete draft #170. It defines architecture only; test discovery and test migration will be implemented in separate independently safe PRs.

Architecture decision

  • Storybook is an isolated rendering, fixture, and visual-evidence surface, not an FSD layer or product-behavior owner.
  • The current UI owner owns its stories and owner-specific browser/visual proof.
  • In the Material library, the Material family is the owner.
  • Outside Material, the truthful FSD component or cohesive local UI module is the owner.
  • Complete cross-owner product scenarios remain centralized in tests/e2e.
  • Storybook behavior and visual regression remain independent Playwright lanes.
  • Browser proof contains no screenshots; visual proof contains no behavioral success criteria.
  • Visual specs remain explicit and colocated; no generated generic story runner is introduced.
  • Local naming conventions own ordinary relations; explicit mappings remain for family/module relations that cannot be expressed by one sibling stem and for cross-cutting infrastructure.

The target contract is introduced in docs/testing/storybook.md.

Scope

This PR will contain only:

  • the project-wide Storybook ownership contract;
  • alignment of docs/testing/architecture.md and docs/testing/migration-plan.md;
  • concise repository and scoped agent rules;
  • alignment of relevant testing skills;
  • a safe migration sequence and pilot selection.

Non-goals

  • no Playwright discovery changes;
  • no resolver implementation changes;
  • no movement of existing browser specs;
  • no movement of visual specs or snapshots;
  • no correction of existing mixed proof ownership;
  • no Storybook title or story-ID normalization;
  • no product behavior or public UI API changes;
  • no duplication of the Material family workflow;
  • no restoration of deleted docs/material-3/storybook.md.

Ownership model

Material

src/shared/ui/material/components/<family>/
├── *.vue
├── *.test.ts
├── *.stories.ts
├── <Family>.browser.spec.ts       # optional
├── <Family>.visual.spec.ts        # optional
└── local fixtures                # rare

Other UI

src/<layer>/<slice>/ui/
├── <Owner>.vue
├── <Owner>.test.ts
├── <Owner>.stories.ts
├── <Owner>.browser.spec.ts        # optional
├── <Owner>.visual.spec.ts         # optional
└── local fixtures                # rare

Product scenarios

tests/e2e/

Planned migration PRs

  1. colocated browser discovery pilot using Loading Indicator;
  2. remaining Storybook browser-spec migration;
  3. colocated visual discovery and snapshot-ownership pilot;
  4. remaining visual-spec and baseline migration;
  5. proof-ownership cleanup after resolver stability;
  6. Storybook catalogue normalization.

Each PR must preserve current commands, broad fail-closed fallback, and regression protection before removing legacy ownership.

Acceptance criteria

  • the architecture names one truthful owner for stories, browser proof, visual proof, and product scenarios;
  • Material family ownership is consistent with src/shared/ui/material rules and architecture;
  • ordinary component, family, foundation, and module ownership are all defined;
  • local and explicitly mapped relations are deterministic rather than inferred by agents;
  • baseline ownership and add/modify/delete/rename fallback are specified;
  • testing architecture and migration policy do not conflict with the new contract;
  • agent rules and testing skills route to the same ownership model;
  • implementation and mass migration remain outside this PR;
  • version is bumped from 0.2.14 to 0.2.15 without dependency changes;
  • PR remains draft until the complete documentation/rules diff is reviewed and the current head passes required verification.

Current state

  • created from current develop after Material library merge;
  • added initial docs/testing/storybook.md;
  • bumped version to 0.2.15 while preserving dependencies;
  • align canonical testing architecture;
  • align migration plan;
  • align AGENTS and testing skills;
  • complete architecture review;
  • run current-head verification.

TEST IMPACT

Changed contracts:

  • repository authoring rules for Storybook stories and UI-owned browser/visual proof;
  • future ownership and migration sequence for Storybook Playwright specs and snapshots.

Risks:

  • conflict with existing testing policy or Material family workflow;
  • ambiguous family/module ownership;
  • future resolver design being underspecified for rename/delete and snapshots;
  • agents interpreting target architecture as already implemented.

Proof owners:

  • documentation consistency review;
  • instruction compatibility checks after rule/skill updates;
  • repository verification selected for the final documentation/rules diff.

Repository impact metadata updates:

  • none in this architecture-only PR; resolver metadata changes belong to later implementation PRs.

Task-specific measurements:

  • none.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Preview deployment

This comment is updated automatically on every push to this PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant