DEC-AIC-0063: Adopt typed component taxonomy (feature, smart, composite, shell, UI atoms and molecules) with explicit type suffixes for vault-view
Draft
Status: draft · 2026-12-02
Context
DEC-AIC-0062 established layered boundaries (data-access, ui, feat-*, util) and three presentational UI component types (primitives, composites, layout shells) for the Angular vault view. During the decomposition of feat-graph, feat-plans, and feat-climb (observed: repository @ 2026-12-02), two naming and structural gaps emerged:
- Stateful sub-components inside feature libraries (such as the graph canvas, filters, detail panel, focus reader, passage editor, and climb draw/sketch tabs) inject
data-accessstores directly while route-level pages coordinate the route. Calling both "feature components" blurred the boundary between route entry points, stateful interactive slices, and pureinput()/output()domain views. - Generic
*.component.tsfilenames made it impossible to tell from a file path or class name whether a component is an indivisible UI atom, a reusable UI molecule, a layout shell, a pure domain composite, a stateful smart component, or a route-level feature container.
Decision
- Adopt a six-role component taxonomy with role directories, standard
*.component.{ts,html,css}filenames, and explicit class/selector suffixes acrossscope:vault-view:- Feature (
src/lib/<domain>.component.ts/*FeatureComponent/vault-*-feature): Route-level entry containers directly inlibs/vault-view/feat-*/src/lib/that provide feature-scoped stores, coordinate route shortcuts/layout, and are the sole public export of eachfeat-*library'ssrc/index.ts. - Smart (
smart/<name>/*.component.ts/*SmartComponent/vault-*-smart): Private stateful components inlibs/vault-view/feat-*/src/lib/smart/<name>/that injectdata-accessstores/facades (or diagram/editor services) to own a cohesive interactive slice without polluting presentational views. - Composite (
composite/<name>/*.component.ts/*CompositeComponent): Pureinput()/output()-driven domain-shaped presentational views inlibs/vault-view/feat-*/src/lib/composite/<name>/(such as detail panels, goal trees, timelines, and reveal comparisons) with zerodata-accessstore injection. - Shell (
shell/<name>/*.component.ts/*ShellComponent): Structural layout and chrome frames inlibs/vault-view/ui/src/lib/shell/composing UI components and<ng-content>slots with zerodata-accessimports. - UI Atoms (
atoms/<name>/*.component.ts/*AtomComponent): Indivisible design-system primitives inlibs/vault-view/ui/src/lib/atoms/(Button,Eyebrow,GlassCard,ResultPanel,SectionCard,StatusPill,Tag) with zerodata-accessimports. - UI Molecules (
molecules/<name>/*.component.ts/*MoleculeComponent): Small reusable UI widgets inlibs/vault-view/ui/src/lib/molecules/composed from atoms (DetailDrawer,MetricTiles,NoteLinks,Pager,SegmentedGroup,Stepper) with zerodata-accessimports.
- Feature (
- Preserve one-component-per-directory and private feature internals: Every component lives in its own directory alongside its sibling
.html/.cssfiles. Feature libraries export only their*FeatureComponentfromsrc/index.ts. - Promote
OnPushlint rule to'error': Since all components acrossapps/vault-viewandlibs/vault-view/*now setChangeDetectionStrategy.OnPush, promote@angular-eslint/prefer-on-push-component-change-detectionfrom'warn'to'error'ineslint.config.mjs.
Consequences
- Contributors and AI agents can immediately determine a component's dependency rules and state ownership from its directory, file suffix, and class name.
libs/vault-view/uiseparates indivisibleatoms/, composedmolecules/, and layoutshell/frames cleanly while keeping all exports accessible through@ai-coach/vault-view-ui.- Missing
ChangeDetectionStrategy.OnPushon any new or editedvault-viewcomponent now failsnx lintimmediately.
Alternatives Considered
- Keeping uniform
*.component.tssuffixes: Rejected because file trees and imports hid whether a component injected stores or remained purely presentational. - Creating a separate Nx library for smart components: Rejected as premature fragmentation; keeping smart components private inside their owning
feat-*library preserves cohesive feature boundaries and lazy-loading chunks while making their role explicit.