@bleedingdev/modern-js-create 3.4.0-ultramodern.9 → 3.5.0-ultramodern.1

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.
Files changed (135) hide show
  1. package/README.md +49 -23
  2. package/dist/cjs/index.cjs +37 -4
  3. package/dist/cjs/locale/en.cjs +12 -2
  4. package/dist/cjs/locale/zh.cjs +12 -2
  5. package/dist/cjs/ultramodern-tooling/commands.cjs +431 -0
  6. package/dist/cjs/ultramodern-tooling/config.cjs +172 -0
  7. package/dist/cjs/ultramodern-workspace/add-vertical.cjs +87 -75
  8. package/dist/cjs/ultramodern-workspace/{effect-api.cjs → api.cjs} +207 -208
  9. package/dist/cjs/ultramodern-workspace/bridge-config.cjs +327 -0
  10. package/dist/cjs/ultramodern-workspace/codesmith.cjs +1 -0
  11. package/dist/cjs/ultramodern-workspace/contracts.cjs +128 -657
  12. package/dist/cjs/ultramodern-workspace/demo-components.cjs +12 -12
  13. package/dist/cjs/ultramodern-workspace/descriptors.cjs +25 -25
  14. package/dist/cjs/ultramodern-workspace/fs-io.cjs +117 -0
  15. package/dist/cjs/ultramodern-workspace/generation-result.cjs +5 -5
  16. package/dist/cjs/ultramodern-workspace/index.cjs +4 -0
  17. package/dist/cjs/ultramodern-workspace/mf-validation.cjs +571 -0
  18. package/dist/cjs/ultramodern-workspace/module-federation.cjs +39 -12
  19. package/dist/cjs/ultramodern-workspace/overlays.cjs +2 -2
  20. package/dist/cjs/ultramodern-workspace/package-json.cjs +58 -41
  21. package/dist/cjs/ultramodern-workspace/policy.cjs +4 -4
  22. package/dist/cjs/ultramodern-workspace/public-api.cjs +4 -0
  23. package/dist/cjs/ultramodern-workspace/public-surface.cjs +2 -2
  24. package/dist/cjs/ultramodern-workspace/versions.cjs +15 -0
  25. package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +120 -50
  26. package/dist/cjs/ultramodern-workspace/write-workspace.cjs +64 -21
  27. package/dist/esm/index.js +37 -4
  28. package/dist/esm/locale/en.js +12 -2
  29. package/dist/esm/locale/zh.js +12 -2
  30. package/dist/esm/ultramodern-tooling/commands.js +378 -0
  31. package/dist/esm/ultramodern-tooling/config.js +120 -0
  32. package/dist/esm/ultramodern-workspace/add-vertical.js +88 -79
  33. package/dist/esm/ultramodern-workspace/{effect-api.js → api.js} +146 -147
  34. package/dist/esm/ultramodern-workspace/bridge-config.js +270 -0
  35. package/dist/esm/ultramodern-workspace/codesmith.js +1 -0
  36. package/dist/esm/ultramodern-workspace/contracts.js +130 -611
  37. package/dist/esm/ultramodern-workspace/demo-components.js +13 -13
  38. package/dist/esm/ultramodern-workspace/descriptors.js +11 -11
  39. package/dist/esm/ultramodern-workspace/fs-io.js +116 -2
  40. package/dist/esm/ultramodern-workspace/generation-result.js +6 -6
  41. package/dist/esm/ultramodern-workspace/index.js +1 -0
  42. package/dist/esm/ultramodern-workspace/mf-validation.js +516 -0
  43. package/dist/esm/ultramodern-workspace/module-federation.js +40 -13
  44. package/dist/esm/ultramodern-workspace/overlays.js +2 -2
  45. package/dist/esm/ultramodern-workspace/package-json.js +57 -40
  46. package/dist/esm/ultramodern-workspace/policy.js +5 -5
  47. package/dist/esm/ultramodern-workspace/public-api.js +1 -0
  48. package/dist/esm/ultramodern-workspace/public-surface.js +2 -2
  49. package/dist/esm/ultramodern-workspace/versions.js +7 -1
  50. package/dist/esm/ultramodern-workspace/workspace-scripts.js +108 -34
  51. package/dist/esm/ultramodern-workspace/write-workspace.js +66 -26
  52. package/dist/esm-node/index.js +37 -4
  53. package/dist/esm-node/locale/en.js +12 -2
  54. package/dist/esm-node/locale/zh.js +12 -2
  55. package/dist/esm-node/ultramodern-tooling/commands.js +379 -0
  56. package/dist/esm-node/ultramodern-tooling/config.js +121 -0
  57. package/dist/esm-node/ultramodern-workspace/add-vertical.js +88 -79
  58. package/dist/esm-node/ultramodern-workspace/{effect-api.js → api.js} +146 -147
  59. package/dist/esm-node/ultramodern-workspace/bridge-config.js +271 -0
  60. package/dist/esm-node/ultramodern-workspace/codesmith.js +1 -0
  61. package/dist/esm-node/ultramodern-workspace/contracts.js +130 -611
  62. package/dist/esm-node/ultramodern-workspace/demo-components.js +13 -13
  63. package/dist/esm-node/ultramodern-workspace/descriptors.js +11 -11
  64. package/dist/esm-node/ultramodern-workspace/fs-io.js +116 -2
  65. package/dist/esm-node/ultramodern-workspace/generation-result.js +6 -6
  66. package/dist/esm-node/ultramodern-workspace/index.js +1 -0
  67. package/dist/esm-node/ultramodern-workspace/mf-validation.js +517 -0
  68. package/dist/esm-node/ultramodern-workspace/module-federation.js +40 -13
  69. package/dist/esm-node/ultramodern-workspace/overlays.js +2 -2
  70. package/dist/esm-node/ultramodern-workspace/package-json.js +57 -40
  71. package/dist/esm-node/ultramodern-workspace/policy.js +5 -5
  72. package/dist/esm-node/ultramodern-workspace/public-api.js +1 -0
  73. package/dist/esm-node/ultramodern-workspace/public-surface.js +2 -2
  74. package/dist/esm-node/ultramodern-workspace/versions.js +7 -1
  75. package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +108 -34
  76. package/dist/esm-node/ultramodern-workspace/write-workspace.js +66 -26
  77. package/dist/types/locale/en.d.ts +10 -0
  78. package/dist/types/locale/index.d.ts +20 -0
  79. package/dist/types/locale/zh.d.ts +10 -0
  80. package/dist/types/ultramodern-tooling/commands.d.ts +1 -0
  81. package/dist/types/ultramodern-tooling/config.d.ts +43 -0
  82. package/dist/types/ultramodern-workspace/add-vertical.d.ts +5 -2
  83. package/dist/types/ultramodern-workspace/api.d.ts +73 -0
  84. package/dist/types/ultramodern-workspace/bridge-config.d.ts +64 -0
  85. package/dist/types/ultramodern-workspace/codesmith.d.ts +1 -0
  86. package/dist/types/ultramodern-workspace/contracts.d.ts +2 -17
  87. package/dist/types/ultramodern-workspace/descriptors.d.ts +10 -10
  88. package/dist/types/ultramodern-workspace/fs-io.d.ts +1 -0
  89. package/dist/types/ultramodern-workspace/index.d.ts +2 -0
  90. package/dist/types/ultramodern-workspace/mf-validation.d.ts +27 -0
  91. package/dist/types/ultramodern-workspace/package-json.d.ts +5 -4
  92. package/dist/types/ultramodern-workspace/public-api.d.ts +2 -0
  93. package/dist/types/ultramodern-workspace/types.d.ts +9 -7
  94. package/dist/types/ultramodern-workspace/versions.d.ts +6 -0
  95. package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +2 -7
  96. package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -2
  97. package/package.json +5 -3
  98. package/template-workspace/{.agents → .codex}/skills-lock.json +12 -12
  99. package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +2 -0
  100. package/template-workspace/.gitignore.handlebars +3 -0
  101. package/template-workspace/AGENTS.md.handlebars +11 -5
  102. package/template-workspace/README.md.handlebars +55 -13
  103. package/template-workspace/oxfmt.config.ts +1 -0
  104. package/template-workspace/oxlint.config.ts +1 -0
  105. package/template-workspace/patches/@tanstack__router-core@1.171.13.patch +51 -0
  106. package/template-workspace/pnpm-workspace.yaml.handlebars +7 -0
  107. package/template-workspace/scripts/bootstrap-agent-skills.mjs +77 -67
  108. package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +51 -8
  109. package/templates/workspace-scripts/check-ultramodern-api-boundaries.mts +366 -0
  110. package/templates/workspace-scripts/{check-ultramodern-i18n-boundaries.mjs → check-ultramodern-i18n-boundaries.mts} +1 -1
  111. package/templates/workspace-scripts/generate-public-surface-assets.mjs +246 -9
  112. package/templates/workspace-scripts/proof-cloudflare-version.mjs +277 -9
  113. package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +35 -10
  114. package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +165 -2
  115. package/templates/workspace-scripts/ultramodern-typecheck.mjs +4 -2
  116. package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +842 -84
  117. package/dist/types/ultramodern-workspace/effect-api.d.ts +0 -73
  118. /package/template-workspace/{.agents → .codex}/rstackjs-agent-skills-LICENSE +0 -0
  119. /package/template-workspace/{.agents → .codex}/skills/rsbuild-best-practices/SKILL.md +0 -0
  120. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/SKILL.md +0 -0
  121. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/command-map.md +0 -0
  122. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/common-analysis-patterns.md +0 -0
  123. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-common.md +0 -0
  124. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-rspack.md +0 -0
  125. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-webpack.md +0 -0
  126. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor.md +0 -0
  127. /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/rsdoctor-data-types.md +0 -0
  128. /package/template-workspace/{.agents → .codex}/skills/rslib-best-practices/SKILL.md +0 -0
  129. /package/template-workspace/{.agents → .codex}/skills/rslib-modern-package/SKILL.md +0 -0
  130. /package/template-workspace/{.agents → .codex}/skills/rspack-best-practices/SKILL.md +0 -0
  131. /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/SKILL.md +0 -0
  132. /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/bottlenecks.md +0 -0
  133. /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/tracing-guide.md +0 -0
  134. /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/scripts/analyze_trace.js +0 -0
  135. /package/template-workspace/{.agents → .codex}/skills/rstest-best-practices/SKILL.md +0 -0
