@teamix-evo/registry 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -223,13 +223,27 @@ declare const SkillEntrySchema: z.ZodObject<{
223
223
  * coding-conventions, baseline design-rules) leave it unset.
224
224
  *
225
225
  * When present, the CLI installs this skill ONLY if the consumer's
226
- * `.teamix-evo/design/pack.lock.json` records the same variant. MUST equal
227
- * the variant directory name in `@teamix-evo/design/variants/<name>/`.
226
+ * `.teamix-evo/tokens-lock.json` records the same variant. MUST equal
227
+ * the variant directory name in `@teamix-evo/tokens/variants/<name>/`.
228
228
  *
229
229
  * Mirrors `UiEntrySchema.variant` semantics in @teamix-evo/biz-ui &
230
230
  * @teamix-evo/templates per ADR 0014.
231
231
  */
232
232
  variant: z.ZodOptional<z.ZodString>;
233
+ /**
234
+ * Default install scope for this skill. Per ADR 0033.
235
+ *
236
+ * - `"global"` — entry skill (lifecycle / orchestrator). `skills add` in
237
+ * project scope SKIPS these unless explicitly named on the
238
+ * command line (then installs with a warning). Recommended
239
+ * to install once via `skills add <id> --scope global`.
240
+ * - `"project"` — variant content skill (default when omitted). Installed
241
+ * with the project that uses it.
242
+ *
243
+ * `undefined` is treated as `"project"` — old manifests without this field
244
+ * still validate.
245
+ */
246
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
233
247
  }, "strip", z.ZodTypeAny, {
234
248
  id: string;
235
249
  source: string;
@@ -240,6 +254,7 @@ declare const SkillEntrySchema: z.ZodObject<{
240
254
  name: string;
241
255
  template?: boolean | undefined;
242
256
  managedRegions?: string[] | undefined;
257
+ scope?: "project" | "global" | undefined;
243
258
  variant?: string | undefined;
244
259
  }, {
245
260
  id: string;
@@ -251,6 +266,7 @@ declare const SkillEntrySchema: z.ZodObject<{
251
266
  template?: boolean | undefined;
252
267
  managedRegions?: string[] | undefined;
253
268
  ides?: ("qoder" | "claude")[] | undefined;
269
+ scope?: "project" | "global" | undefined;
254
270
  variant?: string | undefined;
255
271
  }>;
256
272
  /**
@@ -299,13 +315,27 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
299
315
  * coding-conventions, baseline design-rules) leave it unset.
300
316
  *
301
317
  * When present, the CLI installs this skill ONLY if the consumer's
302
- * `.teamix-evo/design/pack.lock.json` records the same variant. MUST equal
303
- * the variant directory name in `@teamix-evo/design/variants/<name>/`.
318
+ * `.teamix-evo/tokens-lock.json` records the same variant. MUST equal
319
+ * the variant directory name in `@teamix-evo/tokens/variants/<name>/`.
304
320
  *
305
321
  * Mirrors `UiEntrySchema.variant` semantics in @teamix-evo/biz-ui &
306
322
  * @teamix-evo/templates per ADR 0014.
307
323
  */
308
324
  variant: z.ZodOptional<z.ZodString>;
325
+ /**
326
+ * Default install scope for this skill. Per ADR 0033.
327
+ *
328
+ * - `"global"` — entry skill (lifecycle / orchestrator). `skills add` in
329
+ * project scope SKIPS these unless explicitly named on the
330
+ * command line (then installs with a warning). Recommended
331
+ * to install once via `skills add <id> --scope global`.
332
+ * - `"project"` — variant content skill (default when omitted). Installed
333
+ * with the project that uses it.
334
+ *
335
+ * `undefined` is treated as `"project"` — old manifests without this field
336
+ * still validate.
337
+ */
338
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
309
339
  }, "strip", z.ZodTypeAny, {
310
340
  id: string;
311
341
  source: string;
@@ -316,6 +346,7 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
316
346
  name: string;
317
347
  template?: boolean | undefined;
318
348
  managedRegions?: string[] | undefined;
349
+ scope?: "project" | "global" | undefined;
319
350
  variant?: string | undefined;
320
351
  }, {
321
352
  id: string;
@@ -327,6 +358,7 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
327
358
  template?: boolean | undefined;
328
359
  managedRegions?: string[] | undefined;
329
360
  ides?: ("qoder" | "claude")[] | undefined;
361
+ scope?: "project" | "global" | undefined;
330
362
  variant?: string | undefined;
331
363
  }>, "many">;
332
364
  }, "strip", z.ZodTypeAny, {
@@ -346,6 +378,7 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
346
378
  name: string;
347
379
  template?: boolean | undefined;
348
380
  managedRegions?: string[] | undefined;
381
+ scope?: "project" | "global" | undefined;
349
382
  variant?: string | undefined;
350
383
  }[];
351
384
  $schema?: string | undefined;
@@ -366,6 +399,7 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
366
399
  template?: boolean | undefined;
367
400
  managedRegions?: string[] | undefined;
368
401
  ides?: ("qoder" | "claude")[] | undefined;
402
+ scope?: "project" | "global" | undefined;
369
403
  variant?: string | undefined;
370
404
  }[];
371
405
  $schema?: string | undefined;
@@ -443,8 +477,8 @@ declare const UiEntrySchema: z.ZodObject<{
443
477
  }>, "many">;
444
478
  /**
445
479
  * Optional path to an AI-readable meta document (frontmatter + Markdown).
446
- * When set, CLI install drops it at `.teamix-evo/design/components/<id>.meta.md`
447
- * for design's ai-rules to consume.
480
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
481
+ * copy is written (per ADR 0020 §3).
448
482
  */
