@exelalfanso/puppets-orchestration 0.1.0
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/.agents/architect.md +29 -0
- package/.agents/backend.md +33 -0
- package/.agents/debugger.md +29 -0
- package/.agents/explorer.md +29 -0
- package/.agents/frontend.md +33 -0
- package/.agents/orchestrator.md +35 -0
- package/.agents/reviewer.md +42 -0
- package/.agents/tester.md +29 -0
- package/.agents/worker-skills.md +24 -0
- package/AGENTS.md +33 -0
- package/README.md +150 -0
- package/bin/puppets.mjs +152 -0
- package/docs/README.md +64 -0
- package/docs/architecture/decisions/README.md +36 -0
- package/docs/architecture/overview.md +41 -0
- package/docs/engineering/conventions.md +30 -0
- package/docs/engineering/project-orchestration.md +118 -0
- package/docs/engineering/testing-strategy.md +41 -0
- package/docs/javascript-typescript-stack.md +59 -0
- package/docs/product/PRD.md +56 -0
- package/docs/requirements/SRS.md +35 -0
- package/package.json +20 -0
- package/skills/README.md +12 -0
- package/skills/be/backend-architect/SKILL.md +333 -0
- package/skills/be/backend-development-feature-development/SKILL.md +180 -0
- package/skills/be/backend-security-coder/SKILL.md +156 -0
- package/skills/be/nodejs-backend-patterns/SKILL.md +35 -0
- package/skills/be/nodejs-backend-patterns/resources/implementation-playbook.md +1019 -0
- package/skills/fe/frontend-design/LICENSE.txt +177 -0
- package/skills/fe/frontend-design/SKILL.md +71 -0
- package/skills/fe/web-design-guidelines/SKILL.md +39 -0
- package/skills/qa/ai-qa-review/SKILL.md +357 -0
- package/skills/qa/ai-qa-review/references/mutation-testing.md +38 -0
- package/skills/qa/ai-qa-review/references/smell-examples.md +232 -0
- package/skills/qa/ai-qa-review/references/testability-refactors.md +97 -0
- package/skills/qa/coverage-analysis/SKILL.md +308 -0
- package/skills/qa/coverage-analysis/references/ci-gating.md +132 -0
- package/skills/qa/coverage-analysis/references/mutation-testing.md +29 -0
- package/skills/qa/coverage-analysis/references/tool-config.md +195 -0
- package/skills/qa/qa-project-context/SKILL.md +289 -0
- package/skills/qa/qa-project-context/references/examples.md +237 -0
- package/skills/qa/release-readiness/SKILL.md +443 -0
- package/skills/qa/release-readiness/references/communication-templates.md +38 -0
- package/skills/qa/release-readiness/references/rollout-automation.md +47 -0
- package/skills/qa/risk-based-testing/SKILL.md +337 -0
- package/skills/qa/risk-based-testing/references/examples.md +81 -0
- package/skills/react/vercel-composition-patterns/AGENTS.md +946 -0
- package/skills/react/vercel-composition-patterns/README.md +60 -0
- package/skills/react/vercel-composition-patterns/SKILL.md +89 -0
- package/skills/react/vercel-composition-patterns/rules/_sections.md +29 -0
- package/skills/react/vercel-composition-patterns/rules/_template.md +24 -0
- package/skills/react/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/skills/react/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/skills/react/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/skills/react/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/skills/react/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/skills/react/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/skills/react/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/skills/react/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/skills/react/vercel-react-best-practices/AGENTS.md +3810 -0
- package/skills/react/vercel-react-best-practices/README.md +123 -0
- package/skills/react/vercel-react-best-practices/SKILL.md +149 -0
- package/skills/react/vercel-react-best-practices/rules/_sections.md +46 -0
- package/skills/react/vercel-react-best-practices/rules/_template.md +28 -0
- package/skills/react/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/skills/react/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/skills/react/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/skills/react/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/skills/react/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/skills/react/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/skills/react/vercel-react-best-practices/rules/async-defer-await.md +82 -0
- package/skills/react/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/skills/react/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/skills/react/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-analyzable-paths.md +63 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/skills/react/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/skills/react/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/skills/react/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/skills/react/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/skills/react/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/skills/react/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/skills/react/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/skills/react/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/skills/react/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/skills/react/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/skills/react/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/skills/react/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/skills/react/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/skills/react/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/skills/react/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/skills/react/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/skills/react/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/skills/react/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/skills/react/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/skills/react/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/skills/react/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/skills/react/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/skills/react/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/skills/react/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/skills/react/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/skills/react/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/skills/react/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/skills/react/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/skills/react/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/skills/react/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/skills/react/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/skills/vue/create-adaptable-composable/SKILL.md +76 -0
- package/skills/vue/vue-best-practices/SKILL.md +154 -0
- package/skills/vue/vue-best-practices/references/animation-class-based-technique.md +254 -0
- package/skills/vue/vue-best-practices/references/animation-state-driven-technique.md +291 -0
- package/skills/vue/vue-best-practices/references/component-async.md +97 -0
- package/skills/vue/vue-best-practices/references/component-data-flow.md +307 -0
- package/skills/vue/vue-best-practices/references/component-fallthrough-attrs.md +174 -0
- package/skills/vue/vue-best-practices/references/component-keep-alive.md +137 -0
- package/skills/vue/vue-best-practices/references/component-slots.md +216 -0
- package/skills/vue/vue-best-practices/references/component-suspense.md +228 -0
- package/skills/vue/vue-best-practices/references/component-teleport.md +108 -0
- package/skills/vue/vue-best-practices/references/component-transition-group.md +128 -0
- package/skills/vue/vue-best-practices/references/component-transition.md +125 -0
- package/skills/vue/vue-best-practices/references/composables.md +290 -0
- package/skills/vue/vue-best-practices/references/directives.md +162 -0
- package/skills/vue/vue-best-practices/references/perf-avoid-component-abstraction-in-lists.md +159 -0
- package/skills/vue/vue-best-practices/references/perf-v-once-v-memo-directives.md +182 -0
- package/skills/vue/vue-best-practices/references/perf-virtualize-large-lists.md +187 -0
- package/skills/vue/vue-best-practices/references/plugins.md +166 -0
- package/skills/vue/vue-best-practices/references/reactivity.md +344 -0
- package/skills/vue/vue-best-practices/references/render-functions.md +201 -0
- package/skills/vue/vue-best-practices/references/sfc.md +310 -0
- package/skills/vue/vue-best-practices/references/state-management.md +135 -0
- package/skills/vue/vue-best-practices/references/updated-hook-performance.md +187 -0
- package/skills/vue/vue-debug-guides/SKILL.md +202 -0
- package/skills/vue/vue-debug-guides/reference/animation-key-for-rerender.md +160 -0
- package/skills/vue/vue-debug-guides/reference/animation-transitiongroup-performance.md +241 -0
- package/skills/vue/vue-debug-guides/reference/async-component-error-handling.md +115 -0
- package/skills/vue/vue-debug-guides/reference/async-component-keepalive-ref-issue.md +112 -0
- package/skills/vue/vue-debug-guides/reference/async-component-suspense-control.md +84 -0
- package/skills/vue/vue-debug-guides/reference/async-component-vue-router.md +109 -0
- package/skills/vue/vue-debug-guides/reference/attrs-event-listener-merging.md +205 -0
- package/skills/vue/vue-debug-guides/reference/checkbox-true-false-value-form-submission.md +118 -0
- package/skills/vue/vue-debug-guides/reference/cleanup-side-effects.md +172 -0
- package/skills/vue/vue-debug-guides/reference/click-events-on-components.md +180 -0
- package/skills/vue/vue-debug-guides/reference/component-naming-conflicts.md +159 -0
- package/skills/vue/vue-debug-guides/reference/component-ref-requires-defineexpose.md +176 -0
- package/skills/vue/vue-debug-guides/reference/composable-avoid-hidden-side-effects.md +208 -0
- package/skills/vue/vue-debug-guides/reference/composable-call-location-restrictions.md +141 -0
- package/skills/vue/vue-debug-guides/reference/composable-naming-return-pattern.md +139 -0
- package/skills/vue/vue-debug-guides/reference/composable-tovalue-inside-watcheffect.md +182 -0
- package/skills/vue/vue-debug-guides/reference/composition-api-not-functional-programming.md +120 -0
- package/skills/vue/vue-debug-guides/reference/composition-api-script-setup-async-context.md +203 -0
- package/skills/vue/vue-debug-guides/reference/composition-api-vs-react-hooks-differences.md +156 -0
- package/skills/vue/vue-debug-guides/reference/computed-array-mutation.md +148 -0
- package/skills/vue/vue-debug-guides/reference/computed-conditional-dependencies.md +147 -0
- package/skills/vue/vue-debug-guides/reference/computed-no-parameters.md +159 -0
- package/skills/vue/vue-debug-guides/reference/computed-no-side-effects.md +107 -0
- package/skills/vue/vue-debug-guides/reference/computed-return-value-readonly.md +160 -0
- package/skills/vue/vue-debug-guides/reference/configure-app-before-mount.md +89 -0
- package/skills/vue/vue-debug-guides/reference/declare-emits-for-documentation.md +212 -0
- package/skills/vue/vue-debug-guides/reference/define-expose-before-await.md +192 -0
- package/skills/vue/vue-debug-guides/reference/define-model-default-value-sync.md +139 -0
- package/skills/vue/vue-debug-guides/reference/defineEmits-must-be-top-level.md +164 -0
- package/skills/vue/vue-debug-guides/reference/defineEmits-no-runtime-and-type-mixed.md +170 -0
- package/skills/vue/vue-debug-guides/reference/definemodel-object-mutation-no-emit.md +148 -0
- package/skills/vue/vue-debug-guides/reference/dom-update-timing-nexttick.md +90 -0
- package/skills/vue/vue-debug-guides/reference/dynamic-argument-constraints.md +146 -0
- package/skills/vue/vue-debug-guides/reference/dynamic-component-registration-vite.md +147 -0
- package/skills/vue/vue-debug-guides/reference/event-modifier-order-matters.md +101 -0
- package/skills/vue/vue-debug-guides/reference/exact-modifier-for-precise-shortcuts.md +155 -0
- package/skills/vue/vue-debug-guides/reference/fallthrough-attrs-overwrite-vue3.md +159 -0
- package/skills/vue/vue-debug-guides/reference/in-dom-template-parsing-caveats.md +149 -0
- package/skills/vue/vue-debug-guides/reference/inheritattrs-false-for-wrapper-components.md +230 -0
- package/skills/vue/vue-debug-guides/reference/keepalive-router-nested-double-mount.md +222 -0
- package/skills/vue/vue-debug-guides/reference/keepalive-transition-memory-leak.md +144 -0
- package/skills/vue/vue-debug-guides/reference/keyup-modifier-timing.md +137 -0
- package/skills/vue/vue-debug-guides/reference/lifecycle-dom-access-timing.md +216 -0
- package/skills/vue/vue-debug-guides/reference/lifecycle-hooks-synchronous-registration.md +156 -0
- package/skills/vue/vue-debug-guides/reference/lifecycle-ssr-awareness.md +184 -0
- package/skills/vue/vue-debug-guides/reference/local-components-not-in-descendants.md +151 -0
- package/skills/vue/vue-debug-guides/reference/mount-return-value.md +88 -0
- package/skills/vue/vue-debug-guides/reference/multi-root-component-class-attrs.md +93 -0
- package/skills/vue/vue-debug-guides/reference/native-event-collision-with-emits.md +162 -0
- package/skills/vue/vue-debug-guides/reference/no-passive-with-prevent.md +141 -0
- package/skills/vue/vue-debug-guides/reference/no-v-if-with-v-for.md +136 -0
- package/skills/vue/vue-debug-guides/reference/perf-computed-object-stability.md +157 -0
- package/skills/vue/vue-debug-guides/reference/perf-props-stability-update-optimization.md +140 -0
- package/skills/vue/vue-debug-guides/reference/plugin-global-properties-sparingly.md +109 -0
- package/skills/vue/vue-debug-guides/reference/plugin-install-before-mount.md +124 -0
- package/skills/vue/vue-debug-guides/reference/plugin-prefer-provide-inject-over-global-properties.md +120 -0
- package/skills/vue/vue-debug-guides/reference/plugin-typescript-type-augmentation.md +157 -0
- package/skills/vue/vue-debug-guides/reference/prop-defineprops-scope-limitation.md +161 -0
- package/skills/vue/vue-debug-guides/reference/provide-inject-debugging-challenges.md +203 -0
- package/skills/vue/vue-debug-guides/reference/provide-inject-default-value-factory.md +244 -0
- package/skills/vue/vue-debug-guides/reference/provide-inject-reactivity-not-automatic.md +226 -0
- package/skills/vue/vue-debug-guides/reference/provide-inject-synchronous-setup.md +235 -0
- package/skills/vue/vue-debug-guides/reference/reactive-destructuring.md +89 -0
- package/skills/vue/vue-debug-guides/reference/reactivity-debugging-hooks.md +132 -0
- package/skills/vue/vue-debug-guides/reference/reactivity-markraw-for-non-reactive.md +149 -0
- package/skills/vue/vue-debug-guides/reference/reactivity-proxy-identity-hazard.md +96 -0
- package/skills/vue/vue-debug-guides/reference/reactivity-same-tick-batching.md +166 -0
- package/skills/vue/vue-debug-guides/reference/ref-value-access.md +61 -0
- package/skills/vue/vue-debug-guides/reference/refs-in-collections-need-value.md +81 -0
- package/skills/vue/vue-debug-guides/reference/render-function-avoid-internal-vnode-properties.md +151 -0
- package/skills/vue/vue-debug-guides/reference/render-function-vnodes-must-be-unique.md +133 -0
- package/skills/vue/vue-debug-guides/reference/rendering-render-function-h-import-vue3.md +148 -0
- package/skills/vue/vue-debug-guides/reference/rendering-render-function-return-from-setup.md +148 -0
- package/skills/vue/vue-debug-guides/reference/rendering-render-function-slots-as-functions.md +168 -0
- package/skills/vue/vue-debug-guides/reference/rendering-resolve-component-for-string-names.md +231 -0
- package/skills/vue/vue-debug-guides/reference/select-initial-value-ios-bug.md +91 -0
- package/skills/vue/vue-debug-guides/reference/self-referencing-component-name.md +157 -0
- package/skills/vue/vue-debug-guides/reference/sfc-named-exports-forbidden.md +184 -0
- package/skills/vue/vue-debug-guides/reference/sfc-scoped-css-child-component-styling.md +156 -0
- package/skills/vue/vue-debug-guides/reference/sfc-scoped-css-dynamic-content.md +193 -0
- package/skills/vue/vue-debug-guides/reference/sfc-scoped-css-slot-content.md +242 -0
- package/skills/vue/vue-debug-guides/reference/sfc-script-setup-reactivity.md +195 -0
- package/skills/vue/vue-debug-guides/reference/slot-forwarding-to-child-components.md +143 -0
- package/skills/vue/vue-debug-guides/reference/slot-implicit-default-content.md +155 -0
- package/skills/vue/vue-debug-guides/reference/slot-name-reserved-prop.md +109 -0
- package/skills/vue/vue-debug-guides/reference/slot-named-scoped-explicit-default.md +95 -0
- package/skills/vue/vue-debug-guides/reference/slot-render-scope-parent-only.md +135 -0
- package/skills/vue/vue-debug-guides/reference/slot-v-slot-on-components-or-templates-only.md +122 -0
- package/skills/vue/vue-debug-guides/reference/ssr-hydration-mismatch-causes.md +280 -0
- package/skills/vue/vue-debug-guides/reference/ssr-platform-specific-apis.md +256 -0
- package/skills/vue/vue-debug-guides/reference/state-ssr-cross-request-pollution.md +276 -0
- package/skills/vue/vue-debug-guides/reference/suspense-no-builtin-error-handling.md +127 -0
- package/skills/vue/vue-debug-guides/reference/suspense-ssr-hydration-issues.md +159 -0
- package/skills/vue/vue-debug-guides/reference/tailwind-dynamic-class-generation.md +144 -0
- package/skills/vue/vue-debug-guides/reference/teleport-scoped-styles-limitation.md +191 -0
- package/skills/vue/vue-debug-guides/reference/teleport-ssr-hydration.md +152 -0
- package/skills/vue/vue-debug-guides/reference/teleport-target-must-exist.md +113 -0
- package/skills/vue/vue-debug-guides/reference/template-expressions-restrictions.md +114 -0
- package/skills/vue/vue-debug-guides/reference/template-functions-no-side-effects.md +187 -0
- package/skills/vue/vue-debug-guides/reference/template-ref-null-with-v-if.md +123 -0
- package/skills/vue/vue-debug-guides/reference/template-ref-unwrapping-top-level.md +104 -0
- package/skills/vue/vue-debug-guides/reference/template-ref-v-for-order.md +172 -0
- package/skills/vue/vue-debug-guides/reference/textarea-no-interpolation.md +72 -0
- package/skills/vue/vue-debug-guides/reference/transition-group-flip-inline-elements.md +152 -0
- package/skills/vue/vue-debug-guides/reference/transition-group-move-animation-position-absolute.md +130 -0
- package/skills/vue/vue-debug-guides/reference/transition-group-no-default-wrapper-vue3.md +152 -0
- package/skills/vue/vue-debug-guides/reference/transition-js-hooks-done-callback.md +251 -0
- package/skills/vue/vue-debug-guides/reference/transition-nested-duration.md +182 -0
- package/skills/vue/vue-debug-guides/reference/transition-reusable-scoped-style.md +245 -0
- package/skills/vue/vue-debug-guides/reference/transition-router-view-appear.md +193 -0
- package/skills/vue/vue-debug-guides/reference/transition-type-when-mixed.md +172 -0
- package/skills/vue/vue-debug-guides/reference/transition-unmount-hook-timing.md +149 -0
- package/skills/vue/vue-debug-guides/reference/ts-defineprops-boolean-default-false.md +225 -0
- package/skills/vue/vue-debug-guides/reference/ts-defineprops-imported-types-limitations.md +281 -0
- package/skills/vue/vue-debug-guides/reference/ts-event-handler-explicit-typing.md +213 -0
- package/skills/vue/vue-debug-guides/reference/ts-reactive-no-generic-argument.md +196 -0
- package/skills/vue/vue-debug-guides/reference/ts-shallowref-for-dynamic-components.md +218 -0
- package/skills/vue/vue-debug-guides/reference/ts-template-ref-null-handling.md +249 -0
- package/skills/vue/vue-debug-guides/reference/ts-template-type-casting.md +214 -0
- package/skills/vue/vue-debug-guides/reference/ts-withdefaults-mutable-factory-function.md +171 -0
- package/skills/vue/vue-debug-guides/reference/undeclared-emits-double-firing.md +195 -0
- package/skills/vue/vue-debug-guides/reference/use-template-ref-vue35.md +158 -0
- package/skills/vue/vue-debug-guides/reference/v-else-must-follow-v-if.md +136 -0
- package/skills/vue/vue-debug-guides/reference/v-for-component-props.md +95 -0
- package/skills/vue/vue-debug-guides/reference/v-for-computed-reverse-sort.md +86 -0
- package/skills/vue/vue-debug-guides/reference/v-for-key-attribute.md +90 -0
- package/skills/vue/vue-debug-guides/reference/v-for-range-starts-at-one.md +66 -0
- package/skills/vue/vue-debug-guides/reference/v-if-null-check-order.md +171 -0
- package/skills/vue/vue-debug-guides/reference/v-model-ignores-html-attributes.md +83 -0
- package/skills/vue/vue-debug-guides/reference/v-model-ime-composition.md +83 -0
- package/skills/vue/vue-debug-guides/reference/v-model-number-modifier-behavior.md +124 -0
- package/skills/vue/vue-debug-guides/reference/v-show-template-limitation.md +124 -0
- package/skills/vue/vue-debug-guides/reference/watch-async-cleanup.md +180 -0
- package/skills/vue/vue-debug-guides/reference/watch-async-creation-memory-leak.md +176 -0
- package/skills/vue/vue-debug-guides/reference/watch-deep-same-object-reference.md +165 -0
- package/skills/vue/vue-debug-guides/reference/watch-flush-timing.md +189 -0
- package/skills/vue/vue-debug-guides/reference/watch-reactive-property-getter.md +108 -0
- package/skills/vue/vue-debug-guides/reference/watcheffect-async-dependency-tracking.md +173 -0
- package/skills/vue/vue-debug-guides/reference/watcheffect-flush-post-for-refs.md +176 -0
- package/skills/vue/vue-jsx-best-practices/SKILL.md +12 -0
- package/skills/vue/vue-jsx-best-practices/reference/render-function-jsx-vue-vs-react.md +141 -0
- package/skills/vue/vue-options-api-best-practices/SKILL.md +23 -0
- package/skills/vue/vue-options-api-best-practices/reference/no-arrow-functions-in-lifecycle-hooks.md +95 -0
- package/skills/vue/vue-options-api-best-practices/reference/no-arrow-functions-in-methods.md +68 -0
- package/skills/vue/vue-options-api-best-practices/reference/stateful-methods-lifecycle.md +61 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-arrow-functions-validators.md +141 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-computed-return-types.md +192 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-proptype-complex-types.md +212 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-provide-inject-limitations.md +135 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-type-event-handlers.md +202 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-options-api-use-definecomponent.md +172 -0
- package/skills/vue/vue-options-api-best-practices/reference/ts-strict-mode-options-api.md +197 -0
- package/skills/vue/vue-pinia-best-practices/SKILL.md +21 -0
- package/skills/vue/vue-pinia-best-practices/reference/pinia-no-active-pinia-error.md +248 -0
- package/skills/vue/vue-pinia-best-practices/reference/pinia-setup-store-return-all-state.md +227 -0
- package/skills/vue/vue-pinia-best-practices/reference/pinia-store-destructuring-breaks-reactivity.md +193 -0
- package/skills/vue/vue-pinia-best-practices/reference/state-url-for-ephemeral-filters.md +238 -0
- package/skills/vue/vue-pinia-best-practices/reference/state-use-pinia-for-large-apps.md +262 -0
- package/skills/vue/vue-pinia-best-practices/reference/store-method-binding-parentheses.md +191 -0
- package/skills/vue/vue-router-best-practices/SKILL.md +23 -0
- package/skills/vue/vue-router-best-practices/reference/router-beforeenter-no-param-trigger.md +167 -0
- package/skills/vue/vue-router-best-practices/reference/router-beforerouteenter-no-this.md +176 -0
- package/skills/vue/vue-router-best-practices/reference/router-guard-async-await-pattern.md +227 -0
- package/skills/vue/vue-router-best-practices/reference/router-navigation-guard-infinite-loop.md +187 -0
- package/skills/vue/vue-router-best-practices/reference/router-navigation-guard-next-deprecated.md +150 -0
- package/skills/vue/vue-router-best-practices/reference/router-param-change-no-lifecycle.md +181 -0
- package/skills/vue/vue-router-best-practices/reference/router-simple-routing-cleanup.md +209 -0
- package/skills/vue/vue-router-best-practices/reference/router-use-vue-router-for-production.md +183 -0
- package/skills/vue/vue-testing-best-practices/SKILL.md +29 -0
- package/skills/vue/vue-testing-best-practices/reference/async-component-testing.md +163 -0
- package/skills/vue/vue-testing-best-practices/reference/teleport-testing-complexity.md +158 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-async-await-flushpromises.md +175 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-browser-vs-node-runners.md +208 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-component-blackbox-approach.md +144 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-composables-helper-wrapper.md +238 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-e2e-playwright-recommended.md +242 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-no-snapshot-only.md +197 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-pinia-store-setup.md +228 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-suspense-async-components.md +229 -0
- package/skills/vue/vue-testing-best-practices/reference/testing-vitest-recommended-for-vue.md +204 -0
- package/skills/worker/README.md +10 -0
- package/skills/worker/caveman/README.md +48 -0
- package/skills/worker/caveman/SKILL.md +88 -0
- package/skills/worker/ponytail/SKILL.md +120 -0
- package/skills-lock.json +131 -0
- package/templates/state.md +16 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Frontend Design
|
|
8
|
+
|
|
9
|
+
Approach this as the design lead at a design studio known for giving every client a distinct visual identity that is not mistaken for anyone else's. This client has already rejected proposals that felt cliché or templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take aesthetic risk if justified.
|
|
10
|
+
|
|
11
|
+
## Ground your designs in the subject matter
|
|
12
|
+
|
|
13
|
+
If the brief does not identify what the product or subject matter is, identify it yourself before designing, and confirm with the client. You can come up with one concrete subject, the design's audience, and the design's primary job, as a proposal. If there's any information in your memory about the client's preferences or context about what they're building, use that as a hint. The subject's industry, subject matter, materials, and vernacular are where distinctive visual choices come from — a design for a toy for girls aged 8–11 will be very aesthetically different from a dashboard for financial analysts. Build with the brief's real content and subject matter throughout.
|
|
14
|
+
|
|
15
|
+
## Design principles
|
|
16
|
+
|
|
17
|
+
For web designs, the hero is the first thing viewers will see. Open with the most characteristic thing in the subject's world, in the form that is most appropriate: a headline, an image, an animation, a live demo, an interactive moment, or other treatments. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the default treatment, so only use it if that's truly the best option.
|
|
18
|
+
|
|
19
|
+
Typography carries the personality of the page. You don't need a different typeface for display or headline text and body content: use one family or two, and if two, make them clearly distinct.
|
|
20
|
+
|
|
21
|
+
Choose your typefaces deliberately, not the default families you would reach for on any other project, and set a clear type scale following the default guidance of The Elements of Typographic Style with intentional weights, widths, and spacing. When type is used as a headline or visual element, use the type treatment itself as an active part of the design, not a neutral delivery vehicle for the content.
|
|
22
|
+
|
|
23
|
+
Default to line lengths of less than 80 characters. Serif typefaces can have slightly longer line lengths; give serif body text slightly more line-height than a sans-serif.
|
|
24
|
+
|
|
25
|
+
Avoid these default typographic treatments; they are the commonest tells of a generated page:
|
|
26
|
+
- Accenting just a single word or phrase in a headline, like putting one word in italic/bold or a different color.
|
|
27
|
+
- Using all caps for labels.
|
|
28
|
+
- Adding unnecessary typographic labels above content.
|
|
29
|
+
|
|
30
|
+
Visual structure is information. Structural devices like outlines, borders, numbering, eyebrows, dividers, labels, etc., encode useful information about the content rather than decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence — like a stepped process or a timeline. Before adding numbered markers, check the content really is a sequence.
|
|
31
|
+
|
|
32
|
+
Use non-user-triggered motion sparingly and deliberately, only to draw attention. A single orchestrated moment — one page-load sequence or one reveal — lands better than scattered effects; fade-and-slide-up entrances on each section and hover transitions on every card are the generic default and read as AI-generated. Motion that answers a person's action (opening, expanding, confirming) is welcome when it shows what changed.
|
|
33
|
+
|
|
34
|
+
Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy and placeholder content. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance.
|
|
35
|
+
|
|
36
|
+
## Process: plan, review against the brief, build, critique
|
|
37
|
+
|
|
38
|
+
For calibration, AI-generated design right now clusters around some traits:
|
|
39
|
+
1. a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta or warm-clay accent (often near #D97757 — Anthropic's own Claude-interaction accent, so on a user's brief it reads as a tell);
|
|
40
|
+
2. a near-black background with a single bright acid-green or vermilion accent;
|
|
41
|
+
3. a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns;
|
|
42
|
+
4. the SaaS-card kit: content chopped into identical rounded cards, one border-radius on everything regardless of hierarchy, the same soft grey shadow (rgba(0,0,0,.1)) under each, and gradient washes as decoration;
|
|
43
|
+
5. template chrome that appears whatever the subject: a tracked-out ALL-CAPS eyebrow label above every heading; meta strings joined with middle dots ('A · B · C'); labels built as 'WORD — fragment' with a spaced em dash; tinted near-black (#0B0B0B, #111) standing in for black; a monospace face for small data labels; a '→' appended to link and button text.
|
|
44
|
+
|
|
45
|
+
All traits are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. As with a hired human designer, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn.
|
|
46
|
+
|
|
47
|
+
Work in two passes. First, brainstorm a short design plan based on the client's design brief: create a compact token system with color, type, layout, and principles.
|
|
48
|
+
- Color: describe the core base palette as 4–6 named hex values.
|
|
49
|
+
- Type: the typefaces and their roles.
|
|
50
|
+
- Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Include alignment guidance; should the content be left aligned, center aligned, justified?
|
|
51
|
+
- Principles: the high-level guidance for what makes this page unique.
|
|
52
|
+
|
|
53
|
+
Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan.
|
|
54
|
+
|
|
55
|
+
When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and an element-based selector like .cta). This can happen often with padding/margin between sections.
|
|
56
|
+
|
|
57
|
+
## Restraint and self-critique
|
|
58
|
+
|
|
59
|
+
Spend your boldness in one place. Let one element be the memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected, visually accessible, harmonious color palettes. Critique your own work as you build, taking screenshots to review if your environment supports it — a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creatives have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes.
|
|
60
|
+
|
|
61
|
+
## More on writing in design
|
|
62
|
+
|
|
63
|
+
Words appear in a design for one reason: to make it easier to understand and use. They are design content, not decoration. Bring the same intentionality and minimalism to copywriting that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience.
|
|
64
|
+
|
|
65
|
+
Write from the end user's perspective. Name things by what users will understand in simple language, not by how the system is built. A user manages notifications, not webhook config. Describe what something is or does in plain terms rather than selling it. Being specific and legible to new users is always better than being clever.
|
|
66
|
+
|
|
67
|
+
Use active voice as default. A CTA says exactly what happens when it is used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around.
|
|
68
|
+
|
|
69
|
+
Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act.
|
|
70
|
+
|
|
71
|
+
Keep the tone conversational: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each written element do exactly one job.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-design-guidelines
|
|
3
|
+
description: Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
|
|
4
|
+
metadata:
|
|
5
|
+
author: vercel
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
argument-hint: <file-or-pattern>
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Web Interface Guidelines
|
|
11
|
+
|
|
12
|
+
Review files for compliance with Web Interface Guidelines.
|
|
13
|
+
|
|
14
|
+
## How It Works
|
|
15
|
+
|
|
16
|
+
1. Fetch the latest guidelines from the source URL below
|
|
17
|
+
2. Read the specified files (or prompt user for files/pattern)
|
|
18
|
+
3. Check against all rules in the fetched guidelines
|
|
19
|
+
4. Output findings in the terse `file:line` format
|
|
20
|
+
|
|
21
|
+
## Guidelines Source
|
|
22
|
+
|
|
23
|
+
Fetch fresh guidelines before each review:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions.
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
When a user provides a file or pattern argument:
|
|
34
|
+
1. Fetch guidelines from the source URL above
|
|
35
|
+
2. Read the specified files
|
|
36
|
+
3. Apply all rules from the fetched guidelines
|
|
37
|
+
4. Output findings using the format specified in the guidelines
|
|
38
|
+
|
|
39
|
+
If no files specified, ask the user which files to review.
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-qa-review
|
|
3
|
+
description: >-
|
|
4
|
+
Review EXISTING test code for quality, smells, and testability issues. Detects
|
|
5
|
+
test smells across six dimensions — readability, reliability, diagnostic value,
|
|
6
|
+
design, AI-generated, and coverage — analyzes testability of application code,
|
|
7
|
+
and backs the qualitative smells with mutation testing.
|
|
8
|
+
Use when: "review my tests," "test quality audit," "test smells," "testability
|
|
9
|
+
analysis," "are these tests any good." Not for: generating new tests — use
|
|
10
|
+
`ai-test-generation`. Not for: testing AI features in your product — use
|
|
11
|
+
`ai-system-testing`.
|
|
12
|
+
Related: unit-testing, shift-left-testing, coverage-analysis, ai-test-generation.
|
|
13
|
+
license: MIT
|
|
14
|
+
metadata:
|
|
15
|
+
author: kindlmann
|
|
16
|
+
version: "2.0"
|
|
17
|
+
category: ai-qa
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<objective>
|
|
21
|
+
QA-focused code review that detects test smells, analyzes testability of application code, and identifies coverage gaps. A test that asserts `toBe(true)` and a 95%-coverage suite that only feeds happy-path input both look green and both hide bugs — this skill names the smell, cites the line, and converts "looks fine" into a mutation-score gate.
|
|
22
|
+
|
|
23
|
+
**Before starting:** Check for `.agents/qa-project-context.md` in the project root. It contains test framework conventions, naming patterns, and project-specific quality standards that calibrate review feedback.
|
|
24
|
+
</objective>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Quick Route
|
|
29
|
+
|
|
30
|
+
Three distinct entry paths. Pick the row, then jump to the named section.
|
|
31
|
+
|
|
32
|
+
| Situation | Path | Jump to |
|
|
33
|
+
|-----------|------|---------|
|
|
34
|
+
| PR with changed test files | Run the changed files, score them, check the diff against the PR checklist | **Verification** → **PR Review Checklist** |
|
|
35
|
+
| Whole suite needs a health pass | Quantify, sample, find the 3-5 systemic smells, propose lint/mutation gates | **Batch Audit Process** |
|
|
36
|
+
| Application code, "why is this hard to test?" | Flag DI / side-effect / pure-function / interface problems with before/after | **Testability Analysis** |
|
|
37
|
+
|
|
38
|
+
All three share the same smell vocabulary (the six buckets below) and the same Verification commands.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Discovery Questions
|
|
43
|
+
|
|
44
|
+
First, read `.agents/qa-project-context.md` if present and skip any question it already answers.
|
|
45
|
+
|
|
46
|
+
1. **Review scope:** Reviewing test code for quality, application code for testability, or both? Each triggers a different Quick Route path.
|
|
47
|
+
2. **Framework conventions:** What test framework (Jest, Vitest, Playwright, pytest)? Conventions differ — `describe/it` nesting, fixture usage, assertion style — and the Verification commands are per-framework.
|
|
48
|
+
3. **PR review or batch audit?** A PR review runs and scores only the changed files. A batch audit scans the entire suite for systemic patterns.
|
|
49
|
+
4. **Existing quality standards:** Does the team have documented test conventions? Check for `.eslintrc` test rules, `CONTRIBUTING.md` test guidelines, or a test style guide.
|
|
50
|
+
5. **Known pain points:** Recurring flaky tests, slow suites, unclear failures? These prioritize which smells to focus on first.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Core Principles
|
|
55
|
+
|
|
56
|
+
1. **Test code is production code.** Apply the same quality standards: readability, maintainability, single responsibility. Test code that is hard to read is hard to trust.
|
|
57
|
+
|
|
58
|
+
2. **Review what is asserted, not just what is executed.** Coverage proves a line ran; it says nothing about whether a wrong value would be caught. A 95%-coverage suite of `toBeTruthy` assertions catches almost nothing. Mutation score (see **Verification**) measures the thing coverage can't.
|
|
59
|
+
|
|
60
|
+
3. **Testability review prevents test debt.** Reviewing application code for testability catches design problems before they force awkward test workarounds. If code is hard to test, it is usually hard to maintain.
|
|
61
|
+
|
|
62
|
+
4. **Codify patterns, not just knowledge.** Turn recurring review feedback into lint rules, custom ESLint plugins, or shared fixtures. Reviews that repeat the same feedback indicate missing automation.
|
|
63
|
+
|
|
64
|
+
5. **Smells are symptoms, not verdicts.** A test smell indicates a potential problem; context decides whether it is actually harmful. A long test for a complex workflow may be appropriate. A mock-heavy test for a boundary may be correct.
|
|
65
|
+
|
|
66
|
+
6. **Actionable feedback only.** Every review comment must include what is wrong, why it matters, and how to fix it. "This test is bad" is not actionable. "This test uses sleep-based waiting which causes flakiness — replace with an explicit wait condition" is.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Test Smell Buckets
|
|
71
|
+
|
|
72
|
+
Six dimensions. Each smell is categorized by the dimension it affects and links to a specific review action. Full SMELL/FIX code for every catalogued smell lives in `references/smell-examples.md` — keep the inline pointers prominent; the before/after code is the load-bearing part.
|
|
73
|
+
|
|
74
|
+
### Readability Smells
|
|
75
|
+
|
|
76
|
+
Problems that make tests hard to understand at a glance.
|
|
77
|
+
|
|
78
|
+
#### Obscure Setup
|
|
79
|
+
|
|
80
|
+
**What it looks like:** 30+ lines of object construction with irrelevant fields drowning the test intent. The reader cannot tell which fields matter for the assertion.
|
|
81
|
+
|
|
82
|
+
**Fix:** Extract to factories. Only test-relevant data should appear in the test body: `buildOrder({ items: [buildItem({ weight: 2.5, quantity: 2 })] })` instead of constructing full user/product/order objects inline.
|
|
83
|
+
|
|
84
|
+
**Review action:** Request factory extraction.
|
|
85
|
+
|
|
86
|
+
#### Mystery Guest
|
|
87
|
+
|
|
88
|
+
**What it looks like:** `loadFixture('report.json')` — the test depends on external data the reader cannot see. They must open another file to understand the assertion.
|
|
89
|
+
|
|
90
|
+
**Fix:** Inline the test-relevant data or use descriptively named fixtures. The reader should understand the test without opening other files.
|
|
91
|
+
|
|
92
|
+
**Review action:** Request inline data or descriptive fixture names.
|
|
93
|
+
|
|
94
|
+
#### Duplicate Assertions
|
|
95
|
+
|
|
96
|
+
**What it looks like:** Multiple tests assert the same behavior with varying specificity (`toBe('Alice')`, `toHaveProperty('name')`, `toBeDefined()`). Three tests, one behavior.
|
|
97
|
+
|
|
98
|
+
**Review action:** Request consolidation. Keep the most specific assertion. Redundant tests increase maintenance cost without increasing confidence.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### Reliability Smells
|
|
103
|
+
|
|
104
|
+
Problems that cause tests to fail intermittently or in unexpected environments.
|
|
105
|
+
|
|
106
|
+
#### Sleep-Based Waiting
|
|
107
|
+
|
|
108
|
+
**What it looks like:** `setTimeout`, `sleep()`, `waitForTimeout()` used for synchronization. See `references/smell-examples.md` for the SMELL/FIX pair (replace `waitForTimeout` with an explicit `toBeVisible` wait).
|
|
109
|
+
|
|
110
|
+
**Review action:** Reject. Sleep-based waiting is never acceptable. Require explicit wait conditions.
|
|
111
|
+
|
|
112
|
+
#### Order Dependency
|
|
113
|
+
|
|
114
|
+
**What it looks like:** Tests pass when run together but fail in isolation or different order. See `references/smell-examples.md` for the SMELL/FIX pair (each test creating its own preconditions).
|
|
115
|
+
|
|
116
|
+
**Review action:** Request data isolation. Each test must create its own preconditions.
|
|
117
|
+
|
|
118
|
+
#### External Service Coupling
|
|
119
|
+
|
|
120
|
+
**What it looks like:** Tests call real external APIs (payment gateways, email providers, third-party services). See `references/smell-examples.md` for the SMELL/FIX pair (mocking the service boundary).
|
|
121
|
+
|
|
122
|
+
**Review action:** Request mock or fake at the service boundary. External calls belong in integration/contract tests, not unit tests.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### Diagnostic Smells
|
|
127
|
+
|
|
128
|
+
Problems that make test failures hard to understand and debug.
|
|
129
|
+
|
|
130
|
+
#### Weak Assertion Messages
|
|
131
|
+
|
|
132
|
+
**What it looks like:** Assertion fails with no context about what was expected or why. See `references/smell-examples.md` for the SMELL/FIX pair (replacing `toBe(true)` with specific assertions like `expect(result.errors).toEqual([])` that surface the offending value).
|
|
133
|
+
|
|
134
|
+
**Review action:** Request stronger assertions with diagnostic value. The failure message should explain the problem without reading the test source.
|
|
135
|
+
|
|
136
|
+
#### Multiple Failure Causes Per Test
|
|
137
|
+
|
|
138
|
+
**What it looks like:** A single test covers multiple independent behaviors. When it fails, you do not know which behavior broke. See `references/smell-examples.md` for the SMELL/FIX pair (splitting a lifecycle test into one-behavior-per-test).
|
|
139
|
+
|
|
140
|
+
**Review action:** Request test splitting. Each test should have one reason to fail.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### Design Smells
|
|
145
|
+
|
|
146
|
+
Problems in test architecture that increase maintenance cost.
|
|
147
|
+
|
|
148
|
+
#### Conditional Test Logic
|
|
149
|
+
|
|
150
|
+
**What it looks like:** `if/else`, `switch`, ternaries, or `for` loops inside test bodies. Branching logic in a test is itself untested — you cannot tell which cases actually ran. See `references/smell-examples.md` for the SMELL/FIX pair (converting a branching loop into `it.each`).
|
|
151
|
+
|
|
152
|
+
**Review action:** Request parameterized tests (`it.each` / `test.each`). Conditional logic in tests hides which cases are actually verified.
|
|
153
|
+
|
|
154
|
+
#### Giant Fixtures
|
|
155
|
+
|
|
156
|
+
**What it looks like:** A `beforeEach` or fixture that sets up 20+ objects for every test, even though each test uses 2-3 of them. See `references/smell-examples.md` for the SMELL/FIX pair (replacing a monolithic `beforeEach` with per-test inline setup).
|
|
157
|
+
|
|
158
|
+
**Review action:** Request inline setup. Move shared setup to factories, not monolithic `beforeEach` blocks.
|
|
159
|
+
|
|
160
|
+
#### Over-Mocking
|
|
161
|
+
|
|
162
|
+
**What it looks like:** Every collaborator is mocked, including simple value objects and pure functions. See `references/smell-examples.md` for the SMELL/FIX pair (dropping a mock of the very function under test).
|
|
163
|
+
|
|
164
|
+
**Review action:** Request removal of unnecessary mocks. Mock boundaries, not internals.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### AI-Generated Test Smells
|
|
169
|
+
|
|
170
|
+
When the test code came from a coding agent (Claude Code, Codex, Cursor, Copilot), the smell taxonomy is the same — but a few signature failures recur often enough to deserve their own pass.
|
|
171
|
+
|
|
172
|
+
| Smell | Detection |
|
|
173
|
+
|-------|-----------|
|
|
174
|
+
| **Hallucinated locator** | Run the test against a real page once. If the locator never matches, the LLM invented a `data-testid` that doesn't exist. |
|
|
175
|
+
| **Fabricated import** | Static-check every imported symbol — does the file or package actually export it? LLMs invent plausible APIs (`@testing-library/something-that-doesnt-exist`). |
|
|
176
|
+
| **Generic test data** | `example.com`, `test@test.com`, `Lorem ipsum`, `John Doe` — boilerplate the agent generated because it had no project-specific factory. Replace with the project's data factory. |
|
|
177
|
+
| **Closed AI loop** | Both implementation *and* tests authored by the same agent in the same session. The tests just describe what the agent produced; they don't constrain it. Pair the agent's tests with at least one human-authored boundary test, or use TDD (test-first) per `shift-left-testing`. A low mutation score (see **Verification**) is the objective tell. |
|
|
178
|
+
| **Project-convention drift** | Page Object, fixture, naming, or assertion style different from the rest of the suite. AI-generated code rarely matches local conventions out of the box. |
|
|
179
|
+
|
|
180
|
+
For first-time test generation patterns and the Step-7 review checklist, cross-link `ai-test-generation`. For AI-system *eval suites* (the equivalent of ESLint for prompts), wire each tool's CLI runner — `promptfoo eval`, `deepeval test run` (Apache 2.0), Ragas `ragas evaluate` / experiments (Apache 2.0) — as quality gates parallel to your test runner.
|
|
181
|
+
|
|
182
|
+
> **Promptfoo ownership note:** Promptfoo was acquired by OpenAI (announced 9 Mar 2026). The core stays MIT-licensed, open source, and model-agnostic; red-team capabilities are being folded into OpenAI Frontier. `promptfoo eval` is still the correct quality-gate command — just expect the vendor to be OpenAI going forward.
|
|
183
|
+
|
|
184
|
+
### Coverage Smells
|
|
185
|
+
|
|
186
|
+
Problems that leave gaps in what is verified.
|
|
187
|
+
|
|
188
|
+
#### Happy Path Only
|
|
189
|
+
|
|
190
|
+
**What it looks like:** Every test provides valid input and expects success. No error paths tested. See `references/smell-examples.md` for the SMELL/FIX pair (adding zero, max, negative, and boundary cases to a discount calculator).
|
|
191
|
+
|
|
192
|
+
**Review action:** Request missing scenarios. Use the BOUNDARY framework: Boundary values, Null/empty, Duplicates, Ordering, Range limits.
|
|
193
|
+
|
|
194
|
+
#### Missing Boundary Cases
|
|
195
|
+
|
|
196
|
+
**What it looks like:** Tests for "normal" values (5 items) but not for 0, 1, max, or max+1. Use `it.each` to cover boundaries explicitly: empty collection, single item, exact page size, one over, large set.
|
|
197
|
+
|
|
198
|
+
**Review action:** Request boundary tests. Every numeric parameter, string length, and collection size has boundaries to test.
|
|
199
|
+
|
|
200
|
+
#### Missing Error/Negative Cases
|
|
201
|
+
|
|
202
|
+
**What it looks like:** No tests for what happens when things go wrong — network failures, invalid input, permission denied, concurrent modification.
|
|
203
|
+
|
|
204
|
+
**Review action:** For each happy path test, ask: "What is the corresponding failure mode?" Request tests for the failure.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Testability Analysis
|
|
209
|
+
|
|
210
|
+
When reviewing application code, assess whether it is structured for testability. Each subsection has a hard-to-test vs. testable before/after in `references/testability-refactors.md`.
|
|
211
|
+
|
|
212
|
+
### Dependency Injection
|
|
213
|
+
|
|
214
|
+
Flag classes that instantiate dependencies directly (`new PostgresDatabase()`, `new StripeClient()` inside methods). Suggest constructor injection so tests can substitute mocks/fakes. See `references/testability-refactors.md`.
|
|
215
|
+
|
|
216
|
+
### Side Effect Isolation
|
|
217
|
+
|
|
218
|
+
Flag functions that mix pure calculation with I/O (email, logging, analytics). Extract the calculation as a pure function, then call it from the side-effectful orchestrator. See the `calcTotal` before/after in `references/testability-refactors.md`.
|
|
219
|
+
|
|
220
|
+
### Pure Function Extraction
|
|
221
|
+
|
|
222
|
+
Look for validation, transformation, and business rules buried inside request handlers. If logic is inline in `app.post('/api/orders', ...)`, it cannot be unit-tested without spinning up an HTTP server. Extract it as a standalone function. See the `shippingFor` before/after in `references/testability-refactors.md`.
|
|
223
|
+
|
|
224
|
+
### Interface Segregation
|
|
225
|
+
|
|
226
|
+
Flag classes that depend on broad interfaces (entire `PrismaClient`) when they only use 2-3 methods. Suggest a narrow interface with only the methods actually used, making test doubles trivial to implement. See `references/testability-refactors.md`.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Review Workflow
|
|
231
|
+
|
|
232
|
+
### PR Review Checklist
|
|
233
|
+
|
|
234
|
+
For each test file in a PR, check systematically:
|
|
235
|
+
|
|
236
|
+
```markdown
|
|
237
|
+
## Test Quality Review
|
|
238
|
+
|
|
239
|
+
### Readability
|
|
240
|
+
- [ ] Can I understand what each test verifies in under 10 seconds?
|
|
241
|
+
- [ ] Is setup minimal and test-relevant?
|
|
242
|
+
- [ ] Are test names descriptive: "should [behavior] when [condition]"?
|
|
243
|
+
|
|
244
|
+
### Reliability
|
|
245
|
+
- [ ] No sleep/waitForTimeout/setTimeout for synchronization?
|
|
246
|
+
- [ ] No shared mutable state between tests?
|
|
247
|
+
- [ ] No dependency on test execution order?
|
|
248
|
+
- [ ] No calls to real external services?
|
|
249
|
+
|
|
250
|
+
### Diagnostic Value
|
|
251
|
+
- [ ] Will failures produce messages that identify the problem?
|
|
252
|
+
- [ ] Does each test have one reason to fail?
|
|
253
|
+
- [ ] Are assertions specific (not toBeTruthy/toBeDefined)?
|
|
254
|
+
|
|
255
|
+
### Design
|
|
256
|
+
- [ ] No conditional logic (if/else/switch/for) in test bodies?
|
|
257
|
+
- [ ] Fixtures/setup proportional to what each test needs?
|
|
258
|
+
- [ ] Mocking limited to external boundaries?
|
|
259
|
+
- [ ] Parameterized tests (it.each) used for data-driven scenarios?
|
|
260
|
+
|
|
261
|
+
### AI-Generated (if applicable)
|
|
262
|
+
- [ ] Locators verified against a real page (no hallucinated data-testid)?
|
|
263
|
+
- [ ] Imports resolve (no fabricated APIs)?
|
|
264
|
+
- [ ] Project data factory used, not test@test.com / John Doe?
|
|
265
|
+
|
|
266
|
+
### Coverage
|
|
267
|
+
- [ ] Happy path AND error/negative paths tested?
|
|
268
|
+
- [ ] Boundary values tested (0, 1, max, max+1)?
|
|
269
|
+
- [ ] Edge cases: empty, null, duplicate, concurrent?
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Batch Audit Process
|
|
273
|
+
|
|
274
|
+
For a full test suite audit:
|
|
275
|
+
|
|
276
|
+
1. **Quantify:** Count tests by type (unit/integration/E2E), framework, and directory.
|
|
277
|
+
2. **Sample:** Review 10-20% of test files, prioritizing the largest and most recently changed.
|
|
278
|
+
3. **Pattern:** Identify the 3-5 most common smells across the sample.
|
|
279
|
+
4. **Prioritize:** Rank by impact: reliability smells > diagnostic smells > design smells > readability smells.
|
|
280
|
+
5. **Automate:** For each common smell, determine if an ESLint rule or a mutation-score gate can catch it automatically.
|
|
281
|
+
6. **Report:** Document findings (one row per file reviewed) with specific examples, suggested fixes, severity (high/medium/low), and estimated effort.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Prompt Templates
|
|
286
|
+
|
|
287
|
+
Three prompt patterns for AI-assisted review:
|
|
288
|
+
|
|
289
|
+
1. **Review test quality:** "Check this test file for readability, reliability, diagnostic, design, AI-generated, and coverage smells. For each issue: name the smell, cite the line, explain why it matters, and provide a fix."
|
|
290
|
+
|
|
291
|
+
2. **Identify coverage gaps:** "Given this application code and its existing tests, identify missing scenarios across happy path, error handling, boundaries, edge cases, concurrency, and security. Prioritize as P0/P1/P2."
|
|
292
|
+
|
|
293
|
+
3. **Testability improvements:** "Review this application code for hard-coded dependencies, mixed side effects, extractable pure functions, and overly broad interfaces. Show current vs. refactored code."
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Anti-Patterns
|
|
298
|
+
|
|
299
|
+
1. **Reviewing test code with production-code standards only.** Test code has additional quality dimensions (reliability, diagnostics, coverage) that production-code linters do not check. Apply the six smell buckets, not just "clean code" principles.
|
|
300
|
+
|
|
301
|
+
2. **Flagging every smell without context.** A 50-line test for a complex state machine is not obscure setup — it is necessary complexity. Evaluate smells against the behavior being tested.
|
|
302
|
+
|
|
303
|
+
3. **Suggesting mocks for everything.** Over-mocking is itself a smell. Do not recommend mocking pure functions, value objects, or fast in-process collaborators. Mock boundaries: network, database, filesystem, clock.
|
|
304
|
+
|
|
305
|
+
4. **Focusing on coverage percentage over coverage quality.** 95% line coverage with only happy-path tests is worse than 75% coverage that includes error paths and boundaries. Review what is asserted, not just what is executed — and back it with mutation score.
|
|
306
|
+
|
|
307
|
+
5. **Reviewing without running.** Static analysis misses runtime issues. Run the suite (see **Verification**), check for flakiness with repeated runs, and check execution time. A passing suite that takes 20 minutes has a performance smell.
|
|
308
|
+
|
|
309
|
+
6. **One-time review without follow-up.** Test quality degrades over time. Establish a recurring review cadence or automated quality gates (lint rule, mutation threshold) that catch regression.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Verification
|
|
314
|
+
|
|
315
|
+
Run before you start commenting — these are the runtime checks the skill insists on, made concrete. Scope them to the PR's changed test files in PR review; run the whole suite in a batch audit.
|
|
316
|
+
|
|
317
|
+
1. **Run the suite once.** Confirm it is green before reviewing — never review red or skipped tests as if they pass.
|
|
318
|
+
- Vitest: `npx vitest run <files>` · Jest: `npx jest <files>` · Playwright: `npx playwright test <files>` · pytest: `pytest <files>`
|
|
319
|
+
2. **Repeat to surface flakiness.** A test that passes once and fails on the next run is the reliability smell, not a fluke.
|
|
320
|
+
- Vitest: `npx vitest run --retry=0 <files>` looped, or `for i in 1 2 3; do npx vitest run <files> || break; done`
|
|
321
|
+
- Jest: `npx jest <files> && npx jest <files> && npx jest <files>` (or `jest-circus` repeat)
|
|
322
|
+
- Playwright: `npx playwright test --repeat-each=3 <files>`
|
|
323
|
+
- pytest: `pytest --count=3 <files>` (pytest-repeat) or `pytest -p no:randomly` vs random order to catch order dependency
|
|
324
|
+
3. **Capture per-test timing.** A 20-minute suite has a performance smell.
|
|
325
|
+
- Vitest: `--reporter=verbose` (prints per-test duration) · Jest: `--verbose` · Playwright: `--reporter=list` · pytest: `--durations=10`
|
|
326
|
+
4. **Mutation score — the objective backstop.** For the qualitative smells you can't eyeball at scale (Closed AI loop, weak assertions), run a mutation runner and read the score. AI-generated tests under ~60% mutation score are not constraining the implementation. Full tooling, thresholds, and config in `references/mutation-testing.md`.
|
|
327
|
+
- JS/TS: `npx stryker run` · Java: PIT `mvn ... mutationCoverage` · Rust: `cargo mutants` · Python: `mutmut run`
|
|
328
|
+
|
|
329
|
+
Output of steps 1-3 plus the mutation score is the evidence behind every "reliability"/"diagnostic" finding in the report.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Done When
|
|
334
|
+
|
|
335
|
+
- The findings artifact exists with one row per reviewed file, each row carrying a severity rating (high/medium/low). (file exists, row count == files reviewed)
|
|
336
|
+
- Every smell dimension that applies to the reviewed code is covered: readability, reliability, diagnostic, design, AI-generated, coverage. (six headings present in the report; "N/A" allowed, blank not)
|
|
337
|
+
- Each high-severity finding has an actionable remediation step (what + why + fix), not just a description.
|
|
338
|
+
- Verification ran: the suite executed at least 3x green (no flaky failures) and per-test timing captured; for AI-generated suites, a mutation score is recorded.
|
|
339
|
+
- At least one recurring smell was converted to an automated gate — an ESLint rule, a CI check, or a mutation-score threshold committed — or the report explicitly states none was warranted.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Reference Files (in `references/`)
|
|
344
|
+
|
|
345
|
+
- **smell-examples.md** — Full SMELL/FIX code for every catalogued smell across reliability, diagnostic, design, and coverage dimensions.
|
|
346
|
+
- **testability-refactors.md** — Hard-to-test vs. testable before/after for all four testability subsections: dependency injection, side effect isolation, pure function extraction, interface segregation.
|
|
347
|
+
- **mutation-testing.md** — Tooling (Stryker/PIT/cargo-mutants/mutmut), thresholds, Stryker config, and the AI-loop / weak-assertion gate.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Related Skills
|
|
352
|
+
|
|
353
|
+
- **unit-testing** — Framework-specific patterns (Jest, Vitest, pytest) that inform what "good" looks like for each framework.
|
|
354
|
+
- **shift-left-testing** — Pre-commit hooks and IDE integration that catch test smells before review.
|
|
355
|
+
- **coverage-analysis** — Interpreting coverage reports to find meaningful gaps, not just percentage targets.
|
|
356
|
+
- **ai-test-generation** — Generated tests need review too. Apply these smell checks to AI-generated test code.
|
|
357
|
+
- **test-reliability** — Reliability smells (sleep-based waits, order dependency) overlap with flaky test patterns.
|