@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.120

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 (75) hide show
  1. package/README.md +146 -74
  2. package/bin/run.js +0 -0
  3. package/dist/cjs/create-package-root.cjs +65 -0
  4. package/dist/cjs/index.cjs +498 -0
  5. package/dist/cjs/locale/en.cjs +94 -0
  6. package/dist/cjs/locale/index.cjs +50 -0
  7. package/dist/cjs/locale/zh.cjs +94 -0
  8. package/dist/cjs/ultramodern-package-source.cjs +135 -0
  9. package/dist/cjs/ultramodern-workspace.cjs +6797 -0
  10. package/dist/esm/create-package-root.js +16 -0
  11. package/dist/esm/index.js +461 -0
  12. package/dist/esm/locale/en.js +56 -0
  13. package/dist/esm/locale/index.js +9 -0
  14. package/dist/esm/locale/zh.js +56 -0
  15. package/dist/esm/ultramodern-package-source.js +63 -0
  16. package/dist/esm/ultramodern-workspace.js +6738 -0
  17. package/dist/esm-node/create-package-root.js +17 -0
  18. package/dist/esm-node/index.js +462 -0
  19. package/dist/esm-node/locale/en.js +57 -0
  20. package/dist/esm-node/locale/index.js +10 -0
  21. package/dist/esm-node/locale/zh.js +57 -0
  22. package/dist/esm-node/ultramodern-package-source.js +64 -0
  23. package/dist/esm-node/ultramodern-workspace.js +6739 -0
  24. package/dist/types/create-package-root.d.ts +1 -0
  25. package/dist/types/locale/en.d.ts +7 -7
  26. package/dist/types/locale/index.d.ts +111 -2
  27. package/dist/types/locale/zh.d.ts +7 -7
  28. package/dist/types/ultramodern-package-source.d.ts +28 -0
  29. package/dist/types/ultramodern-workspace.d.ts +12 -3
  30. package/package.json +33 -15
  31. package/template-workspace/.agents/agent-reference-repos.json +24 -0
  32. package/template-workspace/.agents/skills-lock.json +19 -0
  33. package/template-workspace/.codex/hooks.json +16 -0
  34. package/template-workspace/.github/renovate.json +29 -0
  35. package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +70 -0
  36. package/template-workspace/.gitignore.handlebars +5 -0
  37. package/template-workspace/.mise.toml.handlebars +2 -0
  38. package/template-workspace/AGENTS.md +43 -11
  39. package/template-workspace/README.md.handlebars +116 -11
  40. package/template-workspace/lefthook.yml +24 -0
  41. package/template-workspace/oxfmt.config.ts +1 -0
  42. package/template-workspace/oxlint.config.ts +1 -0
  43. package/template-workspace/pnpm-workspace.yaml +31 -8
  44. package/template-workspace/scripts/bootstrap-agent-skills.mjs +204 -21
  45. package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
  46. package/dist/index.js +0 -2626
  47. package/template/.agents/skills-lock.json +0 -34
  48. package/template/.browserslistrc +0 -4
  49. package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -30
  50. package/template/.gitignore.handlebars +0 -30
  51. package/template/.nvmrc +0 -2
  52. package/template/AGENTS.md +0 -25
  53. package/template/README.md +0 -79
  54. package/template/api/effect/index.ts.handlebars +0 -23
  55. package/template/api/lambda/hello.ts.handlebars +0 -6
  56. package/template/config/public/locales/cs/translation.json +0 -39
  57. package/template/config/public/locales/en/translation.json +0 -39
  58. package/template/modern.config.ts.handlebars +0 -53
  59. package/template/oxfmt.config.ts +0 -8
  60. package/template/oxlint.config.ts +0 -12
  61. package/template/package.json.handlebars +0 -67
  62. package/template/postcss.config.mjs.handlebars +0 -6
  63. package/template/scripts/bootstrap-agent-skills.mjs +0 -95
  64. package/template/scripts/check-i18n-strings.mjs +0 -83
  65. package/template/scripts/validate-ultramodern.mjs.handlebars +0 -178
  66. package/template/shared/effect/api.ts.handlebars +0 -17
  67. package/template/src/modern-app-env.d.ts +0 -1
  68. package/template/src/modern.runtime.ts.handlebars +0 -23
  69. package/template/src/routes/index.css.handlebars +0 -129
  70. package/template/src/routes/layout.tsx.handlebars +0 -9
  71. package/template/src/routes/page.tsx.handlebars +0 -155
  72. package/template/tailwind.config.ts.handlebars +0 -10
  73. package/template/tsconfig.json +0 -120
  74. package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
  75. package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
