fimo 0.14.0 → 0.15.0-staging.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/README.md +1 -0
- package/assets/astro/components/Boolean.astro +14 -0
- package/assets/astro/components/Date.astro +23 -0
- package/assets/astro/components/Image.astro +79 -0
- package/assets/astro/components/Json.astro +14 -0
- package/assets/astro/components/RichText.astro +17 -0
- package/assets/astro/components/StaticImage.astro +66 -0
- package/assets/astro/components/Text.astro +23 -0
- package/assets/astro/components/Video.astro +47 -0
- package/assets/astro/components/index.d.ts +8 -0
- package/assets/astro/components/index.js +8 -0
- package/assets/content-templates/shared/server.eta +56 -0
- package/assets/content-templates/sveltekit/content.eta +86 -0
- package/assets/skills/fimo/SKILL.md +13 -4
- package/assets/skills/fimo-cli/SKILL.md +28 -28
- package/assets/skills/fimo-cli/references/account.md +0 -2
- package/assets/skills/fimo-cli/references/agent-setup.md +7 -9
- package/assets/skills/fimo-cli/references/agents.md +0 -2
- package/assets/skills/fimo-cli/references/analytics.md +0 -2
- package/assets/skills/fimo-cli/references/assets.md +2 -4
- package/assets/skills/fimo-cli/references/branches.md +14 -15
- package/assets/skills/fimo-cli/references/content.md +9 -11
- package/assets/skills/fimo-cli/references/credits.md +0 -2
- package/assets/skills/fimo-cli/references/deploy.md +6 -7
- package/assets/skills/fimo-cli/references/describe.md +1 -3
- package/assets/skills/fimo-cli/references/domains.md +0 -2
- package/assets/skills/fimo-cli/references/forms.md +5 -7
- package/assets/skills/fimo-cli/references/history.md +0 -2
- package/assets/skills/fimo-cli/references/init.md +34 -26
- package/assets/skills/fimo-cli/references/integrations/firecrawl.md +0 -2
- package/assets/skills/fimo-cli/references/integrations.md +0 -2
- package/assets/skills/fimo-cli/references/invite.md +0 -2
- package/assets/skills/fimo-cli/references/labels.md +5 -7
- package/assets/skills/fimo-cli/references/locales.md +2 -4
- package/assets/skills/fimo-cli/references/mcp.md +2 -4
- package/assets/skills/fimo-cli/references/media.md +0 -2
- package/assets/skills/fimo-cli/references/preview.md +0 -2
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -3
- package/assets/skills/fimo-cli/references/projects.md +1 -3
- package/assets/skills/fimo-cli/references/schedules.md +0 -2
- package/assets/skills/fimo-cli/references/support.md +0 -2
- package/assets/skills/fimo-cli/references/webhooks.md +0 -2
- package/assets/skills/fimo-code/SKILL.md +11 -3
- package/assets/skills/fimo-code/references/assets.md +2 -2
- package/assets/skills/fimo-code/references/content/clients.md +5 -1
- package/assets/skills/fimo-code/references/content.md +3 -1
- package/assets/skills/fimo-code/references/frameworks/astro.md +127 -0
- package/assets/skills/fimo-code/references/frameworks/compatibility.md +19 -0
- package/assets/skills/fimo-code/references/frameworks/hosting.md +15 -3
- package/assets/skills/fimo-code/references/frameworks/react-router.md +37 -209
- package/assets/skills/fimo-code/references/frameworks/sveltekit.md +110 -0
- package/assets/skills/fimo-code/references/frameworks/vite-react.md +35 -166
- package/assets/skills/fimo-code/references/labels.md +16 -6
- package/assets/skills/fimo-code/references/locales.md +3 -1
- package/assets/skills/fimo-code/references/ui.md +19 -15
- package/assets/skills/fimo-migration/SKILL.md +99 -146
- package/assets/skills/fimo-migration/references/frameworks/nextjs.md +26 -0
- package/assets/skills/fimo-migration/references/inventory/coordinator.md +40 -0
- package/assets/skills/fimo-migration/references/inventory/locales/next-intl.md +39 -0
- package/assets/skills/fimo-migration/references/inventory/locales.md +41 -0
- package/assets/skills/fimo-migration/references/workflow.md +3 -2
- package/assets/skills/fimo-migration/scripts/inventory/locales/next-intl.mjs +459 -0
- package/assets/skills/fimo-studio/SKILL.md +1 -1
- package/assets/skills/fimo-studio/references/project-creation.md +10 -18
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -1
- package/assets/sveltekit/components/Boolean.svelte +19 -0
- package/assets/sveltekit/components/Date.svelte +33 -0
- package/assets/sveltekit/components/FimoProvider.svelte +35 -0
- package/assets/sveltekit/components/Image.svelte +80 -0
- package/assets/sveltekit/components/Json.svelte +18 -0
- package/assets/sveltekit/components/Label.svelte +16 -0
- package/assets/sveltekit/components/Number.svelte +21 -0
- package/assets/sveltekit/components/RichText.svelte +19 -0
- package/assets/sveltekit/components/Text.svelte +30 -0
- package/assets/sveltekit/components/Video.svelte +37 -0
- package/assets/sveltekit/components/index.d.ts +10 -0
- package/assets/sveltekit/components/index.js +10 -0
- package/dist/build/astro/config.d.ts +4 -0
- package/dist/build/astro/config.js +64 -0
- package/dist/build/next/config.js +16 -0
- package/dist/build/sveltekit/config.d.ts +6 -0
- package/dist/build/sveltekit/config.js +8 -0
- package/dist/build/sveltekit/data-id.d.ts +3 -0
- package/dist/build/sveltekit/data-id.js +171 -0
- package/dist/build/sveltekit/vite.d.ts +13 -0
- package/dist/build/sveltekit/vite.js +15 -0
- package/dist/build/vite/index.js +2 -0
- package/dist/build/vite/plugins/data-id.d.ts +9 -0
- package/dist/build/vite/plugins/data-id.js +6 -1
- package/dist/build/vite/plugins/runtime-env.d.ts +21 -0
- package/dist/build/vite/plugins/runtime-env.js +68 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +108 -101
- package/dist/runtime/app/FimoProviders.d.ts +1 -1
- package/dist/runtime/app/FimoProviders.js +11 -5
- package/dist/runtime/astro/internal.d.ts +6 -0
- package/dist/runtime/astro/internal.js +16 -0
- package/dist/runtime/astro/preview.d.ts +14 -0
- package/dist/runtime/astro/preview.js +103 -0
- package/dist/runtime/astro/render-rich-text.d.ts +2 -0
- package/dist/runtime/astro/render-rich-text.js +1 -0
- package/dist/runtime/astro/server-runtime.d.ts +3 -0
- package/dist/runtime/astro/server-runtime.js +20 -0
- package/dist/runtime/astro/server.d.ts +15 -0
- package/dist/runtime/astro/server.js +14 -0
- package/dist/runtime/content/client/collection-core.d.ts +2 -17
- package/dist/runtime/content/client/collection-core.js +15 -8
- package/dist/runtime/content/client/core-types.d.ts +96 -0
- package/dist/runtime/content/client/core-types.js +1 -0
- package/dist/runtime/content/client/internal.d.ts +4 -4
- package/dist/runtime/content/client/internal.js +4 -3
- package/dist/runtime/content/client/runtime.d.ts +1 -1
- package/dist/runtime/content/client/server-content-client.d.ts +3 -3
- package/dist/runtime/content/client/server-content-client.js +2 -29
- package/dist/runtime/content/client/singleton-core.d.ts +2 -9
- package/dist/runtime/content/client/singleton-core.js +9 -4
- package/dist/runtime/content/client/types.d.ts +5 -115
- package/dist/runtime/content/index.d.ts +3 -3
- package/dist/runtime/labels/fetch.js +5 -3
- package/dist/runtime/next/client.d.ts +2 -1
- package/dist/runtime/next/facade.d.ts +1 -1
- package/dist/runtime/next/provider.js +1 -1
- package/dist/runtime/next/server-runtime.js +1 -1
- package/dist/runtime/next/server.d.ts +5 -4
- package/dist/runtime/paths/get-fimo-paths.js +8 -3
- package/dist/runtime/preview/bridge.d.ts +8 -0
- package/dist/runtime/preview/bridge.js +20 -0
- package/dist/runtime/preview/location.d.ts +23 -0
- package/dist/runtime/preview/location.js +93 -0
- package/dist/runtime/preview/routes.d.ts +10 -0
- package/dist/runtime/preview/routes.js +29 -0
- package/dist/runtime/primitives/index.d.ts +4 -1
- package/dist/runtime/primitives/index.js +1 -0
- package/dist/runtime/primitives/lib/image-optimization.d.ts +27 -2
- package/dist/runtime/primitives/lib/image-optimization.js +40 -0
- package/dist/runtime/primitives/lib/index.d.ts +1 -1
- package/dist/runtime/primitives/lib/primitives.d.ts +0 -54
- package/dist/runtime/primitives/lib/primitives.js +6 -0
- package/dist/runtime/primitives/lib/render-rich-text.d.ts +3 -0
- package/dist/runtime/primitives/lib/render-rich-text.js +112 -0
- package/dist/runtime/react/primitives/contracts.d.ts +40 -2
- package/dist/runtime/react/primitives/renderers/ImageRenderer.js +15 -34
- package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +2 -1
- package/dist/runtime/react/primitives/renderers/StaticImage.js +13 -30
- package/dist/runtime/routing/AppRoutesProvider.js +20 -8
- package/dist/runtime/shared/env-identity.d.ts +43 -0
- package/dist/runtime/shared/env-identity.js +88 -0
- package/dist/runtime/shared/local-runtime-env.d.ts +65 -0
- package/dist/runtime/shared/local-runtime-env.js +169 -0
- package/dist/runtime/{react-router → shared}/preview-location.d.ts +7 -13
- package/dist/runtime/{react-router → shared}/preview-location.js +26 -27
- package/dist/runtime/sveltekit/content.d.ts +25 -0
- package/dist/runtime/sveltekit/content.js +33 -0
- package/dist/runtime/sveltekit/context-contract.d.ts +5 -0
- package/dist/runtime/sveltekit/context-contract.js +2 -0
- package/dist/runtime/sveltekit/context.d.ts +8 -0
- package/dist/runtime/sveltekit/context.js +25 -0
- package/dist/runtime/sveltekit/index.d.ts +7 -0
- package/dist/runtime/sveltekit/index.js +4 -0
- package/dist/runtime/sveltekit/internal.d.ts +6 -0
- package/dist/runtime/sveltekit/internal.js +12 -0
- package/dist/runtime/sveltekit/labels.d.ts +16 -0
- package/dist/runtime/sveltekit/labels.js +13 -0
- package/dist/runtime/sveltekit/preview.d.ts +19 -0
- package/dist/runtime/sveltekit/preview.js +77 -0
- package/dist/runtime/sveltekit/runtime.d.ts +8 -0
- package/dist/runtime/sveltekit/runtime.js +17 -0
- package/dist/runtime/templates.d.ts +1 -1
- package/dist/runtime/templates.js +1 -1
- package/dist/runtime/vite/Label.d.ts +13 -0
- package/dist/runtime/vite/Label.js +16 -0
- package/dist/scripts/extract-translations.js +103 -43
- package/dist/scripts/sync-forms.js +1 -1
- package/dist/scripts/sync-schemas.js +83 -16
- package/package.json +57 -2
- package/release.json +2 -2
- package/templates/nextjs/AGENTS.md +10 -5
- package/templates/nextjs/_gitignore +1 -0
- package/templates/react-router/AGENTS.md +4 -3
- package/templates/react-router/package.json +1 -1
- package/templates/sveltekit/.fimo/config.json +15 -0
- package/templates/sveltekit/AGENTS.md +36 -0
- package/templates/sveltekit/CLAUDE.md +5 -0
- package/templates/sveltekit/_gitignore +16 -0
- package/templates/sveltekit/package.json +28 -0
- package/templates/sveltekit/pnpm-workspace.yaml +4 -0
- package/templates/sveltekit/src/app.html +11 -0
- package/templates/sveltekit/src/routes/+layout.server.ts +8 -0
- package/templates/sveltekit/src/routes/+layout.svelte +12 -0
- package/templates/sveltekit/src/routes/+page.svelte +48 -0
- package/templates/sveltekit/svelte.config.js +5 -0
- package/templates/sveltekit/tsconfig.json +14 -0
- package/templates/sveltekit/vite.config.ts +5 -0
- /package/assets/content-templates/{form-template.eta → forms/react.eta} +0 -0
- /package/assets/content-templates/{next-client-template.eta → next/client.eta} +0 -0
- /package/assets/content-templates/{next-server-template.eta → next/server.eta} +0 -0
- /package/assets/content-templates/{hooks-template.eta → react/client.eta} +0 -0
- /package/assets/content-templates/{types-template.eta → shared/types.eta} +0 -0
|
@@ -7,163 +7,116 @@ description: >-
|
|
|
7
7
|
media, CMS schemas and entries, forms, SEO, redirects, locales, and unresolved
|
|
8
8
|
gaps with a verifiable manifest and QA gate. This is the single canonical
|
|
9
9
|
migration skill for URL-only, source-backed, and hybrid migrations.
|
|
10
|
-
fimoVersion: 0.1.0
|
|
11
10
|
---
|
|
12
11
|
|
|
13
12
|
# Fimo Migration
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
It owns intake, source inventory, URL crawl bootstrapping, ledger normalization,
|
|
18
|
-
imports, and QA so any LLM can run the work without silently dropping content.
|
|
19
|
-
|
|
20
|
-
> Run every `fimo` command as `npx fimo@latest <command>` — always the latest CLI, no global install.
|
|
21
|
-
|
|
22
|
-
## Non-Negotiables
|
|
23
|
-
|
|
24
|
-
- No source data may disappear silently. Every route, CMS export, entry, media
|
|
25
|
-
asset, form, locale, redirect, SEO field, or unsupported behavior is imported,
|
|
26
|
-
deliberately ignored with a reason, or listed as unresolved.
|
|
27
|
-
- Media files, CMS entries, and forms are the primary migration payload. The
|
|
28
|
-
migration is not complete until each of those three areas has discovery counts,
|
|
29
|
-
import counts, target IDs or files, and verification notes in the canonical
|
|
30
|
-
ledger.
|
|
31
|
-
- Source exports beat inferred crawls. If CSV/XML/JSON exports, media folders, or
|
|
32
|
-
source code exist, treat the public URL as visual/SEO reference only.
|
|
33
|
-
- Builder HTML is evidence, not the final runtime. Rebuild with Fimo conventions,
|
|
34
|
-
schemas, forms, media primitives, translations, and routes.
|
|
35
|
-
- Do not report completion until the QA gate passes or every failed check is
|
|
36
|
-
recorded in the migration report.
|
|
37
|
-
- Do not deploy or publish during the migration. Importing content is required
|
|
38
|
-
and uses the data-plane commands (`fimo assets upload`, `fimo schemas push`,
|
|
39
|
-
`fimo entries create`, `fimo forms push`); these do **not** rebuild the live
|
|
40
|
-
site. `fimo deploy` / `fimo publish` rebuild and restart the site — never run
|
|
41
|
-
them as part of the migration loop or to "check" rendering. Verify locally
|
|
42
|
-
(build + local dev). Deployment is a single, final, owner-approved step:
|
|
43
|
-
when the QA gate passes, **propose** it to the owner instead of running it.
|
|
44
|
-
|
|
45
|
-
## Intake Decision
|
|
46
|
-
|
|
47
|
-
1. Read the target project `AGENTS.md`.
|
|
48
|
-
2. If editing or creating a Fimo project, read the project `fimo` skill and the
|
|
49
|
-
`fimo-cli` skill references needed for schemas, entries, forms, and assets.
|
|
50
|
-
Do not run `fimo deploy` / `fimo publish` here — deployment is a final,
|
|
51
|
-
owner-approved step (see Non-Negotiables and the Deployment rule below).
|
|
52
|
-
3. Classify the source:
|
|
53
|
-
- **source-backed**: export folder, source repo, CMS CSV/XML/JSON, media
|
|
54
|
-
folder, downloaded HTML, or platform export. Use source files as truth and
|
|
55
|
-
inventory them directly with shell tools such as `rg`, `find`, and targeted
|
|
56
|
-
file reads.
|
|
57
|
-
- **url-only**: only a published URL exists. Follow `references/workflow.md`
|
|
58
|
-
and start with `fimo migrate <url> [dir]` to create the draft evidence
|
|
59
|
-
pack.
|
|
60
|
-
- **hybrid**: source files plus public URL. Use source-backed as truth and URL
|
|
61
|
-
for route, SEO, visual, and behavior comparison.
|
|
62
|
-
4. Create or update the canonical ledger described in
|
|
63
|
-
`references/manifest.md`.
|
|
64
|
-
|
|
65
|
-
## Workflow
|
|
66
|
-
|
|
67
|
-
Read `references/workflow.md` before starting implementation. The short version:
|
|
68
|
-
|
|
69
|
-
1. Inventory source artifacts. For URL-only work, run
|
|
70
|
-
`fimo migrate <url> [dir]`; for source-backed work, inspect the export or
|
|
71
|
-
repository directly with shell tools and targeted file reads.
|
|
72
|
-
2. Normalize CMS, media, forms, routes, redirects, locales, and unsupported
|
|
73
|
-
behavior into the canonical ledger.
|
|
74
|
-
3. Model content before page code.
|
|
75
|
-
4. Generate or update Fimo schemas, entries, media mappings, forms, routes, and
|
|
76
|
-
React pages.
|
|
77
|
-
5. Import reviewed media files, CMS schemas/entries, and forms through Fimo
|
|
78
|
-
APIs/CLI. Do not treat generated JSON as imported content.
|
|
79
|
-
6. Run the QA gate in `references/qa.md`.
|
|
80
|
-
7. Write `.fimo/migration/migration-report.md` with coverage, counts, mappings,
|
|
81
|
-
unresolved items, and next actions.
|
|
82
|
-
|
|
83
|
-
To bootstrap or refresh the canonical ledger from existing URL/source migration
|
|
84
|
-
artifacts, run:
|
|
14
|
+
Move published URLs, exports, source repositories, CMS data, media, and forms
|
|
15
|
+
into a real Fimo project without silently dropping source material.
|
|
85
16
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
17
|
+
> **Experimental:** migration support is limited. Assess what can be preserved, explain unsupported parts, and never promise source-framework preservation.
|
|
18
|
+
>
|
|
19
|
+
> Use the CLI invocation selected for this flow for every `fimo` command in the migration. Otherwise use `npx fimo@latest`; do not install it globally.
|
|
89
20
|
|
|
90
|
-
|
|
21
|
+
## Core contract
|
|
91
22
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
23
|
+
- Record every route, CMS record, media asset, form, locale, redirect, SEO
|
|
24
|
+
field, and unsupported behavior as imported, deliberately ignored with a
|
|
25
|
+
reason, or unresolved.
|
|
26
|
+
- Prefer source code and exports over inferred crawl data. Use a public URL as
|
|
27
|
+
visual, SEO, route, and behavior evidence when better source material exists.
|
|
28
|
+
- Model content before page code. Generated JSON is not imported content.
|
|
29
|
+
- Keep migration evidence in the canonical ledger from
|
|
30
|
+
`references/manifest.md`.
|
|
31
|
+
- Do not report completion until the QA gate passes or every failed check is
|
|
32
|
+
present in the migration report.
|
|
33
|
+
- Do not deploy while migrating. Import through the data-plane commands,
|
|
34
|
+
verify locally, and propose one final owner-approved deployment.
|
|
35
|
+
|
|
36
|
+
## Orient and route
|
|
37
|
+
|
|
38
|
+
1. Read the target project's `AGENTS.md`.
|
|
39
|
+
2. When creating or changing a Fimo application, load its `fimo` and
|
|
40
|
+
`fimo-cli` skills for the required schemas, entries, forms, assets, and
|
|
41
|
+
framework APIs.
|
|
42
|
+
3. Classify the available evidence:
|
|
43
|
+
- **source-backed**: source repository, export, downloaded HTML, CMS data,
|
|
44
|
+
or media folder. Treat the source files as truth and run the relevant
|
|
45
|
+
bounded inventory helpers when available. After the canonical manifest
|
|
46
|
+
records `source.rootPath` and `source.inventoryPath`, run
|
|
47
|
+
`fimo migrate inventory [project-root]` for deterministic framework,
|
|
48
|
+
runtime, package, locale, and message-file evidence.
|
|
49
|
+
- **url-only**: only a published URL. Run `fimo migrate <url> [dir]` to
|
|
50
|
+
create the draft evidence pack.
|
|
51
|
+
- **hybrid**: source material plus a public URL. Treat source material as
|
|
52
|
+
truth and the URL as comparison evidence.
|
|
53
|
+
4. Read `references/workflow.md` before implementation and create or update the
|
|
54
|
+
canonical ledger.
|
|
55
|
+
5. Load only the framework and inventory references that apply:
|
|
56
|
+
- Next.js source -> `references/frameworks/nextjs.md`.
|
|
57
|
+
- Locale or dictionary evidence -> `references/inventory/locales.md`.
|
|
58
|
+
- Declared next-intl dependency ->
|
|
59
|
+
`references/inventory/locales/next-intl.md`.
|
|
60
|
+
- Deterministic inventory coordination ->
|
|
61
|
+
`references/inventory/coordinator.md`.
|
|
62
|
+
|
|
63
|
+
## Migration loop
|
|
64
|
+
|
|
65
|
+
1. Prepare the deterministic inventory plan first. When independent workers
|
|
66
|
+
are available, create one read-only subagent per planned lane; otherwise run
|
|
67
|
+
the same lanes sequentially. Every worker returns its fragment, never a
|
|
68
|
+
prose claim. Run reconcile after every fan-out, then use targeted file reads
|
|
69
|
+
for evidence the inventory leaves unresolved. Use a validator worker that
|
|
70
|
+
produced no fragments to compare the plan, source evidence, fragments, and
|
|
71
|
+
unresolved claims. Reopen only affected lanes when validation finds a gap.
|
|
72
|
+
2. Normalize CMS, media, forms, routes, redirects, locales, and unsupported
|
|
73
|
+
behavior into the canonical ledger.
|
|
74
|
+
3. Model content and references before writing pages.
|
|
75
|
+
4. Generate or update schemas, entries, media mappings, forms, routes, and
|
|
76
|
+
application code with native Fimo contracts.
|
|
77
|
+
5. Import reviewed media, schemas, entries, and forms in the order required by
|
|
78
|
+
`references/import-contract.md`.
|
|
79
|
+
6. Run the local QA gate in `references/qa.md`.
|
|
80
|
+
7. Write `.fimo/migration/migration-report.md` with coverage, counts,
|
|
81
|
+
mappings, unresolved items, and next actions.
|
|
82
|
+
|
|
83
|
+
Use the bundled deterministic helpers whenever their contract fits. If a
|
|
84
|
+
helper cannot prove a source fact, follow the bounded fallback in the relevant
|
|
85
|
+
inventory reference instead of treating the whole inventory as failed.
|
|
95
86
|
|
|
96
87
|
## References
|
|
97
88
|
|
|
98
|
-
- `references/workflow.md` -
|
|
89
|
+
- `references/workflow.md` - phase order, source intake, URL artifacts, and
|
|
90
|
+
implementation loop.
|
|
99
91
|
- `references/manifest.md` - canonical migration ledger schema.
|
|
100
92
|
- `references/content.md` - CMS, entries, references, and source value rules.
|
|
101
|
-
- `references/media.md` - media inventory, upload, dedupe, and replacement
|
|
102
|
-
- `references/forms.md` - form classification and Fimo replacement
|
|
103
|
-
- `references/import-contract.md` -
|
|
104
|
-
|
|
93
|
+
- `references/media.md` - media inventory, upload, dedupe, and replacement.
|
|
94
|
+
- `references/forms.md` - form classification and Fimo replacement.
|
|
95
|
+
- `references/import-contract.md` - import obligations for media, entries, and
|
|
96
|
+
forms.
|
|
105
97
|
- `references/platforms.md` - platform-specific source-of-truth and rebuild
|
|
106
98
|
notes.
|
|
107
|
-
- `references/qa.md` -
|
|
108
|
-
- `
|
|
109
|
-
|
|
110
|
-
- `
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- **
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
otherwise.
|
|
132
|
-
|
|
133
|
-
## Deployment
|
|
134
|
-
|
|
135
|
-
Deployment is **out of scope for the migration loop** and happens at most once,
|
|
136
|
-
at the very end, with the owner's approval.
|
|
137
|
-
|
|
138
|
-
- Never run `fimo deploy` or `fimo publish` to verify, preview, or "check"
|
|
139
|
-
rendering while migrating. All verification (build, local dev, route render,
|
|
140
|
-
visual comparison) is done locally.
|
|
141
|
-
- Importing content (`fimo assets upload`, `fimo schemas push`,
|
|
142
|
-
`fimo entries create`, `fimo forms push`) is part of the migration and does
|
|
143
|
-
not deploy the site — run those as the import contract requires.
|
|
144
|
-
- After the QA gate passes and the report is written, end by **proposing**
|
|
145
|
-
deployment: tell the owner the migration is ready and that running
|
|
146
|
-
`fimo deploy` once will publish it. Let them decide; do not deploy on their
|
|
147
|
-
behalf unless they explicitly ask in this turn.
|
|
148
|
-
|
|
149
|
-
## URL-Only Migration Contract
|
|
150
|
-
|
|
151
|
-
`fimo migrate <url> [dir]` creates migration evidence and a draft project; it
|
|
152
|
-
does not replace the agent rebuild pass. After the command completes, read:
|
|
153
|
-
|
|
154
|
-
- `.fimo/migrations/current/brief.md`
|
|
155
|
-
- `.fimo/migrations/current/manifest.json`
|
|
156
|
-
- `.fimo/migrations/current/extracted/pages.json`
|
|
157
|
-
- `.fimo/migrations/current/extracted/forms.json`
|
|
158
|
-
- `.fimo/migrations/current/extracted/design-tokens.json`
|
|
159
|
-
- `.fimo/migrations/current/refine/agent-prompt.md` when present
|
|
160
|
-
- `.fimo/migrations/current/refine/pages/*.md` when present
|
|
161
|
-
|
|
162
|
-
Raw source HTML snapshots may exist under `.fimo/migrations/current/source/`.
|
|
163
|
-
Use them as evidence, not as final runtime code.
|
|
164
|
-
|
|
165
|
-
If the default crawl misses client-rendered or lazy-loaded content, use the
|
|
166
|
-
agent or harness browser tools to collect additional HTML, screenshots, and
|
|
167
|
-
route notes, then merge that evidence into the migration artifacts. Import
|
|
168
|
-
reviewed media, schemas, forms, and entries with the regular Fimo CLI commands
|
|
169
|
-
instead of relying on `fimo migrate` to push content directly.
|
|
99
|
+
- `references/qa.md` - acceptance gate and report format.
|
|
100
|
+
- `references/frameworks/nextjs.md` - Next.js source inventory routing.
|
|
101
|
+
- `references/inventory/locales.md` - locale evidence and agent fallback.
|
|
102
|
+
- `references/inventory/locales/next-intl.md` - next-intl strategy and support
|
|
103
|
+
boundary.
|
|
104
|
+
- `references/inventory/coordinator.md` - deterministic inventory fan-out,
|
|
105
|
+
worker, and fan-in commands.
|
|
106
|
+
- `scripts/build-canonical-manifest.mjs` - bootstrap the canonical ledger.
|
|
107
|
+
- `scripts/write-migration-report.mjs` - update QA state and write the report.
|
|
108
|
+
|
|
109
|
+
## Completion and deployment
|
|
110
|
+
|
|
111
|
+
Use one final status:
|
|
112
|
+
|
|
113
|
+
- **complete**: QA passed, counts match, and imports are verified.
|
|
114
|
+
- **complete-with-unresolved**: the site builds and every known gap has an
|
|
115
|
+
owner-readable reason and next action.
|
|
116
|
+
- **draft-only**: imports or verification are incomplete, or the user asked for
|
|
117
|
+
a draft.
|
|
118
|
+
|
|
119
|
+
Never call a migration complete when CMS entries, media mappings, forms, or
|
|
120
|
+
route coverage are unknown. Never run `fimo deploy` or `fimo publish` as a
|
|
121
|
+
preview or QA step. After local QA passes, propose one final deployment and run
|
|
122
|
+
it only when the owner explicitly approves it in the current turn.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Next.js source inventory
|
|
2
|
+
|
|
3
|
+
Load this reference when the migration source is a Next.js application. This
|
|
4
|
+
reference selects evidence strategies; use the target project's `fimo-code`
|
|
5
|
+
framework guidance when implementing the migrated application.
|
|
6
|
+
|
|
7
|
+
## Inventory
|
|
8
|
+
|
|
9
|
+
1. Record the installed Next.js and internationalization package declarations.
|
|
10
|
+
2. Identify App Router, Pages Router, or a mixed tree without changing it.
|
|
11
|
+
3. Inspect `next.config.*`, request configuration, middleware or proxy files,
|
|
12
|
+
navigation helpers, route segments, and message dictionaries.
|
|
13
|
+
4. Keep these claims separate:
|
|
14
|
+
- dictionary locale candidates;
|
|
15
|
+
- configured locales;
|
|
16
|
+
- default locale;
|
|
17
|
+
- publicly routable locales;
|
|
18
|
+
- localized pathnames.
|
|
19
|
+
5. When next-intl is declared, load
|
|
20
|
+
`references/inventory/locales/next-intl.md` and run its bounded strategy.
|
|
21
|
+
6. Record dynamic, imported, remote, or otherwise unproven configuration as
|
|
22
|
+
unresolved for the locale inventory fan-in.
|
|
23
|
+
|
|
24
|
+
Use package versions to prioritize likely strategies, not as proof of the
|
|
25
|
+
source shape. Projects backport, customize, and combine conventions across
|
|
26
|
+
versions; accept a claim only when its source evidence supports it.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Deterministic inventory coordination
|
|
2
|
+
|
|
3
|
+
Prepare before running lanes:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
fimo migrate inventory <project-root> --prepare
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Read `inventory-plan.json`, then run each listed area in an independent worker
|
|
10
|
+
that treats application source as read-only:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
fimo migrate inventory <project-root> --area runtime-config
|
|
14
|
+
fimo migrate inventory <project-root> --area locales
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Run only areas present in the plan. The `locales` area is currently planned
|
|
18
|
+
only when the source package manifest declares `next-intl`.
|
|
19
|
+
|
|
20
|
+
Workers must return the written deterministic fragment, not a prose summary.
|
|
21
|
+
They must read only the source root and write only their planned fragment and
|
|
22
|
+
execution receipt. A worker may report structured unresolved claims in its
|
|
23
|
+
fragment; process outcome and timing belong in the run receipt.
|
|
24
|
+
|
|
25
|
+
If independent workers are unavailable, run the same areas sequentially:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
fimo migrate inventory <project-root> --sequential
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
After every fan-out, run deterministic fan-in:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
fimo migrate inventory <project-root> --reconcile
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use a separate validator worker that did not produce fragments to compare the
|
|
38
|
+
plan, source evidence, fragments, and unresolved claims. If it finds a gap,
|
|
39
|
+
reopen only the affected area and reconcile again. The CLI never starts an
|
|
40
|
+
LLM or chooses a harness.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# next-intl locale inventory
|
|
2
|
+
|
|
3
|
+
Use the shipped analyzer after `package.json` proves a next-intl dependency:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
node <this-skill>/scripts/inventory/locales/next-intl.mjs <source-root>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
It detects conventional JSON dictionaries, JSON imports with one dynamic locale
|
|
10
|
+
segment, and static `defineRouting` locale/default-locale values. It emits
|
|
11
|
+
deterministic facts and file/line evidence without changing the source.
|
|
12
|
+
|
|
13
|
+
If request configuration does not reveal a custom JSON dictionary layout, let
|
|
14
|
+
the agent select one relative pattern containing `{locale}` exactly once:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
node <this-skill>/scripts/inventory/locales/next-intl.mjs <source-root> \
|
|
18
|
+
--messages-pattern 'src/translations/{locale}/common.json'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The script rejects absolute paths, paths outside the source root, non-JSON
|
|
22
|
+
patterns, and ambiguous placeholders.
|
|
23
|
+
|
|
24
|
+
## Support boundary
|
|
25
|
+
|
|
26
|
+
The analyzer intentionally leaves a claim unresolved when its static source
|
|
27
|
+
shape is unknown. Current gaps include:
|
|
28
|
+
|
|
29
|
+
- locales/default locale declared only through legacy middleware or navigation
|
|
30
|
+
helpers;
|
|
31
|
+
- dynamic or remote locale configuration;
|
|
32
|
+
- non-JSON dictionaries such as extracted PO catalogs;
|
|
33
|
+
- public route reachability.
|
|
34
|
+
|
|
35
|
+
Treat package version as evidence that helps prioritize likely source shapes,
|
|
36
|
+
not as the primary switch. If the analyzer cannot prove a claim, follow the
|
|
37
|
+
temporary read-only strategy in `references/inventory/locales.md`. A zero exit
|
|
38
|
+
code means the analyzer ran successfully; read `unresolved[]` as the exact
|
|
39
|
+
claims still requiring evidence.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Locale inventory
|
|
2
|
+
|
|
3
|
+
Inventory locale evidence without deciding that every dictionary is configured
|
|
4
|
+
or publicly routable.
|
|
5
|
+
|
|
6
|
+
## Evidence contract
|
|
7
|
+
|
|
8
|
+
Keep these facts distinct:
|
|
9
|
+
|
|
10
|
+
- **dictionary candidates**: locale-like values derived from message files or
|
|
11
|
+
records;
|
|
12
|
+
- **configured locales**: values proven by static application configuration;
|
|
13
|
+
- **default locale**: one statically proven fallback when present;
|
|
14
|
+
- **public locales**: values proven reachable through the application's routes;
|
|
15
|
+
- **unresolved claims**: individual facts that no strategy proved.
|
|
16
|
+
|
|
17
|
+
A successful script run means evidence collection executed correctly. It does
|
|
18
|
+
not mean every locale claim is known. Preserve proven facts when another claim
|
|
19
|
+
remains unresolved.
|
|
20
|
+
|
|
21
|
+
## Bounded fallback
|
|
22
|
+
|
|
23
|
+
1. Run the shipped strategy for the detected locale system.
|
|
24
|
+
2. If the dictionary layout is the only unknown, pass a supported bounded path
|
|
25
|
+
pattern to that strategy.
|
|
26
|
+
3. If a claim remains unresolved, inspect only the files likely to own it.
|
|
27
|
+
4. When repeated manual reads would be slower or less reliable, let the agent
|
|
28
|
+
create one disposable script in the harness or operating-system temporary
|
|
29
|
+
directory, outside the application source tree. The script must:
|
|
30
|
+
- read only the selected source root;
|
|
31
|
+
- perform no network calls or source writes;
|
|
32
|
+
- have explicit file, byte, or time bounds;
|
|
33
|
+
- print deterministic facts, evidence paths, and unresolved claims;
|
|
34
|
+
- avoid claiming route reachability from dictionary files alone.
|
|
35
|
+
5. Validate the output, copy its evidence into the canonical ledger, and remove
|
|
36
|
+
the temporary script. Do not commit it to the migrated application.
|
|
37
|
+
6. At fan-in, compare configured, default, dictionary, and public locales. Keep
|
|
38
|
+
every mismatch or unproven claim unresolved until evidence settles it.
|
|
39
|
+
|
|
40
|
+
If the same temporary strategy is needed repeatedly across migrations, turn it
|
|
41
|
+
into a tested shipped script in a separate Fimo change.
|
|
@@ -188,6 +188,7 @@ Deployment is not part of the migration loop and is never run to preview or
|
|
|
188
188
|
verify. Once Phase 8 passes:
|
|
189
189
|
|
|
190
190
|
1. Do not run `fimo deploy` or `fimo publish` yourself.
|
|
191
|
-
2. End by proposing it: tell the owner the migration is ready
|
|
192
|
-
`fimo deploy`
|
|
191
|
+
2. End by proposing it: tell the owner the migration is ready, that one
|
|
192
|
+
`fimo deploy` creates its hosted preview, and that going live requires a
|
|
193
|
+
separate explicit publish.
|
|
193
194
|
3. Deploy only if the owner explicitly asks in this turn, and then only once.
|