Skip to content

SIDDARTHA577/envguard-node / .agents/skills/envguard-production-readiness

envguard-production-readiness

Verified

Guides comprehensive, evidence-based application production readiness assessments across environment configuration, build and tests, security posture, API contracts, database persistence, and operational reliability.

FileKindSize
SKILL.mdskill md15.1 KB
scripts/readiness-auditor.mjsscript27.1 KB
scripts/readiness/adapters/android-adapter.mjsscript30.0 KB
scripts/readiness/adapters/base-adapter.mjsscript4.6 KB
scripts/readiness/adapters/flutter-adapter.mjsscript28.9 KB
scripts/readiness/adapters/generic-adapter.mjsscript15.9 KB
scripts/readiness/adapters/index.mjsscript661 B
scripts/readiness/adapters/ios-adapter.mjsscript21.0 KB
scripts/readiness/adapters/java-spring-adapter.mjsscript39.9 KB
scripts/readiness/adapters/nextjs-react-adapter.mjsscript30.5 KB
scripts/readiness/adapters/node-typescript-adapter.mjsscript115.8 KB
scripts/readiness/adapters/python-adapter.mjsscript44.0 KB
scripts/readiness/adapters/react-native-adapter.mjsscript34.6 KB
scripts/readiness/adapters/registry.mjsscript3.7 KB
scripts/readiness/architecture/applicability.mjsscript21.8 KB
scripts/readiness/architecture/architecture-inventory.mjsscript16.9 KB
scripts/readiness/architecture/architecture-reporter.mjsscript9.4 KB
scripts/readiness/architecture/capacity-model.mjsscript16.9 KB
scripts/readiness/architecture/design-decisions.mjsscript42.0 KB
scripts/readiness/architecture/failure-modes.mjsscript13.3 KB
scripts/readiness/architecture/index.mjsscript895 B
scripts/readiness/architecture/requirements.mjsscript22.0 KB
scripts/readiness/architecture/tradeoffs.mjsscript4.5 KB
scripts/readiness/capacity/benchmark-runner.mjsscript13.4 KB
scripts/readiness/constants.mjsscript6.0 KB
scripts/readiness/deployment/cicd-gate-validator.mjsscript6.1 KB
scripts/readiness/deployment/container-validator.mjsscript10.1 KB
scripts/readiness/deployment/deployment-gate.mjsscript4.8 KB
scripts/readiness/deployment/index.mjsscript411 B
scripts/readiness/deployment/k8s-validator.mjsscript8.8 KB
scripts/readiness/deployment/reliability-validator.mjsscript9.4 KB
scripts/readiness/engine/discovery.mjsscript15.4 KB
scripts/readiness/engine/index.mjsscript341 B
scripts/readiness/engine/orchestrator.mjsscript21.0 KB
scripts/readiness/engine/planner.mjsscript4.2 KB
scripts/readiness/engine/sarif.mjsscript12.7 KB
scripts/readiness/engine/skills-selector.mjsscript10.0 KB
scripts/readiness/execution/git.mjsscript2.3 KB
scripts/readiness/execution/runner.mjsscript11.9 KB
scripts/readiness/index.mjsscript516 B
scripts/readiness/orchestration/engineering-workflow.mjsscript18.5 KB
scripts/readiness/orchestration/index.mjsscript170 B
scripts/readiness/policies/index.mjsscript189 B
scripts/readiness/policies/release-policy.mjsscript9.5 KB
scripts/readiness/remediation/checkpoint-manager.mjsscript34.0 KB
scripts/readiness/remediation/diff-viewer.mjsscript2.5 KB
scripts/readiness/remediation/index.mjsscript778 B
scripts/readiness/remediation/patch-generator.mjsscript17.5 KB
scripts/readiness/remediation/remediation-runner.mjsscript9.9 KB
scripts/readiness/reporters/comparator.mjsscript20.7 KB
scripts/readiness/reporters/index.mjsscript293 B
scripts/readiness/reporters/json-reporter.mjsscript193 B
scripts/readiness/reporters/markdown-reporter.mjsscript18.8 KB
scripts/readiness/validation/evidence-matrix.mjsscript21.5 KB
scripts/readiness/validation/independent-app-runner.mjsscript26.2 KB
scripts/readiness/validation/index.mjsscript328 B
---
name: envguard-production-readiness
description: Guides comprehensive, evidence-based application production readiness assessments across environment configuration, build and tests, security posture, API contracts, database persistence, and operational reliability.
---

