rfc-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

RFC 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
web_search
to find how major projects solve similar problems:
web_search({
  "searchTerm": "[topic] implementation rust [current year] best practices",
  "explanation": "Researching mainstream implementations for RFC topic"
})
Example searches for different RFC topics:
RFC TopicSearch 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_search
查找大型项目如何解决类似问题:
web_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
web_fetch
to examine actual implementations:
web_fetch({
  "url": "https://github.com/[project]/[path]/[file]",
  "fetchInfo": "Examining [project]'s implementation of [feature]"
})
Key projects to reference by domain:
DomainProjects to Research
CLI/ConsoleCargo, uv, ripgrep, rustup
Package ManagementCargo, uv, pnpm
ConfigurationCargo, rustup, deno
Build SystemsCargo, buck2, bazel
Version Managementrustup, nvm, pyenv
使用
web_fetch
研究实际实现:
web_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
依赖库:
  • lib1
    - Description
  • lib2
    - Description
架构: [简要架构描述]
核心设计:
rust
// Key code snippet
关键特性:
  • 特性1
  • 特性2
依赖库:
  • lib1
    - 说明
  • lib2
    - 说明

2. [Project B] (org/project)

2. [Project B] (org/project)

[Similar structure...]
[类似结构...]

方案对比

方案对比

特性Project AProject BProject C
Feature 1
Feature 2
特性Project AProject BProject C
特性1
特性2

设计启示

设计启示

基于以上调研,本 RFC 应采用:
  1. [Design decision 1 with rationale]
  2. [Design decision 2 with rationale]
  3. [Design decision 3 with rationale]
undefined
基于以上调研,本RFC应采用:
  1. [设计决策1及理由]
  2. [设计决策2及理由]
  3. [设计决策3及理由]
undefined

Step 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

标准章节

  1. Header - Metadata (status, author, date, target version)
  2. 摘要/Summary - Brief overview of the proposal
  3. 主流方案调研/Industry Survey - Research on mainstream implementations (NEW - REQUIRED)
  4. 动机/Motivation - Why this change is needed
  5. 设计方案/Design - Detailed technical design
  6. 向后兼容性/Backward Compatibility - Migration and compatibility considerations
  7. 实现计划/Implementation Plan - Phased implementation roadmap
  8. 替代方案/Alternatives - Alternative approaches considered
  9. 参考资料/References - Related documents and resources
  10. 更新记录/Changelog - Document revision history
  1. Header(头部) - 元数据(状态、作者、日期、目标版本)
  2. 摘要/Summary - 提案的简要概述
  3. 主流方案调研/Industry Survey - 主流实现方案调研(新增 - 必填)
  4. 动机/Motivation - 变更的必要性
  5. 设计方案/Design - 详细技术设计
  6. 向后兼容性/Backward Compatibility - 迁移与兼容性考量
  7. 实现计划/Implementation Plan - 分阶段实现路线图
  8. 替代方案/Alternatives - 考虑过的其他方案
  9. 参考资料/References - 相关文档与资源
  10. 更新记录/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:
0001
,
0002
, etc.
docs/rfcs/
├── NNNN-short-title.md           # 主RFC文档
└── NNNN-implementation-tracker.md # 实现进度跟踪文档(可选)
RFC编号按顺序分配:
0001
,
0002
等。

Step 2: RFC Header Template

步骤2:RFC头部模板

markdown
undefined
markdown
undefined

RFC 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
undefined

Status Definitions

状态定义

StatusDescription
DraftInitial proposal, open for major changes
ReviewReady for team review and feedback
AcceptedApproved for implementation
ImplementedFully implemented and released
RejectedNot accepted (with documented reasons)
状态描述
Draft(草案)初始提案,可进行重大修改
Review(评审中)已准备好接受团队评审与反馈
Accepted(已通过)已批准可进入实现阶段
Implemented(已实现)已完全实现并发布
Rejected(已拒绝)未被采纳(需记录理由)

Step 3: Write the RFC Content

步骤3:撰写RFC内容

3.1 Summary Section

3.1 摘要章节

markdown
undefined
markdown
undefined

摘要

摘要

[One paragraph describing what this RFC proposes and its main benefits]
undefined
[一段文字描述本RFC的提议内容及主要收益]
undefined

3.2 Industry Survey Section (NEW - REQUIRED)

3.2 行业调研章节(新增 - 必填)

markdown
undefined
markdown
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
依赖库:
  • library1
    - Purpose
  • library2
    - Purpose
架构: [架构描述]
核心设计:
rust
// Key implementation snippet
pub struct Example {
    field: Type,
}
关键特性:
  • 特性1 - 描述
  • 特性2 - 描述
依赖库:
  • library1
    - 用途
  • library2
    - 用途

2. [Another Project] (org/repo)

2. [其他项目] (org/repo)

[Similar structure...]
[类似结构...]

方案对比

方案对比

特性Project AProject BProject C
Feature X✓ impl✓ partial
Feature Y
Librarylib-alib-blib-c
特性Project AProject BProject C
特性X✓ 已实现✓ 部分实现
特性Y
依赖库lib-alib-blib-c

设计启示

设计启示

