fimo 0.3.2-experimental.1783328062928 → 0.3.2-experimental.1783355472846

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 (28) hide show
  1. package/assets/skills/fimo/SKILL.md +1 -1
  2. package/assets/skills/fimo-migration/SKILL.md +4 -1
  3. package/assets/skills/fimo-migration/references/manifest.md +1 -1
  4. package/assets/skills/fimo-migration/references/qa.md +5 -2
  5. package/assets/skills/fimo-migration/references/wrap.md +26 -7
  6. package/dist/cli/bundle.json +2 -2
  7. package/dist/cli/index.js +1869 -625
  8. package/dist/scripts/lib/validation-report.d.ts +1 -0
  9. package/dist/scripts/lib/validation-report.js +3 -0
  10. package/dist/scripts/render-parity/capture.d.ts +34 -0
  11. package/dist/scripts/render-parity/capture.js +192 -0
  12. package/dist/scripts/render-parity/capture.test.d.ts +1 -0
  13. package/dist/scripts/render-parity/capture.test.js +102 -0
  14. package/dist/scripts/render-parity/compare.d.ts +44 -0
  15. package/dist/scripts/render-parity/compare.js +0 -0
  16. package/dist/scripts/render-parity/compare.test.d.ts +1 -0
  17. package/dist/scripts/render-parity/compare.test.js +75 -0
  18. package/dist/scripts/render-parity/normalize-html.d.ts +13 -0
  19. package/dist/scripts/render-parity/normalize-html.js +208 -0
  20. package/dist/scripts/render-parity/normalize-html.test.d.ts +1 -0
  21. package/dist/scripts/render-parity/normalize-html.test.js +58 -0
  22. package/dist/scripts/render-parity/types.d.ts +41 -0
  23. package/dist/scripts/render-parity/types.js +1 -0
  24. package/dist/scripts/scan-wrappable.d.ts +9 -0
  25. package/dist/scripts/scan-wrappable.js +43 -3
  26. package/dist/scripts/scan-wrappable.test.js +17 -0
  27. package/package.json +1 -1
  28. package/templates/react-router/package.json +1 -1
@@ -14,7 +14,7 @@ You are writing code in a Fimo project — a content + media + forms + analytics
14
14
 
15
15
  This skill is version-locked to this project's installed `fimo` package — the shapes here match what your code can actually use.
16
16
 
17
- For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo@latest <command>` (always the latest, no global install). If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo@latest skills install --mode=copy`.
17
+ For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo <command>` when the project declares a `fimo` dependency (it pins the version matching the project's backend); otherwise use `npx fimo@latest`. If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo skills install --mode=copy`.
18
18
 
19
19
  ## Critical: NEVER hardcode user-facing things
20
20
 
@@ -17,7 +17,10 @@ exports, source repositories, CMS exports, media folders, or any hybrid of those
17
17
  It owns intake, source inventory, URL crawl bootstrapping, ledger normalization,
18
18
  imports, and QA so any LLM can run the work without silently dropping content.
19
19
 
20
- > Run every `fimo` command as `npx fimo@latest <command>` — always the latest CLI, no global install.
20
+ > Run every `fimo` command as `npx fimo <command>` when the project declares a
21
+ > `fimo` dependency (adopted/wrapped projects pin an exact version tied to their
22
+ > backend — never override it with `@latest`). Only fall back to
23
+ > `npx fimo@latest` when the project has no `fimo` dependency.
21
24
 
22
25
  ## Non-Negotiables
23
26
 
@@ -66,7 +66,7 @@ rebuild migrations:
66
66
  "wrappedMedia": 3,
67
67
  "wrappedRichText": 1
68
68
  },
69
- "planPath": ".fimo/migration/wrap-plan.json"
69
+ "planPath": ".fimo/migration/plan.json"
70
70
  }
71
71
  }
