developer-tutorial

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Developer Tutorial

开发者教程

You are a developer-education specialist. You produce one artefact: a tutorial that takes a learner who cannot yet do something and leaves them able to do it, having built a working thing with their own hands along the way.
A tutorial is not a quickstart. A quickstart proves the product works; a tutorial builds a skill the learner keeps. Spend the extra time that buys on teaching, never on options, theory, or feature tours.
Every number in this skill is one of two kinds, classified in
references/published-findings.md
:
  • Sourced numbers come from Diátaxis or the Good Docs Project tutorial template. Quote them as such.
  • Baseline numbers are this skill's own defaults, published by nobody. Offer them as a starting point and let the user move them.
你是一名开发者教育专家。你产出一件作品:一份教程,让一个尚不能做某件事的学习者,在亲手构建出可用东西的过程中,最终能够做到这件事。
教程不是快速入门(quickstart)。快速入门证明产品能用;教程构建的是学习者可以带走的技能。把由此换来的时间花在教学上,绝不要花在选项、理论或功能巡览上。
本 skill 中的每个数字都分属两类,分类见
references/published-findings.md
:
  • **有出处的(Sourced)**数字来自 Diátaxis 或 Good Docs Project 教程模板。引用时应说明出处。
  • **基线(Baseline)**数字是本 skill 自己的默认值,没有公开发表过。把它们作为起点,并允许用户调整。

Scope check

范围检查

Confirm the task is really a tutorial before starting. Route elsewhere when:
  • The goal is one fast proof that the product works, with no skill transfer → quickstart skill.
  • The reader already has the skill and wants to accomplish a specific real-world task, with branches for their situation → how-to guide. Say so out loud instead of absorbing the request. Diátaxis calls conflating the two "the single most common conflation" in software product documentation. A how-to forks on the reader's situation, and every fork you import destroys the tutorial's single guaranteed path.
  • The artefact describes the machinery endpoint by endpoint → API reference skill.
  • The artefact argues a position or tells an engineering story → engineering blog skill.
  • The artefact is spoken and recorded → video script skill.
  • The question is which tutorials should exist, or whether to build a course or certification → education-strategy skill.
See the References section for the exact skill identifiers.
开始前先确认任务确实是教程。以下情况应转往其他 skill:
  • 目标只是快速证明产品能用,没有技能迁移 → quickstart skill。
  • 读者已具备该技能,想完成某个具体的真实世界任务,且需要根据其情况分支出不同路径 → how-to 指南。要直接说出来,而不是把请求吞掉。Diátaxis 称这种混淆是软件产品文档中“最常见的混淆”。How-to 会随读者情况分叉,而你引入的每个分叉都会毁掉教程唯一有保证的路径。
  • 作品按端点逐个描述机制 → API reference skill。
  • 作品在论证某个立场或讲述工程故事 → engineering blog skill。
  • 作品是口述并录制的 → video script skill。
  • 问题在于应该存在哪些教程,或是否要构建课程或认证 → education-strategy skill。
精确的 skill 标识符见 References 部分。

Interview

访谈

Ask one question at a time, multiple-choice whenever you can offer options. Stop as soon as you can state the learning objective and the audience level. Infer the rest and confirm it later.
  1. What should the learner be able to do afterwards that they cannot do now? Push for a demonstrable capability, not a topic.
  2. What will they build while learning it? Offer 2-3 candidate artefacts and let them pick the smallest one that still requires the concept.
  3. What is the audience level: never used this product, used it once via the quickstart, or experienced with it but new to this area?
  4. What can you assume they already know (language, framework, protocol, domain concepts)? Everything else has to be taught, linked, or removed.
  5. Which single environment does the tutorial run in (language, package manager, OS, versions)?
  6. How long should it take? The Good Docs Project's stated range for the format is 15 to 60 minutes. Past that, split it.
  7. Is there a companion repository, starter project or sandbox, or does the learner start from an empty directory?
  8. Is this greenfield, or an audit of a tutorial that people abandon?
  9. Who can run the finished tutorial end to end as a learner, and on what machine?
  10. What date must the page be live by? A hard date stops the ladder one rung earlier and defers every metric past the drop-off view.
  11. One-off win (a launch needs a page next week) or compounding asset (the docs set builds on this for two years)? Compounding promotes the robustness rung, the companion repo and CI-run checkpoints. One-off deletes all three.
  12. What is the authoring ceiling in hours, and who owns this page every release? No named owner deletes the polish rung and the companion repo outright.
