fimo 2.2.0-staging.1 → 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.
- package/README.md +3 -2
- package/assets/agent-templates/_default/config.yaml +1 -0
- package/assets/agent-templates/broken-link-sweeper/config.yaml +1 -0
- package/assets/agent-templates/content-translator/config.yaml +1 -0
- package/assets/agent-templates/post-deploy-check/config.yaml +1 -0
- package/assets/agent-templates/seo-audit/config.yaml +1 -0
- package/assets/skills/fimo-cli/SKILL.md +5 -5
- package/assets/skills/fimo-cli/references/agents.md +2 -1
- package/assets/skills/fimo-cli/references/assets.md +42 -3
- package/assets/skills/fimo-cli/references/content.md +3 -3
- package/assets/skills/fimo-cli/references/deploy.md +2 -2
- package/assets/skills/fimo-cli/references/forms.md +3 -1
- package/assets/skills/fimo-cli/references/history.md +1 -0
- package/assets/skills/fimo-cli/references/init.md +30 -39
- package/assets/skills/fimo-cli/references/schedules.md +4 -2
- package/assets/skills/fimo-cli/references/webhooks.md +2 -0
- package/assets/skills/fimo-code/references/frameworks/next.md +4 -1
- package/assets/skills/fimo-code/references/frameworks/react-router.md +4 -3
- package/assets/skills/fimo-migration/SKILL.md +44 -13
- package/assets/skills/fimo-migration/references/frameworks/nextjs.md +8 -0
- package/assets/skills/fimo-migration/references/qa.md +30 -4
- package/assets/skills/fimo-migration/references/questions-and-improvements.md +188 -0
- package/assets/skills/fimo-migration/references/workers/content-planner.md +8 -3
- package/assets/skills/fimo-migration/references/workers/validator.md +20 -6
- package/assets/skills/fimo-migration/references/workers.md +17 -6
- package/assets/skills/fimo-migration/references/workflow.md +33 -6
- package/assets/skills/fimo-studio/SKILL.md +3 -1
- package/assets/skills/fimo-studio/references/agents.md +25 -0
- package/assets/skills/fimo-studio/references/preview-and-responsive.md +4 -1
- package/assets/skills/fimo-studio/references/visual-editing.md +9 -1
- package/dist/build/astro/config.js +2 -1
- package/dist/build/vite/plugins/preview-health.d.ts +4 -0
- package/dist/build/vite/plugins/preview-health.js +40 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +113 -113
- package/dist/runtime/content/client/collection-core.js +3 -2
- package/dist/runtime/content/client/core-types.d.ts +4 -3
- package/dist/runtime/content/client/internal.d.ts +2 -0
- package/dist/runtime/content/client/internal.js +54 -25
- package/dist/runtime/content/client/singleton-core.js +2 -1
- package/dist/runtime/content/index.d.ts +1 -1
- package/dist/runtime/content/index.js +1 -1
- package/dist/runtime/primitives/lib/index.d.ts +1 -1
- package/dist/runtime/primitives/lib/index.js +1 -1
- package/dist/runtime/primitives/lib/primitives.d.ts +24 -5
- package/dist/runtime/primitives/lib/primitives.js +69 -16
- package/dist/runtime/primitives/lib/template.js +2 -2
- package/dist/runtime/templates.d.ts +9 -2
- package/dist/runtime/templates.js +37 -8
- package/package.json +14 -9
- package/templates/astro/package.json +2 -2
- package/templates/nextjs/AGENTS.md +1 -1
- package/templates/nextjs/package.json +4 -4
- package/templates/react-router/.fimo/config.json +1 -2
- package/templates/react-router/AGENTS.md +1 -1
- package/templates/react-router/package.json +4 -4
- package/templates/sveltekit/package.json +2 -2
- package/templates/vite/package.json +4 -4
- package/templates/welcome/manifest.json +404 -0
- package/templates/welcome/media/analytics-overview.avif +0 -0
- package/templates/welcome/media/autonomous-loop.avif +0 -0
- package/templates/welcome/media/editable-preview.avif +0 -0
- package/templates/welcome/media/media-library.avif +0 -0
- package/templates/welcome/media/slack-teams.avif +0 -0
- package/templates/welcome/template/.fimo/agents/welcome-guide/GOAL.md +7 -0
- package/templates/welcome/template/.fimo/agents/welcome-guide/config.yaml +8 -0
- package/templates/welcome/template/.fimo/config.json +53 -0
- package/templates/welcome/template/src/font.css +60 -0
- package/templates/welcome/template/src/pages/ArticleDetail.tsx +68 -0
- package/templates/welcome/template/src/pages/Index.tsx +32 -0
- package/templates/welcome/template/src/pages/SiteContent.tsx +413 -0
- package/templates/welcome/template/src/pages/fallback-content.ts +133 -0
- package/templates/welcome/template/src/routes.ts +9 -0
- package/templates/welcome/template/src/schemas/Article.json +12 -0
- package/templates/welcome/template/src/schemas/Article.ts +59 -0
- package/templates/welcome/template/src/schemas/Article.types.ts +73 -0
- package/templates/welcome/template/src/schemas/HomePage.json +39 -0
- package/templates/welcome/template/src/schemas/HomePage.types.ts +114 -0
- package/assets/starters/fimo-site/manifest.json +0 -64
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/GOAL.md +0 -8
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/config.yaml +0 -9
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/GOAL.md +0 -14
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -3
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/config.yaml +0 -9
- package/assets/starters/fimo-site/template/src/forms/contact.json +0 -14
- package/assets/starters/fimo-site/template/src/forms/contact.ts +0 -46
- package/assets/starters/fimo-site/template/src/pages/Contact.tsx +0 -193
- package/assets/starters/fimo-site/template/src/pages/Index.tsx +0 -27
- package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +0 -191
- package/assets/starters/fimo-site/template/src/schemas/HomePage.json +0 -28
- package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +0 -29
- package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +0 -64
|
@@ -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.
|
|
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
|
|
252
|
-
|
|
253
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
repair
|
|
35
|
-
|
|
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
|
-
|
|
|
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
|
-
- **
|
|
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.
|
|
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.
|
|
90
|
-
repair
|
|
91
|
-
|
|
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.
|
|
@@ -4,6 +4,15 @@ Use this as the phase contract for a complete migration. The coordinator and
|
|
|
4
4
|
workers communicate in plain text. JSON is used only for Fimo schemas and the
|
|
5
5
|
content payloads that the data-plane commands import.
|
|
6
6
|
|
|
7
|
+
## Preflight: inspect and ask
|
|
8
|
+
|
|
9
|
+
Before target initialization or any other write, inspect the source read-only
|
|
10
|
+
and follow `references/questions-and-improvements.md`. Use the coding agent's
|
|
11
|
+
native structured-question UI to ask one stacked batch for integration,
|
|
12
|
+
environment, framework, and ownership decisions that the source cannot settle.
|
|
13
|
+
Never move environment values or credentials without explicit consent. Do not
|
|
14
|
+
ask a generic optimization question.
|
|
15
|
+
|
|
7
16
|
## Phase 0: Initialize the target
|
|
8
17
|
|
|
9
18
|
1. Confirm the target path. The target is a separate directory; the source
|
|
@@ -20,9 +29,15 @@ content payloads that the data-plane commands import.
|
|
|
20
29
|
3. Inspect the target's real `package.json`, `.fimo/config.json`, framework config, and route
|
|
21
30
|
directories. They are the authority for paths. Do not infer an app root
|
|
22
31
|
from a skill example and do not create a second `app/` or `src/app/` tree.
|
|
23
|
-
4.
|
|
32
|
+
4. Verify dependency provenance before workers start. A project created by a
|
|
33
|
+
published CLI pins that exact CLI release and matching companion packages.
|
|
34
|
+
A local source-checkout project uses the checkout-local CLI. Stop when the
|
|
35
|
+
target records an absolute package-manager cache path, an unapproved
|
|
36
|
+
`latest`, or a CLI and API from different runtime channels; do not let the
|
|
37
|
+
producer repair release setup inside the migration.
|
|
38
|
+
5. If the target is non-empty and not a Fimo project, stop and ask for a target
|
|
24
39
|
path; do not overlay a template on top of it.
|
|
25
|
-
|
|
40
|
+
6. Keep source material in `.fimo/migration/source` or another explicit source
|
|
26
41
|
location. Do not copy source files over the initialized target root.
|
|
27
42
|
|
|
28
43
|
Write a short `.fimo/migration/migration-plan.md` containing the source
|
|
@@ -46,8 +61,10 @@ Classify the available evidence:
|
|
|
46
61
|
For private APIs or CMSs, ask for a user-provided export or a narrowly scoped
|
|
47
62
|
server-side credential. Never recover credentials from browser bundles or copy
|
|
48
63
|
them into migration artifacts. If the source API URL or access is missing or
|
|
49
|
-
unreachable, stop and ask
|
|
50
|
-
|
|
64
|
+
unreachable, stop and ask whether to use scoped access, reconstruct only the
|
|
65
|
+
selected published routes from the public site, or migrate code without the CMS
|
|
66
|
+
records. Continue with public reconstruction only after that explicit choice,
|
|
67
|
+
and record everything the rendered site cannot reveal.
|
|
51
68
|
|
|
52
69
|
For API-backed content, trace active clients, endpoints, frontend types, and
|
|
53
70
|
consumers first. Prefer backend source schemas; otherwise use public OpenAPI,
|
|
@@ -143,12 +160,22 @@ one generic static shell. Apply the matching framework reference before
|
|
|
143
160
|
disposing of provider-specific rules; redirects, headers, feeds, metadata,
|
|
144
161
|
forms, and freshness behavior are observable contracts.
|
|
145
162
|
|
|
163
|
+
When local or bundled content becomes Fimo-backed, follow the content-delivery
|
|
164
|
+
contract in `references/questions-and-improvements.md`. Preserve build-time or
|
|
165
|
+
server rendering, direct lookups, bounded reads, request parallelism, and edit
|
|
166
|
+
freshness. A new browser waterfall, repeated full-list read, avoidable
|
|
167
|
+
sequential request chain, or stale edit is a migration regression.
|
|
168
|
+
|
|
146
169
|
## Phase 6: Fan in, validate, and report
|
|
147
170
|
|
|
148
171
|
Workers return the plain-text receipt defined in `references/workers.md`.
|
|
149
172
|
The coordinator checks those claims against the diff, source, CLI read-back,
|
|
150
|
-
build, and rendered routes. Then
|
|
151
|
-
`references/workers/validator.md
|
|
173
|
+
build, and rendered routes. Then it runs the read-only validation wave from
|
|
174
|
+
`references/workers/validator.md`, passing the accepted scope and deliberate
|
|
175
|
+
user-approved differences as task context; a worker saying "done" is not
|
|
176
|
+
evidence.
|
|
177
|
+
Collect the complete finding set before assigning repairs. Run disjoint repair
|
|
178
|
+
owners together, wait for all repairs, and rerun one central validation wave.
|
|
152
179
|
|
|
153
180
|
Write `.fimo/migration/migration-report.md` with route/content/media/form/SEO
|
|
154
181
|
coverage, import counts, worker timings, unresolved items, and next actions.
|
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
Triggers: "in Fimo Studio", "in the dashboard", "in the web app",
|
|
7
7
|
"how do I X in the UI", or screenshots of the dashboard. Topics
|
|
8
8
|
covered: dashboard content and CMS, publishing from the dashboard,
|
|
9
|
-
dashboard SEO/domain settings, project connections, schedules and run history, outbound webhooks,
|
|
9
|
+
dashboard SEO/domain settings, project connections, agents, schedules and run history, outbound webhooks,
|
|
10
10
|
visual editing, version history UI, dashboard sharing/billing, dashboard chat,
|
|
11
11
|
and the command palette. Never describe
|
|
12
12
|
UI locations, buttons, or panels from memory — always read the relevant
|
|
@@ -39,6 +39,7 @@ Read the relevant reference file when the user's question matches a topic.
|
|
|
39
39
|
| AI Chat | references/ai-chat.md | "What can the AI do?", "How do I give context?" |
|
|
40
40
|
| Code Editor | references/code-editor.md | "How do I edit code?", "Where are my files?" |
|
|
41
41
|
| SEO Settings | references/seo-settings.md | "How do I set up SEO?", "Favicon, title, share image" |
|
|
42
|
+
| Agents | references/agents.md | "Run an agent", "Pause an agent", "Next agent run" |
|
|
42
43
|
| Schedules | references/schedules.md | "Recurring commands", "Run history", "Run now" |
|
|
43
44
|
| Webhooks | references/webhooks.md | "React to forms", "Send events to another service" |
|
|
44
45
|
| Connections | references/connections.md | "Connect a service", "Add an MCP server" |
|
|
@@ -60,6 +61,7 @@ Read the relevant reference file when the user's question matches a topic.
|
|
|
60
61
|
| Content/CMS | AI Chat, Media Library |
|
|
61
62
|
| Webhooks | Project secrets, Forms, Publishing, Agents |
|
|
62
63
|
| Connections | AI Chat, Agents, Project secrets |
|
|
64
|
+
| Agents | Connections, Project secrets, Branches |
|
|
63
65
|
| Schedules | Project secrets, Environments, Agents |
|
|
64
66
|
| Visual changes | Edit Mode (quick tweaks), AI Chat (bigger changes), Code Editor (full control) |
|
|
65
67
|
| Something went wrong | Version History, AI Chat |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Agents
|
|
2
|
+
|
|
3
|
+
Project agents are versioned bundles from the project's repository. Studio lets project members inspect their configuration and run history, while project managers can start, stop, and resume them.
|
|
4
|
+
|
|
5
|
+
## Open an agent
|
|
6
|
+
|
|
7
|
+
1. Open the project and choose **Agents**.
|
|
8
|
+
2. Select **Agents** again to see the available bundles.
|
|
9
|
+
3. Choose an agent to open its **Runs** and **Settings** tabs.
|
|
10
|
+
|
|
11
|
+
When the agent has a live schedule, its next run appears first in **Runs**, marked **Scheduled**. The row uses **Next** for its projected ID, a relative date such as **Tomorrow at 11:00 AM**, and **—** for changes and duration until it starts. **Settings** shows the bundle's declared capabilities and trigger wiring; it is read-only because the repository remains the source of truth.
|
|
12
|
+
|
|
13
|
+
## Run, stop, or resume
|
|
14
|
+
|
|
15
|
+
Choose **Run** to start an agent whose manual trigger is live.
|
|
16
|
+
|
|
17
|
+
Choose **Stop** to pause every future trigger and stop planned or running work. Studio asks for confirmation and explains that the bundle, trigger configuration, model, capabilities, and other settings are preserved.
|
|
18
|
+
|
|
19
|
+
A stopped agent shows **Paused** in the header. **Resume** makes the same triggers live again with their previous settings.
|
|
20
|
+
|
|
21
|
+
Only project managers see Run, Stop, and Resume. Other project members can still see schedule timing, status, settings, and run history.
|
|
22
|
+
|
|
23
|
+
## Inspect runs
|
|
24
|
+
|
|
25
|
+
Open **Runs** on an agent to see only that bundle's history. Select a run to read its status, report, captured changes, and any question or review state that needs attention.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Click the **Preview** tab (the cursor/pointer icon) to see a live version of your site right inside the editor. You can also press **Alt+1** to jump to the preview tab.
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- For Fimo-integrated sites, use the **route selector** dropdown at the top to navigate between different pages.
|
|
6
6
|
- Click the **refresh** button to reload the preview.
|
|
7
7
|
- Click the **external link** icon to open your site in a new browser tab for a full-screen view.
|
|
8
8
|
|
|
@@ -34,6 +34,9 @@ To go back to a full-width preview, toggle the responsive mode off.
|
|
|
34
34
|
You may see different overlays depending on what is happening:
|
|
35
35
|
|
|
36
36
|
- **"Working"** -- A loading overlay (heading "Working", subtext "Getting your preview in motion...") while the preview is being prepared.
|
|
37
|
+
- **"Connecting to Fimo…"** -- The site is already visible while Studio waits for visual editing and route controls to connect. You can dismiss this status without interrupting the preview.
|
|
38
|
+
- **"Recovering preview…"** -- The visible preview is reloading after a refresh or a recoverable development-server failure.
|
|
39
|
+
- **"Editing unavailable"** -- The site remains visible, but its Fimo integration did not connect in time. Visual editing and the route selector stay unavailable; preview and refresh still work.
|
|
37
40
|
- **Error overlay** -- Something went wrong. The overlay shows details about the issue, and the AI can often auto-fix it for you.
|
|
38
41
|
- **"Some installed packages need approval"** -- Choose **Fix with Fimo** to send the complete repair context to the coding agent, or **Copy details** to handle it elsewhere. Review every named package, commit only trusted package-specific approvals, and retry Preview. Never replace the project policy with a blanket allow-all setting.
|
|
39
42
|
- **First generation progress** -- When your project is being built for the first time, a progress overlay shows the current status.
|
|
@@ -8,7 +8,15 @@ Once in edit mode, click on any element in the preview -- text, buttons, images,
|
|
|
8
8
|
|
|
9
9
|
### Editing Content
|
|
10
10
|
|
|
11
|
-
For text elements, the side panel
|
|
11
|
+
For text elements, the side panel opens the selected field immediately with its current value. This covers CMS-managed content, hardcoded text, and hardcoded images. Changes save automatically, and the preview updates as you type.
|
|
12
|
+
|
|
13
|
+
For CMS content, choose **All fields** to open the complete entry form. Studio keeps the content type's field order, scrolls to the field you selected, and focuses it in place. Loading appears only while Studio fetches this additional entry data or moves to another entry.
|
|
14
|
+
|
|
15
|
+
### References and Components
|
|
16
|
+
|
|
17
|
+
Selecting a field rendered from a referenced entry edits that entry. For example, selecting an author's name opens the Author entry, not the Post relation that links to it. The header shows the relation path. Select the owning entry in that path to return to its complete form with the relation field focused; use that relation field to open, replace, or clear the linked entry.
|
|
18
|
+
|
|
19
|
+
Selecting a field inside a component focuses that nested field. Choose **All fields** to see it in the complete entry form without moving it out of schema order. The shared CMS form provides the existing add, duplicate, remove, and reorder controls for repeatable components and blocks.
|
|
12
20
|
|
|
13
21
|
### Editing Styles
|
|
14
22
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import { getConfigPreviewRoutes } from '../../runtime/preview/routes.js';
|
|
3
3
|
import { getConfigServer } from '../../runtime/shared/fimo-config.server.js';
|
|
4
|
+
import previewHealthPlugin from '../vite/plugins/preview-health.js';
|
|
4
5
|
import runtimeEnvPlugin from '../vite/plugins/runtime-env.js';
|
|
5
6
|
function serializeForModule(value) {
|
|
6
7
|
return (JSON.stringify(value) ?? 'undefined')
|
|
@@ -32,7 +33,7 @@ export function fimo(options = {}) {
|
|
|
32
33
|
// `as never` sidesteps a TS "excessive stack depth" on Astro's
|
|
33
34
|
// DeepPartial<AstroConfig> vs Vite's Plugin type; the shape is the
|
|
34
35
|
// documented `updateConfig({ vite: { plugins } })`.
|
|
35
|
-
updateConfig({ vite: { plugins: [runtimeEnvPlugin()] } });
|
|
36
|
+
updateConfig({ vite: { plugins: [runtimeEnvPlugin(), previewHealthPlugin()] } });
|
|
36
37
|
const fimoConfig = getConfigServer(fileURLToPath(config.root));
|
|
37
38
|
const routes = getConfigPreviewRoutes(fimoConfig);
|
|
38
39
|
injectScript('page', [
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const PREVIEW_HEALTH_PATH = '/__fimo/preview-health';
|
|
2
|
+
const OPTIMIZED_DEP_PATH = '/node_modules/.vite/deps/';
|
|
3
|
+
export default function previewHealthPlugin() {
|
|
4
|
+
let failure = null;
|
|
5
|
+
return {
|
|
6
|
+
name: 'fimo:preview-health',
|
|
7
|
+
apply: 'serve',
|
|
8
|
+
configureServer(server) {
|
|
9
|
+
// FIMO-1589: the sandbox watcher needs a durable signal because Vite's
|
|
10
|
+
// one-shot HMR reload can fire before the hosted preview socket connects.
|
|
11
|
+
if (!process.env.FIMO_PREVIEW_ALLOWED_ORIGINS) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
server.middlewares.use((req, res, next) => {
|
|
15
|
+
const url = new URL(req.url ?? '/', 'http://127.0.0.1');
|
|
16
|
+
if (url.pathname === PREVIEW_HEALTH_PATH) {
|
|
17
|
+
res.statusCode = 200;
|
|
18
|
+
res.setHeader('content-type', 'application/json');
|
|
19
|
+
res.end(JSON.stringify({
|
|
20
|
+
failureGeneration: failure?.generation ?? 0,
|
|
21
|
+
lastFailure: failure,
|
|
22
|
+
}));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (url.pathname.includes(OPTIMIZED_DEP_PATH) && url.searchParams.has('v')) {
|
|
26
|
+
res.once('finish', () => {
|
|
27
|
+
if (res.statusCode >= 500) {
|
|
28
|
+
failure = {
|
|
29
|
+
generation: (failure?.generation ?? 0) + 1,
|
|
30
|
+
status: res.statusCode,
|
|
31
|
+
at: Date.now(),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
next();
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|