@mrciphersmith/keryx 0.2.164 → 0.3.1

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 (182) hide show
  1. package/README.md +4 -1
  2. package/dist/cli.js +82540 -50300
  3. package/dist/core.js +28967 -18937
  4. package/package.json +2 -2
  5. package/src/gdgraph/affected-report.ts +141 -0
  6. package/src/gdgraph/build.ts +170 -23
  7. package/src/gdgraph/service.ts +6 -0
  8. package/src/gdgraph/staleness.ts +253 -45
  9. package/src/gdskills/bundled/agents/codebase-navigator.md +55 -0
  10. package/src/gdskills/bundled/agents/design-advisor.md +64 -0
  11. package/src/gdskills/bundled/agents/docs-maintainer.md +56 -0
  12. package/src/gdskills/bundled/agents/end-to-end-tester.md +56 -0
  13. package/src/gdskills/bundled/agents/error-path-auditor.md +57 -0
  14. package/src/gdskills/bundled/agents/go-build-fixer.md +52 -0
  15. package/src/gdskills/bundled/agents/go-code-auditor.md +49 -0
  16. package/src/gdskills/bundled/agents/performance-auditor.md +63 -0
  17. package/src/gdskills/bundled/agents/python-build-fixer.md +52 -0
  18. package/src/gdskills/bundled/agents/python-code-auditor.md +49 -0
  19. package/src/gdskills/bundled/agents/refactoring-steward.md +61 -0
  20. package/src/gdskills/bundled/agents/security-auditor.md +62 -0
  21. package/src/gdskills/bundled/agents/test-first-driver.md +61 -0
  22. package/src/gdskills/bundled/agents/work-planner.md +62 -0
  23. package/src/gdskills/bundled/install-manifest.json +797 -0
  24. package/src/gdskills/bundled/rules/core/model-selection.mdc +51 -0
  25. package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +29 -1
  26. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +2 -2
  27. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
  28. package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +267 -0
  29. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +26 -0
  30. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +75 -247
  31. package/src/gdskills/bundled/skills/review/review-orchestrator/output-contract.schema.json +19 -0
  32. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +10 -0
  33. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +5 -0
  34. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/pr-comment-backend.md +50 -0
  35. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/pr-comment-frontend.md +52 -0
  36. package/src/gdskills/bundled/skills/review/review-orchestrator/templates/review-report.md +143 -0
  37. package/src/gdskills/bundled/stacks/angular/agent-refs.json +4 -0
  38. package/src/gdskills/bundled/stacks/angular/governance/eval.json +1751 -0
  39. package/src/gdskills/bundled/stacks/angular/governance/scout.json +32 -0
  40. package/src/gdskills/bundled/stacks/angular/pack.json +55 -0
  41. package/src/gdskills/bundled/stacks/angular/rules/coding-style.mdc +82 -0
  42. package/src/gdskills/bundled/stacks/angular/rules/patterns.mdc +84 -0
  43. package/src/gdskills/bundled/stacks/angular/rules/security.mdc +70 -0
  44. package/src/gdskills/bundled/stacks/angular/rules/testing.mdc +73 -0
  45. package/src/gdskills/bundled/stacks/angular/skills/angular-build-fix/SKILL.md +127 -0
  46. package/src/gdskills/bundled/stacks/angular/skills/angular-build-fix/evals.json +72 -0
  47. package/src/gdskills/bundled/stacks/angular/skills/angular-code-review/SKILL.md +98 -0
  48. package/src/gdskills/bundled/stacks/angular/skills/angular-code-review/evals.json +73 -0
  49. package/src/gdskills/bundled/stacks/angular/skills/angular-implementation/SKILL.md +112 -0
  50. package/src/gdskills/bundled/stacks/angular/skills/angular-implementation/evals.json +74 -0
  51. package/src/gdskills/bundled/stacks/angular/skills/angular-testing/SKILL.md +102 -0
  52. package/src/gdskills/bundled/stacks/angular/skills/angular-testing/evals.json +71 -0
  53. package/src/gdskills/bundled/stacks/go/agent-refs.json +3 -0
  54. package/src/gdskills/bundled/stacks/go/governance/eval.json +1745 -0
  55. package/src/gdskills/bundled/stacks/go/governance/scout.json +31 -0
  56. package/src/gdskills/bundled/stacks/go/pack.json +41 -0
  57. package/src/gdskills/bundled/stacks/go/rules/coding-style.mdc +85 -0
  58. package/src/gdskills/bundled/stacks/go/rules/patterns.mdc +65 -0
  59. package/src/gdskills/bundled/stacks/go/rules/security.mdc +73 -0
  60. package/src/gdskills/bundled/stacks/go/rules/testing.mdc +68 -0
  61. package/src/gdskills/bundled/stacks/go/skills/go-build-fix/SKILL.md +138 -0
  62. package/src/gdskills/bundled/stacks/go/skills/go-build-fix/evals.json +75 -0
  63. package/src/gdskills/bundled/stacks/go/skills/go-code-review/SKILL.md +121 -0
  64. package/src/gdskills/bundled/stacks/go/skills/go-code-review/evals.json +72 -0
  65. package/src/gdskills/bundled/stacks/go/skills/go-implementation/SKILL.md +122 -0
  66. package/src/gdskills/bundled/stacks/go/skills/go-implementation/evals.json +76 -0
  67. package/src/gdskills/bundled/stacks/go/skills/go-testing/SKILL.md +126 -0
  68. package/src/gdskills/bundled/stacks/go/skills/go-testing/evals.json +73 -0
  69. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +4 -0
  70. package/src/gdskills/bundled/stacks/mobx/governance/eval.json +904 -0
  71. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +18 -0
  72. package/src/gdskills/bundled/stacks/mobx/pack.json +28 -0
  73. package/src/gdskills/bundled/stacks/mobx/rules/coding-style.mdc +91 -0
  74. package/src/gdskills/bundled/stacks/mobx/rules/patterns.mdc +122 -0
  75. package/src/gdskills/bundled/stacks/mobx/rules/security.mdc +56 -0
  76. package/src/gdskills/bundled/stacks/mobx/rules/testing.mdc +63 -0
  77. package/src/gdskills/bundled/stacks/mobx/skills/mobx-observable-testing/SKILL.md +124 -0
  78. package/src/gdskills/bundled/stacks/mobx/skills/mobx-observable-testing/evals.json +73 -0
  79. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +149 -0
  80. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/evals.json +74 -0
  81. package/src/gdskills/bundled/stacks/nestjs/agent-refs.json +4 -0
  82. package/src/gdskills/bundled/stacks/nestjs/governance/eval.json +1308 -0
  83. package/src/gdskills/bundled/stacks/nestjs/governance/scout.json +34 -0
  84. package/src/gdskills/bundled/stacks/nestjs/pack.json +53 -0
  85. package/src/gdskills/bundled/stacks/nestjs/rules/coding-style.mdc +70 -0
  86. package/src/gdskills/bundled/stacks/nestjs/rules/patterns.mdc +83 -0
  87. package/src/gdskills/bundled/stacks/nestjs/rules/security.mdc +73 -0
  88. package/src/gdskills/bundled/stacks/nestjs/rules/testing.mdc +69 -0
  89. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-build-fix/SKILL.md +157 -0
  90. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-build-fix/evals.json +70 -0
  91. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-implementation/SKILL.md +129 -0
  92. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-implementation/evals.json +71 -0
  93. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-testing/SKILL.md +143 -0
  94. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-testing/evals.json +69 -0
  95. package/src/gdskills/bundled/stacks/nextjs-nuxt/agent-refs.json +4 -0
  96. package/src/gdskills/bundled/stacks/nextjs-nuxt/governance/eval.json +2413 -0
  97. package/src/gdskills/bundled/stacks/nextjs-nuxt/governance/scout.json +42 -0
  98. package/src/gdskills/bundled/stacks/nextjs-nuxt/pack.json +42 -0
  99. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/coding-style.mdc +69 -0
  100. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/patterns.mdc +88 -0
  101. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/security.mdc +72 -0
  102. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/testing.mdc +64 -0
  103. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-build-fix/SKILL.md +147 -0
  104. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-build-fix/evals.json +75 -0
  105. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-code-review/SKILL.md +118 -0
  106. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-code-review/evals.json +76 -0
  107. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-implementation/SKILL.md +135 -0
  108. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-implementation/evals.json +78 -0
  109. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-testing/SKILL.md +116 -0
  110. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-testing/evals.json +75 -0
  111. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-upgrade-migration/SKILL.md +134 -0
  112. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-upgrade-migration/evals.json +76 -0
  113. package/src/gdskills/bundled/stacks/python/agent-refs.json +3 -0
  114. package/src/gdskills/bundled/stacks/python/governance/eval.json +1758 -0
  115. package/src/gdskills/bundled/stacks/python/governance/scout.json +34 -0
  116. package/src/gdskills/bundled/stacks/python/pack.json +41 -0
  117. package/src/gdskills/bundled/stacks/python/rules/coding-style.mdc +63 -0
  118. package/src/gdskills/bundled/stacks/python/rules/patterns.mdc +88 -0
  119. package/src/gdskills/bundled/stacks/python/rules/security.mdc +84 -0
  120. package/src/gdskills/bundled/stacks/python/rules/testing.mdc +77 -0
  121. package/src/gdskills/bundled/stacks/python/skills/python-build-fix/SKILL.md +144 -0
  122. package/src/gdskills/bundled/stacks/python/skills/python-build-fix/evals.json +74 -0
  123. package/src/gdskills/bundled/stacks/python/skills/python-code-review/SKILL.md +155 -0
  124. package/src/gdskills/bundled/stacks/python/skills/python-code-review/evals.json +72 -0
  125. package/src/gdskills/bundled/stacks/python/skills/python-implementation/SKILL.md +143 -0
  126. package/src/gdskills/bundled/stacks/python/skills/python-implementation/evals.json +78 -0
  127. package/src/gdskills/bundled/stacks/python/skills/python-testing/SKILL.md +132 -0
  128. package/src/gdskills/bundled/stacks/python/skills/python-testing/evals.json +73 -0
  129. package/src/gdskills/bundled/stacks/react/agent-refs.json +4 -0
  130. package/src/gdskills/bundled/stacks/react/governance/eval.json +2188 -0
  131. package/src/gdskills/bundled/stacks/react/governance/scout.json +40 -0
  132. package/src/gdskills/bundled/stacks/react/pack.json +42 -0
  133. package/src/gdskills/bundled/stacks/react/rules/coding-style.mdc +58 -0
  134. package/src/gdskills/bundled/stacks/react/rules/patterns.mdc +79 -0
  135. package/src/gdskills/bundled/stacks/react/rules/security.mdc +70 -0
  136. package/src/gdskills/bundled/stacks/react/rules/testing.mdc +60 -0
  137. package/src/gdskills/bundled/stacks/react/skills/react-build-fix/SKILL.md +139 -0
  138. package/src/gdskills/bundled/stacks/react/skills/react-build-fix/evals.json +72 -0
  139. package/src/gdskills/bundled/stacks/react/skills/react-code-review/SKILL.md +148 -0
  140. package/src/gdskills/bundled/stacks/react/skills/react-code-review/evals.json +74 -0
  141. package/src/gdskills/bundled/stacks/react/skills/react-implementation/SKILL.md +140 -0
  142. package/src/gdskills/bundled/stacks/react/skills/react-implementation/evals.json +74 -0
  143. package/src/gdskills/bundled/stacks/react/skills/react-testing/SKILL.md +142 -0
  144. package/src/gdskills/bundled/stacks/react/skills/react-testing/evals.json +83 -0
  145. package/src/gdskills/bundled/stacks/react/skills/react-upgrade-migration/SKILL.md +155 -0
  146. package/src/gdskills/bundled/stacks/react/skills/react-upgrade-migration/evals.json +74 -0
  147. package/src/gdskills/bundled/stacks/ts-js-node/agent-refs.json +4 -0
  148. package/src/gdskills/bundled/stacks/ts-js-node/governance/eval.json +2155 -0
  149. package/src/gdskills/bundled/stacks/ts-js-node/governance/scout.json +40 -0
  150. package/src/gdskills/bundled/stacks/ts-js-node/pack.json +41 -0
  151. package/src/gdskills/bundled/stacks/ts-js-node/rules/coding-style.mdc +73 -0
  152. package/src/gdskills/bundled/stacks/ts-js-node/rules/patterns.mdc +61 -0
  153. package/src/gdskills/bundled/stacks/ts-js-node/rules/security.mdc +71 -0
  154. package/src/gdskills/bundled/stacks/ts-js-node/rules/testing.mdc +63 -0
  155. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-build-fix/SKILL.md +137 -0
  156. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-build-fix/evals.json +73 -0
  157. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-code-review/SKILL.md +124 -0
  158. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-code-review/evals.json +74 -0
  159. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-esm-migration/SKILL.md +152 -0
  160. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-esm-migration/evals.json +71 -0
  161. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-implementation/SKILL.md +127 -0
  162. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-implementation/evals.json +72 -0
  163. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-testing/SKILL.md +134 -0
  164. package/src/gdskills/bundled/stacks/ts-js-node/skills/nodejs-testing/evals.json +70 -0
  165. package/src/gdskills/bundled/stacks/vue/agent-refs.json +4 -0
  166. package/src/gdskills/bundled/stacks/vue/governance/eval.json +2215 -0
  167. package/src/gdskills/bundled/stacks/vue/governance/scout.json +42 -0
  168. package/src/gdskills/bundled/stacks/vue/pack.json +42 -0
  169. package/src/gdskills/bundled/stacks/vue/rules/coding-style.mdc +73 -0
  170. package/src/gdskills/bundled/stacks/vue/rules/patterns.mdc +84 -0
  171. package/src/gdskills/bundled/stacks/vue/rules/security.mdc +60 -0
  172. package/src/gdskills/bundled/stacks/vue/rules/testing.mdc +69 -0
  173. package/src/gdskills/bundled/stacks/vue/skills/vue-build-fix/SKILL.md +137 -0
  174. package/src/gdskills/bundled/stacks/vue/skills/vue-build-fix/evals.json +72 -0
  175. package/src/gdskills/bundled/stacks/vue/skills/vue-code-review/SKILL.md +120 -0
  176. package/src/gdskills/bundled/stacks/vue/skills/vue-code-review/evals.json +71 -0
  177. package/src/gdskills/bundled/stacks/vue/skills/vue-implementation/SKILL.md +122 -0
  178. package/src/gdskills/bundled/stacks/vue/skills/vue-implementation/evals.json +72 -0
  179. package/src/gdskills/bundled/stacks/vue/skills/vue-testing/SKILL.md +115 -0
  180. package/src/gdskills/bundled/stacks/vue/skills/vue-testing/evals.json +72 -0
  181. package/src/gdskills/bundled/stacks/vue/skills/vue2-to-vue3-migration/SKILL.md +135 -0
  182. package/src/gdskills/bundled/stacks/vue/skills/vue2-to-vue3-migration/evals.json +71 -0
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: vue2-to-vue3-migration
3
+ description: "Use when migrating a Vue 2 (Options API) codebase or component to Vue 3 -- covers converting Options API to <script setup> Composition API, replacing the removed filters and $listeners/$children APIs, Vuex-to-Pinia store migration, v-model breaking changes (single default to multiple named bindings), global API changes (createApp vs new Vue), and Vue 2 lifecycle hook renames (beforeDestroy -> beforeUnmount). Not for a fresh Vue 3 component with no legacy code (use vue-implementation)."
4
+ triggers:
5
+ - "migrate this vue 2 component to vue 3"
6
+ - "convert this options api component to composition api"
7
+ - "upgrade this app from vue 2 to vue 3"
8
+ - "migrate this vuex store to pinia"
9
+ - "fix this v-model breaking change after upgrading to vue 3"
10
+ - "replace this vue 2 filter with vue 3"
11
+ metadata:
12
+ origin: authored
13
+ category: migrate
14
+ version: "1.0.0"
15
+ compatible_harnesses: "claude,codex,cursor,zed,opencode"
16
+ license: "MIT"
17
+ ---
18
+
19
+ # Vue 2 -> Vue 3 migration
20
+
21
+ Migrate a Vue 2 (Options API) component, store, or app to Vue 3. See
22
+ `rules/coding-style.mdc` and `rules/patterns.mdc` for the Composition API
23
+ conventions the migrated code should land in, not the Options API shape
24
+ it started from.
25
+
26
+ ## Workflow
27
+
28
+ ### Step 1: Inventory what actually changed for this codebase
29
+
30
+ Do not attempt a blind global rewrite. Identify which of these the
31
+ project actually uses before touching anything:
32
+
33
+ - Options API components (`data()`, `methods`, `computed`, `watch`,
34
+ lifecycle hooks as object keys) to convert to `<script setup>`.
35
+ - Vue 2 filters (`{{ value | currency }}`) -- removed entirely in Vue 3;
36
+ replace with a computed property or a plain method call.
37
+ - `this.$listeners` -- removed; Vue 3 merges listeners into `$attrs`
38
+ automatically (`v-bind="$attrs"` now forwards both).
39
+ - `this.$children` -- removed; use a template ref or provide/inject
40
+ instead of reaching into child instances.
41
+ - Global API: `new Vue({ ... })` / `Vue.use(plugin)` -> `createApp(App)`
42
+ / `app.use(plugin)`; a global mixin/directive registration moves from
43
+ `Vue.mixin`/`Vue.directive` to `app.mixin`/`app.directive`.
44
+ - Vuex store usage -- migrate to Pinia (the current recommended store)
45
+ unless the project has an explicit reason to keep Vuex.
46
+
47
+ ### Step 2: Convert one component at a time
48
+
49
+ - Move `data()` return values to individual `ref()`/`reactive()`
50
+ declarations at the top of `<script setup>`.
51
+ - Move `computed` properties to `computed(() => ...)` calls.
52
+ - Move `methods` to plain functions in `<script setup>` scope --
53
+ no `this` binding needed or available.
54
+ - Move `watch` entries to `watch()`/`watchEffect()` calls; a Vue 2
55
+ `watch: { foo(newVal, oldVal) { ... } }` becomes `watch(() =>
56
+ someSource, (newVal, oldVal) => { ... })` with an explicit source.
57
+ - Rename lifecycle hooks per the Vue 3 mapping: `beforeDestroy` ->
58
+ `beforeUnmount`, `destroyed` -> `unmounted`; `created`/`beforeCreate`
59
+ have no Composition API equivalent -- that code just runs inline in
60
+ `<script setup>`'s top level, since setup itself runs at that point in
61
+ the lifecycle.
62
+ - Convert `props`/`$emit` declarations to `defineProps<T>()`/
63
+ `defineEmits<T>()` per `rules/coding-style.mdc`.
64
+
65
+ ### Step 3: Handle the `v-model` breaking change
66
+
67
+ - Vue 2's single default `v-model` (`value` prop + `input` event) became
68
+ Vue 3's `modelValue` prop + `update:modelValue` event by default, and
69
+ Vue 3 supports multiple named `v-model:propName` bindings on one
70
+ component. A component using the old `model: { prop: 'value', event:
71
+ 'input' }` option needs its prop/emit renamed (or an explicit
72
+ `v-model:value` at every call site) -- pick one and apply it
73
+ consistently, do not leave some call sites on the old contract.
74
+
75
+ ### Step 4: Migrate Vuex state to Pinia (when applicable)
76
+
77
+ - A Vuex module's `state` becomes a Pinia store's `state` (or individual
78
+ `ref`s in a setup-style store); `getters` become Pinia `getters` (or
79
+ `computed`s); `mutations` + `actions` collapse into Pinia `actions`
80
+ (Pinia has no separate mutations layer -- an action can assign state
81
+ directly).
82
+ - Replace `this.$store.state.x` / `mapState`/`mapGetters`/`mapActions`
83
+ usage in components with the equivalent Pinia store instance and,
84
+ where destructuring is needed, `storeToRefs()`.
85
+
86
+ ### Step 5: Verify
87
+
88
+ ```bash
89
+ npx vue-tsc --noEmit
90
+ npx eslint .
91
+ npm test
92
+ npx vite build
93
+ ```
94
+
95
+ Migrate and verify one component/store at a time rather than converting
96
+ the whole tree before running anything -- a broad simultaneous rewrite
97
+ makes the first failure much harder to localize.
98
+
99
+ ## Rules
100
+
101
+ - Follow `rules/coding-style.mdc` and `rules/patterns.mdc` for the
102
+ Composition API shape the migrated code lands in.
103
+ - NEVER leave a component half-migrated with both Options API keys and
104
+ `<script setup>` code mixed in the same file -- Vue does not support
105
+ that combination cleanly and it is confusing to read.
106
+ - NEVER silently drop a Vue 2 filter's behavior; convert it to a
107
+ computed or method call with the same transformation applied, not just
108
+ remove the filter usage.
109
+ - NEVER migrate a Vuex module's state shape into Pinia without checking
110
+ every component that reads it through `mapState`/`mapGetters` --
111
+ those call sites need updating too, not just the store definition.
112
+
113
+ ## Red Flags
114
+
115
+ | Rationalization | Why it is wrong |
116
+ |---|---|
117
+ | "I'll rewrite the whole app's components in one pass, then run the build once at the end" | The first failure is now ambiguous across dozens of changed files; migrate and verify one component/store at a time instead |
118
+ | "This filter isn't that important, I'll just drop it during the conversion" | Silently changes what the template renders; convert it to a computed/method with the same transformation, don't remove the behavior |
119
+ | "I'll leave `mapState`/`mapGetters` calling into the old Vuex store and only migrate the store definition to Pinia" | The store and its call sites have to move together; a component still importing Vuex helpers against a Pinia-shaped store fails immediately |
120
+ | "I'll mix Options API `methods` and `<script setup>` in the same file to save time on this one" | Vue does not support combining them cleanly in one SFC; finish the conversion instead of leaving it half done |
121
+
122
+ ## Verification
123
+
124
+ Do not report a component/store migrated until all of the following hold:
125
+
126
+ - `vue-tsc --noEmit`, `eslint .`, and the project's test suite all exit
127
+ 0 for the migrated file(s).
128
+ - No file mixes Options API keys with `<script setup>` syntax.
129
+ - Every `v-model` call site for a migrated component uses the new
130
+ `modelValue`/`update:modelValue` (or explicitly named) contract
131
+ consistently.
132
+ - Every removed Vue 2 filter has an equivalent computed/method in the
133
+ migrated component producing the same output.
134
+ - `git status` shows changes confined to the component(s)/store(s)
135
+ actually being migrated in this pass.
@@ -0,0 +1,71 @@
1
+ {
2
+ "triggers": {
3
+ "positive": [
4
+ "this component still has data(), methods, and a beforeDestroy hook from vue 2 -- how do I bring it onto vue 3's composition api",
5
+ "we're on vue 2 and moving the whole app to vue 3 -- what's going to break across filters, v-model, and our vuex store",
6
+ "we're replacing vuex in this app with pinia -- how do I carry this store's state, mutations, and actions over",
7
+ "this vue app's custom input broke v-model after the vue 3 upgrade -- how do I fix the binding",
8
+ "this vue 2 template formats a price with a global filter -- vue 3 removed filters entirely, so what replaces that syntax",
9
+ "migrate this app's global Vue.use plugin registration from Vue 2's new Vue() to Vue 3's createApp"
10
+ ],
11
+ "negative": [
12
+ "build a new vue 3 component with script setup",
13
+ "write a vitest test for this vue 3 component",
14
+ "review this vue 3 component diff for reactivity bugs",
15
+ "fix this vue-tsc build error in this component",
16
+ "upgrade this react app from react 18 to react 19",
17
+ "migrate this node.js package from commonjs to esm"
18
+ ]
19
+ },
20
+ "scenarios": [
21
+ {
22
+ "id": "vue2-filter-to-computed",
23
+ "prompt": "This Vue 2 template uses a filter: `{{ price | currency }}`, defined as a global filter that formats a number as `$X.XX`. I'm converting this component to Vue 3 <script setup>. What do I do about the filter?",
24
+ "strictness": "high",
25
+ "expected_behavior": [
26
+ {
27
+ "grader": "judge",
28
+ "rubric": "A correct answer explains that Vue 3 removed filters entirely, and replaces the filter with an equivalent computed property (or a plain function call in the template) that applies the same currency formatting, rather than dropping the formatting behavior.",
29
+ "pass_criteria": [
30
+ "States that filters were removed in Vue 3 and the pipe syntax (`{{ price | currency }}`) no longer works",
31
+ "Shows the concrete replacement as code: a `computed()` (or plain function) that applies the same currency formatting, used in the template in place of the filter (e.g. `{{ formattedPrice }}` backed by `const formattedPrice = computed(() => currency(price.value))`)"
32
+ ],
33
+ "fail_criteria": [
34
+ "Suggests just removing the filter from the template and rendering the raw `price` value, losing the currency formatting"
35
+ ]
36
+ }
37
+ ],
38
+ "calibration": {
39
+ "known_right": "Vue 3 removed filters entirely, so `{{ price | currency }}` won't work anymore -- the pipe syntax isn't valid template syntax at all in Vue 3. Replace it with a computed property that applies the same formatting the filter used to:\n```ts\nconst formattedPrice = computed(() => currency(price.value))\n```\n```vue\n<template>{{ formattedPrice }}</template>\n```\nIf `currency` was a global filter function used across many components, keep it as a plain importable function (from a `utils/currency.ts` module) and wrap it in a local `computed()` wherever it's used in a template -- that reproduces the same formatting behavior without the removed filter syntax.",
40
+ "known_wrong": "Filters don't exist in Vue 3, so just drop the `| currency` part and render the raw value: `{{ price }}`. You can always add formatting back later if someone notices.",
41
+ "vague": "Filters aren't supported anymore in Vue 3, you'll need to replace it with something else that formats the value the same way.",
42
+ "subtle_wrong": "Since filters are gone, I'd move the formatting into the parent component before the data even reaches this one, so `price` is passed in already formatted as a string. That avoids needing any change inside this component's own template or script."
43
+ }
44
+ },
45
+ {
46
+ "id": "vmodel-single-to-multiple-bindings",
47
+ "prompt": "We just upgraded this Vue app's major version. A custom input component that used to work fine with `v-model` back on the Options API release now doesn't update the parent's data at all. The component still defines `props: ['value']` and `emit('input', newVal)`. What's wrong?",
48
+ "strictness": "high",
49
+ "expected_behavior": [
50
+ { "grader": "regex", "value": "modelValue" },
51
+ {
52
+ "grader": "judge",
53
+ "rubric": "A correct answer explains that Vue 3 changed v-model's default contract from a `value` prop + `input` event to a `modelValue` prop + `update:modelValue` event, and fixes the component to use the new default names (or an explicit named v-model) instead of the old Vue 2 contract.",
54
+ "pass_criteria": [
55
+ "Explains that Vue 3's default v-model contract changed from `value`/`input` to `modelValue`/`update:modelValue`, which is why the old prop/emit names no longer sync",
56
+ "Shows the concrete fix: rename the prop to `modelValue` and the emitted event to `update:modelValue` (e.g. `defineProps<{ modelValue: string }>()` and `emit('update:modelValue', newVal)`)"
57
+ ],
58
+ "fail_criteria": [
59
+ "Attributes the breakage to something unrelated to the v-model prop/event contract change, such as a build cache or a missing import, without addressing the value/input vs modelValue/update:modelValue mismatch"
60
+ ]
61
+ }
62
+ ],
63
+ "calibration": {
64
+ "known_right": "This is the Vue 3 v-model breaking change: Vue 2's default `v-model` wired up a `value` prop and an `input` event, but Vue 3 changed the default contract to a `modelValue` prop and an `update:modelValue` event. The component is still declaring the old Vue 2 names (`props: ['value']`, `emit('input', newVal)`), so when the parent's `v-model` now emits/listens for `update:modelValue` under the hood, this component never receives or fires the events the parent actually expects. Fix it by renaming to the Vue 3 default contract:\n```ts\nconst props = defineProps<{ modelValue: string }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string] }>()\n\nfunction onInput(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value)\n}\n```\n```vue\n<template>\n <input :value=\"modelValue\" @input=\"onInput\" />\n</template>\n```\nAlternatively, keep the old prop/event names but require every call site to use the explicit form `v-model:value=\"...\"` instead of bare `v-model` -- either works, but pick one consistently across the codebase.",
65
+ "known_wrong": "That's probably just a stale build cache after the dependency upgrade -- try clearing node_modules/.vite and restarting the dev server, that usually clears up weird binding issues right after a major version bump like this.",
66
+ "vague": "v-model works a bit differently in Vue 3 now, you'll probably need to update the prop and event names in this component.",
67
+ "subtle_wrong": "I'd keep the component's internal prop named `value` and event named `input` as-is to avoid touching its internals, and instead wrap every usage site with the explicit long form `:value=\"x\" @input=\"x = $event\"` instead of `v-model`, so it keeps working without needing to rename anything inside the component."
68
+ }
69
+ }
70
+ ]
71
+ }