@@ -1,4 +1,5 @@
1
1
  import type { ResolvedUltramodernPackageSource, UltramodernPackageSourceStrategy } from '../ultramodern-package-source';
2
+ import type { UltramodernBridgeConfigInput } from './bridge-config';
2
3
  export type JsonValue = string | number | boolean | null | JsonValue[] | {
3
4
  [key: string]: JsonValue;
4
5
  };
@@ -18,11 +19,11 @@ export type WorkspaceApp = {
18
19
  port: number;
19
20
  mfName: string;
20
21
  exposes?: Record<string, string>;
21
- effectApi?: WorkspaceEffectApi;
22
+ api?: WorkspaceApi;
22
23
  verticalRefs?: string[];
23
24
  ownership: Ownership;
24
25
  };
25
- export type WorkspaceEffectApi = {
26
+ export type WorkspaceApi = {
26
27
  stem: string;
27
28
  prefix: string;
28
29
  consumedBy: string[];
@@ -78,6 +79,7 @@ export type UltramodernWorkspaceOptions = {
78
79
  modernVersion: string;
79
80
  enableTailwind?: boolean;
80
81
  overlays?: UltramodernCodeSmithOverlay[];
82
+ bridge?: UltramodernBridgeConfigInput;
81
83
  packageSource?: {
82
84
  strategy?: UltramodernPackageSourceStrategy;
83
85
  modernPackageVersion?: string;
@@ -111,7 +113,7 @@ export type UltramodernGeneratedAppDescriptor = {
111
113
  port: number;
112
114
  moduleFederationName: string;
113
115
  exposes?: Record<string, string>;
114
- effectApiPrefix?: string;
116
+ apiPrefix?: string;
115
117
  };
116
118
  /**
117
119
  * Stable public warning shape for non-fatal generator decisions.
@@ -136,7 +138,7 @@ export type UltramodernGenerationResult = {
136
138
  rewrittenPaths: string[];
137
139
  assignedPorts: Record<string, number>;
138
140
  moduleFederationNames: Record<string, string>;
139
- effectApiPrefixes: Record<string, string>;
141
+ apiPrefixes: Record<string, string>;
140
142
  generatedContractPath: string;
141
143
  warnings: UltramodernGenerationWarning[];
142
144
  };
@@ -154,8 +156,8 @@ export type UltramodernCodeSmithOverlayRuntimeConfig = {
154
156
  assignedPorts: Record<string, number>;
155
157
  moduleFederationName?: string;
156
158
  moduleFederationNames: Record<string, string>;
157
- effectApiPrefix?: string;
158
- effectApiPrefixes: Record<string, string>;
159
+ apiPrefix?: string;
160
+ apiPrefixes: Record<string, string>;
159
161
  packageSource: ResolvedPackageSource;
160
162
  generationResult: UltramodernGenerationResult;
161
163
  };
@@ -189,7 +191,7 @@ export type UltramodernVerticalPlan = UltramodernGenerationResult & {
189
191
  name: string;
190
192
  manifestUrl: string;
191
193
  };
192
- effectApiPrefix?: string;
194
+ apiPrefix?: string;
193
195
  jsonMutations: UltramodernJsonMutation[];
194
196
  shellDependencyChanges: UltramodernShellDependencyChange[];
195
197
  generatedContractChanges: UltramodernGeneratedContractChange[];
@@ -4,6 +4,7 @@
4
4
  * checked-in templates under templates/ and template-workspace/.
5
5
  */
6
6
  export declare const TANSTACK_ROUTER_VERSION = "1.170.16";
7
+ export declare const TANSTACK_ROUTER_CORE_VERSION = "1.171.13";
7
8
  export declare const MODULE_FEDERATION_VERSION = "2.6.0";
8
9
  export declare const ZEPHYR_RSPACK_PLUGIN_VERSION = "1.1.1";
9
10
  export declare const ZEPHYR_AGENT_VERSION = "1.1.1";
@@ -12,6 +13,8 @@ export declare const CLOUDFLARE_COMPATIBILITY_DATE = "2026-06-02";
12
13
  export declare const TAILWIND_VERSION = "4.3.1";
13
14
  export declare const TAILWIND_POSTCSS_VERSION = "4.3.1";
14
15
  export declare const POSTCSS_VERSION = "8.5.15";
16
+ export declare const EFFECT_VERSION = "4.0.0-beta.89";
17
+ export declare const EFFECT_VITEST_VERSION = "4.0.0-beta.89";
15
18
  export declare const EFFECT_TSGO_VERSION = "0.14.6";
16
19
  export declare const TYPESCRIPT_STABLE_VERSION = "6.0.3";
17
20
  export declare const TYPESCRIPT_NATIVE_PREVIEW_VERSION = "7.0.0-dev.20260624.1";
@@ -33,7 +36,10 @@ export declare const RSTACK_AGENT_SKILLS_COMMIT = "61c948b42512e223bad44b83af408
33
36
  export declare const MODULE_FEDERATION_AGENT_SKILLS_COMMIT = "07bb5b6c43ad457609e00c081b72d4c42508ec76";
34
37
  export declare const ultramodernWorkspaceVersions: {
35
38
  tanstackRouter: string;
39
+ tanstackRouterCore: string;
36
40
  moduleFederation: string;
41
+ effect: string;
42
+ effectVitest: string;
37
43
  tailwind: string;
38
44
  tailwindPostcss: string;
39
45
  };
@@ -1,11 +1,6 @@
1
1
  import type { WorkspaceApp } from './types';
2
- export declare function createAssertMfTypesScript(remotes?: WorkspaceApp[]): string;
3
2
  export declare function createWorkspaceValidationScript(scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): string;
4
3
  export declare function createWorkspaceI18nBoundaryValidationScript(): string;
5
- export declare function createPublicSurfaceAssetsScript(): string;
6
- export declare function createCloudflareProofHelperScript(): string;
7
- export declare function createCloudflareVersionProofScript(): string;
4
+ export declare function createWorkspaceApiBoundaryValidationScript(): string;
8
5
  export declare function createPerformanceReadinessConfigScript(): string;
9
- export declare function createPerformanceReadinessScript(): string;
10
- export declare function createUltramodernTypecheckScript(): string;
11
- export declare function writeGeneratedWorkspaceScripts(targetDir: string, scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
6
+ export declare function writeGeneratedWorkspaceScripts(targetDir: string, _scope: string, _enableTailwind: boolean, _remotes?: WorkspaceApp[]): void;
@@ -1,4 +1,6 @@
1
- import type { ResolvedPackageSource, UltramodernGenerationResult, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
2
- export declare function writeApp(targetDir: string, scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
1
+ import type { UltramodernBridgeConfig } from './bridge-config';
2
+ import type { JsonValue, ResolvedPackageSource, UltramodernGenerationResult, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
3
+ export declare function writeApp(targetDir: string, scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[], bridge?: UltramodernBridgeConfig): void;
3
4
  export declare function writeSharedPackages(targetDir: string, scope: string): void;
5
+ export declare function createCompactUltramodernConfig(scope: string, modernVersion: string, packageSource: ResolvedPackageSource, apps?: WorkspaceApp[], enableTailwind?: boolean, bridge?: UltramodernBridgeConfig): JsonValue;
4
6
  export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): UltramodernGenerationResult;
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
24
- "version": "3.4.0-ultramodern.9",
24
+ "version": "3.5.0-ultramodern.1",
25
25
  "types": "./dist/types/index.d.ts",
26
26
  "main": "./dist/esm-node/index.js",
27
27
  "bin": {
@@ -75,7 +75,9 @@
75
75
  ],
76
76
  "dependencies": {
77
77
  "@modern-js/codesmith": "2.6.9",
78
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.9"
78
+ "oxfmt": "0.55.0",
79
+ "ultracite": "7.8.3",
80
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.5.0-ultramodern.1"
79
81
  },
80
82
  "devDependencies": {
81
83
  "@rslib/core": "0.23.0",
@@ -97,6 +99,6 @@
97
99
  "test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
98
100
  },
99
101
  "ultramodern": {
100
- "frameworkVersion": "3.4.0-ultramodern.9"
102
+ "frameworkVersion": "3.5.0-ultramodern.1"
101
103
  }
102
104
  }
@@ -4,9 +4,9 @@
4
4
  "repository": "https://github.com/rstackjs/agent-skills",
5
5
  "commit": "61c948b42512e223bad44b83af4080eba48b2677",
6
6
  "license": "MIT",
7
- "licensePath": ".agents/rstackjs-agent-skills-LICENSE"
7
+ "licensePath": ".codex/rstackjs-agent-skills-LICENSE"
8
8
  },
9
- "installDir": ".agents/skills",
9
+ "installDir": ".codex/skills",
10
10
  "sources": [
11
11
  {
12
12
  "id": "rstack-agent-skills",
@@ -14,7 +14,7 @@
14
14
  "repository": "https://github.com/rstackjs/agent-skills",
15
15
  "commit": "61c948b42512e223bad44b83af4080eba48b2677",
16
16
  "license": "MIT",
17
- "licensePath": ".agents/rstackjs-agent-skills-LICENSE",
17
+ "licensePath": ".codex/rstackjs-agent-skills-LICENSE",
18
18
  "install": "vendored"
19
19
  },
20
20
  {
@@ -26,7 +26,7 @@
26
26
  "baseline": [
27
27
  {
28
28
  "name": "mf",
29
- "path": ".agents/skills/mf",
29
+ "path": ".codex/skills/mf",
30
30
  "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
31
31
  }
32
32
  ]
@@ -63,42 +63,42 @@
63
63
  "baseline": [
64
64
  {
65
65
  "name": "rsbuild-best-practices",
66
- "path": ".agents/skills/rsbuild-best-practices",
66
+ "path": ".codex/skills/rsbuild-best-practices",
67
67
  "reason": "Modern.js application build configuration and Rsbuild troubleshooting"
68
68
  },
69
69
  {
70
70
  "name": "rspack-best-practices",
71
- "path": ".agents/skills/rspack-best-practices",
71
+ "path": ".codex/skills/rspack-best-practices",
72
72
  "reason": "Rspack bundling, CSS, asset, profiling, and production behavior"
73
73
  },
74
74
  {
75
75
  "name": "rspack-tracing",
76
- "path": ".agents/skills/rspack-tracing",
76
+ "path": ".codex/skills/rspack-tracing",
77
77
  "reason": "Trace-backed Rspack failure and performance debugging"
78
78
  },
79
79
  {
80
80
  "name": "rsdoctor-analysis",
81
- "path": ".agents/skills/rsdoctor-analysis",
81
+ "path": ".codex/skills/rsdoctor-analysis",
82
82
  "reason": "Evidence-backed bundle composition, duplication, and retained-module analysis"
83
83
  },
84
84
  {
85
85
  "name": "rslib-best-practices",
86
- "path": ".agents/skills/rslib-best-practices",
86
+ "path": ".codex/skills/rslib-best-practices",
87
87
  "reason": "Rslib shared package and design-system library authoring"
88
88
  },
89
89
  {
90
90
  "name": "rslib-modern-package",
91
- "path": ".agents/skills/rslib-modern-package",
91
+ "path": ".codex/skills/rslib-modern-package",
92
92
  "reason": "Modern package contracts, exports, declarations, side effects, and release readiness"
93
93
  },
94
94
  {
95
95
  "name": "rstest-best-practices",
96
- "path": ".agents/skills/rstest-best-practices",
96
+ "path": ".codex/skills/rstest-best-practices",
97
97
  "reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
98
98
  },
99
99
  {
100
100
  "name": "mf",
101
- "path": ".agents/skills/mf",
101
+ "path": ".codex/skills/mf",
102
102
  "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
103
103
  }
104
104
  ],
@@ -34,6 +34,8 @@ jobs:
34
34
  command: pnpm skills:check
35
35
  - name: I18n Boundaries
36
36
  command: pnpm i18n:boundaries
37
+ - name: API Boundaries
38
+ command: pnpm api:check
37
39
  - name: Contract
38
40
  command: pnpm contract:check
39
41
  - name: Build
@@ -2,4 +2,7 @@ node_modules/
2
2
  dist/
3
3
  build/
4
4
  .modernjs/cache/
5
+ .modern-js/
6
+ **/.modern-js/
5
7
  .modernjs/agent-reference-repos-tmp/
8
+ .codex/reports/
@@ -1,7 +1,7 @@
1
1
  # UltraModern Agent Contract
2
2
 
3
3
  This workspace is generated as an agent-ready UltraModern.js SuperApp shell.
4
- Agents should treat the files under `.agents/skills` as local project
4
+ Codex should treat the files under `.codex/skills` as local project
5
5
  instructions, not optional reading.
6
6
 
7
7
  ## Quality Gates
@@ -19,7 +19,7 @@ baseline; do not reintroduce Corepack or older pnpm aliases.
19
19
  - `pnpm check` is a local convenience aggregate for the primitive gates.
20
20
  - Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
21
21
  - Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
22
- - `postinstall` formats the generated tree and installs `lefthook`. It never clones repositories or installs system packages; agent skill repos and reference repos are explicit opt-in steps (`pnpm skills:install`, `pnpm agents:refs:install`). Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
22
+ - `postinstall` formats the generated tree, installs/updates pinned Codex skills, and installs `lefthook`. It never installs system packages. Clone-backed public skills are attempted by default; offline clone failures are advisory. Reference repos remain an explicit `pnpm agents:refs:install` step. Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
23
23
 
24
24
  ## Localized Routes
25
25
 
@@ -48,7 +48,13 @@ Use these skills when the task touches the matching subsystem:
48
48
  - `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
49
49
  - `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
50
50
 
51
- The public `module-federation/agent-skills` repository is installed only when you explicitly run `pnpm skills:install` (or set `ULTRAMODERN_AGENT_SKILLS=1` before `pnpm install`). Postinstall never clones repositories. `pnpm skills:install` remains strict for required public skills. `pnpm skills:check` fails when a vendored skill is missing and warns when clone-installed skills such as `mf` have not been fetched yet.
51
+ Skill bodies are lockfile-pinned in `.codex/skills-lock.json` and installed
52
+ into the repo-owned `.codex/skills` directory by default. The installer updates
53
+ only pinned skill directories and preserves unrelated user skills already
54
+ present under `.codex/skills`. Set `ULTRAMODERN_SKIP_CODEX_SKILLS=1` or
55
+ `ULTRAMODERN_CODEX_SKILLS=0` to opt out during install. `pnpm skills:check` is
56
+ advisory when local skill bodies are missing so offline CI can still run the
57
+ normal gate.
52
58
 
53
59
  ## Private Skills
54
60
 
@@ -58,7 +64,7 @@ ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the curren
58
64
  pnpm skills:install
59
65
  ```
60
66
 
61
- The installer copies only the pinned private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
67
+ The installer copies only the pinned private skills from `.codex/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
62
68
 
63
69
  ## Agent Reference Repositories
64
70
 
@@ -85,4 +91,4 @@ Agents may read files under `repos/` to understand upstream patterns, APIs, and
85
91
 
86
92
  ## Skill Provenance
87
93
 
88
- The vendored Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.agents/skills-lock.json`. Do not update, remove, or replace them casually. If a skill needs updating, update the lock file and run the affected primitive gate plus `pnpm check`.
94
+ The Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.codex/skills-lock.json`. Do not update, remove, or replace them casually. If a skill needs updating, update the lock file and run the affected primitive gate plus `pnpm check`.
@@ -69,7 +69,7 @@ typecheck, skills, i18n boundary validation, contract validation, and build as
69
69
  separate matrix jobs so failures are isolated and parallelizable.
70
70
 
71
71
  Type checking is TS7-first. `pnpm typecheck` runs
72
- `scripts/ultramodern-typecheck.mjs` in TS-Go build mode over
72
+ `scripts/ultramodern-typecheck.mts` in TS-Go build mode over
73
73
  `tsconfig.json` project references, with native-preview `--checkers` and
74
74
  `--builders` enabled by default. `@typescript/native-preview` is the TS7 latest
75
75
  dev compiler lane. The classic `typescript` package is pinned to latest TS6
@@ -80,11 +80,14 @@ UltraModern.js source lookup using squashed git subtrees) are an explicit
80
80
  opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
81
81
  never clones repositories.
82
82
 
83
- Vendored agent skills ship with the scaffold. Clone-installed skills (such as
84
- the Module Federation `mf` skill) are fetched only when you explicitly run
85
- `pnpm skills:install`, or when `ULTRAMODERN_AGENT_SKILLS=1` is set during
86
- `pnpm install`. `pnpm skills:check` warns about missing clone-installed skills
87
- without failing the gate.
83
+ Codex skill bodies are lockfile-pinned in `.codex/skills-lock.json` and
84
+ repo-owned under `.codex/skills`. `pnpm install` runs the bootstrap by default:
85
+ vendored pinned skills are copied locally, clone-backed public skills are
86
+ fetched when network access is available, and offline clone failures remain
87
+ advisory. Existing unrelated `.codex/skills/*` directories are preserved. Set
88
+ `ULTRAMODERN_SKIP_CODEX_SKILLS=1` or `ULTRAMODERN_CODEX_SKILLS=0` to opt out.
89
+ `pnpm skills:check` is advisory when local skill bodies are missing so offline
90
+ CI can still run the normal gate.
88
91
 
89
92
  The topology and ownership metadata are generated under `topology/`. The
90
93
  workspace also ships `.github/workflows/ultramodern-workspace-gates.yml` and
@@ -93,12 +96,12 @@ actions, frozen installs, StepSecurity audit-mode runner hardening, dependency
93
96
  dashboard review, one-day release age, grouped updates, and manual approval for
94
97
  major upgrades.
95
98
 
96
- Package source metadata is generated at
97
- `.modernjs/ultramodern-package-source.json`. The default strategy keeps
98
- UltraModern.js runtime and tooling packages on `workspace:*` for monorepo
99
- development. To create a workspace that can install those packages outside the
100
- monorepo, generate with `--ultramodern-package-source install`; generated shared
101
- packages still use `workspace:*` because they are part of this workspace.
99
+ Package source provenance is recorded in `.modernjs/ultramodern.json`. The
100
+ default strategy keeps UltraModern.js runtime and tooling packages on
101
+ `workspace:*` for monorepo development. To create a workspace that can install
102
+ those packages outside the monorepo, generate with
103
+ `--ultramodern-package-source install`; generated shared packages still use
104
+ `workspace:*` because they are part of this workspace.
102
105
 
103
106
  ## Public URL Environment Variables
104
107
 
@@ -144,14 +147,53 @@ ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.d
144
147
  pnpm cloudflare:proof -- --require-public-urls
145
148
  ```
146
149
 
150
+ ## Strict Effect API
151
+
152
+ Generated HTTP APIs use the direct strict Effect topology only:
153
+
154
+ - API contracts live at `shared/api.ts`.
155
+ - Runtime entries live at `api/index.ts`.
156
+ - Browser clients live under `src/api/*-client.ts`.
157
+ - `modern.config.ts` uses `bff.runtimeFramework: 'effect'`,
158
+ `bff.effect.entry: './api/index'`, and
159
+ `bff.effect.strictEffectApproach: true`.
160
+
161
+ Do not add `api/effect`, `api/lambda`, `shared/effect`, `src/effect`, Hono
162
+ server imports, raw request handlers, manual `request.json()` parsing, or
163
+ manual `new Response(...)` construction inside generated API modules.
164
+ `pnpm api:check` and Oxlint enforce this. Model requests, responses, and typed
165
+ errors with concrete Effect `Schema` values; generic JSON shortcuts such as
166
+ `Schema.UnknownFromJsonString`, `Schema.Unknown`, and `Schema.Any` are rejected
167
+ in API modules.
168
+
169
+ Generated pnpm overrides pin the framework-compatible Effect cohort. Keep
170
+ `effect` and `@effect/vitest` aligned with `pnpm-workspace.yaml`; do not add
171
+ new direct package-level Effect versions unless the whole UltraModern cohort is
172
+ upgraded.
173
+
174
+ For older generated workspaces, run the framework migration command first:
175
+
176
+ ```bash
177
+ pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.1 ultramodern \
178
+ migrate-strict-effect --version 3.5.0-ultramodern.1
179
+ pnpm api:check
180
+ pnpm contract:check
181
+ ```
182
+
183
+ The command updates generated package-source metadata, Modern package aliases,
184
+ direct API topology metadata, and the lockfile. Remaining failures are source
185
+ migration work; fix the owning API files instead of adding compatibility shims.
186
+
147
187
  ## Troubleshooting
148
188
 
149
189
  | Symptom | Current check | Owner |
150
190
  | --- | --- | --- |
151
191
  | Package cohort mismatch | Regenerate with one package source strategy, run `mise install`, then rerun `pnpm install` from the activated shell. | Generated workspace package source metadata |
192
+ | Effect runtime cohort mismatch | Keep `effect` and `@effect/vitest` on the generated pnpm override versions, then rerun `pnpm install`. | Generated workspace dependency policy |
193
+ | Old nested API path | Run `pnpm api:check`, move code to `api/index.ts`, `shared/api.ts`, and `src/api/*`, then delete `api/effect`, `api/lambda`, `shared/effect`, and `src/effect`. | API owner |
152
194
  | Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
153
195
  | Build failure | Run the matching primitive gate (`pnpm lint`, `pnpm typecheck`, `pnpm i18n:boundaries`, `pnpm contract:check`) before `pnpm build`; fix the owning failure first. | Owning package or generated contract |
154
- | Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
196
+ | Missing public URL | Set the app public URL env key recorded in `.modernjs/ultramodern.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
155
197
  | Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
156
198
  | Asset or CSS 404 | Rebuild with `pnpm build` or `pnpm cloudflare:deploy` and inspect emitted Modern/Rspack asset paths instead of hardcoding CSS URLs. | Framework/runtime asset pipeline |
157
199
  | Federation manifest failure | Run the shell and vertical build scripts, then check each deployed `/mf-manifest.json` URL used by the shell. | Module Federation owner |
@@ -5,6 +5,7 @@ export default defineConfig({
5
5
  extends: [ultracite],
6
6
  ignorePatterns: [
7
7
  '.agents',
8
+ '.codex/skills',
8
9
  '.output',
9
10
  '**/*.json',
10
11
  'dist',
@@ -10,6 +10,7 @@ export default defineConfig({
10
10
  extends: [core, react],
11
11
  ignorePatterns: [
12
12
  '.agents',
13
+ '.codex/skills',
13
14
  '.output',
14
15
  'dist',
15
16
  'node_modules',
@@ -0,0 +1,51 @@
1
+ diff --git a/dist/cjs/load-matches.cjs b/dist/cjs/load-matches.cjs
2
+ index c09976a80c2c112b7dac6f941e643c81eeaf8d52..ec5156d89e9c5924a9ec0c19aad79711124f9ff4 100644
3
+ --- a/dist/cjs/load-matches.cjs
4
+ +++ b/dist/cjs/load-matches.cjs
5
+ @@ -442,0 +443 @@
6
+ + if (!match) return;
7
+ @@ -472,0 +474 @@
8
+ + if (!match) return inner.matches[index];
9
+ @@ -487,0 +490 @@
10
+ + if (!match) return inner.matches[index];
11
+ @@ -503 +506 @@
12
+ - return inner.router.getMatch(matchId);
13
+ + return inner.router.getMatch(matchId) ?? inner.matches[index];
14
+ diff --git a/dist/esm/load-matches.js b/dist/esm/load-matches.js
15
+ index bcea2e0d88d037a01b93bf36dd6e643f98028e83..57484bf2825dab47030a1d4f905b9fb2e6067310 100644
16
+ --- a/dist/esm/load-matches.js
17
+ +++ b/dist/esm/load-matches.js
18
+ @@ -442,0 +443 @@
19
+ + if (!match) return;
20
+ @@ -472,0 +474 @@
21
+ + if (!match) return inner.matches[index];
22
+ @@ -487,0 +490 @@
23
+ + if (!match) return inner.matches[index];
24
+ @@ -503 +506 @@
25
+ - return inner.router.getMatch(matchId);
26
+ + return inner.router.getMatch(matchId) ?? inner.matches[index];
27
+ diff --git a/src/load-matches.ts b/src/load-matches.ts
28
+ index f901a0c97ddf0618dd83229ac260277b46e2676d..76674e01e89ac2cbaba4d776c2be3bf0e3fdb432 100644
29
+ --- a/src/load-matches.ts
30
+ +++ b/src/load-matches.ts
31
+ @@ -838 +838,4 @@
32
+ - const match = inner.router.getMatch(matchId)!
33
+ + const match = inner.router.getMatch(matchId)
34
+ + if (!match) {
35
+ + return
36
+ + }
37
+ @@ -906 +909,4 @@
38
+ - const match = inner.router.getMatch(matchId)!
39
+ + const match = inner.router.getMatch(matchId)
40
+ + if (!match) {
41
+ + return inner.matches[index]!
42
+ + }
43
+ @@ -936 +942,4 @@
44
+ - const match = inner.router.getMatch(matchId)!
45
+ + const match = inner.router.getMatch(matchId)
46
+ + if (!match) {
47
+ + return inner.matches[index]!
48
+ + }
49
+ @@ -955 +964 @@
50
+ - return inner.router.getMatch(matchId)!
51
+ + return inner.router.getMatch(matchId) ?? inner.matches[index]!
@@ -37,10 +37,14 @@ peerDependencyRules:
37
37
  '@module-federation/enhanced>typescript': '{{typescriptVersion}}'
38
38
  '@module-federation/modern-js-v3>typescript': '{{typescriptVersion}}'
39
39
  '@module-federation/rspack>typescript': '{{typescriptVersion}}'
40
+ '@effect/vitest>effect': '{{effectVersion}}'
40
41
  'i18next>typescript': '{{typescriptVersion}}'
41
42
 
42
43
  overrides:
43
44
  '@tanstack/react-router': {{tanstackRouterVersion}}
45
+ '@tanstack/router-core': {{tanstackRouterCoreVersion}}
46
+ '@effect/vitest': {{effectVitestVersion}}
47
+ effect: {{effectVersion}}
44
48
  node-fetch: '{{nodeFetchVersion}}'
45
49
 
46
50
  allowBuilds:
@@ -51,3 +55,6 @@ allowBuilds:
51
55
  msgpackr-extract: true
52
56
  sharp: true
53
57
  workerd: true
58
+
59
+ patchedDependencies:
60
+ '@tanstack/router-core@{{tanstackRouterCoreVersion}}': patches/@tanstack__router-core@{{tanstackRouterCoreVersion}}.patch