@bleedingdev/modern-js-create 3.2.0-ultramodern.9 → 3.2.0-ultramodern.91

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 (51) hide show
  1. package/README.md +152 -35
  2. package/dist/index.js +4700 -608
  3. package/dist/types/locale/en.d.ts +3 -0
  4. package/dist/types/locale/zh.d.ts +3 -0
  5. package/dist/types/ultramodern-workspace.d.ts +11 -0
  6. package/package.json +6 -6
  7. package/template/.codex/hooks.json +16 -0
  8. package/template/.github/renovate.json +53 -0
  9. package/template/.github/workflows/ultramodern-gates.yml.handlebars +34 -10
  10. package/template/.mise.toml.handlebars +2 -0
  11. package/template/AGENTS.md +9 -6
  12. package/template/README.md +60 -34
  13. package/template/api/effect/index.ts.handlebars +8 -3
  14. package/template/config/public/locales/cs/translation.json +39 -0
  15. package/template/config/public/locales/en/translation.json +39 -0
  16. package/template/lefthook.yml +10 -0
  17. package/template/modern.config.ts.handlebars +39 -24
  18. package/template/oxfmt.config.ts +11 -3
  19. package/template/oxlint.config.ts +11 -4
  20. package/template/package.json.handlebars +43 -34
  21. package/template/pnpm-workspace.yaml +29 -0
  22. package/template/rstest.config.mts +5 -0
  23. package/template/scripts/bootstrap-agent-skills.mjs +160 -35
  24. package/template/scripts/check-i18n-strings.mjs +94 -0
  25. package/template/scripts/validate-ultramodern.mjs.handlebars +387 -35
  26. package/template/shared/effect/api.ts.handlebars +1 -2
  27. package/template/src/modern-app-env.d.ts +2 -0
  28. package/template/src/modern.runtime.ts.handlebars +17 -3
  29. package/template/src/routes/[lang]/page.tsx.handlebars +211 -0
  30. package/template/src/routes/index.css.handlebars +14 -3
  31. package/template/src/routes/layout.tsx.handlebars +2 -1
  32. package/template/tailwind.config.ts.handlebars +1 -1
  33. package/template/tests/tsconfig.json +7 -0
  34. package/template/tests/ultramodern.contract.test.ts.handlebars +78 -0
  35. package/template-workspace/.agents/agent-reference-repos.json +24 -0
  36. package/template-workspace/.agents/skills-lock.json +19 -0
  37. package/template-workspace/.codex/hooks.json +16 -0
  38. package/template-workspace/.github/renovate.json +29 -0
  39. package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +54 -0
  40. package/template-workspace/.gitignore.handlebars +5 -0
  41. package/template-workspace/.mise.toml.handlebars +2 -0
  42. package/template-workspace/AGENTS.md +36 -5
  43. package/template-workspace/README.md.handlebars +61 -11
  44. package/template-workspace/lefthook.yml +10 -0
  45. package/template-workspace/oxfmt.config.ts +13 -3
  46. package/template-workspace/oxlint.config.ts +12 -4
  47. package/template-workspace/pnpm-workspace.yaml +26 -8
  48. package/template-workspace/scripts/bootstrap-agent-skills.mjs +184 -26
  49. package/template-workspace/scripts/setup-agent-reference-repos.mjs +368 -0
  50. package/template/src/routes/page.tsx.handlebars +0 -119
  51. package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -403