基于以上调研,本 RFC 应采用:
  1. [Decision 1] - 采用 [Project A] 的 [approach],因为 [rationale]
  2. [Decision 2] - 使用 [library],这是 [Project B] 使用的方案
  3. [Decision 3] - 参考 [Project C] 的 [feature] 设计
undefined
基于以上调研,本RFC应采用:
  1. [决策1] - 采用[Project A]的[方案],因为[理由]
  2. [决策2] - 使用[library],这是[Project B]采用的方案
  3. [决策3] - 参考[Project C]的[特性]设计
undefined

3.3 Motivation Section

3.3 动机章节

markdown
undefined
markdown
undefined

动机

动机

当前状态分析

当前状态分析

[Describe current limitations or problems]
[描述当前的局限性或问题]

需求分析

需求分析

[List specific requirements this proposal addresses]
  1. Requirement 1 - Description
  2. Requirement 2 - Description
undefined
[列出本提案解决的具体需求]
  1. 需求1 - 描述
  2. 需求2 - 描述
undefined

3.4 Design Section

3.4 设计方案章节

markdown
undefined
markdown
undefined

设计方案

设计方案

完整配置/API 预览

完整配置/API预览

toml
undefined
toml
undefined

Complete example of the proposed format

提议格式的完整示例

undefined
undefined

详细说明

详细说明

Section 1: Feature Name

章节1:特性名称

[Detailed explanation with examples]
[详细说明及示例]

Section 2: Feature Name

章节2:特性名称

[Detailed explanation with examples]
undefined
[详细说明及示例]
undefined

3.5 Backward Compatibility Section

3.5 向后兼容性章节

markdown
undefined
markdown
undefined

向后兼容性

向后兼容性

兼容策略

兼容策略

  1. Version Detection - How to detect old vs new format
  2. Gradual Enhancement - All new fields are optional
  3. Default Values - Sensible defaults for new fields
  4. Warning Handling - Warn on unknown fields, don't error
  1. 版本检测 - 如何区分新旧格式
  2. 逐步增强 - 所有新字段均为可选
  3. 默认值 - 为新字段设置合理默认值
  4. 警告处理 - 对未知字段发出警告而非报错

迁移路径

迁移路径

bash
undefined
bash
undefined

Check compatibility

检查兼容性

command check
command check

Auto-migrate

自动迁移

command migrate --to v2
command migrate --to v2

Validate

验证

command validate
undefined
command validate
undefined

3.6 Implementation Plan Section

3.6 实现计划章节

markdown
undefined
markdown
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
undefined

3.7 References Section

3.7 参考资料章节

markdown
undefined
markdown
undefined

参考资料

参考资料

主流项目源码

主流项目源码

依赖库

依赖库

相关文档

相关文档

  • Related Tool Documentation
  • Industry Standard
undefined
  • 相关工具文档
  • 行业标准
undefined

3.8 Changelog Section

3.8 更新记录章节

markdown
undefined
markdown
undefined

更新记录

更新记录

日期版本变更
YYYY-MM-DDDraft初始草案
YYYY-MM-DDReview根据反馈更新
undefined
日期版本变更
YYYY-MM-DDDraft初始草案
YYYY-MM-DDReview根据反馈更新
undefined

Step 4: Create Implementation Tracker (Optional)

步骤4:创建实现跟踪文档(可选)

For complex RFCs, create a separate tracker document:
markdown
undefined
对于复杂的RFC,可创建单独的跟踪文档:
markdown
undefined

RFC 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创建跟踪文档
undefined

Best Practices

最佳实践

Writing Effective RFCs

编写高效RFC的技巧

  1. Be Specific - Include concrete examples and code snippets
  2. Consider Edge Cases - Address error handling and unusual scenarios
  3. Think About Migration - Always plan for existing users
  4. Keep It Focused - One RFC per major feature/change
  5. Iterate - RFCs can be updated based on feedback
  1. 具体明确 - 包含具体示例和代码片段
  2. 考虑边缘情况 - 处理错误场景和特殊情况
  3. 规划迁移方案 - 始终为现有用户考虑迁移路径
  4. 聚焦主题 - 每个RFC对应一个主要功能/变更
  5. 迭代优化 - 可根据反馈更新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

评审流程

  1. Share RFC with team for initial feedback
  2. Address comments and update document
  3. Move to "Review" status when ready
  4. Get formal approval before implementation
  5. Update status as implementation progresses
  1. 与团队分享RFC以获取初始反馈
  2. 处理评论并更新文档
  3. 准备就绪后将状态改为「Review(评审中)」
  4. 获得正式批准后再开始实现
  5. 随着实现推进更新状态

RFC Naming Convention

RFC命名规范

NNNN-short-descriptive-title.md
Examples:
  • 0001-config-v2-enhancement.md
  • 0002-plugin-architecture.md
  • 0003-remote-development-support.md
NNNN-short-descriptive-title.md
示例:
  • 0001-config-v2-enhancement.md
  • 0002-plugin-architecture.md
  • 0003-remote-development-support.md

Reference Templates

参考模板

See
references/templates.md
for complete RFC templates.
完整RFC模板请查阅
references/templates.md