copilot-instructions-blueprint-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCopilot Instructions Blueprint Generator
Copilot指令蓝图生成器
Configuration Variables
配置变量
${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|TypeScript|React|Angular|Python|Multiple|Other"} <!-- Primary technology -->
${ARCHITECTURE_STYLE="Layered|Microservices|Monolithic|Domain-Driven|Event-Driven|Serverless|Mixed"} <!-- Architectural approach -->
${CODE_QUALITY_FOCUS="Maintainability|Performance|Security|Accessibility|Testability|All"} <!-- Quality priorities -->
${DOCUMENTATION_LEVEL="Minimal|Standard|Comprehensive"} <!-- Documentation requirements -->
${TESTING_REQUIREMENTS="Unit|Integration|E2E|TDD|BDD|All"} <!-- Testing approach -->
${VERSIONING="Semantic|CalVer|Custom"} <!-- Versioning approach -->
${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|TypeScript|React|Angular|Python|Multiple|Other"} <!-- 核心技术 -->
${ARCHITECTURE_STYLE="Layered|Microservices|Monolithic|Domain-Driven|Event-Driven|Serverless|Mixed"} <!-- 架构方案 -->
${CODE_QUALITY_FOCUS="Maintainability|Performance|Security|Accessibility|Testability|All"} <!-- 质量优先级 -->
${DOCUMENTATION_LEVEL="Minimal|Standard|Comprehensive"} <!-- 文档要求 -->
${TESTING_REQUIREMENTS="Unit|Integration|E2E|TDD|BDD|All"} <!-- 测试方案 -->
${VERSIONING="Semantic|CalVer|Custom"} <!-- 版本控制方案 -->
Generated Prompt
生成的提示词
"Generate a comprehensive copilot-instructions.md file that will guide GitHub Copilot to produce code consistent with our project's standards, architecture, and technology versions. The instructions must be strictly based on actual code patterns in our codebase and avoid making any assumptions. Follow this approach:
"生成一份全面的copilot-instructions.md文件,指导GitHub Copilot生成符合我们项目标准、架构和技术版本的代码。指令必须严格基于代码库中的实际代码模式,不得做出任何假设。请遵循以下方法:
1. Core Instruction Structure
1. 核心指令结构
markdown
undefinedmarkdown
undefinedGitHub Copilot Instructions
GitHub Copilot 指令
Priority Guidelines
优先级指南
When generating code for this repository:
- Version Compatibility: Always detect and respect the exact versions of languages, frameworks, and libraries used in this project
- Context Files: Prioritize patterns and standards defined in the .github/copilot directory
- Codebase Patterns: When context files don't provide specific guidance, scan the codebase for established patterns
- Architectural Consistency: Maintain our ${ARCHITECTURE_STYLE} architectural style and established boundaries
- Code Quality: Prioritize ${CODE_QUALITY_FOCUS == "All" ? "maintainability, performance, security, accessibility, and testability" : CODE_QUALITY_FOCUS} in all generated code
为该仓库生成代码时:
- 版本兼容性:始终检测并遵循项目中使用的语言、框架和库的确切版本
- 上下文文件:优先遵循.github/copilot目录中定义的模式和标准
- 代码库模式:当上下文文件未提供具体指导时,扫描代码库以确定已确立的模式
- 架构一致性:保持我们的${ARCHITECTURE_STYLE}架构风格和已确立的边界
- 代码质量:在所有生成的代码中优先考虑${CODE_QUALITY_FOCUS == "All" ? "可维护性、性能、安全性、可访问性和可测试性" : CODE_QUALITY_FOCUS}
Technology Version Detection
技术版本检测
Before generating code, scan the codebase to identify:
-
Language Versions: Detect the exact versions of programming languages in use
- Examine project files, configuration files, and package managers
- Look for language-specific version indicators (e.g., <LangVersion> in .NET projects)
- Never use language features beyond the detected version
-
Framework Versions: Identify the exact versions of all frameworks
- Check package.json, .csproj, pom.xml, requirements.txt, etc.
- Respect version constraints when generating code
- Never suggest features not available in the detected framework versions
-
Library Versions: Note the exact versions of key libraries and dependencies
- Generate code compatible with these specific versions
- Never use APIs or features not available in the detected versions
生成代码前,扫描代码库以识别:
-
语言版本:检测正在使用的编程语言的确切版本
- 检查项目文件、配置文件和包管理器
- 查找特定语言的版本标识(例如.NET项目中的<LangVersion>)
- 绝不使用超出检测版本的语言特性
-
框架版本:识别所有框架的确切版本
- 检查package.json、.csproj、pom.xml、requirements.txt等文件
- 生成代码时遵循版本约束
- 绝不建议使用检测版本框架中不支持的特性
-
库版本:记录关键库和依赖的确切版本
- 生成与这些特定版本兼容的代码
- 绝不使用检测版本库中不支持的API或特性
Context Files
上下文文件
Prioritize the following files in .github/copilot directory (if they exist):
- architecture.md: System architecture guidelines
- tech-stack.md: Technology versions and framework details
- coding-standards.md: Code style and formatting standards
- folder-structure.md: Project organization guidelines
- exemplars.md: Exemplary code patterns to follow
优先参考.github/copilot目录中的以下文件(如果存在):
- architecture.md:系统架构指南
- tech-stack.md:技术版本和框架详情
- coding-standards.md:代码风格和格式标准
- folder-structure.md:项目组织指南
- exemplars.md:需遵循的优秀代码模式
Codebase Scanning Instructions
代码库扫描说明
When context files don't provide specific guidance:
-
Identify similar files to the one being modified or created
-
Analyze patterns for:
- Naming conventions
- Code organization
- Error handling
- Logging approaches
- Documentation style
- Testing patterns
-
Follow the most consistent patterns found in the codebase
-
When conflicting patterns exist, prioritize patterns in newer files or files with higher test coverage
-
Never introduce patterns not found in the existing codebase
当上下文文件未提供具体指导时:
-
识别与待修改或创建文件相似的文件
-
分析以下方面的模式:
- 命名约定
- 代码组织
- 错误处理
- 日志记录方式
- 文档风格
- 测试模式
-
遵循代码库中最一致的模式
-
当存在冲突模式时,优先选择较新文件或测试覆盖率较高文件中的模式
-
绝不引入现有代码库中不存在的模式
Code Quality Standards
代码质量标准
${CODE_QUALITY_FOCUS.includes("Maintainability") || CODE_QUALITY_FOCUS == "All" ? `### Maintainability
- Write self-documenting code with clear naming
- Follow the naming and organization conventions evident in the codebase
- Follow established patterns for consistency
- Keep functions focused on single responsibilities
- Limit function complexity and length to match existing patterns` : ""}
${CODE_QUALITY_FOCUS.includes("Performance") || CODE_QUALITY_FOCUS == "All" ? `### Performance
- Follow existing patterns for memory and resource management
- Match existing patterns for handling computationally expensive operations
- Follow established patterns for asynchronous operations
- Apply caching consistently with existing patterns
- Optimize according to patterns evident in the codebase` : ""}
${CODE_QUALITY_FOCUS.includes("Security") || CODE_QUALITY_FOCUS == "All" ? `### Security
- Follow existing patterns for input validation
- Apply the same sanitization techniques used in the codebase
- Use parameterized queries matching existing patterns
- Follow established authentication and authorization patterns
- Handle sensitive data according to existing patterns` : ""}
${CODE_QUALITY_FOCUS.includes("Accessibility") || CODE_QUALITY_FOCUS == "All" ? `### Accessibility
- Follow existing accessibility patterns in the codebase
- Match ARIA attribute usage with existing components
- Maintain keyboard navigation support consistent with existing code
- Follow established patterns for color and contrast
- Apply text alternative patterns consistent with the codebase` : ""}
${CODE_QUALITY_FOCUS.includes("Testability") || CODE_QUALITY_FOCUS == "All" ? `### Testability
- Follow established patterns for testable code
- Match dependency injection approaches used in the codebase
- Apply the same patterns for managing dependencies
- Follow established mocking and test double patterns
- Match the testing style used in existing tests` : ""}
${CODE_QUALITY_FOCUS.includes("Maintainability") || CODE_QUALITY_FOCUS == "All" ? `### 可维护性
- 编写自文档化代码,命名清晰
- 遵循代码库中可见的命名和组织约定
- 遵循已确立的模式以保持一致性
- 保持函数专注于单一职责
- 控制函数复杂度和长度,与现有模式匹配` : ""}
${CODE_QUALITY_FOCUS.includes("Performance") || CODE_QUALITY_FOCUS == "All" ? `### 性能
- 遵循现有代码中的内存和资源管理模式
- 匹配现有代码中处理计算密集型操作的模式
- 遵循已确立的异步操作模式
- 与现有模式一致地应用缓存
- 根据代码库中可见的模式进行优化` : ""}
${CODE_QUALITY_FOCUS.includes("Security") || CODE_QUALITY_FOCUS == "All" ? `### 安全性
- 遵循现有代码中的输入验证模式
- 应用代码库中使用的相同 sanitization 技术
- 使用与现有模式匹配的参数化查询
- 遵循已确立的身份验证和授权模式
- 根据现有模式处理敏感数据` : ""}
${CODE_QUALITY_FOCUS.includes("Accessibility") || CODE_QUALITY_FOCUS == "All" ? `### 可访问性
- 遵循代码库中现有的可访问性模式
- 匹配现有组件中的ARIA属性使用方式
- 保持与现有代码一致的键盘导航支持
- 遵循已确立的颜色和对比度模式
- 应用与代码库一致的文本替代模式` : ""}
${CODE_QUALITY_FOCUS.includes("Testability") || CODE_QUALITY_FOCUS == "All" ? `### 可测试性
- 遵循已确立的可测试代码模式
- 匹配代码库中使用的依赖注入方式
- 应用与现有代码一致的依赖管理模式
- 遵循已确立的 mocking 和测试替身模式
- 匹配现有测试中使用的测试风格` : ""}
Documentation Requirements
文档要求
${DOCUMENTATION_LEVEL == "Minimal" ?
`- Match the level and style of comments found in existing code
- Document according to patterns observed in the codebase
- Follow existing patterns for documenting non-obvious behavior
- Use the same format for parameter descriptions as existing code` : ""}
${DOCUMENTATION_LEVEL == "Standard" ?
`- Follow the exact documentation format found in the codebase
- Match the XML/JSDoc style and completeness of existing comments
- Document parameters, returns, and exceptions in the same style
- Follow existing patterns for usage examples
- Match class-level documentation style and content` : ""}
${DOCUMENTATION_LEVEL == "Comprehensive" ?
`- Follow the most detailed documentation patterns found in the codebase
- Match the style and completeness of the best-documented code
- Document exactly as the most thoroughly documented files do
- Follow existing patterns for linking documentation
- Match the level of detail in explanations of design decisions` : ""}
${DOCUMENTATION_LEVEL == "Minimal" ?
`- 匹配现有代码中的注释级别和风格
- 根据代码库中观察到的模式编写文档
- 遵循现有模式记录非显而易见的行为
- 使用与现有代码相同的参数描述格式` : ""}
${DOCUMENTATION_LEVEL == "Standard" ?
`- 遵循代码库中的确切文档格式
- 匹配现有注释的XML/JSDoc风格和完整性
- 以相同风格记录参数、返回值和异常
- 遵循现有模式添加使用示例
- 匹配类级文档的风格和内容` : ""}
${DOCUMENTATION_LEVEL == "Comprehensive" ?
`- 遵循代码库中最详细的文档模式
- 匹配文档最完善代码的风格和完整性
- 完全按照文档最全面的文件编写文档
- 遵循现有模式进行文档链接
- 匹配设计决策说明的详细程度` : ""}
Testing Approach
测试方案
${TESTING_REQUIREMENTS.includes("Unit") || TESTING_REQUIREMENTS == "All" ?
`### Unit Testing
- Match the exact structure and style of existing unit tests
- Follow the same naming conventions for test classes and methods
- Use the same assertion patterns found in existing tests
- Apply the same mocking approach used in the codebase
- Follow existing patterns for test isolation` : ""}
${TESTING_REQUIREMENTS.includes("Integration") || TESTING_REQUIREMENTS == "All" ?
`### Integration Testing
- Follow the same integration test patterns found in the codebase
- Match existing patterns for test data setup and teardown
- Use the same approach for testing component interactions
- Follow existing patterns for verifying system behavior` : ""}
${TESTING_REQUIREMENTS.includes("E2E") || TESTING_REQUIREMENTS == "All" ?
`### End-to-End Testing
- Match the existing E2E test structure and patterns
- Follow established patterns for UI testing
- Apply the same approach for verifying user journeys` : ""}
${TESTING_REQUIREMENTS.includes("TDD") || TESTING_REQUIREMENTS == "All" ?
`### Test-Driven Development
- Follow TDD patterns evident in the codebase
- Match the progression of test cases seen in existing code
- Apply the same refactoring patterns after tests pass` : ""}
${TESTING_REQUIREMENTS.includes("BDD") || TESTING_REQUIREMENTS == "All" ?
`### Behavior-Driven Development
- Match the existing Given-When-Then structure in tests
- Follow the same patterns for behavior descriptions
- Apply the same level of business focus in test cases` : ""}
${TESTING_REQUIREMENTS.includes("Unit") || TESTING_REQUIREMENTS == "All" ?
`### 单元测试
- 匹配现有单元测试的确切结构和风格
- 遵循测试类和方法的相同命名约定
- 使用现有测试中相同的断言模式
- 应用代码库中使用的相同 mocking 方式
- 遵循现有模式实现测试隔离` : ""}
${TESTING_REQUIREMENTS.includes("Integration") || TESTING_REQUIREMENTS == "All" ?
`### 集成测试
- 遵循代码库中现有的集成测试模式
- 匹配现有测试的数据准备和清理模式
- 使用与现有代码一致的组件交互测试方式
- 遵循现有模式验证系统行为` : ""}
${TESTING_REQUIREMENTS.includes("E2E") || TESTING_REQUIREMENTS == "All" ?
`### 端到端测试
- 匹配现有端到端测试的结构和模式
- 遵循已确立的UI测试模式
- 应用与现有代码一致的用户旅程验证方式` : ""}
${TESTING_REQUIREMENTS.includes("TDD") || TESTING_REQUIREMENTS == "All" ?
`### 测试驱动开发
- 遵循代码库中可见的TDD模式
- 匹配现有代码中测试用例的演进过程
- 测试通过后应用相同的重构模式` : ""}
${TESTING_REQUIREMENTS.includes("BDD") || TESTING_REQUIREMENTS == "All" ?
`### 行为驱动开发
- 匹配现有测试中的Given-When-Then结构
- 遵循相同的行为描述模式
- 在测试用例中应用相同的业务关注点级别` : ""}
Technology-Specific Guidelines
技术特定指南
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### .NET Guidelines
- Detect and strictly adhere to the specific .NET version in use
- Use only C# language features compatible with the detected version
- Follow LINQ usage patterns exactly as they appear in the codebase
- Match async/await usage patterns from existing code
- Apply the same dependency injection approach used in the codebase
- Use the same collection types and patterns found in existing code` : ""}
${PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Java Guidelines
- Detect and adhere to the specific Java version in use
- Follow the exact same design patterns found in the codebase
- Match exception handling patterns from existing code
- Use the same collection types and approaches found in the codebase
- Apply the dependency injection patterns evident in existing code` : ""}
${PROJECT_TYPE == "JavaScript" || PROJECT_TYPE == "TypeScript" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### JavaScript/TypeScript Guidelines
- Detect and adhere to the specific ECMAScript/TypeScript version in use
- Follow the same module import/export patterns found in the codebase
- Match TypeScript type definitions with existing patterns
- Use the same async patterns (promises, async/await) as existing code
- Follow error handling patterns from similar files` : ""}
${PROJECT_TYPE == "React" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### React Guidelines
- Detect and adhere to the specific React version in use
- Match component structure patterns from existing components
- Follow the same hooks and lifecycle patterns found in the codebase
- Apply the same state management approach used in existing components
- Match prop typing and validation patterns from existing code` : ""}
${PROJECT_TYPE == "Angular" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Angular Guidelines
- Detect and adhere to the specific Angular version in use
- Follow the same component and module patterns found in the codebase
- Match decorator usage exactly as seen in existing code
- Apply the same RxJS patterns found in the codebase
- Follow existing patterns for component communication` : ""}
${PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Python Guidelines
- Detect and adhere to the specific Python version in use
- Follow the same import organization found in existing modules
- Match type hinting approaches if used in the codebase
- Apply the same error handling patterns found in existing code
- Follow the same module organization patterns` : ""}
${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### .NET 指南
- 检测并严格遵循正在使用的特定.NET版本
- 仅使用与检测版本兼容的C#语言特性
- 完全按照代码库中的LINQ使用模式编写代码
- 匹配现有代码中的async/await使用模式
- 应用代码库中使用的相同依赖注入方式
- 使用现有代码中相同的集合类型和模式` : ""}
${PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Java 指南
- 检测并遵循正在使用的特定Java版本
- 遵循代码库中的确切设计模式
- 匹配现有代码中的异常处理模式
- 使用现有代码中相同的集合类型和方式
- 应用现有代码中可见的依赖注入模式` : ""}
${PROJECT_TYPE == "JavaScript" || PROJECT_TYPE == "TypeScript" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### JavaScript/TypeScript 指南
- 检测并遵循正在使用的特定ECMAScript/TypeScript版本
- 遵循代码库中相同的模块导入/导出模式
- 匹配现有模式编写TypeScript类型定义
- 使用与现有代码相同的异步模式(Promise、async/await)
- 遵循相似文件中的错误处理模式` : ""}
${PROJECT_TYPE == "React" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### React 指南
- 检测并遵循正在使用的特定React版本
- 匹配现有组件的组件结构模式
- 遵循代码库中相同的Hooks和生命周期模式
- 应用现有组件中使用的相同状态管理方式
- 匹配现有代码中的属性类型定义和验证模式` : ""}
${PROJECT_TYPE == "Angular" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Angular 指南
- 检测并遵循正在使用的特定Angular版本
- 遵循代码库中相同的组件和模块模式
- 完全按照现有代码中的装饰器使用方式编写代码
- 应用代码库中相同的RxJS模式
- 遵循现有模式实现组件通信` : ""}
${PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect" || PROJECT_TYPE == "Multiple" ? `### Python 指南
- 检测并遵循正在使用的特定Python版本
- 遵循现有模块中的相同导入组织方式
- 如果代码库中使用了类型提示,匹配其方式
- 应用现有代码中相同的错误处理模式
- 遵循相同的模块组织模式` : ""}
Version Control Guidelines
版本控制指南
${VERSIONING == "Semantic" ?
`- Follow Semantic Versioning patterns as applied in the codebase
- Match existing patterns for documenting breaking changes
- Follow the same approach for deprecation notices` : ""}
${VERSIONING == "CalVer" ?
`- Follow Calendar Versioning patterns as applied in the codebase
- Match existing patterns for documenting changes
- Follow the same approach for highlighting significant changes` : ""}
${VERSIONING == "Custom" ?
`- Match the exact versioning pattern observed in the codebase
- Follow the same changelog format used in existing documentation
- Apply the same tagging conventions used in the project` : ""}
${VERSIONING == "Semantic" ?
`- 遵循代码库中应用的语义化版本控制模式
- 匹配现有代码中记录破坏性变更的模式
- 遵循相同的弃用通知方式` : ""}
${VERSIONING == "CalVer" ?
`- 遵循代码库中应用的日历版本控制模式
- 匹配现有代码中记录变更的模式
- 遵循相同的重大变更突出显示方式` : ""}
${VERSIONING == "Custom" ?
`- 匹配代码库中观察到的确切版本控制模式
- 遵循现有文档中使用的相同变更日志格式
- 应用项目中使用的相同标签约定` : ""}
General Best Practices
通用最佳实践
- Follow naming conventions exactly as they appear in existing code
- Match code organization patterns from similar files
- Apply error handling consistent with existing patterns
- Follow the same approach to testing as seen in the codebase
- Match logging patterns from existing code
- Use the same approach to configuration as seen in the codebase
- 完全按照现有代码中的命名约定编写代码
- 匹配相似文件中的代码组织模式
- 应用与现有模式一致的错误处理方式
- 遵循代码库中可见的相同测试方法
- 匹配现有代码中的日志记录模式
- 使用与现有代码一致的配置方式
Project-Specific Guidance
项目特定指导
- Scan the codebase thoroughly before generating any code
- Respect existing architectural boundaries without exception
- Match the style and patterns of surrounding code
- When in doubt, prioritize consistency with existing code over external best practices
undefined- 生成任何代码前,彻底扫描代码库
- 毫无例外地尊重现有架构边界
- 匹配周边代码的风格和模式
- 如有疑问,优先遵循现有代码的一致性,而非外部最佳实践
undefined2. Codebase Analysis Instructions
2. 代码库分析说明
To create the copilot-instructions.md file, first analyze the codebase to:
-
Identify Exact Technology Versions:
- ${PROJECT_TYPE == "Auto-detect" ? "Detect all programming languages, frameworks, and libraries by scanning file extensions and configuration files" : }
Focus on ${PROJECT_TYPE} technologies - Extract precise version information from project files, package.json, .csproj, etc.
- Document version constraints and compatibility requirements
- ${PROJECT_TYPE == "Auto-detect" ? "Detect all programming languages, frameworks, and libraries by scanning file extensions and configuration files" :
-
Understand Architecture:
- Analyze folder structure and module organization
- Identify clear layer boundaries and component relationships
- Document communication patterns between components
-
Document Code Patterns:
- Catalog naming conventions for different code elements
- Note documentation styles and completeness
- Document error handling patterns
- Map testing approaches and coverage
-
Note Quality Standards:
- Identify performance optimization techniques actually used
- Document security practices implemented in the code
- Note accessibility features present (if applicable)
- Document code quality patterns evident in the codebase
创建copilot-instructions.md文件前,首先分析代码库以:
-
识别确切技术版本:
- ${PROJECT_TYPE == "Auto-detect" ? "通过扫描文件扩展名和配置文件,检测所有编程语言、框架和库" : }
聚焦于${PROJECT_TYPE}技术 - 从项目文件、package.json、.csproj等文件中提取精确版本信息
- 记录版本约束和兼容性要求
- ${PROJECT_TYPE == "Auto-detect" ? "通过扫描文件扩展名和配置文件,检测所有编程语言、框架和库" :
-
理解架构:
- 分析文件夹结构和模块组织
- 识别清晰的层级边界和组件关系
- 记录组件间的通信模式
-
记录代码模式:
- 分类不同代码元素的命名约定
- 记录文档风格和完整性
- 记录错误处理模式
- 梳理测试方法和覆盖率
-
记录质量标准:
- 识别实际使用的性能优化技术
- 记录代码中实现的安全实践
- 记录存在的可访问性功能(如适用)
- 记录代码库中可见的代码质量模式
3. Implementation Notes
3. 实现说明
The final copilot-instructions.md should:
- Be placed in the .github/copilot directory
- Reference only patterns and standards that exist in the codebase
- Include explicit version compatibility requirements
- Avoid prescribing any practices not evident in the code
- Provide concrete examples from the codebase
- Be comprehensive yet concise enough for Copilot to effectively use
Important: Only include guidance based on patterns actually observed in the codebase. Explicitly instruct Copilot to prioritize consistency with existing code over external best practices or newer language features.
"
最终的copilot-instructions.md文件应:
- 放置在.github/copilot目录中
- 仅引用代码库中存在的模式和标准
- 包含明确的版本兼容性要求
- 避免规定代码库中未体现的任何实践
- 提供代码库中的具体示例
- 内容全面且简洁,确保Copilot可有效使用
重要提示:仅包含基于代码库中实际观察到的模式的指导。明确指示Copilot优先遵循现有代码的一致性,而非外部最佳实践或较新的语言特性。"
Expected Output
预期输出
A comprehensive copilot-instructions.md file that will guide GitHub Copilot to produce code that is perfectly compatible with your existing technology versions and follows your established patterns and architecture.
一份全面的copilot-instructions.md文件,可指导GitHub Copilot生成与现有技术版本完全兼容、且遵循已确立模式和架构的代码。