fimo 0.9.0-experimental.10 → 0.9.0-experimental.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/assets/skills/fimo-migration/references/pages.md +74 -10
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +167 -100
- package/dist/scripts/routes/page-structure.d.ts +65 -1
- package/dist/scripts/routes/page-structure.js +164 -5
- package/package.json +1 -1
- package/templates/react-router/package.json +1 -1
|
@@ -86,9 +86,56 @@ unbound pages in the generated prompt. Your job:
|
|
|
86
86
|
6. Verify: `npx fimo pages list --expand` materializes every instance —
|
|
87
87
|
each page the site's nav links to must appear as a real URL.
|
|
88
88
|
|
|
89
|
-
##
|
|
89
|
+
## Content model — Collection vs Single vs Component (the decision rule)
|
|
90
90
|
|
|
91
|
-
A site's content model must read like a CMS, not like an implementation
|
|
91
|
+
A site's content model must read like a CMS, not like an implementation. The
|
|
92
|
+
test that decides **Single Type vs Component**: EDIT IT ONCE — should it change
|
|
93
|
+
on EVERY page (Single Type) or only on THIS page (Component)? That is a
|
|
94
|
+
question about CONTENT, not about how many pages the STRUCTURE appears on — a
|
|
95
|
+
component can appear on many pages too.
|
|
96
|
+
|
|
97
|
+
| Shape | Repeats as entries? | Structure across pages | **Content across pages** | Edit propagates? | Examples |
|
|
98
|
+
| ---------------------- | ------------------- | ---------------------- | ------------------------ | ---------------- | ----------------------------------------------------------------- |
|
|
99
|
+
| **Collection Type** | Yes (many) | — | — | — | Blog Post, FAQ Item, Team Member, Service |
|
|
100
|
+
| **Single Type** | No (one instance) | reused | **SAME everywhere** | Yes — everywhere | Header, Footer, Cookie Banner, Nav, a shared CTA _(if identical)_ |
|
|
101
|
+
| **Component (Blocks)** | No | reused (1+ pages) | **DIFFERENT per page** | No — local | a hero, a features grid, a Pricing page's plan tiers |
|
|
102
|
+
|
|
103
|
+
- **Structure appearing on many pages does NOT make it a Single.** A hero is on
|
|
104
|
+
every page but each page's hero content differs → Component. A header is a
|
|
105
|
+
Single Type because its content is identical everywhere.
|
|
106
|
+
- **Single Type detection is structural:** a shared component whose content is
|
|
107
|
+
BAKED INTO the component — no per-page content props, e.g. rendered by the
|
|
108
|
+
LAYOUT/root — is a Single Type. A component that RECEIVES its content per
|
|
109
|
+
page (props/children vary) is a Component, however many pages render it.
|
|
110
|
+
- **The Pricing page's plan tiers are the litmus test:** neither a Collection
|
|
111
|
+
(not managed like blog posts) nor a Single (their content is page-specific) —
|
|
112
|
+
a repeatable `Tier` **block** on the Pricing Single.
|
|
113
|
+
- **A page in the Studio shows all its content top to bottom, header to
|
|
114
|
+
footer.** The Single Types a page references render inline in its page view;
|
|
115
|
+
editing one there edits it on every page that includes it — a virtual
|
|
116
|
+
reference, not a copy.
|
|
117
|
+
- **The decision interview already answered the sensitive calls.** When
|
|
118
|
+
`fimo migrate wrap` ran, it asked the site owner the two questions detection
|
|
119
|
+
can't settle on its own, and LOCKED the answers in
|
|
120
|
+
`.fimo/migration/manifest.json`. Your agent prompt relays them under **LOCKED
|
|
121
|
+
DECISIONS** — execute them, never re-decide:
|
|
122
|
+
- **Illustration vs content** — a component that reproduces a UI in code (a
|
|
123
|
+
product screenshot/mock, a fake dashboard, a device frame, an animated
|
|
124
|
+
terminal/code demo) carries many tiny strings that belong to the
|
|
125
|
+
ILLUSTRATION, not to editable content. The owner marked which sections to
|
|
126
|
+
DROP: the machine already removed them from the CMS (labels stripped, seeded
|
|
127
|
+
rows deleted) and excludes their file on re-runs — do NOT model them or
|
|
128
|
+
re-add labels. Sections the owner kept as CONTENT stay in the model.
|
|
129
|
+
- **Content-model shape** — for a component rendered on 2+ pages that
|
|
130
|
+
detection left as a default Component (identical but copy-pasted into
|
|
131
|
+
different files), the owner classified it: SINGLE TYPE (same content
|
|
132
|
+
everywhere — model once, reference it), COLLECTION TYPE (repeated managed
|
|
133
|
+
entries), or COMPONENT (per-page content). Apply the classification exactly.
|
|
134
|
+
If a LOCKED DECISION is missing for a genuinely ambiguous section (an older
|
|
135
|
+
migration, or a decision recorded as `decidedBy: "default"`), surface it in
|
|
136
|
+
your report rather than guessing.
|
|
137
|
+
|
|
138
|
+
Then, mechanically:
|
|
92
139
|
|
|
93
140
|
- **Chrome** (header, footer, nav, menus, banners) is edited as ONE thing →
|
|
94
141
|
a SINGLE TYPE per piece (`src/schemas/<Name>.json` with
|
|
@@ -103,17 +150,34 @@ A site's content model must read like a CMS, not like an implementation:
|
|
|
103
150
|
across pages. Never an orphan collection nobody can situate. CLAIM the
|
|
104
151
|
single on its page (`npx fimo pages set pricing --single Pricing`) — it
|
|
105
152
|
then edits inline in the page's Studio view and leaves the Singles tab.
|
|
153
|
+
When a collection carries a field naming WHICH PAGE each entry belongs to
|
|
154
|
+
(one `FaqItem` collection whose rows are tagged `"about"`, `"pricing"`, …),
|
|
155
|
+
that field is `{"type": "string", "format": "page"}`, NEVER a bare
|
|
156
|
+
`{"type": "string"}`. `format: "page"` stores a registry page id and the
|
|
157
|
+
Studio renders a select of real pages instead of a free-text box — a
|
|
158
|
+
free string is a typo waiting to point at a page that does not exist.
|
|
106
159
|
- **Real repeating content** (blog posts, team members) → a collection, with
|
|
107
160
|
HUMAN slugs derived from the display field (never `faq-item-<hash>`), and
|
|
108
161
|
schema field order matching reading order (question before answer).
|
|
109
|
-
- **A page's SECTIONS are its Single's nested blocks
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
(blocks nest: a `features`
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
162
|
+
- **A page's SECTIONS are its Single's nested blocks — blocks STRUCTURE the
|
|
163
|
+
page, this is not optional.** A marketing page is a sequence of sections
|
|
164
|
+
(hero, logo strip, features grid with grouped cards, testimonials,
|
|
165
|
+
integrations, stats, FAQ) — model the page as ONE Single whose fields are
|
|
166
|
+
nested block components mirroring that structure (blocks nest: a `features`
|
|
167
|
+
field holds groups, each group holds cards). Blocks are what make a page
|
|
168
|
+
EDITABLE: in the Studio a block is a COLLAPSIBLE group, so a human edits the
|
|
169
|
+
"Testimonials" block, not thirty loose fields. **A rich page dumped as a
|
|
170
|
+
FLAT PILE of individual labels (`faq`, `commonQuestions`, `10x`,
|
|
171
|
+
`fasterToLaunch`, `guillermoRauch`, `ceoVercel`, …) is a FAILED migration
|
|
172
|
+
even when every string is captured** — it is unnavigable, uncollapsible,
|
|
173
|
+
overwhelming, and nobody can contribute. Group them: a testimonial's
|
|
174
|
+
quote + author + role + logo is ONE repeatable `testimonials` block item, not
|
|
175
|
+
four sibling labels; a stat's value + label is one `stats` item; the FAQ is
|
|
176
|
+
one `faq` block of question + answer items. Section card lists are NEVER
|
|
177
|
+
"page furniture" exemptions when they carry real copy — an exemption hides
|
|
178
|
+
marketing content from the editor, which is a failed migration for that
|
|
179
|
+
section. Adopt the machine-built page Single (it already has this block
|
|
180
|
+
structure); do NOT re-flatten it into labels. Claim the Single on its page.
|
|
117
181
|
**The machine BUILDS this model for you**: `fimo migrate` writes, per
|
|
118
182
|
multi-section page, an analysis draft (`.fimo/migration/page-drafts/`,
|
|
119
183
|
regenerate with `npx fimo pages draft`) AND a ready page Single
|