fimo 0.15.0 → 0.16.0-experimental.2
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/assets/astro/components/DateTime.astro +22 -0
- package/assets/astro/components/index.d.ts +1 -0
- package/assets/astro/components/index.js +1 -0
- package/assets/content-templates/forms/react.eta +3 -3
- package/assets/content-templates/shared/types.eta +2 -0
- package/assets/skills/fimo-cli/SKILL.md +20 -14
- package/assets/skills/fimo-cli/references/account.md +1 -1
- package/assets/skills/fimo-cli/references/agents.md +13 -10
- package/assets/skills/fimo-cli/references/branches.md +39 -38
- package/assets/skills/fimo-cli/references/content.md +2 -2
- package/assets/skills/fimo-cli/references/credits.md +1 -1
- package/assets/skills/fimo-cli/references/deploy.md +30 -14
- package/assets/skills/fimo-cli/references/history.md +13 -6
- package/assets/skills/fimo-cli/references/hosting.md +114 -0
- package/assets/skills/fimo-cli/references/init.md +19 -8
- package/assets/skills/fimo-cli/references/integrations/firecrawl.md +2 -0
- package/assets/skills/fimo-cli/references/locales.md +39 -15
- package/assets/skills/fimo-cli/references/mcp.md +8 -8
- package/assets/skills/fimo-cli/references/pages.md +70 -0
- package/assets/skills/fimo-cli/references/preview.md +29 -20
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -1
- package/assets/skills/fimo-cli/references/projects.md +3 -3
- package/assets/skills/fimo-cli/references/schedules.md +8 -5
- package/assets/skills/fimo-cli/references/support.md +1 -1
- package/assets/skills/fimo-cli/references/webhooks.md +9 -5
- package/assets/skills/fimo-code/SKILL.md +12 -0
- package/assets/skills/fimo-code/assets/react-router-locales/LocaleLayout.tsx +12 -0
- package/assets/skills/fimo-code/assets/react-router-locales/routes.ts +7 -6
- package/assets/skills/fimo-code/references/best-practices/astro.md +47 -0
- package/assets/skills/fimo-code/references/best-practices/next.md +42 -0
- package/assets/skills/fimo-code/references/best-practices/sveltekit.md +17 -0
- package/assets/skills/fimo-code/references/content/richtext.md +5 -0
- package/assets/skills/fimo-code/references/content/schema.md +4 -1
- package/assets/skills/fimo-code/references/frameworks/astro.md +5 -3
- package/assets/skills/fimo-code/references/frameworks/compatibility.md +13 -8
- package/assets/skills/fimo-code/references/frameworks/hosting.md +28 -20
- package/assets/skills/fimo-code/references/frameworks/next/app-router.md +6 -0
- package/assets/skills/fimo-code/references/frameworks/next/locales.md +12 -2
- package/assets/skills/fimo-code/references/frameworks/next.md +7 -0
- package/assets/skills/fimo-code/references/frameworks/react-router.md +15 -7
- package/assets/skills/fimo-code/references/frameworks/sveltekit.md +15 -8
- package/assets/skills/fimo-code/references/labels.md +9 -1
- package/assets/skills/fimo-code/references/locales.md +8 -2
- package/assets/skills/fimo-code/references/migrations/react-router-route-ownership.md +93 -0
- package/assets/skills/fimo-code/references/ui.md +21 -2
- package/assets/skills/fimo-migration/SKILL.md +297 -53
- package/assets/skills/fimo-migration/agents/openai.yaml +2 -2
- package/assets/skills/fimo-migration/references/content.md +119 -35
- package/assets/skills/fimo-migration/references/decision.md +72 -0
- package/assets/skills/fimo-migration/references/forms.md +38 -6
- package/assets/skills/fimo-migration/references/frameworks/nextjs.md +179 -23
- package/assets/skills/fimo-migration/references/import-contract.md +71 -19
- package/assets/skills/fimo-migration/references/manifest.md +11 -161
- package/assets/skills/fimo-migration/references/media.md +33 -1
- package/assets/skills/fimo-migration/references/platforms.md +26 -2
- package/assets/skills/fimo-migration/references/qa.md +185 -13
- package/assets/skills/fimo-migration/references/url-evidence.md +242 -0
- package/assets/skills/fimo-migration/references/workers/content-execution.md +39 -0
- package/assets/skills/fimo-migration/references/workers/content-planner.md +64 -0
- package/assets/skills/fimo-migration/references/workers/framework.md +37 -0
- package/assets/skills/fimo-migration/references/workers/url-observer.md +71 -0
- package/assets/skills/fimo-migration/references/workers/validator.md +31 -0
- package/assets/skills/fimo-migration/references/workers.md +104 -0
- package/assets/skills/fimo-migration/references/workflow.md +152 -192
- package/assets/skills/fimo-migration/scripts/apply-decision.mjs +534 -0
- package/assets/skills/fimo-migration/scripts/build-canonical-manifest.mjs +7 -4
- package/assets/skills/fimo-migration/scripts/write-migration-report.mjs +191 -4
- package/assets/skills/fimo-studio/references/ai-chat.md +1 -1
- package/assets/skills/fimo-studio/references/cms.md +25 -7
- package/assets/skills/fimo-studio/references/webhooks.md +3 -3
- package/assets/sveltekit/components/DateTime.svelte +35 -0
- package/assets/sveltekit/components/FimoProvider.svelte +2 -2
- package/assets/sveltekit/components/index.d.ts +1 -0
- package/assets/sveltekit/components/index.js +1 -0
- package/dist/build/next/config.d.ts +4 -1
- package/dist/build/next/config.js +21 -5
- package/dist/build/sveltekit/vite.d.ts +3 -4
- package/dist/build/sveltekit/vite.js +3 -4
- package/dist/build/vite/plugins/runtime-env.d.ts +2 -1
- package/dist/build/vite/plugins/runtime-env.js +14 -10
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +145 -124
- package/dist/runtime/app/FimoProviders.js +25 -14
- package/dist/runtime/app/prefetch.d.ts +3 -1
- package/dist/runtime/app/prefetch.js +11 -55
- package/dist/runtime/astro/preview.js +7 -9
- package/dist/runtime/content/client/internal.js +1 -0
- package/dist/runtime/i18n/locale.d.ts +6 -3
- package/dist/runtime/i18n/locale.js +16 -41
- package/dist/runtime/next/client-runtime.js +5 -1
- package/dist/runtime/next/client.d.ts +3 -2
- package/dist/runtime/next/client.js +2 -1
- package/dist/runtime/next/labels.d.ts +2 -2
- package/dist/runtime/next/labels.js +2 -2
- package/dist/runtime/next/preview.d.ts +13 -0
- package/dist/runtime/next/preview.js +34 -0
- package/dist/runtime/next/primitives/server.d.ts +2 -0
- package/dist/runtime/next/primitives/server.js +8 -0
- package/dist/runtime/next/provider.d.ts +5 -0
- package/dist/runtime/next/provider.js +17 -3
- package/dist/runtime/next/server-runtime.js +4 -1
- package/dist/runtime/next/server.d.ts +1 -1
- package/dist/runtime/next/server.js +1 -1
- package/dist/runtime/paths/get-fimo-paths.d.ts +6 -5
- package/dist/runtime/paths/get-fimo-paths.js +43 -42
- package/dist/runtime/preview/location.d.ts +19 -2
- package/dist/runtime/preview/location.js +16 -2
- package/dist/runtime/primitives/index.d.ts +1 -0
- package/dist/runtime/primitives/index.js +1 -0
- package/dist/runtime/react/primitives/editable/DateTime.d.ts +4 -0
- package/dist/runtime/react/primitives/editable/DateTime.js +13 -0
- package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +7 -1
- package/dist/runtime/react/primitives/renderers/DateRenderer.js +11 -8
- package/dist/runtime/react-router/{routes.d.ts → legacy/routes.d.ts} +6 -1
- package/dist/runtime/react-router/{routes.js → legacy/routes.js} +22 -7
- package/dist/runtime/routes/index.d.ts +162 -0
- package/dist/runtime/routes/index.js +335 -0
- package/dist/runtime/routing/AppRoutesProvider.js +4 -3
- package/dist/runtime/seo/resolver.d.ts +5 -0
- package/dist/runtime/seo/resolver.js +10 -42
- package/dist/runtime/shared/fimo-config.types.d.ts +14 -13
- package/dist/runtime/shared/preview-location.d.ts +1 -22
- package/dist/runtime/shared/preview-location.js +5 -93
- package/dist/runtime/sveltekit/preview.d.ts +12 -3
- package/dist/runtime/sveltekit/preview.js +13 -8
- package/dist/runtime/sveltekit/runtime.js +4 -1
- package/dist/runtime/templates.d.ts +19 -0
- package/dist/runtime/templates.js +33 -0
- package/dist/scripts/sync-forms.js +1 -1
- package/dist/scripts/sync-schemas.js +1 -4
- package/dist/scripts/validate-fimo-config.js +5 -1
- package/dist/scripts/validate-page-registry.d.ts +2 -0
- package/dist/scripts/validate-page-registry.js +167 -0
- package/dist/scripts/validate-route-metadata.js +132 -41
- package/package.json +10 -5
- package/release.json +2 -2
- package/templates/astro/.fimo/config.json +13 -5
- package/templates/astro/AGENTS.md +6 -1
- package/templates/astro/astro.config.mjs +7 -0
- package/templates/astro/package.json +1 -1
- package/templates/astro/pnpm-workspace.yaml +0 -3
- package/templates/astro/src/components/ProjectOverview.astro +9 -6
- package/templates/astro/src/layouts/Base.astro +1 -1
- package/templates/astro/src/locales.ts +4 -0
- package/templates/astro/src/pages/[locale]/index.astro +19 -0
- package/templates/astro/src/pages/[locale]/projects/[slug].astro +35 -0
- package/templates/astro/src/pages/[locale]/projects/index.astro +19 -0
- package/templates/astro/src/pages/index.astro +5 -2
- package/templates/astro/src/pages/projects/[slug].astro +4 -2
- package/templates/astro/src/pages/projects/index.astro +5 -2
- package/templates/nextjs/.fimo/config.json +2 -1
- package/templates/nextjs/AGENTS.md +6 -0
- package/templates/nextjs/package.json +1 -1
- package/templates/nextjs/src/app/(default)/layout.tsx +10 -0
- package/templates/nextjs/src/app/[locale]/layout.tsx +22 -0
- package/templates/nextjs/src/app/[locale]/page.tsx +1 -0
- package/templates/nextjs/src/components/Document.tsx +26 -0
- package/templates/nextjs/src/components/FimoPreviewBridge.tsx +13 -0
- package/templates/nextjs/src/locales.ts +13 -0
- package/templates/react-router/.fimo/config.json +3 -6
- package/templates/react-router/AGENTS.md +5 -0
- package/templates/react-router/package.json +2 -2
- package/templates/react-router/pnpm-workspace.yaml +1 -3
- package/templates/react-router/react-router.config.ts +4 -10
- package/templates/react-router/src/pages/LocaleLayout.tsx +12 -0
- package/templates/react-router/src/root.tsx +2 -4
- package/templates/react-router/src/routes.ts +5 -3
- package/templates/sveltekit/.fimo/config.json +2 -1
- package/templates/sveltekit/AGENTS.md +6 -0
- package/templates/sveltekit/package.json +1 -1
- package/templates/sveltekit/src/app.html +1 -1
- package/templates/sveltekit/src/hooks.server.ts +11 -0
- package/templates/sveltekit/src/locales.ts +8 -0
- package/templates/sveltekit/src/params/locale.ts +5 -0
- package/templates/sveltekit/src/routes/+layout.server.ts +6 -1
- package/templates/sveltekit/src/routes/+layout.svelte +5 -0
- package/assets/skills/fimo-migration/references/inventory/coordinator.md +0 -40
- package/assets/skills/fimo-migration/references/inventory/locales/next-intl.md +0 -39
- package/assets/skills/fimo-migration/references/inventory/locales.md +0 -41
- package/assets/skills/fimo-migration/scripts/inventory/locales/next-intl.mjs +0 -459
- package/templates/nextjs/src/app/layout.tsx +0 -17
- /package/templates/nextjs/src/app/{page.tsx → (default)/page.tsx} +0 -0
- /package/templates/sveltekit/src/routes/{+page.svelte → [[locale=locale]]/+page.svelte} +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# URL-only source evidence
|
|
2
|
+
|
|
3
|
+
Use this reference only when no source repository or export exists. The live
|
|
4
|
+
site is the source, so reconstruction requires rendered, interaction-aware
|
|
5
|
+
evidence. A fetch crawl is a useful route and asset seed; it is not proof of
|
|
6
|
+
hydrated layout, lazy content, responsive behavior, or motion.
|
|
7
|
+
|
|
8
|
+
## Establish browser capability
|
|
9
|
+
|
|
10
|
+
Use an existing rendered-browser adapter when it can do all of the following:
|
|
11
|
+
|
|
12
|
+
- isolate concurrent sessions and run JavaScript before the first navigation;
|
|
13
|
+
- navigate, scroll, hover, focus, click, and emulate viewport, color scheme,
|
|
14
|
+
and reduced motion;
|
|
15
|
+
- capture DOM/HTML, accessibility output, computed styles, screenshots, and
|
|
16
|
+
browser errors;
|
|
17
|
+
- record requests or a HAR, including response metadata and bodies when safe;
|
|
18
|
+
- inspect `document.getAnimations()`, animation and transition lifecycle
|
|
19
|
+
events, canvases, and time-separated rendered state; and
|
|
20
|
+
- capture a short video or trace when keyframes do not describe the behavior.
|
|
21
|
+
|
|
22
|
+
Capability belongs to the harness, not the model. Codex, Claude, or another
|
|
23
|
+
model may use any adapter that passes this gate. Record the adapter and version
|
|
24
|
+
in the Source Evidence Pack.
|
|
25
|
+
|
|
26
|
+
Prefer Fimo's tested `agent-browser@0.33.1` when no equivalent adapter exists.
|
|
27
|
+
Before installing or upgrading it, ask the user because installation changes
|
|
28
|
+
the execution environment. Use a direct question such as:
|
|
29
|
+
|
|
30
|
+
> No available browser can capture the DOM, network, interactions, and early
|
|
31
|
+
> motion this URL migration needs. May I install `agent-browser@0.33.1` and its
|
|
32
|
+
> Chromium binary in this environment?
|
|
33
|
+
|
|
34
|
+
After approval:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install -g agent-browser@0.33.1
|
|
38
|
+
agent-browser install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On Linux, use `agent-browser install --with-deps` when Chromium system
|
|
42
|
+
dependencies are missing. Then run `agent-browser --version`,
|
|
43
|
+
`agent-browser doctor`, and `agent-browser skills get core --full`. Do not use
|
|
44
|
+
an unpinned `npx` fallback or silently install/upgrade a browser. If the user
|
|
45
|
+
declines and no equivalent adapter exists, stop the URL-only lane as
|
|
46
|
+
`draft-only` with the missing capability recorded.
|
|
47
|
+
|
|
48
|
+
## Source Evidence Pack
|
|
49
|
+
|
|
50
|
+
Write one folder at `.fimo/migration/source-evidence/`:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
source-evidence/
|
|
54
|
+
├── index.json
|
|
55
|
+
├── routes.json
|
|
56
|
+
├── site-system.json
|
|
57
|
+
├── assets.json
|
|
58
|
+
└── pages/
|
|
59
|
+
└── <route-id>/
|
|
60
|
+
├── summary.json
|
|
61
|
+
├── dom.html
|
|
62
|
+
├── accessibility.txt
|
|
63
|
+
├── motion.json
|
|
64
|
+
├── interactions.json
|
|
65
|
+
├── desktop.png
|
|
66
|
+
├── mobile.png
|
|
67
|
+
└── raw/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`index.json` is a small versioned index, not a second website model. It records:
|
|
71
|
+
|
|
72
|
+
- `schemaVersion`, source origin, capture time, approved route scope, browser
|
|
73
|
+
adapter/version, and desktop/mobile viewports;
|
|
74
|
+
- every intended route with its page directory, discovery source, capture
|
|
75
|
+
states, artifact IDs, and completeness status;
|
|
76
|
+
- every artifact's stable ID, kind, relative path, SHA-256, route, viewport or
|
|
77
|
+
interaction state, and capture time;
|
|
78
|
+
- pointers to `routes.json`, `site-system.json`, and `assets.json`; and
|
|
79
|
+
- unresolved or unsupported observations with user-visible impact and the
|
|
80
|
+
next owner action.
|
|
81
|
+
|
|
82
|
+
Use this shape and add fields only when the source proves they are needed:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"schemaVersion": 1,
|
|
87
|
+
"source": {
|
|
88
|
+
"origin": "https://example.com",
|
|
89
|
+
"capturedAt": "2026-01-01T00:00:00.000Z",
|
|
90
|
+
"approvedPaths": ["/", "/about"]
|
|
91
|
+
},
|
|
92
|
+
"browser": { "adapter": "agent-browser", "version": "0.33.1" },
|
|
93
|
+
"viewports": {
|
|
94
|
+
"desktop": { "width": 1440, "height": 1000 },
|
|
95
|
+
"mobile": { "width": 390, "height": 844 }
|
|
96
|
+
},
|
|
97
|
+
"routes": [
|
|
98
|
+
{
|
|
99
|
+
"id": "home",
|
|
100
|
+
"path": "/",
|
|
101
|
+
"url": "https://example.com/",
|
|
102
|
+
"pageDir": "pages/home",
|
|
103
|
+
"states": {
|
|
104
|
+
"desktop": "captured",
|
|
105
|
+
"mobile": "captured",
|
|
106
|
+
"scrollSweep": "captured",
|
|
107
|
+
"earlyMotion": "captured",
|
|
108
|
+
"interactions": "captured",
|
|
109
|
+
"reducedMotion": "captured",
|
|
110
|
+
"specialRenderers": "not-applicable"
|
|
111
|
+
},
|
|
112
|
+
"artifactIds": ["home-dom", "home-desktop", "home-motion"],
|
|
113
|
+
"status": "complete"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"artifacts": [
|
|
117
|
+
{
|
|
118
|
+
"id": "home-dom",
|
|
119
|
+
"kind": "dom",
|
|
120
|
+
"path": "pages/home/dom.html",
|
|
121
|
+
"sha256": "<sha256>",
|
|
122
|
+
"route": "/",
|
|
123
|
+
"capturedAt": "2026-01-01T00:00:01.000Z"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"shared": {
|
|
127
|
+
"routes": "routes.json",
|
|
128
|
+
"siteSystem": "site-system.json",
|
|
129
|
+
"assets": "assets.json"
|
|
130
|
+
},
|
|
131
|
+
"unresolved": []
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Normalized files contain source facts with artifact IDs and confidence. Large
|
|
136
|
+
DOM, accessibility output, HAR/network bodies, screenshots, recordings, and
|
|
137
|
+
runtime samples stay as raw artifacts and are loaded only for a targeted
|
|
138
|
+
question. Do not write a hand-compressed `source-summary.md` that can silently
|
|
139
|
+
erase evidence.
|
|
140
|
+
|
|
141
|
+
`assets.json` is an ordered table. Each observed asset records its consumer or
|
|
142
|
+
route, requested and resolved/current URL, local path when downloaded, SHA-256,
|
|
143
|
+
MIME type, intrinsic dimensions, source alt text, nearest link, load status,
|
|
144
|
+
provenance, and confidence. Preserve source order for repeated collections.
|
|
145
|
+
|
|
146
|
+
## Observation sequence
|
|
147
|
+
|
|
148
|
+
1. **Scope and routes.** Start from user-approved origins and paths. Inspect
|
|
149
|
+
same-origin links, sitemap/robots, canonical links, navigation, and
|
|
150
|
+
client-side route changes. Do not expand to a new origin or authenticated
|
|
151
|
+
surface without approval.
|
|
152
|
+
2. **Instrument before navigation.** Register an init script before the first
|
|
153
|
+
real page load. It records `animationstart`, `animationend`,
|
|
154
|
+
`transitionrun`, `transitionstart`, `transitionend`, and
|
|
155
|
+
`transitioncancel`; wraps `Element.prototype.animate`; and samples
|
|
156
|
+
`document.getAnimations()` at early and settled checkpoints. Navigating
|
|
157
|
+
first and sampling later loses entrance and stagger evidence.
|
|
158
|
+
3. **Shared system.** Observe header, footer, navigation, grids, breakpoints,
|
|
159
|
+
typography, colors, spacing, fonts, reusable components, cookies/banners,
|
|
160
|
+
and shared motion once. Cite representative pages.
|
|
161
|
+
4. **Page pass.** Give each page observer its own browser session and route
|
|
162
|
+
directory. Capture desktop and mobile from a fresh load, DOM, accessibility,
|
|
163
|
+
computed layout, visible content, screenshots, errors, public API/network
|
|
164
|
+
responses, and early/settled motion.
|
|
165
|
+
5. **Scroll sweep.** Scroll through the entire page in viewport-sized steps,
|
|
166
|
+
pausing for hydration and lazy loading. Return to important sections and
|
|
167
|
+
verify asset counts and load state after the sweep.
|
|
168
|
+
6. **Interactions.** Exercise representative hover, focus, navigation,
|
|
169
|
+
accordion/menu, pointer, and scroll-linked behavior. Sample before, during,
|
|
170
|
+
and after each interaction. Repeat the route with reduced motion enabled.
|
|
171
|
+
7. **Special renderers.** Detect canvas, WebGL, SVG animation, Lottie, video,
|
|
172
|
+
and procedural or spring behavior. Record CSS and intrinsic dimensions,
|
|
173
|
+
device-pixel ratio, animation ownership, time-separated pixel or state
|
|
174
|
+
samples, and any discoverable source-bundle clues.
|
|
175
|
+
8. **Normalize.** The normalizer deduplicates shared facts, preserves route and
|
|
176
|
+
collection order, builds motion recipes, hashes artifacts, and marks capture
|
|
177
|
+
completeness. It does not infer missing behavior as `none`.
|
|
178
|
+
|
|
179
|
+
When using `agent-browser`, load its version-matched core skill and follow this
|
|
180
|
+
command shape rather than guessing flags:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
agent-browser --version
|
|
184
|
+
agent-browser skills get core --full
|
|
185
|
+
agent-browser --session <route-id> --init-script <motion-init.js> open about:blank
|
|
186
|
+
agent-browser --session <route-id> network har start
|
|
187
|
+
agent-browser --session <route-id> set viewport 1440 1000
|
|
188
|
+
agent-browser --session <route-id> open <url>
|
|
189
|
+
agent-browser --session <route-id> snapshot
|
|
190
|
+
agent-browser --session <route-id> get html html
|
|
191
|
+
agent-browser --session <route-id> screenshot --full <desktop.png>
|
|
192
|
+
agent-browser --session <route-id> eval <motion-or-layout-probe>
|
|
193
|
+
agent-browser --session <route-id> network har stop <source.har>
|
|
194
|
+
agent-browser --session <route-id> close
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Use new sessions for fresh mobile and reduced-motion loads. The init script
|
|
198
|
+
must install its event listeners and `Element.prototype.animate` wrapper before
|
|
199
|
+
the source URL opens, expose bounded timestamped samples for collection, and
|
|
200
|
+
avoid changing page layout or animation timing.
|
|
201
|
+
|
|
202
|
+
Use short recordings only when static/keyframe evidence cannot preserve feel:
|
|
203
|
+
canvas or WebGL, pointer physics, scroll-linked motion, Lottie, video, springs,
|
|
204
|
+
or another procedural effect. One representative recording per distinct
|
|
205
|
+
recipe is enough; ordinary CSS/WAAPI motion needs keyframes and timed samples,
|
|
206
|
+
not continuous video. A settled screenshot cannot prove motion.
|
|
207
|
+
|
|
208
|
+
## Motion recipe
|
|
209
|
+
|
|
210
|
+
For each distinct behavior, normalize the trigger, target selector/role,
|
|
211
|
+
properties and keyframes, duration, delay, easing or spring observations,
|
|
212
|
+
iteration/fill/direction, sequence or stagger, responsive differences,
|
|
213
|
+
reduced-motion behavior, and raw artifact IDs. Continuous or procedural
|
|
214
|
+
effects also record renderer type, CSS/intrinsic dimensions, device-pixel
|
|
215
|
+
ratio, frame or pixel samples, recording ID, and source-code/bundle clues when
|
|
216
|
+
available.
|
|
217
|
+
|
|
218
|
+
## Network safety
|
|
219
|
+
|
|
220
|
+
Capture only traffic needed to understand public rendering and content. Before
|
|
221
|
+
retaining a HAR or request body, remove cookies, `Set-Cookie`, authorization
|
|
222
|
+
and proxy-authorization headers, tokens, signed query parameters, personal
|
|
223
|
+
identifiers, and request bodies unrelated to reconstruction. When safe
|
|
224
|
+
redaction cannot be proved, retain a sanitized request/asset table instead of
|
|
225
|
+
the raw HAR. Never recover source credentials from browser state or bundles.
|
|
226
|
+
|
|
227
|
+
## Completeness gate
|
|
228
|
+
|
|
229
|
+
Reconstruction may start only when every intended route is captured or listed
|
|
230
|
+
as unresolved and each captured route records:
|
|
231
|
+
|
|
232
|
+
- fresh desktop and mobile loads;
|
|
233
|
+
- full scroll/lazy-load completion;
|
|
234
|
+
- DOM/accessibility and asset coverage;
|
|
235
|
+
- early and settled motion capture, even when the result is no motion;
|
|
236
|
+
- applicable hover/focus/navigation/scroll states;
|
|
237
|
+
- reduced-motion behavior; and
|
|
238
|
+
- every special renderer as captured, not applicable, or unresolved.
|
|
239
|
+
|
|
240
|
+
Close every browser session after fan-in. The normalizer returns the pack path,
|
|
241
|
+
route and asset counts, incomplete states, unresolved items, and the exact
|
|
242
|
+
browser adapter/version to the coordinator.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Content execution workers
|
|
2
|
+
|
|
3
|
+
Execute the content planner's text handoff. Do not rediscover the source,
|
|
4
|
+
reclassify values, redesign schemas, or edit files outside the assigned batch.
|
|
5
|
+
If the handoff is incomplete, report the missing item to the coordinator so the
|
|
6
|
+
planner can repair it.
|
|
7
|
+
|
|
8
|
+
## Data worker
|
|
9
|
+
|
|
10
|
+
Own one bounded schema/locale payload. Start only after every referenced asset
|
|
11
|
+
has a confirmed Fimo mapping and, during conversion, the framework gate passes.
|
|
12
|
+
Perform create-or-update writes and read the batch back before returning.
|
|
13
|
+
|
|
14
|
+
For entry batches, use
|
|
15
|
+
`fimo entries bulk-create <Uid> --file <payload> --upsert-by slug` and report
|
|
16
|
+
per-chunk created, updated, reconciled, and conflict counts. Do not leave a
|
|
17
|
+
payload as evidence of an import. An unavailable dependency blocks promptly;
|
|
18
|
+
do not poll indefinitely.
|
|
19
|
+
|
|
20
|
+
## Code worker
|
|
21
|
+
|
|
22
|
+
Start only after this batch's real records read back as non-empty. Own exactly
|
|
23
|
+
the consumer files assigned by the planner.
|
|
24
|
+
|
|
25
|
+
1. Load the active framework's `fimo-code` reference.
|
|
26
|
+
2. Establish the generated Fimo client/adapter needed by the batch.
|
|
27
|
+
3. Replace every planned `sourceFile`/`sourceKey` at its existing consumer in
|
|
28
|
+
place. Appending a disconnected duplicate section is not wiring.
|
|
29
|
+
4. Preserve executable React/MDX children in order around editable prose.
|
|
30
|
+
5. Render at least one real imported item through every Server-to-Client or
|
|
31
|
+
plain-JSON boundary in the batch. Use the framework's generated
|
|
32
|
+
serialization/hydration contract; do not partially unwrap tracked values.
|
|
33
|
+
6. Confirm each original literal or data source is gone only where its Fimo
|
|
34
|
+
replacement now renders once.
|
|
35
|
+
|
|
36
|
+
A loader that reads Fimo while the consuming markup is missing, an imported
|
|
37
|
+
entry no route consumes, or a successful build over empty data is incomplete.
|
|
38
|
+
Return source items wired, files changed, read-back/render evidence, and any
|
|
39
|
+
unresolved item in plain text.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Content planning worker
|
|
2
|
+
|
|
3
|
+
Own semantic discovery, schema authoring, payload preparation, and the text
|
|
4
|
+
handoff. Do not import entries or rewrite application consumers.
|
|
5
|
+
|
|
6
|
+
1. Inspect every content-bearing source and consumer: Markdown/MDX bodies and
|
|
7
|
+
frontmatter, JSX/TSX modules, hardcoded arrays and objects, imports, data
|
|
8
|
+
clients, and call sites. Read local exports and public APIs directly. A
|
|
9
|
+
private API requires a user-provided export or narrowly scoped server-side
|
|
10
|
+
credential; never recover or copy secret values.
|
|
11
|
+
2. Classify each value as collection content, single content, an
|
|
12
|
+
editor-visible label, or application-owned code. Repetition is evidence,
|
|
13
|
+
not an automatic collection rule. Assistive text, identifiers, and values
|
|
14
|
+
that drive behavior are not labels.
|
|
15
|
+
3. Define complete schemas from source evidence: types, requiredness, defaults,
|
|
16
|
+
uniqueness, locale behavior, media constraints, references, and
|
|
17
|
+
cardinalities. Do not invent constraints. Load `references/decision.md` and
|
|
18
|
+
the target project's Fimo schema guidance.
|
|
19
|
+
4. Trace every item to the route, component, loader, query, or render module
|
|
20
|
+
that consumes it. Record its `sourceFile`, `sourceKey`, target files, payload
|
|
21
|
+
file, and worker batch. Finding data without consumers is incomplete.
|
|
22
|
+
5. Enumerate every media field and rich-text image node as an asset obligation.
|
|
23
|
+
6. Write and push `src/schemas/*.json`, generate required clients/types, and
|
|
24
|
+
write self-contained JSON payloads for the data workers.
|
|
25
|
+
7. Write `.fimo/migration/content-plan.md` before any entry, label, single, or
|
|
26
|
+
content-driven code rewrite begins.
|
|
27
|
+
|
|
28
|
+
The text plan has one source item per independently migrated construct and
|
|
29
|
+
groups them into non-overlapping data and code batches. Every object in a
|
|
30
|
+
hardcoded content array is an item. MDX prose and executable imports/components
|
|
31
|
+
are separate items when needed; executable JSX cannot disappear inside a
|
|
32
|
+
rich-text conversion.
|
|
33
|
+
|
|
34
|
+
Keep the handoff short:
|
|
35
|
+
|
|
36
|
+
```md
|
|
37
|
+
## BlogPost
|
|
38
|
+
|
|
39
|
+
- Source: `content/blog/post.mdx`
|
|
40
|
+
- Schema: `src/schemas/BlogPost.json` (pushed)
|
|
41
|
+
- Payload: `.fimo/migration/content/BlogPost.en.json`
|
|
42
|
+
- Items: title, body, cover, `CoverageChart` behavior
|
|
43
|
+
- Consumers: `src/app/blog/[slug]/page.tsx`
|
|
44
|
+
- Data worker: `BlogPost/en`
|
|
45
|
+
- Code worker: `blog-rendering`, owns the consumer above
|
|
46
|
+
|
|
47
|
+
## Unresolved
|
|
48
|
+
|
|
49
|
+
- `content/blog/post.mdx:11`: `CoverageChart` implementation is absent; owner
|
|
50
|
+
must restore it. Do not remove the node silently.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
A construct is unresolved only when it genuinely cannot be migrated. Include
|
|
54
|
+
its exact source, user-visible impact, reason, and owner action; "custom" is not
|
|
55
|
+
a reason.
|
|
56
|
+
|
|
57
|
+
## Optional extraction helpers
|
|
58
|
+
|
|
59
|
+
Start with `rg` and targeted reads. A bounded read-only helper under
|
|
60
|
+
`.fimo/migration/tmp/` may parse repeated frontmatter, JSON/YAML exports, or
|
|
61
|
+
literal structures while preserving source locations. Spot-check its output.
|
|
62
|
+
The agent still owns classification, schema design, and consumer tracing. Do
|
|
63
|
+
not build a generic codemod system or let the helper write Fimo data or app
|
|
64
|
+
code.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Framework conversion worker
|
|
2
|
+
|
|
3
|
+
Use this worker only after the user explicitly chose a framework conversion.
|
|
4
|
+
Preserve mode never uses it.
|
|
5
|
+
|
|
6
|
+
`fimo migrate init` creates the target first. Inspect the initialized template
|
|
7
|
+
and its real paths before writing. Own all structural target code: dependencies,
|
|
8
|
+
framework config, root layout and providers, app tree, route modules, 404,
|
|
9
|
+
redirects, headers, middleware, sitemap/robots/OG structure, and locale-routing
|
|
10
|
+
structure. There is no separate runtime or route writer during conversion.
|
|
11
|
+
|
|
12
|
+
Port the source APIs, loaders, hardcoded content, integrations, and visible
|
|
13
|
+
behavior into the new framework unchanged. Do not migrate those values to Fimo
|
|
14
|
+
in this pass; schemas, data, and Fimo consumer wiring belong to later content
|
|
15
|
+
workers. The content planner may inspect the source in parallel but must not
|
|
16
|
+
edit structural target code.
|
|
17
|
+
|
|
18
|
+
Load the target framework's `fimo-code` and hosting references. For Next.js,
|
|
19
|
+
also load `references/frameworks/nextjs.md` and translate portable hosting
|
|
20
|
+
behavior before declaring provider-specific behavior unresolved.
|
|
21
|
+
|
|
22
|
+
## Framework gate
|
|
23
|
+
|
|
24
|
+
Before returning, self-check and report:
|
|
25
|
+
|
|
26
|
+
- dependencies install cleanly;
|
|
27
|
+
- the framework build succeeds;
|
|
28
|
+
- every source route maps to a target route and renders locally with its
|
|
29
|
+
expected status, including 404 behavior;
|
|
30
|
+
- representative source text landmarks appear;
|
|
31
|
+
- exactly one app tree and one root layout exist; and
|
|
32
|
+
- primary routes have no runtime or console errors.
|
|
33
|
+
|
|
34
|
+
Return a plain-text route map, files changed, check results, preserved behavior,
|
|
35
|
+
and unresolved behavior. The coordinator independently reruns the build and
|
|
36
|
+
representative route checks. Content data cannot start until this gate and the
|
|
37
|
+
asset gate pass.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# URL observation workers
|
|
2
|
+
|
|
3
|
+
Use these workers only for URL-only evidence. They inspect the live source and
|
|
4
|
+
write the Source Evidence Pack; they do not edit application code, create Fimo
|
|
5
|
+
schemas, import content, deploy, or publish.
|
|
6
|
+
|
|
7
|
+
## Schedule and ownership
|
|
8
|
+
|
|
9
|
+
| worker | owns | output |
|
|
10
|
+
| ---------------------- | --------------------------------------- | ------------------------------------------------------------- |
|
|
11
|
+
| route scout | approved route discovery | candidate route table with source and scope disposition |
|
|
12
|
+
| shared-system observer | cross-page shell and design behavior | shared system observations with artifact IDs |
|
|
13
|
+
| page observer | one route directory and browser session | raw page artifacts plus normalized page observations |
|
|
14
|
+
| evidence normalizer | shared pack files and completeness | `index.json`, routes, assets, shared facts, unresolved states |
|
|
15
|
+
|
|
16
|
+
Run the route scout and shared-system observer first. After the coordinator
|
|
17
|
+
approves the bounded route list, start page observers in batches of five to ten
|
|
18
|
+
when the harness and browser can isolate sessions safely. Each observer owns
|
|
19
|
+
exactly one route directory. The normalizer starts only after all observers are
|
|
20
|
+
terminal and is the only worker allowed to write shared pack files.
|
|
21
|
+
|
|
22
|
+
## Route scout
|
|
23
|
+
|
|
24
|
+
- Stay within the user-approved origins and path scope.
|
|
25
|
+
- Combine rendered navigation, same-origin links, sitemap/robots, canonicals,
|
|
26
|
+
and client-side navigation evidence.
|
|
27
|
+
- Mark duplicates, redirects, locale variants, external links, blocked routes,
|
|
28
|
+
and discovered routes outside scope; never crawl a newly discovered origin
|
|
29
|
+
automatically.
|
|
30
|
+
- Return the ordered route list, discovery evidence, and open scope questions.
|
|
31
|
+
|
|
32
|
+
## Shared-system observer
|
|
33
|
+
|
|
34
|
+
- Compare representative routes at desktop and mobile.
|
|
35
|
+
- Record shared chrome, layout/grid rules, breakpoints, typography, fonts,
|
|
36
|
+
colors, spacing, reusable components, global assets, and shared interaction
|
|
37
|
+
or motion recipes.
|
|
38
|
+
- Distinguish observed facts from inference and cite raw artifact IDs.
|
|
39
|
+
- Do not duplicate every page observer's raw artifacts.
|
|
40
|
+
|
|
41
|
+
## Page observer
|
|
42
|
+
|
|
43
|
+
Follow `references/url-evidence.md`. Start with a fresh isolated session and
|
|
44
|
+
pre-navigation motion instrumentation. Capture a fresh desktop load, full
|
|
45
|
+
scroll sweep, interactions, fresh mobile load, reduced-motion load, network and
|
|
46
|
+
asset state, early/settled motion, console errors, and special renderers.
|
|
47
|
+
|
|
48
|
+
Write only the assigned route directory. `summary.json`, `motion.json`, and
|
|
49
|
+
`interactions.json` cite the raw artifacts that prove each fact. A missing
|
|
50
|
+
observation is `unresolved`, not `none`.
|
|
51
|
+
|
|
52
|
+
Return status, duration, route, browser adapter/version, artifacts written,
|
|
53
|
+
content and asset counts, detected motion/special renderers, incomplete states,
|
|
54
|
+
and unresolved items.
|
|
55
|
+
|
|
56
|
+
## Evidence normalizer
|
|
57
|
+
|
|
58
|
+
- Verify every page report and referenced artifact exists.
|
|
59
|
+
- Deduplicate shared facts without dropping route-specific differences.
|
|
60
|
+
- Preserve exact route, content, collection, and asset order.
|
|
61
|
+
- Build the ordered asset table and motion recipes from observations.
|
|
62
|
+
- Hash every retained artifact and write the versioned `index.json`.
|
|
63
|
+
- Mark each completeness state as captured, not applicable with evidence, or
|
|
64
|
+
unresolved with impact and next action.
|
|
65
|
+
- Keep raw evidence out of default reconstruction prompts; workers receive the
|
|
66
|
+
compact normalized files and request raw artifacts only by ID.
|
|
67
|
+
|
|
68
|
+
The normalizer does not judge the future target and does not rewrite the source
|
|
69
|
+
facts into an implementation plan. Its final status is `ready` only when the
|
|
70
|
+
URL evidence completeness gate passes; otherwise reconstruction remains
|
|
71
|
+
`draft-only`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Migration validator
|
|
2
|
+
|
|
3
|
+
The validator is an independent read-only worker. It did not author the
|
|
4
|
+
migration and starts only after all writers return.
|
|
5
|
+
|
|
6
|
+
Compare the source, content plan, actual `git diff`, real Fimo state, and local
|
|
7
|
+
application behavior. A worker report is a claim, not evidence.
|
|
8
|
+
|
|
9
|
+
Verify:
|
|
10
|
+
|
|
11
|
+
- every source route renders with expected status and representative content;
|
|
12
|
+
- for URL-only sources, every intended route passed the Source Evidence Pack
|
|
13
|
+
completeness gate and every normalized fact cites a raw artifact;
|
|
14
|
+
- schemas, entries, singles, labels, media, forms, and locales exist through
|
|
15
|
+
CLI read-back;
|
|
16
|
+
- every planned source item is consumed at its original behavior path, not in
|
|
17
|
+
an appended duplicate section;
|
|
18
|
+
- media URLs load as their expected media type;
|
|
19
|
+
- native Fimo APIs are used without migration-only wrappers;
|
|
20
|
+
- imports are safe to rerun;
|
|
21
|
+
- build and representative browser interactions pass;
|
|
22
|
+
- source and target motion are compared at matched early, settled, hover,
|
|
23
|
+
focus, scroll, and reduced-motion phases where the source pack records them;
|
|
24
|
+
- procedural canvas, WebGL, spring, or scroll-linked effects are compared with
|
|
25
|
+
time-separated samples or short recordings rather than one screenshot; and
|
|
26
|
+
- every unsupported item names its impact and owner action.
|
|
27
|
+
|
|
28
|
+
Return a plain-text report with status, duration, checks run, counts, failing
|
|
29
|
+
source items, and suggested bounded repair surface. The coordinator may run one
|
|
30
|
+
repair for that surface and rerun validation. It does not restart every worker
|
|
31
|
+
or loop indefinitely.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Migration workers
|
|
2
|
+
|
|
3
|
+
The root coding agent is the coordinator. It inspects the initialized target,
|
|
4
|
+
writes a short text plan, starts independent workers through its native
|
|
5
|
+
subagent mechanism, and fans their results back in. If subagents are
|
|
6
|
+
unavailable, run the same lanes sequentially; never skip a surface silently.
|
|
7
|
+
|
|
8
|
+
The CLI does not start language models. JSON is reserved for Fimo schemas and
|
|
9
|
+
content payloads, plus the URL-only Source Evidence Pack described in
|
|
10
|
+
`references/url-evidence.md`. Worker ownership, dependencies, reports, and
|
|
11
|
+
unresolved work stay in `.fimo/migration/*.md` or the agents' plain-text
|
|
12
|
+
responses.
|
|
13
|
+
|
|
14
|
+
## URL-only observation crew
|
|
15
|
+
|
|
16
|
+
Before reconstruction, run the observation crew in
|
|
17
|
+
`references/workers/url-observer.md`:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
route scout + shared-system observer
|
|
21
|
+
-> independent page observers in bounded batches
|
|
22
|
+
-> one evidence normalizer
|
|
23
|
+
-> Source Evidence Pack completeness gate
|
|
24
|
+
-> reconstruction workers below
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Do not let every reconstruction worker scrape the live site independently.
|
|
28
|
+
Page observers own separate route directories and isolated browser sessions;
|
|
29
|
+
the normalizer alone owns the shared index, route table, asset table, and
|
|
30
|
+
cross-page summaries.
|
|
31
|
+
|
|
32
|
+
## Schedule
|
|
33
|
+
|
|
34
|
+
Plan a lane only when the source proves that surface exists:
|
|
35
|
+
|
|
36
|
+
| worker | owns | starts when |
|
|
37
|
+
| --------------- | ----------------------------------------------- | ------------------------ |
|
|
38
|
+
| runtime | framework/runtime files and provider config | immediately |
|
|
39
|
+
| routes | route modules, redirects, SEO and host behavior | immediately |
|
|
40
|
+
| content planner | schemas, content payloads, and content handoff | immediately |
|
|
41
|
+
| locales | locale setup and translated UI copy | immediately |
|
|
42
|
+
| assets/forms | media uploads and form behavior | after content planner |
|
|
43
|
+
| content data | one schema/locale import | after assets |
|
|
44
|
+
| content code | listed consuming files | after its data read-back |
|
|
45
|
+
| validator | read-only final checks | after all writers |
|
|
46
|
+
|
|
47
|
+
This is preserve mode, the default. When the user explicitly chose a framework
|
|
48
|
+
conversion, one framework worker replaces runtime and routes and owns all
|
|
49
|
+
structural target code. The content planner may run beside it. Data then waits
|
|
50
|
+
for both the asset and framework gates, and code waits for real imported-data
|
|
51
|
+
read-back.
|
|
52
|
+
|
|
53
|
+
## Ownership
|
|
54
|
+
|
|
55
|
+
- **runtime** preserves the detected framework, router, runtime, dependencies,
|
|
56
|
+
provider setup, environment wiring, and provider-specific configuration. An
|
|
57
|
+
unclear or unsupported setup produces a question, not a silent conversion.
|
|
58
|
+
- **routes** preserves every route, redirect, 404, SEO/OG/social output,
|
|
59
|
+
sitemap, robots, feeds, headers, and other observable host behavior. A file
|
|
60
|
+
that consumes migrated content belongs to its later content-code worker.
|
|
61
|
+
- **content planner** discovers and models all editable content, labels,
|
|
62
|
+
consumers, schemas, payloads, media obligations, and execution batches. It
|
|
63
|
+
never imports entries or rewrites consumers. Read
|
|
64
|
+
`references/workers/content-planner.md`.
|
|
65
|
+
- **assets/forms** uploads every planner media obligation and patches payload
|
|
66
|
+
references. It replaces a form or integration only when Fimo preserves its
|
|
67
|
+
behavior end to end; otherwise it preserves or reports it.
|
|
68
|
+
- **content data and code** execute the planner handoff without rediscovering
|
|
69
|
+
or redesigning it. Read `references/workers/content-execution.md`.
|
|
70
|
+
- **locales** owns locale configuration, locale routing, and translated
|
|
71
|
+
visitor-visible labels.
|
|
72
|
+
- **framework conversion** is used only after explicit user choice. Read
|
|
73
|
+
`references/workers/framework.md`.
|
|
74
|
+
- **validator** authors nothing. Read `references/workers/validator.md`.
|
|
75
|
+
|
|
76
|
+
If two lanes need one file, name one owner in the text plan and sequence the
|
|
77
|
+
other after it. Do not add a metadata format for a small overlap.
|
|
78
|
+
|
|
79
|
+
## Coordinator gates
|
|
80
|
+
|
|
81
|
+
1. Run `fimo migrate init` and inspect the real target paths before workers
|
|
82
|
+
write.
|
|
83
|
+
2. For URL-only sources, finish the Source Evidence Pack and its completeness
|
|
84
|
+
gate before reconstruction.
|
|
85
|
+
3. Start runtime/routes/content-planner/locales together, or the framework
|
|
86
|
+
worker plus content planner/locales in conversion mode.
|
|
87
|
+
4. After the content plan, upload every planned asset and patch payloads.
|
|
88
|
+
5. Start data workers only after the asset gate and, in conversion mode, the
|
|
89
|
+
framework gate.
|
|
90
|
+
6. Start each code worker only after its own imported records read back as
|
|
91
|
+
non-empty. A build over empty data proves nothing.
|
|
92
|
+
7. Start the independent validator only after every writer has returned.
|
|
93
|
+
|
|
94
|
+
Each prompt names the worker's source paths, exact target ownership, applicable
|
|
95
|
+
reference above, and dependencies. Each report states status, duration, source
|
|
96
|
+
evidence, files changed, Fimo writes, source items handled, unresolved work,
|
|
97
|
+
and the next action. The coordinator verifies those claims against `git diff`,
|
|
98
|
+
CLI read-back, and rendered routes.
|
|
99
|
+
|
|
100
|
+
A source item is covered only when its target value exists and the application
|
|
101
|
+
consumes it at the original behavior path, or when an explicit unresolved item
|
|
102
|
+
names the impact and owner action. If validation fails, create one bounded
|
|
103
|
+
repair task for that surface and rerun the validator; do not restart every
|
|
104
|
+
worker.
|