# `envguard-production-readiness` Skill

Guides engineers and AI agents in conducting rigorous, evidence-based application production readiness assessments. Audits real project configurations across environment security, build and test verification, security boundaries, REST/OpenAPI contracts, database persistence, and operational reliability. Distinguishes verified facts, warnings, blocking failures, and unverified assumptions without claiming absolute certification.

## When to Trigger
- Evaluating an application, service, or API for deployment readiness before shipping to staging or production.
- Running the standalone EnvGuard Readiness Auditor (`tools/readiness-auditor.mjs`) on a local repository.
- Generating structured production readiness reports (machine-readable JSON and human-readable Markdown).
- Auditing operational configurations including health checks, graceful shutdown handlers, containerization, and CI/CD pipelines.
- Formulating a prioritized remediation plan for critical deployment blockers and security risks.

## When NOT to Trigger
- Designing high-level distributed architecture from scratch before code exists (use `envguard-system-design`).
- Setting up initial EnvGuard environment validation for the first time (use `envguard-setup`).
- Conducting focused WCAG screen reader accessibility testing exclusively (use `envguard-accessibility`).
- Writing raw database migrations or tuning SQL indexes in isolation (use `envguard-database`).

## Supported Projects & Environments
- Runtimes: Node.js (22.x, 24.x, 26.x), Bun, TypeScript, modern JavaScript (ESM / CommonJS), Python (3.10+), Java (17, 21, 25 LTS), Dart (3.x), Kotlin/Java (Android), Swift (iOS).
- Web, Backend & Mobile Frameworks: Express, Fastify, Next.js, NestJS, React, Vue, Svelte, Django, FastAPI, Flask, Spring Boot (Maven & Gradle), React Native, Expo, Flutter, Android Native, iOS Native.
- Container & Deployment Tech: Docker, Docker Compose, Kubernetes, Gunicorn, Uvicorn, GitHub Actions, GitLab CI.
- Operating Systems: Linux (Ubuntu/Debian), macOS, Windows.

## Supported Platform Adapters
The Readiness Analyzer employs modular platform adapters that automatically resolve based on repository artifacts:
1. **Generic Platform Adapter (`GenericAdapter`)**: Baseline environment security (.env, .gitignore), Containerfile inspection, CI workflow audits, and SARIF static analysis import.
2. **Node.js & TypeScript Adapter (`NodeTypeScriptAdapter`)**: Dependency vulnerability tooling, TypeScript configurations, standard REST server patterns, Prisma/Drizzle/TypeORM migrations and composite indexing, and SQL injection prevention.
3. **Next.js & React Adapter (`NextJsReactAdapter`)**: Server Actions security, client/server boundary leakage prevention (`NEXT_PUBLIC_`), Image optimization, and React error boundaries.
4. **Python Platform Adapter (`PythonAdapter`)**: Django (`manage.py`, `settings.py`), FastAPI, and Flask projects. Checks include:
   - Packaging and lockfiles (`pyproject.toml`, `requirements.txt`, `poetry.lock`, `uv.lock`, `Pipfile`).
   - Runtime version constraints (PEP 621 `requires-python = ">=3.11"` or `.python-version`).
   - Production `DEBUG = False` and cryptographic `SECRET_KEY` loading from environment.
   - Host header guardrails (`ALLOWED_HOSTS`).
   - Session and CSRF cookie flags (`SESSION_COOKIE_SECURE`, `CSRF_COOKIE_SECURE`).
   - SQL injection defenses (prohibits f-string or `%` formatting in `cursor.execute()`).
   - Django `CsrfViewMiddleware` enforcement and CORS origin boundaries.
   - Database migrations (Django `migrations/` and Alembic `alembic.ini`).
   - Automated test suite configuration (pytest / unittest).
   - Production WSGI/ASGI application servers (Gunicorn / Uvicorn).
