Intelligent Technical Architecture Solution Generator
Task Objectives
This Skill is designed to help users build implementable, well-structured, and evolvable technical architecture solutions starting from vague requirements.
- Capabilities include: requirement analysis, tech stack selection evaluation, architecture design, alternative solution suggestions, solution output
- Trigger conditions: Users put forward requirements such as "design architecture", "tech stack selection", "system design", or need to evaluate technical solutions
Operation Steps
Step 1: Information Collection
Ask users for the following key information; if information is insufficient, take the initiative to ask instead of making assumptions:
Required Information:
- Core business objectives or functions to be implemented (e.g., "Build a live quiz system supporting 10,000 concurrent online users")
- Considered or preferred tech stacks (frontend/backend/database/middleware, etc.; leave blank if none)
Important Supplementary Information:
3. Non-functional requirements:
- Expected concurrency (e.g., 1000 QPS, 100,000 DAU)
- Response time requirements (e.g., < 100ms, < 1s)
- Data security requirements (e.g., data encryption, access control)
- Availability requirements (e.g., 99.9%, 99.99%)
- Deployment environment constraints (e.g., must use a specific cloud vendor, need to build an on-premises data center, budget constraints, etc.)
- Team tech stack preferences (e.g., team is familiar with Java/Go/Python)
Step 2: Requirement Sorting & Tech Stack Supplement
Requirement Analysis:
- Identify core modules (user management, business logic, data storage, message communication, monitoring logs, etc.)
- Analyze key interaction flows (complete link from user request → processing → response)
- Identify performance bottlenecks (hot data, high-frequency queries, long transactions, etc.)
Tech Stack Evaluation:
- Evaluate the applicability of the tech stack provided by users:
- Whether it meets performance requirements (e.g., can SQLite support high concurrency)
- Whether it fits the business scenario (e.g., is MongoDB suitable for relational data)
- Whether there are technical risks (e.g., immature ecosystem of new frameworks)
- If the tech stack is insufficient or inappropriate, proactively propose alternative suggestions and explain the reasons
Common Problem Identification:
- Missing necessary components (no cache, no message queue, no monitoring system)
- Architecture design defects (single point of failure, no disaster recovery, data consistency not considered)
- Mismatched tech stack selection (e.g., using relational databases to process document-type data)
Step 3: Iterative Improvement
Present Preliminary Architecture:
Present the architecture in a modular manner, including:
- Frontend layer (Web, mobile, mini-program, etc.)
- API Gateway layer
- Service layer (core business services)
- Data layer (database, cache, file storage)
- Infrastructure layer (deployment, monitoring, logging, security)
Tech Stack Selection Plan:
For each module, provide:
- Recommended technology (primary option)
- Alternative solutions (substitute options)
- Selection basis (performance, ecosystem, learning cost, maintenance cost)
Proactive Guidance:
- Ask users if they have preferences or restrictions on certain technologies (e.g., "Do you have to use a cloud vendor? Can you accept Serverless?")
- Confirm whether key non-functional requirements are met
- Understand whether the team's technical capabilities match the recommended solutions
Circular Optimization:
Adjust the plan based on user feedback, focusing on:
- Whether the cost is acceptable
- Whether the team can handle it
- Whether risks are controllable
- Whether it has evolvability
Step 4: Output Final Solution
Output the complete architecture suggestion in a clear structure, including the following content:
1. Overall Architecture Diagram
Use Mermaid syntax or layered description, example:
Frontend Layer
├─ Web Application (React/Vue)
├─ Mobile Application (Flutter/React Native)
└─ Mini Program
API Gateway Layer
├─ Route Distribution
├─ Authentication
└─ Rate Limiting & Circuit Breaking
Service Layer
├─ User Service
├─ Order Service
├─ Payment Service
└─ Notification Service
Data Layer
├─ Relational Database (MySQL/PostgreSQL)
├─ Cache (Redis)
├─ Search Engine
└─ Message Queue (Kafka/RabbitMQ)
Infrastructure Layer
├─ Container Orchestration
├─ Monitoring & Alerting (Prometheus + Grafana)
├─ Log Collection (ELK)
└─ CI/CD Pipeline
2. Tech Stack Selection and Reasons for Each Module
Explain in the form of tables or lists:
- Module name
- Recommended technology
- Selection reasons (performance, reliability, ecosystem, cost, team skills)
- Alternative solutions and switching scenarios
3. Key Data Flow or Interaction Process
Describe the data flow path of core business, for example:
User Request → API Gateway → Authentication Service → Business Service → Database → Response Return
4. Key Points of Scalability and Disaster Recovery Design
- Horizontal scaling strategies (stateless design, database sharding, read-write separation)
- High availability design (multi-availability zone deployment, failover)
- Data consistency solutions (transactions, eventual consistency, compensation mechanisms)
- Disaster recovery backup strategies (regular backups, active-active across regions)
5. Subsequent Evolution Suggestions
- Stage V1 (MVP): Quickly validate the business, monolithic architecture, focus on core functions
- Stage V2 (Growth Period): Split core services, introduce cache, optimize performance
- Stage V3 (Mature Period): Microservices, containerization, automated operation and maintenance
- Evolution milestones and technical debt management
Resource Index
- Domain References: See references/tech-selection-guide.md (Tech Stack Selection Reference Manual, including recommended solutions and technical comparisons for common scenarios)
Notes
- Avoid over-engineering: Prioritize mature, community-active technologies that are easy for the team to adopt
- Pragmatism: Solutions must be implementable; do not consider fancy but practically useless technologies
- Cost awareness: Balance performance, reliability and cost to avoid resource waste
- Evolvability: Design should be scalable to support future business growth
- Team matching: Tech stack selection should consider team capabilities and learning costs
- Risk control: Identify potential risks and provide response plans
Usage Examples
Example 1: E-commerce System Architecture Design
- Function Description: Design a technical architecture for a medium-sized e-commerce platform
- Requirement Information: 100,000 DAU, supports flash sale activities, requires high availability
- Execution Method: The agent leads the four-step process, looking up tech stack selection suggestions for e-commerce scenarios in references/tech-selection-guide.md
- Key Outputs: Layered architecture diagram, tech stack selection table, flash sale scenario design plan, evolution roadmap
Example 2: SaaS Platform Tech Stack Selection
- Function Description: Evaluate technical solutions for a multi-tenant SaaS platform
- Requirement Information: Needs to support multi-tenant isolation, high data security requirements, limited budget
- Execution Method: The agent analyzes multi-tenant scenario requirements, compares database solutions (independent database vs shared database)
- Key Outputs: Multi-tenant isolation solution comparison, database selection suggestions, cost estimation, risk warnings