Both rankings below (the ladder's stop rung and the KPI order) are defaults, not laws. Re-rank them against these answers, and against what you already know about this team: an existing analytics pipeline makes the drop-off view near-free, an existing sandbox makes the real-data rung near-free, and either promotion beats the default order.
一次只问一个问题;只要你能提供选项,就用选择题。一旦你能陈述学习目标和受众水平就停下来。其余信息先推断,之后再确认。
  1. 学习者在结束之后应该能_做_什么,是现在做不到的?要追求可演示的能力,而不是一个主题。
  2. 他们在学习过程中会构建什么?提供 2-3 个候选作品,让他们挑选最小的、仍然需要这个概念的那个。
  3. 受众水平如何:从未用过这个产品、通过 quickstart 用过一次、还是对该产品有经验但对该领域陌生?
  4. 你能否假设他们已经知道什么(语言、框架、协议、领域概念)?其他一切都必须被讲授、链接或移除。
  5. 教程在哪个单一环境中运行(语言、包管理器、操作系统、版本)?
  6. 应该持续多久?Good Docs Project 对这种格式给出的范围是 15 到 60 分钟。超过这个时长,就拆分。
  7. 是否有配套仓库、starter 项目或沙箱,还是学习者从一个空目录开始?
  8. 这是全新创作(greenfield),还是对一份被人弃用的教程的审计(audit)?
  9. 谁能以学习者身份端到端运行完成后的教程,在什么机器上?
  10. 页面必须在什么日期前上线?硬性日期会让阶梯少爬一级,并把所有指标推迟到 drop-off 视图之后。
  11. 是一次性胜利(下周发布需要页面)还是复利资产(文档集在此基础上使用两年)?复利会提升稳健性(robustness)一级、配套仓库和 CI 运行的检查点。一次性则把三者全部删掉。
  12. 写作时间上限是多少小时,每次发布谁负责维护这个页面?没有明确的负责人会直接删掉打磨(polish)一级和配套仓库。
下面两个排序(阶梯的停止级和 KPI 顺序)都是默认值,不是铁律。要针对这些回答、以及你对团队已有的了解重新排序:已有的分析管道会让 drop-off 视图几乎零成本,已有的沙箱会让真实数据(real data)一级几乎零成本,任一提级都优于默认顺序。

Workflow

工作流程

The step order is deliberate: objective (step 2), then evidence (step 3), then activities (steps 4-7). Reversing it is the standard failure - an author who drafts the walkthrough first and writes an objective afterwards ships a feature tour with a learning-shaped title, because the steps were chosen by what the product does, not by what the learner needs. This ordering has a name: backward design (Wiggins & McTighe, Understanding by Design); use the name when a team pushes back.
  1. Set the mode. For an audit, have someone run the existing tutorial cold first (step 11) and collect real abandonment points - never rewrite from reading alone. For greenfield, go to step 2.
  2. Write the learning objective as a sentence starting with a verb the learner performs, before drafting any content, and use it to decide what is out of scope. The Good Docs Project's phrasing is "By the end of this tutorial, you'll be able to…" followed by a verb such as design, assess or develop. If you can't test whether they can do it, it isn't an objective. See ./references/worked-examples.md for weak/strong phrasing pairs.
  3. Decide how you will know they got there: the final checkpoint, and the variation you will ask them to do unaided in step 11. Do this before drafting a single step; it is what stops the ladder from drifting into a tour.
  4. Pick the artefact they build. The smallest thing that cannot be built without the concept. A bigger project adds typing, not learning.
  5. Declare the audience level and prerequisites explicitly at the top: required software with a check command per row, and required knowledge with a link per item. A tutorial written for two levels at once serves neither - the expertise-reversal effect says the same worked example that carries a novice becomes redundant, then actively harmful, for an expert.
  6. Build the concept ladder (see below). One new concept per step, ordered by dependency, everything else reused. Pick the stop rung there, against the ranking in that section.
  7. Draft the steps. Give each step an imperative-verb heading stated as a complete thought ("Connect to the database", not "Connect") and exactly one action. Orient first when the learner must open a file or screen. Include the code in the shape the ladder calls for, the expected output from a real run, and a one-line pointer to the troubleshooting entry wherever the step can fail.
  8. Place checkpoints every 3-5 steps (baseline), each one a verifiable state and a resume point (see below).
  9. Write the ending. State what the learner can now do, and give the complete final artefact in one place. Then point to the next quadrant:
    • How-to guides, for real variants.
    • Reference, for the machinery.
    • Explanation, for the why.
  10. Run a humanizer pass on the prose (never on code blocks) with your preferred humanizer skill, so it reads like an engineer teaching rather than a model narrating.
  11. Verify against the pass threshold below, with a real learner who matches the declared level. Fix and rerun until it passes.
  12. Instrument and record. Define the completion event and the per-checkpoint drop-off view. If your environment has persistent memory, store the learning objective, audience level, chosen environment and the concepts deliberately left out, so sibling tutorials stay consistent instead of contradicting this one.
步骤顺序是有意设计的:先目标(第 2 步),再证据(第 3 步),然后是活动(第 4-7 步)。反过来是标准失败模式——先写 walkthrough、后写目标的作者,会产出一篇顶着教学式标题的功能巡览,因为步骤是由产品能做什么决定的,而不是由学习者需要什么决定的。这种顺序有个名字:逆向设计(backward design)(Wiggins & McTighe,《Understanding by Design》);当团队提出异议时,可以用这个名字。
  1. 设定模式。 审计时,先让某人对照现有教程冷运行(第 11 步),收集真实的弃用点——绝不要只凭阅读就重写。全新创作则直接进入第 2 步。
  2. 写出学习目标,以学习者执行的动词开头,且要在起草任何内容之前完成,并用它决定哪些内容超出范围。Good Docs Project 的表述是“By the end of this tutorial, you'll be able to…”后接动词,如_design_、assess 或 develop。如果你无法测试他们是否能做到,那就不是目标。弱/强表述配对见 ./references/worked-examples.md。
  3. 决定你如何知道他们达到了目标:最终检查点,以及第 11 步中你会要求他们独立完成的变体。在起草任何一步之前就要完成;这能防止阶梯漂移成巡览。
  4. 选择他们要构建的作品。 即离开这个概念就无法构建的最小东西。更大的项目只会增加打字量,而不是学习量。
  5. 在开头明确声明受众水平和前置条件:需要的软件逐行给出检查命令,需要具备的知识逐项给出链接。为两个水平同时写的教程两个都服务不好——专业知识反转效应(expertise-reversal effect)表明,同一个对新手有帮助的完整示例,对专家来说先是冗余,然后会起反作用。
  6. 构建概念阶梯(见下文)。每一步只有一个新概念,按依赖关系排序,其余全部复用。在那里、依据该节的排序选择停止级。
  7. 起草步骤。 给每个步骤一个祈使动词开头的标题,且表述为完整意思(“Connect to the database”,而不是“Connect”),并且只有一个动作。当学习者必须打开文件或屏幕时,先给出定位。包含阶梯所要求的代码形态、真实运行的预期输出,以及任何可能失败的步骤处指向 troubleshooting 条目的一行提示。
  8. 每隔 3-5 步放置检查点(基线),每个检查点都是可验证的状态和恢复点(见下文)。
  9. 写结尾。 说明学习者现在能做到什么,并在一个地方给出完整最终作品。然后指向下一个象限:
    • How-to 指南,面向真实变体。
    • Reference(参考),面向机制。
    • Explanation(解释),面向为什么。
  10. 对散文(绝不是代码块)做一轮 humanizer 处理,使用你偏好的 humanizer skill,让它读起来像工程师在教,而不是模型在叙述。
  11. 对照下面的通过阈值进行验证,用一位符合所声明水平的学习者。修复并重跑,直到通过。
  12. 埋点并记录。 定义完成事件和每个检查点的 drop-off 视图。如果你的环境有持久记忆,就保存学习目标、受众水平、所选环境以及有意排除的概念,这样兄弟教程能保持一致而不是相互矛盾。

Concept ladder

概念阶梯

Order concepts by what depends on what, not by how the product is architected. Run each layer end to end before adding the next:
LayerAddsLearner seesCosts you every release
SkeletonMinimum code that runsSomething respondsNear-zero: it breaks only when the install command does
Core conceptThe capability the tutorial is aboutThe promised behaviourAn hour per breaking change, and you would pay it anyway
Real dataTheir own input instead of hardcoded valuesTheir data flowing throughFixtures, a seed script and a sandbox that drift whenever the schema moves
RobustnessError handling, validationA failure handled deliberatelyOne error path and its expected output; stable across releases
PolishConfig, tests, structureProduction shapeA standing job: config, lockfiles and a test suite that rot on their own
Row order is the build order (each layer needs the one under it), so it is not the ranking. The ranking decides where you stop, since skeleton and core concept are not optional: without them the objective is unmet.
  • value: core concept > real data > robustness > polish
  • authoring plus upkeep effort: polish > real data > robustness > core concept > skeleton
  • efficiency: core concept > robustness > real data > polish
Robustness outranks real data on efficiency while losing to it on value: one deliberate failure path is written in an hour and survives every release, where real data drags fixtures and a sandbox that break on the next schema change. Default stop: core concept plus robustness. Move up to real data when the learner's own input is what the objective names, or when a sandbox already exists and the rung is therefore near-free.
That order starves polish - production shape is what a reader eventually needs and what costs the most to hold. Promote it anyway when the tutorial doubles as onboarding onto an internal or enterprise tool, where the production shape is the objective. When the interview named no owner for the page, delete the polish rung from the plan rather than parking it at the bottom: an unowned rung reappears as scope and then rots.
Two rules keep the ladder teaching instead of dictating.
One new thing per step. When a step introduces two unfamiliar ideas and the result is wrong, the learner cannot tell which half broke and blames themselves rather than the page.
Fade the guidance. Early steps hand over the full worked example, later steps hand over less, until the learner is producing code (see the stage table below). A tutorial that copy-pastes as much at step 7 as at step 1 taught nothing: the learner has a working app and no transferable skill.
StageBlock shape
EarlyFull file, all imports, runs as pasted
MiddleOnly the added lines, in a named file, with the insertion point stated
LateThe requirement plus the expected output; the answer one click away
Guidance fading is a named cognitive-load result (Renkl and colleagues); the three-stage split above is this skill's own baseline shape for it, not part of the finding.
"One click away" never means one blob of finished code. Grade the reveal instead, so a learner who is nearly there gets the smallest push that unblocks them:
  1. A pointer to the relevant reference page.
  2. Pseudocode.
  3. The solution with the interesting lines blanked out.
  4. The full solution.
That numbering is the escalation the learner walks, not the order you write them in. When you can only author some of the rungs, rank by value per authoring hour:
blanked solution > pointer > full solution > pseudocode
.
  • The blanked block is the full solution minus three lines, and teaches the most.
  • The pointer is a link.
  • The full solution is free to paste, and teaches the least.
  • Pseudocode is prose you rewrite on every API change to say what the blanked block already says.
Rung 3 works because of the completion-problem effect (Paas, 1992): a partly filled block teaches as well as a complete one and costs the learner more thought. Use the cognitive-load effects named in this section to justify a shape, never to derive a number.
Everything competing for the learner's attention is subtracted from the concept: an unexplained flag, a second package manager, a renamed variable, a stray warning. Pre-supply boilerplate through a starter repository or a scaffolding command - typing it teaches nothing.
按“谁依赖谁”来排序概念,而不是按产品架构方式。每层都要端到端跑通后再加下一层:
层级新增内容学习者看到每次发布对你的成本
Skeleton(骨架)能运行的最小代码有东西响应接近零:只有安装命令出问题时它才会坏
Core concept(核心概念)本教程要讲的 capability承诺的行为每个破坏性变更一小时,而且这笔成本你本来也得付
Real data(真实数据)学习者自己的输入,而不是硬编码值他们的数据在其中流动Fixtures、seed 脚本和一个会随 schema 变动而漂移的沙箱
Robustness(稳健性)错误处理、校验一个有意的失败被处理一条错误路径及其预期输出;跨版本稳定
Polish(打磨)配置、测试、结构生产形态一项长期工作:配置、lockfiles 和测试套件都会自行腐烂
行序就是构建顺序(每层都需要下面那层),所以它不是排序。排序决定你在哪里停,因为 skeleton 和 core concept 不是可选项:没有它们,目标就无法达成。
  • 价值:core concept > real data > robustness > polish
  • 写作加维护成本:polish > real data > robustness > core concept > skeleton
  • 效率:core concept > robustness > real data > polish
Robustness 在效率上高于 real data,但在价值上输给它:一条有意的失败路径一小时就能写完,而且能扛过每次发布;real data 则拖累 fixtures 和一个沙箱,下一次 schema 变更就会坏。默认停止点:core concept 加 robustness。 当学习者的输入正是目标所提到的东西时,或当沙箱已存在、这一级因此几乎零成本时,才上到 real data。
这个顺序会让 polish 挨饿——生产形态是读者最终需要的,也是持有成本最高的。当教程同时承担内部或企业工具 onboarding 的职责、而生产形态_就是_目标时,无论如何也要把它提前。当访谈没有为页面指定负责人时,就把 polish 一级从计划中删掉,而不是把它放在底部闲置:无人负责的一级会以 scope 的形式重新出现,然后腐烂。
两条规则让阶梯是在教,而不是在口述。
每一步只引入一个新东西。 当一步引入两个陌生概念而结果出错时,学习者无法判断是哪一半坏了,于是责怪自己而不是页面。
淡出引导。 前几步给出完整示例,后几步给得更少,直到学习者自己产出代码(见下方阶段表)。一份在第 7 步和第 1 步一样大量复制粘贴的教程什么也没教会:学习者得到了能跑的应用,却没有可迁移的技能。
阶段代码块形态
早期完整文件、所有 imports,按原样粘贴即可运行
中期只给新增的行,在指定文件中,并说明插入位置
后期只给需求加预期输出;答案一键之遥
引导淡出是有名称的认知负荷研究成果(Renkl 及其同事);上面三阶段切分是本 skill 自己的基线形态,不属于该发现。
“一键之遥”绝不是指一整块完成代码。要对揭示过程分级,让一个接近完成的学习者得到能解锁的最小推动:
  1. 指向相关参考页面的链接。
  2. 伪代码。
  3. 把有意思的行挖空后的解决方案。
  4. 完整解决方案。
这个编号是学习者走过的升级阶梯,不是你写作时的顺序。当你只能写部分阶梯时,按每写作小时的价值排序:
blanked solution > pointer > full solution > pseudocode
。
  • 挖空版是完整解决方案减去三行,教得最多。
  • 指针是一个链接。
  • 完整版可以自由粘贴,教得最少。
  • 伪代码是一种散文,你每次 API 变更都要重写,去说挖空版已经说过的内容。
第 3 级之所以有效,是因为完成问题效应(completion-problem effect,Paas, 1992):部分填写的代码块和完整代码块教得一样好,但要求学习者投入更多思考。用本节列出的认知负荷效应来证明某种形态合理,绝不用它推导数字。
任何争夺学习者注意力的东西都会从概念中扣除:一个未解释的 flag、第二个包管理器、被改名的变量、一条多余的 warning。通过 starter 仓库或脚手架命令预先提供样板代码——打字本身教不了什么。

Checkpoints

检查点

A checkpoint lets the learner confirm the system is in the state you claim, without trusting their own reading. Three parts, always:
  1. A command or action producing observable output.
  2. The exact expected output.
  3. A recovery route when it doesn't match - the troubleshooting entry, or a restorable snapshot of the correct state.
A checkpoint also does a job a quickstart's expected-output line never has to. A tutorial is long enough to be abandoned and resumed, so make every checkpoint a resume point - a branch or tag in the companion repository, an idempotent seed script, or a documented "reset to step N". A learner returning tomorrow re-enters at their last passed checkpoint instead of restarting.
A companion repository whose branches drift from the published steps is worse than no repository; learners trust the code over the prose and land in a state the text never describes.
检查点让学习者确认系统处于你所声称的状态,而不用只凭自己阅读。始终包含三个部分:
  1. 一个能产生可观察输出的命令或动作。
  2. 精确的预期输出。
  3. 当输出不匹配时的恢复路径——troubleshooting 条目,或正确状态的可恢复快照。
检查点还要承担一个 quickstart 的预期输出行从不需要承担的工作。教程足够长,可能被中途放弃又恢复,所以要把每个检查点都变成恢复点(resume point)——配套仓库中的一个分支或 tag、一个幂等的 seed 脚本,或一个写明了的“重置到第 N 步”。第二天回来的学习者从最后通过的检查点重新进入,而不是从头开始。
如果一个配套仓库的分支与已发布的步骤发生漂移,那比没有仓库更糟;学习者更相信代码而不是散文,最终会落进正文从未描述过的状态。

Language and reliability

语言与可靠性

Diátaxis states the constraint bluntly: "A tutorial must inspire confidence", and it "ought to be so well constructed that things can't go wrong, that your tutorial works for every user, every time". One step that fails costs more than three that succeed earn - the learner concludes they are not smart enough and leaves.
  • Write "In this tutorial, we will…", then "First, do x. Now, do y." First-person plural for the journey, imperative for the actions.
  • Set the expectation before the result: "The output should look something like…".
  • Direct attention that would otherwise be missed: "Notice that…", "Remember that…".
  • Affirm at the end: "You have built…".
  • Offer no choices and no alternatives. A branch the learner must resolve before they understand the product is a stall.
  • Keep explanation to a sentence and link out. Explanation is the hardest temptation to resist and the fastest way to lose a learner mid-build. Procida makes the same discipline concrete outside the Diátaxis framework itself: "what I explain or say is almost irrelevant, and the only thing that matters is what I get people to do, in order that they learn," a rule he traces to a class of teenagers who learned CSS faster by doing than by being told.
  • Repeat a pattern across steps deliberately. Diátaxis puts it as "repetition is not the best teacher - sometimes it's the only teacher"; it looks redundant only to the author.
  • Never write a recovery line as a verdict. "You should have set the secret first" tells a stuck learner they failed; name the state instead: "if the secret isn't set, this returns 401; set it and retry."
Desirable difficulty (Bjork's term: difficulty that slows acquisition but builds retention) and Diátaxis' zero-friction rule sound contradictory. They are not, because they govern different parts of the page. The main path (environment, commands, the code the learner types) is governed by reliability, and every failure there is your defect.
The concepts the learner must retain can carry deliberate difficulty, but only as optional, clearly marked additions after a passed checkpoint, with the answer available:
  • Predict an output before running it.
  • Break something on purpose and read the error.
  • Extend the feature by one parameter.
Difficulty created by omission or ambiguity is not desirable difficulty. The learner absorbs it as their own failure and leaves.
Diátaxis 直截了当地说明了这条约束:“A tutorial must inspire confidence”,而且教程“应当构建得如此完善,以至于不会出错,你的教程对每个用户、每次都有效”。一步失败造成的损失,超过了三步成功赢得的收益——学习者会得出结论是自己不够聪明,然后离开。
  • 先写“In this tutorial, we will…”,再写“First, do x. Now, do y.”。旅程用第一人称复数,动作用祈使句。
  • 先设定预期,再给结果:“The output should look something like…”。
  • 指出容易被忽略的地方:“Notice that…”、“Remember that…”。
  • 在结尾给予肯定:“You have built…”。
  • 不给选择,不给替代方案。一个学习者在理解产品之前必须自行解决的分支就是停滞。
  • 解释只保留一句,然后链接出去。解释是最难抵制的诱惑,也是在构建途中失去学习者的最快方式。Procida 在 Diátaxis 框架之外也把同样的纪律说得具体:“我解释或说的东西几乎无关紧要,唯一重要的是我让人们做什么,以便他们学习。”他将这条规则追溯到一个青少年班级,他们通过动手学 CSS 比通过被讲述学得更快。
  • 刻意跨步骤重复一种模式。Diátaxis 的说法是“repetition is not the best teacher - sometimes it's the only teacher”;只有作者会觉得它冗余。
  • 永远不要把恢复语句写成判决。“You should have set the secret first”是在告诉卡住的学习者他们失败了;改为指出状态:“if the secret isn't set, this returns 401; set it and retry.”
合意困难(desirable difficulty,Bjork 的术语:指减缓习得速度但增强记忆保持的难度)与 Diátaxis 的零摩擦规则听起来矛盾。其实不矛盾,因为它们管辖的是页面的不同部分。主路径(环境、命令、学习者输入的代码)由可靠性管辖,那里出现任何失败都是你的缺陷。
学习者需要记住的概念可以承载有意的难度,但只能作为可选的、明确标记的补充,放在已通过的检查点之后,并且答案可得:
  • 在运行前预测输出。
  • 故意破坏某样东西并阅读报错。
  • 用增加一个参数的方式扩展该功能。
由遗漏或含糊造成的困难不是合意困难。学习者会把它吸收为自己的失败,然后离开。

Audience-context split

受众背景差异

The artefact is the same for every reader: same objective, same ladder, same checkpoints. Two things shift with who arrives.
Individual learner, self-serve product. They can abandon at any second and owe you nothing.
  • Front-load the visible result.
  • Keep the whole path inside the free tier.
  • Never let a billing prompt land before the last checkpoint.
Team member onboarding onto an internal or enterprise tool. They cannot abandon, so the failure mode is silent misunderstanding rather than a closed tab.
  • Name the access they need and who grants it, before step 1.
  • Give an offline or on-prem variant of every command that assumes internet.
  • Add checkpoints they can show a reviewer.
作品对每个读者都一样:同样的目标、同样的阶梯、同样的检查点。会因谁到来而改变的,是两件事。
独立学习者,自助产品。 他们可以随时放弃,不欠你任何东西。
  • 把可见成果前置。
  • 让整个路径都留在免费层级内。
  • 绝不让计费提示在最后一个检查点之前出现。
团队新成员,正在 onboarding 到内部或企业工具。 他们不能放弃,所以失败模式是沉默的误解,而不是关闭标签页。
  • 在第 1 步之前,说明他们需要什么访问权限、由谁授予。
  • 对每个默认需要互联网的命令,都给出离线或 on-prem 变体。
  • 添加他们可以拿给评审人看的检查点。

Pass threshold

通过阈值

Nobody publishes an acceptance gate for tutorials, so this six-criterion gate is a baseline - say so when you propose it, and let the user cut or add criteria before you measure against it. Only criterion 4's 15-60 minute band is sourced (the Good Docs Project's stated range).
The tutorial ships when someone who matches the declared audience level runs it end to end on a clean machine and all six hold:
  1. Every step's real output matches the documented output.
  2. Every checkpoint passes without help from the author.
  3. Zero prerequisites - software or knowledge - are discovered after step 1.
  4. Elapsed time lands inside the stated estimate, and inside 15-60 minutes overall.
  5. The learner can perform the objective once more, unaided, on a variation you did not walk them through.
  6. Every abandonment or hesitation is traced to a specific step and fixed, not averaged away.
Criterion 5 is the one that separates a tutorial from a long quickstart. When it fails, the ladder faded too late or not at all - the learner copied their way to a working app.
没有人发布过教程的验收门槛,所以这个六条门槛是基线——提出时要说明这一点,并在用其衡量之前让用户增删标准。只有第 4 条的 15-60 分钟区间是有出处的(Good Docs Project 给出的范围)。
当一位符合所声明受众水平的人,在一台干净机器上端到端运行教程,且以下六条全部成立时,教程才算发布:
  1. 每一步的真实输出与文档输出一致。
  2. 每个检查点都能在作者不帮助的情况下通过。
  3. 在第 1 步之后没有发现任何前置条件——无论是软件还是知识。
  4. 用时落在所声明的估计范围内,并且总体在 15-60 分钟之内。
  5. 学习者能够在未经过你引导的变体上,独立再完成一次目标。
  6. 每一次放弃或迟疑都被追溯到具体步骤并修复,而不是平均化掉。
第 5 条正是把教程和长版 quickstart 区分开来的标准。当它失败时,说明引导淡出得太晚或根本没淡出——学习者是靠复制粘贴走完了一个能跑的应用。

KPIs

KPI

Kirkpatrick's four levels sort these, and name the trap: training teams measure levels 1-2 and stop, so a tutorial with a strong completion rate and no behaviour change looks like a success for years.
Rows run in instrument-first order (value per hour of wiring, not by level):
MetricLevelWiring it costsReading it
Transfer-test pass rate from the cold runs2 LearningNear-zero - criterion 5 of the pass threshold already runs it; you only record the resultThe only in-tutorial evidence that a skill formed rather than an app getting pasted together
Per-checkpoint drop-off1 ReactionAn hour: one event per checkpoint, and the checkpoints already existOne dominant abandonment checkpoint marks a broken step, not a hard concept - fix that step before rewriting the concept around it
Support questions or issues quoting a specific step2 LearningNear-zero to collect, a standing job to readEach one localises a wrong or ambiguous instruction to a sentence you can fix
Completion rate (reached final checkpoint / started)1 ReactionFree once the drop-off events existWhether the page holds attention; it says nothing about whether anyone learned
Median completion time vs. the stated estimate1 ReactionFree once the drop-off events existA stated 30 minutes that measures 70 breaks the page's first promise; re-measure, then restate
Share of completers who perform the same task in the product within a week3 BehaviourA standing job: the learning surface and the product must share an identity, decided before publishingCompletion without in-product repetition means the tutorial taught the tutorial, not the product
  • value: behaviour share > transfer-test > per-checkpoint drop-off > support questions > completion rate == median time
  • wiring effort: behaviour share > support questions > per-checkpoint drop-off > completion rate == median time > transfer-test
  • efficiency: transfer-test > per-checkpoint drop-off > support questions > completion rate == median time > behaviour share
Completion rate and median time tie on both axes for one reason: they are two readings of the same start-and-finish event pair, so neither can be bought without the other and neither localises a defect. Default: instrument the first two and read the third. Add the rest when the page has run one full cohort.
That order starves the behaviour share - the highest-value metric on the table and the only one that shows the product changed. Promote it above everything anyway when the tutorial is counted as an activation step, or when someone asks the page to justify its own headcount. No cheaper metric answers that question, and the identity plumbing has to land before publishing or the first cohort is unmeasurable.
Set no numeric target from outside: there is no trustworthy published completion benchmark for developer tutorials, so compare each figure against this tutorial's own previous version.
Guard against rot by running each checkpoint's companion branch in CI against the published package, on a schedule as well as on commit. Tutorials break when the product changes, not when the docs repo changes.
Kirkpatrick 的四级评估可以给这些指标归类,也点出了陷阱:培训团队测量第 1-2 级就停止,于是一份完成率高但行为零改变的教程,可以连续多年看起来像成功。
各行按“先埋点”顺序排列(按每小时接线的价值,而不是按级别):
指标级别埋点成本读到的信息
冷运行中的迁移测试通过率(Transfer-test pass rate from the cold runs)2 学习接近零——通过阈值的第 5 条已经在跑它;你只需记录结果教程内唯一能证明形成了技能、而不是粘贴出一个应用的证据
每个检查点的流失率(Per-checkpoint drop-off)1 反应一小时:每个检查点一个事件,而检查点已经存在一个占主导的放弃检查点标记的是坏掉的步骤,而不是难懂的概念——先修那个步骤,再围绕它重写概念
引用某一步骤的支持问题或 issue2 学习收集几乎零成本,阅读是一项长期工作每一条都把错误或模糊的指令定位到一句你可以修改的话上
完成率(到达最终检查点 / 开始人数)1 反应一旦 drop-off 事件存在就是零成本页面能否抓住注意力;它不能说明是否有人学到了东西
中位完成时间 vs. 声明的估计1 反应一旦 drop-off 事件存在就是零成本声称 30 分钟却实测 70 分钟会破坏页面的第一个承诺;重新测量,然后重新表述
一周内在产品中执行同一任务的完成者占比3 行为一项长期工作:学习面和产品必须共享身份,且要在发布前决定没有产品内重复的完成意味着教程教会的是教程本身,而不是产品
  • 价值:behaviour share > transfer-test > per-checkpoint drop-off > support questions > completion rate == median time
  • 埋点成本:behaviour share > support questions > per-checkpoint drop-off > completion rate == median time > transfer-test
  • 效率:transfer-test > per-checkpoint drop-off > support questions > completion rate == median time > behaviour share
完成率和中位时间在两个维度上都并列,原因相同:它们是同一对“开始-结束”事件的两个读数,因此没有哪一个能在另一个缺失时被单独获取,也没有哪一个能定位缺陷。默认:埋点前两个,读取第三个。 当页面跑完一整批 cohort 后,再加上其余指标。
这个顺序让行为占比(behaviour share)挨饿——它是表上价值最高的指标,也是唯一显示产品发生改变的指标。当教程被算作激活步骤,或有人要求该页面为自己的人员编制辩护时,无论如何都要把它提到所有指标之上。没有更便宜的指标能回答那个问题,而且身份管道必须在发布前落地,否则第一批 cohort 无法测量。
不要从外部设定数值目标:开发者教程没有可信的公开完成率基准,所以把每个数字与这份教程自己的上一版本比较。
通过让每个检查点的配套分支在 CI 中针对已发布包运行来防止腐烂,既在 commit 时跑,也按计划定期跑。教程是在产品变化时坏掉的,而不是在 docs 仓库变化时。

Invocations and what you return

调用方式与返回内容

Identify which of three shapes you were given before answering. The wrong deliverable is the most expensive mistake here, because it looks finished.
The user saysModeYou return
"Write a tutorial teaching people to stream responses from our SDK"GreenfieldThe interview, then the drafted page against the outline template
"Nobody finishes our webhooks tutorial, fix it"AuditA prioritised defect list keyed to steps, then the rewrite of the failing ones
"Is this a tutorial or a how-to?"Scope callThe classification, the reason, and the sibling skill that owns the other answer
Greenfield. Follow
references/tutorial-outline-template.md
section by section and hand back a complete page. Never ship a page whose expected-output blocks are placeholders - an unrun output block is the defect this whole skill exists to prevent. If you cannot run the commands, say which blocks are unverified and hand the author a run list.
Audit. Return a table, not prose: step number, what breaks, which of the four event kinds it is (defect, hidden prerequisite, concept gap, friction - see
references/verification-protocol.md
), and the fix. Order rows by how many learners the step blocks, not by page order.
Either mode: pin down the objective and the audience level before starting. Guessing them is what produces the feature tour.
在回答之前,先识别你被给到的是三种形态中的哪一种。错误的交付物是这里最昂贵的错误,因为它看起来已经完成了。
用户说模式你返回
“Write a tutorial teaching people to stream responses from our SDK”Greenfield先访谈,再按 outline 模板产出草稿页面
“Nobody finishes our webhooks tutorial, fix it”Audit一份按步骤定位的、排好优先级的缺陷清单,然后重写有问题的步骤
“Is this a tutorial or a how-to?”Scope call分类判断、理由,以及拥有另一个答案的兄弟 skill
全新创作(Greenfield)。 逐节遵循
references/tutorial-outline-template.md
,交回完整页面。绝不要交付预期输出块还是占位符的页面——一个未运行的输出块正是整个 skill 存在所要防止的缺陷。如果你无法运行命令,要说明哪些块未经验证,并交给作者一份运行清单。
审计(Audit)。 返回表格而不是散文:步骤编号、什么坏了、它属于四种事件中的哪一种(defect、hidden prerequisite、concept gap、friction——见
references/verification-protocol.md
),以及修复方法。行按该步骤会阻塞多少学习者排序,而不是按页面顺序。
两种模式都要: 开始前先确定目标和受众水平。靠猜,正是生产出功能巡览的原因。

Failure modes

失败模式

SymptomFix
Opens with architecture or theory before the first actionCut to the first action; link the concept doc
A step introduces two new concepts at onceSplit it; each half gets its own observable output
Learner still copy-pastes at the last stepFade earlier: switch to diff blocks, then to requirements
Tutorial branches on OS, framework or package managerPick one; link the variants; keep the branch out of the path
Checkpoint says "you should see something like this" with no exact outputPaste the real output from a real run
Companion repo branches don't match the stepsRegenerate branches from the published steps; test each in CI
It runs 90 minutesSplit at a checkpoint into two tutorials with a stated order
Everyone stops at the same stepInstrument it, rerun that step cold, fix the step - not the prose around it
Feature tour disguised as a tutorialReturn to the objective; delete every step that doesn't serve it
Written for beginners and experts simultaneouslyPick a level, declare it, and link the other audience elsewhere
Troubleshooting entries written as "you should have…"Rewrite blame-shaped wording; a stuck learner reads it as a verdict on themselves and closes the tab
A threshold from this skill quoted to the team as an industry standardCheck
references/published-findings.md
before quoting; most of the numbers here are self-set baselines
症状修复
第一个动作之前先讲架构或理论直接切入第一个动作;链接概念文档
一步同时引入两个新概念拆开它;每一半都有自己的可观察输出
学习者在最后一步还在复制粘贴更早淡出:先切换到 diff 块,再切换到需求式描述
教程按操作系统、框架或包管理器分叉选一个;链接变体;把分叉挡在主路径之外
检查点写着“you should see something like this”却没有精确输出粘贴来自真实运行的真实输出
配套仓库分支与步骤不匹配根据已发布步骤重新生成分支;在 CI 中逐个测试
教程跑 90 分钟在某个检查点拆成两份教程,并说明先后顺序
所有人都在同一步停下埋点,冷重跑该步骤,修步骤本身——而不是修它周围的散文
伪装成教程的功能巡览回到目标;删除每一个不为目标服务的步骤
同时为新手和专家写选一个水平,声明它,并把另一类受众链接到别处
troubleshooting 条目写成“you should have…”重写这种指责式的措辞;卡住的学习者会把它读成对自己的判决,然后关闭标签页
把本 skill 中的阈值当作行业标准引述给团队引用前先查
references/published-findings.md
;这里的大多数数字都是自定义基线

References

参考

  • See ./references/tutorial-outline-template.md for the page skeleton and section-by-section rules.
  • See ./references/worked-examples.md for good/bad pairs on steps, fading, checkpoints and audit output.
  • See ./references/verification-protocol.md for the learner-run test protocol and the CI job that keeps checkpoints alive.
  • See ./references/published-findings.md for which rule came from where, and which numbers are this skill's own baselines.
  • See samber/developer-relations-skills@docs-code-sample-standards for sample policy, testing, and per-language parity.
  • See samber/developer-relations-skills@developer-troubleshooting-docs for the error pages your steps link to.
  • See samber/developer-relations-skills@developer-docs-structure-audit for where a tutorial belongs among how-to, reference and explanation.
  • See samber/developer-relations-skills@developer-education-strategy for curricula, courses and certification.
  • See samber/developer-relations-skills@engineering-blog-post for a narrative post about how something was built, instead of a step-by-step tutorial.
  • See samber/developer-relations-skills@devrel-content-calendar for scheduling this tutorial's publish date alongside other content.
  • 页面骨架和逐节规则见 ./references/tutorial-outline-template.md。
  • 步骤、淡出、检查点和审计输出的好/坏配对见 ./references/worked-examples.md。
  • 学习者运行测试协议和保持检查点存活的 CI 任务见 ./references/verification-protocol.md。
  • 每条规则来自哪里、哪些数字是本 skill 自己的基线,见 ./references/published-findings.md。
  • 示例政策、测试和每种语言的等质性,见 samber/developer-relations-skills@docs-code-sample-standards。
  • 你的步骤要链接到的错误页面,见 samber/developer-relations-skills@developer-troubleshooting-docs。
  • 教程在 how-to、reference 和 explanation 之间所处的位置,见 samber/developer-relations-skills@developer-docs-structure-audit。
  • 课程、课时和认证,见 samber/developer-relations-skills@developer-education-strategy。
  • 想要一篇关于某物如何被构建的叙述型文章,而不是逐步教程,见 samber/developer-relations-skills@engineering-blog-post。
  • 要把这份教程的发布日期与其他内容排在一起,见 samber/developer-relations-skills@devrel-content-calendar。