5. **Java & Spring Boot Adapter (`JavaSpringBootAdapter`)**: Spring Boot applications with Maven (`pom.xml`) or Gradle (`build.gradle`, `build.gradle.kts`). Checks include:
   - Build descriptors and wrapper scripts (`mvnw`, `gradlew`).
   - Explicit target Java versions (`<java.version>21</java.version>`, `sourceCompatibility = '21'`).
   - Spring Actuator endpoint security (flags wildcard `exposure.include=*`).
   - Spring Security authorization rules (flags `anyRequest().permitAll()`).
   - Cryptographic password encoding (flags plaintext `NoOpPasswordEncoder`).
   - Externalized database credentials (flags plaintext `spring.datasource.password`).
   - Safe JPA/Hibernate `ddl-auto` modes (flags destructive `create`, `create-drop`, and `update` in favor of `validate` or `none`).
   - Versioned database migration frameworks (Flyway in `db/migration` or Liquibase in `db/changelog`).
   - SQL injection defenses (flags raw string concatenation in `createNativeQuery()` or `createQuery()`).
   - Automated JUnit 5 test suites.
6. **React Native & Expo Adapter (`ReactNativeAdapter`)**: React Native and Expo mobile applications. Standardized OWASP MASVS v2.0 mapping:
   - Hardware-backed key storage (`expo-secure-store` or `react-native-keychain` over unencrypted `AsyncStorage`).
   - Deep link scheme validation (`prefixes` or custom schemes without wildcards).
   - Origin-restricted WebView configurations (`originWhitelist` prohibiting `['*']`).
   - Production log stripping (eliminates sensitive `console.log` in production bundles).
   - React error boundaries, NetInfo network resilience, and AppState lifecycle listeners.
7. **Flutter & Dart Adapter (`FlutterAdapter`)**: Flutter cross-platform applications:
   - Sound null safety in Dart SDK constraints (`>=3.0.0 <4.0.0`) and locked dependencies (`pubspec.lock`).
   - Secure token storage (`flutter_secure_storage` over cleartext `shared_preferences`).
   - Static analysis linter rules (`analysis_options.yaml` with `flutter_lints`).
   - Uncaught asynchronous error handlers (`runZonedGuarded` / `PlatformDispatcher.onError`).
   - State controller resource disposal (`dispose()` on `TextEditingController`, `AnimationController`, `StreamController`).
8. **Android Native Adapter (`AndroidAdapter`)**: Kotlin and Java Android native applications:
   - App manifest security: `targetSdk >= 33`, `android:allowBackup="false"`, `android:usesCleartextTraffic="false"`, network security config.
   - Unprotected exported components audit (verifies `android:exported="true"` has explicit `android:permission`).
   - Encrypted token storage (`androidx.security:security-crypto` EncryptedSharedPreferences).
   - Release signing security (verifies release keystore passwords are not committed in plaintext).
   - Code obfuscation and shrinking (`minifyEnabled true` with `proguard-rules.pro`).
9. **iOS & Apple Native Adapter (`IosAdapter`)**: Swift and Objective-C iOS applications:
   - Minimum deployment target (`IPHONEOS_DEPLOYMENT_TARGET` / `Package.swift` platforms >= iOS 15.0).
   - App Transport Security (ATS) enforcement (flags `NSAllowsArbitraryLoads = true`).
   - iOS Keychain Services token storage (`SecItemAdd` / `SecItemCopyMatching` over cleartext `UserDefaults`).
   - Apple Privacy Manifest compliance (`PrivacyInfo.xcprivacy` with declared tracking and required reason APIs).
   - Objective, honest test evaluation: Marks native macOS `xcodebuild` as `NOT_RUN` on non-macOS runners with explicit prerequisite guidance.

