rfc
Use when the user wants to write, draft, or author an RFC (Request for Comments) / technical design doc for a feature, change, or architectural decision. Interactively interviews the user, grounds the proposal in the actual codebase, presents 2-3 concrete API/code-snippet approaches to choose from, then writes a review-ready RFC. Triggers on "write an RFC", "draft an RFC", "RFC for X", "design doc for X", or /rfc.
AlemTuzlak · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add AlemTuzlak/skills --skill rfc技能说明
name: rfc description: Use when the user wants to write, draft, or author an RFC (Request for Comments) / technical design doc for a feature, change, or architectural decision. Interactively interviews the user, grounds the proposal in the actual codebase, presents 2-3 concrete API/code-snippet approaches to choose from, then writes a review-ready RFC. Triggers on "write an RFC", "draft an RFC", "RFC for X", "design doc for X", or /rfc.
RFC Writer
Help the user write an RFC that survives review. An RFC is a forcing function for clarity, not documentation written after the fact. Its value is the thinking it forces: honest goals, real alternatives, named risks, and a concrete design. A pretty document with hand-waved alternatives and vague goals is worthless. This skill exists to prevent that.
This skill is interactive by design. It interviews the user to surface the thinking, grounds every claim in the real codebase, and shows the user working code for the design before writing a word of prose. It never fabricates the hard sections.
Principles
- The thinking is the product. The document is a byproduct. If a section can't be filled honestly (no real alternative exists, no risk is known), say so explicitly rather than inventing filler.
- Ground every claim. In a repo, back statements about the current system with file references. Never assert how the code works without having read it.
- Show, don't tell. The design is communicated as a worked API / code example the user picked from real options, not as prose. This is non-negotiable (see Phase 3).
- Rejected options are not waste. The approaches the user didn't pick become the "Alternatives considered" section, complete with their code. That's why alternatives are real here and not strawmen.
- Ask only what's unanswered. If the user's request, a linked ticket, or the code already answers a dimension, don't re-ask it. Confirm your inference instead.
- Ruthlessly concise. Every point stated in the fewest words that still make it clear. Prefer bullets over paragraphs, one sentence over three. No preamble, no restating the obvious, no filler. If a section can be one line, it's one line. The code snippet carries the design, so the prose around it stays minimal. A reader should skim the whole RFC in a couple of minutes.
- No em-dashes in generated document content. Use commas, colons, periods, or parentheses.
Process Flow
digraph rfc {
rankdir=TB;
"Resolve input" [shape=box];
"Phase 1: Ground" [shape=box];
"In a repo?" [shape=diamond];
"Scan code + detect template" [shape=box];
"Phase 2: Interview" [shape=box];
"Phase 3: Design options" [shape=box];
"Option chosen?" [shape=diamond];
"Phase 4: Assemble" [shape=box];
"Phase 5: Self-critique" [shape=box];
"Phase 6: Review loop" [shape=box];
"Approved?" [shape=diamond];
"Phase 7: Output" [shape=box];
"Resolve input" -> "Phase 1: Ground";
"Phase 1: Ground" -> "In a repo?";
"In a repo?" -> "Scan code + detect template" [label="yes"];
"In a repo?" -> "Phase 2: Interview" [label="no"];
"Scan code + detect template" -> "Phase 2: Interview";
"Phase 2: Interview" -> "Phase 3: Design options";
"Phase 3: Design options" -> "Option chosen?";
"Option chosen?" -> "Phase 3: Design options" [label="refine / new options"];
"Option chosen?" -> "Phase 4: Assemble" [label="yes"];
"Phase 4: Assemble" -> "Phase 5: Self-critique";
"Phase 5: Self-critique" -> "Phase 6: Review loop";
"Phase 6: Review loop" -> "Approved?";
"Approved?" -> "Phase 6: Review loop" [label="changes"];
"Approved?" -> "Phase 7: Output" [label="yes"];
}
Do NOT skip phases. If the user bundles several answers into one message, accept them and skip ahead past what they answered. Never skip Phase 3 (the user must see and choose the design from real code options) or Phase 5 (self-critique).
Phase 1: Ground
Resolve the input
The user may provide: a freeform description, a GitHub PR/issue, a Linear ticket, or just a topic. Extract whatever is already answered so you don't re-ask it in Phase 2.
If inside a repo (mandatory)
Scan the code to understand the real context of what the user is proposing. You cannot write a grounded RFC without knowing the system it changes.
- Detect house convention. Glob for an existing RFC setup:
rfcs/,docs/rfcs/,docs/rfc/,**/*rfc*template*,adr/,docs/adr/,.github/*TEMPLATE*. If a template file exists, adopt its section headings and its directory instead of the built-in template, and tell the user in one line:Using your repo's docs/rfcs/template.md; overriding my default structure.No blocking question. - Scan the relevant subsystem. Read the directory tree (names), README/architecture docs, and the actual modules the proposal touches. Understand: how the affected area works today, the patterns and abstractions already in use, the real constraints (types, interfaces, data flow). This grounds the Background section and, critically, lets Phase 3's code options match existing conventions.
- Note file references you'll cite in the RFC (
path:line).
If outside a repo: skip scanning and detection; the interview drives a standalone doc using the built-in template.
Phase 2: Interview
Drive toward the dimensions below. For each, first check if it's already answered by the input or the code scan; if so, confirm your inference (I read that X works via Y - correct?) instead of asking cold. Ask genuinely-open questions one at a time. Where the code scan gives you a candidate answer (especially alternatives and risks), propose it so the user reacts rather than generates from scratch.
Core dimensions (always)
| # | Dimension | Feeds section |
|---|---|---|
| 1 | Problem - what's broken/missing, the pain today | Background / Motivation |
| 2 | **Why now |