449
483
  meta: z.ZodOptional<z.ZodString>;
450
484
  /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
@@ -543,7 +577,7 @@ declare const UiPackageManifestSchema: z.ZodObject<{
543
577
  }, {
544
578
  'teamix-evo': string;
545
579
  }>;
546
- /** Flat list of entries shipped by this package */
580
+ /** Active list of entries shipped (and exposed) by this package. */
547
581
  entries: z.ZodArray<z.ZodObject<{
548
582
  /** Unique entry identifier within the ui package (e.g. "button") */
549
583
  id: z.ZodString;
@@ -572,8 +606,8 @@ declare const UiPackageManifestSchema: z.ZodObject<{
572
606
  }>, "many">;
573
607
  /**
574
608
  * Optional path to an AI-readable meta document (frontmatter + Markdown).
575
- * When set, CLI install drops it at `.teamix-evo/design/components/<id>.meta.md`
576
- * for design's ai-rules to consume.
609
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
610
+ * copy is written (per ADR 0020 §3).
577
611
  */
578
612
  meta: z.ZodOptional<z.ZodString>;
579
613
  /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
@@ -652,6 +686,123 @@ declare const UiPackageManifestSchema: z.ZodObject<{
652
686
  deprecatedReason?: string | undefined;
653
687
  replacedBy?: string | undefined;
654
688
  }>, "many">;
689
+ /**
690
+ * Archived entries that are kept in source for Storybook documentation only
691
+ * and are NOT exposed through the active distribution chain. Per ADR 0028:
692
+ * - `teamix-evo ui add <id>` rejects ids found here unless `--include-deprecated` is passed
693
+ * - MCP `list_components` / `find_components` exclude these by default
694
+ * - Storybook keeps the story under `废弃 · Deprecated/` with a banner
695
+ * Optional for backwards compatibility — older manifests without this field
696
+ * still validate.
697
+ */
698
+ deprecatedEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
699
+ /** Unique entry identifier within the ui package (e.g. "button") */
700
+ id: z.ZodString;
701
+ /** Display name (e.g. "Button") */
702
+ name: z.ZodString;
703
+ /** Entry type */
704
+ type: z.ZodEnum<["component", "hook", "util", "block", "template"]>;
705
+ /** One-line description for entry discovery and AI guidance */
706
+ description: z.ZodString;
707
+ /** Files this entry ships (typically 1) */
708
+ files: z.ZodArray<z.ZodObject<{
709
+ /** Source path relative to the ui package root (e.g. "src/components/button/button.tsx") */
710
+ source: z.ZodString;
711
+ /** Which alias this file resolves under in the consumer project */
712
+ targetAlias: z.ZodEnum<["components", "hooks", "utils", "lib", "business", "templates"]>;
713
+ /** Filename written under the alias directory (e.g. "button.tsx") */
714
+ targetName: z.ZodString;
715
+ }, "strip", z.ZodTypeAny, {
716
+ source: string;
717
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
718
+ targetName: string;
719
+ }, {
720
+ source: string;
721
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
722
+ targetName: string;
723
+ }>, "many">;
724
+ /**
725
+ * Optional path to an AI-readable meta document (frontmatter + Markdown).
726
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
727
+ * copy is written (per ADR 0020 §3).
728
+ */
729
+ meta: z.ZodOptional<z.ZodString>;
730
+ /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
731
+ registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
732
+ /** npm dependencies required by this entry (name → semver range) */
733
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
734
+ /**
735
+ * How CLI handles this entry on `ui upgrade`.
736
+ * Defaults to `frozen` — user-owned source code, untouched after first install.
737
+ * Upgrade is handled by AI + skill flow (no CLI rewrite). See PLAN §10.9.
738
+ */
739
+ updateStrategy: z.ZodDefault<z.ZodEnum<["frozen", "regenerable", "managed"]>>;
740
+ /**
741
+ * Whether the source file should be passed through Handlebars before write.
742
+ * Most entries don't need templating (use import-rewrite transformer instead).
743
+ */
744
+ template: z.ZodOptional<z.ZodBoolean>;
745
+ /**
746
+ * Maturity / lifecycle status of this entry. Defaults to `stable`.
747
+ * See {@link UiEntryStatusSchema} for semantics.
748
+ */
749
+ status: z.ZodDefault<z.ZodEnum<["stable", "experimental", "deprecated"]>>;
750
+ /**
751
+ * Free-text rationale shown to consumers when `status` is `deprecated`.
752
+ * Should explain why the entry is going away and what replaces it.
753
+ */
754
+ deprecatedReason: z.ZodOptional<z.ZodString>;
755
+ /**
756
+ * If this entry is `deprecated`, the id of the entry that supersedes it.
757
+ * Consumers (and AI) should migrate to `replacedBy` rather than this entry.
758
+ */
759
+ replacedBy: z.ZodOptional<z.ZodString>;
760
+ /**
761
+ * Variant identifier when this entry is shipped from a variant-aware
762
+ * package (`@teamix-evo/biz-ui` or `@teamix-evo/templates` per ADR 0014).
763
+ * Optional — entries from `@teamix-evo/ui` (variant-agnostic) leave it unset.
764
+ * MUST equal the variant directory name when present.
765
+ */
766
+ variant: z.ZodOptional<z.ZodString>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ id: string;
769
+ type: "template" | "component" | "hook" | "util" | "block";
770
+ updateStrategy: "frozen" | "regenerable" | "managed";
771
+ status: "stable" | "experimental" | "deprecated";
772
+ description: string;
773
+ name: string;
774
+ files: {
775
+ source: string;
776
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
777
+ targetName: string;
778
+ }[];
779
+ template?: boolean | undefined;
780
+ variant?: string | undefined;
781
+ meta?: string | undefined;
782
+ registryDependencies?: string[] | undefined;
783
+ dependencies?: Record<string, string> | undefined;
784
+ deprecatedReason?: string | undefined;
785
+ replacedBy?: string | undefined;
786
+ }, {
787
+ id: string;
788
+ type: "template" | "component" | "hook" | "util" | "block";
789
+ description: string;
790
+ name: string;
791
+ files: {
792
+ source: string;
793
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
794
+ targetName: string;
795
+ }[];
796
+ updateStrategy?: "frozen" | "regenerable" | "managed" | undefined;
797
+ template?: boolean | undefined;
798
+ status?: "stable" | "experimental" | "deprecated" | undefined;
799
+ variant?: string | undefined;
800
+ meta?: string | undefined;
801
+ registryDependencies?: string[] | undefined;
802
+ dependencies?: Record<string, string> | undefined;
803
+ deprecatedReason?: string | undefined;
804
+ replacedBy?: string | undefined;
805
+ }>, "many">>;
655
806
  }, "strip", z.ZodTypeAny, {
656
807
  entries: {
657
808
  id: string;
@@ -680,6 +831,26 @@ declare const UiPackageManifestSchema: z.ZodObject<{
680
831
  'teamix-evo': string;
681
832
  };
682
833
  $schema?: string | undefined;
834
+ deprecatedEntries?: {
835
+ id: string;
836
+ type: "template" | "component" | "hook" | "util" | "block";
837
+ updateStrategy: "frozen" | "regenerable" | "managed";
838
+ status: "stable" | "experimental" | "deprecated";
839
+ description: string;
840
+ name: string;
841
+ files: {
842
+ source: string;
843
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
844
+ targetName: string;
845
+ }[];
846
+ template?: boolean | undefined;
847
+ variant?: string | undefined;
848
+ meta?: string | undefined;
849
+ registryDependencies?: string[] | undefined;
850
+ dependencies?: Record<string, string> | undefined;
851
+ deprecatedReason?: string | undefined;
852
+ replacedBy?: string | undefined;
853
+ }[] | undefined;
683
854
  }, {
684
855
  entries: {
685
856
  id: string;
@@ -708,53 +879,60 @@ declare const UiPackageManifestSchema: z.ZodObject<{
708
879
  'teamix-evo': string;
709
880
  };
710
881
  $schema?: string | undefined;
882
+ deprecatedEntries?: {
883
+ id: string;
884
+ type: "template" | "component" | "hook" | "util" | "block";
885
+ description: string;
886
+ name: string;
887
+ files: {
888
+ source: string;
889
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
890
+ targetName: string;
891
+ }[];
892
+ updateStrategy?: "frozen" | "regenerable" | "managed" | undefined;
893
+ template?: boolean | undefined;
894
+ status?: "stable" | "experimental" | "deprecated" | undefined;
895
+ variant?: string | undefined;
896
+ meta?: string | undefined;
897
+ registryDependencies?: string[] | undefined;
898
+ dependencies?: Record<string, string> | undefined;
899
+ deprecatedReason?: string | undefined;
900
+ replacedBy?: string | undefined;
901
+ }[] | undefined;
711
902
  }>;
712
903
 
713
904
  /**
714
- * Design Pack manifest schema.
715
- *
716
- * Per [ADR 0010](../../../../docs/adr/0010-design-default-and-variants.md) the
717
- * design system is structured as one **default** baseline + N **variants**:
905
+ * `@teamix-evo/tokens` package manifest schema.
718
906
  *
719
- * packages/design/
720
- * ├── default/ <- B-end neutral baseline (always present)
721
- * │ ├── pack.json <- this schema (no `extends`)
722
- * │ └── ... (philosophy/, foundations/, patterns/, scenarios/)
723
- * ├── variants/
724
- * │ ├── _template/ <- minimal scaffold for new variants
725
- * │ │ └── pack.json <- this schema, extends: "default"
726
- * │ ├── opentrek/
727
- * │ │ ├── pack.json <- this schema, extends: "default"
728
- * │ │ └── ... (only files differing from default)
729
- * │ └── uni-manager/
730
- * │ └── pack.json
731
- * └── manifest.json <- top-level catalog (lists default + variants)
907
+ * Per [ADR 0020](../../../../docs/adr/0020-design-to-tokens-skill-fusion.md)
908
+ * the package is now a pure, variant-list catalog no `default/` baseline,
909
+ * no per-variant `pack.json`, no walk-and-merge inheritance:
732
910
  *
733
- * The `pack.json` carries **only the protocol identity** of one pack; file
734
- * lists are NOT declared here — the loader walks the filesystem under the
735
- * pack root and lets file-level override merge happen at install time.
911
+ * packages/tokens/
912
+ * ├── manifest.json <- this schema (top-level catalog)
913
+ * └── variants/
914
+ * ├── opentrek/
915
+ * │ ├── theme.css <- Tailwind v4 @theme source of truth
916
+ * │ └── base.tokens.json
917
+ * └── uni-manager/
918
+ * ├── theme.css
919
+ * └── base.tokens.json
736
920
  *
737
- * Rationale: variant authors who add a new file (e.g. a new Markdown pattern)
738
- * shouldn't have to register it in `pack.json`. The filesystem is the single
739
- * source of truth (P2). See ADR 0010 §7 for the schema-simplification
740
- * rationale.
921
+ * Each variant is a complete, self-contained token set (ADR 0020 §3). The
922
+ * catalog is the single source of truth for variant identity + advertised
923
+ * files; the validator (`packages/tokens/scripts/validate-variants.ts`)
924
+ * enforces parity between catalog entries and on-disk variant directories.
741
925
  */
742
926
 
743
927
  /**
744
- * Soft cross-package links advertised by a design pack.
745
- *
746
- * When a consumer installs design `<variant>`, the CLI MAY check that the
747
- * matching biz-ui / templates variant exists in the workspace / npm and
748
- * prompt the user to install it too. The link is **soft** — packs may exist
749
- * without their biz-ui or templates counterparts, especially in early
750
- * development.
928
+ * Soft cross-package links advertised by a variant.
751
929
  *
752
930
  * Format: `<package-spec>#<variant-name>`, e.g. `@teamix-evo/biz-ui#opentrek`.
931
+ * The link is **soft** — the linked package may not exist yet.
753
932
  *
754
- * Linked field for `templates` added per [ADR 0014 2026-05-18 amendment](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md)
755
- * (templates became variant-aware mirroring biz-ui).
933
+ * Templates link added per [ADR 0014 amendment](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md).
756
934
  */
757
- declare const DesignPackLinkedSchema: z.ZodObject<{
935
+ declare const TokensPackLinkedSchema: z.ZodObject<{
758
936
  'biz-ui': z.ZodOptional<z.ZodString>;
759
937
  templates: z.ZodOptional<z.ZodString>;
760
938
  }, "strip", z.ZodTypeAny, {
@@ -765,32 +943,24 @@ declare const DesignPackLinkedSchema: z.ZodObject<{
765
943
  'biz-ui'?: string | undefined;
766
944
  }>;
767
945
  /**
768
- * Design pack manifest schema.
769
- *
770
- * Describes ONE pack (either the default baseline or one variant). Files are
771
- * not declared — the loader walks the pack root.
946
+ * One variant entry in the top-level catalog.
772
947
  */
773
- declare const DesignPackManifestSchema: z.ZodObject<{
774
- $schema: z.ZodOptional<z.ZodString>;
775
- schemaVersion: z.ZodLiteral<1>;
776
- /**
777
- * Pack identifier.
778
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
779
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
780
- */
781
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
948
+ declare const TokensVariantEntrySchema: z.ZodObject<{
949
+ /** Variant id — lowercase kebab-case. */
950
+ name: z.ZodString;
782
951
  /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
783
952
  displayName: z.ZodString;
784
- /** Semver. */
953
+ /** Variant version — semver. May trail the package version when only a subset of variants change. */
785
954
  version: z.ZodString;
955
+ /** Optional one-liner description; surfaced in `tokens list-variants` output. */
956
+ description: z.ZodOptional<z.ZodString>;
786
957
  /**
787
- * Parent pack name. Required for variants, must be omitted for `default`.
788
- * Currently only `"default"` is a valid parent.
958
+ * Files this variant advertises, paths relative to the tokens package root
959
+ * (e.g. `variants/opentrek/theme.css`). The validator walks these to
960
+ * confirm presence; the CLI consumes them at install time.
789
961
  */
790
- extends: z.ZodOptional<z.ZodString>;
791
- /** Optional one-liner; useful for `design list-variants` output. */
792
- description: z.ZodOptional<z.ZodString>;
793
- /** Soft cross-package links (biz-ui / templates with same variant name). */
962
+ files: z.ZodArray<z.ZodString, "many">;
963
+ /** Soft cross-package links (biz-ui / templates with the same variant name). */
794
964
  linked: z.ZodOptional<z.ZodObject<{
795
965
  'biz-ui': z.ZodOptional<z.ZodString>;
796
966
  templates: z.ZodOptional<z.ZodString>;
@@ -802,46 +972,42 @@ declare const DesignPackManifestSchema: z.ZodObject<{
802
972
  'biz-ui'?: string | undefined;
803
973
  }>>;
804
974
  }, "strip", z.ZodTypeAny, {
805
- schemaVersion: 1;
806
975
  displayName: string;
807
976
  version: string;
808
977
  name: string;
809
- $schema?: string | undefined;
978
+ files: string[];
810
979
  description?: string | undefined;
811
- extends?: string | undefined;
812
980
  linked?: {
813
981
  templates?: string | undefined;
814
982
  'biz-ui'?: string | undefined;
815
983
  } | undefined;
816
984
  }, {
817
- schemaVersion: 1;
818
985
  displayName: string;
819
986
  version: string;
820
987
  name: string;
821
- $schema?: string | undefined;
988
+ files: string[];
822
989
  description?: string | undefined;
823
- extends?: string | undefined;
824
990
  linked?: {
825
991
  templates?: string | undefined;
826
992
  'biz-ui'?: string | undefined;
827
993
  } | undefined;
828
994
  }>;
829
- type DesignPackManifest = z.infer<typeof DesignPackManifestSchema>;
830
- type DesignPackLinked = z.infer<typeof DesignPackLinkedSchema>;
995
+ type TokensVariantEntry = z.infer<typeof TokensVariantEntrySchema>;
996
+ type TokensPackLinked = z.infer<typeof TokensPackLinkedSchema>;
831
997
  /**
832
- * Top-level catalog of all packs in `@teamix-evo/design`.
998
+ * Top-level catalog of all variants in `@teamix-evo/tokens`.
833
999
  *
834
- * Lives at `packages/design/manifest.json`. Lists the default baseline + all
835
- * variants the package ships. The catalog is regenerable via
836
- * `pnpm --filter @teamix-evo/design validate` variant directories are the
837
- * source of truth.
1000
+ * Lives at `packages/tokens/manifest.json`. Lists every variant the package
1001
+ * ships. The catalog is hand-edited (or regenerable via
1002
+ * `pnpm --filter @teamix-evo/tokens validate`); variant directories on disk
1003
+ * are the source of truth for file content.
838
1004
  */
839
- declare const DesignPackageManifestSchema: z.ZodObject<{
1005
+ declare const TokensPackageManifestSchema: z.ZodObject<{
840
1006
  $schema: z.ZodOptional<z.ZodString>;
841
1007
  schemaVersion: z.ZodLiteral<1>;
842
- /** Always `"design"` for this package. */
843
- package: z.ZodLiteral<"design">;
844
- /** Semver of the entire design package. */
1008
+ /** Always `"tokens"` disambiguates from other teamix-evo package manifests. */
1009
+ package: z.ZodLiteral<"tokens">;
1010
+ /** Semver of the entire tokens package. */
845
1011
  version: z.ZodString;
846
1012
  /** Engine compatibility. */
847
1013
  engines: z.ZodObject<{
@@ -851,85 +1017,25 @@ declare const DesignPackageManifestSchema: z.ZodObject<{
851
1017
  }, {
852
1018
  'teamix-evo': string;
853
1019
  }>;
854
- /** The default baseline pack — always present. */
855
- default: z.ZodObject<{
856
- $schema: z.ZodOptional<z.ZodString>;
857
- schemaVersion: z.ZodLiteral<1>;
858
- /**
859
- * Pack identifier.
860
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
861
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
862
- */
863
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
864
- /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
865
- displayName: z.ZodString;
866
- /** Semver. */
867
- version: z.ZodString;
868
- /**
869
- * Parent pack name. Required for variants, must be omitted for `default`.
870
- * Currently only `"default"` is a valid parent.
871
- */
872
- extends: z.ZodOptional<z.ZodString>;
873
- /** Optional one-liner; useful for `design list-variants` output. */
874
- description: z.ZodOptional<z.ZodString>;
875
- /** Soft cross-package links (biz-ui / templates with same variant name). */
876
- linked: z.ZodOptional<z.ZodObject<{
877
- 'biz-ui': z.ZodOptional<z.ZodString>;
878
- templates: z.ZodOptional<z.ZodString>;
879
- }, "strip", z.ZodTypeAny, {
880
- templates?: string | undefined;
881
- 'biz-ui'?: string | undefined;
882
- }, {
883
- templates?: string | undefined;
884
- 'biz-ui'?: string | undefined;
885
- }>>;
886
- }, "strip", z.ZodTypeAny, {
887
- schemaVersion: 1;
888
- displayName: string;
889
- version: string;
890
- name: string;
891
- $schema?: string | undefined;
892
- description?: string | undefined;
893
- extends?: string | undefined;
894
- linked?: {
895
- templates?: string | undefined;
896
- 'biz-ui'?: string | undefined;
897
- } | undefined;
898
- }, {
899
- schemaVersion: 1;
900
- displayName: string;
901
- version: string;
902
- name: string;
903
- $schema?: string | undefined;
904
- description?: string | undefined;
905
- extends?: string | undefined;
906
- linked?: {
907
- templates?: string | undefined;
908
- 'biz-ui'?: string | undefined;
909
- } | undefined;
910
- }>;
911
- /** All shipped variants (excluding `_template/`). */
1020
+ /** Optional package-level description. */
1021
+ description: z.ZodOptional<z.ZodString>;
1022
+ /** All shipped variants (excluding scaffold dirs that begin with `_`). */
912
1023
  variants: z.ZodArray<z.ZodObject<{
913
- $schema: z.ZodOptional<z.ZodString>;
914
- schemaVersion: z.ZodLiteral<1>;
915
- /**
916
- * Pack identifier.
917
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
918
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
919
- */
920
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
1024
+ /** Variant id — lowercase kebab-case. */
1025
+ name: z.ZodString;
921
1026
  /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
922
1027
  displayName: z.ZodString;
923
- /** Semver. */
1028
+ /** Variant version — semver. May trail the package version when only a subset of variants change. */
924
1029
  version: z.ZodString;
1030
+ /** Optional one-liner description; surfaced in `tokens list-variants` output. */
1031
+ description: z.ZodOptional<z.ZodString>;
925
1032
  /**
926
- * Parent pack name. Required for variants, must be omitted for `default`.
927
- * Currently only `"default"` is a valid parent.
1033
+ * Files this variant advertises, paths relative to the tokens package root
1034
+ * (e.g. `variants/opentrek/theme.css`). The validator walks these to
1035
+ * confirm presence; the CLI consumes them at install time.
928
1036
  */
929
- extends: z.ZodOptional<z.ZodString>;
930
- /** Optional one-liner; useful for `design list-variants` output. */
931
- description: z.ZodOptional<z.ZodString>;
932
- /** Soft cross-package links (biz-ui / templates with same variant name). */
1037
+ files: z.ZodArray<z.ZodString, "many">;
1038
+ /** Soft cross-package links (biz-ui / templates with the same variant name). */
933
1039
  linked: z.ZodOptional<z.ZodObject<{
934
1040
  'biz-ui': z.ZodOptional<z.ZodString>;
935
1041
  templates: z.ZodOptional<z.ZodString>;
@@ -941,121 +1047,85 @@ declare const DesignPackageManifestSchema: z.ZodObject<{
941
1047
  'biz-ui'?: string | undefined;
942
1048
  }>>;
943
1049
  }, "strip", z.ZodTypeAny, {
944
- schemaVersion: 1;
945
1050
  displayName: string;
946
1051
  version: string;
947
1052
  name: string;
948
- $schema?: string | undefined;
1053
+ files: string[];
949
1054
  description?: string | undefined;
950
- extends?: string | undefined;
951
1055
  linked?: {
952
1056
  templates?: string | undefined;
953
1057
  'biz-ui'?: string | undefined;
954
1058
  } | undefined;
955
1059
  }, {
956
- schemaVersion: 1;
957
1060
  displayName: string;
958
1061
  version: string;
959
1062
  name: string;
960
- $schema?: string | undefined;
1063
+ files: string[];
961
1064
  description?: string | undefined;
962
- extends?: string | undefined;
963
1065
  linked?: {
964
1066
  templates?: string | undefined;
965
1067
  'biz-ui'?: string | undefined;
966
1068
  } | undefined;
967
1069
  }>, "many">;
1070
+ /**
1071
+ * Reserved for future shared assets that span variants (e.g. browser
1072
+ * quirks resets co-shipped at the package root). Empty array today.
1073
+ */
1074
+ shared: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
1075
  }, "strip", z.ZodTypeAny, {
969
1076
  schemaVersion: 1;
970
- package: "design";
1077
+ package: "tokens";
971
1078
  version: string;
972
1079
  engines: {
973
1080
  'teamix-evo': string;
974
1081
  };
975
- default: {
976
- schemaVersion: 1;
977
- displayName: string;
978
- version: string;
979
- name: string;
980
- $schema?: string | undefined;
981
- description?: string | undefined;
982
- extends?: string | undefined;
983
- linked?: {
984
- templates?: string | undefined;
985
- 'biz-ui'?: string | undefined;
986
- } | undefined;
987
- };
988
1082
  variants: {
989
- schemaVersion: 1;
990
1083
  displayName: string;
991
1084
  version: string;
992
1085
  name: string;
993
- $schema?: string | undefined;
1086
+ files: string[];
994
1087
  description?: string | undefined;
995
- extends?: string | undefined;
996
1088
  linked?: {
997
1089
  templates?: string | undefined;
998
1090
  'biz-ui'?: string | undefined;
999
1091
  } | undefined;
1000
1092
  }[];
1001
1093
  $schema?: string | undefined;
1094
+ description?: string | undefined;
1095
+ shared?: string[] | undefined;
1002
1096
  }, {
1003
1097
  schemaVersion: 1;
1004
- package: "design";
1098
+ package: "tokens";
1005
1099
  version: string;
1006
1100
  engines: {
1007
1101
  'teamix-evo': string;
1008
1102
  };
1009
- default: {
1010
- schemaVersion: 1;
1011
- displayName: string;
1012
- version: string;
1013
- name: string;
1014
- $schema?: string | undefined;
1015
- description?: string | undefined;
1016
- extends?: string | undefined;
1017
- linked?: {
1018
- templates?: string | undefined;
1019
- 'biz-ui'?: string | undefined;
1020
- } | undefined;
1021
- };
1022
1103
  variants: {
1023
- schemaVersion: 1;
1024
1104
  displayName: string;
1025
1105
  version: string;
1026
1106
  name: string;
1027
- $schema?: string | undefined;
1107
+ files: string[];
1028
1108
  description?: string | undefined;
1029
- extends?: string | undefined;
1030
1109
  linked?: {
1031
1110
  templates?: string | undefined;
1032
1111
  'biz-ui'?: string | undefined;
1033
1112
  } | undefined;
1034
1113
  }[];
1035
1114
  $schema?: string | undefined;
1115
+ description?: string | undefined;
1116
+ shared?: string[] | undefined;
1036
1117
  }>;
1037
- type DesignPackageManifest = z.infer<typeof DesignPackageManifestSchema>;
1118
+ type TokensPackageManifest = z.infer<typeof TokensPackageManifestSchema>;
1038
1119
  /**
1039
1120
  * Consumer-side lock file written to
1040
- * `.teamix-evo/design/pack.lock.json` after `design init`.
1121
+ * `.teamix-evo/tokens-lock.json` after `tokens init`.
1041
1122
  *
1042
- * Records which default + variant version was installed so future
1043
- * `design upgrade` / `doctor` / AI tooling can reason about install state
1044
- * without re-walking the source.
1123
+ * Records which tokens variant + version was installed. There is no longer a
1124
+ * `default` field every variant is self-contained per ADR 0020.
1045
1125
  */
1046
- declare const DesignPackLockSchema: z.ZodObject<{
1126
+ declare const TokensPackLockSchema: z.ZodObject<{
1047
1127
  $schema: z.ZodOptional<z.ZodString>;
1048
1128
  schemaVersion: z.ZodLiteral<1>;
1049
- default: z.ZodObject<{
1050
- version: z.ZodString;
1051
- from: z.ZodString;
1052
- }, "strip", z.ZodTypeAny, {
1053
- version: string;
1054
- from: string;
1055
- }, {
1056
- version: string;
1057
- from: string;
1058
- }>;
1059
1129
  variant: z.ZodObject<{
1060
1130
  name: z.ZodString;
1061
1131
  displayName: z.ZodString;
@@ -1072,6 +1142,8 @@ declare const DesignPackLockSchema: z.ZodObject<{
1072
1142
  name: string;
1073
1143
  from: string;
1074
1144
  }>;
1145
+ /** Tokens package version — useful when variant version trails the package. */
1146
+ packageVersion: z.ZodString;
1075
1147
  linked: z.ZodOptional<z.ZodObject<{
1076
1148
  'biz-ui': z.ZodOptional<z.ZodString>;
1077
1149
  templates: z.ZodOptional<z.ZodString>;
@@ -1091,10 +1163,7 @@ declare const DesignPackLockSchema: z.ZodObject<{
1091
1163
  name: string;
1092
1164
  from: string;
1093
1165
  };
1094
- default: {
1095
- version: string;
1096
- from: string;
1097
- };
1166
+ packageVersion: string;
1098
1167
  installedAt: string;
1099
1168
  $schema?: string | undefined;
1100
1169
  linked?: {
@@ -1109,10 +1178,7 @@ declare const DesignPackLockSchema: z.ZodObject<{
1109
1178
  name: string;
1110
1179
  from: string;
1111
1180
  };
1112
- default: {
1113
- version: string;
1114
- from: string;
1115
- };
1181
+ packageVersion: string;
1116
1182
  installedAt: string;
1117
1183
  $schema?: string | undefined;
1118
1184
  linked?: {
@@ -1120,14 +1186,14 @@ declare const DesignPackLockSchema: z.ZodObject<{
1120
1186
  'biz-ui'?: string | undefined;
1121
1187
  } | undefined;
1122
1188
  }>;
1123
- type DesignPackLock = z.infer<typeof DesignPackLockSchema>;
1189
+ type TokensPackLock = z.infer<typeof TokensPackLockSchema>;
1124
1190
 
1125
1191
  /**
1126
1192
  * Schemas for variant-aware UI packages — `@teamix-evo/biz-ui` and
1127
1193
  * `@teamix-evo/templates`.
1128
1194
  *
1129
1195
  * Per [ADR 0014](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md), these
1130
- * two packages mirror `@teamix-evo/design`'s variant model: each ships a
1196
+ * two packages mirror `@teamix-evo/tokens`'s variant model: each ships a
1131
1197
  * top-level catalog (variants list) plus a per-variant manifest (entry list).
1132
1198
  *
1133
1199
  * packages/biz-ui/
@@ -1468,7 +1534,7 @@ declare const UiAliasesSchema: z.ZodObject<{
1468
1534
  * Package entry within a project config.
1469
1535
  *
1470
1536
  * Some fields only apply to specific packages:
1471
- * - `tailwind` — design only
1537
+ * - `tailwind` — tokens only
1472
1538
  * - `ides` / `scope` — skills only
1473
1539
  * - `aliases` / `iconLibrary` / `tsx` / `rsc` — ui only
1474
1540
  *
@@ -1729,7 +1795,7 @@ declare const InstalledResourceSchema: z.ZodObject<{
1729
1795
  * An installed package entry — tracks a single package installation.
1730
1796
  */
1731
1797
  declare const InstalledPackageSchema: z.ZodObject<{
1732
- /** Full package name (e.g. "@teamix-evo/design") */
1798
+ /** Full package name (e.g. "@teamix-evo/tokens") */
1733
1799
  package: z.ZodString;
1734
1800
  /** Variant identifier (use "_flat" for non-variant packages such as skills) */
1735
1801
  variant: z.ZodString;
@@ -1801,7 +1867,7 @@ declare const InstalledManifestSchema: z.ZodObject<{
1801
1867
  schemaVersion: z.ZodLiteral<1>;
1802
1868
  /** List of installed packages */
1803
1869
  installed: z.ZodArray<z.ZodObject<{
1804
- /** Full package name (e.g. "@teamix-evo/design") */
1870
+ /** Full package name (e.g. "@teamix-evo/tokens") */
1805
1871
  package: z.ZodString;
1806
1872
  /** Variant identifier (use "_flat" for non-variant packages such as skills) */
1807
1873
  variant: z.ZodString;
@@ -2096,54 +2162,15 @@ declare function loadSkillsPackageManifest(packageDir: string): Promise<SkillsPa
2096
2162
  declare function loadUiPackageManifest(packageDir: string): Promise<UiPackageManifest>;
2097
2163
 
2098
2164
  /**
2099
- * Read & validate a single pack's `pack.json`.
2165
+ * Read & validate the top-level `packages/tokens/manifest.json` catalog.
2100
2166
  * Errors are wrapped with the file path for easy diagnosis (P8).
2101
2167
  */
2102
- declare function loadDesignPack(packDir: string): Promise<DesignPackManifest>;
2103
- /**
2104
- * Read & validate the top-level `packages/design/manifest.json` catalog.
2105
- */
2106
- declare function loadDesignPackageManifest(packageDir: string): Promise<DesignPackageManifest>;
2107
- /**
2108
- * Walk all files under a pack root and return their paths **relative to
2109
- * `packDir`**, excluding pack metadata files (`pack.json`).
2110
- *
2111
- * Returns a sorted list (deterministic for tests + diff-friendly).
2112
- */
2113
- declare function walkPackTree(packDir: string): Promise<string[]>;
2114
- /**
2115
- * Result of merging default + variant: each entry is a file the CLI should
2116
- * install, paired with which on-disk file to read.
2117
- */
2118
- interface MergedFileEntry {
2119
- /** Path relative to the pack root (e.g. `philosophy/principles.md`). */
2120
- relPath: string;
2121
- /** Absolute filesystem path the CLI should read. */
2122
- sourcePath: string;
2123
- /** Which pack provided this file (for diagnostics + UI listing). */
2124
- origin: 'default' | 'variant';
2125
- }
2126
- interface MergeResult {
2127
- files: MergedFileEntry[];
2128
- /** Files where variant overrode default. Useful for diagnostics. */
2129
- overrides: string[];
2130
- /** Files only in variant (no default counterpart). */
2131
- variantAdds: string[];
2132
- /** Files only in default (variant didn't override). */
2133
- defaultPassThrough: string[];
2134
- }
2168
+ declare function loadTokensPackageManifest(packageDir: string): Promise<TokensPackageManifest>;
2135
2169
  /**
2136
- * File-level merge per ADR 0010 §4.
2137
- *
2138
- * For each file path P:
2139
- * - If `<variantDir>/P` exists: use the variant's file (override).
2140
- * - Else: use the default's file (pass-through).
2141
- * Plus: every file in variant tree NOT present in default tree is appended
2142
- * (variant-add).
2143
- *
2144
- * No content parsing happens here — files are read as-is by the caller.
2170
+ * Lookup helper: find one variant entry in a catalog by name.
2171
+ * Returns `undefined` when the variant is not advertised.
2145
2172
  */
2146
- declare function mergeDefaultAndVariant(defaultDir: string, variantDir: string): Promise<MergeResult>;
2173
+ declare function getVariantEntry(catalog: TokensPackageManifest, variantName: string): TokensVariantEntry | undefined;
2147
2174
 
2148
2175
  declare function loadVariantUiPackageCatalog(packageDir: string): Promise<VariantUiPackageCatalog>;
2149
2176
  declare function loadVariantUiPackageManifest(variantDir: string): Promise<VariantUiPackageManifest>;
@@ -2252,4 +2279,4 @@ interface UpdateActionOptions {
2252
2279
  */
2253
2280
  declare function getUpdateAction(strategy: UpdateStrategy, options: UpdateActionOptions): UpdateAction;
2254
2281
 
2255
- export { type DesignPackLinked, DesignPackLinkedSchema, type DesignPackLock, DesignPackLockSchema, type DesignPackManifest, DesignPackManifestSchema, type DesignPackageManifest, DesignPackageManifestSchema, type InstalledManifest, InstalledManifestSchema, type InstalledPackage, InstalledPackageSchema, type InstalledResource, InstalledResourceSchema, type ManagedRegion, type MergeResult, type MergedFileEntry, type PackageEntry, PackageEntrySchema, type ProjectConfig, ProjectConfigSchema, type Resource, ResourceSchema, type ResourceType, ResourceTypeSchema, type Result, type SkillEntry, SkillEntrySchema, type SkillIde, SkillIdeSchema, type SkillScope, SkillScopeSchema, type SkillsLock, type SkillsLockEntry, SkillsLockEntrySchema, SkillsLockSchema, type SkillsPackageManifest, SkillsPackageManifestSchema, type TailwindVersion, TailwindVersionSchema, type UiAlias, UiAliasSchema, type UiAliases, UiAliasesSchema, type UiEntry, type UiEntryFile, UiEntryFileSchema, UiEntrySchema, type UiEntryType, UiEntryTypeSchema, type UiPackageManifest, UiPackageManifestSchema, type UpdateAction, type UpdateActionOptions, type UpdateStrategy, UpdateStrategySchema, type VariantManifest, VariantManifestSchema, type VariantUiPackageCatalog, VariantUiPackageCatalogSchema, type VariantUiPackageManifest, VariantUiPackageManifestSchema, type VariantUiPackageName, VariantUiPackageNameSchema, getUpdateAction, hasManagedRegion, loadDesignPack, loadDesignPackageManifest, loadSkillsPackageManifest, loadUiPackageManifest, loadVariantManifest, loadVariantUiPackageCatalog, loadVariantUiPackageManifest, mergeDefaultAndVariant, parseManagedRegions, replaceManagedRegion, resolveUiEntryOrder, shouldUpdate, validateConfig, validateInstalled, validateManifest, validateSkillsLock, validateSkillsPackage, validateUiDependencyGraph, validateUiPackage, walkPackTree };
2282
+ export { type InstalledManifest, InstalledManifestSchema, type InstalledPackage, InstalledPackageSchema, type InstalledResource, InstalledResourceSchema, type ManagedRegion, type PackageEntry, PackageEntrySchema, type ProjectConfig, ProjectConfigSchema, type Resource, ResourceSchema, type ResourceType, ResourceTypeSchema, type Result, type SkillEntry, SkillEntrySchema, type SkillIde, SkillIdeSchema, type SkillScope, SkillScopeSchema, type SkillsLock, type SkillsLockEntry, SkillsLockEntrySchema, SkillsLockSchema, type SkillsPackageManifest, SkillsPackageManifestSchema, type TailwindVersion, TailwindVersionSchema, type TokensPackLinked, TokensPackLinkedSchema, type TokensPackLock, TokensPackLockSchema, type TokensPackageManifest, TokensPackageManifestSchema, type TokensVariantEntry, TokensVariantEntrySchema, type UiAlias, UiAliasSchema, type UiAliases, UiAliasesSchema, type UiEntry, type UiEntryFile, UiEntryFileSchema, UiEntrySchema, type UiEntryType, UiEntryTypeSchema, type UiPackageManifest, UiPackageManifestSchema, type UpdateAction, type UpdateActionOptions, type UpdateStrategy, UpdateStrategySchema, type VariantManifest, VariantManifestSchema, type VariantUiPackageCatalog, VariantUiPackageCatalogSchema, type VariantUiPackageManifest, VariantUiPackageManifestSchema, type VariantUiPackageName, VariantUiPackageNameSchema, getUpdateAction, getVariantEntry, hasManagedRegion, loadSkillsPackageManifest, loadTokensPackageManifest, loadUiPackageManifest, loadVariantManifest, loadVariantUiPackageCatalog, loadVariantUiPackageManifest, parseManagedRegions, replaceManagedRegion, resolveUiEntryOrder, shouldUpdate, validateConfig, validateInstalled, validateManifest, validateSkillsLock, validateSkillsPackage, validateUiDependencyGraph, validateUiPackage };