Skip to content

Dev to Main - repair git history and update setup script (and agent skills)#38

Merged
djanogly merged 101 commits intomainfrom
dev
Apr 25, 2026
Merged

Dev to Main - repair git history and update setup script (and agent skills)#38
djanogly merged 101 commits intomainfrom
dev

Conversation

@djanogly
Copy link
Copy Markdown
Contributor

No description provided.

djanogly and others added 25 commits March 11, 2026 13:31
* complete proposal for expanding widget convex wrapper hooks

* include generic typed calls to makeFunctionReference
Move and update docs
…ing-ref-factories

sdk-core string ref replacements
…al-convex-wrapper-hooks

introduce-mobile-local-convex-wrapper-hooks
* Manual edits to email capture widget (+ CI summary labels text)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Djanogly <45178753+djanogly@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…TBC) (#24)

* Add file uploads - UI needs work

* improve styling, remove Snippets button

* Update unit tests

* skip dismiss email collection test

* fallback and tweaks

* Limit filetypes

Partially completed - the upload spoofing hardening is improved, but not all the way to magic-byte sniffing. We now require an allowlisted extension from the normalized filename on both the client and backend in supportAttachments.ts (line 70) and supportAttachments.ts (line 57), and added regression coverage in supportAttachments.test.ts (line 151) and supportAttachments.test.ts (line 8). I did not add signature checks, because the current finalizeUpload boundary is a Convex mutation and ctx.storage.get() is only available in actions. Doing true magic-byte validation would need a larger refactor of that finalize flow.
* Proper AI knowledge handling with Mastra

* feat: replace legacy AI agent knowledge retrieval with Convex Vector Search

* docs: update spec to mention convex instead of mastra

* docs: archive use-convex-vector-search and update main specs

* fix: use existing Vercel AI Gateway client for embedding generation

* fix: retrieve full embedding document in aiAgentActionsKnowledge to access contentType and contentId

* working AI agent and suggestions

* Fixes for Typing gaps, unused ref, invalid vector filter chaining

Unused ref warning in packages/convex/convex/embeddings.ts
Invalid vector filter chaining in packages/convex/convex/suggestions.ts

* harden types

* update AGENTS.md
* Add embedding refresh button

* Tighten permissions
…#29)

* insert links to knowledge base from admin chat, and use vector search

* Encourage checks in AGENTS, update dependency allowlist
* Use any model for AI Agent

* restrict embedding model choice to vectors with 1536 dimensions, not 3072.

* fix tests

* Address type issues etc

* Address typing issues etc. add docs, tests and display the models in UI

* make error in fetching models explicit

* update deps

* Fix playwright tests
* openspec proposal

* Untested / Not validated - needs checking

* update script and docs - tested

* Pass CI gate
# Conflicts:
#	docs/scripts-reference.md
#	package.json
#	pnpm-lock.yaml
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opencom-landing Ready Ready Preview, Comment Apr 24, 2026 11:50pm
opencom-web Ready Ready Preview, Comment Apr 24, 2026 11:50pm

@qodo-code-review
Copy link
Copy Markdown

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Foolproof Local Convex Setup with Node.js Bootstrap, Agent Skills Library, and Comprehensive Documentation

✨ Enhancement 🧪 Tests 📝 Documentation

Grey Divider

Walkthroughs

Description
• **Complete Node.js setup orchestration**: Replaced bash-based bootstrap with comprehensive 1500+
  line local-convex-setup.js script providing interactive terminal UI, multi-phase setup flow
  (dependency install, Convex deployment, auth validation, workspace resolution, env propagation), and
  robust error handling with actionable messages
• **Deterministic test coverage**: Added 630-line test suite covering clean setup, rerun scenarios,
  JWT regeneration, auth failures, and env file merging using temporary directories and stubbed
  dependencies
• **Setup manifest and configuration**: Introduced data-driven manifest defining core auth
  requirements (JWT_PRIVATE_KEY, JWKS, SITE_URL) and optional feature profiles with env targets
  across web, widget, mobile, landing, and React Native SDK apps
• **Simplified shell wrappers**: Reduced setup.sh from 350 to 32 lines and update-env.sh from
  133 to 20 lines, now thin Node.js delegators with minimal prerequisite checks (Node 18+, PNPM 9+)
• **Comprehensive agent skills library**: Added five new AI agent skills with detailed guides and
  references: Convex Setup Auth (provider selection and implementation), Convex Migration Helper (safe
  schema migrations), Convex Performance Audit (optimization patterns), Convex Quickstart (project
  initialization), and Convex Create Component (reusable component architecture)
• **Updated documentation**: Refreshed setup guides, environment variable examples across all apps,
  testing documentation, and scripts reference to reflect new bootstrap flow with --reconfigure and
  --create-workspace flags
• **Dependency updates**: Updated @xmldom/xmldom from 0.8.12 to 0.8.13 and added
  skills-lock.json for agent skills version tracking
Diagram
flowchart LR
  A["Bash setup.sh<br/>350 lines"] -->|"Replaced with"| B["Node.js<br/>local-convex-setup.js<br/>1500+ lines"]
  B -->|"Orchestrates"| C["Multi-phase Flow"]
  C -->|"1. Preflight"| D["Dependency Check"]
  C -->|"2. Convex Config"| E["Deployment Setup"]
  C -->|"3. Auth"| F["JWT/JWKS Config"]
  C -->|"4. Workspace"| G["Selection & Validation"]
  C -->|"5. Env Propagation"| H["Non-destructive<br/>Merge"]
  B -->|"Tested by"| I["630-line Test Suite"]
  I -->|"Validates"| J["Clean Setup<br/>Rerun Safety<br/>Auth Failures"]
  B -->|"Uses"| K["Setup Manifest"]
  K -->|"Defines"| L["Auth Requirements<br/>Feature Profiles<br/>Env Targets"]
  M["Agent Skills<br/>Library"] -->|"Includes"| N["Setup Auth"]
  M -->|"Includes"| O["Migration Helper"]
  M -->|"Includes"| P["Performance Audit"]
  M -->|"Includes"| Q["Quickstart"]
  M -->|"Includes"| R["Create Component"]
Loading

Grey Divider

File Changes

1. scripts/local-convex-setup.js ✨ Enhancement +1558/-0

Complete Node.js setup orchestration with interactive auth flow

• New comprehensive Node.js bootstrap script replacing bash-based setup with 1500+ lines of
 orchestration logic
• Implements multi-phase setup flow: dependency install, Convex deployment config, backend env
 validation, workspace resolution, and local env propagation
• Provides interactive terminal UI with prompts, secret input, and selection menus for credential
 collection and workspace choice
• Includes robust error handling with SetupError class providing actionable error messages with
 context, reasoning, and fix suggestions

scripts/local-convex-setup.js


2. scripts/tests/local-convex-setup.test.js 🧪 Tests +630/-0

Deterministic test coverage for setup orchestration

• New test suite with 630 lines covering setup orchestration in deterministic environments
• Tests clean setup, rerun scenarios, JWT key regeneration, auth failures, and env file merging
• Uses temporary directories and stubbed Convex CLI/HTTP responses to avoid real cloud dependencies
• Validates env file preservation, workspace selection, and optional feature detection

scripts/tests/local-convex-setup.test.js


3. scripts/lib/local-convex-setup-manifest.js ⚙️ Configuration changes +172/-0

Setup manifest with env requirements and feature profiles

• New manifest defining core backend env requirements and optional feature profiles
• Specifies required auth keys (JWT_PRIVATE_KEY, JWKS, SITE_URL) and optional integrations
 (OTP email, AI agent, test helpers)
• Maps local env targets across web, widget, mobile, landing, and React Native SDK apps with managed
 comment blocks
• Provides data-driven configuration for setup validation and env propagation

scripts/lib/local-convex-setup-manifest.js


View more (47)
4. scripts/update-local-env.js ✨ Enhancement +7/-0

Node.js wrapper for environment update CLI

• New thin wrapper script delegating to the shared runUpdateEnvCli function from
 local-convex-setup.js
• Replaces bash-based env update with Node.js orchestration for consistency

scripts/update-local-env.js


5. scripts/setup.sh ✨ Enhancement +14/-332

Simplified shell wrapper delegating to Node bootstrap

• Reduced from 350 lines to 32 lines, now a thin shell wrapper with minimal prerequisite checks
• Validates node and pnpm presence and version requirements (Node 18+, PNPM 9+)
• Delegates all orchestration to scripts/local-convex-setup.js via exec node
• Preserves shell entrypoint for compatibility while moving complexity to Node

scripts/setup.sh


6. scripts/update-env.sh ✨ Enhancement +9/-122

Simplified shell wrapper for environment updates

• Reduced from 133 lines to 20 lines, now a thin shell wrapper with Node version check
• Validates node presence and version requirement (Node 18+)
• Delegates all env update logic to scripts/update-local-env.js via exec node

scripts/update-env.sh


7. openspec/changes/foolproof-local-convex-setup/design.md 📝 Documentation +266/-0

Design specification for foolproof local setup flow

• Comprehensive design document outlining problems with current setup flow and proposed solutions
• Details six key decisions: Node bootstrap architecture, canonical env sources, setup profiles,
 rerun safety, non-destructive env merging, and testing strategy
• Proposes six-phase flow: preflight checks, Convex config, backend env validation, workspace
 resolution, local env propagation, and post-setup summary
• Includes validation/error handling patterns, risk mitigation, and migration plan

openspec/changes/foolproof-local-convex-setup/design.md


8. .agents/skills/convex-migration-helper/references/migration-patterns.md 📝 Documentation +231/-0

Convex migration patterns and zero-downtime strategies reference

• New reference guide documenting common Convex schema migration patterns and zero-downtime
 strategies
• Covers adding/removing/changing fields, splitting nested data, cleaning orphaned documents
• Explains dual-write and dual-read strategies for zero-downtime migrations with code examples
• Includes verification techniques and small-table migration shortcuts

.agents/skills/convex-migration-helper/references/migration-patterns.md


9. openspec/changes/foolproof-local-convex-setup/.openspec.yaml ⚙️ Configuration changes +2/-0

Openspec metadata for setup change tracking

• New metadata file marking the foolproof-local-convex-setup change as spec-driven
• Records creation timestamp for tracking purposes

openspec/changes/foolproof-local-convex-setup/.openspec.yaml


10. .agents/skills/convex-quickstart/SKILL.md 📝 Documentation +347/-0

Convex Quickstart Skill Guide for Project Initialization

• New comprehensive skill guide for initializing Convex projects from scratch or adding Convex to
 existing apps
• Covers two main paths: scaffolding new projects with templates and adding Convex to existing
 applications
• Includes detailed setup instructions for multiple frameworks (React, Next.js, Vue, Svelte) with
 code examples
• Provides verification steps, first function examples, and development vs production deployment
 guidance

.agents/skills/convex-quickstart/SKILL.md


11. .agents/skills/convex-performance-audit/references/hot-path-rules.md 📝 Documentation +369/-0

Hot Path Performance Optimization Rules and Patterns

• New reference guide for optimizing hot-path reads and write patterns in Convex applications
• Covers five core optimization rules: pushing filters to storage, minimizing data sources, reducing
 row size, isolating frequently-updated fields, and matching consistency to read patterns
• Includes detailed patterns for indexes, denormalization, digest tables, and migration-safe
 rollouts
• Provides code examples for both problematic and optimized approaches

.agents/skills/convex-performance-audit/references/hot-path-rules.md


12. .agents/skills/convex-create-component/SKILL.md 📝 Documentation +288/-0

Convex Component Creation and Architecture Guide

• New comprehensive skill for designing and building reusable Convex components with isolated tables
 and clear boundaries
• Covers component shape selection (local, packaged, hybrid), skeleton structure, and critical
 implementation rules
• Includes patterns for authentication, environment access, client-facing APIs, and ID handling
 across component boundaries
• Provides validation steps and references to detailed pattern documentation

.agents/skills/convex-create-component/SKILL.md


13. .agents/skills/convex-performance-audit/references/subscription-cost.md 📝 Documentation +252/-0

Subscription Cost Reduction and Reactive Query Optimization

• New reference guide for diagnosing and reducing reactive subscription costs in Convex applications
• Covers core principle that subscription cost scales with subscriptions × invalidation frequency ×
 query cost
• Provides nine fix strategies including point-in-time reads, batching queries, using skip,
 isolating frequently-updated fields, and pagination strategies
• Includes code examples and verification checklist for subscription optimization

.agents/skills/convex-performance-audit/references/subscription-cost.md


14. docs/open-source/setup-self-host-and-deploy.md 📝 Documentation +94/-31

Bootstrap Script and Convex Auth Environment Setup Documentation

• Updated setup documentation to reflect new bootstrap script capabilities and workflow
• Added detailed explanation of what the ./scripts/setup.sh script now handles (pnpm install,
 Convex deployment, auth configuration, workspace resolution, env file generation)
• Expanded environment variables section with new JWT_PRIVATE_KEY and JWKS variables for Convex
 Auth
• Added new "Disposable Container Smoke Path" section for testing setup in clean environments
• Clarified manual setup as an escape hatch and updated all related instructions

docs/open-source/setup-self-host-and-deploy.md


15. .agents/skills/convex-setup-auth/references/convex-auth.md 📝 Documentation +143/-0

Convex Auth Setup and Configuration Reference

• New reference guide for setting up Convex Auth as the authentication provider
• Covers workflow from confirmation through production deployment, including package installation
 and initialization
• Details required files, decisions, and gotchas specific to Convex Auth setup
• Provides concrete steps and validation checklist for local and production configurations

.agents/skills/convex-setup-auth/references/convex-auth.md


16. .agents/skills/convex-performance-audit/references/function-budget.md 📝 Documentation +232/-0

Function Budget and Transaction Limit Optimization Guide

• New reference guide for staying within Convex function execution and transaction limits
• Documents current limits for execution time, data read/write, documents scanned, and payload size
• Provides seven fix strategies: bounding reads, reading smaller shapes, batching mutations, moving
 work to actions, trimming return values, and avoiding unnecessary function calls
• Includes code examples and verification checklist

.agents/skills/convex-performance-audit/references/function-budget.md


17. .agents/skills/convex-setup-auth/references/auth0.md 📝 Documentation +116/-0

Auth0 Integration and Configuration Reference

• New reference guide for integrating Auth0 as the authentication provider with Convex
• Covers workflow including Auth0 CLI setup path and dashboard path alternatives
• Details Auth0 app creation, environment variables, and convex/auth.config.ts configuration
• Provides concrete steps, gotchas, and validation checklist for local and production setups

.agents/skills/convex-setup-auth/references/auth0.md


18. README.md 📝 Documentation +50/-29

Quick Start and Bootstrap Script Documentation Updates

• Added new "Quick Start" section at the top with one-command setup instructions
• Updated "Quick Start (Self-Hosters)" section to emphasize the bootstrap script as the preferred
 path
• Clarified manual setup as an escape hatch with updated instructions
• Updated environment variables documentation to use JWT_PRIVATE_KEY and JWKS instead of
 AUTH_SECRET
• Added rerun flags documentation for --reconfigure and --create-workspace options

README.md


19. .agents/skills/convex-setup-auth/SKILL.md 📝 Documentation +150/-0

Convex Authentication Setup Skill and Provider Selection Guide

• New comprehensive skill guide for implementing authentication in Convex applications
• Covers provider selection (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom JWT) with decision
 logic
• Includes core pattern for protecting backend functions with ctx.auth.getUserIdentity()
• Provides workflow, reference file structure, and detailed checklist for local and production
 setups

.agents/skills/convex-setup-auth/SKILL.md


20. .agents/skills/convex-performance-audit/SKILL.md 📝 Documentation +143/-0

Convex Performance Audit Skill and Diagnostic Workflow

• New comprehensive skill guide for diagnosing and fixing Convex application performance problems
• Covers signal gathering from insights and dashboard, problem class routing to specific references
• Includes workflow for scoping problems, tracing read/write sets, applying fixes, and verifying
 results
• Provides guardrails against over-optimization and escalation guidance for larger fixes

.agents/skills/convex-performance-audit/SKILL.md


21. .agents/skills/convex-setup-auth/references/clerk.md 📝 Documentation +113/-0

Clerk Authentication Integration and Configuration Reference

• New reference guide for integrating Clerk as the authentication provider with Convex
• Covers workflow from account setup through production deployment
• Details Clerk dashboard navigation, environment variables, and convex/auth.config.ts
 configuration
• Provides concrete steps, gotchas, and validation checklist specific to Clerk integration

.agents/skills/convex-setup-auth/references/clerk.md


22. .agents/skills/convex-setup-auth/references/workos-authkit.md 📝 Documentation +114/-0

WorkOS AuthKit Integration and Configuration Reference

• New reference guide for integrating WorkOS AuthKit as the authentication provider with Convex
• Covers workflow for both Convex-managed and existing WorkOS team setups
• Details convex.json configuration, environment variables, and callback/redirect handling
• Provides concrete steps, gotchas, and validation checklist for local and production configurations

.agents/skills/convex-setup-auth/references/workos-authkit.md


23. pnpm-lock.yaml Dependencies +8/-8

Dependency Version Update for xmldom Package

• Updated @xmldom/xmldom dependency from version 0.8.12 to 0.8.13 across multiple package
 references
• Changes affect @expo/plist and plist package dependencies that use xmldom

pnpm-lock.yaml


24. .agents/skills/convex-migration-helper/SKILL.md 📝 Documentation +149/-0

Convex Migration Helper Skill and Safe Migration Patterns

• New comprehensive skill guide for safely executing Convex schema and data migrations
• Covers key concepts including schema validation constraints, online migrations, and safe vs
 breaking changes
• Details the widen-migrate-narrow workflow pattern and use of the @convex-dev/migrations
 component
• Provides common migration patterns, pitfalls, and comprehensive migration checklist

.agents/skills/convex-migration-helper/SKILL.md


25. apps/web/.env.example ⚙️ Configuration changes +14/-0

Web Dashboard Environment Variables Example Configuration

• New environment variables example file for the web dashboard application
• Documents four configuration variables: NEXT_PUBLIC_OPENCOM_DEFAULT_BACKEND_URL,
 NEXT_PUBLIC_CONVEX_URL, NEXT_PUBLIC_TEST_WORKSPACE_ID, and E2E_BACKEND_URL
• Provides clear instructions to copy to .env.local or use ./scripts/update-env.sh

apps/web/.env.example


26. .agents/skills/convex-migration-helper/references/migrations-component.md 📝 Documentation +169/-0

Convex migrations component reference documentation

• New comprehensive reference guide for the @convex-dev/migrations component covering
 installation, setup, and usage patterns
• Documents migration definition with migrateOne function, batch processing, and dry-run
 capabilities
• Includes configuration options for custom batch sizes, index-based filtering, and parallel
 processing
• Provides CLI and programmatic examples for running single and multiple migrations with status
 checking and cancellation

.agents/skills/convex-migration-helper/references/migrations-component.md


27. .agents/skills/convex-performance-audit/references/occ-conflicts.md 📝 Documentation +114/-0

OCC conflict resolution strategies and patterns

• New reference guide for resolving Optimistic Concurrency Control (OCC) conflicts in Convex
 applications
• Explains OCC principles, symptoms, and common causes including hot documents, broad read sets, and
 cascading writes
• Provides ordered fix strategies: reducing read set size, splitting hot documents, moving work to
 scheduled functions, and combining competing writes
• Includes code examples demonstrating problematic patterns and their solutions

.agents/skills/convex-performance-audit/references/occ-conflicts.md


28. openspec/changes/foolproof-local-convex-setup/specs/local-convex-setup-bootstrap/spec.md 📝 Documentation +70/-0

Local Convex setup bootstrap specification requirements

• New specification document defining requirements for rerun-safe local Convex setup bootstrap
• Specifies scenarios for first-time configuration, rerun with existing deployment, auth validation,
 and workspace resolution
• Requires non-destructive env file updates that preserve unrelated user-managed entries
• Mandates automated verification with clean-environment and rerun test coverage

openspec/changes/foolproof-local-convex-setup/specs/local-convex-setup-bootstrap/spec.md


29. docs/scripts-reference.md 📝 Documentation +25/-19

Setup scripts documentation updated for new bootstrap flow

• Updated setup.sh documentation to reflect new stateful bootstrap flow using convex dev --once
 instead of stale CLI commands
• Changed auth path from convex run auth:signup to repo's actual auth:signIn flow with password
 signup
• Added new flags: --reconfigure, --create-workspace, --start-dev for improved control over
 setup behavior
• Updated update-env.sh description to clarify it preserves unrelated manual keys and comments
 instead of overwriting files
• Fixed markdown table alignment in Quality section

docs/scripts-reference.md


30. .agents/skills/convex-create-component/references/advanced-patterns.md 📝 Documentation +134/-0

Advanced Convex component patterns and techniques

• New reference guide for advanced Convex component patterns beyond basics
• Documents function handles for callbacks, deriving validators from schema, and static
 configuration with globals table
• Includes class-based client wrapper pattern for cleaner APIs in published components
• Provides complete code examples for each pattern with usage context

.agents/skills/convex-create-component/references/advanced-patterns.md


31. package.json ⚙️ Configuration changes +3/-2

Added setup bootstrap test script and dependency updates

• Added new test script test:setup-bootstrap for automated setup flow testing
• Updated @xmldom/xmldom overrides from 0.8.12 to 0.8.13 for both version constraints

package.json


32. openspec/changes/foolproof-local-convex-setup/proposal.md 📝 Documentation +41/-0

Foolproof local Convex setup proposal and rationale

• New proposal document explaining motivation for foolproof local Convex setup improvements
• Identifies current brittleness: outdated CLI commands, mismatched auth bootstrap path, destructive
 env file rewrites
• Outlines solution: stateful Node-based bootstrap with safe reuse, proper auth validation, and
 non-destructive env updates
• Defines new capability for rerun-safe local bootstrap and impact on setup scripts, docs, and
 contributor experience

openspec/changes/foolproof-local-convex-setup/proposal.md


33. openspec/changes/foolproof-local-convex-setup/tasks.md 📝 Documentation +24/-0

Foolproof local Convex setup implementation tasks

• New task checklist for foolproof local Convex setup implementation across four areas
• Covers setup bootstrap architecture, Convex configuration and auth, local env safety, and
 verification/documentation
• All tasks marked as completed with checkmarks

openspec/changes/foolproof-local-convex-setup/tasks.md


34. .agents/skills/convex-create-component/references/packaged-components.md 📝 Documentation +51/-0

Packaged Convex components reference guide

• New reference guide for building reusable npm package Convex components
• Covers when to choose packaged components, build flow ordering, and required package exports
• Includes testing strategy using convex-test and example app validation
• Provides implementation checklist for packaging requirements

.agents/skills/convex-create-component/references/packaged-components.md


35. skills-lock.json ⚙️ Configuration changes +30/-0

Agent skills lock file with version tracking

• New lock file tracking agent skills versions and hashes from get-convex/agent-skills repository
• Includes five skills: convex-create-component, convex-migration-helper,
 convex-performance-audit, convex-quickstart, and convex-setup-auth
• Each skill entry contains source, source type, and computed hash for version management

skills-lock.json


36. packages/convex/.env.test.example 📝 Documentation +7/-6

Test environment setup instructions modernized

• Updated setup instructions to use pnpm exec convex dev --once --configure instead of separate
 login and project-specific commands
• Changed auth bootstrap from convex run auth:signup to running ./scripts/setup.sh or `convex
 auth add`
• Updated all subsequent commands to use pnpm exec prefix instead of npx
• Clarified that SITE_URL, ALLOW_TEST_DATA, and TEST_ADMIN_SECRET are set via convex env set
 commands

packages/convex/.env.test.example


37. .agents/skills/convex-create-component/references/local-components.md 📝 Documentation +38/-0

Local Convex components reference guide

• New reference guide for local Convex components that live inside the app without npm publishing
• Specifies default layout under convex/components/<name>/ with component configuration and schema
• Explains workflow: component definition, app installation, table ownership, and wrapper patterns
• Includes implementation checklist for local component setup

.agents/skills/convex-create-component/references/local-components.md


38. apps/landing/README.md 📝 Documentation +3/-1

Landing app README with setup script reference

• Added note that ./scripts/update-env.sh automatically fills in env values after repo bootstrap
• Fixed trailing whitespace in Knowledge Base description line

apps/landing/README.md


39. .agents/skills/convex-create-component/references/hybrid-components.md 📝 Documentation +37/-0

Hybrid Convex components reference guide

• New reference guide for hybrid Convex components combining local components with shared library
 code
• Explains when hybrid setup is appropriate and when to prefer local-only or packaged alternatives
• Documents risks including increased complexity and harder upgrades
• Provides decision questions and implementation checklist

.agents/skills/convex-create-component/references/hybrid-components.md


40. apps/landing/.env.example 📝 Documentation +2/-0

Landing app env example with setup script tips

• Added tip comments indicating ./scripts/update-env.sh automatically fills in
 NEXT_PUBLIC_CONVEX_URL and NEXT_PUBLIC_WORKSPACE_ID

apps/landing/.env.example


41. .agents/skills/convex-quickstart/agents/openai.yaml ⚙️ Configuration changes +10/-0

Convex Quickstart agent skill configuration

• New agent configuration file for Convex Quickstart skill with display name, description, and
 branding
• Defines default prompt for scaffolding new Convex apps or integrating into existing frontends
• Enables implicit invocation for quick access

.agents/skills/convex-quickstart/agents/openai.yaml


42. docs/testing.md 📝 Documentation +4/-6

Testing documentation updated for new setup flow

• Updated test deployment setup to use `pnpm --filter @opencom/convex exec convex dev --once
 --configure` instead of separate login and project commands
• Changed auth configuration from manual env set commands to convex auth add for
 JWT_PRIVATE_KEY/JWKS setup
• Simplified instructions by removing explicit cd packages/convex step

docs/testing.md


43. .agents/skills/convex-create-component/agents/openai.yaml ⚙️ Configuration changes +10/-0

Convex Create Component agent skill configuration

• New agent configuration file for Convex Create Component skill with display name, description, and
 branding
• Defines default prompt for designing and building reusable Convex components with clear boundaries
• Enables implicit invocation for quick access

.agents/skills/convex-create-component/agents/openai.yaml


44. .agents/skills/convex-migration-helper/agents/openai.yaml ⚙️ Configuration changes +10/-0

Convex Migration Helper agent skill configuration

• New agent configuration file for Convex Migration Helper skill with display name, description, and
 branding
• Defines default prompt for planning and running safe schema and data migrations
• Enables implicit invocation for quick access

.agents/skills/convex-migration-helper/agents/openai.yaml


45. .agents/skills/convex-performance-audit/agents/openai.yaml ⚙️ Configuration changes +10/-0

Convex Performance Audit agent skill configuration

• New agent configuration file for Convex Performance Audit skill with display name, description,
 and branding
• Defines default prompt for auditing slow reads, subscriptions, OCC conflicts, and limits
• Enables implicit invocation for quick access

.agents/skills/convex-performance-audit/agents/openai.yaml


46. .agents/skills/convex-setup-auth/agents/openai.yaml ⚙️ Configuration changes +10/-0

Convex Setup Auth agent skill configuration

• New agent configuration file for Convex Setup Auth skill with display name, description, and
 branding
• Defines default prompt for setting up authentication, user identity mapping, and access control
• Enables implicit invocation for quick access

.agents/skills/convex-setup-auth/agents/openai.yaml


47. apps/widget/.env.example 📝 Documentation +2/-2

Widget app env example with setup script tips

• Added tip comment indicating ./scripts/update-env.sh automatically fills in VITE_CONVEX_URL
• Updated workspace ID description to reference local bootstrap or app settings instead of
 mobile-specific instructions

apps/widget/.env.example


48. apps/mobile/.env.example 📝 Documentation +6/-0

Mobile app environment configuration example

• New env example file for Opencom mobile app with three configuration variables
• Includes EXPO_PUBLIC_OPENCOM_DEFAULT_BACKEND_URL, EXPO_PUBLIC_CONVEX_URL, and
 EXPO_PUBLIC_WORKSPACE_ID
• References ./scripts/update-env.sh for automatic setup

apps/mobile/.env.example


49. packages/react-native-sdk/example/.env.example 📝 Documentation +1/-0

React Native SDK example env with setup script tip

• Added tip comment indicating ./scripts/update-env.sh automatically fills in env values for local
 setup

packages/react-native-sdk/example/.env.example


50. packages/react-native-sdk/example/README.md 📝 Documentation +2/-0

React Native SDK example README with setup script reference

• Added note that ./scripts/update-env.sh automatically fills in env values after repo bootstrap

packages/react-native-sdk/example/README.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Apr 24, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Agent docs use npm/npx 📘 Rule violation § Compliance
Description
New/updated agent skill documentation instructs using npm/npx commands (e.g., npm install,
npm create, npx convex ...) instead of PNPM equivalents. This violates the repo requirement to
use PNPM exclusively for package management and CLI execution instructions.
Code

.agents/skills/convex-quickstart/SKILL.md[R23-96]

+1. Determine the starting point: new project or existing app
+2. If new project, pick a template and scaffold with `npm create convex@latest`
+3. If existing app, install `convex` and wire up the provider
+4. Run `npx convex dev` to connect a deployment and start the dev loop
+5. Verify the setup works
+
+## Path 1: New Project (Recommended)
+
+Use the official scaffolding tool. It creates a complete project with the frontend framework, Convex backend, and all config wired together.
+
+### Pick a template
+
+| Template                   | Stack                                     |
+| -------------------------- | ----------------------------------------- |
+| `react-vite-shadcn`        | React + Vite + Tailwind + shadcn/ui       |
+| `nextjs-shadcn`            | Next.js App Router + Tailwind + shadcn/ui |
+| `react-vite-clerk-shadcn`  | React + Vite + Clerk auth + shadcn/ui     |
+| `nextjs-clerk`             | Next.js + Clerk auth                      |
+| `nextjs-convexauth-shadcn` | Next.js + Convex Auth + shadcn/ui         |
+| `nextjs-lucia-shadcn`      | Next.js + Lucia auth + shadcn/ui          |
+| `bare`                     | Convex backend only, no frontend          |
+
+If the user has not specified a preference, default to `react-vite-shadcn` for simple apps or `nextjs-shadcn` for apps that need SSR or API routes.
+
+You can also use any GitHub repo as a template:
+
+```bash
+npm create convex@latest my-app -- -t owner/repo
+npm create convex@latest my-app -- -t owner/repo#branch
+```
+
+### Scaffold the project
+
+Always pass the project name and template flag to avoid interactive prompts:
+
+```bash
+npm create convex@latest my-app -- -t react-vite-shadcn
+cd my-app
+npm install
+```
+
+The scaffolding tool creates files but does not run `npm install`, so you must run it yourself.
+
+To scaffold in the current directory (if it is empty):
+
+```bash
+npm create convex@latest . -- -t react-vite-shadcn
+npm install
+```
+
+### Start the dev loop
+
+`npx convex dev` is a long-running watcher process that syncs backend code to a Convex deployment on every save. It also requires authentication on first run (browser-based OAuth). Both of these make it unsuitable for an agent to run directly.
+
+**Ask the user to run this themselves:**
+
+Tell the user to run `npx convex dev` in their terminal. On first run it will prompt them to log in or develop anonymously. Once running, it will:
+
+- Create a Convex project and dev deployment
+- Write the deployment URL to `.env.local`
+- Create the `convex/` directory with generated types
+- Watch for changes and sync continuously
+
+The user should keep `npx convex dev` running in the background while you work on code. The watcher will automatically pick up any files you create or edit in `convex/`.
+
+**Exception - cloud or headless agents:** Environments that cannot open a browser for interactive login should use Agent Mode (see below) to run anonymously without user interaction.
+
+### Start the frontend
+
+The user should also run the frontend dev server in a separate terminal:
+
+```bash
+npm run dev
+```
Evidence
PR Compliance ID 54502 requires PNPM-only commands in changed docs/scripts. The cited added lines
include npm create, npm install, npm run, and npx ... instructions, with no documented
exception explaining why PNPM cannot be used.

Rule 54502: Use PNPM exclusively for package management commands
.agents/skills/convex-quickstart/SKILL.md[23-96]
.agents/skills/convex-migration-helper/references/migrations-component.md[7-16]
.agents/skills/convex-migration-helper/references/migrations-component.md[62-136]
.agents/skills/convex-setup-auth/references/convex-auth.md[17-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Several newly added agent skill docs include `npm`/`npx` commands (e.g., `npm install`, `npm create`, `npx convex ...`). Repo policy requires using PNPM equivalents (`pnpm install`, `pnpm run`, `pnpm create`, `pnpm dlx`/`pnpm exec`) unless a tool truly cannot work with PNPM and the exception is documented.

## Issue Context
This is documentation intended to guide contributors/agents; inconsistent package manager instructions cause drift and violates the PNPM-only compliance requirement.

## Fix Focus Areas
- .agents/skills/convex-quickstart/SKILL.md[23-96]
- .agents/skills/convex-migration-helper/references/migrations-component.md[7-16]
- .agents/skills/convex-migration-helper/references/migrations-component.md[62-136]
- .agents/skills/convex-setup-auth/references/convex-auth.md[17-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

2. Help requires pnpm installed 🐞 Bug ⚙ Maintainability
Description
scripts/setup.sh exits if pnpm is missing even when invoked with --help, because the pnpm
prerequisite check happens before delegating to the Node CLI. This blocks users from discovering
setup flags/instructions unless pnpm is already installed.
Code

scripts/setup.sh[R13-16]

+if ! command -v pnpm >/dev/null 2>&1; then
+  echo "Error: pnpm is required. Install PNPM 9+ and rerun ./scripts/setup.sh." >&2
  exit 1
fi
-echo -e "  ${GREEN}✓${NC} Node.js $(node -v)"
Evidence
The bash wrapper enforces pnpm presence unconditionally, so ./scripts/setup.sh --help fails early
without pnpm. Meanwhile, the Node CLI has an early --help path that returns before running any
pnpm commands, so the wrapper could safely allow help without pnpm.

scripts/setup.sh[13-16]
scripts/local-convex-setup.js[1493-1496]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`./scripts/setup.sh --help` currently requires `pnpm` to be installed because the bash wrapper checks for pnpm before delegating to the Node CLI. The Node CLI can print help without pnpm, so the wrapper can safely skip pnpm checks when `-h/--help` is requested.

### Issue Context
This is a minor UX/paper-cut issue, but it prevents users from discovering supported flags unless they already have pnpm installed.

### Fix Focus Areas
- scripts/setup.sh[8-32]
- scripts/local-convex-setup.js[1484-1496]

### Suggested change
In `scripts/setup.sh`, detect `-h`/`--help` (and optionally no-args) and immediately `exec node "$ROOT_DIR/scripts/local-convex-setup.js" "$@"` after only the Node version check, skipping the pnpm checks for that path.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +23 to +96
1. Determine the starting point: new project or existing app
2. If new project, pick a template and scaffold with `npm create convex@latest`
3. If existing app, install `convex` and wire up the provider
4. Run `npx convex dev` to connect a deployment and start the dev loop
5. Verify the setup works

## Path 1: New Project (Recommended)

Use the official scaffolding tool. It creates a complete project with the frontend framework, Convex backend, and all config wired together.

### Pick a template

| Template | Stack |
| -------------------------- | ----------------------------------------- |
| `react-vite-shadcn` | React + Vite + Tailwind + shadcn/ui |
| `nextjs-shadcn` | Next.js App Router + Tailwind + shadcn/ui |
| `react-vite-clerk-shadcn` | React + Vite + Clerk auth + shadcn/ui |
| `nextjs-clerk` | Next.js + Clerk auth |
| `nextjs-convexauth-shadcn` | Next.js + Convex Auth + shadcn/ui |
| `nextjs-lucia-shadcn` | Next.js + Lucia auth + shadcn/ui |
| `bare` | Convex backend only, no frontend |

If the user has not specified a preference, default to `react-vite-shadcn` for simple apps or `nextjs-shadcn` for apps that need SSR or API routes.

You can also use any GitHub repo as a template:

```bash
npm create convex@latest my-app -- -t owner/repo
npm create convex@latest my-app -- -t owner/repo#branch
```

### Scaffold the project

Always pass the project name and template flag to avoid interactive prompts:

```bash
npm create convex@latest my-app -- -t react-vite-shadcn
cd my-app
npm install
```

The scaffolding tool creates files but does not run `npm install`, so you must run it yourself.

To scaffold in the current directory (if it is empty):

```bash
npm create convex@latest . -- -t react-vite-shadcn
npm install
```

### Start the dev loop

`npx convex dev` is a long-running watcher process that syncs backend code to a Convex deployment on every save. It also requires authentication on first run (browser-based OAuth). Both of these make it unsuitable for an agent to run directly.

**Ask the user to run this themselves:**

Tell the user to run `npx convex dev` in their terminal. On first run it will prompt them to log in or develop anonymously. Once running, it will:

- Create a Convex project and dev deployment
- Write the deployment URL to `.env.local`
- Create the `convex/` directory with generated types
- Watch for changes and sync continuously

The user should keep `npx convex dev` running in the background while you work on code. The watcher will automatically pick up any files you create or edit in `convex/`.

**Exception - cloud or headless agents:** Environments that cannot open a browser for interactive login should use Agent Mode (see below) to run anonymously without user interaction.

### Start the frontend

The user should also run the frontend dev server in a separate terminal:

```bash
npm run dev
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Agent docs use npm/npx 📘 Rule violation § Compliance

New/updated agent skill documentation instructs using npm/npx commands (e.g., npm install,
npm create, npx convex ...) instead of PNPM equivalents. This violates the repo requirement to
use PNPM exclusively for package management and CLI execution instructions.
Agent Prompt
## Issue description
Several newly added agent skill docs include `npm`/`npx` commands (e.g., `npm install`, `npm create`, `npx convex ...`). Repo policy requires using PNPM equivalents (`pnpm install`, `pnpm run`, `pnpm create`, `pnpm dlx`/`pnpm exec`) unless a tool truly cannot work with PNPM and the exception is documented.

## Issue Context
This is documentation intended to guide contributors/agents; inconsistent package manager instructions cause drift and violates the PNPM-only compliance requirement.

## Fix Focus Areas
- .agents/skills/convex-quickstart/SKILL.md[23-96]
- .agents/skills/convex-migration-helper/references/migrations-component.md[7-16]
- .agents/skills/convex-migration-helper/references/migrations-component.md[62-136]
- .agents/skills/convex-setup-auth/references/convex-auth.md[17-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@djanogly djanogly merged commit 5965f0c into main Apr 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant