teamix-evo 0.16.0 → 0.17.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/README.md CHANGED
@@ -172,6 +172,7 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
172
172
  | `teamix-evo init [-y] [--dry-run] [--variant <n>]` | 普通版接入:检测冲突 → wizard → 静默落地(已有 npm 工程入口) |
173
173
  | `teamix-evo update [--dry-run] [--cwd <dir>]` | 一键升级已装资源(tokens + skills,ADR 0003 三态 + ADR 0035 短路) |
174
174
  | `teamix-evo migrate [--cwd <dir>] [--json]` | shadcn 项目迁移前置检查(AI skill 引导实际迁移) |
175
+ | `teamix-evo graft [--variant <v>] [--json] [--cwd <dir>]` | 叠加 Teamix Evo 到传统组件库项目(双栈共存,ADR 0047) |
175
176
  | `teamix-evo restore [ts] [--list] [-y]` | 回滚 `.teamix-evo/` 到指定 snapshot(ADR 0019 §2 — 自身可逆) |
176
177
  | `teamix-evo switch <new-variant> [--apply] [-y]` | variant 切换:默认 dry-run 展示 file-level diff,--apply 才真写(ADR 0019 §D3) |
177
178
  | `teamix-evo tokens init <variant>` | 初始化 tokens |
@@ -656,10 +656,14 @@ interface ProjectStateReport {
656
656
  hasPackageJson: boolean;
657
657
  hasComponentsJson: boolean;
658
658
  significantEntries: string[];
659
+ /** Legacy component library detected — only populated when state is 'other'. */
660
+ legacyLib?: string;
661
+ /** Build tool detected — only populated when state is 'other'. */
662
+ buildTool?: string;
659
663
  }
660
664
  declare function detectProjectState(cwd: string): Promise<ProjectStateReport>;
661
665
 
662
- type LifecycleCommand = 'init' | 'migrate' | 'update';
666
+ type LifecycleCommand = 'init' | 'migrate' | 'update' | 'graft';
663
667
  declare function assertCommandPrecondition(command: LifecycleCommand, state: ProjectState): void;
664
668
 