@@ -0,0 +1,211 @@
1
+ import { Helmet } from '@modern-js/runtime/head';
2
+ import { useModernI18n } from '@modern-js/plugin-i18n/runtime';
3
+ import { useLocation } from '{{routerRuntimeImport}}';
4
+ {{#if useEffectBff}}import effectBff from '@api/effect/index';
5
+ import { Effect } from '@modern-js/plugin-bff/effect-client';
6
+ import { useEffect, useState } from 'react';
7
+ {{/if}}
8
+ import { useTranslation } from 'react-i18next';
9
+
10
+ {{#if useEffectBff}}type GreetingResponse = Awaited<ReturnType<typeof effectBff.client.greetings.hello>>;
11
+
12
+ {{/if}}
13
+ const fallbackLanguage = 'en';
14
+ const supportedLanguages = ['en', 'cs'] as const;
15
+ type SupportedLanguage = (typeof supportedLanguages)[number];
16
+
17
+ const isSupportedLanguage = (value: string): value is SupportedLanguage =>
18
+ supportedLanguages.includes(value as SupportedLanguage);
19
+
20
+ const stripLanguagePrefix = (pathname: string) => {
21
+ const segments = pathname.split('/').filter(Boolean);
22
+ if (segments.length > 0 && isSupportedLanguage(segments[0] ?? '')) {
23
+ segments.shift();
24
+ }
25
+ return `/${segments.join('/')}`;
26
+ };
27
+
28
+ const localizedPath = (pathname: string, language: SupportedLanguage) => {
29
+ const pathWithoutLanguage = stripLanguagePrefix(pathname);
30
+ return pathWithoutLanguage === '/' ? `/${language}` : `/${language}${pathWithoutLanguage}`;
31
+ };
32
+
33
+ const absoluteUrl = (pathname: string) => {
34
+ const origin = ULTRAMODERN_SITE_URL.replace(/\/+$/u, '');
35
+ return `${origin}${pathname}`;
36
+ };
37
+
38
+ const locationSuffix = (location: { hash?: unknown; search?: unknown; searchStr?: unknown }) => {
39
+ const { hash, search, searchStr } = location;
40
+ let locationSearch = '';
41
+ if (typeof searchStr === 'string') {
42
+ locationSearch = searchStr;
43
+ } else if (typeof search === 'string') {
44
+ locationSearch = search;
45
+ }
46
+ const locationHash = typeof hash === 'string' ? hash : '';
47
+ return `${locationSearch}${locationHash}`;
48
+ };
49
+
50
+ const Index = () => {
51
+ const { t } = useTranslation();
52
+ const { language } = useModernI18n();
53
+ const location = useLocation();
54
+ const currentLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;
55
+ const canonicalPath = localizedPath(location.pathname, currentLanguage);
56
+ const suffix = locationSuffix(location);
57
+ const languageOptions = supportedLanguages.map((code) => ({
58
+ code,
59
+ href: `${localizedPath(location.pathname, code)}${suffix}`,
60
+ label: t(`home.language.${code}`),
61
+ }));
62
+ {{#if useEffectBff}} const [effectMessage, setEffectMessage] = useState('loading...');
63
+
64
+ useEffect(() => {
65
+ let mounted = true;
66
+ Effect.runFork(
67
+ Effect.promise(() => effectBff.client.greetings.hello({})).pipe(
68
+ Effect.tap((data: GreetingResponse) =>
69
+ Effect.sync(() => {
70
+ if (mounted) {
71
+ setEffectMessage(data.message);
72
+ }
73
+ }),
74
+ ),
75
+ ),
76
+ );
77
+ return () => {
78
+ mounted = false;
79
+ };
80
+ }, []);
81
+ {{/if}}
82
+ return (
83
+ <div className="container-box">
84
+ <Helmet>
85
+ <link
86
+ rel="icon"
87
+ type="image/x-icon"
88
+ href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
89
+ />
90
+ <link rel="canonical" href={absoluteUrl(canonicalPath)} />
91
+ {supportedLanguages.map((code) => (
92
+ <link
93
+ href={absoluteUrl(localizedPath(location.pathname, code))}
94
+ hrefLang={code}
95
+ key={code}
96
+ rel="alternate"
97
+ />
98
+ ))}
99
+ <link
100
+ href={absoluteUrl(localizedPath(location.pathname, fallbackLanguage))}
101
+ hrefLang="x-default"
102
+ rel="alternate"
103
+ />
104
+ </Helmet>
105
+ <main>
106
+ <nav className="language-switcher" aria-label={t('home.language.switcher')}>
107
+ {languageOptions.map((option) => (
108
+ <a
109
+ aria-current={currentLanguage === option.code ? 'page' : undefined}
110
+ href={option.href}
111
+ key={option.code}
112
+ >
113
+ {option.label}
114
+ </a>
115
+ ))}
116
+ </nav>
117
+ <div className="title">
118
+ {t('home.title')}
119
+ <img
120
+ alt={t('home.logoAlt')}
121
+ className="logo"
122
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
123
+ />
124
+ <p className="name">{t('home.name')}</p>
125
+ </div>
126
+ <p className="description{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
127
+ {t('home.description.intro')}{' '}
128
+ <code className="code">presetUltramodern(...)</code>{' '}
129
+ {t('home.description.afterPreset')}{' '}
130
+ <code className="code">modern.config.ts</code>{' '}
131
+ {t('home.description.afterConfig')}{' '}
132
+ <code className="code">pnpm run ultramodern:check</code>{' '}
133
+ {t('home.description.end')}
134
+ </p>
135
+ {{#if useEffectBff}}
136
+ <p className="description effect-message{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
137
+ {t('home.bff.response')} <code className="code">{effectMessage}</code>
138
+ </p>
139
+ {{/if}}
140
+ <div className="grid">
141
+ <a
142
+ href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"
143
+ target="_blank"
144
+ rel="noopener noreferrer"
145
+ className="card"
146
+ >
147
+ <h2>
148
+ {t('home.cards.guide.title')}
149
+ <img
150
+ alt=""
151
+ className="arrow-right"
152
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
153
+ />
154
+ </h2>
155
+ <p>{t('home.cards.guide.body')}</p>
156
+ </a>
157
+ <a
158
+ href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"
159
+ target="_blank"
160
+ className="card"
161
+ rel="noreferrer"
162
+ >
163
+ <h2>
164
+ {t('home.cards.config.title')}
165
+ <img
166
+ alt=""
167
+ className="arrow-right"
168
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
169
+ />
170
+ </h2>
171
+ <p>{t('home.cards.config.body')}</p>
172
+ </a>
173
+ <a
174
+ href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"
175
+ target="_blank"
176
+ className="card"
177
+ rel="noreferrer"
178
+ >
179
+ <h2>
180
+ {t('home.cards.gates.title')}
181
+ <img
182
+ alt=""
183
+ className="arrow-right"
184
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
185
+ />
186
+ </h2>
187
+ <p>{t('home.cards.gates.body')}</p>
188
+ </a>
189
+ <a
190
+ href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"
191
+ target="_blank"
192
+ rel="noopener noreferrer"
193
+ className="card"
194
+ >
195
+ <h2>
196
+ {t('home.cards.bff.title')}
197
+ <img
198
+ alt=""
199
+ className="arrow-right"
200
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
201
+ />
202
+ </h2>
203
+ <p>{t('home.cards.bff.body')}</p>
204
+ </a>
205
+ </div>
206
+ </main>
207
+ </div>
208
+ );
209
+ };
210
+
211
+ export default Index;
@@ -4,7 +4,12 @@
4
4
  body {
5
5
  padding: 0;
6
6
  margin: 0;
7
- font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
7
+ font-family:
8
+ PingFang SC,
9
+ Hiragino Sans GB,
10
+ Microsoft YaHei,
11
+ Arial,
12
+ sans-serif;
8
13
  background: linear-gradient(to bottom, transparent, #fff) #eceeef;
9
14
  }
10
15
 
@@ -67,8 +72,14 @@ main {
67
72
  padding: 0.6rem 0.9rem;
68
73
  font-size: 1.05rem;
69
74
  font-family:
70
- Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
71
- Bitstream Vera Sans Mono, Courier New, monospace;
75
+ Menlo,
76
+ Monaco,
77
+ Lucida Console,
78
+ Liberation Mono,
79
+ DejaVu Sans Mono,
80
+ Bitstream Vera Sans Mono,
81
+ Courier New,
82
+ monospace;
72
83
  }
73
84
 
74
85
  .container-box .grid {
@@ -1,4 +1,5 @@
1
- import { Outlet } from '@modern-js/runtime/{{routerImportPath}}';
1
+ import { Outlet } from '{{routerRuntimeImport}}';
2
+ import './index.css';
2
3
 
3
4
  export default function Layout() {
4
5
  return (
@@ -2,9 +2,9 @@
2
2
 
3
3
  export default {
4
4
  content: ['./src/**/*.{js,ts,jsx,tsx}'],
5
+ plugins: [],
5
6
  theme: {
6
7
  extend: {},
7
8
  },
8
- plugins: [],
9
9
  } satisfies Config;
10
10
  {{/if}}
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["@rstest/core/globals"]
5
+ },
6
+ "include": ["./"]
7
+ }
@@ -0,0 +1,78 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { describe, expect, test } from '@rstest/core';
4
+
5
+ const root = process.cwd();
6
+ const readText = (relativePath: string) =>
7
+ fs.readFileSync(path.join(root, relativePath), 'utf-8');
8
+ const readJson = <T>(relativePath: string): T =>
9
+ JSON.parse(readText(relativePath)) as T;
10
+
11
+ describe('generated UltraModern contract', () => {
12
+ test('keeps localized route metadata and Rstest wiring', () => {
13
+ expect(fs.existsSync(path.join(root, 'src/routes/[lang]/page.tsx'))).toBe(
14
+ true,
15
+ );
16
+ expect(fs.existsSync(path.join(root, 'src/routes/page.tsx'))).toBe(false);
17
+ expect(fs.existsSync(path.join(root, 'src/routes/layout.tsx'))).toBe(true);
18
+ {{#if enableTailwind}}
19
+ expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(true);
20
+ expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(true);
21
+ {{/if}}
22
+ {{#unless enableTailwind}}
23
+ expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(false);
24
+ expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(false);
25
+ {{/unless}}
26
+ });
27
+
28
+ test('retains package-source metadata for generated Modern.js packages', () => {
29
+ const packageJson = readJson<{
30
+ dependencies?: Record<string, string>;
31
+ devDependencies?: Record<string, string>;
32
+ modernjs?: {
33
+ packageSource?: {
34
+ config?: string;
35
+ };
36
+ preset?: string;
37
+ };
38
+ }>('package.json');
39
+ const packageSource = readJson<{
40
+ modernPackages?: {
41
+ packages?: string[];
42
+ specifier?: string;
43
+ };
44
+ strategy?: string;
45
+ }>('.modernjs/ultramodern-package-source.json');
46
+
47
+ expect(packageJson.modernjs?.preset).toBe('presetUltramodern');
48
+ expect(packageJson.modernjs?.packageSource?.config).toBe(
49
+ './.modernjs/ultramodern-package-source.json',
50
+ );
51
+ expect(packageSource.strategy).toMatch(/^(workspace|install)$/u);
52
+ expect(packageSource.modernPackages?.packages).toContain(
53
+ '@modern-js/runtime',
54
+ );
55
+ expect(packageSource.modernPackages?.packages).toContain(
56
+ '@modern-js/app-tools',
57
+ );
58
+ expect(packageSource.modernPackages?.packages).toContain(
59
+ '@modern-js/adapter-rstest',
60
+ );
61
+ expect(packageSource.modernPackages?.specifier).toBeTruthy();
62
+ expect(
63
+ packageJson.devDependencies?.['@modern-js/adapter-rstest'],
64
+ ).toBeTruthy();
65
+ {{#if enableTailwind}}
66
+ expect(packageJson.devDependencies?.tailwindcss).toBe('^4.3.0');
67
+ expect(packageJson.devDependencies?.['@tailwindcss/postcss']).toBe(
68
+ '^4.3.0',
69
+ );
70
+ {{/if}}
71
+ {{#unless enableTailwind}}
72
+ expect(packageJson.devDependencies?.tailwindcss).toBeUndefined();
73
+ expect(
74
+ packageJson.devDependencies?.['@tailwindcss/postcss'],
75
+ ).toBeUndefined();
76
+ {{/unless}}
77
+ });
78
+ });
@@ -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,54 @@
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
+ ultramodern-workspace-gates:
23
+ runs-on: ubuntu-latest
24
+ timeout-minutes: 30
25
+ steps:
26
+ - name: Harden Runner
27
+ uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
28
+ with:
29
+ egress-policy: audit
30
+
31
+ - name: Checkout
32
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33
+ with:
34
+ fetch-depth: 1
35
+ persist-credentials: false
36
+
37
+ - name: Setup Node.js
38
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
39
+ with:
40
+ node-version: 24
41
+
42
+ - name: Setup mise
43
+ uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
44
+
45
+ - name: Install Dependencies
46
+ run: mise exec -- pnpm install --frozen-lockfile
47
+
48
+ - name: Validate Ultramodern Workspace Contract
49
+ run: mise exec -- pnpm run ultramodern:check
50
+
51
+ - name: Build Workspace Apps
52
+ env:
53
+ MODERN_PUBLIC_SITE_URL: http://localhost:8080
54
+ run: mise exec -- pnpm build
@@ -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,6 +1,8 @@
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
 
@@ -8,6 +10,19 @@ This workspace is generated as an agent-ready UltraModern.js SuperApp. Agents sh
8
10
  - `pnpm format` runs oxfmt.
9
11
  - `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
10
12
  - `pnpm check` runs formatting, linting, effect-tsgo, private-skill availability checks, and the generated workspace contract.
13
+ - Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
14
+ - `postinstall` formats the generated tree, initializes Git when needed, installs agent skills and reference repos, then installs `lefthook`. Generated `lefthook.yml` runs `pnpm format && pnpm lint:fix && pnpm check` on pre-commit; pre-push runs `pnpm check`.
15
+
16
+ ## Localized Routes
17
+
18
+ Generated apps keep locale-prefixed entry routes under `src/routes/[lang]`,
19
+ static language links, and canonical plus `hreflang` metadata. A new workspace
20
+ starts shell-only; `create <domain> --vertical` adds route-owned metadata,
21
+ localized resources, and Effect BFF surfaces for that domain. Runtime i18n is
22
+ not enabled in the starter because the current React 19 + Module Federation
23
+ streaming SSR stack must render predictably first. Production builds fail unless
24
+ `MODERN_PUBLIC_SITE_URL` is set per deployed app, so canonical URLs always use
25
+ the production origin.
11
26
 
12
27
  ## Required Skill Baseline
13
28
 
@@ -20,6 +35,9 @@ Use these skills when the task touches the matching subsystem:
20
35
  - `rslib-best-practices`: Shared packages, generated libraries, declaration output, and Rslib configuration.
21
36
  - `rslib-modern-package`: Package contracts for shared libraries, exports, side effects, dependency placement, README, and release readiness.
22
37
  - `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
38
+ - `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
39
+
40
+ The public `module-federation/agent-skills` repository is installed during `pnpm install` and `pnpm skills:install`. `pnpm skills:check` fails when the required public `mf` skill is missing.
23
41
 
24
42
  ## Private Skills
25
43
 
@@ -29,17 +47,30 @@ ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the curren
29
47
  pnpm skills:install
30
48
  ```
31
49
 
32
- The installer copies only the allowlisted private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
50
+ The installer copies only the pinned private skills from `.agents/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
51
+
52
+ ## Agent Reference Repositories
53
+
54
+ 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:
55
+
56
+ - `repos/effect` from `Effect-TS/effect`.
57
+ - `repos/ultramodern.js` from `BleedingDev/ultramodern.js`.
58
+
59
+ 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`.
33
60
 
34
61
  ## Project Priorities
35
62
 
36
63
  - Keep `presetUltramodern` as the single preset.
37
- - Prefer Effect for BFF/service code.
64
+ - Keep the initial workspace shell-only unless a user explicitly asks for a
65
+ starter vertical.
66
+ - Use `create <domain> --vertical` as the growth path for real business
67
+ MicroVerticals.
68
+ - Prefer Effect for BFF code.
38
69
  - Prefer TanStack Router for app routing.
39
- - Keep design-system code as a normal Micro Frontend or shared package, not a special core path.
70
+ - Keep UI-kit or design-system code as ordinary vertical or shared package code, not a special core path.
40
71
  - Keep generated packages explicit and publishable: stable `exports`, correct declarations, small public APIs, and clear ownership metadata.
41
72
  - Do not add migration tooling or codemods unless the project owner explicitly asks for migration work.
42
73
 
43
74
  ## Skill Provenance
44
75
 
45
- 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`.
76
+ 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 `pnpm check`.