fimo 2.2.0-staging.10 → 2.2.0-staging.11

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 (42) hide show
  1. package/assets/skills/fimo-cli/SKILL.md +1 -1
  2. package/assets/skills/fimo-cli/references/assets.md +38 -2
  3. package/assets/skills/fimo-migration/SKILL.md +44 -13
  4. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +8 -0
  5. package/assets/skills/fimo-migration/references/qa.md +30 -4
  6. package/assets/skills/fimo-migration/references/questions-and-improvements.md +188 -0
  7. package/assets/skills/fimo-migration/references/workers/content-planner.md +8 -3
  8. package/assets/skills/fimo-migration/references/workers/validator.md +20 -6
  9. package/assets/skills/fimo-migration/references/workers.md +17 -6
  10. package/assets/skills/fimo-migration/references/workflow.md +33 -6
  11. package/assets/skills/fimo-studio/SKILL.md +3 -1
  12. package/assets/skills/fimo-studio/references/agents.md +25 -0
  13. package/dist/cli/bundle.json +1 -1
  14. package/dist/cli/index.js +12 -11
  15. package/dist/runtime/templates.d.ts +1 -0
  16. package/dist/runtime/templates.js +3 -0
  17. package/package.json +8 -7
  18. package/templates/astro/package.json +2 -2
  19. package/templates/nextjs/package.json +3 -3
  20. package/templates/react-router/package.json +4 -4
  21. package/templates/sveltekit/package.json +2 -2
  22. package/templates/vite/package.json +4 -4
  23. package/templates/welcome/manifest.json +404 -0
  24. package/templates/welcome/media/analytics-overview.avif +0 -0
  25. package/templates/welcome/media/autonomous-loop.avif +0 -0
  26. package/templates/welcome/media/editable-preview.avif +0 -0
  27. package/templates/welcome/media/media-library.avif +0 -0
  28. package/templates/welcome/media/slack-teams.avif +0 -0
  29. package/templates/welcome/template/.fimo/agents/welcome-guide/GOAL.md +7 -0
  30. package/templates/welcome/template/.fimo/agents/welcome-guide/config.yaml +8 -0
  31. package/templates/welcome/template/.fimo/config.json +53 -0
  32. package/templates/welcome/template/src/font.css +60 -0
  33. package/templates/welcome/template/src/pages/ArticleDetail.tsx +68 -0
  34. package/templates/welcome/template/src/pages/Index.tsx +32 -0
  35. package/templates/welcome/template/src/pages/SiteContent.tsx +413 -0
  36. package/templates/welcome/template/src/pages/fallback-content.ts +133 -0
  37. package/templates/welcome/template/src/routes.ts +9 -0
  38. package/templates/welcome/template/src/schemas/Article.json +12 -0
  39. package/templates/welcome/template/src/schemas/Article.ts +59 -0
  40. package/templates/welcome/template/src/schemas/Article.types.ts +73 -0
  41. package/templates/welcome/template/src/schemas/HomePage.json +39 -0
  42. package/templates/welcome/template/src/schemas/HomePage.types.ts +114 -0
@@ -83,7 +83,7 @@ Load the matching reference when the user's request fires its trigger. Recipes t
83
83
  - "Declare Pages routes / configure Pages sources or route params / control what Studio shows for a route" → `references/pages.md`
84
84
  - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ run `fimo skills get fimo-code --ref forms` for the JSON spec and generated client**
85
85
  - "View form submissions / who filled out the contact form / inspect what users sent / how many signups" → `references/forms.md` § Reading submissions
86
- - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
86
+ - "Upload, inspect, replace, safely remove, or permanently destroy an image / hero / cover / existing media file" → `references/assets.md` **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
87
87
  - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape if you'll plug the result into UI**
88
88
  - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ run `fimo skills get fimo-code --ref labels` and load the detected framework reference**
89
89
  - "Enable locales / configure default locale / integrate an existing locale system" → `references/locales.md` **+ run `fimo skills get fimo-code --ref locales` and load the detected framework locale reference**
@@ -3,7 +3,7 @@
3
3
  > Package contract: run `fimo skills get fimo-code --ref assets` for `FimoMedia`, `--ref ui` for rendering primitives, and load the detected framework reference for framework-specific integration.
4
4
  > For **generating** new images / videos with AI, see **`references/media.md`** for the task commands and recipes.
5
5
 
6
- This file covers the **CLI workflow** for media that already exists: uploading files, browsing the library, opening an asset to inspect it, moving / deleting items.
6
+ This file covers the **CLI workflow** for media that already exists: uploading files, browsing the library, inspecting reference impact, replacing references, and removing assets safely.
7
7
 
8
8
  ## Upload a file
9
9
 
