kmcom-nuxt-layers 2.2.11 → 2.2.12

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 (37) hide show
  1. package/docs/FALLOW-COMPLEXITY-DUPLICATION-AUDIT.md +65 -0
  2. package/docs/IMPROVE-AUDIT-README.md +30 -0
  3. package/docs/IMPROVE-AUDIT-RESULTS.md +52 -0
  4. package/docs/IMPROVE-DEEP-AUDIT-RESULTS.md +81 -0
  5. package/docs/fallow-refactor/apps-debug.md +27 -0
  6. package/docs/fallow-refactor/apps-playground.md +46 -0
  7. package/docs/fallow-refactor/apps-visual-identity.md +41 -0
  8. package/docs/fallow-refactor/layers-animations.md +34 -0
  9. package/docs/fallow-refactor/layers-canvas.md +32 -0
  10. package/docs/fallow-refactor/layers-content.md +33 -0
  11. package/docs/fallow-refactor/layers-core.md +39 -0
  12. package/docs/fallow-refactor/layers-feeds.md +39 -0
  13. package/docs/fallow-refactor/layers-forms.md +30 -0
  14. package/docs/fallow-refactor/layers-layout.md +42 -0
  15. package/docs/fallow-refactor/layers-mailer.md +32 -0
  16. package/docs/fallow-refactor/layers-motion.md +27 -0
  17. package/docs/fallow-refactor/layers-navigation.md +31 -0
  18. package/docs/fallow-refactor/layers-page-transitions.md +30 -0
  19. package/docs/fallow-refactor/layers-routing.md +33 -0
  20. package/docs/fallow-refactor/layers-scripts.md +35 -0
  21. package/docs/fallow-refactor/layers-scroll.md +38 -0
  22. package/docs/fallow-refactor/layers-seo.md +32 -0
  23. package/docs/fallow-refactor/layers-shader.md +53 -0
  24. package/docs/fallow-refactor/layers-theme.md +33 -0
  25. package/docs/fallow-refactor/layers-transitions.md +27 -0
  26. package/docs/fallow-refactor/layers-typography.md +29 -0
  27. package/docs/fallow-refactor/layers-ui.md +27 -0
  28. package/docs/fallow-refactor/layers-visual.md +34 -0
  29. package/layers/feeds/app/app.config.ts +4 -2
  30. package/layers/feeds/app/components/Feeds/Index.vue +229 -0
  31. package/layers/feeds/app/components/Feeds/RouteCard.vue +81 -0
  32. package/layers/feeds/app/plugins/feed-head.ts +27 -49
  33. package/layers/feeds/app/utils/feed-catalog.test.ts +71 -0
  34. package/layers/feeds/app/utils/feed-catalog.ts +179 -0
  35. package/layers/feeds/package.json +1 -0
  36. package/layers/feeds/server/routes/feed/discovery.get.ts +16 -14
  37. package/package.json +3 -2
