AI Code Architect 70 Prompts
# AI Code Architect — 70 Expert Engineering Prompts
> Transform any AI (ChatGPT, Claude, Gemini) into a senior software engineer.
> Copy, paste, customize the [BRACKETED] sections, and get 10x better results.
---
## 🏗️ Category 1: System Architecture (7 Prompts)
### 1.1 System Architecture Design Review
Act as a principal software architect with 15+ years of experience designing distributed systems at scale.
Review and critique my system architecture for: [DESCRIBE YOUR SYSTEM]
Analyze against these dimensions:
1. **SCALABILITY**: Can it handle 10x/100x current load? Identify bottlenecks.
2. **RELIABILITY**: Single points of failure? Recovery strategy? RPO/RTO analysis.
3. **SECURITY**: Authentication, authorization, data encryption at rest and in transit.
4. **MAINTAINABILITY**: Service boundaries, coupling analysis, deployment independence.
5. **COST**: Resource utilization, over/under-provisioning risks.
For each dimension, provide:
- Current state assessment (1-5 score)
- Specific risks identified
- Recommended improvements with priority (P0/P1/P2)
- Architecture diagram suggestions (describe in text)
End with a prioritized action plan: Quick Wins (< 1 week) vs Strategic Changes (1-3 months).
---
### 1.2 Microservices Decomposition Advisor
Act as a domain-driven design expert specializing in microservices architecture.
I have a monolithic application that handles: [DESCRIBE CURRENT MONOLITH FUNCTIONS]
Help me decompose it into microservices:
1. Identify bounded contexts using DDD principles
2. Map out service boundaries and data ownership
3. Define inter-service communication patterns (sync vs async)
4. Identify shared data challenges and strategies (event sourcing, CQRS, saga pattern)
5. Propose a migration sequence (strangler fig pattern)
6. Estimate complexity and risk for each extraction
For each proposed service, specify:
- Responsibility scope
- Data it owns
- APIs it exposes
- Dependencies on other services
- Recommended tech stack
---
### 1.3 Scalability Stress Test Analyzer
Act as a performance architect who has scaled systems to millions of users.
My system currently handles [CURRENT LOAD] and needs to scale to [TARGET LOAD].
Tech stack: [YOUR STACK]
Analyze:
1. **Compute**: Will current instances handle the load? Horizontal vs vertical scaling?
2. **Database**: Read/write ratio analysis. Sharding strategy? Read replicas?
3. **Caching**: What should be cached? Cache invalidation strategy?
4. **Queuing**: Which operations should be async? Queue sizing?
5. **CDN/Edge**: What can be pushed to the edge?
6. **Cost projection**: Estimated infrastructure cost at target scale
Provide a scaling roadmap with phases and estimated costs.
---
### 1.4 Event-Driven Architecture Designer
Act as an event-driven architecture specialist.
Design an event-driven system for: [DESCRIBE USE CASE]
Specify:
1. Event taxonomy (domain events, integration events, notification events)
2. Event schema design with versioning strategy
3. Message broker selection criteria (Kafka vs RabbitMQ vs SQS vs Pub/Sub)
4. Consumer group design and partition strategy
5. Dead letter queue handling and retry policies
6. Event sourcing applicability assessment
7. Saga/choreography patterns for distributed transactions
8. Monitoring and observability for event flows
Include failure scenarios and how the system recovers from each.
---
### 1.5 API Gateway & Service Mesh Architect
Act as a cloud infrastructure architect specializing in service mesh and API management.
Design an API gateway and service mesh strategy for: [DESCRIBE YOUR MICROSERVICES ECOSYSTEM]
Cover:
1. API Gateway: routing, rate limiting, authentication, request transformation
2. Service mesh: sidecar proxy selection (Istio/Linkerd/Consul Connect)
3. Traffic management: canary deployments, circuit breaking, retries
4. Observability: distributed tracing, metrics collection, log aggregation
5. Security: mTLS, RBAC, network policies
6. Performance impact analysis of the mesh layer
---
### 1.6 Data Pipeline Architecture Review
Act as a data engineering architect.
Review my data pipeline architecture: [DESCRIBE PIPELINE]
Analyze:
1. Data ingestion: batch vs streaming, exactly-once vs at-least-once guarantees
2. Processing: ETL vs ELT, transformation layer design
3. Storage: data lake vs data warehouse vs lakehouse
4. Data quality: validation, deduplication, schema evolution
5. Lineage and governance: tracking data origin and transformations
6. Performance: throughput, latency, backpressure handling
7. Cost optimization: storage tiers, compute scheduling
---
### 1.7 Disaster Recovery & High Availability Planner
Act as a site reliability engineer specializing in disaster recovery.
Design a DR/HA strategy for: [DESCRIBE SYSTEM AND SLAs]
Requirements: RPO = [X], RTO = [Y]
Cover:
1. Multi-region deployment topology
2. Data replication strategy (sync vs async, conflict resolution)
3. Failover automation and testing procedures
4. Backup strategy and restore testing
5. Chaos engineering recommendations
6. Runbook for major failure scenarios
7. Cost-benefit analysis of different DR tiers (active-active vs active-passive vs pilot light)
---
## 🔍 Category 2: Code Review (7 Prompts)
### 2.1 Comprehensive Code Review
Act as a senior software engineer conducting a thorough code review.
Analyze this [LANGUAGE] code for:
1. **Logic errors**: Edge cases, off-by-one errors, null handling
2. **Performance**: Big-O analysis, unnecessary allocations, N+1 queries
3. **Security**: OWASP Top 10 vulnerabilities, input validation, injection risks
4. **SOLID principles**: Single responsibility, open-closed, dependency inversion
5. **Clean code**: Naming, function length, abstraction levels
6. **Error handling**: Exception strategy, graceful degradation
For each issue found:
- Severity: Critical / High / Medium / Low
- Line number or section
- Explanation of the problem
- Corrected codewhen to use it
Community prompt sourced from the open-source GitHub repo writsop/ai-code-architect (no explicit license). A "AI Code Architect 70 Prompts" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
writsop/ai-code-architect · no explicit license
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions