Nine Lazy Prompts, Rebuilt
Nine one-line developer prompts were run through VantagePrompt unedited. Each came back as a full specification of roughly 430 to 580 words across nine sections — role, context, task, objective, requirements, instructions, output_format, examples, verification — an expansion of 45x to 145x. The value is not the extra words but the constraints the original never stated.
What actually happens when you feed a prompt optimizer the kind of line you really type? Nine of them, unedited, with the verbatim output for each and the numbers underneath.
By Andrei Bădulescu, Founder at VantagePrompt·Updated
Every prompt below started as one lazy line. Not a cleaned-up version of a lazy line, and not a straw man written to lose — the exact thing a working developer types when they are mid-task and cannot be bothered. Each one was run through the optimizer once, on the auto route, with no editing before or after.
What comes back is not a longer prompt. It is a different kind of object: a specification, with a role, a bounded task, enumerated deliverables, explicit exclusions, an output contract, and a verification checklist the model can hold itself to. The length is a side effect. The constraints are the point.
The nine sections every one of them produced
Nine different questions, from a database migration to a React component, and the same skeleton came back for all of them. That consistency is the mechanism, not a coincidence: the pipeline classifies the request, picks a meta-template, then expands into a fixed structure.
- role — who the model is answering as, bounded to one discipline
- context — the situation the work happens in
- task — the single thing to do
- objective — what success looks like, separately from the task
- requirements — the constraints, including what is explicitly excluded
- instructions — the ordered steps
- output_format — the exact shape of the answer
- examples — a pattern to follow and, often, one to avoid
- verification — the checklist the model runs against its own output
The section most people never write themselves is the last one. A prompt that tells the model how to check its own work is the difference between an answer and a reviewed answer.
1. make this faster
Three words gave it no language, no metric, no budget. It answered by demanding the complexity number before and after — the one thing that makes "faster" checkable.
<role>
Principal Performance Engineer and Systems Architect specializing in algorithmic optimization, profiling, memory management, and runtime efficiency across modern programming languages.
</role>
<context>
The user provides a code snippet, function, or query that suffers from performance bottlenecks, high algorithmic complexity, excessive memory allocation, or inefficient I/O operations. The target environment requires latency reduction, throughput improvements, and optimal resource utilization without altering functional behavior.
</context>
<task>
Analyze the provided code, identify performance bottlenecks (such as redundant iterations, unnecessary memory allocations, suboptimal data structures, or slow I/O/DB queries), and rewrite the implementation to maximize execution speed and efficiency.
</task>
<objective>
Refactor the input code to achieve lower computational complexity (time and space), minimize runtime latency, and preserve exact functional parity and edge-case correctness.
</objective>
<requirements>
- Algorithmic efficiency: Reduce Big-O time and space complexity where possible (e.g., replacing nested scans with hash lookups, using vectorized operations, or employing in-place mutations).
- Resource management: Eliminate redundant memory allocations, object instantiations, and unbuffered I/O.
- Correctness: Maintain full behavioral compatibility with all edge cases (null/empty inputs, boundary conditions, concurrency safety).
- Maintainability: Keep the optimized code clean, readable, and compliant with target language idioms and standard formatting conventions.
- Exclusions: Avoid micro-optimizations that sacrifice readability for negligible gains unless high-throughput profiling explicitly warrants it.
</requirements>
<instructions>
1. Identify the primary bottlenecks in the provided implementation (e.g., computational complexity, I/O blocking, excessive heap allocations).
2. Briefly summarize the optimization strategy and theoretical complexity improvements (Before vs. After).
3. Provide the refactored, fully optimized code implementation.
4. Detail any tradeoffs made (such as increased memory usage for reduced time complexity) and note potential hardware or runtime-specific tuning options.
</instructions>
<output_format>
```language
// Optimized implementation
function optimizedSolution(params) {
// Logic implementation
}
```
</output_format>
<examples>
Pattern to avoid:
```javascript
// O(n^2) nested lookup
const duplicates = listA.filter(itemA => listB.some(itemB => itemB.id === itemA.id));
```
Optimized pattern:
```javascript
// O(n) set lookup
const setB = new Set(listB.map(itemB => itemB.id));
const duplicates = listA.filter(itemA => setB.has(itemA.id));
```
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in <output_format>.
- [ ] Length stays within the bounds stated in <requirements>.
- [ ] Code parses without syntax errors and is runnable as written.
</verification>2. clean up this messy code
The first line is the one that matters. "Clean up" usually returns a diff that breaks every caller. This one is contractually forbidden from touching the public surface.
<role>
Staff Software Engineer and Code Quality Specialist with expertise in clean architecture, refactoring patterns, and language-specific idiomatic style.
</role>
<context>
A provided block of source code contains readability issues, anti-patterns, poor naming conventions, deep nesting, or unhandled edge cases that reduce maintainability and increase technical debt.
</context>
<task>
Refactor and clean up the supplied code to produce idiomatic, production-ready code that maintains full functional equivalence while maximizing readability, performance, and maintainability.
</task>
<objective>
Transform the input code into a clean, well-structured implementation that adheres to single-responsibility principles, eliminates dead or duplicated logic, improves error resilience, and conforms to standard style conventions.
</objective>
<requirements>
- Preserve existing external API contracts, expected inputs, and return values.
- Apply consistent, self-documenting naming for variables, functions, and classes.
- Flatten deeply nested conditional branches using early returns and guard clauses.
- Remove redundant variables, unused imports, commented-out dead code, and duplicate logic.
- Ensure strict type safety and type annotations where supported by the language.
- Provide explicit error handling without silent failures or generic, unhandled exceptions.
- Add minimal, meaningful comments strictly for complex business domain logic.
</requirements>
<instructions>
1. Identify all code smells, anti-patterns, redundant operations, and style violations in the target code.
2. Outline the refactoring strategy briefly (e.g., extracted helper functions, simplified control flow, updated data structures).
3. Produce the fully refactored, idiomatic code block.
4. List the key improvements made (e.g., complexity reduction, naming fixes, error handling enhancements).
</instructions>
<output_format>
```<language>
// Refactored implementation
function cleanExample(input: InputType): ReturnType {
// Guard clauses and core logic
}
```
Followed by a concise bulleted list summarizing the specific refactoring actions applied.
</output_format>
<examples>
```typescript
// Before:
function p(d: any) {
if (d != null) {
if (d.length > 0) {
for (let i = 0; i < d.length; i++) {
if (d[i].active == true) {
console.log(d[i].name);
}
}
}
}
}
// After:
function logActiveUserNames(users: User[] | null | undefined): void {
if (!users?.length) return;
users
.filter((user) => user.isActive)
.forEach((user) => console.log(user.name));
}
```
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in <output_format>.
- [ ] Length stays within the bounds stated in <requirements>.
- [ ] Code parses without syntax errors and is runnable as written.
</verification>3. this is broken in production, fix it
Steps 4 and 5 are the ones nobody types at 3am. A patch with no failing test and no rollback trigger is just the next incident, scheduled.
<role>
Principal Site Reliability Engineer and Senior Systems Architect specializing in rapid production incident remediation, root cause analysis (RCA), and high-availability systems recovery.
</role>
<context>
A critical software component or service is currently failing in a production environment, requiring immediate triage, defect localization, and deployment of a stable patch to restore service availability without introducing regressions.
</context>
<task>
Diagnose the production failure from provided stack traces, logs, or failing source code, determine the exact root cause, and implement the minimal, robust fix necessary to restore operational stability.
</task>
<objective>
Eliminate the active production error, prevent cascading failures, restore normal service throughput and latency, and provide a verified patch ready for immediate deployment.
</objective>
<requirements>
- Scope discipline: Implement the minimal viable patch to resolve the defect without unnecessary refactoring or scope creep.
- Error handling: Ensure explicit error capture, descriptive logging, and graceful degradation where recovery is impossible.
- Defensive programming: Add null checks, input sanitization, timeout enforcement, and boundary validation around failure points.
- Concurrency and state: Guarantee thread-safety, transaction integrity, and idempotent execution where state modification is involved.
- Zero-regression guarantee: Maintain backward compatibility with existing APIs, database schemas, and configuration contracts.
</requirements>
<instructions>
1. Triage the failure: identify the failure mechanism (e.g., uncaught exception, race condition, resource leak, data serialization mismatch, or deadlock).
2. Detail the root cause in 2-3 concise sentences.
3. Provide the full code fix for the affected component, showing exact file paths and line modifications.
4. Supply a minimal reproduction test case or unit test that fails prior to the fix and passes afterward.
5. List required rollback plans or monitoring metrics to track during deployment.
</instructions>
<output_format>
```language
// path/to/fixed_file.ext
// Complete modified function or class resolving the incident
```
</output_format>
<examples>
```typescript
// services/paymentService.ts
// Counter-example: Swallowing error silently
// catch (e) { return null; }
// Fixed implementation: Explicit handling with context propagation
try {
const result = await idempotencyClient.execute(transactionId, () => gateway.charge(payload));
return { success: true, transactionId: result.id };
} catch (error: unknown) {
logger.error({ error, transactionId }, "Payment gateway execution failed");
throw new PaymentProcessingException("Upstream payment failure", { cause: error });
}
```
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows standard language conventions.
- [ ] Edge cases listed in requirements are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad uncaught errors).
- [ ] No new dependencies or breaking API changes introduced.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in output_format.
- [ ] Length stays within the bounds stated in requirements.
- [ ] Code parses without syntax errors and is runnable as written.
</verification>4. explain this codebase to me and tell me whats wrong with it
It is not allowed to say "the code could be cleaner." Every finding names a file and a failure mode, then proposes the guardrail that stops it coming back.
<role>
Principal Software Architect and Senior Code Reviewer with deep expertise across modern multi-tier architectures, static code analysis, and system refactoring.
</role>
<context>
A target codebase or module provided by the user needs a comprehensive architectural breakdown and a critical technical audit to identify defects, code smells, architectural anti-patterns, performance bottlenecks, and security vulnerabilities.
</context>
<task>
Perform a dual-purpose analysis of the provided codebase:
1. Explain the architecture, core execution paths, domain models, and key design patterns in plain, structured technical language.
2. Conduct an in-depth code review detailing bugs, performance issues, maintainability risks, and security gaps, followed by actionable remediation options and integration strategies.
</task>
<objective>
Provide a clear, high-level and granular understanding of how the system functions, pinpoint concrete technical deficiencies with severity ratings, and propose prioritized, idiomatic refactoring paths and developer workflows to improve overall code quality.
</objective>
<requirements>
- Categorize findings clearly across correctness, performance, security, maintainability, and testing gaps.
- Provide concrete remediation recommendations across multiple dimensions:
- CI/CD automated pipeline checks
- Local validation and pre-commit hooks
- Code review guidelines and checklists
- Onboarding reference documentation for incoming engineers
- Highlight trade-offs and prioritization criteria (effort vs. impact) for suggested fixes.
- Avoid vague critiques; reference specific files, functions, patterns, or logic structures from the provided code.
- Length: comprehensive yet concise, focusing strictly on actionable engineering insights without unnecessary filler.
</requirements>
<instructions>
1. Parse the provided codebase structure, dependency manifest, entry points, and data flow to produce a concise architectural summary.
2. Identify core domain entities, service boundaries, and state management mechanisms.
3. Perform a systematic review of the codebase to isolate bugs, anti-patterns (e.g., tight coupling, race conditions, memory leaks, unhandled errors), and security risks.
4. Categorize all issues by severity (Critical, High, Medium, Low) and present remediation steps for each.
5. Provide actionable tooling, pipeline, and process recommendations (linters, static analyzers, test automation, pre-commit hooks) to prevent recurrence.
</instructions>
<output_format>
## System Overview & Architecture
- [High-level summary of system purpose, stack, and structural organization]
## Core Data Flow & Key Components
- [Explanation of execution paths, key modules, and runtime behavior]
## Technical Audit & Defect Analysis
| Severity | Component / Location | Issue Description | Impact |
|---|---|---|---|
| Critical / High / Med / Low | [File / Module] | [Summary of the bug or smell] | [Failure mode or risk] |
## Prioritized Remediation & Trade-Offs
- [Actionable steps categorized by effort vs. impact]
## Workflow, CI/CD & Quality Guardrails
- **Pre-commit & Local Tooling**: [Recommended linters, hooks, and static analysis tools]
- **CI/CD Pipeline Checks**: [Automated build, test, and scanning stages]
- **Code Review Checklist**: [Key criteria for peer reviews]
- **Team Onboarding Notes**: [Critical context for developers maintaining this code]
</output_format>
<examples>
### Example Audit Item
- **Location**: `src/services/order_service.py:process_payment()`
- **Issue**: Unhandled network timeout when invoking third-party payment gateway, leading to orphaned transaction state.
- **Remediation**: Wrap the HTTP call in a retry-with-backoff handler and execute state transition inside a database transaction block.
</examples>
<verification>
- [ ] Codebase architecture, data flows, and component responsibilities are clearly mapped.
- [ ] All critical bugs, security vulnerabilities, and code smells are explicitly identified with severity levels.
- [ ] Actionable remediation steps include tooling (linters, CI/CD, pre-commit) and process improvements.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in <output_format>.
- [ ] Length stays within the bounds stated in <requirements>.
</verification>5. build me a react component for this
Six words asked for a component. What came back is the half everyone skips: the empty state, the loading state, the null prop, and the keyboard.
<role>
Senior Frontend Architect specializing in React 18+, TypeScript, accessibility (a11y), and modern component design systems.
</role>
<context>
Modern React web application built with TypeScript and functional components. The component must adhere to standard design system practices, composability, responsive layout principles, and standard accessibility standards (WCAG 2.1 AA).
</context>
<task>
Build a fully typed, reusable, and accessible React functional component in TypeScript based on specified requirements, including prop types, state handling, event listeners, and semantic HTML structure.
</task>
<objective>
Deliver clean, production-ready React component code that is performant, easy to maintain, fully accessible via keyboard and screen readers, and resilient to missing or edge-case props.
</objective>
<requirements>
- Language & Framework: React 18+, TypeScript (strict mode enabled).
- Component Structure: Functional component using hooks (`useState`, `useEffect`, `useMemo`, `useCallback` where appropriate).
- Typing: Explicit TypeScript interfaces for component props, internal state, and event handlers; avoid `any`.
- Styling: Standard Tailwind CSS classes or modular CSS/inline styling compatible with standard design systems.
- Accessibility: Semantic HTML elements, ARIA attributes (`aria-expanded`, `aria-label`, `role`), and full keyboard navigation support (Enter, Space, Escape, Arrow keys where applicable).
- Error & Edge Handling: Proper fallback rendering for empty states, loading states, and undefined/null props.
- Exclusions: Avoid class components, unnecessary re-renders, inline anonymous complex logic, and external runtime dependencies not commonly found in a standard React setup.
</requirements>
<instructions>
1. Define the TypeScript interface for the component props with descriptive comments and sensible default values.
2. Implement the component logic, managing necessary state, derived values, and lifecycle effects cleanly.
3. Render semantic, accessible JSX incorporating conditional rendering and edge-case handling.
4. Export the component as standard (named or default export) with proper display name.
5. Provide a minimal usage example illustrating common and edge-case prop configurations.
</instructions>
<output_format>
```tsx
import React from 'react';
export interface ComponentProps {
// Define props with types
title?: string;
className?: string;
onAction?: () => void;
}
export const Component: React.FC<ComponentProps> = ({
title,
className = '',
onAction,
}) => {
// Logic and state handling
return (
<div className={`base-styles ${className}`}>
{/* Component JSX */}
</div>
);
};
export default Component;
```
</output_format>
<examples>
```tsx
// Preferred pattern: explicit props interface, accessible elements, clean default props
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary';
isLoading?: boolean;
}
export const Button: React.FC<ButtonProps> = ({
children,
variant = 'primary',
isLoading = false,
disabled,
...props
}) => (
<button
disabled={disabled || isLoading}
aria-busy={isLoading}
className={`btn btn-${variant}`}
{...props}
>
{isLoading ? <span>Loading...</span> : children}
</button>
);
```
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble
- [ ] Format matches the shape requested in <output_format>
- [ ] Length stays within the bounds stated in <requirements>
- [ ] Code parses without syntax errors and is runnable as written
</verification>6. design my database and write the migration
The lowest-scoring prompt in the set, at 84 — and the sharpest line in it is a warning about what not to index. Ask for a migration, get the rollback too.
<role>
Principal Database Architect and Senior Backend Engineer specializing in relational data modeling, schema optimization, and migration strategies.
</role>
<context>
The project requires a production-grade relational database architecture and corresponding idempotent migration scripts. The schema must enforce relational integrity, optimize for common query patterns, and maintain strict data consistency standards for a scalable application backend.
</context>
<task>
Design a comprehensive relational database schema and generate the complete DDL migration script (PostgreSQL-compatible SQL) to instantiate tables, relationships, constraints, foreign keys, and indexes.
</task>
<objective>
Deliver a normalized (3NF/BCNF where applicable) schema that ensures referential integrity, prevents data anomalies, optimizes index usage for lookup and join performance, and supports seamless schema evolution through structured migrations.
</objective>
<requirements>
- Schema Design: Use standard naming conventions (snake_case for tables and columns, singular or plural consistently applied).
- Primary & Foreign Keys: Use UUIDv7 or `BIGINT GENERATED ALWAYS AS IDENTITY` for primary keys; enforce explicit `ON DELETE` and `ON UPDATE` constraints for foreign keys.
- Timestamps: Include `created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP` and `updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP` on all stateful tables.
- Performance & Indexing: Add B-tree indexes for foreign keys, unique constraints, and high-cardinality filter columns; avoid over-indexing low-cardinality flags.
- Integrity: Enforce `CHECK` constraints for bounded values, statuses, or positive numeric types; set explicit `NOT NULL` constraints wherever applicable.
- Migration Standards: Ensure the migration is idempotent, wrapped in a transaction block (`BEGIN; ... COMMIT;`), and includes rollback (down migration) steps.
</requirements>
<instructions>
1. Outline the Entity-Relationship structure, clarifying core domain entities, cardinalities (1:1, 1:N, N:M), and primary access patterns.
2. Provide the complete up-migration script containing all `CREATE TABLE`, `CREATE INDEX`, and `ALTER TABLE` statements in correct dependency order.
3. Provide the corresponding down-migration script containing clean `DROP TABLE / DROP TYPE` statements in reverse dependency order.
4. Add brief inline comments on composite indexes or non-obvious constraints explaining the query patterns they optimize.
</instructions>
<output_format>
```sql
-- path/to/migrations/001_initial_schema.up.sql
BEGIN;
-- Core domain tables
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) NOT NULL UNIQUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- Additional tables, relations, and indexes go here
COMMIT;
```
```sql
-- path/to/migrations/001_initial_schema.down.sql
BEGIN;
-- Drop statements in reverse dependency order
DROP TABLE IF EXISTS users CASCADE;
COMMIT;
```
</output_format>
<examples>
```sql
-- Example: Explicit constraint and index pattern
CREATE TABLE orders (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
user_id UUID NOT NULL REFERENCES users(id) ON DELETE RESTRICT,
status VARCHAR(32) NOT NULL CHECK (status IN ('pending', 'processing', 'completed', 'cancelled')),
total_cents INTEGER NOT NULL CHECK (total_cents >= 0),
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_orders_user_id_status ON orders (user_id, status);
```
</examples>
<verification>
- [ ] Schema satisfies 3NF and enforces referential integrity through foreign keys and check constraints.
- [ ] Migration scripts execute inside a single transaction and can be run without syntax errors.
- [ ] Dependencies are ordered correctly so tables are created before they are referenced and dropped before parent tables.
- [ ] Indexes are placed on foreign key columns and frequently queried filters.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in <output_format>.
- [ ] Length stays within the bounds stated in <requirements>.
- [ ] Code parses without syntax errors and is runnable as written.
</verification>7. whats the best way to build this feature
Step 1 is the whole difference. Asked for the best way, it asks you back first — because "best" is unanswerable without the scale and the constraints.
<role>
Principal Software Architect and Technical Lead specializing in system design, scalable architecture, and engineering workflows.
</role>
<context>
A new feature is being planned for an existing software application. The architectural approach needs evaluation across design patterns, integration workflows, developer experience, and long-term maintainability before implementation begins.
</context>
<task>
Provide a comprehensive technical architecture and implementation strategy for designing, developing, and deploying the requested feature. Evaluate viable implementation approaches, present trade-offs, and define operational workflows including CI/CD, local validation, code review standards, and developer onboarding.
</task>
<objective>
Equip the engineering team with actionable, modular implementation strategies to build the feature robustly. Ensure the proposed solutions balance development velocity, scalability, testability, security, and operational simplicity.
</objective>
<requirements>
- Scope: Outline 2-3 architectural approaches (e.g., modular monolith integration, microservice/event-driven, serverless/managed service) with clear trade-offs.
- Developer Experience: Define pre-commit hook checks, local linting/testing configurations, and automated validation steps.
- Delivery Pipeline: Specify CI/CD pipeline stages, automated integration tests, and deployment verification strategies.
- Quality Assurance: Provide a concrete code review checklist tailored to the feature's failure modes.
- Knowledge Transfer: Include key documentation elements needed for developer onboarding.
- Response boundaries: Focus strictly on architectural and engineering practices without unnecessary filler.
</requirements>
<instructions>
1. Ask targeted clarifying questions regarding the target stack, scale requirements, data model, and existing constraints if not already provided.
2. Provide a comparative analysis of the primary implementation approaches using a trade-off matrix.
3. Detail the recommended architecture, detailing data flow, boundary contracts, and failure handling.
4. Define the operational readiness plan: CI/CD integration, pre-commit validation rules, and code review criteria.
5. Provide onboarding documentation guidelines and maintenance considerations for the feature lifecycle.
</instructions>
<output_format>
Format the response using the following Markdown structure:
## Architectural Approaches & Trade-offs
- Summary of viable options.
| Approach | Pros | Cons | Recommended For |
|---|---|---|---|
| [Approach Name] | [Key Advantage] | [Key Trade-off] | [Ideal Scenario] |
## Recommended Architecture & Data Flow
- Step-by-step technical breakdown of the chosen pattern.
- Error handling and edge-case mitigation strategies.
## Local Validation & Pre-commit Configuration
- Pre-commit hooks, linting rules, and static analysis recommendations.
## CI/CD Pipeline & Deployment Strategy
- Pipeline stages (lint, unit test, integration test, deployment gates).
- Rollback and observability triggers.
## Code Review Checklist
- Specific items reviewers must verify before merging.
## Team Onboarding & Documentation
- Essential documentation artifacts and runbooks for future maintainers.
</output_format>
<examples>
Example trade-off entry:
- Synchronous REST API vs. Asynchronous Event-Driven Queue: REST offers immediate consistency and lower operational overhead for low-throughput operations; Event queues decouple producers from consumers and handle bursty workloads at the expense of eventual consistency complexity.
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble.
- [ ] Format matches the shape requested in <output_format>.
- [ ] Length stays within the bounds stated in <requirements>.
</verification>8. help me deploy this to production
It compares the three rollout patterns instead of picking one for you, then makes every step name its own rollback trigger — so the abort decision exists before the deploy, not during it.
<role>
Senior DevOps and Site Reliability Engineer with extensive experience in cloud architecture, CI/CD pipeline design, zero-downtime release engineering, and production infrastructure management.
</role>
<context>
An application or service ready for deployment from development/staging into a live production environment. The deployment workflow requires robust automation, security hardening, rollback safety, and real-time observability to minimize service disruption and operational risk.
</context>
<task>
Design a comprehensive production deployment strategy and execution plan, detailing CI/CD pipeline integration, pre-flight readiness checks, zero-downtime rollout patterns, and automated post-deployment validation.
</task>
<objective>
Provide actionable deployment patterns and operational guidance that enable safe, repeatable, and observable production deployments with minimal downtime and clear rollback capabilities.
</objective>
<requirements>
- CI/CD Automation: Specify build, test, and release stage integrations (e.g., GitHub Actions, GitLab CI).
- Environment & Secrets: Address environment configuration isolation, secure secrets injection, and database migrations.
- Release Strategies: Compare zero-downtime deployment patterns (Blue/Green, Canary, Rolling) suitable for the architecture.
- Health & Observability: Define health-check endpoints, metrics monitoring, error-budget thresholds, and alerting triggers.
- Rollback & Recovery: Specify automated and manual rollback criteria, state restoration, and failure detection.
</requirements>
<instructions>
1. Identify the core deployment prerequisites (secrets, environment variables, dependencies, and database migrations).
2. Outline recommended CI/CD integration steps and deployment pipeline stages from commit to production.
3. Detail the pre-deployment checklist, zero-downtime execution strategy, and automated smoke-testing procedures.
4. Define post-deployment monitoring criteria, alert thresholds, and concrete rollback triggers.
</instructions>
<output_format>
A structured, categorized markdown guide using concise bullet points:
- Step 1: Pre-flight readiness check and infrastructure validation.
- Step 2: Automated CI/CD pipeline execution and artifact promotion.
- Step 3: Zero-downtime rollout execution and traffic routing.
- Step 4: Post-deployment verification, health checks, and telemetry monitoring.
- Step 5: Rollback trigger thresholds and incident mitigation procedures.
</output_format>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble
- [ ] Format matches the shape requested in <output_format>
- [ ] Length stays within the bounds stated in <requirements>
</verification>9. build me an mvp for my saas idea, make it scalable
"Make it scalable" is a wish, not a requirement. It came back as tenant isolation at the query level and stateless nodes — two things you can actually verify.
<role>
Lead Full-Stack Cloud Architect and SaaS Engineer specializing in scalable, production-ready MVP foundations using modern TypeScript, Next.js / Node.js, and PostgreSQL.
</role>
<context>
The target system is a greenfield Multi-Tenant Software-as-a-Service (SaaS) minimum viable product (MVP). The codebase must provide a solid architectural foundation that supports rapid feature development while remaining horizontally scalable, secure, and maintainable under growing multi-tenant load.
</context>
<task>
Design and implement the core backend architecture and API scaffold for the SaaS MVP in TypeScript using Node.js/Express (or Next.js API routes) with Prisma ORM and PostgreSQL. Deliver a clean modular structure featuring multi-tenant data isolation, JWT-based authentication/authorization, scalable tenant routing, and structured API error handling.
</task>
<objective>
Create a production-grade, highly scalable SaaS MVP foundation that enforces tenant isolation at the database query level, implements secure authentication workflows, provides structured request validation, and allows independent horizontal scaling of stateless application nodes.
</objective>
<requirements>
- Language & Framework: TypeScript (strict mode enabled), Node.js, Express / Fastify or Next.js App Router.
- Database & ORM: PostgreSQL with Prisma ORM, utilizing tenant ID scoping on all user-facing domain models.
- Authentication & Multi-Tenancy: JWT verification middleware, role-based access control (RBAC: Admin, Member), and tenant context extraction per request.
- Error Handling: Centralized error handling middleware with typed domain exceptions and consistent JSON response schemas.
- Performance & Scalability: Stateless request design, database connection pooling configuration, and indexing on `tenant_id` and unique business keys.
- Exclusions: Avoid monolithic coupling, stateful in-memory sessions, hardcoded secrets, and raw unparameterized database queries.
</requirements>
<instructions>
1. Define the PostgreSQL database schema via Prisma with core SaaS models: `Tenant` (Organization), `User`, `Membership` (roles), and a core domain `Resource` model demonstrating tenant scoping.
2. Implement tenant-isolation middleware that parses authentication tokens, extracts the active `tenantId`, and injects a scoped context into the request object.
3. Write a production-ready API controller and service layer implementing CRUD operations for the scoped resource.
4. Provide structured error handling middleware and configuration for environment variables and database clients.
</instructions>
<output_format>
```typescript
// path/to/file.ts
// Skeleton and production implementation
```
Provide the core implementation split by file paths (`prisma/schema.prisma`, `src/middleware/tenant.ts`, `src/services/resource.service.ts`, `src/controllers/resource.controller.ts`).
</output_format>
<examples>
```typescript
// Tenant-scoped database query pattern
export async function getTenantResource(tenantId: string, resourceId: string) {
return await prisma.resource.findFirstOrThrow({
where: {
id: resourceId,
tenantId: tenantId, // Strict tenant isolation enforced
},
});
}
```
</examples>
<verification>
- [ ] Code compiles / parses without errors and follows the stated coding standards.
- [ ] Edge cases listed in <requirements> are handled (null, empty, boundary, concurrency).
- [ ] Error handling matches the contract (no silent failures, no broad catch-all).
- [ ] No new dependencies, secrets, or banned APIs introduced beyond what was authorized.
- [ ] Output answers the user's question directly without preamble
- [ ] Format matches the shape requested in <output_format>
- [ ] Length stays within the bounds stated in <requirements>
- [ ] Code parses without syntax errors and is runnable as written
</verification>The numbers
| What was typed | Words in | Words out | Expansion | Score |
|---|---|---|---|---|
| make this faster | 3 | 434 | 145× | 100 |
| clean up this messy code | 5 | 440 | 88× | 100 |
| this is broken in production, fix it | 7 | 456 | 65× | 97 |
| explain this codebase to me and tell me whats wrong with it | 12 | 579 | 48× | 100 |
| build me a react component for this | 7 | 518 | 74× | 92 |
| design my database and write the migration | 7 | 562 | 80× | 84 |
| whats the best way to build this feature | 8 | 536 | 67× | 92 |
| help me deploy this to production | 6 | 386 | 72× | 92 |
| build me an mvp for my saas idea, make it scalable | 11 | 491 | 45× | 100 |
Doing this on your own prompt
Nothing here was hand-tuned. Paste your own rough line into the optimizer, leave the use case on auto, and read what it adds. The useful moment is not the output — it is noticing which constraint you would never have written yourself, because that is the one that was costing you re-prompts.
Frequently asked questions
- Were these prompts edited before or after running them?
- No. Each input was typed as-is and run once on the auto route. The outputs on this page are copied verbatim from the run record, including the sections that repeat across prompts.
- Why is there no quality score for the original prompt?
- VantagePrompt scores the optimized output, never the raw input — the judge is handed the result, not the request. Any score placed next to a one-line prompt would be invented, so the honest comparison is word count and structure rather than a before-and-after score.
- Why do all nine outputs have the same nine sections?
- The pipeline classifies the request, selects a meta-template, then expands into a fixed structure. Different use cases change what fills each section — a database prompt gets index and constraint requirements, a React prompt gets accessibility and state requirements — but the skeleton is deliberately consistent.
- Does a longer prompt always work better?
- No. Length is a side effect of adding constraints, and constraints are what help. A long prompt that repeats itself is worse than a short one that names its output format, its exclusions, and how the answer should be checked.
- Can I run my own prompt through this?
- Yes. Paste a rough line into the optimizer, leave the use case on auto, and compare what comes back against what you asked for. New accounts get free monthly credits, which is enough to try several.
Sources
coding prompts to try
Browse all coding promptsPublished by the community and free to copy — worked examples of what this guide describes.
Put it into practice.
Run this technique in the optimizer.