## Required Tools & Permissions
- Tools: File reader, file writer, command runner (`read_file`, `write_file`, `run_command`).
- Permissions: Project workspace read-only permission by default. Explicit authorization (`--allow-exec`) required to execute local build, test, or lint commands.
- Subprocess Safeguards: Command timeouts (10s default), sanitized stdout/stderr, non-elevated privileges.

## Expected Inputs
- Target project repository root directory.
- Optional scope parameter specifying categories: `discovery`, `env`, `build_test`, `security`, `api`, `database`, `deployment`, `accessibility`, `performance`.
- Execution authorization grant (`--allow-exec`) if dynamic command verification is requested by the user.

## Step-by-Step Workflow

### Step 1: Pre-Flight Safety & Authorization Check
- Confirm the target directory is safe and contained within the authorized project root (prevent path traversal).
- Determine execution mode:
  - **Default (Read-Only)**: Static inspection of configurations, manifests, schemas, and source code. Test/build execution is reported as `NOT_RUN`.
  - **Authorized (`--allow-exec`)**: Explicitly permitted execution of declared `package.json` scripts (`build`, `test`, `typecheck`, `lint`) with bounded timeouts.
- **Rule**: Never run arbitrary untrusted scripts, database drop commands, or unapproved network requests.

### Step 2: Execute Readiness Scan
- Locate the readiness auditor script in your workspace:
  - If installed via skill pack (.agents): `node .agents/skills/envguard-production-readiness/scripts/readiness-auditor.mjs`
  - If installed via Antigravity/Claude (skills): `node skills/envguard-production-readiness/scripts/readiness-auditor.mjs`
  - If running in EnvGuard repository checkout: `node tools/readiness-auditor.mjs`
- Preview planned commands and potential effects without execution:
  ```bash
  node .agents/skills/envguard-production-readiness/scripts/readiness-auditor.mjs scan --project ./my-app --preview-commands
  ```
- Run standard read-only assessment:
  ```bash
  node .agents/skills/envguard-production-readiness/scripts/readiness-auditor.mjs scan --project ./my-app --format both --output-dir ./reports
  ```
- Import external SAST / CodeQL results via SARIF:
  ```bash
  node .agents/skills/envguard-production-readiness/scripts/readiness-auditor.mjs scan --project ./my-app --sarif ./results.sarif --format both --output-dir ./reports
  ```
- Run authorized verification in container isolation or with explicit host trust:
  ```bash
  node .agents/skills/envguard-production-readiness/scripts/readiness-auditor.mjs scan --project ./my-app --allow-exec --trust-project --format both --output-dir ./reports
  ```

### Step 3: Nine Modular Assessment Dimensions
1. **Project Discovery**: Detects manifest (`package.json`), runtime versions (`engines.node`, `.nvmrc`), lockfiles (`package-lock.json`, `pnpm-lock.yaml`), and frameworks.
2. **Environment Configuration**: Verifies template presence (`.env.example`), `.gitignore` exclusions for `.env`, startup schema validation (`guard()`), and flags hardcoded secrets.
3. **Build & Test Readiness**: Verifies passing status for build, test, lint, and typecheck scripts. When unapproved, marks as `NOT_RUN`.
4. **Security Readiness**: Audits automated dependency update tooling (Dependabot/Renovate), sensitive logging patterns, security headers (`helmet`), CORS, cookie security (`httpOnly`, `secure`, `sameSite`), hardcoded JWT secrets, multi-tenant query isolation, administrative route authorization, and SARIF static analysis import.
5. **API Contract Readiness**: Validates OpenAPI 3.x schema structure, RFC 7807/9457 Problem Details error models, RESTful URL naming, collection pagination limits, rate limiting middleware, and mutation idempotency.
6. **Database Readiness**: Checks for database driver/ORM presence, versioned schema migrations with rollback support (`migrations/*.down.sql`), foreign key relation indexes, and parameterized query enforcement against raw SQL injection.
7. **Deployment & Operations**: Verifies containerization (`Dockerfile`), health check routes (`/health`), graceful shutdown signal listeners (`SIGTERM`), and CI workflows.
8. **Accessibility & Frontend**: Detects accessibility tooling (`eslint-plugin-jsx-a11y`, `axe-core`), route error boundaries (`error.tsx`), accessible form feedback, and flags screen reader navigation as `MANUAL_REVIEW`.
9. **Performance Readiness**: Identifies load test scripts (k6) and flags live synthetic traffic generation as `NOT_RUN`.