@@ -0,0 +1,65 @@
1
+ # Fallow Complexity and Duplication Audit
2
+
3
+ This file is the entry point for the layer-by-layer Fallow refactor handoff. Each app or layer has its own document under `docs/fallow-refactor/`.
4
+
5
+ Use the split documents instead of one combined warning list. They separate complexity work from duplication work and identify whether the likely extraction target is a component, composable, utility, or local refactor.
6
+
7
+ ## Source Data
8
+
9
+ The audit uses two sources:
10
+
11
+ - Complexity data from `fallow health --complexity --hotspots --targets --format json --quiet --explain`.
12
+ - Duplication data from the user-provided Fallow Problems export.
13
+
14
+ Run these commands before and after each implementation phase:
15
+
16
+ ```bash
17
+ FALLOW_AGENT_SOURCE=codex fallow health --complexity --hotspots --targets --format json --quiet --explain 2>/dev/null || true
18
+ FALLOW_AGENT_SOURCE=codex fallow dupes --top 80 --format json --quiet --explain 2>/dev/null || true
19
+ pnpm typecheck
20
+ ```
21
+
22
+ ## Recommended Order
23
+
24
+ 1. [apps/playground](./fallow-refactor/apps-playground.md)
25
+ 2. [layers/shader](./fallow-refactor/layers-shader.md)
26
+ 3. [layers/layout](./fallow-refactor/layers-layout.md)
27
+ 4. [layers/core](./fallow-refactor/layers-core.md)
28
+ 5. [layers/feeds](./fallow-refactor/layers-feeds.md)
29
+ 6. Smaller cleanup documents, ordered by risk and locality.
30
+
31
+ ## App Documents
32
+
33
+ - [apps/debug](./fallow-refactor/apps-debug.md)
34
+ - [apps/playground](./fallow-refactor/apps-playground.md)
35
+ - [apps/visual-identity](./fallow-refactor/apps-visual-identity.md)
36
+
37
+ ## Layer Documents
38
+
39
+ - [layers/animations](./fallow-refactor/layers-animations.md)
40
+ - [layers/canvas](./fallow-refactor/layers-canvas.md)
41
+ - [layers/content](./fallow-refactor/layers-content.md)
42
+ - [layers/core](./fallow-refactor/layers-core.md)
43
+ - [layers/feeds](./fallow-refactor/layers-feeds.md)
44
+ - [layers/forms](./fallow-refactor/layers-forms.md)
45
+ - [layers/layout](./fallow-refactor/layers-layout.md)
46
+ - [layers/mailer](./fallow-refactor/layers-mailer.md)
47
+ - [layers/motion](./fallow-refactor/layers-motion.md)
48
+ - [layers/navigation](./fallow-refactor/layers-navigation.md)
49
+ - [layers/page-transitions](./fallow-refactor/layers-page-transitions.md)
50
+ - [layers/routing](./fallow-refactor/layers-routing.md)
51
+ - [layers/scroll](./fallow-refactor/layers-scroll.md)
52
+ - [layers/scripts](./fallow-refactor/layers-scripts.md)
53
+ - [layers/seo](./fallow-refactor/layers-seo.md)
54
+ - [layers/shader](./fallow-refactor/layers-shader.md)
55
+ - [layers/theme](./fallow-refactor/layers-theme.md)
56
+ - [layers/transitions](./fallow-refactor/layers-transitions.md)
57
+ - [layers/typography](./fallow-refactor/layers-typography.md)
58
+ - [layers/ui](./fallow-refactor/layers-ui.md)
59
+ - [layers/visual](./fallow-refactor/layers-visual.md)
60
+
61
+ ## Non-Goals
62
+
63
+ Do not address unused exports, unused files, unused dependencies, circular dependencies, or catalog warnings as part of this specific task. Those warnings need separate verification and tracing.
64
+
65
+ Do not run `fallow fix` for this work. These refactors are structural and require manual review.
@@ -0,0 +1,30 @@
1
+ # Improve Audit
2
+
3
+ Audit written against commit `a2805da`.
4
+
5
+ ## Files
6
+
7
+ | File | Purpose |
8
+ | --- | --- |
9
+ | [IMPROVE-AUDIT-RESULTS.md](./IMPROVE-AUDIT-RESULTS.md) | Vetted improve audit findings, direction options, verification results, and recommended planning order. |
10
+
11
+ ## Recommended Next Work
12
+
13
+ Recommended first implementation set:
14
+
15
+ 1. Fix the current feeds lint failure.
16
+ 2. Bring published server routes into root typecheck and type-aware lint coverage.
17
+ 3. Stop exposing configured mailer addresses from the public forms status endpoint.
18
+ 4. Correct the forms demo mailer environment variable names.
19
+ 5. Add focused behavior tests around feed, forms/mailer, and routing paths.
20
+
21
+ ## Dependency Order
22
+
23
+ | Order | Finding | Depends On | Status |
24
+ | --- | --- | --- | --- |
25
+ | 1 | Current feeds lint failure | None | TODO |
26
+ | 2 | Server route typecheck coverage | Feeds lint fix recommended first | TODO |
27
+ | 3 | Public forms status endpoint leaks email addresses | Server route typecheck coverage recommended first | TODO |
28
+ | 4 | Wrong mailer env var docs in forms demo | None | TODO |
29
+ | 5 | Missing behavior tests | Typecheck/lint baseline | TODO |
30
+
@@ -0,0 +1,52 @@
1
+ # Improve Audit Results
2
+
3
+ Audit written against commit `a2805da`.
4
+
5
+ ## Scope
6
+
7
+ Standard hotspot-weighted audit of the Nuxt 4 pnpm workspace. The pass focused on root tooling, CI, published layer configuration, feed/form/mailer server paths, content composables, dependency posture, and existing architecture/migration docs.
8
+
9
+ This pass did not audit ignored generated folders, local `.env`, or every Vue demo page exhaustively. It did not run `pnpm build` because that writes build artifacts.
10
+
11
+ ## Verification
12
+
13
+ | Command | Result | Notes |
14
+ | --- | --- | --- |
15
+ | `pnpm typecheck` | PASS | Uses `vue-tsc --noEmit -p tsconfig.typecheck.json`. |
16
+ | `pnpm lint` | FAIL | Fails in `kmcom-layer-feeds` on `layers/feeds/server/utils/content-adapter.ts:25`. |
17
+ | `pnpm -F kmcom-layer-feeds typecheck` | PASS | Passes even though feeds server files are outside the root typecheck include. |
18
+ | `pnpm audit --audit-level high --prod` | FAIL | Reports high advisories for `esbuild` and `ws`. |
19
+
20
+ ## Findings
21
+
22
+ | # | Finding | Category | Impact | Effort | Risk | Confidence | Evidence |
23
+ | --- | --- | --- | --- | --- | --- | --- | --- |
24
+ | 1 | `pnpm lint` currently fails on feeds server code | DX / Tooling | The main local quality gate is red, so CI cannot safely adopt it yet. | S | LOW | HIGH | `layers/feeds/server/utils/content-adapter.ts:25` |
25
+ | 2 | Published server routes are excluded from root typecheck and type-aware lint | Correctness / DX | Feed/form/mailer server code ships in npm but can pass `pnpm typecheck` with type errors hiding there. | M | MED | HIGH | `tsconfig.typecheck.json:25`, `eslint.config.mjs:387`, `package.json:37` |
26
+ | 3 | Public forms status endpoint exposes configured email addresses | Security | Any visitor can read `emailFrom` and `emailTo`, leaking operational inboxes and increasing spam targeting. | S | LOW | HIGH | `layers/forms/server/api/forms/status.get.ts:4`, `layers/forms/server/api/forms/status.get.ts:7` |
27
+ | 4 | Forms demo documents the wrong mailer env var namespace | Correctness / Docs | Users following the UI instructions set `NUXT_FORMS_LAYER_*`, but runtime config reads `NUXT_MAILER_LAYER_*`, leaving email unconfigured. | S | LOW | HIGH | `apps/playground/app/pages/forms.vue:732`, `layers/mailer/nuxt.config.ts:16` |
28
+ | 5 | Contact email endpoint has no server-side abuse controls | Security | The public POST path can be used to burn Resend quota or spam the configured recipient. | M | MED | HIGH | `layers/forms/server/api/contact.post.ts:11`, `layers/mailer/server/utils/email.ts:17` |
29
+ | 6 | Lockfile still contains high-advisory `esbuild` and `ws` versions | Security / Dependencies | Build/tooling and Nuxt Content dependency paths remain vulnerable per `pnpm audit --prod`. | S/M | MED | HIGH | `pnpm-lock.yaml:6770`, `pnpm-lock.yaml:12275` |
30
+ | 7 | No automated behavior tests exist for the published layers | Test Coverage | Feed serialization, contact email, routing governance, and content composables have no regression harness. | M/L | LOW | HIGH | `package.json:41`, `package.json:246` |
31
+ | 8 | Feed generation fetches whole collections before filtering/limiting | Performance | Large content collections make each feed request do avoidable in-memory filtering, sorting, and slicing. | M | MED | HIGH | `layers/feeds/server/utils/content-adapter.ts:61`, `layers/feeds/server/utils/feed-service.ts:16` |
32
+
33
+ ## Direction Options
34
+
35
+ 1. Define the routing runtime flags contract. The client fetches `/api/feature-flags`, and product/enterprise presets enable runtime flags, but the layer ships no endpoint. This should become a documented consumer contract or a small optional server route. Evidence: `layers/routing/app/plugins/feature-flags.client.ts:12`, `layers/routing/app/types/routing.ts:47`.
36
+
37
+ 2. Convert the existing fallow refactor docs into executable plans after the verification baseline is green. The repo already has a useful priority order in `docs/FALLOW-COMPLEXITY-DUPLICATION-AUDIT.md`, but those refactors should wait until lint/typecheck and focused tests protect behavior.
38
+
39
+ ## Considered And Rejected
40
+
41
+ - The Nuxt Content schemas in `layers/content/content.config.ts` are not directly attached to `defineCollection()`, but `docs/MIGRATION.md:91` and `layers/content/app/types/collections.d.ts:4` document this as an intentional c12/jiti workaround. Treat future work here as decision/code drift investigation, not a simple schema attachment fix.
42
+ - The previously documented picture provider and feeds packaging fixes were not reported again. Current source has `provider?: string`, exports `./layers/feeds`, and includes `layers/*/server/**` in package files.
43
+ - No tracked credential values were found. Hits were environment variable names, examples, or GitHub Actions secret references.
44
+
45
+ ## Recommended Planning Order
46
+
47
+ 1. Fix finding 1 so `pnpm lint` is green.
48
+ 2. Fix finding 2 so server code is covered by the type system and type-aware lint.
49
+ 3. Fix findings 3 and 4 while the server route coverage is fresh.
50
+ 4. Add focused tests for the same paths before larger refactors.
51
+ 5. Address dependency advisories and feed query performance after the baseline is stable.
52
+
@@ -0,0 +1,81 @@
1
+ # Improve Deep Audit Results
2
+
3
+ Deep audit written against commit `a2805da` on 2026-06-17.
4
+
5
+ ## Scope
6
+
7
+ This pass expanded the earlier improve audit across the Nuxt 4 pnpm workspace. It reviewed root tooling, recursive package scripts, published package surfaces, server routes, content composables, feeds, forms and mailer, routing, dependency posture, CSS quality, Fallow health, duplication, dead-code leads, feature flags, and local security candidates.
8
+
9
+ This pass stayed read-only for source code. It did not read `.env` files. It did not run `pnpm build` because that writes build artifacts. Ignored/generated folders were excluded from findings unless a tool accidentally scanned them; those noisy results were discarded and rerun against tracked source where possible.
10
+
11
+ ## Verification Summary
12
+
13
+ | Command | Result | Notes |
14
+ | --- | --- | --- |
15
+ | `pnpm typecheck` | PASS | Root `vue-tsc --noEmit -p tsconfig.typecheck.json` passed. |
16
+ | `pnpm -r --if-present --workspace-concurrency=1 --no-bail typecheck` | PASS | Recursive package typecheck completed successfully across workspace packages. |
17
+ | `pnpm -r --if-present --workspace-concurrency=1 --no-bail lint` | FAIL | 23 packages passed, `kmcom-layer-feeds` failed on one ESLint error. The run also reported 63 warnings. |
18
+ | `pnpm format:check` | FAIL | Reports unknown `ignorePath` config option and 309 formatting failures, including local `.agents` content. |
19
+ | `git ls-files '*.css' \| xargs pnpm exec stylelint --allow-empty-input` | FAIL | Tracked CSS only: 96 problems, 84 errors and 12 warnings. |
20
+ | `pnpm audit --audit-level high --prod --json` | FAIL | 2 high advisories: `esbuild` and `ws`. Metadata also reports 1 low and 1 moderate advisory. |
21
+ | `fallow health --hotspots --targets --format json --quiet` | COMPLETE | 651 files, 2825 functions, 147 functions above Fallow thresholds. |
22
+ | `fallow dupes --top 20 --format json --quiet` | COMPLETE | 467 files, 147 with clones, 5593 duplicated lines in the top clone set, 9.18% duplication. |
23
+ | `fallow dead-code --unused-deps --unused-files --unused-exports --format json --quiet` | COMPLETE | 260 cleanup candidates: 43 files, 190 exports, 27 dependencies. Treat as trace-required leads. |
24
+ | `fallow flags --format json --quiet` | COMPLETE | No feature flags detected by Fallow, despite routing runtime flags being hand-implemented. |
25
+ | `fallow security --surface --format json --quiet` | COMPLETE | One low-severity weak-hash candidate in feed ETag generation. |
26
+
27
+ ## Confirmed Findings
28
+
29
+ | Priority | Finding | Impact | Effort | Confidence | Evidence |
30
+ | --- | --- | --- | --- | --- | --- |
31
+ | P0 | Public forms status endpoint exposes configured email addresses. | Any visitor can read operational sender and recipient addresses, increasing spam and metadata exposure. | S | HIGH | `layers/forms/server/api/forms/status.get.ts:4`, `layers/forms/server/api/forms/status.get.ts:7`, `apps/playground/app/pages/forms.vue:662`, `apps/playground/app/pages/forms.vue:675` |
32
+ | P0 | Contact email endpoint has no server-side abuse controls. | The public POST path can burn Resend quota, spam the configured recipient, and create noisy hooks. | M | HIGH | `layers/forms/server/api/contact.post.ts:11`, `layers/forms/server/api/contact.post.ts:22`, `layers/mailer/server/utils/email.ts:17` |
33
+ | P0 | Production dependency audit has high advisories. | `pnpm audit` reports high-severity `esbuild` and `ws` paths in production dependency graphs. | S/M | HIGH | `pnpm-lock.yaml:6770`, `pnpm-lock.yaml:6775`, `pnpm-lock.yaml:12275`, `package.json:106`, `package.json:112`, `package.json:115` |
34
+ | P1 | Content list composables reuse cache keys while accepting different query options. | Calls with different `tags`, `limit`, `featured`, or `excludeDrafts` can share or cancel the wrong `useAsyncData` payload. | S/M | HIGH | `layers/content/app/composables/useContentData.ts:1`, `layers/content/app/composables/useBlogPosts.ts:3`, `layers/content/app/composables/useBlogPosts.ts:6`, `layers/content/app/composables/useGalleryItems.ts:3`, `layers/content/app/composables/usePortfolioItems.ts:3`, `layers/content/app/composables/createPortfolioComposables.ts:20` |
35
+ | P1 | Published server files are outside root typecheck and type-aware lint. | `layers/*/server/**` ships in the package but is excluded from root typechecking and has type-aware ESLint disabled. | M | HIGH | `package.json:37`, `tsconfig.typecheck.json:25`, `eslint.config.mjs:387`, `eslint.config.mjs:390` |
36
+ | P1 | Main lint baseline is red. | Recursive lint has one hard error, so CI or pre-commit adoption cannot rely on lint yet. | S | HIGH | `layers/feeds/server/utils/content-adapter.ts:25`, recursive lint summary: 1 fail, 23 pass |
37
+ | P1 | Format baseline is noisy and includes local agent assets. | `pnpm format:check` fails on 309 files and warns that `ignorePath` is not a valid config option. The ignore file does not exclude `.agents/` or `.claude/`. | S | HIGH | `prettier.config.cjs:46`, `.prettierignore:1`, `.prettierignore:85` |
38
+ | P1 | No tracked behavior tests exist. | Feed serialization, forms/mailer, routing governance, content composables, and shader utilities rely on manual checks plus lint/typecheck. | M/L | HIGH | `package.json:41`, `package.json:246`; `git ls-files` found no `*.test.*`, `*.spec.*`, `tests`, or `__tests__` paths. |
39
+ | P2 | Feed dynamic collection routes accept arbitrary collection names. | `/feed/:collection/:format` passes unvalidated path segments into `queryCollection(event, collection)`, so invalid collections become uncontrolled content-query failures instead of 404s. | S | HIGH | `layers/feeds/server/routes/feed/[collection]/rss.get.ts:2`, `layers/feeds/server/utils/content-adapter.ts:28`, `layers/feeds/app/app.config.ts:5`, `layers/feeds/server/routes/feed/discovery.get.ts:20` |
40
+ | P2 | Feed generation fetches whole collections before filtering and limiting. | Large collections make every feed request filter, sort, and slice in memory instead of pushing draft/date/limit work into the Nuxt Content query. | M | HIGH | `layers/feeds/server/utils/content-adapter.ts:61`, `layers/feeds/server/utils/content-adapter.ts:63`, `layers/feeds/server/utils/feed-service.ts:16` |
41
+ | P2 | Feed date handling can turn bad frontmatter into runtime feed failures. | `new Date(...)` is not validated before `toISOString()`. Invalid dates can crash JSON or Atom serialization. | S | MED | `layers/feeds/server/utils/content-adapter.ts:50`, `layers/feeds/server/utils/formats/json.ts:16`, `layers/feeds/server/utils/formats/atom.ts:13`, `layers/feeds/server/utils/formats/atom.ts:22` |
42
+ | P2 | CSS lint rules are configured but tracked CSS fails them. | Stylelint reports 84 errors and 12 warnings against tracked CSS only, mostly token fallback hex colors, import ordering, keyframe casing, and deprecated properties. | M | HIGH | `stylelint.config.mjs:48`, `stylelint.config.mjs:123`, `layers/core/app/assets/css/core.css:6`, `layers/feeds/public/feed/style.css:15`, `layers/feeds/app/assets/css/feeds.css:20` |
43
+ | P2 | Routing runtime flags have a client fetch contract but no shipped endpoint. | Product and enterprise presets enable `runtimeFlags`, and the client fetches `/api/feature-flags`; the layer does not provide that server route. Consumers need an explicit contract or optional route. | S/M | HIGH | `layers/routing/app/plugins/feature-flags.client.ts:8`, `layers/routing/app/plugins/feature-flags.client.ts:12`, `layers/routing/app/types/routing.ts:47`, `layers/routing/app/types/routing.ts:56` |
44
+ | P3 | Feed ETag generation uses MD5. | This is not password/signature crypto, but modern cache fingerprints should use SHA-256 to avoid weak-crypto findings. | S | HIGH | `layers/feeds/server/utils/cache.ts:5` |
45
+
46
+ ## Structural Findings
47
+
48
+ Fallow health reports the codebase is broadly maintainable but has concentrated complexity. It analyzed 651 files and 2825 functions; 147 functions exceed Fallow thresholds, with 28 critical, 37 high, and 82 moderate findings. The hottest files include `layers/feeds/server/utils/feed-service.ts`, content composables, `layers/layout/app/components/Layout/Grid/Item.vue`, theme/client plugin code, scroll helpers, and large shader playground pages.
49
+
50
+ The shader area is the largest duplication cluster. Fallow dupes reports 5593 duplicated lines in the top clone set, with repeated shader pipeline color watchers across 29 components, repeated material mouse uniform watchers across 8 components, and repeated theme preset boilerplate across 7 components. Evidence starts at `layers/shader/app/components/Pipeline/Aurora.client.vue:41`, `layers/shader/app/components/Material/AmbientAurora.client.vue:61`, and `layers/shader/app/components/Preset/ThemeAurora.client.vue:2`.
51
+
52
+ The largest demo pages are also carrying application logic. `apps/playground/app/pages/shader-background.vue` and `apps/playground/app/pages/shader-pipeline-background.vue` both contain large `getActiveBlocks()` switches at `apps/playground/app/pages/shader-background.vue:299` and `apps/playground/app/pages/shader-pipeline-background.vue:221`. These are good refactor candidates after the quality gates are green, but they are less urgent than public server and dependency issues.
53
+
54
+ `layers/layout/app/components/Layout/Grid/Item.vue` has a high-impact computed style block starting at `layers/layout/app/components/Layout/Grid/Item.vue:139`. Fallow marks it as a high-priority refactor target because many files depend on it and its responsive grid logic is complex.
55
+
56
+ Fallow dead-code reports 260 cleanup candidates, but many are Nuxt-layer assets, auto-import surfaces, CSS files, and public exported types. Treat those as leads only. Trace each candidate before deletion with `fallow dead-code --trace ...` or `fallow dead-code --trace-file ...`.
57
+
58
+ ## Tooling Notes
59
+
60
+ The root `format:check` failure is partly self-inflicted. Prettier reads `.prettierignore` by default, but `ignorePath` inside `prettier.config.cjs` is not a supported config key. The current `.prettierignore` also omits `.agents/` and `.claude/`, so local agent skill files get formatted as project content.
61
+
62
+ The stylelint run against raw globs originally picked up ignored build output such as `apps/playground/dist`. The result above uses `git ls-files '*.css'`, so it represents tracked CSS only.
63
+
64
+ Depcheck reported unused dependencies, but it also read local agent skill files and Nuxt layer side effects poorly. I did not use depcheck as evidence for removal. Fallow dependency findings are still trace-required because dependencies can be required by Nuxt modules, `nuxt.config.ts`, peer dependency contracts, or package publishing.
65
+
66
+ ## Considered And Rejected
67
+
68
+ - The Nuxt Content schema workaround remains intentionally documented. `docs/MIGRATION.md` explains why schemas are not passed directly to `defineCollection()`, so this audit does not recommend a simple schema attachment change.
69
+ - Ignored generated output under `.nuxt`, `.output`, `.netlify`, `dist`, and local package caches is not treated as source debt. When a tool scanned those paths, I reran a scoped command.
70
+ - Fallow reported no feature flags, but the routing layer uses a custom runtime flag pattern. That means Fallow did not detect the pattern; it does not mean runtime flags are absent.
71
+ - The MD5 feed ETag finding is a hardening item, not a confirmed exploit. The hash is used for response cache validation, not credential storage or signature verification.
72
+
73
+ ## Recommended Triage Order
74
+
75
+ 1. Fix public server risks first: remove address exposure from the status endpoint and add abuse controls to contact submission.
76
+ 2. Resolve high dependency advisories and the current feeds lint failure so the baseline is trustworthy.
77
+ 3. Bring `layers/*/server/**/*.ts` into typecheck or a dedicated Nitro server typecheck before changing server routes.
78
+ 4. Fix content composable cache keys and add targeted tests for content list variants.
79
+ 5. Harden feed routes with collection allowlisting, query pushdown, and date validation.
80
+ 6. Clean the formatting and CSS lint baselines so future reports are not buried in noise.
81
+ 7. Use the existing Fallow refactor docs plus this report to sequence shader/layout/playground structural work after tests exist.
@@ -0,0 +1,27 @@
1
+ # apps/debug
2
+
3
+ `apps/debug` has no complexity or duplication findings in the current Fallow snapshot used for this audit.
4
+
5
+ ## Complexity Findings
6
+
7
+ - No current findings.
8
+
9
+ ## Duplication Findings
10
+
11
+ - No current findings in the supplied Problems export.
12
+
13
+ ## Component Opportunities
14
+
15
+ - No extraction is recommended.
16
+
17
+ ## Composable Opportunities
18
+
19
+ - No extraction is recommended.
20
+
21
+ ## Utility Opportunities
22
+
23
+ - No extraction is recommended.
24
+
25
+ ## Agent Notes
26
+
27
+ Do not create refactor work for this app unless a later Fallow run introduces findings.
@@ -0,0 +1,46 @@
1
+ # apps/playground
2
+
3
+ `apps/playground` has the highest-value overlap between complexity and duplication. Start here before touching lower-risk layers.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `15` complexity findings.
8
+ - `7` critical findings.
9
+ - `apps/playground/app/pages/shader-background.vue:299` defines `getActiveBlocks` with cyclomatic complexity `57` and cognitive complexity `101`.
10
+ - `apps/playground/app/pages/shader-pipeline-background.vue:221` defines a matching `getActiveBlocks` with cyclomatic complexity `57` and cognitive complexity `101`.
11
+ - `apps/playground/app/pages/routing.vue:126` computes `simResult` with high branching.
12
+
13
+ ## Duplication Findings
14
+
15
+ - `16` duplicate warnings.
16
+ - `shader-background.vue:299-546` duplicates `shader-pipeline-background.vue:221-468` for `248` lines.
17
+ - `shader-background.vue:72-182` duplicates `shader-pipeline-background.vue:60-163` for `111` lines.
18
+ - `typography.vue:2-83` duplicates `ui.vue:2-91` for `90` lines.
19
+ - `Demo/ThemeNode.client.vue:51-92` duplicates `Demo/ThemeCanvas.client.vue:90-133` for `44` lines.
20
+
21
+ ## Component Opportunities
22
+
23
+ - Create `Demo/ShaderDemoShell.vue` for the shared full-screen shader demo layout.
24
+ - Create `Demo/ShaderPresetGrid.vue` for category-specific preset buttons.
25
+ - Create `Demo/ShaderBackgroundControls.vue` for the right-hand controls.
26
+ - Create `Demo/ShaderGrainLayerRenderer.vue` for repeated grain rendering blocks.
27
+
28
+ ## Composable Opportunities
29
+
30
+ - Create `useShaderBackgroundDemo()` for category state, active preset state, grain state, active labels, and generated code.
31
+ - Create `useDemoAccent()` for repeated `setPageAccent()` and cleanup patterns.
32
+ - Create `useThemeNodeUniforms()` for shared theme color and ambient uniform watchers used by `ThemeNode` and `ThemeCanvas`.
33
+ - Move routing demo logic to `useRoutingDemo()` if the page keeps reactive simulator state.
34
+
35
+ ## Utility Opportunities
36
+
37
+ - Create `apps/playground/app/utils/shaderBackgroundPresets.ts` for preset metadata and block serialization.
38
+ - Create `apps/playground/app/utils/routingSimulation.ts` for the governance simulator.
39
+ - Create `apps/playground/app/utils/demoSnippets.ts` for UI and typography code snippets.
40
+
41
+ ## Acceptance Criteria
42
+
43
+ - The two `getActiveBlocks` complexity findings disappear or drop below threshold.
44
+ - The `248` line shader page duplicate group disappears.
45
+ - The page output and generated code output remain equivalent.
46
+ - `pnpm typecheck` passes.
@@ -0,0 +1,41 @@
1
+ # apps/visual-identity
2
+
3
+ `apps/visual-identity` has small but clear duplication and moderate complexity. Treat this as a focused cleanup after the larger shader and playground work.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `10` complexity findings.
8
+ - `2` critical findings.
9
+ - `apps/visual-identity/app/composables/useExport.ts:135` has a high-complexity `generateTailwindV4`.
10
+ - `apps/visual-identity/app/composables/useExport.ts:90` has a high-complexity `generateCssVars`.
11
+ - `apps/visual-identity/app/composables/useBrandState.ts:151` has a critical `migrateState`.
12
+ - `apps/visual-identity/app/components/Colour/ModePreview.vue:31` has a critical `mixOklch`.
13
+
14
+ ## Duplication Findings
15
+
16
+ - `6` duplicate warnings.
17
+ - `useExport.ts:114-126` duplicates `useExport.ts:158-170`.
18
+ - Typography page setup duplicates between `typography/index.vue` and `typography/scale.vue`.
19
+ - `colour/themes.vue` contains two small same-file duplicate groups.
20
+
21
+ ## Component Opportunities
22
+
23
+ - Add a small typography page header component only if the same header pattern appears in more than the current two files.
24
+ - Keep color preview components domain-specific.
25
+
26
+ ## Composable Opportunities
27
+
28
+ - Keep `useExport()` as the public composable.
29
+ - Move migration logic behind a small `useBrandStateMigrations()` helper only if migrations grow beyond the current version.
30
+
31
+ ## Utility Opportunities
32
+
33
+ - Create `apps/visual-identity/app/utils/exportWriters.ts` for token line generation.
34
+ - Create `apps/visual-identity/app/utils/brandStateMigrations.ts` for versioned state migration.
35
+ - Create `apps/visual-identity/app/utils/oklchMix.ts` for OKLCH mixing used by components.
36
+
37
+ ## Acceptance Criteria
38
+
39
+ - Duplicate export writer blocks disappear.
40
+ - `generateCssVars` and `generateTailwindV4` use shared writer helpers.
41
+ - `pnpm typecheck` passes.
@@ -0,0 +1,34 @@
1
+ # layers/animations
2
+
3
+ `layers/animations` has duplicated pointer/motion logic and several high-complexity animation callbacks. Keep public animation composables separate.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `8` complexity findings.
8
+ - `5` high findings.
9
+ - Main findings include `useTiltEffect.ts:17`, `useMagneticElement.ts:17`, `MarqueeText.vue:80`, and `Marquee.vue:87`.
10
+
11
+ ## Duplication Findings
12
+
13
+ - `2` duplicate warnings.
14
+ - `useMagneticElement.ts:42-50` duplicates `useTiltEffect.ts:42-54`.
15
+
16
+ ## Component Opportunities
17
+
18
+ - No new component is recommended.
19
+
20
+ ## Composable Opportunities
21
+
22
+ - Create `usePointerMotionFrame()` for shared RAF setup, cleanup, and pointer interpolation.
23
+ - Keep `useMagneticElement()` and `useTiltEffect()` as public composables because their interaction semantics differ.
24
+
25
+ ## Utility Opportunities
26
+
27
+ - Extract shared lerp, bounds, and transform math helpers if they repeat after composable extraction.
28
+
29
+ ## Acceptance Criteria
30
+
31
+ - The magnetic/tilt duplicate group disappears.
32
+ - Public composable signatures remain stable.
33
+ - Motion behavior remains visually equivalent.
34
+ - `pnpm typecheck` passes.
@@ -0,0 +1,32 @@
1
+ # layers/canvas
2
+
3
+ `layers/canvas` has moderate renderer capability complexity. This is a local utility refactor, not a component extraction.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `3` complexity findings.
8
+ - `1` high finding.
9
+ - Main findings include `useRendererCapabilities.ts:97`, `useRendererCapabilities.ts:17`, and `nuxt.config.ts:133`.
10
+
11
+ ## Duplication Findings
12
+
13
+ - No duplication warnings for this layer in the supplied Problems export.
14
+
15
+ ## Component Opportunities
16
+
17
+ - No component extraction is recommended.
18
+
19
+ ## Composable Opportunities
20
+
21
+ - Keep `useRendererCapabilities()` as the public composable.
22
+
23
+ ## Utility Opportunities
24
+
25
+ - Extract renderer feature detection into pure predicate helpers.
26
+ - Extract capability normalization into one resolver.
27
+
28
+ ## Acceptance Criteria
29
+
30
+ - Renderer detection remains stable across WebGL, WebGPU, and fallback cases.
31
+ - `useRendererCapabilities()` keeps its public return shape.
32
+ - `pnpm typecheck` passes.
@@ -0,0 +1,33 @@
1
+ # layers/content
2
+
3
+ `layers/content` has small, repeated collection query composables. Use a generic composable and keep domain wrappers.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `6` complexity findings.
8
+ - All are moderate.
9
+ - Main findings include portfolio, gallery, and blog collection helpers/components.
10
+
11
+ ## Duplication Findings
12
+
13
+ - `2` duplicate warnings.
14
+ - `useGalleryItems.ts:11-20` duplicates `usePortfolioItems.ts:15-24`.
15
+
16
+ ## Component Opportunities
17
+
18
+ - No component extraction is recommended from the current findings.
19
+
20
+ ## Composable Opportunities
21
+
22
+ - Create `useCollectionItems()` that accepts collection name, query options, ordering, and limit.
23
+ - Keep `useGalleryItems()` and `usePortfolioItems()` as thin wrappers.
24
+
25
+ ## Utility Opportunities
26
+
27
+ - Extract shared query option normalization if needed.
28
+
29
+ ## Acceptance Criteria
30
+
31
+ - The gallery/portfolio duplicate group disappears.
32
+ - Domain-specific wrapper composables remain available.
33
+ - `pnpm typecheck` passes.
@@ -0,0 +1,39 @@
1
+ # layers/core
2
+
3
+ `layers/core` has several utility-style complexity findings. Prefer rule tables and pure helpers while keeping composable APIs stable.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `20` complexity findings.
8
+ - `4` critical findings.
9
+ - `layers/core/app/composables/useBrowser.ts:13` defines `parseBrowserInfo` with cyclomatic complexity `27` and cognitive complexity `20`.
10
+ - `layers/core/app/plugins/init.ts:14` defines a high-complexity setup function.
11
+ - `layers/core/app/composables/useFeatures.ts:139` defines `applyFeatureClasses`.
12
+
13
+ ## Duplication Findings
14
+
15
+ - `2` duplicate warnings.
16
+ - `layers/core/app/pages/[...slug].vue:4-29` duplicates `layers/core/app/types/app-config.d.ts:13-34`.
17
+ - Treat this duplicate group as low priority until verified. It may be structural or type-like rather than real runtime duplication.
18
+
19
+ ## Component Opportunities
20
+
21
+ - No component extraction is recommended.
22
+
23
+ ## Composable Opportunities
24
+
25
+ - Keep `useBrowser()` and `useFeatures()` as public composables.
26
+ - Move parsing and class mapping out of the composables.
27
+
28
+ ## Utility Opportunities
29
+
30
+ - Create `layers/core/app/utils/browserInfo.ts` with OS and browser detection rule tables.
31
+ - Create `layers/core/app/utils/featureClasses.ts` for feature class mapping.
32
+ - Split plugin setup helpers by responsibility in `layers/core/app/plugins/init.ts`.
33
+
34
+ ## Acceptance Criteria
35
+
36
+ - `parseBrowserInfo` no longer uses a long `if`/`else` chain.
37
+ - `applyFeatureClasses` uses a feature-to-class map.
38
+ - Public composable return shapes remain stable.
39
+ - `pnpm typecheck` passes.
@@ -0,0 +1,39 @@
1
+ # layers/feeds
2
+
3
+ `layers/feeds` has complexity in server-side feed assembly and formatters. The best target is pure utilities with thin route handlers.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `8` complexity findings.
8
+ - `3` critical findings.
9
+ - `layers/feeds/server/utils/feed-service.ts:6` defines `buildFeed` with cyclomatic complexity `22` and cognitive complexity `16`.
10
+ - `layers/feeds/server/utils/formats/rss.ts:5` defines `toRSS` with high complexity.
11
+ - `layers/feeds/server/utils/content-adapter.ts:33` defines `resolveFeedAuthor`.
12
+
13
+ ## Duplication Findings
14
+
15
+ - No duplication warnings for this layer in the supplied Problems export.
16
+
17
+ ## Component Opportunities
18
+
19
+ - No component extraction is relevant.
20
+
21
+ ## Composable Opportunities
22
+
23
+ - No app composable extraction is recommended for the server-side findings.
24
+
25
+ ## Utility Opportunities
26
+
27
+ - Create `layers/feeds/server/utils/feed-config.ts`.
28
+ - Extract `resolveFeedSiteConfig()`.
29
+ - Extract `resolveFeedCollection()`.
30
+ - Extract `createFeedConfig()`.
31
+ - Create `layers/feeds/server/utils/feed-author.ts`.
32
+ - Create `layers/feeds/server/utils/feed-xml.ts` for XML escaping and repeated RSS serialization helpers.
33
+
34
+ ## Acceptance Criteria
35
+
36
+ - Route handlers remain thin orchestration functions.
37
+ - `buildFeed` delegates config and collection resolution.
38
+ - RSS formatting uses smaller helpers for item URL, author, media, dates, and XML escaping.
39
+ - `pnpm typecheck` passes.
@@ -0,0 +1,30 @@
1
+ # layers/forms
2
+
3
+ `layers/forms` has one moderate component-level complexity finding. Keep this as a local cleanup.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `1` complexity finding.
8
+ - `layers/forms/app/components/Form/Field.vue:64` defines `textInputProps` with moderate complexity.
9
+
10
+ ## Duplication Findings
11
+
12
+ - No duplication warnings for this layer in the supplied Problems export.
13
+
14
+ ## Component Opportunities
15
+
16
+ - No component extraction is recommended.
17
+
18
+ ## Composable Opportunities
19
+
20
+ - No composable extraction is recommended.
21
+
22
+ ## Utility Opportunities
23
+
24
+ - Extract input prop normalization into a small helper if more field types share the pattern.
25
+
26
+ ## Acceptance Criteria
27
+
28
+ - `Form/Field.vue` remains the public field component.
29
+ - Text input props remain unchanged.
30
+ - `pnpm typecheck` passes.
@@ -0,0 +1,42 @@
1
+ # layers/layout
2
+
3
+ `layers/layout` has one concentrated complexity hotspot in grid placement style generation. This wants utilities, not new components.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `5` complexity findings.
8
+ - `1` critical finding.
9
+ - `layers/layout/app/components/Layout/Grid/Item.vue:139` defines a computed `style` function with cyclomatic complexity `35` and cognitive complexity `52`.
10
+
11
+ ## Duplication Findings
12
+
13
+ - `4` duplicate warnings.
14
+ - All duplicate warnings sit inside `Layout/Grid/Item.vue`.
15
+ - The duplicate blocks repeat responsive `md` and `lg` CSS variable assignment for row and column placement.
16
+
17
+ ## Component Opportunities
18
+
19
+ - No new component is needed.
20
+ - Keep `Layout/Grid/Item.vue` as the component boundary.
21
+
22
+ ## Composable Opportunities
23
+
24
+ - Share logic with `layers/layout/app/composables/GridPlacement.ts` only if it needs reactive state.
25
+ - Prefer pure utilities first.
26
+
27
+ ## Utility Opportunities
28
+
29
+ - Create `layers/layout/app/utils/gridPlacementStyle.ts`.
30
+ - Extract `resolveDefaultPlacement()`.
31
+ - Extract `resolveResponsivePlacementVars()`.
32
+ - Extract `resolveBleedStyles()`.
33
+ - Extract `resolveAlignmentStyles()`.
34
+ - Extract `resolveRhythmStyles()`.
35
+ - Extract `resolveLayerStyles()`.
36
+
37
+ ## Acceptance Criteria
38
+
39
+ - `Grid/Item.vue:139` drops below critical complexity.
40
+ - Local responsive-var duplicate warnings disappear.
41
+ - Full-span, bleed-left, bleed-right, responsive row, and responsive column behavior stays unchanged.
42
+ - `pnpm typecheck` passes.
@@ -0,0 +1,32 @@
1
+ # layers/mailer
2
+
3
+ `layers/mailer` has one high-complexity email helper and one type-like duplicate group.
4
+
5
+ ## Complexity Findings
6
+
7
+ - `1` complexity finding.
8
+ - `layers/mailer/server/utils/email.ts:9` defines `sendContactEmail` with high complexity.
9
+
10
+ ## Duplication Findings
11
+
12
+ - `2` duplicate warnings.
13
+ - `app/types/mailer.ts:7-24` duplicates `server/utils/hooks.ts:3-20`.
14
+
15
+ ## Component Opportunities
16
+
17
+ - No component extraction is relevant.
18
+
19
+ ## Composable Opportunities
20
+
21
+ - No composable extraction is recommended.
22
+
23
+ ## Utility Opportunities
24
+
25
+ - Move shared hook/event types into one importable type module.
26
+ - Split `sendContactEmail()` into payload validation, recipient resolution, template data creation, and provider send call.
27
+
28
+ ## Acceptance Criteria
29
+
30
+ - The duplicated mailer type block has one source of truth.
31
+ - Server email sending behavior remains unchanged.
32
+ - `pnpm typecheck` passes.