update-specification by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill update-specification你的目标是根据新的需求或现有代码的更新,更新现有的规范文件 ${file}。
规范文件必须以清晰、明确且结构化的方式定义解决方案组件的要求、约束和接口,以便生成式人工智能有效使用。遵循既定的文档标准,并确保内容具有机器可读性和自包含性。
规范应保存在 /spec/ 目录中,并根据以下约定命名:[a-z0-9-]+.md,其中名称应描述规范的内容,并以高层次目的开头,该目的属于 [schema, tool, data, infrastructure, process, architecture, or design] 之一。
规范文件必须格式化为结构良好的 Markdown。
规范文件必须遵循以下模板,确保所有部分都适当填写。Markdown 的前言部分应按照以下示例正确构建:
---
title: [描述规范重点的简洁标题]
version: [可选:例如,1.0, 日期]
date_created: [YYYY-MM-DD]
last_updated: [可选:YYYY-MM-DD]
owner: [可选:负责此规范的团队/个人]
tags: [可选:相关标签或类别的列表,例如 `infrastructure`, `process`, `design`, `app` 等]
---
# 引言
[对规范及其旨在实现的目标的简短介绍。]
## 1. 目的与范围
[提供清晰、简洁的规范目的及其应用范围的描述。说明目标受众和任何假设。]
## 2. 定义
[列出并定义本规范中使用的所有缩写词、缩略语和领域特定术语。]
## 3. 需求、约束与指南
[明确列出所有需求、约束、规则和指南。为清晰起见,使用项目符号或表格。]
- **REQ-001**: 需求 1
- **SEC-001**: 安全需求 1
- **[3 LETTERS]-001**: 其他需求 1
- **CON-001**: 约束 1
- **GUD-001**: 指南 1
- **PAT-001**: 遵循的模式 1
## 4. 接口与数据契约
[描述接口、API、数据契约或集成点。使用表格或代码块表示模式和示例。]
## 5. 验收标准
[为每个需求定义清晰、可测试的验收标准,在适当的情况下使用 Given-When-Then 格式。]
- **AC-001**: 给定 [上下文],当 [操作] 时,那么 [预期结果]
- **AC-002**: 当 [条件] 时,系统应 [特定行为]
- **AC-003**: [根据需要添加其他验收标准]
## 6. 测试自动化策略
[定义测试方法、框架和自动化要求。]
- **测试级别**: 单元测试、集成测试、端到端测试
- **框架**: MSTest, FluentAssertions, Moq (用于 .NET 应用程序)
- **测试数据管理**: [测试数据创建和清理的方法]
- **CI/CD 集成**: [在 GitHub Actions 流水线中进行自动化测试]
- **覆盖率要求**: [最低代码覆盖率阈值]
- **性能测试**: [负载和性能测试的方法]
## 7. 原理与上下文
[解释需求、约束和指南背后的理由。为设计决策提供上下文。]
## 8. 依赖项与外部集成
[定义本规范所需的外部系统、服务和架构依赖项。关注 **需要什么** 而不是 **如何实现**。避免特定的包或库版本,除非它们代表架构约束。]
### 外部系统
- **EXT-001**: [外部系统名称] - [目的和集成类型]
### 第三方服务
- **SVC-001**: [服务名称] - [所需能力和 SLA 要求]
### 基础设施依赖项
- **INF-001**: [基础设施组件] - [要求和约束]
### 数据依赖项
- **DAT-001**: [外部数据源] - [格式、频率和访问要求]
### 技术平台依赖项
- **PLT-001**: [平台/运行时要求] - [版本约束和原理]
### 合规性依赖项
- **COM-001**: [法规或合规性要求] - [对实施的影响]
**注意**:本节应关注架构和业务依赖项,而不是特定的包实现。例如,指定 "OAuth 2.0 身份验证库" 而不是 "Microsoft.AspNetCore.Authentication.JwtBearer v6.0.1"。
## 9. 示例与边界情况
```code
// 演示指南正确应用的代码片段或数据示例,包括边界情况
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
[列出必须满足的符合本规范的标准或测试。]
[链接到相关规范 1] [链接到相关外部文档]
每周安装量
7.4K
仓库
GitHub 星标数
26.7K
首次出现
2026年2月25日
安全审计
安装于
codex7.3K
gemini-cli7.3K
opencode7.3K
cursor7.3K
github-copilot7.3K
kimi-cli7.2K
Your goal is to update the existing specification file ${file} based on new requirements or updates to any existing code.
The specification file must define the requirements, constraints, and interfaces for the solution components in a manner that is clear, unambiguous, and structured for effective use by Generative AIs. Follow established documentation standards and ensure the content is machine-readable and self-contained.
The specification should be saved in the /spec/ directory and named according to the following convention: [a-z0-9-]+.md, where the name should be descriptive of the specification's content and starting with the highlevel purpose, which is one of [schema, tool, data, infrastructure, process, architecture, or design].
The specification file must be formatted in well formed Markdown.
Specification files must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the markdown should be structured correctly as per the example following:
---
title: [Concise Title Describing the Specification's Focus]
version: [Optional: e.g., 1.0, Date]
date_created: [YYYY-MM-DD]
last_updated: [Optional: YYYY-MM-DD]
owner: [Optional: Team/Individual responsible for this spec]
tags: [Optional: List of relevant tags or categories, e.g., `infrastructure`, `process`, `design`, `app` etc]
---
# Introduction
[A short concise introduction to the specification and the goal it is intended to achieve.]
## 1. Purpose & Scope
[Provide a clear, concise description of the specification's purpose and the scope of its application. State the intended audience and any assumptions.]
## 2. Definitions
[List and define all acronyms, abbreviations, and domain-specific terms used in this specification.]
## 3. Requirements, Constraints & Guidelines
[Explicitly list all requirements, constraints, rules, and guidelines. Use bullet points or tables for clarity.]
- **REQ-001**: Requirement 1
- **SEC-001**: Security Requirement 1
- **[3 LETTERS]-001**: Other Requirement 1
- **CON-001**: Constraint 1
- **GUD-001**: Guideline 1
- **PAT-001**: Pattern to follow 1
## 4. Interfaces & Data Contracts
[Describe the interfaces, APIs, data contracts, or integration points. Use tables or code blocks for schemas and examples.]
## 5. Acceptance Criteria
[Define clear, testable acceptance criteria for each requirement using Given-When-Then format where appropriate.]
- **AC-001**: Given [context], When [action], Then [expected outcome]
- **AC-002**: The system shall [specific behavior] when [condition]
- **AC-003**: [Additional acceptance criteria as needed]
## 6. Test Automation Strategy
[Define the testing approach, frameworks, and automation requirements.]
- **Test Levels**: Unit, Integration, End-to-End
- **Frameworks**: MSTest, FluentAssertions, Moq (for .NET applications)
- **Test Data Management**: [approach for test data creation and cleanup]
- **CI/CD Integration**: [automated testing in GitHub Actions pipelines]
- **Coverage Requirements**: [minimum code coverage thresholds]
- **Performance Testing**: [approach for load and performance testing]
## 7. Rationale & Context
[Explain the reasoning behind the requirements, constraints, and guidelines. Provide context for design decisions.]
## 8. Dependencies & External Integrations
[Define the external systems, services, and architectural dependencies required for this specification. Focus on **what** is needed rather than **how** it's implemented. Avoid specific package or library versions unless they represent architectural constraints.]
### External Systems
- **EXT-001**: [External system name] - [Purpose and integration type]
### Third-Party Services
- **SVC-001**: [Service name] - [Required capabilities and SLA requirements]
### Infrastructure Dependencies
- **INF-001**: [Infrastructure component] - [Requirements and constraints]
### Data Dependencies
- **DAT-001**: [External data source] - [Format, frequency, and access requirements]
### Technology Platform Dependencies
- **PLT-001**: [Platform/runtime requirement] - [Version constraints and rationale]
### Compliance Dependencies
- **COM-001**: [Regulatory or compliance requirement] - [Impact on implementation]
**Note**: This section should focus on architectural and business dependencies, not specific package implementations. For example, specify "OAuth 2.0 authentication library" rather than "Microsoft.AspNetCore.Authentication.JwtBearer v6.0.1".
## 9. Examples & Edge Cases
```code
// Code snippet or data example demonstrating the correct application of the guidelines, including edge cases
[List the criteria or tests that must be satisfied for compliance with this specification.]
[Link to related spec 1] [Link to relevant external documentation]
Weekly Installs
7.4K
Repository
GitHub Stars
26.7K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.3K
gemini-cli7.3K
opencode7.3K
cursor7.3K
github-copilot7.3K
kimi-cli7.2K
97,600 周安装