重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
specification-writing by epicenterhq/epicenter
npx skills add https://github.com/epicenterhq/epicenter --skill specification-writing遵循 writing-voice 中关于散文部分的指导。
一份规范为执行者(无论是智能体还是人类)提供了自主实现一个功能所需的上下文。目标并非事无巨细地描述一切;而是提供足够的初始上下文,让执行者能够自行研究并做出明智的决策。
注意:本指南使用
[占位符]标记需要你填写的内容。代码块展示的是模板;请将所有括号内的内容替换为你功能的具体细节。
当你需要以下情况时,请使用此模式:
规范应该:
一份好的规范是发射台,而不是需要遵循的剧本。
# [功能名称]
**日期**: [YYYY-MM-DD]
**状态**: 草案 | 进行中 | 已实现
**作者**: [姓名或AI辅助]
**分支**: [可选:如果工作已开始,使用 feat/功能名称]
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
最多一段。描述功能的作用。不要推销它。
## 概述
[用一到两句话描述此功能添加或改变了什么,以及它实现了什么。具体说明能力,不要模糊地谈论好处。]
结构为 当前状态 → 问题 → 期望状态。
## 动机
### 当前状态
[展示实际的代码或配置,说明当前是如何工作的。使用真实的代码块,而非散文描述。]
这导致了以下问题:
1. **[问题标题]**: [具体说明什么会出错或令人痛苦]
2. **[问题标题]**: [具体说明什么会出错或令人痛苦]
### 期望状态
[简要描述目标状态是什么样子。可以包含展示理想API或结构的代码片段。]
这是规范出彩的地方。记录你发现了什么,而不是你假设了什么。
## 研究发现
### [研究主题]
[描述你调查了什么以及方法]
| [类别] | [维度 1] | [维度 2] |
| ------------- | -------------- | ---------------- |
| [项目/库] | [它们做什么] | [它们的方法] |
| [项目/库] | [它们做什么] | [它们的方法] |
**关键发现**: [你的主要发现——可能是没有标准存在,或者大家都做X]
**影响**: [这对你的设计决策意味着什么]
包括:
使用表格以便追溯。每个决策都应有理由。
## 设计决策
| 决策点 | 选择 | 理由 |
| ------------------- | ---------------- | ------------------------------- |
| [决策点] | [你的选择] | [为什么选择这个而非其他方案] |
| [决策点] | [你的选择] | [为什么选择这个而非其他方案] |
| [推迟的决策] | 推迟 | [为什么它目前超出范围] |
图表优于散文。用ASCII艺术图直观地展示关系。
## 架构
[描述图表展示了什么]
┌─────────────────────────────────────────┐ │ [组件名称] │ │ ├── [字段]: [类型或值] │ │ └── [字段]: [类型或值] │ └─────────────────────────────────────────┘ │ ▼ [关系标签] ┌─────────────────────────────────────────┐ │ [组件名称] │ └─────────────────────────────────────────┘
对于多步骤流程:
步骤 1: [步骤名称] ──────────────────── [此步骤中发生什么]
步骤 2: [步骤名称] ──────────────────── [此步骤中发生什么]
分解为多个阶段。使用复选框进行追踪。第一阶段应详细;后续阶段可以粗略一些(执行者会将其具体化)。
## 实施计划
### 阶段 1: [阶段名称]
- [ ] **1.1** [具体的、原子性任务]
- [ ] **1.2** [具体的、原子性任务]
- [ ] **1.3** [具体的、原子性任务]
### 阶段 2: [阶段名称]
- [ ] **2.1** [更高级别的任务——执行者将进行分解]
- [ ] **2.2** [更高级别的任务]
列出可能打破假设或需要特殊处理的场景。
## 边界情况
### [场景名称]
1. [初始条件]
2. [发生什么]
3. [预期结果或“参见开放性问题”]
### [场景名称]
1. [初始条件]
2. [发生什么]
3. [预期结果]
此部分向执行者发出“你来决定这个”的信号。包含你的建议,但不要关闭问题。
## 开放性问题
1. **[关于未解决设计决策的问题]**
- 选项: (a) [选项 A], (b) [选项 B], (c) [选项 C]
- **建议**: [你的建议及原因,但明确保持其开放性]
2. **[另一个未解决的问题]**
- [关于为何不确定的背景]
- **建议**: [建议或“推迟到X”]
我们如何知道这个功能完成了?使用复选框进行验证。
## 成功标准
- [ ] [具体的、可验证的结果]
- [ ] [具体的、可验证的结果]
- [ ] [测试通过 / 构建成功 / 文档已更新]
将被修改或查阅的文件。
## 参考资料
- `[路径/到/文件.ts]` - [为什么此文件相关]
- `[路径/到/模式.ts]` - [要遵循或参考的模式]
当智能体阅读你的规范时,他们应该:
然后,智能体将:
如果你的规范规定性太强,智能体会盲目遵循。如果太模糊,智能体会无所适从。最佳平衡点是:有足够的上下文来开始,有足够的开放性来主导实现。
- [ ] 页眉 (日期, 状态, 作者)
- [ ] 概述 (1-2句话)
- [ ] 动机
- [ ] 当前状态 (附带代码)
- [ ] 问题 (编号)
- [ ] 期望状态
- [ ] 研究发现
- [ ] 对比表格
- [ ] 关键发现
- [ ] 影响
- [ ] 设计决策 (带理由的表格)
- [ ] 架构 (ASCII图表)
- [ ] 实施计划 (分阶段复选框)
- [ ] 边界情况
- [ ] 开放性问题 (附带建议)
- [ ] 成功标准
- [ ] 参考资料
并非每个规范都需要每个部分。一个小功能可能跳过“研究发现”。一个迁移规范可能重点放在“边界情况”。请自行判断。
每周安装量
63
代码库
GitHub 星标数
4.3K
首次出现
2026年1月28日
安全审计
安装于
opencode59
gemini-cli58
github-copilot58
codex58
cursor58
amp57
Follow writing-voice for prose sections.
A specification gives an agent (or human) the context they need to implement a feature autonomously. The goal is NOT to describe everything exhaustively; it's to provide enough initial context that the implementer can do their own research and make informed decisions.
Note : This guide uses
[PLACEHOLDER]markers for content you must fill in. Code blocks show templates; replace all bracketed content with your feature's details.
Use this pattern when you need to:
Specs should:
A good spec is a launching pad, not a script to follow.
# [Feature Name]
**Date**: [YYYY-MM-DD]
**Status**: Draft | In Progress | Implemented
**Author**: [Name or AI-assisted]
**Branch**: [optional: feat/feature-name if work has started]
One paragraph max. Describe what the feature does. Don't sell it.
## Overview
[One to two sentences describing what this feature adds or changes and what it enables. Be specific about the capability, not vague about benefits.]
Structure as Current State → Problems → Desired State.
## Motivation
### Current State
[Show actual code or configuration demonstrating how things work TODAY. Use real code blocks, not prose descriptions.]
This creates problems:
1. **[Problem Title]**: [Specific explanation of what breaks or is painful]
2. **[Problem Title]**: [Specific explanation of what breaks or is painful]
### Desired State
[Brief description of what the target looks like. Can include a code snippet showing the ideal API or structure.]
This is where specs shine. Document what you FOUND, not what you assumed.
## Research Findings
### [Topic Researched]
[Description of what you investigated and methodology]
| [Category] | [Dimension 1] | [Dimension 2] |
| ------------- | -------------- | ---------------- |
| [Project/Lib] | [What they do] | [Their approach] |
| [Project/Lib] | [What they do] | [Their approach] |
**Key finding**: [Your main discovery—could be that no standard exists, or that everyone does X]
**Implication**: [What this means for your design decisions]
Include:
Use a table for traceability. Every decision should have a rationale.
## Design Decisions
| Decision | Choice | Rationale |
| ------------------- | ---------------- | ------------------------------- |
| [Decision point] | [What you chose] | [Why this over alternatives] |
| [Decision point] | [What you chose] | [Why this over alternatives] |
| [Deferred decision] | Deferred | [Why it's out of scope for now] |
Diagrams over prose. Show relationships visually with ASCII art.
## Architecture
[Describe what the diagram shows]
┌─────────────────────────────────────────┐ │ [Component Name] │ │ ├── [field]: [type or value] │ │ └── [field]: [type or value] │ └─────────────────────────────────────────┘ │ ▼ [relationship label] ┌─────────────────────────────────────────┐ │ [Component Name] │ └─────────────────────────────────────────┘
For multi-step flows:
STEP 1: [Step name] ──────────────────── [What happens in this step]
STEP 2: [Step name] ──────────────────── [What happens in this step]
Break into phases. Use checkboxes for tracking. Phase 1 should be detailed; later phases can be rougher (the implementer will flesh them out).
## Implementation Plan
### Phase 1: [Phase Name]
- [ ] **1.1** [Specific, atomic task]
- [ ] **1.2** [Specific, atomic task]
- [ ] **1.3** [Specific, atomic task]
### Phase 2: [Phase Name]
- [ ] **2.1** [Higher-level task—implementer will break down]
- [ ] **2.2** [Higher-level task]
List scenarios that might break assumptions or need special handling.
## Edge Cases
### [Scenario Name]
1. [Initial condition]
2. [What happens]
3. [Expected outcome or "See Open Questions"]
### [Scenario Name]
1. [Initial condition]
2. [What happens]
3. [Expected outcome]
This section signals "you decide this" to the implementer. Include your recommendation but don't close the question.
## Open Questions
1. **[Question about an unresolved design decision]**
- Options: (a) [Option A], (b) [Option B], (c) [Option C]
- **Recommendation**: [Your suggestion and why, but explicitly leave it open]
2. **[Another unresolved question]**
- [Context about why this is uncertain]
- **Recommendation**: [Suggestion or "Defer until X"]
How do we know this is done? Checkboxes for verification.
## Success Criteria
- [ ] [Specific, verifiable outcome]
- [ ] [Specific, verifiable outcome]
- [ ] [Tests pass / build succeeds / docs updated]
Files that will be touched or consulted.
## References
- `[path/to/file.ts]` - [Why this file is relevant]
- `[path/to/pattern.ts]` - [Pattern to follow or reference]
When an agent reads your spec, they should:
The agent will then:
If your spec is too prescriptive, the agent will blindly follow it. If it's too vague, the agent will flounder. The sweet spot is: enough context to start, enough openness to own the implementation.
- [ ] Header (Date, Status, Author)
- [ ] Overview (1-2 sentences)
- [ ] Motivation
- [ ] Current State (with code)
- [ ] Problems (numbered)
- [ ] Desired State
- [ ] Research Findings
- [ ] Comparison tables
- [ ] Key findings
- [ ] Implications
- [ ] Design Decisions (table with rationale)
- [ ] Architecture (ASCII diagrams)
- [ ] Implementation Plan (phased checkboxes)
- [ ] Edge Cases
- [ ] Open Questions (with recommendations)
- [ ] Success Criteria
- [ ] References
Not every spec needs every section. A small feature might skip Research Findings. A migration spec might focus heavily on Edge Cases. Use judgment.
Weekly Installs
63
Repository
GitHub Stars
4.3K
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode59
gemini-cli58
github-copilot58
codex58
cursor58
amp57
论文复现上下文解析器 - 解决AI论文复现中的关键信息缺口与冲突检测
25,300 周安装