Skip to main content

dev-verify Reference

Multi-stack reference for /dev-verify. Loaded on demand via inline > **Reference**: pointers in SKILL.md.


Build Pipeline Sequences​

Per-stack build order with conditional ORM steps. Use these when executing the Bootstrap Validation Sequence (Step 6-10).

Node.js / TypeScript​

1. {pkg_mgr} install                    — pnpm install / npm install / yarn install
2. npx prisma generate — If prisma/schema.prisma exists
OR npx drizzle-kit generate — If drizzle.config.ts exists
3. npx tsc --noEmit — Type check (non-emit)
4. {pkg_mgr} run build — turbo run build (monorepo) / pnpm run build

Monorepo variants:

  • turbo.json present → turbo run build respects pipeline topology
  • pnpm-workspace.yaml without turbo → pnpm -r run build for recursive build
  • Per-app type checks: turbo run typecheck or pnpm --filter {app} run typecheck

Package manager detection (from lockfile):

LockfilePackage Manager
pnpm-lock.yamlpnpm
package-lock.jsonnpm
yarn.lockyarn

PHP​

1. composer install                     — Install dependencies
2. php artisan migrate --pretend — If Laravel detected (dry-run migration check)
3. vendor/bin/phpstan analyse — Static analysis (level from phpstan.neon)
4. composer run build — If build script exists in composer.json

Laravel-specific:

  • Check artisan file exists before running artisan commands
  • php artisan config:cache may be needed before phpstan
  • For Octane: verify swoole/roadrunner extension is loaded

Go​

1. go mod download                      — Download dependencies
2. go generate ./... — If //go:generate directives exist
3. go vet ./... — Static analysis
4. go build ./cmd/... — Build all commands (or ./... for libraries)

Go-specific:

  • go vet catches issues go build misses (unused variables, printf format strings)
  • For sqlc: check sqlc.yaml exists, run sqlc generate before go vet
  • For wire: check wire.go files, run wire ./... before build

Error Pattern Matching​

Per-stack error patterns mapped to the generic categories defined in SKILL.md Step 8.

Node.js / TypeScript​

TS Error CodeGeneric CategoryExample
TS2307missing-dependencyCannot find module '{package}'
TS2304missing-dependencyCannot find name '{identifier}' (often missing @types/)
TS2305export-import-mismatchModule has no exported member '{name}'
TS2614export-import-mismatchModule has no default export
TS2339type-mismatchProperty '{name}' does not exist on type '{type}'
TS2322type-mismatchType '{a}' is not assignable to type '{b}'
TS18046type-mismatch'{name}' is of type 'unknown'

Detection patterns:

/error TS(\d+):/ → extract error code
/Cannot find module '([^']+)'/ → extract package name for missing-dependency
/has no exported member '([^']+)'/ → extract member name for export-import-mismatch

PHP (PHPStan)​

PHPStan PatternGeneric Category
Class .* not foundmissing-dependency
Call to undefined methodexport-import-mismatch
Parameter .* expects .*, .* giventype-mismatch
Access to undefined propertytype-mismatch

Detection patterns:

/Class ([A-Z][a-zA-Z\\]+) not found/ → extract class, check if package missing
/Call to undefined method ([A-Z][a-zA-Z\\]+)::(\w+)/ → extract class and method

Go​

Go Error PatternGeneric Category
could not importmissing-dependency
undefined:export-import-mismatch
cannot use .* as typetype-mismatch
imported and not usedconfig-mismatch
import cycle not allowedschema-drift

Detection patterns:

/could not import ([a-z][a-z0-9./]+)/ → extract module path
/undefined: ([a-zA-Z]+)/ → extract identifier
/cannot use .* \(.*\) as type (.*)/ → extract expected type

Auto-Fix Command Sequences​

Per-stack fix commands for auto-fixable error categories. Safety rule: only apply fixes from this table. Report everything else.

Node.js / TypeScript​

CategoryFix CommandNotes
missing-dependency{pkg_mgr} add {package}Extract package from TS2307 error message
missing-dependency (@types){pkg_mgr} add -D @types/{package}If TS2304 and package exists in node_modules
export-import-mismatchEdit: rename import to match actual exportRead target file exports first
config-mismatchEdit: update tsconfig.json paths/aliasesMatch existing path alias patterns

PHP​

CategoryFix CommandNotes
missing-dependencycomposer require {package}Extract from "Class not found"
export-import-mismatchEdit: fix use statement namespaceResolve from autoload map
config-mismatchEdit: update config fileMatch existing config patterns

Go​

CategoryFix CommandNotes
missing-dependencygo get {module}Extract from "could not import"
export-import-mismatchEdit: fix import path or identifierCheck exported names in target package
config-mismatchEdit: remove unused importOnly for "imported and not used"

Auto-Fix Safety Matrix​