665
669
  /**
@@ -774,6 +778,42 @@ interface RunProjectInitResult {
774
778
  }
775
779
  declare function runProjectInit(options: RunProjectInitOptions): Promise<RunProjectInitResult>;
776
780
 
781
+ /**
782
+ * Programmatic orchestrator for `teamix-evo graft` (ADR 0047).
783
+ *
784
+ * Installs the teamix-evo AICoding stack (tokens, skills, UI, biz-ui,
785
+ * AGENTS.md, config) into an existing project that uses a legacy component
786
+ * library (Fusion / Antd / Element). Designed to be called by the
787
+ * `graft.md` skill after AI-driven steps (Tailwind install, PostCSS merge,
788
+ * CSS entry creation) are complete.
789
+ *
790
+ * Does NOT create CSS entry files or modify PostCSS config — those are
791
+ * handled by the skill (AI judgement required).
792
+ */
793
+
794
+ type GraftInitStepName = 'ensure-teamix-dir' | 'snapshot' | 'tokens' | 'ui-init' | 'ui-add' | 'biz-ui-add' | 'skills' | 'agents-md' | 'agents-md-graft' | 'meta-landing' | 'config-mode' | 'gitignore';
795
+ type GraftInitStepStatus = 'ok' | 'skip' | 'fail';
796
+ interface GraftInitStep {
797
+ name: GraftInitStepName;
798
+ status: GraftInitStepStatus;
799
+ detail?: string;
800
+ }
801
+ interface GraftInitOptions {
802
+ projectRoot: string;
803
+ variant: string;
804
+ legacyLib: string;
805
+ ide?: string;
806
+ ides?: SkillIde[];
807
+ scope?: SkillScope;
808
+ skipInstall?: boolean;
809
+ onStep?: (step: GraftInitStep) => void;
810
+ }
811
+ interface GraftInitResult {
812
+ status: 'success' | 'partial';
813
+ steps: GraftInitStep[];
814
+ }
815
+ declare function runGraftInit(options: GraftInitOptions): Promise<GraftInitResult>;
816
+
777
817
  interface InstallOptions {
778
818
  /** Project root directory */
779
819
  projectRoot: string;
@@ -998,4 +1038,4 @@ declare function readInstalledManifest(projectRoot: string): Promise<InstalledMa
998
1038
  */
999
1039
  declare function writeInstalledManifest(projectRoot: string, manifest: InstalledManifest): Promise<void>;
1000
1040
 
1001
- export { type ConflictItem, type ConflictKey, type ConflictReport, type ConflictStrategy, DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type InstallOptions, type InstallResult, type ListVariantUiEntriesResult, type ListVariantUiResult, type ListVariantsResult, type ProjectInitStep, type ProjectInitStepName, type ProjectInitStepStatus, type ProjectState, type ProjectState$1 as ProjectStateLegacy, type ProjectStateReport, type ProjectStateReport$1 as ProjectStateReportLegacy, type ReinstallToIdesOptions, type ReinstallToIdesResult, type ResumeHint, type RunGenerateAgentsMdOptions, type RunGenerateAgentsMdResult, type RunLintInitOptions, type RunLintInitResult, type RunProjectInitOptions, type RunProjectInitResult, type RunSkillsAddOptions, type RunSkillsAddResult, type RunSkillsInitOptions, type RunSkillsInitResult, type RunSkillsUpdateOptions, type RunSkillsUpdateResult, type RunTokensInitOptions, type RunTokensInitResult, type RunUiAddOptions, type RunUiAddResult, type RunUiInitOptions, type RunUiInitResult, type RunUiListOptions, type RunUiListResult, type RunVariantUiAddOptions, type RunVariantUiAddResult, type SkillInstallOptions, type SkillInstallResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, assertCommandPrecondition, detectConflicts, detectProjectState, detectProjectState$1 as detectProjectStateLegacy, ensureTeamixDir, extractDescriptionParts, getTeamixDir, installResources, installSkills, installUiEntries, listBizUiEntries, listBizUiVariants, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, reinstallSkillsToIdes, removeSkillFiles, removeUiFiles, runBizUiAdd, runGenerateAgentsMd, runLintInit, runProjectInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTokensInit, runUiAdd, runUiInit, runUiList, updateSkills, writeInstalledManifest, writeProjectConfig };
1041
+ export { type ConflictItem, type ConflictKey, type ConflictReport, type ConflictStrategy, DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type GraftInitOptions, type GraftInitResult, type GraftInitStep, type GraftInitStepName, type GraftInitStepStatus, type InstallOptions, type InstallResult, type ListVariantUiEntriesResult, type ListVariantUiResult, type ListVariantsResult, type ProjectInitStep, type ProjectInitStepName, type ProjectInitStepStatus, type ProjectState, type ProjectState$1 as ProjectStateLegacy, type ProjectStateReport, type ProjectStateReport$1 as ProjectStateReportLegacy, type ReinstallToIdesOptions, type ReinstallToIdesResult, type ResumeHint, type RunGenerateAgentsMdOptions, type RunGenerateAgentsMdResult, type RunLintInitOptions, type RunLintInitResult, type RunProjectInitOptions, type RunProjectInitResult, type RunSkillsAddOptions, type RunSkillsAddResult, type RunSkillsInitOptions, type RunSkillsInitResult, type RunSkillsUpdateOptions, type RunSkillsUpdateResult, type RunTokensInitOptions, type RunTokensInitResult, type RunUiAddOptions, type RunUiAddResult, type RunUiInitOptions, type RunUiInitResult, type RunUiListOptions, type RunUiListResult, type RunVariantUiAddOptions, type RunVariantUiAddResult, type SkillInstallOptions, type SkillInstallResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, assertCommandPrecondition, detectConflicts, detectProjectState, detectProjectState$1 as detectProjectStateLegacy, ensureTeamixDir, extractDescriptionParts, getTeamixDir, installResources, installSkills, installUiEntries, listBizUiEntries, listBizUiVariants, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, reinstallSkillsToIdes, removeSkillFiles, removeUiFiles, runBizUiAdd, runGenerateAgentsMd, runGraftInit, runLintInit, runProjectInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTokensInit, runUiAdd, runUiInit, runUiList, updateSkills, writeInstalledManifest, writeProjectConfig };