@@ -145,11 +145,47 @@ When the agent needs to **see** the image — e.g., Claude inspecting it to pick
145
145
  fimo assets create-folder "Blog Images"
146
146
  fimo assets create-folder "Covers" --parent-id <uuid>
147
147
  fimo assets move <asset-id> --parent-id <folder-uuid>
148
- fimo assets delete <asset-id>
149
148
  ```
150
149
 
151
150
  `--parent-id` is **required** on `move` and must be a folder UUID. (Moving an asset back to the library root isn't supported by this command today — the server rejects a non-UUID parent.)
152
151
 
152
+ ## Inspect, replace, and remove safely
153
+
154
+ Check structured content references before removal:
155
+
156
+ ```bash
157
+ fimo assets usage <asset-id> --json
158
+ ```
159
+
160
+ The result reports coverage, status, and counts for the Current Branch, Main, and Live. Other Branches are not checked, so this is guidance, never a project-wide claim that an asset is unused. Code references are not scanned.
161
+
162
+ Replace structured references only in the Current Branch:
163
+
164
+ ```bash
165
+ fimo assets replace <source-id> --with <replacement-id>
166
+ ```
167
+
168
+ This changes references, not file bytes. It leaves the original asset, Main, Live, other Branches, and code references unchanged.
169
+
170
+ Remove from the selected environment and include reference guidance in the receipt:
171
+
172
+ ```bash
173
+ fimo assets remove <asset-id>
174
+ fimo assets remove <source-id> --replace-with <replacement-id>
175
+ fimo assets remove <asset-id> --without-checking
176
+ ```
177
+
178
+ Reference counts and incomplete scopes do not block environment removal. Main and Live keep their rows, and shared bytes remain available to them. Use `--replace-with` when Current Branch references should point to another asset before removal. `--without-checking` skips only the guidance scan and remains environment-scoped.
179
+
180
+ Project-wide destruction is separate and requires confirmation:
181
+
182
+ ```bash
183
+ fimo assets remove <asset-id> --permanent
184
+ fimo assets remove <asset-id> --permanent --yes
185
+ ```
186
+
187
+ Use `--permanent` only when the user explicitly wants the asset destroyed across the project. It cannot be combined with `--replace-with` or `--without-checking`. The legacy `fimo assets delete` spelling remains an alias for `remove`.
188
+
153
189
  ## End-to-end workflow
154
190
 
155
191
  1. Upload with `fimo assets upload`, use `fimo assets bulk-upload` for a batch, or generate with a task command such as `fimo image generate`.
@@ -34,6 +34,20 @@ end-to-end. Preserve the original code path and record required environment
34
34
  variable names only; never read or copy secret values. A missing secret is a
35
35
  follow-up for the owner, not permission to silently remove the integration.
36
36
 
37
+ Before any source, target, Fimo, or remote write, inspect the available source
38
+ read-only and follow [questions-and-improvements.md](references/questions-and-improvements.md).
39
+ Use the coding agent's native structured-question UI when available. Ask one
40
+ stacked batch of the decisions the source cannot answer instead of interrupting
41
+ the migration for each question. A migration request never authorizes moving
42
+ environment values or credentials.
43
+
44
+ When migration replaces local or bundled content with Fimo reads, preserving
45
+ content-delivery performance is part of fidelity. Keep build-time and
46
+ server-rendered content off the browser request path, use direct generated-client
47
+ lookups, avoid duplicate or sequential reads, and prove edit freshness. Do not
48
+ ask a generic optimization question or bundle a framework upgrade into the
49
+ migration.
50
+
37
51
  ## Execution environment
38
52
 
39
53
  Run this skill from a coding-agent process that has direct access to the
@@ -139,13 +153,18 @@ report the exact failed command and setup requirement.
139
153
  unwired.
140
154
  - Prefer source code and exports over inferred crawl data. Use a public URL as
141
155
  visual, SEO, route, and behavior evidence when better source material exists.
156
+ When the source defines an active CMS but its deployed records are unavailable,
157
+ rebuild published content from the public site only after the user explicitly
158
+ chooses that lower-confidence path.
142
159
  - Read local files and exports directly and public APIs without credentials.
143
160
  Private APIs and CMSs require a user-provided export or a narrowly scoped
144
161
  server-side credential. Never read credentials from browser code or copy
145
162
  them into browser code, migration artifacts, or reports. Target-project
146
163
  authentication does not grant source access. If the source API URL or access
147
- is missing or unreachable, stop and ask the user for it; do not guess, replace
148
- the content, or mark the lane complete.
164
+ is missing or unreachable, stop and ask whether the owner wants to provide a
165
+ scoped export or read-only access, reconstruct the selected published routes
166
+ from public pages, or migrate code only and leave those records external. Never
167
+ infer permission to scrape, discover secrets, or contact private endpoints.
149
168
  - Model content before page code. Generated JSON is not imported content.
150
169
  - Model editorial content Fimo-natively: blocks for structured or repeatable
151
170
  sections, richtext for rich bodies, references for categories, authors,
@@ -190,9 +209,11 @@ report the exact failed command and setup requirement.
190
209
  create the draft evidence pack.
191
210
  - **hybrid**: source material plus a public URL. Treat source material as
192
211
  truth and the URL as comparison evidence.
193
- 4. Read `references/workflow.md` before implementation and create or update the
212
+ 4. Read `references/questions-and-improvements.md`, finish its read-only
213
+ preflight, and collect the user's decisions before setup or implementation.
214
+ 5. Read `references/workflow.md` before implementation and create or update the
194
215
  plain-text migration plan.
195
- 5. Load the references that apply:
216
+ 6. Load the references that apply:
196
217
  - Coordinator ownership and dependency gates -> `references/workers.md`.
197
218
  - Framework conversion worker -> `references/workers/framework.md`.
198
219
  - Content planner -> `references/workers/content-planner.md`.
@@ -272,7 +293,10 @@ Commands that perform actual data writes, all requiring the linked target:
272
293
 
273
294
  ## Migration loop
274
295
 
275
- 1. Run the setup path from "Initialized target precondition" and inspect the
296
+ 1. Inspect the source read-only, then ask the one preflight question batch from
297
+ `references/questions-and-improvements.md`. Do not initialize, link, import,
298
+ edit, or move environment values until the user answers every consent gate.
299
+ 2. Run the setup path from "Initialized target precondition" and inspect the
276
300
  initialized target before any worker edits it. A `fimo link` adoption keeps
277
301
  the source framework; the `fimo init` / `fimo migrate init` paths choose the
278
302
  target framework through the same canonical option as
@@ -284,7 +308,7 @@ Commands that perform actual data writes, all requiring the linked target:
284
308
  copying an arbitrary template path. The target's real files and directories
285
309
  are the authority for framework paths; do not invent a second `app/` or
286
310
  `src/app/` tree from an example.
287
- 2. Write a short `.fimo/migration/migration-plan.md` containing the chosen
311
+ 3. Write a short `.fimo/migration/migration-plan.md` containing the chosen
288
312
  framework, source/target paths, worker owners, important dependencies, and
289
313
  known questions. Start the independent workers in `references/workers.md`:
290
314
  runtime/config, routes/SEO, content planning, and locales when those surfaces
@@ -293,25 +317,25 @@ Commands that perform actual data writes, all requiring the linked target:
293
317
  all structural target code, and must pass the framework gate in
294
318
  `references/workers/framework.md` before content data and code workers
295
319
  start. Worker prompts and worker reports are plain text.
296
- 3. The content planner reads every content-bearing source and consumer. When
320
+ 4. The content planner reads every content-bearing source and consumer. When
297
321
  content comes from an API, it traces the active application client and
298
322
  retrieves the complete accessible dataset before pushing schemas. It then
299
323
  writes complete schemas and import payloads, recording source items,
300
324
  consumers, batches, and unresolved behavior in the text plan rather than a
301
325
  second orchestration format.
302
- 4. Each discovery lane reports active media in its own surface. After the
326
+ 5. Each discovery lane reports active media in its own surface. After the
303
327
  runtime/framework, routes/SEO, and content discovery receipts are terminal,
304
328
  the coordinator performs one fan-in: combine and deduplicate them into the
305
329
  complete media-obligation list. Give only that list to the media worker; do
306
330
  not require a content-planner rescan. Once it returns every mapping, patch
307
331
  code and payload consumers. Start data after the asset gate and content code
308
332
  only after its imported records read back successfully.
309
- 5. Fan in the workers' plain-text reports. Compare their claimed files with
333
+ 6. Fan in the workers' plain-text reports. Compare their claimed files with
310
334
  `git diff`, their Fimo writes with read-back CLI queries, and their source
311
335
  coverage with the content plan. Every source item must be migrated,
312
336
  deliberately preserved, or listed as unresolved with an owner action. A
313
337
  report that merely says “done” is not evidence.
314
- 6. Validate against the real target with a validator that did not author the
338
+ 7. Validate against the real target with a validator that did not author the
315
339
  changes and starts only after every other worker report is terminal: read
316
340
  back schemas, entries, singles, labels, and assets through the CLI, build
317
341
  the project, render the migrated routes, and verify hosting compatibility
@@ -319,13 +343,15 @@ Commands that perform actual data writes, all requiring the linked target:
319
343
  when a browser is available; otherwise use deterministic
320
344
  HTTP/header/process/log checks and mark visual proof unavailable. Then run
321
345
  the QA gate in `references/qa.md`.
322
- 7. Write `.fimo/migration/migration-report.md` with coverage, counts, mappings,
346
+ 8. Write `.fimo/migration/migration-report.md` with coverage, counts, mappings,
323
347
  unresolved items, timings from worker reports, and next actions.
324
348
 
325
349
  ## References
326
350
 
327
351
  - `references/workflow.md` - phase order, source intake, URL artifacts, and
328
352
  implementation loop.
353
+ - `references/questions-and-improvements.md` - structured preflight questions,
354
+ integration consent, and content-delivery performance preservation.
329
355
  - `references/decision.md` - plain-text decision and schema guidance; no
330
356
  decision JSON is required.
331
357
  - `references/content.md` - CMS, entries, references, and source value rules.
@@ -359,10 +385,15 @@ Use one final status:
359
385
  - **draft-only**: imports or verification are incomplete, or the user asked for
360
386
  a draft.
361
387
 
362
- Never call a migration complete when CMS entries, media mappings, forms, or
363
- route coverage are unknown. Local QA remains the acceptance gate. If
388
+ Never call a migration complete when CMS entries, media mappings, forms, route
389
+ coverage, or migration-induced content-delivery regressions are unknown. Local
390
+ QA remains the acceptance gate. If
364
391
  `fimo migrate init` created a new Fimo project, run one `fimo deploy` after QA
365
392
  and return its preview and dashboard links; skip it when the user said not to
366
393
  deploy or `FIMO_MIGRATION_NO_DEPLOY=1` is set. For an existing linked project,
367
394
  offer the deployment and wait for approval. Never run `fimo publish` without an
368
395
  explicit request.
396
+
397
+ Broader performance work and framework modernization are separate tasks. Start
398
+ them only when the user explicitly asks, and never use them to hide a migration
399
+ regression.
@@ -158,6 +158,14 @@ document, and a `public/` reference may become a media upload. The content
158
158
  planner decides the destination from the consuming route and data shape, rather
159
159
  than using a filename or extension as an automatic classification.
160
160
 
161
+ Preserve how that content reaches the page. Local Markdown rendered during a
162
+ Next build stays a Server Component or static-generation read after it moves to
163
+ Fimo. Keep `generateStaticParams` when the source has known routes, list the
164
+ required slugs once, and use the generated client's `getBySlug` for each detail
165
+ page. Do not fetch the full post collection and filter it on every route, and do
166
+ not introduce a Client Component solely to load Fimo content. Follow the shared
167
+ evidence and freshness contract in `references/questions-and-improvements.md`.
168
+
161
169
  Create one source item per Markdown/MDX document and per independently handled
162
170
  construct inside it. Portable prose and an executable MDX component are
163
171
  different items even when they share one file. Read the custom component, its
@@ -85,6 +85,16 @@ items.
85
85
  and public APIs were read under their simple access rules; private sources
86
86
  used a user export or narrowly scoped server-side credential. Missing access
87
87
  is unresolved for that lane, and no content was guessed.
88
+ - Each content family moved from local or bundled files to Fimo records its
89
+ build-time, request-time, or browser delivery mode before and after migration.
90
+ Build-time and server-rendered source content did not become a browser API
91
+ waterfall.
92
+ - Detail routes use a direct generated-client lookup when available. Indexes use
93
+ bounded pagination and projection. Shared reads are deduplicated, independent
94
+ reads start together, and page-only reads do not block a shared root layout.
95
+ - Production evidence labels cold and warm navigation separately and records
96
+ observable Fimo/API request counts, duplicates, order, and longest blocking
97
+ read. Development-only timing is never presented as production proof.
88
98
 
89
99
  For linked Next.js targets, the root `FimoProvider` resolves an explicit host
90
100
  connection first, otherwise `.fimo/project.json` plus the active git branch,
@@ -124,6 +134,8 @@ Owned by the runtime lane; verified here read-only.
124
134
  ## Behavior
125
135
 
126
136
  - Dependencies are installed in the target project.
137
+ - The recorded CLI and companion package specifiers are reproducible outside
138
+ the current package-manager cache and match the selected runtime channel.
127
139
  - The project builds successfully.
128
140
  - Local dev starts without Vite loader/schema/form generation errors.
129
141
  - Primary routes render without console/runtime errors.
@@ -135,6 +147,10 @@ Owned by the runtime lane; verified here read-only.
135
147
  - Every content-code batch exercised at least one non-empty imported item
136
148
  through each Server-to-Client or plain-JSON boundary it introduced; build
137
149
  success over an empty query result does not pass this check.
150
+ - Server-rendered source content remains in the initial server result and is not
151
+ fetched again after hydration. A new client waterfall, repeated full-list
152
+ read, avoidable sequential request chain, or stale edit fails the responsible
153
+ migration lane.
138
154
  - Navigation and footer links point to migrated routes or documented external URLs.
139
155
  - Missing integration secrets do not block these checks: build, dev, and route
140
156
  render run with the integration inert, and the missing key is a recorded
@@ -160,7 +176,9 @@ equivalent):
160
176
  5. Assert globally rendered label/button text (header/footer nav, CTAs, cookie
161
177
  banner) is non-empty; blank text usually means the component is mounted
162
178
  outside the label provider.
163
- 6. Inspect the browser console and server output for runtime errors.
179
+ 6. Assert visible text and attributes contain no source-absent serialization
180
+ sentinels such as `undefined`, `null`, `[object Object]`, or `NaN`.
181
+ 7. Inspect the browser console and server output for runtime errors.
164
182
 
165
183
  Keep it bounded: representative pages and one interaction, not an interactive
166
184
  walk of every route or a multi-hour visual audit. The Visual section below
@@ -176,6 +194,11 @@ report; never claim a visual check that did not run.
176
194
  - Prioritize layout, typography, content hierarchy, media, and brand tokens.
177
195
  - Remove generated placeholder copy from visible UI.
178
196
  - Verify media aspect ratios and no broken images on primary routes.
197
+ - Compare representative component bounds; whole-page height can hide a local
198
+ geometry regression.
199
+ - Compare image loading before and after scroll. Record eager/lazy and preload
200
+ counts, response formats, and representative transfer sizes; an optimizer
201
+ URL alone is not delivery proof.
179
202
 
180
203
  ## Import Verification
181
204
 
@@ -231,6 +254,8 @@ complete | complete-with-unresolved | draft-only
231
254
 
232
255
  ## Hosting
233
256
 
257
+ ## Content Delivery
258
+
234
259
  ## Timing
235
260
 
236
261
  ## Checks
@@ -248,9 +273,10 @@ locales) with `gate`,
248
273
  coverage must not average away a missing entry or an unuploaded asset. Timing is
249
274
  a separate section copied from the worker reports, so it never dilutes coverage.
250
275
 
251
- Cache freshness is a report check only when the source or user made freshness an
252
- accepted observable requirement; do not fail a migration for omitted provider
253
- cache mechanics alone.
276
+ Cache freshness is a report check whenever migration changes the content
277
+ transport or rendering mode. Do not fail a migration for omitted provider cache
278
+ mechanics alone, but do fail stale Fimo edits caused by the target's migrated
279
+ read path.
254
280
 
255
281
  Use `complete` only when all required checks pass. Use
256
282
  `complete-with-unresolved` when the migrated site is usable and all gaps are
@@ -0,0 +1,188 @@
1
+ # Migration questions and content delivery
2
+
3
+ ## Inspect before asking
4
+
5
+ Start with read-only source inspection. Find the framework, router, version,
6
+ content sources, integrations, API routes, environment variable names, and
7
+ obvious runtime constraints. Do not initialize or link the target, edit files,
8
+ write Fimo data, contact private services, deploy, or publish yet.
9
+
10
+ Do not ask the user to explain facts the source already proves. Ask only when
11
+ the answer changes authorization or forces a real choice:
12
+
13
+ - an integration may be removed, replaced, disconnected, or moved;
14
+ - environment configuration or credentials may need to move into Fimo;
15
+ - the source framework is unknown or the user requested a conversion;
16
+ - the source defines CMS content but the deployed records are unavailable;
17
+ - two systems could own the same content or behavior; or
18
+ - the requested migration includes a destructive or mutually exclusive choice.
19
+
20
+ Preserve the source's visible behavior by default. Do not ask the user to list
21
+ the routes, metadata, feeds, forms, locales, analytics, or content that must
22
+ survive. Discovering and preserving them is the migration job. Do not ask a
23
+ generic speed, optimization, or framework-upgrade question during migration.
24
+
25
+ ## Ask one stacked batch
26
+
27
+ Use the coding agent's native structured-question UI when it has one. The tool
28
+ name differs between Codex, Claude Code, and other hosts.
29
+
30
+ - Collect decisions from the same inspection and ask one preflight batch. Aim
31
+ for one to three questions.
32
+ - Include setup blockers already visible at that point, such as a missing target
33
+ choice, organization or project, URL-only framework choice, or pinned CLI
34
+ artifact. Do not save them for separate follow-up turns.
35
+ - Give each question a short subject and two or three concrete choices. Put the
36
+ recommended safe default first and state the consequence of each choice.
37
+ - Write for the site owner, who may not know Fimo or the migration process. Do
38
+ not put evaluator terms such as faithful acceptance, frozen result, or probe
39
+ in a user-facing question. Explain Fimo terms the first time they matter.
40
+ - Group environment keys by the integration they enable. Never ask one question
41
+ per key.
42
+ - Use multi-select for independent choices when the host supports it. Otherwise
43
+ offer a few useful bundles.
44
+ - Restate the accepted contract once after the answers, then start. Ask again
45
+ only when new evidence creates a safety or consent decision that the initial
46
+ inspection could not reveal.
47
+ - When the host has no structured-question UI, send the whole batch as one
48
+ numbered message. Do not drip questions across turns.
49
+
50
+ ## Protect integrations and environment values
51
+
52
+ Detect integration and environment key names without printing or reading their
53
+ values. A request to migrate the website is not consent to move any environment
54
+ value.
55
+
56
+ - Keep third-party behavior wired when Fimo does not replace it exactly.
57
+ - Never silently remove, replace, or partly imitate an integration.
58
+ - Ask before changing its owner, credential store, or runtime behavior.
59
+ - Without consent, leave current environment references unchanged. Mark live
60
+ verification blocked when credentials are unavailable.
61
+ - When the user chooses Fimo storage, load the current `fimo-cli`
62
+ `project-vars-and-secrets` reference. Browser-safe configuration uses project
63
+ variables. Hidden API keys and tokens use project secrets. Never turn a
64
+ secret into a public variable.
65
+ - When the owner chooses Fimo-managed secrets, ask them to add the values to
66
+ Fimo. Never read existing secret values from env files, logs, browser code,
67
+ migration artifacts, or worker transcripts.
68
+
69
+ ## Ask before reconstructing missing CMS content
70
+
71
+ Source repositories often contain CMS schemas and rendering code without the
72
+ deployed records. A public website can recover what visitors can see, but it
73
+ cannot prove drafts, unlinked records, editorial metadata, hidden relations, or
74
+ private fields. Do not silently substitute scraped pages for the missing CMS.
75
+
76
+ When required CMS records are unavailable, ask one question with these choices:
77
+
78
+ - **Provide CMS access or an export (Recommended).** Use a scoped read-only
79
+ credential or export to preserve the selected records, relations, locales,
80
+ SEO, and media as completely as the source allows.
81
+ - **Rebuild from the public website.** Use credential-free public APIs when
82
+ available, then the rendered pages for the user-approved route slice. Treat
83
+ the run as hybrid, import only published evidence, and report everything the
84
+ public site cannot reveal.
85
+ - **Migrate code only.** Keep the CMS integration and its records outside Fimo;
86
+ do not claim that editorial content moved.
87
+
88
+ The question should sound like this:
89
+
90
+ > The repository contains the CMS structure, but not the content currently
91
+ > published on the site. Should I use a read-only CMS export, rebuild the
92
+ > selected pages from the public website, or migrate only the code and leave the
93
+ > content where it is?
94
+
95
+ If the owner chooses the public website, stay inside the selected route scope.
96
+ Public retrieval does not authorize private endpoint discovery, credential use,
97
+ or a broader crawl. Record the URL, retrieval time, redirects, and every field
98
+ or relation that remains unknown.
99
+
100
+ ## Ask what happens outside a partial migration
101
+
102
+ When the request selects only part of a website and does not say what should
103
+ happen to the remaining pages, ask in the same preflight batch:
104
+
105
+ > We're moving only part of the site. What should happen when someone follows
106
+ > a link to a page we aren't moving?
107
+
108
+ Offer these choices:
109
+
110
+ - **Keep opening the current site.** Preserve working absolute source URLs for
111
+ pages outside the selected slice.
112
+ - **Remove those pages.** Remove their navigation links and redirect known old
113
+ routes to the migrated homepage instead of leaving broken relative links.
114
+
115
+ Do not ask when every route is migrating or the request already settles this
116
+ behavior. If the coordinator discovers an omitted route only after preflight,
117
+ preserve its working absolute source URL and report it. Do not interrupt the
118
+ migration with a late preference question.
119
+
120
+ ## Preserve content delivery performance
121
+
122
+ Replacing local Markdown, MDX, JSON, or hardcoded content with Fimo reads must
123
+ not add an avoidable runtime wait. This is migration correctness, so apply it
124
+ without asking an optimization question.
125
+
126
+ First record how the source delivers each content family: at build time, on the
127
+ server per request, or in the browser. Load the current `fimo-code` framework
128
+ and generated-client references, then keep the same rendering and freshness
129
+ semantics unless the target framework requires a documented equivalent.
130
+
131
+ - Keep build-time or server-rendered source content on the server. Do not turn
132
+ a local Markdown page into a client-side loading state or browser API
133
+ waterfall.
134
+ - Preserve known-route generation. For a static blog, list slugs once for route
135
+ generation, then use `getBySlug` or another direct generated-client lookup for
136
+ each detail route. Do not list the whole collection and filter it again on
137
+ every page request.
138
+ - Start independent reads together. Keep page-only content out of shared root
139
+ layouts, and deduplicate the same read when metadata, a layout, and a page
140
+ need it during one render.
141
+ - Query only the fields, relations, and page of records the route consumes.
142
+ Populate required references explicitly. Avoid unbounded collection reads and
143
+ N+1 relation lookups.
144
+ - Keep framework links and their normal prefetch behavior. Do not add broad
145
+ forced prefetching that turns a page list into a burst of Fimo requests.
146
+ - Preserve edit freshness. Static generation, revalidation, or caching is valid
147
+ only when a normal rebuild or the source's normal refresh path shows the new
148
+ Fimo value. Cold-build once as a diagnostic when the normal result is stale.
149
+ - Do not upgrade the framework, change routers, add loading placeholders, or
150
+ redesign the page to satisfy this rule. Those are separate changes unless the
151
+ user explicitly requested them.
152
+
153
+ Examples:
154
+
155
+ - **Static Markdown blog:** import every post into Fimo, generate the known
156
+ routes from a bounded slug list, read each post on the server during static
157
+ generation, and ship the article in the initial HTML. A browser fetch for the
158
+ article body is a migration regression.
159
+ - **Large collection:** use a paginated, projected list for the index and a
160
+ direct slug lookup for the detail page. Fetching every full record for every
161
+ navigation is a migration regression even when the page eventually matches.
162
+ - **Fresh request-time page:** keep the Fimo read in the framework's server
163
+ loader or Server Component. Stream only when the source already tolerated
164
+ partial rendering or a new wait would otherwise block the whole page.
165
+
166
+ ## Prove the transport did not regress
167
+
168
+ Run the production build and production server. Development mode may include
169
+ compilation and may disable prefetching, so label any development observation
170
+ as development-only.
171
+
172
+ For every content family moved from local or bundled source files to Fimo:
173
+
174
+ 1. Record whether the source and target reads happen at build time, request
175
+ time, or in the browser.
176
+ 2. Check one cold navigation and one warm navigation separately.
177
+ 3. Capture Fimo/API request count, duplicate reads, request order, and the
178
+ longest blocking read when observable.
179
+ 4. Verify that server-rendered source content remains in the initial server
180
+ result and is not fetched again after hydration.
181
+ 5. Run the normal edit, render, and revert proof. When caching or static output
182
+ is involved, record normal-build and cold-build freshness separately.
183
+
184
+ Do not invent a universal millisecond budget. Timing starts as evidence. Fail
185
+ the migration when it introduces an objective transport regression, such as a
186
+ new client waterfall, repeated full-list reads, avoidable sequential requests,
187
+ or stale edits. A broader performance review or framework upgrade is separate
188
+ work and starts only when the user explicitly asks for it.
@@ -66,15 +66,20 @@ data workers start:
66
66
  REST endpoints. Ask for an owner-provided export or narrowly scoped
67
67
  server-side token only when website-required records are not public. Never
68
68
  recover, log, persist, or copy secret values. If required access is missing
69
- or unreachable, stop before planning schemas or payloads.
69
+ or unreachable, stop before planning schemas or payloads until the owner
70
+ chooses scoped access, public-site reconstruction, or a code-only migration.
70
71
  3. Fetch every required page, locale, and referenced record. For a few bounded
71
72
  endpoints, direct requests are enough. For repeated or paginated reads,
72
73
  write a temporary source-specific read-only script under
73
74
  `.fimo/migration/tmp/`, then spot-check counts and references.
74
- 4. Preserve the retrieved responses as source evidence and payload inputs;
75
+ 4. When the owner chose public-site reconstruction, retrieve only the approved
76
+ published routes. Use credential-free public APIs when available and rendered
77
+ HTML otherwise. Mark drafts, unlinked records, hidden relations, and private
78
+ fields unknown instead of inventing them.
79
+ 5. Preserve the retrieved responses as source evidence and payload inputs;
75
80
  normalize transport details only. Do not create a provider registry or a
76
81
  universal CMS model.
77
- 5. Design Fimo schemas from both the retrieved values and the code that uses
82
+ 6. Design Fimo schemas from both the retrieved values and the code that uses
78
83
  them. Keep uncertain fields optional unless authoritative evidence requires
79
84
  them; sampled enum-like values are strings, and private or absent fields
80
85
  remain unknown. Never invent replacement content when access is unavailable.
@@ -1,7 +1,16 @@
1
1
  # Migration validator
2
2
 
3
- The validator is an independent read-only worker. It did not author the
4
- migration and starts only after all writers return.
3
+ Validation is one independent read-only wave after all writers return. The
4
+ coordinator gives every validator the accepted migration scope and deliberate
5
+ user-approved differences, but no producer findings, repair reasoning,
6
+ transcript, or expected verdict. A validator checks the finished target against
7
+ the source within that contract. It does not report an explicitly excluded
8
+ route, integration, or control as migration drift.
9
+
10
+ When subagents are available, launch separate workers for build and runtime,
11
+ Fimo data and content, and rendered browser behavior. Run them concurrently
12
+ after their prerequisites pass. They may inspect overlapping files because none
13
+ of them writes.
5
14
 
6
15
  Compare the source, content plan, actual `git diff`, real Fimo state, and local
7
16
  application behavior. A worker report is a claim, not evidence.
@@ -29,7 +38,12 @@ representative page responds. After an approved deploy, browser QA must:
29
38
 
30
39
  Optional development-tool failures do not fail a rendered, stable application.
31
40
 
32
- Return a plain-text report with status, duration, checks run, counts, failing
33
- source items, and suggested bounded repair surface. The coordinator may run one
34
- repair for that surface and rerun validation. It does not restart every worker
35
- or loop indefinitely.
41
+ Each lane continues through independent assertions and returns status,
42
+ duration, checks run, counts, failing source items, blocked descendants, and
43
+ suggested repair ownership. Stop only when a failed prerequisite makes a check
44
+ meaningless.
45
+
46
+ The coordinator fans every lane into one finding set before editing. It assigns
47
+ disjoint repair owners, waits for the whole repair wave, then reruns one central
48
+ validation wave. It does not restart every worker, repair findings one at a
49
+ time, or loop indefinitely.
@@ -22,7 +22,7 @@ Plan a lane only when the source proves that surface exists:
22
22
  | assets/forms | media uploads and form behavior | after discovery fan-in |
23
23
  | content data | one schema/locale import | after assets |
24
24
  | content code | listed consuming files | after its data read-back |
25
- | validator | read-only final checks | after all writers |
25
+ | validation wave | read-only build, data, and rendered checks | after all writers |
26
26
 
27
27
  This is preserve mode, the default. When the user explicitly chose a framework
28
28
  conversion, one framework worker replaces runtime and routes and owns all
@@ -55,7 +55,7 @@ read-back.
55
55
  visitor-visible labels.
56
56
  - **framework conversion** is used only after explicit user choice. Read
57
57
  `references/workers/framework.md`.
58
- - **validator** authors nothing. Read `references/workers/validator.md`.
58
+ - **validation wave** authors nothing. Read `references/workers/validator.md`.
59
59
 
60
60
  If two lanes need one file, name one owner in the text plan and sequence the
61
61
  other after it. Do not add a metadata format for a small overlap.
@@ -76,7 +76,9 @@ other after it. Do not add a metadata format for a small overlap.
76
76
  framework gate.
77
77
  6. Start each code worker only after its own imported records read back as
78
78
  non-empty. A build over empty data proves nothing.
79
- 7. Start the independent validator only after every writer has returned.
79
+ 7. After every writer returns, start one read-only validation wave. When
80
+ subagents are available, run build and runtime, Fimo data and content, and
81
+ rendered browser checks concurrently after their prerequisites pass.
80
82
 
81
83
  Each prompt names the worker's source paths, exact target ownership, applicable
82
84
  reference above, and dependencies. Each report states status, duration, source
@@ -84,8 +86,17 @@ evidence, files changed, Fimo writes, source items handled, unresolved work,
84
86
  and the next action. The coordinator verifies those claims against `git diff`,
85
87
  CLI read-back, and rendered routes.
86
88
 
89
+ Validation prompts also carry the accepted migration scope and user-approved
90
+ differences, including selected routes, behavior for routes outside a partial
91
+ migration, excluded integrations, and the deploy boundary. This is task context,
92
+ not an expected verdict. Do not give validators producer findings, repair
93
+ reasoning, transcripts, or instructions to accept a difference.
94
+
87
95
  A source item is covered only when its target value exists and the application
88
96
  consumes it at the original behavior path, or when an explicit unresolved item
89
- names the impact and owner action. If validation fails, create one bounded
90
- repair task for that surface and rerun the validator; do not restart every
91
- worker.
97
+ names the impact and owner action. Collect the complete finding set before
98
+ repair. Fan it into one repair graph, run disjoint repair owners together, wait
99
+ for all of them, then rerun one central validation wave. A failed prerequisite
100
+ blocks only dependent checks; it does not stop unrelated diagnostics. Do not
101
+ restart every worker or alternate one finding with one repair when the next
102
+ validation pass could have exposed the full set.