rfc-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRFC Creator
RFC 文档创建助手
This skill guides the creation of RFC (Request for Comments) documents for technical proposals.
本Skill可指导你创建用于技术提案的RFC(Request for Comments)文档。
When to Use
适用场景
- Proposing a new feature or capability
- Planning architectural changes
- Introducing breaking changes
- Major refactoring proposals
- New configuration formats or APIs
- Integration with external systems
- 提议新功能或能力
- 规划架构变更
- 引入破坏性变更
- 重大重构提案
- 新配置格式或API
- 与外部系统集成
CRITICAL: Pre-RFC Research Phase
重要提示:RFC撰写前的调研阶段
Before writing ANY RFC, you MUST complete the following research steps:
在撰写任何RFC之前,你必须完成以下调研步骤:
Step 0: Get Current Date
步骤0:获取当前日期
Use MCP time tool to get the current date for accurate research:
mcp_call_tool("time", "get_current_time", {"timezone": "Asia/Shanghai"})This ensures your research queries include the correct year (e.g., 2025) for finding the latest information.
使用MCP时间工具获取当前日期,以确保调研的准确性:
mcp_call_tool("time", "get_current_time", {"timezone": "Asia/Shanghai"})这能确保你的调研查询包含正确的年份(例如2025),以便找到最新信息。
Step 0.1: Online Research (MANDATORY)
步骤0.1:在线调研(必填)
For any RFC topic, you MUST conduct comprehensive online research:
针对任何RFC主题,你必须进行全面的在线调研:
1. Search for Mainstream Implementations
1. 搜索主流实现方案
Use to find how major projects solve similar problems:
web_searchweb_search({
"searchTerm": "[topic] implementation rust [current year] best practices",
"explanation": "Researching mainstream implementations for RFC topic"
})Example searches for different RFC topics:
| RFC Topic | Search Queries |
|---|---|
| Console output | "rust CLI console output cargo uv ripgrep 2025" |
| Config format | "rust config file format toml yaml comparison 2025" |
| Plugin system | "rust plugin architecture dynamic loading 2025" |
| Package manager | "rust package manager design cargo uv 2025" |
使用查找大型项目如何解决类似问题:
web_searchweb_search({
"searchTerm": "[topic] implementation rust [current year] best practices",
"explanation": "Researching mainstream implementations for RFC topic"
})不同RFC主题的搜索示例:
| RFC主题 | 搜索查询语句 |
|---|---|
| 控制台输出 | "rust CLI console output cargo uv ripgrep 2025" |
| 配置格式 | "rust config file format toml yaml comparison 2025" |
| 插件系统 | "rust plugin architecture dynamic loading 2025" |
| 包管理器 | "rust package manager design cargo uv 2025" |
2. Fetch Source Code from Major Projects
2. 查阅大型项目的源代码
Use to examine actual implementations:
web_fetchweb_fetch({
"url": "https://github.com/[project]/[path]/[file]",
"fetchInfo": "Examining [project]'s implementation of [feature]"
})Key projects to reference by domain:
| Domain | Projects to Research |
|---|---|
| CLI/Console | Cargo, uv, ripgrep, rustup |
| Package Management | Cargo, uv, pnpm |
| Configuration | Cargo, rustup, deno |
| Build Systems | Cargo, buck2, bazel |
| Version Management | rustup, nvm, pyenv |
使用研究实际实现:
web_fetchweb_fetch({
"url": "https://github.com/[project]/[path]/[file]",
"fetchInfo": "Examining [project]'s implementation of [feature]"
})按领域划分的核心参考项目:
| 领域 | 调研参考项目 |
|---|---|
| CLI/控制台 | Cargo, uv, ripgrep, rustup |
| 包管理 | Cargo, uv, pnpm |
| 配置管理 | Cargo, rustup, deno |
| 构建系统 | Cargo, buck2, bazel |
| 版本管理 | rustup, nvm, pyenv |
3. Document Research Findings
3. 记录调研结果
Create a "主流方案调研" (Mainstream Solution Survey) section in the RFC:
markdown
undefined在RFC中创建「主流方案调研」章节:
markdown
undefined主流方案调研
主流方案调研
在设计本方案之前,我们调研了以下主流实现:
在设计本方案之前,我们调研了以下主流实现:
1. [Project A] (org/project)
1. [Project A] (org/project)
架构: [Brief architecture description]
核心设计:
rust
// Key code snippet关键特性:
- Feature 1
- Feature 2
依赖库:
- - Description
lib1 - - Description
lib2
架构: [简要架构描述]
核心设计:
rust
// Key code snippet关键特性:
- 特性1
- 特性2
依赖库:
- - 说明
lib1 - - 说明
lib2
2. [Project B] (org/project)
2. [Project B] (org/project)
[Similar structure...]
[类似结构...]
方案对比
方案对比
| 特性 | Project A | Project B | Project C |
|---|---|---|---|
| Feature 1 | ✓ | ✗ | ✓ |
| Feature 2 | ✗ | ✓ | ✓ |
| 特性 | Project A | Project B | Project C |
|---|---|---|---|
| 特性1 | ✓ | ✗ | ✓ |
| 特性2 | ✗ | ✓ | ✓ |
设计启示
设计启示
基于以上调研,本 RFC 应采用:
- [Design decision 1 with rationale]
- [Design decision 2 with rationale]
- [Design decision 3 with rationale]
undefined基于以上调研,本RFC应采用:
- [设计决策1及理由]
- [设计决策2及理由]
- [设计决策3及理由]
undefinedStep 0.2: Research Checklist
步骤0.2:调研检查清单
Before proceeding to write the RFC, verify:
- Current date obtained - Used MCP time tool to get accurate date
- Web searches completed - At least 3 relevant searches performed
- Source code examined - Reviewed at least 2-3 major project implementations
- Comparison table created - Documented feature comparison across projects
- Design decisions documented - Listed what to adopt from each project
在开始撰写RFC之前,请确认:
- 已获取当前日期 - 使用MCP时间工具获取准确日期
- 已完成网络搜索 - 至少执行3次相关搜索
- 已查阅源代码 - 研究了至少2-3个大型项目的实现
- 已创建对比表格 - 记录了各项目的特性对比
- 已记录设计决策 - 列出了从各项目中借鉴的内容
RFC Document Structure
RFC文档结构
Standard Sections
标准章节
- Header - Metadata (status, author, date, target version)
- 摘要/Summary - Brief overview of the proposal
- 主流方案调研/Industry Survey - Research on mainstream implementations (NEW - REQUIRED)
- 动机/Motivation - Why this change is needed
- 设计方案/Design - Detailed technical design
- 向后兼容性/Backward Compatibility - Migration and compatibility considerations
- 实现计划/Implementation Plan - Phased implementation roadmap
- 替代方案/Alternatives - Alternative approaches considered
- 参考资料/References - Related documents and resources
- 更新记录/Changelog - Document revision history
- Header(头部) - 元数据(状态、作者、日期、目标版本)
- 摘要/Summary - 提案的简要概述
- 主流方案调研/Industry Survey - 主流实现方案调研(新增 - 必填)
- 动机/Motivation - 变更的必要性
- 设计方案/Design - 详细技术设计
- 向后兼容性/Backward Compatibility - 迁移与兼容性考量
- 实现计划/Implementation Plan - 分阶段实现路线图
- 替代方案/Alternatives - 考虑过的其他方案
- 参考资料/References - 相关文档与资源
- 更新记录/Changelog - 文档修订历史
Step 1: Create RFC Directory
步骤1:创建RFC目录
docs/rfcs/
├── NNNN-short-title.md # Main RFC document
└── NNNN-implementation-tracker.md # Implementation progress tracker (optional)RFC numbers are assigned sequentially: , , etc.
00010002docs/rfcs/
├── NNNN-short-title.md # 主RFC文档
└── NNNN-implementation-tracker.md # 实现进度跟踪文档(可选)RFC编号按顺序分配:, 等。
00010002Step 2: RFC Header Template
步骤2:RFC头部模板
markdown
undefinedmarkdown
undefinedRFC NNNN: Title
RFC NNNN: 标题
状态: Draft | Review | Accepted | Implemented | Rejected 作者: author name/team 创建日期: YYYY-MM-DD 目标版本: vX.Y.Z
undefined状态: Draft(草案) | Review(评审中) | Accepted(已通过) | Implemented(已实现) | Rejected(已拒绝) 作者: 作者姓名/团队 创建日期: YYYY-MM-DD 目标版本: vX.Y.Z
undefinedStatus Definitions
状态定义
| Status | Description |
|---|---|
| Draft | Initial proposal, open for major changes |
| Review | Ready for team review and feedback |
| Accepted | Approved for implementation |
| Implemented | Fully implemented and released |
| Rejected | Not accepted (with documented reasons) |
| 状态 | 描述 |
|---|---|
| Draft(草案) | 初始提案,可进行重大修改 |
| Review(评审中) | 已准备好接受团队评审与反馈 |
| Accepted(已通过) | 已批准可进入实现阶段 |
| Implemented(已实现) | 已完全实现并发布 |
| Rejected(已拒绝) | 未被采纳(需记录理由) |
Step 3: Write the RFC Content
步骤3:撰写RFC内容
3.1 Summary Section
3.1 摘要章节
markdown
undefinedmarkdown
undefined摘要
摘要
[One paragraph describing what this RFC proposes and its main benefits]
undefined[一段文字描述本RFC的提议内容及主要收益]
undefined3.2 Industry Survey Section (NEW - REQUIRED)
3.2 行业调研章节(新增 - 必填)
markdown
undefinedmarkdown
undefined主流方案调研
主流方案调研
在设计本方案之前,我们调研了以下主流实现:
在设计本方案之前,我们调研了以下主流实现:
1. [Project Name] (org/repo)
1. [项目名称] (org/repo)
架构: [Architecture description]
核心设计:
rust
// Key implementation snippet
pub struct Example {
field: Type,
}关键特性:
- Feature 1 - Description
- Feature 2 - Description
依赖库:
- - Purpose
library1 - - Purpose
library2
架构: [架构描述]
核心设计:
rust
// Key implementation snippet
pub struct Example {
field: Type,
}关键特性:
- 特性1 - 描述
- 特性2 - 描述
依赖库:
- - 用途
library1 - - 用途
library2
2. [Another Project] (org/repo)
2. [其他项目] (org/repo)
[Similar structure...]
[类似结构...]
方案对比
方案对比
| 特性 | Project A | Project B | Project C |
|---|---|---|---|
| Feature X | ✓ impl | ✗ | ✓ partial |
| Feature Y | ✗ | ✓ | ✓ |
| Library | lib-a | lib-b | lib-c |
| 特性 | Project A | Project B | Project C |
|---|---|---|---|
| 特性X | ✓ 已实现 | ✗ | ✓ 部分实现 |
| 特性Y | ✗ | ✓ | ✓ |
| 依赖库 | lib-a | lib-b | lib-c |
设计启示
设计启示
基于以上调研,本 RFC 应采用:
- [Decision 1] - 采用 [Project A] 的 [approach],因为 [rationale]
- [Decision 2] - 使用 [library],这是 [Project B] 使用的方案
- [Decision 3] - 参考 [Project C] 的 [feature] 设计
undefined基于以上调研,本RFC应采用:
- [决策1] - 采用[Project A]的[方案],因为[理由]
- [决策2] - 使用[library],这是[Project B]采用的方案
- [决策3] - 参考[Project C]的[特性]设计
undefined3.3 Motivation Section
3.3 动机章节
markdown
undefinedmarkdown
undefined动机
动机
当前状态分析
当前状态分析
[Describe current limitations or problems]
[描述当前的局限性或问题]
需求分析
需求分析
[List specific requirements this proposal addresses]
- Requirement 1 - Description
- Requirement 2 - Description
undefined[列出本提案解决的具体需求]
- 需求1 - 描述
- 需求2 - 描述
undefined3.4 Design Section
3.4 设计方案章节
markdown
undefinedmarkdown
undefined设计方案
设计方案
完整配置/API 预览
完整配置/API预览
toml
undefinedtoml
undefinedComplete example of the proposed format
提议格式的完整示例
undefinedundefined详细说明
详细说明
Section 1: Feature Name
章节1:特性名称
[Detailed explanation with examples]
[详细说明及示例]
Section 2: Feature Name
章节2:特性名称
[Detailed explanation with examples]
undefined[详细说明及示例]
undefined3.5 Backward Compatibility Section
3.5 向后兼容性章节
markdown
undefinedmarkdown
undefined向后兼容性
向后兼容性
兼容策略
兼容策略
- Version Detection - How to detect old vs new format
- Gradual Enhancement - All new fields are optional
- Default Values - Sensible defaults for new fields
- Warning Handling - Warn on unknown fields, don't error
- 版本检测 - 如何区分新旧格式
- 逐步增强 - 所有新字段均为可选
- 默认值 - 为新字段设置合理默认值
- 警告处理 - 对未知字段发出警告而非报错
迁移路径
迁移路径
bash
undefinedbash
undefinedCheck compatibility
检查兼容性
command check
command check
Auto-migrate
自动迁移
command migrate --to v2
command migrate --to v2
Validate
验证
command validate
undefinedcommand validate
undefined3.6 Implementation Plan Section
3.6 实现计划章节
markdown
undefinedmarkdown
undefined实现计划
实现计划
Phase 1: Core Features (vX.Y.0)
阶段1:核心功能(vX.Y.0)
- Feature A
- Feature B
- Migration tooling
- 特性A
- 特性B
- 迁移工具
Phase 2: Extended Features (vX.Y+1.0)
阶段2:扩展功能(vX.Y+1.0)
- Feature C
- Feature D
- 特性C
- 特性D
Phase 3: Advanced Features (vX.Y+2.0)
阶段3:高级功能(vX.Y+2.0)
- Feature E
- Feature F
undefined- 特性E
- 特性F
undefined3.7 References Section
3.7 参考资料章节
markdown
undefinedmarkdown
undefined参考资料
参考资料
主流项目源码
主流项目源码
- Project A Source - 本 RFC 的主要参考
- Project B Source - 参考其模块设计
- Project A源码 - 本RFC的主要参考
- Project B源码 - 参考其模块设计
依赖库
依赖库
相关文档
相关文档
- Related Tool Documentation
- Industry Standard
undefined- 相关工具文档
- 行业标准
undefined3.8 Changelog Section
3.8 更新记录章节
markdown
undefinedmarkdown
undefined更新记录
更新记录
| 日期 | 版本 | 变更 |
|---|---|---|
| YYYY-MM-DD | Draft | 初始草案 |
| YYYY-MM-DD | Review | 根据反馈更新 |
undefined| 日期 | 版本 | 变更 |
|---|---|---|
| YYYY-MM-DD | Draft | 初始草案 |
| YYYY-MM-DD | Review | 根据反馈更新 |
undefinedStep 4: Create Implementation Tracker (Optional)
步骤4:创建实现跟踪文档(可选)
For complex RFCs, create a separate tracker document:
markdown
undefined对于复杂的RFC,可创建单独的跟踪文档:
markdown
undefinedRFC NNNN: Implementation Tracker
RFC NNNN: 实现进度跟踪
总体进度
总体进度
| Phase | 状态 | 完成度 | 目标版本 |
|---|---|---|---|
| Phase 1 | 进行中 | 60% | vX.Y.0 |
| Phase 2 | 待开始 | 0% | vX.Y+1.0 |
| 阶段 | 状态 | 完成度 | 目标版本 |
|---|---|---|---|
| 阶段1 | 进行中 | 60% | vX.Y.0 |
| 阶段2 | 待开始 | 0% | vX.Y+1.0 |
详细进度
详细进度
Phase 1: Core Features
阶段1:核心功能
Feature A
特性A
- Design
- Implementation
- Tests
- Documentation
- 设计
- 实现
- 测试
- 文档
Feature B
特性B
- Design
- Implementation
- Tests
- Documentation
- 设计
- 实现
- 测试
- 文档
测试计划
测试计划
单元测试
单元测试
- Test case 1
- Test case 2
- 测试用例1
- 测试用例2
集成测试
集成测试
- Integration test 1
- Integration test 2
- 集成测试1
- 集成测试2
E2E 测试
E2E测试
- E2E test 1
- E2E test 2
- E2E测试1
- E2E测试2
文档更新
文档更新
- Config reference
- User guide
- Migration guide
- Best practices
- 配置参考
- 用户指南
- 迁移指南
- 最佳实践
更新日志
更新日志
| 日期 | 变更 |
|---|---|
| YYYY-MM-DD | 创建跟踪文档 |
undefined| 日期 | 变更 |
|---|---|
| YYYY-MM-DD | 创建跟踪文档 |
undefinedBest Practices
最佳实践
Writing Effective RFCs
编写高效RFC的技巧
- Be Specific - Include concrete examples and code snippets
- Consider Edge Cases - Address error handling and unusual scenarios
- Think About Migration - Always plan for existing users
- Keep It Focused - One RFC per major feature/change
- Iterate - RFCs can be updated based on feedback
- 具体明确 - 包含具体示例和代码片段
- 考虑边缘情况 - 处理错误场景和特殊情况
- 规划迁移方案 - 始终为现有用户考虑迁移路径
- 聚焦主题 - 每个RFC对应一个主要功能/变更
- 迭代优化 - 可根据反馈更新RFC
Code Examples
代码示例
- Use realistic, working examples
- Show both simple and advanced usage
- Include error cases where relevant
- 使用真实可运行的示例
- 展示简单和高级用法
- 相关时包含错误场景
Tables and Diagrams
表格与图表
- Use tables for comparisons and status tracking
- Include ASCII diagrams for architecture when helpful
- Keep formatting consistent
- 使用表格进行对比和状态跟踪
- 必要时使用ASCII图表展示架构
- 保持格式一致
Review Process
评审流程
- Share RFC with team for initial feedback
- Address comments and update document
- Move to "Review" status when ready
- Get formal approval before implementation
- Update status as implementation progresses
- 与团队分享RFC以获取初始反馈
- 处理评论并更新文档
- 准备就绪后将状态改为「Review(评审中)」
- 获得正式批准后再开始实现
- 随着实现推进更新状态
RFC Naming Convention
RFC命名规范
NNNN-short-descriptive-title.mdExamples:
0001-config-v2-enhancement.md0002-plugin-architecture.md0003-remote-development-support.md
NNNN-short-descriptive-title.md示例:
0001-config-v2-enhancement.md0002-plugin-architecture.md0003-remote-development-support.md
Reference Templates
参考模板
See for complete RFC templates.
references/templates.md完整RFC模板请查阅。
references/templates.md