CategoryAuto-Fix Safe?Condition
missing-dependencyYesPackage name matches ^[@a-z][a-z0-9./_-]*$
export-import-mismatchYesSingle rename, target export verified to exist
type-mismatchConditionalOnly simple casts (e.g., as string). If complex generics or union types → report only
schema-driftNeverAlways report. Suggest /backend-data-model re-run
config-mismatchYesConfig key exists in target file

Config-Implied Dependency Validation​

Detection table for framework config signals that imply build dependencies. Pattern from dev-project-assemble Step 10.3.

Node.js​

Config FileSignalRequired DependencyCheck In
next.config.tsreactCompiler: truebabel-plugin-react-compilerpackage.json devDependencies
next.config.ts@next/mdx import@next/mdx, @mdx-js/reactpackage.json dependencies
next.config.tswithPWA wrappernext-pwapackage.json dependencies
tailwind.config.ts@tailwindcss/typography plugin@tailwindcss/typographypackage.json devDependencies
vite.config.ts@vitejs/plugin-react import@vitejs/plugin-reactpackage.json devDependencies

PHP​

Config FileSignalRequired DependencyCheck In
composer.jsonlaravel/octane in requireswoole ext OR spiral/roadrunnerphp -m or composer.json
composer.jsonlaravel/horizon in requireRedis extensionphp -m

Go​

Config FileSignalRequired DependencyCheck In
sqlc.yamlexistssqlc binarywhich sqlc
wire.go//go:build wireinjectwire binarywhich wire

Validation algorithm:

  1. Read framework config files for signals
  2. For each signal found, check if required dependency is present
  3. If missing → classify as missing-dependency with config context

Smoke Test Patterns​

Health Endpoint Conventions​

FrameworkHealth PathExpected Response
Fastify/health{ status: "ok" } or 200 OK
Express/health200 OK with JSON body
Next.js/api/health200 OK with JSON body
Laravel/api/health200 OK with JSON body
Symfony/health200 OK
Go (any)/health200 OK with JSON body

Production Detection Rules​

Never run write operations if any of these are detected:

  • DATABASE_URL contains amazonaws.com, azure.com, cloud.google.com
  • NODE_ENV=production in loaded environment
  • .env.production is the active env file
  • Connection string contains hostnames that are not localhost, 127.0.0.1, or host.docker.internal

Write Endpoint Safety Protocol​

  1. Require explicit user approval via AskUserQuestion before each write endpoint test
  2. Use unique identifiers in test data (prefix with _jaan_test_)
  3. Record created resource IDs for cleanup
  4. After testing: DELETE all created resources
  5. Verify cleanup succeeded

Integration Manifest Validation​

How to use .last-integration-manifest from dev-output-integrate Step 13.

Reading the Manifest​

The manifest file is at $JAAN_OUTPUTS_DIR/.last-integration-manifest. Format: one relative path per line (relative to project root).

src/routes/auth/login.ts
src/routes/auth/register.ts
src/services/auth.service.ts
prisma/schema.prisma

Scope Narrowing​

When the manifest exists:

  1. Read all paths from manifest
  2. Scope build validation to these files (check that they compile)
  3. Present: "Last integration included {N} files; validating all {N}..."

Drift Detection​

Compare manifest against current project state:

  • Files in manifest but missing from project → flag as "integration gap"
  • Files in project modified after manifest timestamp → note as "post-integration changes"

Frontend Health Detection​

Frontend frameworks that serve HTML rather than JSON health endpoints.

FrameworkDefault PortCheck URLExpected
Next.js3000GET /HTTP 200, HTML content
Vite (React/Vue)5173GET /HTTP 200, HTML content
Laravel Blade/Inertia8000 (shared)GET /HTTP 200, HTML content
Go templates8080 (shared)GET /HTTP 200, HTML content

Shared-port services: Laravel Blade/Inertia and Go templates serve both API and frontend on the same port. Check both /api/health (JSON) and / (HTML) on the same port.


Framework-Agnostic Routing Detection​

How to discover available routes for contract validation and smoke tests.

File-Based Routing​

  • Next.js app/ directory: Each page.tsx → route path. Also check route.ts for API routes.
  • Nuxt pages/ directory: Same convention as Next.js.

Config-Based Routing​

  • Laravel routes/api.php: Parse Route::get(), Route::post(), etc.
  • Go http.ServeMux or chi router: Parse r.Get(), r.Post(), mux.HandleFunc() patterns.
  • Fastify: Parse route registration in plugin files.

Hybrid Routing​

  • Laravel + Inertia: Backend routes at /api/* (from routes/api.php), frontend routes at /* (from routes/web.php).
  • Go + templates: API routes and template routes on same server.

Route Discovery Priority​

  1. OpenAPI spec (most authoritative)
  2. Framework route config files
  3. File-based routing conventions
  4. Fallback: /health and / only