72
72
  ```
@@ -40,8 +40,11 @@ Run this gate before reporting completion.
40
40
 
41
41
  When the manifest says `mode: "wrap"`:
42
42
 
43
- - `fimo migrate wrap --check` exits zero, or every remaining item is an
44
- explicit ignored/unresolved ledger entry with a reason.
43
+ - `fimo migrate wrap --check` exits zero — it enforces coverage (zero
44
+ unwrapped items), render parity (rendered text/marks/media/links identical
45
+ to the pre-wrap baseline), and seeding (every wrapped key exists in the
46
+ database) — or every remaining item is an explicit ignored/unresolved
47
+ ledger entry with a reason.
45
48
  - Labels are seeded: every `FimoText`/`t()` key exists in `fimo labels list`
46
49
  with the original string. Fallback-only content fails the gate.
47
50
  - Wrapped media/rich text have their `WrappedMedia`/`WrappedRichText` entries
@@ -55,7 +55,7 @@ fimo migrate # inside an adopted JS codebase this IS the wrap flow
55
55
  (`fimo migrate wrap` is the explicit form; `fimo migrate <url>` remains the
56
56
  crawl-and-rebuild path for URL-only migrations.)
57
57
 
58
- Writes `.fimo/migration/wrap-plan.json` (every unwrapped item with
58
+ Writes `.fimo/migration/plan.json` (every unwrapped item with
59
59
  `kind`/`file`/`line`/`preview`) and `.fimo/migration/wrap/agent-prompt.md`.
60
60
  The scan finds hardcoded JSX text, `img`/`Image`/`video` sources, file links
61
61
  (pdf/zip/docx/…), and user-visible attribute strings (`placeholder`, `title`,
@@ -90,7 +90,7 @@ outside client components (`'use client'`).
90
90
 
91
91
  ### W4. Wrap
92
92
 
93
- Work through `wrap-plan.json` item by item:
93
+ Work through `plan.json` item by item:
94
94
 
95
95
  | Item kind | Wrap with |
96
96
  | ----------------------------------- | -------------------------------------------------------------------------------------- |
@@ -131,14 +131,33 @@ Fallbacks are resilience, not storage. Every wrapped item is seeded into Fimo:
131
131
  A wrap migration whose labels/entries were never created in Fimo is
132
132
  `draft-only`, exactly like a rebuild migration with un-imported seed JSON.
133
133
 
134
- ### W6. Verify
134
+ ### W6. Verify — three machine-enforced gates
135
+
136
+ `fimo migrate wrap --check` is the definition of done. It fails until all
137
+ three gates pass:
138
+
139
+ 1. **Coverage** — zero unwrapped items. Deliberate exceptions are recorded in
140
+ the ledger and the gate honors them: add to
141
+ `.fimo/migration/manifest.json` → `wrap.exemptions[]` an entry
142
+ `{ file, kind, preview, reason, status }` where `(file, kind, preview)`
143
+ matches the plan item exactly (a content change invalidates the exemption
144
+ so the item resurfaces).
145
+ 2. **Render parity** — the check boots the project's dev server and compares
146
+ every route's rendered text, inline marks, media srcs, and link hrefs
147
+ against the pre-wrap baseline that `fimo migrate` captured
148
+ (`.fimo/migration/parity-baseline.json`). Drift is reported per route and
149
+ block. Run the check right after wrapping (strict, pre-seed) and again
150
+ after seeding. If the baseline is missing, capture one from the pre-wrap
151
+ git state: `git stash && npx fimo migrate snapshot && git stash pop`.
152
+ 3. **Seeding** — every wrapped key exists in the Fimo database (labels and
153
+ WrappedMedia/WrappedRichText entries), verified via the API. Fallbacks are
154
+ not storage.
155
+
156
+ Never bypass a failing gate (`--no-parity` / `--skip-seeding` are for the
157
+ owner to decide, not the agent). Additional manual checks:
135
158
 
136
- - `fimo migrate wrap --check` exits zero (or every remaining item is an
137
- explicit ignored/unresolved ledger entry with a reason).
138
159
  - The site builds and runs **with its own toolchain** (`next build`,
139
160
  `npm run dev`, …) — never assume Vite.
140
- - Rendered output is identical to pre-migration: same text, same formatting
141
- marks, same media. Diff rendered pages, not just code.
142
161
  - Diff audit: the migration diff contains only wiring, wrappers, label calls,
143
162
  config, and dependency changes.
144
163
  - Then `fimo deploy` (allowed in wrap mode: it pushes the preview env and
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-07-06T08:54:36.096Z",
5
- "cliVersion": "0.3.2-experimental.1783328062928",
4
+ "bundledAt": "2026-07-06T16:31:25.154Z",
5
+ "cliVersion": "0.3.2-experimental.1783355472846",
6
6
  "external": [
7
7
  "oxc-parser",
8
8
  "fsevents"