@@ -0,0 +1 @@
1
+ export declare function resolveCreatePackageRoot(fromDir: string): string;
@@ -1,12 +1,12 @@
1
1
  export declare const EN_LOCALE: {
2
2
  prompt: {
3
3
  projectName: string;
4
+ legacyModernJsConfirmation: string;
4
5
  };
5
6
  error: {
6
7
  projectNameEmpty: string;
7
8
  directoryExists: string;
8
- invalidRouter: string;
9
- invalidBffRuntime: string;
9
+ legacyModernJsNotConfirmed: string;
10
10
  createFailed: string;
11
11
  };
12
12
  message: {
@@ -16,6 +16,7 @@ export declare const EN_LOCALE: {
16
16
  step1: string;
17
17
  step2: string;
18
18
  step3: string;
19
+ legacyModernJsWarning: string;
19
20
  };
20
21
  help: {
21
22
  title: string;
@@ -26,16 +27,13 @@ export declare const EN_LOCALE: {
26
27
  optionHelp: string;
27
28
  optionVersion: string;
28
29
  optionLang: string;
29
- optionRouter: string;
30
- optionBff: string;
31
- optionBffRuntime: string;
32
30
  optionTailwind: string;
33
31
  optionWorkspace: string;
34
- optionUltramodernWorkspace: string;
35
32
  optionUltramodernPackageSource: string;
36
33
  optionUltramodernPackageScope: string;
37
34
  optionUltramodernPackageNamePrefix: string;
38
- optionSub: string;
35
+ optionVertical: string;
36
+ optionLegacyModernJs: string;
39
37
  examples: string;
40
38
  example1: string;
41
39
  example2: string;
@@ -47,6 +45,8 @@ export declare const EN_LOCALE: {
47
45
  example8: string;
48
46
  example9: string;
49
47
  example10: string;
48
+ example11: string;
49
+ example12: string;
50
50
  moreInfo: string;
51
51
  };
52
52
  version: {
@@ -1,3 +1,112 @@
1
- declare const i18n: any;
2
- declare const localeKeys: any;
1
+ import { I18n } from '@modern-js/i18n-utils';
2
+ declare const i18n: I18n;
3
+ declare const localeKeys: {
4
+ prompt: {
5
+ projectName: string;
6
+ legacyModernJsConfirmation: string;
7
+ };
8
+ error: {
9
+ projectNameEmpty: string;
10
+ directoryExists: string;
11
+ legacyModernJsNotConfirmed: string;
12
+ createFailed: string;
13
+ };
14
+ message: {
15
+ welcome: string;
16
+ success: string;
17
+ nextSteps: string;
18
+ step1: string;
19
+ step2: string;
20
+ step3: string;
21
+ legacyModernJsWarning: string;
22
+ };
23
+ help: {
24
+ title: string;
25
+ description: string;
26
+ usage: string;
27
+ usageExample: string;
28
+ options: string;
29
+ optionHelp: string;
30
+ optionVersion: string;
31
+ optionLang: string;
32
+ optionTailwind: string;
33
+ optionWorkspace: string;
34
+ optionUltramodernPackageSource: string;
35
+ optionUltramodernPackageScope: string;
36
+ optionUltramodernPackageNamePrefix: string;
37
+ optionVertical: string;
38
+ optionLegacyModernJs: string;
39
+ examples: string;
40
+ example1: string;
41
+ example2: string;
42
+ example3: string;
43
+ example4: string;
44
+ example5: string;
45
+ example6: string;
46
+ example7: string;
47
+ example8: string;
48
+ example9: string;
49
+ example10: string;
50
+ example11: string;
51
+ example12: string;
52
+ moreInfo: string;
53
+ };
54
+ version: {
55
+ message: string;
56
+ };
57
+ } | {
58
+ prompt: {
59
+ projectName: string;
60
+ legacyModernJsConfirmation: string;
61
+ };
62
+ error: {
63
+ projectNameEmpty: string;
64
+ directoryExists: string;
65
+ legacyModernJsNotConfirmed: string;
66
+ createFailed: string;
67
+ };
68
+ message: {
69
+ welcome: string;
70
+ success: string;
71
+ nextSteps: string;
72
+ step1: string;
73
+ step2: string;
74
+ step3: string;
75
+ legacyModernJsWarning: string;
76
+ };
77
+ help: {
78
+ title: string;
79
+ description: string;
80
+ usage: string;
81
+ usageExample: string;
82
+ options: string;
83
+ optionHelp: string;
84
+ optionVersion: string;
85
+ optionLang: string;
86
+ optionTailwind: string;
87
+ optionWorkspace: string;
88
+ optionUltramodernPackageSource: string;
89
+ optionUltramodernPackageScope: string;
90
+ optionUltramodernPackageNamePrefix: string;
91
+ optionVertical: string;
92
+ optionLegacyModernJs: string;
93
+ examples: string;
94
+ example1: string;
95
+ example2: string;
96
+ example3: string;
97
+ example4: string;
98
+ example5: string;
99
+ example6: string;
100
+ example7: string;
101
+ example8: string;
102
+ example9: string;
103
+ example10: string;
104
+ example11: string;
105
+ example12: string;
106
+ moreInfo: string;
107
+ };
108
+ version: {
109
+ message: string;
110
+ };
111
+ };
3
112
  export { i18n, localeKeys };
@@ -1,12 +1,12 @@
1
1
  export declare const ZH_LOCALE: {
2
2
  prompt: {
3
3
  projectName: string;
4
+ legacyModernJsConfirmation: string;
4
5
  };
5
6
  error: {
6
7
  projectNameEmpty: string;
7
8
  directoryExists: string;
8
- invalidRouter: string;
9
- invalidBffRuntime: string;
9
+ legacyModernJsNotConfirmed: string;
10
10
  createFailed: string;
11
11
  };
12
12
  message: {
@@ -16,6 +16,7 @@ export declare const ZH_LOCALE: {
16
16
  step1: string;
17
17
  step2: string;
18
18
  step3: string;
19
+ legacyModernJsWarning: string;
19
20
  };
20
21
  help: {
21
22
  title: string;
@@ -26,16 +27,13 @@ export declare const ZH_LOCALE: {
26
27
  optionHelp: string;
27
28
  optionVersion: string;
28
29
  optionLang: string;
29
- optionRouter: string;
30
- optionBff: string;
31
- optionBffRuntime: string;
32
30
  optionTailwind: string;
33
31
  optionWorkspace: string;
34
- optionUltramodernWorkspace: string;
35
32
  optionUltramodernPackageSource: string;
36
33
  optionUltramodernPackageScope: string;
37
34
  optionUltramodernPackageNamePrefix: string;
38
- optionSub: string;
35
+ optionVertical: string;
36
+ optionLegacyModernJs: string;
39
37
  examples: string;
40
38
  example1: string;
41
39
  example2: string;
@@ -47,6 +45,8 @@ export declare const ZH_LOCALE: {
47
45
  example8: string;
48
46
  example9: string;
49
47
  example10: string;
48
+ example11: string;
49
+ example12: string;
50
50
  moreInfo: string;
51
51
  };
52
52
  version: {
@@ -0,0 +1,28 @@
1
+ export declare const WORKSPACE_PACKAGE_VERSION = "workspace:*";
2
+ export declare const BLEEDINGDEV_CREATE_PACKAGE = "@bleedingdev/modern-js-create";
3
+ export declare const BLEEDINGDEV_PACKAGE_SCOPE = "bleedingdev";
4
+ export declare const BLEEDINGDEV_PACKAGE_NAME_PREFIX = "modern-js-";
5
+ export declare const BLEEDINGDEV_FRAMEWORK_VERSION_ENV = "MODERN_CREATE_ULTRAMODERN_FRAMEWORK_VERSION";
6
+ export declare const ULTRAMODERN_SINGLE_APP_MODERN_PACKAGES: readonly ['@modern-js/create', '@modern-js/code-tools', '@modern-js/runtime', '@modern-js/app-tools', '@modern-js/tsconfig', '@modern-js/plugin-i18n', '@modern-js/plugin-tanstack', '@modern-js/plugin-bff', '@modern-js/adapter-rstest'];
7
+ export declare const ULTRAMODERN_WORKSPACE_MODERN_PACKAGES: readonly ['@modern-js/create', '@modern-js/code-tools', '@modern-js/app-tools', '@modern-js/plugin-bff', '@modern-js/plugin-i18n', '@modern-js/plugin-tanstack', '@modern-js/runtime'];
8
+ export type UltramodernPackageSourceStrategy = 'workspace' | 'install';
9
+ export type ResolvedUltramodernPackageSource = {
10
+ strategy: UltramodernPackageSourceStrategy;
11
+ modernPackageVersion: string;
12
+ registry?: string;
13
+ aliasScope?: string;
14
+ aliasPackageNamePrefix?: string;
15
+ };
16
+ export type UltramodernModernPackagesMetadata = {
17
+ packages: string[];
18
+ specifier: string;
19
+ registry?: string;
20
+ aliases?: Record<string, string>;
21
+ };
22
+ export declare function modernPackageVersion(packageSource: ResolvedUltramodernPackageSource): string;
23
+ export declare function modernAliasPackageName(packageName: string, packageSource: ResolvedUltramodernPackageSource): string;
24
+ export declare function modernPackageSpecifier(packageName: string, packageSource: ResolvedUltramodernPackageSource): string;
25
+ export declare function modernPackageAliases(packageNames: readonly string[], packageSource: ResolvedUltramodernPackageSource): Record<string, string> | undefined;
26
+ export declare function createModernPackagesMetadata(packageNames: readonly string[], packageSource: ResolvedUltramodernPackageSource, options?: {
27
+ includeAliases?: boolean;
28
+ }): UltramodernModernPackagesMetadata;
@@ -1,8 +1,9 @@
1
- type UltramodernPackageSourceStrategy = 'workspace' | 'install';
1
+ import { type UltramodernPackageSourceStrategy } from './ultramodern-package-source';
2
2
  export type UltramodernWorkspaceOptions = {
3
3
  targetDir: string;
4
4
  packageName: string;
5
5
  modernVersion: string;
6
+ enableTailwind?: boolean;
6
7
  packageSource?: {
7
8
  strategy?: UltramodernPackageSourceStrategy;
8
9
  modernPackageVersion?: string;
@@ -11,10 +12,18 @@ export type UltramodernWorkspaceOptions = {
11
12
  aliasPackageNamePrefix?: string;
12
13
  };
13
14
  };
14
- export declare const ULTRAMODERN_WORKSPACE_FLAG = "--ultramodern-workspace";
15
+ export type AddUltramodernVerticalOptions = {
16
+ workspaceRoot: string;
17
+ name: string;
18
+ modernVersion: string;
19
+ enableTailwind?: boolean;
20
+ packageSource?: UltramodernWorkspaceOptions['packageSource'];
21
+ };
22
+ export declare function addUltramodernVertical(options: AddUltramodernVerticalOptions): void;
15
23
  export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): void;
16
24
  export declare const ultramodernWorkspaceVersions: {
17
25
  tanstackRouter: string;
18
26
  moduleFederation: string;
27
+ tailwind: string;
28
+ tailwindPostcss: string;
19
29
  };
20
- export {};
package/package.json CHANGED
@@ -21,27 +21,44 @@
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
24
- "version": "3.2.0-ultramodern.12",
24
+ "version": "3.2.0-ultramodern.120",
25
25
  "types": "./dist/types/index.d.ts",
26
- "main": "./dist/index.js",
26
+ "main": "./dist/esm-node/index.js",
27
27
  "bin": {
28
- "create": "bin/run.js"
28
+ "create": "bin/run.js",
29
+ "modern-js-create": "bin/run.js"
30
+ },
31
+ "typesVersions": {
32
+ "*": {
33
+ ".": [
34
+ "./dist/types/index.d.ts"
35
+ ]
36
+ }
29
37
  },
30
38
  "exports": {
31
- ".": "./dist/index.js"
39
+ ".": {
40
+ "types": "./dist/types/index.d.ts",
41
+ "node": {
42
+ "import": "./dist/esm-node/index.js",
43
+ "require": "./dist/cjs/index.cjs"
44
+ },
45
+ "default": "./dist/esm-node/index.js"
46
+ }
32
47
  },
33
48
  "files": [
34
- "template",
35
49
  "template-workspace",
36
50
  "dist",
37
- "bin.js"
51
+ "bin"
38
52
  ],
53
+ "dependencies": {
54
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.120"
55
+ },
39
56
  "devDependencies": {
40
- "@rslib/core": "0.21.5",
41
- "@types/node": "^25.8.0",
42
- "@typescript/native-preview": "7.0.0-dev.20260516.1",
43
- "tsx": "^4.22.0",
44
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.12"
57
+ "@rslib/core": "0.22.0",
58
+ "@types/node": "^25.9.3",
59
+ "@typescript/native-preview": "7.0.0-dev.20260610.1",
60
+ "tsx": "^4.22.4",
61
+ "@scripts/rstest-config": "2.66.0"
45
62
  },
46
63
  "publishConfig": {
47
64
  "registry": "https://registry.npmjs.org/",
@@ -49,11 +66,12 @@
49
66
  },
50
67
  "modern:source": "./src/index.ts",
51
68
  "scripts": {
52
- "build": "rslib build && pnpm -w tsgo:dts \"$PWD\"",
53
- "dev": "rslib build -w",
54
- "start": "node ./dist/index.js"
69
+ "build": "rm -rf dist && rslib build -c rslibconfig.mts && pnpm -w tsgo:dts \"$PWD\"",
70
+ "dev": "rslib build -c rslibconfig.mts -w",
71
+ "start": "node ./dist/esm-node/index.js",
72
+ "test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
55
73
  },
56
74
  "ultramodern": {
57
- "frameworkVersion": "3.2.0-ultramodern.12"
75
+ "frameworkVersion": "3.2.0-ultramodern.120"
58
76
  }
59
77
  }
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "defaultEnabled": true,
4
+ "strategy": "git-subtree-squash",
5
+ "installDir": "repos",
6
+ "repositories": [
7
+ {
8
+ "id": "effect",
9
+ "name": "Effect",
10
+ "url": "https://github.com/Effect-TS/effect.git",
11
+ "ref": "main",
12
+ "path": "repos/effect",
13
+ "readOnly": true
14
+ },
15
+ {
16
+ "id": "ultramodern-js",
17
+ "name": "UltraModern.js",
18
+ "url": "https://github.com/BleedingDev/ultramodern.js.git",
19
+ "ref": "main-ultramodern",
20
+ "path": "repos/ultramodern.js",
21
+ "readOnly": true
22
+ }
23
+ ]
24
+ }
@@ -17,6 +17,20 @@
17
17
  "licensePath": ".agents/rstackjs-agent-skills-LICENSE",
18
18
  "install": "vendored"
19
19
  },
20
+ {
21
+ "id": "module-federation-agent-skills",
22
+ "visibility": "public",
23
+ "repository": "https://github.com/module-federation/agent-skills",
24
+ "commit": "07bb5b6c43ad457609e00c081b72d4c42508ec76",
25
+ "install": "clone",
26
+ "baseline": [
27
+ {
28
+ "name": "mf",
29
+ "path": ".agents/skills/mf",
30
+ "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
31
+ }
32
+ ]
33
+ },
20
34
  {
21
35
  "id": "techsiocz-private",
22
36
  "visibility": "private",
@@ -81,6 +95,11 @@
81
95
  "name": "rstest-best-practices",
82
96
  "path": ".agents/skills/rstest-best-practices",
83
97
  "reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
98
+ },
99
+ {
100
+ "name": "mf",
101
+ "path": ".agents/skills/mf",
102
+ "reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
84
103
  }
85
104
  ],
86
105
  "excludedByDefault": [
@@ -0,0 +1,16 @@
1
+ {
2
+ "Stop": [
3
+ {
4
+ "command": "pnpm format && pnpm lint:fix && pnpm check",
5
+ "timeout": 600000,
6
+ "statusMessage": "Running UltraModern quality gates"
7
+ }
8
+ ],
9
+ "SubagentStop": [
10
+ {
11
+ "command": "pnpm format && pnpm lint:fix && pnpm check",
12
+ "timeout": 600000,
13
+ "statusMessage": "Running UltraModern quality gates"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": ["config:recommended", "helpers:pinGitHubActionDigests"],
4
+ "dependencyDashboard": true,
5
+ "minimumReleaseAge": "1 day",
6
+ "prConcurrentLimit": 5,
7
+ "prHourlyLimit": 2,
8
+ "rangeStrategy": "bump",
9
+ "schedule": ["before 5am on monday"],
10
+ "timezone": "Etc/UTC",
11
+ "packageRules": [
12
+ {
13
+ "matchManagers": ["github-actions"],
14
+ "groupName": "github-actions",
15
+ "labels": ["dependencies", "github-actions", "security"]
16
+ },
17
+ {
18
+ "matchManagers": ["npm"],
19
+ "matchUpdateTypes": ["patch", "minor"],
20
+ "groupName": "npm minor and patch updates",
21
+ "labels": ["dependencies", "npm"]
22
+ },
23
+ {
24
+ "matchUpdateTypes": ["major"],
25
+ "dependencyDashboardApproval": true,
26
+ "labels": ["dependencies", "major"]
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,70 @@
1
+ name: Ultramodern Workspace Gates
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ defaults:
11
+ run:
12
+ shell: bash
13
+
14
+ env:
15
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16
+
17
+ concurrency:
18
+ group: ultramodern-workspace-gates-${{ github.workflow }}-${{ github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ workspace-gate:
23
+ name: ${{ matrix.name }}
24
+ runs-on: ubuntu-latest
25
+ timeout-minutes: 30
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ include:
30
+ - name: Format
31
+ command: pnpm format:check
32
+ - name: Lint
33
+ command: pnpm lint
34
+ - name: Typecheck
35
+ command: pnpm typecheck
36
+ - name: Skills
37
+ command: pnpm skills:check
38
+ - name: I18n Boundaries
39
+ command: pnpm i18n:boundaries
40
+ - name: Contract
41
+ command: pnpm contract:check
42
+ - name: Build
43
+ command: pnpm build
44
+ steps:
45
+ - name: Harden Runner
46
+ uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
47
+ with:
48
+ egress-policy: audit
49
+
50
+ - name: Checkout
51
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
52
+ with:
53
+ fetch-depth: 1
54
+ persist-credentials: false
55
+
56
+ - name: Setup Node.js
57
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
58
+ with:
59
+ node-version: 24
60
+
61
+ - name: Setup mise
62
+ uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
63
+
64
+ - name: Install Dependencies
65
+ run: mise exec -- pnpm install --frozen-lockfile
66
+
67
+ - name: Run ${{ matrix.name }}
68
+ env:
69
+ MODERN_PUBLIC_SITE_URL: http://localhost:8080
70
+ run: mise exec -- ${{ matrix.command }}
@@ -0,0 +1,5 @@
1
+ node_modules/
2
+ dist/
3
+ build/
4
+ .modernjs/cache/
5
+ .modernjs/agent-reference-repos-tmp/
@@ -0,0 +1,2 @@
1
+ [tools]
2
+ pnpm = "{{pnpmVersion}}"
@@ -1,18 +1,34 @@
1
1
  # UltraModern Agent Contract
2
2
 
3
- This workspace is generated as an agent-ready UltraModern.js SuperApp. Agents should treat the files under `.agents/skills` as local project instructions, not optional reading.
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
5
+ instructions, not optional reading.
4
6
 
5
7
  ## Quality Gates
6
8
 
7
9
  - `pnpm lint` runs Oxlint with the Ultracite preset.
8
10
  - `pnpm format` runs oxfmt.
9
11
  - `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
10
- - `pnpm i18n:check` rejects hardcoded user-visible JSX text in generated apps.
11
- - `pnpm check` runs formatting, linting, effect-tsgo, i18n checks, private-skill availability checks, and the generated workspace contract.
12
-
13
- ## Internationalization
14
-
15
- Runtime i18n is enabled by default for generated apps. Agents must put user-visible UI copy in each app's `config/public/locales/<lang>/translation.json` and render it through `react-i18next` or `@modern-js/plugin-i18n/runtime`. Do not add hardcoded JSX text, `aria-label`, `title`, `alt`, or `placeholder` strings unless the value is a non-translatable technical token.
12
+ - `pnpm i18n:boundaries` verifies workspace source boundaries through `@modern-js/code-tools`.
13
+ - `pnpm contract:check` verifies the generated workspace contract.
14
+ - `pnpm mf:types` verifies Module Federation type outputs after builds.
15
+ - `pnpm check` is a local convenience aggregate for the primitive gates.
16
+ - Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
17
+ - Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
18
+ - `postinstall` formats the generated tree, initializes Git when needed, prepares agent skills and reference repos, then installs `lefthook`. Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
19
+
20
+ ## Localized Routes
21
+
22
+ Generated apps keep locale-prefixed entry routes under `src/routes/[lang]`,
23
+ static language links, and canonical plus `hreflang` metadata. A new workspace
24
+ starts shell-only; `create <domain> --vertical` adds route-owned metadata,
25
+ localized resources, and Effect BFF surfaces for that domain. Runtime i18n is
26
+ not enabled in the starter because the current React 19 + Module Federation
27
+ streaming SSR stack must render predictably first. Canonical and hreflang URLs
28
+ use `MODERN_PUBLIC_SITE_URL` (falling back to per-app `ULTRAMODERN_PUBLIC_URL_<APP_ID>`),
29
+ while asset URLs prefer the per-app `ULTRAMODERN_PUBLIC_URL_<APP_ID>`. Without
30
+ any configured public URL, builds emit origin-relative asset paths so pages work
31
+ behind tunnels and reverse proxies.
16
32
 
17
33
  ## Required Skill Baseline
18
34
 
@@ -25,6 +41,9 @@ Use these skills when the task touches the matching subsystem:
25
41
  - `rslib-best-practices`: Shared packages, generated libraries, declaration output, and Rslib configuration.
26
42
  - `rslib-modern-package`: Package contracts for shared libraries, exports, side effects, dependency placement, README, and release readiness.
27
43
  - `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
44
+ - `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
45
+
46
+ The public `module-federation/agent-skills` repository is installed during `pnpm install` and `pnpm skills:install`. Postinstall mode skips unavailable clone sources instead of blocking dependency installation; `pnpm skills:install` remains strict for required public skills. Use `ULTRAMODERN_SKIP_AGENT_SKILLS=1` when an install must avoid external skill repositories completely. `pnpm skills:check` fails when the required public `mf` skill is missing unless that skip flag is set.
28
47
 
29
48
  ## Private Skills
30
49
 
@@ -34,17 +53,30 @@ ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the curren
34
53
  pnpm skills:install
35
54
  ```
36
55
 
37
- The installer copies only the allowlisted private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
56
+ The installer copies only the pinned private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
57
+
58
+ ## Agent Reference Repositories
59
+
60
+ The workspace installs read-only source references under `repos/` by default during `pnpm install` using `git subtree add --squash`. These repositories are reference material for coding agents, not application source:
61
+
62
+ - `repos/effect` from `Effect-TS/effect`.
63
+ - `repos/ultramodern.js` from `BleedingDev/ultramodern.js`.
64
+
65
+ Agents may read files under `repos/` to understand upstream patterns, APIs, and project conventions. Do not edit files under `repos/`, import from them, or make production code depend on them. To skip this setup, run installs with `ULTRAMODERN_SKIP_AGENT_REPOS=1`.
38
66
 
39
67
  ## Project Priorities
40
68
 
41
69
  - Keep `presetUltramodern` as the single preset.
42
- - Prefer Effect for BFF/service code.
70
+ - Keep the initial workspace shell-only unless a user explicitly asks for a
71
+ starter vertical.
72
+ - Use `create <domain> --vertical` as the growth path for real business
73
+ MicroVerticals.
74
+ - Prefer Effect for BFF code.
43
75
  - Prefer TanStack Router for app routing.
44
- - Keep design-system code as a normal Micro Frontend or shared package, not a special core path.
76
+ - Keep UI-kit or design-system code as ordinary vertical or shared package code, not a special core path.
45
77
  - Keep generated packages explicit and publishable: stable `exports`, correct declarations, small public APIs, and clear ownership metadata.
46
78
  - Do not add migration tooling or codemods unless the project owner explicitly asks for migration work.
47
79
 
48
80
  ## Skill Provenance
49
81
 
50
- The vendored Rstack skills and private TechsioCZ skill allowlist 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 `pnpm check`.
82
+ 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`.