technology-stack-blueprint-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseComprehensive Technology Stack Blueprint Generator
全面型技术栈蓝图生成器
Configuration Variables
配置变量
${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|React.js|React Native|Angular|Python|Other"} <!-- Primary technology -->
${DEPTH_LEVEL="Basic|Standard|Comprehensive|Implementation-Ready"} <!-- Analysis depth -->
${INCLUDE_VERSIONS=true|false} <!-- Include version information -->
${INCLUDE_LICENSES=true|false} <!-- Include license information -->
${INCLUDE_DIAGRAMS=true|false} <!-- Generate architecture diagrams -->
${INCLUDE_USAGE_PATTERNS=true|false} <!-- Include code usage patterns -->
${INCLUDE_CONVENTIONS=true|false} <!-- Document coding conventions -->
${OUTPUT_FORMAT="Markdown|JSON|YAML|HTML"} <!-- Select output format -->
${CATEGORIZATION="Technology Type|Layer|Purpose"} <!-- Organization method -->
${PROJECT_TYPE="自动检测|.NET|Java|JavaScript|React.js|React Native|Angular|Python|其他"} <!-- 核心技术 -->
${DEPTH_LEVEL="基础|标准|全面|可直接实现"} <!-- 分析深度 -->
${INCLUDE_VERSIONS=true|false} <!-- 是否包含版本信息 -->
${INCLUDE_LICENSES=true|false} <!-- 是否包含许可信息 -->
${INCLUDE_DIAGRAMS=true|false} <!-- 是否生成架构图表 -->
${INCLUDE_USAGE_PATTERNS=true|false} <!-- 是否包含代码使用模式 -->
${INCLUDE_CONVENTIONS=true|false} <!-- 是否记录编码规范 -->
${OUTPUT_FORMAT="Markdown|JSON|YAML|HTML"} <!-- 选择输出格式 -->
${CATEGORIZATION="技术类型|分层|用途"} <!-- 组织方式 -->
Generated Prompt
生成的提示词
"Analyze the codebase and generate a ${DEPTH_LEVEL} technology stack blueprint that thoroughly documents technologies and implementation patterns to facilitate consistent code generation. Use the following approach:
"分析代码库并生成一份${DEPTH_LEVEL}级别的技术栈蓝图,详细记录技术与实现模式,以助力一致性代码生成。请遵循以下步骤:
1. Technology Identification Phase
1. 技术识别阶段
- ${PROJECT_TYPE == "Auto-detect" ? "Scan the codebase for project files, configuration files, and dependencies to determine all technology stacks in use" : "Focus on ${PROJECT_TYPE} technologies"}
- Identify all programming languages by examining file extensions and content
- Analyze configuration files (package.json, .csproj, pom.xml, etc.) to extract dependencies
- Examine build scripts and pipeline definitions for tooling information
- ${INCLUDE_VERSIONS ? "Extract precise version information from package files and configuration" : "Skip version details"}
- ${INCLUDE_LICENSES ? "Document license information for all dependencies" : ""}
- ${PROJECT_TYPE == "自动检测" ? "扫描代码库中的项目文件、配置文件及依赖项,以确定当前使用的所有技术栈" : "聚焦于${PROJECT_TYPE}相关技术"}
- 通过检查文件扩展名和内容识别所有编程语言
- 分析配置文件(package.json、.csproj、pom.xml等)以提取依赖项
- 检查构建脚本与流水线定义以获取工具链信息
- ${INCLUDE_VERSIONS ? "从包文件和配置中提取精确的版本信息" : "跳过版本详情"}
- ${INCLUDE_LICENSES ? "记录所有依赖项的许可信息" : ""}
2. Core Technologies Analysis
2. 核心技术分析
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" ? "#### .NET Stack Analysis (if detected)
- Target frameworks and language versions (detect from project files)
- All NuGet package references with versions and purpose comments
- Project structure and organization patterns
- Configuration approach (appsettings.json, IOptions, etc.)
- Authentication mechanisms (Identity, JWT, etc.)
- API design patterns (REST, GraphQL, minimal APIs, etc.)
- Data access approaches (EF Core, Dapper, etc.)
- Dependency injection patterns
- Middleware pipeline components" : ""}
${PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect" ? "#### Java Stack Analysis (if detected)
- JDK version and core frameworks
- All Maven/Gradle dependencies with versions and purpose
- Package structure organization
- Spring Boot usage and configurations
- Annotation patterns
- Dependency injection approach
- Data access technologies (JPA, JDBC, etc.)
- API design (Spring MVC, JAX-RS, etc.)" : ""}
${PROJECT_TYPE == "JavaScript" || PROJECT_TYPE == "Auto-detect" ? "#### JavaScript Stack Analysis (if detected)
- ECMAScript version and transpiler settings
- All npm dependencies categorized by purpose
- Module system (ESM, CommonJS)
- Build tooling (webpack, Vite, etc.) with configuration
- TypeScript usage and configuration
- Testing frameworks and patterns" : ""}
${PROJECT_TYPE == "React.js" || PROJECT_TYPE == "Auto-detect" ? "#### React Analysis (if detected)
- React version and key patterns (hooks vs class components)
- State management approach (Context, Redux, Zustand, etc.)
- Component library usage (Material-UI, Chakra, etc.)
- Routing implementation
- Form handling strategies
- API integration patterns
- Testing approach for components" : ""}
${PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect" ? "#### Python Analysis (if detected)
- Python version and key language features used
- Package dependencies and virtual environment setup
- Web framework details (Django, Flask, FastAPI)
- ORM usage patterns
- Project structure organization
- API design patterns" : ""}
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "自动检测" ? "#### .NET 技术栈分析(若检测到)
- 目标框架与语言版本(从项目文件中检测)
- 所有NuGet包引用,包含版本及用途说明
- 项目结构与组织模式
- 配置方式(appsettings.json、IOptions等)
- 认证机制(Identity、JWT等)
- API设计模式(REST、GraphQL、极简API等)
- 数据访问方式(EF Core、Dapper等)
- 依赖注入模式
- 中间件流水线组件" : ""}
${PROJECT_TYPE == "Java" || PROJECT_TYPE == "自动检测" ? "#### Java 技术栈分析(若检测到)
- JDK版本与核心框架
- 所有Maven/Gradle依赖项,包含版本及用途
- 包结构组织
- Spring Boot使用与配置
- 注解模式
- 依赖注入方式
- 数据访问技术(JPA、JDBC等)
- API设计(Spring MVC、JAX-RS等)" : ""}
${PROJECT_TYPE == "JavaScript" || PROJECT_TYPE == "自动检测" ? "#### JavaScript 技术栈分析(若检测到)
- ECMAScript版本与转译器设置
- 所有npm依赖项,按用途分类
- 模块系统(ESM、CommonJS)
- 构建工具(webpack、Vite等)及配置
- TypeScript使用与配置
- 测试框架与模式" : ""}
${PROJECT_TYPE == "React.js" || PROJECT_TYPE == "自动检测" ? "#### React 分析(若检测到)
- React版本与核心模式(Hooks vs 类组件)
- 状态管理方式(Context、Redux、Zustand等)
- 组件库使用(Material-UI、Chakra等)
- 路由实现
- 表单处理策略
- API集成模式
- 组件测试方式" : ""}
${PROJECT_TYPE == "Python" || PROJECT_TYPE == "自动检测" ? "#### Python 分析(若检测到)
- Python版本与使用的核心语言特性
- 包依赖与虚拟环境设置
- Web框架详情(Django、Flask、FastAPI)
- ORM使用模式
- 项目结构组织
- API设计模式" : ""}
3. Implementation Patterns & Conventions
3. 实现模式与规范
${INCLUDE_CONVENTIONS ?
"Document coding conventions and patterns for each technology area:
${INCLUDE_CONVENTIONS ?
"记录各技术领域的编码规范与模式:
Naming Conventions
命名规范
- Class/type naming patterns
- Method/function naming patterns
- Variable naming conventions
- File naming and organization conventions
- Interface/abstract class patterns
- 类/类型命名模式
- 方法/函数命名模式
- 变量命名规范
- 文件命名与组织规范
- 接口/抽象类模式
Code Organization
代码组织
- File structure and organization
- Folder hierarchy patterns
- Component/module boundaries
- Code separation and responsibility patterns
- 文件结构与组织
- 文件夹层级模式
- 组件/模块边界
- 代码分离与职责模式
Common Patterns
通用模式
- Error handling approaches
- Logging patterns
- Configuration access
- Authentication/authorization implementation
- Validation strategies
- Testing patterns" : ""}
- 错误处理方式
- 日志记录模式
- 配置访问方式
- 认证/授权实现
- 验证策略
- 测试模式" : ""}
4. Usage Examples
4. 使用示例
${INCLUDE_USAGE_PATTERNS ?
"Extract representative code examples showing standard implementation patterns:
${INCLUDE_USAGE_PATTERNS ?
"提取具有代表性的代码示例,展示标准实现模式:
API Implementation Examples
API实现示例
- Standard controller/endpoint implementation
- Request DTO pattern
- Response formatting
- Validation approach
- Error handling
- 标准控制器/端点实现
- 请求DTO模式
- 响应格式化
- 验证方式
- 错误处理
Data Access Examples
数据访问示例
- Repository pattern implementation
- Entity/model definitions
- Query patterns
- Transaction handling
- 仓储模式实现
- 实体/模型定义
- 查询模式
- 事务处理
Service Layer Examples
服务层示例
- Service class implementation
- Business logic organization
- Cross-cutting concerns integration
- Dependency injection usage
- 服务类实现
- 业务逻辑组织
- 横切关注点集成
- 依赖注入使用
UI Component Examples (if applicable)
UI组件示例(若适用)
- Component structure
- State management pattern
- Event handling
- API integration pattern" : ""}
- 组件结构
- 状态管理模式
- 事件处理
- API集成模式" : ""}
5. Technology Stack Map
5. 技术栈图谱
${DEPTH_LEVEL == "Comprehensive" || DEPTH_LEVEL == "Implementation-Ready" ?
"Create a comprehensive technology map including:
${DEPTH_LEVEL == "全面" || DEPTH_LEVEL == "可直接实现" ?
"创建全面的技术图谱,包含:
Core Framework Usage
核心框架使用
- Primary frameworks and their specific usage in the project
- Framework-specific configurations and customizations
- Extension points and customizations
- 核心框架及其在项目中的具体用法
- 框架特定配置与自定义
- 扩展点与自定义实现
Integration Points
集成点
- How different technology components integrate
- Authentication flow between components
- Data flow between frontend and backend
- Third-party service integration patterns
- 不同技术组件的集成方式
- 组件间的认证流程
- 前后端数据流转
- 第三方服务集成模式
Development Tooling
开发工具链
- IDE settings and conventions
- Code analysis tools
- Linters and formatters with configuration
- Build and deployment pipeline
- Testing frameworks and approaches
- IDE设置与规范
- 代码分析工具
- 代码检查与格式化工具及配置
- 构建与部署流水线
- 测试框架与方式
Infrastructure
基础设施
- Deployment environment details
- Container technologies
- Cloud services utilized
- Monitoring and logging infrastructure" : ""}
- 部署环境详情
- 容器技术
- 所使用的云服务
- 监控与日志基础设施" : ""}
6. Technology-Specific Implementation Details
6. 技术特定实现细节
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" ?
"#### .NET Implementation Details (if detected)
-
Dependency Injection Pattern:
- Service registration approach (Scoped/Singleton/Transient patterns)
- Configuration binding patterns
-
Controller Patterns:
- Base controller usage
- Action result types and patterns
- Route attribute conventions
- Filter usage (authorization, validation, etc.)
-
Data Access Patterns:
- ORM configuration and usage
- Entity configuration approach
- Relationship definitions
- Query patterns and optimization approaches
-
API Design Patterns (if used):
- Endpoint organization
- Parameter binding approaches
- Response type handling
-
Language Features Used:
- Detect specific language features from code
- Identify common patterns and idioms
- Note any specific version-dependent features" : ""}
${PROJECT_TYPE == "React.js" || PROJECT_TYPE == "Auto-detect" ?
"#### React Implementation Details (if detected)
-
Component Structure:
- Function vs class components
- Props interface definitions
- Component composition patterns
-
Hook Usage Patterns:
- Custom hook implementation style
- useState patterns
- useEffect cleanup approaches
- Context usage patterns
-
State Management:
- Local vs global state decisions
- State management library patterns
- Store configuration
- Selector patterns
-
Styling Approach:
- CSS methodology (CSS modules, styled-components, etc.)
- Theme implementation
- Responsive design patterns" : ""}
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "自动检测" ?
"#### .NET 实现细节(若检测到)
-
依赖注入模式:
- 服务注册方式(Scoped/Singleton/Transient模式)
- 配置绑定模式
-
控制器模式:
- 基础控制器使用
- 动作结果类型与模式
- 路由属性规范
- 过滤器使用(授权、验证等)
-
数据访问模式:
- ORM配置与使用
- 实体配置方式
- 关系定义
- 查询模式与优化方式
-
API设计模式(若使用):
- 端点组织
- 参数绑定方式
- 响应类型处理
-
使用的语言特性:
- 从代码中检测特定语言特性
- 识别通用模式与惯用写法
- 记录任何特定版本相关的特性" : ""}
${PROJECT_TYPE == "React.js" || PROJECT_TYPE == "自动检测" ?
"#### React 实现细节(若检测到)
-
组件结构:
- 函数组件 vs 类组件
- Props接口定义
- 组件组合模式
-
Hook使用模式:
- 自定义Hook实现风格
- useState使用模式
- useEffect清理方式
- Context使用模式
-
状态管理:
- 局部状态与全局状态的选择
- 状态管理库使用模式
- Store配置
- 选择器模式
-
样式方案:
- CSS方法论(CSS Modules、styled-components等)
- 主题实现
- 响应式设计模式" : ""}
7. Blueprint for New Code Implementation
7. 新代码实现蓝图
${DEPTH_LEVEL == "Implementation-Ready" ?
"Based on the analysis, provide a detailed blueprint for implementing new features:
- File/Class Templates: Standard structure for common component types
- Code Snippets: Ready-to-use code patterns for common operations
- Implementation Checklist: Standard steps for implementing features end-to-end
- Integration Points: How to connect new code with existing systems
- Testing Requirements: Standard test patterns for different component types
- Documentation Requirements: Standard doc patterns for new features" : ""}
${INCLUDE_DIAGRAMS ?
"### 8. Technology Relationship Diagrams
- Stack Diagram: Visual representation of the complete technology stack
- Dependency Flow: How different technologies interact
- Component Relationships: How major components depend on each other
- Data Flow: How data flows through the technology stack" : ""}
${DEPTH_LEVEL == "可直接实现" ?
"基于分析结果,提供详细的新功能实现蓝图:
- 文件/类模板: 常见组件类型的标准结构
- 代码片段: 可直接使用的通用操作代码模式
- 实现检查清单: 端到端实现功能的标准步骤
- 集成点: 如何将新代码与现有系统连接
- 测试要求: 不同组件类型的标准测试模式
- 文档要求: 新功能的标准文档模式" : ""}
${INCLUDE_DIAGRAMS ?
"### 8. 技术关系图表
- 栈图: 完整技术栈的可视化展示
- 依赖流转: 不同技术的交互方式
- 组件关系: 主要组件间的依赖关系
- 数据流转: 数据在技术栈中的流转路径" : ""}
${INCLUDE_DIAGRAMS ? "9" : "8"}. Technology Decision Context
${INCLUDE_DIAGRAMS ? "9" : "8"}. 技术决策背景
- Document apparent reasons for technology choices
- Note any legacy or deprecated technologies marked for replacement
- Identify technology constraints and boundaries
- Document technology upgrade paths and compatibility considerations
Format the output as ${OUTPUT_FORMAT} and categorize technologies by ${CATEGORIZATION}.
Save the output as 'Technology_Stack_Blueprint.${OUTPUT_FORMAT == "Markdown" ? "md" : OUTPUT_FORMAT.toLowerCase()}'
"
- 记录技术选择的明显原因
- 标记任何待替换的遗留或已弃用技术
- 识别技术约束与边界
- 记录技术升级路径与兼容性考量
将输出格式设置为${OUTPUT_FORMAT},并按${CATEGORIZATION}对技术进行分类。
将输出保存为'Technology_Stack_Blueprint.${OUTPUT_FORMAT == "Markdown" ? "md" : OUTPUT_FORMAT.toLowerCase()}'
"