### Step 4: Interpret Standardized Findings
Analyze findings categorized by the standardized status taxonomy:
- **PASS**: Verified passing criteria backed by static evidence or successful command execution.
- **FAIL**: Concrete blocking defect (e.g. failing test suite, unignored `.env` file, malformed OpenAPI spec).
- **WARNING**: Potential architectural risk or missing convention (e.g. missing `/health` route, unconfigured Dependabot).
- **NOT_RUN**: Check intentionally skipped due to lack of execution authorization or unavailable staging infrastructure.
- **MANUAL_REVIEW**: Finding requiring human inspection (e.g. database failover policy, keyboard screen-reader testing).
- **NOT_APPLICABLE**: Check irrelevant to project type (e.g. frontend checks on headless worker microservices).

### Step 5: Route Findings to Specialized EnvGuard Skills
Connect identified issues with focused EnvGuard skills for specialized remediation:
- Environment variable leaks or missing templates -> Route to `envguard-audit` or `envguard-setup` or `envguard-review`.
- Failing CI/CD pipelines -> Route to `envguard-ci`.
- OpenAPI schema violations or missing RFC 7807 models -> Route to `envguard-api-design`.
- Logic bugs, memory leaks, or test gaps -> Route to `envguard-code-review`.
- UI token inconsistency or layout defects -> Route to `envguard-ui-design`.
- WCAG keyboard trap or contrast failures -> Route to `envguard-accessibility`.
- Backend route structure or graceful shutdown -> Route to `envguard-backend`.
- Database schema migration planning -> Route to `envguard-database`.

## Validation Steps
- Verify that both machine-readable JSON (`readiness-report.json`) and Markdown (`readiness-report.md`) reports are generated.
- Ensure that zero real passwords, tokens, or environment values are printed in logs or reports.
- Verify that `NOT_RUN` checks are never falsely classified as `PASS`.
- Confirm that no overall "readiness percentage" is fabricated.

## Expected Outputs
- `readiness-report.json`: Versioned JSON assessment conforming to `catalog/readiness-report.schema.json`.
- `readiness-report.md`: Structured Markdown report including Executive Summary, Blockers, Warnings, Passed Checks, Manual Review Items, and Prioritized Remediation Plan.
- Concrete terminal summary with clean exit code behavior (0 = all passing/warnings, 2 = blocking failures exist).

## Failure Handling
- If target project `package.json` is missing or malformed, record a critical `DISC-001` failure and evaluate remaining files rather than crashing.
- If a project command times out during `--allow-exec`, capture timeout evidence and record a `FAIL` status without hanging the process.

## Safety & Privacy Boundaries
- **NEVER** inspect private `.env` files or display real environment variable secrets.
- **NEVER** execute production database migrations or connect to live customer databases during readiness analysis.
- **NEVER** run high-load performance traffic tests against production environments.
- Subprocess execution is strictly gated behind explicit `--allow-exec` authorization.

## Example User Prompts
- "Analyze my full-stack application for production readiness with envguard-production-readiness"
- "Run the readiness auditor on our backend API in read-only mode and list all blocking issues"
- "Generate a complete production readiness report with authorized test execution using --allow-exec"
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall