@kidlat-dakila/flightplan 0.0.0-stage → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +105 -0
- package/README.md +174 -2
- package/backend/configurations/default-configurations/minimal/blast.nodes.impactReason.md +7 -0
- package/backend/configurations/default-configurations/minimal/blast.nodes.impactType.behaviour-changes.md +1 -0
- package/backend/configurations/default-configurations/minimal/blast.nodes.impactType.breaks.md +1 -0
- package/backend/configurations/default-configurations/minimal/blast.nodes.impactType.md +10 -0
- package/backend/configurations/default-configurations/minimal/blast.nodes.impactType.unaffected.md +1 -0
- package/backend/configurations/default-configurations/minimal/context.md +58 -0
- package/backend/configurations/default-configurations/minimal/journey.description.md +16 -0
- package/backend/configurations/default-configurations/minimal/journey.nodes.blockLabels.label.md +13 -0
- package/backend/configurations/default-configurations/minimal/journey.nodes.description.md +13 -0
- package/backend/configurations/default-configurations/minimal/journey.nodes.label.md +10 -0
- package/backend/configurations/default-configurations/minimal/journey.nodes.triggerLabels.label.md +10 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.title.md +7 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.kind.bug.md +1 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.kind.md +6 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.kind.nit.md +2 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.kind.question.md +2 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.kind.risk.md +3 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.md +21 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.reading.md +15 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.solution.md +10 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.title.md +5 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.findings.trace.md +10 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.needsAttention.md +26 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.reading.md +59 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.title.md +11 -0
- package/backend/configurations/default-configurations/minimal/walkthrough.intro.md +4 -0
- package/backend/configurations/default-configurations/minimal/writingStyle.md +100 -0
- package/backend/configurations/default-configurations/onboardee/blast.nodes.impactReason.md +8 -0
- package/backend/configurations/default-configurations/onboardee/blast.nodes.impactType.behaviour-changes.md +1 -0
- package/backend/configurations/default-configurations/onboardee/blast.nodes.impactType.breaks.md +1 -0
- package/backend/configurations/default-configurations/onboardee/blast.nodes.impactType.md +11 -0
- package/backend/configurations/default-configurations/onboardee/blast.nodes.impactType.unaffected.md +1 -0
- package/backend/configurations/default-configurations/onboardee/context.md +70 -0
- package/backend/configurations/default-configurations/onboardee/contextCodeBlocks.description.md +62 -0
- package/backend/configurations/default-configurations/onboardee/journey.description.md +10 -0
- package/backend/configurations/default-configurations/onboardee/journey.nodes.blockLabels.label.md +9 -0
- package/backend/configurations/default-configurations/onboardee/journey.nodes.description.md +7 -0
- package/backend/configurations/default-configurations/onboardee/journey.nodes.label.md +5 -0
- package/backend/configurations/default-configurations/onboardee/journey.nodes.triggerLabels.label.md +6 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.title.md +7 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.kind.bug.md +2 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.kind.md +7 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.kind.nit.md +3 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.kind.question.md +2 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.kind.risk.md +3 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.md +30 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.reading.md +14 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.solution.md +12 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.title.md +6 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.findings.trace.md +12 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.needsAttention.md +36 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.reading.md +68 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.title.md +12 -0
- package/backend/configurations/default-configurations/onboardee/walkthrough.intro.md +5 -0
- package/backend/configurations/default-configurations/onboardee/writingStyle.md +137 -0
- package/backend/configurations/default-configurations/standard/blast.nodes.impactReason.md +8 -0
- package/backend/configurations/default-configurations/standard/blast.nodes.impactType.behaviour-changes.md +1 -0
- package/backend/configurations/default-configurations/standard/blast.nodes.impactType.breaks.md +1 -0
- package/backend/configurations/default-configurations/standard/blast.nodes.impactType.md +11 -0
- package/backend/configurations/default-configurations/standard/blast.nodes.impactType.unaffected.md +1 -0
- package/backend/configurations/default-configurations/standard/context.md +70 -0
- package/backend/configurations/default-configurations/standard/journey.description.md +10 -0
- package/backend/configurations/default-configurations/standard/journey.nodes.blockLabels.label.md +9 -0
- package/backend/configurations/default-configurations/standard/journey.nodes.description.md +7 -0
- package/backend/configurations/default-configurations/standard/journey.nodes.label.md +5 -0
- package/backend/configurations/default-configurations/standard/journey.nodes.triggerLabels.label.md +6 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.title.md +7 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.kind.bug.md +2 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.kind.md +7 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.kind.nit.md +3 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.kind.question.md +2 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.kind.risk.md +3 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.md +30 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.reading.md +14 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.solution.md +12 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.title.md +6 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.findings.trace.md +12 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.needsAttention.md +36 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.reading.md +68 -0
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.title.md +12 -0
- package/backend/configurations/default-configurations/standard/walkthrough.intro.md +5 -0
- package/backend/configurations/default-configurations/standard/writingStyle.md +137 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactReason.md +8 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactType.behaviour-changes.md +1 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactType.breaks.md +1 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactType.md +11 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactType.unaffected.md +1 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/context.md +70 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/contextCodeBlocks.description.md +98 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.description.md +10 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.blockLabels.label.md +9 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.description.md +7 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.label.md +5 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.triggerLabels.label.md +6 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.title.md +7 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.kind.bug.md +2 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.kind.md +7 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.kind.nit.md +3 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.kind.question.md +2 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.kind.risk.md +3 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.md +30 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.reading.md +14 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.solution.md +12 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.title.md +6 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.findings.trace.md +12 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.needsAttention.md +36 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.reading.md +68 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.title.md +12 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.intro.md +5 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/writingStyle.md +137 -0
- package/backend/configurations/system-instructions/artifactFormat.md +103 -0
- package/backend/configurations/system-instructions/blast.md +67 -0
- package/backend/configurations/system-instructions/blast.nodes.impactReason.md +3 -0
- package/backend/configurations/system-instructions/blast.nodes.impactType.md +5 -0
- package/backend/configurations/system-instructions/codeLinks.md +67 -0
- package/backend/configurations/system-instructions/context.md +22 -0
- package/backend/configurations/system-instructions/contextCodeBlocks.description.md +3 -0
- package/backend/configurations/system-instructions/contextCodeBlocks.md +52 -0
- package/backend/configurations/system-instructions/id.md +8 -0
- package/backend/configurations/system-instructions/journey.description.md +14 -0
- package/backend/configurations/system-instructions/journey.md +144 -0
- package/backend/configurations/system-instructions/journey.nodes.blockLabels.label.md +6 -0
- package/backend/configurations/system-instructions/journey.nodes.description.md +3 -0
- package/backend/configurations/system-instructions/journey.nodes.label.md +2 -0
- package/backend/configurations/system-instructions/journey.nodes.triggerLabels.label.md +4 -0
- package/backend/configurations/system-instructions/title.md +8 -0
- package/backend/configurations/system-instructions/walkthrough.files.md +25 -0
- package/backend/configurations/system-instructions/walkthrough.files.summary.md +4 -0
- package/backend/configurations/system-instructions/walkthrough.files.title.md +2 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.kind.md +4 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.md +117 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.reading.md +4 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.solution.md +9 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.title.md +4 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.findings.trace.md +5 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.md +55 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.needsAttention.md +8 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.reading.md +3 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.title.md +3 -0
- package/backend/configurations/system-instructions/walkthrough.intro.md +3 -0
- package/backend/configurations/system-instructions/walkthrough.md +14 -0
- package/backend/configurations/system-instructions/writingStyle.md +5 -0
- package/backend/main.js +161899 -0
- package/backend/plugin/.claude-plugin/plugin.json +15 -0
- package/backend/plugin/.mcp.json +8 -0
- package/backend/plugin/skills/review/SKILL.md +360 -0
- package/frontend/assets/_branchId-CPb8-qBw.js +1 -0
- package/frontend/assets/_branchId-LiwHskkW.js +1 -0
- package/frontend/assets/_id-BDFgPH36.js +1 -0
- package/frontend/assets/_id-DlHylI1F.js +1 -0
- package/frontend/assets/agents-BGNiGYQQ.js +1 -0
- package/frontend/assets/agents-DBPulyWi.js +1 -0
- package/frontend/assets/configuration-C8ZTSPna.js +1 -0
- package/frontend/assets/configuration-DBU-Fvop.js +1 -0
- package/frontend/assets/create-BWsYjEs5.js +1 -0
- package/frontend/assets/create-DBNC2wSp.js +1 -0
- package/frontend/assets/create-DBv4ZLt7.js +1 -0
- package/frontend/assets/create-DXgFUVIW.js +1 -0
- package/frontend/assets/download-BnmEn_Ca.js +1 -0
- package/frontend/assets/forges-BOWrvfZl.js +1 -0
- package/frontend/assets/forges-DwSiwqas.js +1 -0
- package/frontend/assets/index-B1Rm0SQ5.js +1 -0
- package/frontend/assets/index-BKKD-dvv.js +1 -0
- package/frontend/assets/index-BaflOxvR.js +1 -0
- package/frontend/assets/index-CR5UGYQN.js +157 -0
- package/frontend/assets/index-CSoB1eP_.js +1 -0
- package/frontend/assets/index-CUqlioqL.js +1 -0
- package/frontend/assets/index-CZN7BV83.js +1 -0
- package/frontend/assets/index-CeY9TXPf.js +1 -0
- package/frontend/assets/index-CqVakH8R.js +1 -0
- package/frontend/assets/index-CydhSU9g.js +1 -0
- package/frontend/assets/index-D-k5POv5.js +1 -0
- package/frontend/assets/index-DCCyA67N.js +1 -0
- package/frontend/assets/index-DfRj4oZV.js +441 -0
- package/frontend/assets/index-Dn9qaXzX.js +1 -0
- package/frontend/assets/index-Dw5NpM9d.js +1 -0
- package/frontend/assets/index-DyfuBbIJ.js +1 -0
- package/frontend/assets/index-PzkXPYSX.js +1 -0
- package/frontend/assets/index-QabB0_Qw.js +1 -0
- package/frontend/assets/index-V8tnJR9v.js +1 -0
- package/frontend/assets/index-XcYy-NBi.js +1 -0
- package/frontend/assets/index-ec_xLUMF.css +1 -0
- package/frontend/assets/index-efpZ6EEe.js +1 -0
- package/frontend/assets/index-s0xxzhVW.js +1 -0
- package/frontend/assets/index-s14Wy6CE.js +1 -0
- package/frontend/assets/index-zxLaxo8R.js +1 -0
- package/frontend/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/frontend/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/frontend/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/frontend/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/frontend/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/frontend/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/frontend/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/frontend/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/frontend/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/frontend/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/frontend/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/frontend/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/frontend/assets/repositories-BLLfYDjf.js +1 -0
- package/frontend/assets/repositories-of9BXUjW.js +1 -0
- package/frontend/assets/route-X94hglR1.js +1 -0
- package/frontend/favicon.ico +0 -0
- package/frontend/index.html +14 -0
- package/frontend/logo-small.png +0 -0
- package/frontend/logo.png +0 -0
- package/package.json +27 -4
- package/published-review/app.css +1 -0
- package/published-review/app.js +322 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# How to write it
|
|
2
|
+
|
|
3
|
+
Every review artifact Flight Plan stores is prose beside code. The code is referenced,
|
|
4
|
+
never pasted, so **the prose is the whole of what you write** — and the same
|
|
5
|
+
voice runs through all of it, from a five-word node label to a four-sentence
|
|
6
|
+
reading.
|
|
7
|
+
|
|
8
|
+
This file is the voice: what every surface has in common. How to word any one
|
|
9
|
+
field is that field's own instruction, and the artifact's shape is
|
|
10
|
+
`artifactFormat`.
|
|
11
|
+
|
|
12
|
+
## The test
|
|
13
|
+
|
|
14
|
+
A reader has the code open beside your sentence. Write what they cannot get from
|
|
15
|
+
it: why this runs, and what goes wrong without it. Anything they could
|
|
16
|
+
read for themselves is a sentence spent.
|
|
17
|
+
|
|
18
|
+
The second test is harder and matters more: **could this be checked?** A claim
|
|
19
|
+
about code that names the code can be verified by opening it. A claim that names
|
|
20
|
+
nothing cannot be, so it never is.
|
|
21
|
+
|
|
22
|
+
## Voice
|
|
23
|
+
|
|
24
|
+
Written in [ASD-STE100](https://www.asd-ste100.org) Simplified Technical
|
|
25
|
+
English. Six rules carry most of it:
|
|
26
|
+
|
|
27
|
+
- **One idea per sentence.** Twenty words is long.
|
|
28
|
+
- **Active voice.** "`checkSize()` throws `TooLarge`", not "`TooLarge` is thrown".
|
|
29
|
+
- **Present tense**, except where the tense table below says otherwise.
|
|
30
|
+
- **Plain words over precise ones.**
|
|
31
|
+
- **No ambiguous *it*.** Name the thing again.
|
|
32
|
+
- **No vague verbs** — *handle*, *manage*, *process*, *support*, *orchestrate*,
|
|
33
|
+
*surface*, *drive*, *deal with*. Each names a topic and leaves out what
|
|
34
|
+
happens. Use the verb the code uses.
|
|
35
|
+
|
|
36
|
+
**No metaphor for what the code does.** Where the code has an operation, name
|
|
37
|
+
the operation. The test is whether the reader can find the word in the code:
|
|
38
|
+
they are reading beside it, so a word that is not in it is a word they have to
|
|
39
|
+
translate.
|
|
40
|
+
|
|
41
|
+
- Not "climbs the ancestors" but `element = element.parentElement`, written
|
|
42
|
+
twice if the loop runs twice. Not "bubbles up", "walks the tree", "falls
|
|
43
|
+
through", "bails out", "hands off" — and not "the climb" or "the hand-off"
|
|
44
|
+
either.
|
|
45
|
+
- Not "missing" or "never set" but `undefined`, `null` or `""`. Name the value.
|
|
46
|
+
- Not "the check wants a clean path" but "`resolvePath()` returns null for a
|
|
47
|
+
path outside the root". Code has no intent.
|
|
48
|
+
- Not "the guard", "the gate", "the plumbing" or "the wiring" but the plain word
|
|
49
|
+
for what the code is: a condition, a validation, a check, a function that
|
|
50
|
+
passes the value to `saveOrder()`. Review jargon is a metaphor too.
|
|
51
|
+
- Not "refuses", "rejects", "accepts", "allows", "blocks" or "protects" but the
|
|
52
|
+
operation: returns `false`, throws `RangeError`, returns a 400, skips the
|
|
53
|
+
line. A verb of judgement is a metaphor for one of these, and hides which.
|
|
54
|
+
|
|
55
|
+
A codebase's own nouns are not metaphors for this purpose — a card, a panel, a
|
|
56
|
+
board, a waypoint — because the code calls them that and the reader can search
|
|
57
|
+
for them. Nor are technical verbs with one meaning: return, throw, parse,
|
|
58
|
+
render, call.
|
|
59
|
+
|
|
60
|
+
A metaphor cannot be checked, which is why it never is. "Four ancestors up"
|
|
61
|
+
survived several drafts of this instruction; written out as `<li>` → `<ul>` →
|
|
62
|
+
`<div>` it turned out to be three.
|
|
63
|
+
|
|
64
|
+
**Name the value, never the variable.** A call carries the arguments it was
|
|
65
|
+
given on the run you are describing: `` `addToBasket({ id: 7 })` ``,
|
|
66
|
+
never `` `addToBasket(payload)` ``. Where a literal will not fit, write the shortest
|
|
67
|
+
thing that identifies it — `<div.fp-interlude>`, `[9 ranges]` — but never the
|
|
68
|
+
variable name, because that is the one thing the reader cannot resolve.
|
|
69
|
+
|
|
70
|
+
**Do not narrate the diff.** "This line was changed to…" is about the pull
|
|
71
|
+
request. The prose is about the code, and the panel already marks what changed.
|
|
72
|
+
|
|
73
|
+
**Invent no nouns.** A *post-acquire release* or a *rank direction contract*
|
|
74
|
+
names something the codebase does not name, so a reader can neither search for
|
|
75
|
+
it nor check it. Both read as precision until somebody tries to use them to find
|
|
76
|
+
something.
|
|
77
|
+
|
|
78
|
+
## Tells
|
|
79
|
+
|
|
80
|
+
Six habits that mark prose nobody checked. Fix each on sight.
|
|
81
|
+
|
|
82
|
+
- **The `-ing` rider.** A clause opening *ensuring*, *allowing*, *improving*,
|
|
83
|
+
*providing* or *helping* is a claim tacked onto a verified one. Either it is
|
|
84
|
+
what the code does — say it as the main clause and link it — or cut it.
|
|
85
|
+
- **The hedge.** *Likely*, *presumably*, *appears to*, *generally*, *typically*.
|
|
86
|
+
A reading that hedges is a reading nobody opened the file for. What you could
|
|
87
|
+
not resolve is a `question`, or a `risk` whose reading says what stopped you.
|
|
88
|
+
- **The sales adjective.** *Robust*, *seamless*, *elegant*, *powerful*,
|
|
89
|
+
*crucial*, *pivotal*. The marks and the `changed` chip carry the emphasis; a
|
|
90
|
+
word insisting on it competes with them.
|
|
91
|
+
- **The vague connection.** *Associated with*, *related to*, *tied to*, *works
|
|
92
|
+
with*. Name the relation the code has: calls, reads, returns, throws, wraps.
|
|
93
|
+
- **Staging instead of stating.** "This isn't just a check — it's…". Say what it
|
|
94
|
+
is; a sentence that opens with what something is not has spent half itself on
|
|
95
|
+
nothing.
|
|
96
|
+
- **Borrowed authority.** *Best practice*, *industry standard*, *the usual
|
|
97
|
+
pattern*. Cite the code, or this repository's own convention with a link, or
|
|
98
|
+
drop the point.
|
|
99
|
+
|
|
100
|
+
And two smaller ones: **`serves as`, `features`, `boasts`** where *is*, *has* or
|
|
101
|
+
the real verb would do; and **a reading that restates its own title**, which
|
|
102
|
+
means the title is doing no work or the reading is not.
|
|
103
|
+
|
|
104
|
+
**None of these reach inside code.** An identifier, a quoted error string, a
|
|
105
|
+
value and a finding's solution are exempt from every rule in this file:
|
|
106
|
+
`handleRequest()` is a name, not a word choice.
|
|
107
|
+
|
|
108
|
+
The rest of this file is weighed in context rather than fixed on sight. How long
|
|
109
|
+
a reading runs, how much reasoning a description carries, whether a sentence
|
|
110
|
+
repeats its neighbour — the code beside it settles those, and no rule can.
|
|
111
|
+
|
|
112
|
+
Linking code is a fixed part of the writing style, always in force — its rules
|
|
113
|
+
are served separately and are not edited here.
|
|
114
|
+
|
|
115
|
+
## Tense
|
|
116
|
+
|
|
117
|
+
Titles are past tense — *Added*, *Modified*, *Removed* — because the code
|
|
118
|
+
exists.
|
|
119
|
+
|
|
120
|
+
Descriptions are present tense: they describe code, not work. A waypoint's
|
|
121
|
+
reading is the exception: it opens with what the author did, then says in the
|
|
122
|
+
present what the code does as a result. Its own instruction has the form.
|
|
123
|
+
|
|
124
|
+
## Where a reason goes
|
|
125
|
+
|
|
126
|
+
`context` carries the reason the change exists, and a node's `description`
|
|
127
|
+
carries the reason a step is in the path. A waypoint's reading carries the
|
|
128
|
+
reason for its own piece of the change — what it is for within the pull request
|
|
129
|
+
— and its instruction says how. A constraint or a trade-off beyond that is
|
|
130
|
+
worth one sentence at the end of a reading, and nothing more, because a reading
|
|
131
|
+
that argues is a reading nobody finishes.
|
|
132
|
+
|
|
133
|
+
Everything else about a particular field — how to word a title, a label, a
|
|
134
|
+
reading, a description, an edge label, a contract, a finding — is that field's
|
|
135
|
+
own instruction. Ask for it when you reach the field. It used to be restated
|
|
136
|
+
here as well, which meant two copies of every rule and, in the end, two copies
|
|
137
|
+
that disagreed.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Write one or two sentences a reviewer can check against the code.
|
|
2
|
+
|
|
3
|
+
- On `breaks`: what fails, and the case the author did not account for.
|
|
4
|
+
- On `behaviour-changes`: what is different now, and for whom.
|
|
5
|
+
|
|
6
|
+
Name the place and link it: "renders the units left, and now renders a negative
|
|
7
|
+
number when holds exceed the stock". Do not restate the impact type. Write none
|
|
8
|
+
on an unaffected file.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
It still works, and now does something different that the change does not mention.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Its logic no longer holds against the changed code, and the compiler does not say so.
|
package/backend/configurations/default-configurations/unfamiliar-territory/blast.nodes.impactType.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Set the impact type to what the change does to this file. What each value means
|
|
2
|
+
is given with its option.
|
|
3
|
+
|
|
4
|
+
Judge the logic, not the types. A call that no longer type-checks is the
|
|
5
|
+
compiler's to report, and is never the reason for a value here.
|
|
6
|
+
|
|
7
|
+
Leave it unset when nobody has assessed the file. There is no `unknown`. A file
|
|
8
|
+
of the change takes no impact type at all.
|
|
9
|
+
|
|
10
|
+
`breaks` and `behaviour-changes` never travel alone: write the `impactReason` in the
|
|
11
|
+
same call. `unaffected` is written alone, with no reason.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The change reaches it, and nothing it does is different.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Write three parts, in this order: an opening paragraph, then `## Overview`, then
|
|
2
|
+
`## Implementation`.
|
|
3
|
+
|
|
4
|
+
```markdown
|
|
5
|
+
A basket with an item that sold out a minute ago could still reach payment. The
|
|
6
|
+
shopper now hears about every such item before paying.
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
- **When** a customer submits a basket with two lines out of stock, **then**
|
|
11
|
+
[the error names both lines](code:src/stock/check.ts#hasStock).
|
|
12
|
+
- **When** every line is in stock, **then** nothing changes.
|
|
13
|
+
|
|
14
|
+
## Implementation
|
|
15
|
+
|
|
16
|
+
**`src/stock/`**
|
|
17
|
+
|
|
18
|
+
- Modified [`hasStock()`](code:src/stock/check.ts#hasStock) to read every level
|
|
19
|
+
once and collect every short line.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Verify every claim against the diff**, never against a pull request's own
|
|
23
|
+
description.
|
|
24
|
+
|
|
25
|
+
### The opening paragraph
|
|
26
|
+
|
|
27
|
+
Say why anyone should care, to a reader who has not seen the code.
|
|
28
|
+
|
|
29
|
+
**This paragraph bans identifiers, paths and links.** If you cannot write it
|
|
30
|
+
without naming a symbol, you are describing the implementation rather than the
|
|
31
|
+
change. That ban is what makes it the easiest place to hide a vague verb, so say
|
|
32
|
+
what the reader would see: not "the size check handles an oversized query" but
|
|
33
|
+
"a query over 1 MB now gets an error that names the 1 MB limit".
|
|
34
|
+
|
|
35
|
+
Five sentences, and no more even when the change is large.
|
|
36
|
+
|
|
37
|
+
### Overview
|
|
38
|
+
|
|
39
|
+
What changes from outside the code, as a list of scenarios. Each item is one
|
|
40
|
+
sentence: a bold **When**, the situation, a bold **then**, what can be observed.
|
|
41
|
+
|
|
42
|
+
The situation is in the reader's terms — one clause. Name what a person outside
|
|
43
|
+
the code does, or the state that holds: "a customer submits a basket with two
|
|
44
|
+
lines out of stock", "every line is in stock". Write the situation, not the code
|
|
45
|
+
path that answers it.
|
|
46
|
+
|
|
47
|
+
What can be observed is the result a person or another system sees, not the
|
|
48
|
+
mechanism: "the error message names both out-of-stock lines". Link the code the
|
|
49
|
+
result comes from where there is code to name.
|
|
50
|
+
|
|
51
|
+
Say "nothing changes" when a reader would reasonably expect a change and there
|
|
52
|
+
is none; that line stops a reviewer hunting for a regression that is not there.
|
|
53
|
+
A "nothing changes" scenario carries no link.
|
|
54
|
+
|
|
55
|
+
### Implementation
|
|
56
|
+
|
|
57
|
+
What changed inside the code, grouped by where it lives. Each group is a bold
|
|
58
|
+
label on its own line, then a list of the changes there.
|
|
59
|
+
|
|
60
|
+
The label is the place the changes live — a file, or a directory when several
|
|
61
|
+
inside it are touched. It takes no verb. Group by where the code lives, not by
|
|
62
|
+
theme, and put the groups in the order the tour walks them.
|
|
63
|
+
|
|
64
|
+
Each item is one change a reader would notice, as one sentence: the verb first,
|
|
65
|
+
then the code it names. "Modified `hasStock()` to read every level once and
|
|
66
|
+
collect every short line." Link the code the claim is about.
|
|
67
|
+
|
|
68
|
+
An item that names no code is usually one that has not been thought through. The
|
|
69
|
+
exceptions are rare — a configuration value, a deleted file, the tests — and
|
|
70
|
+
they carry no link.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Write for an engineer who has never opened this repository and does not know its language or its
|
|
2
|
+
libraries well. They do not know this codebase's words, its product, or where anything is used.
|
|
3
|
+
They opened this code by hovering its name, and they see the code under your words.
|
|
4
|
+
|
|
5
|
+
Each item is handed out with its `kind`:
|
|
6
|
+
|
|
7
|
+
- `codebase` is code of this repository.
|
|
8
|
+
- `library` is one name the code imports from a library, such as `useState` of `react`.
|
|
9
|
+
- `language` is a name the file neither imports nor declares, such as `Promise` or `Math`. Flight
|
|
10
|
+
Plan assumes it is part of the language or of where the code runs.
|
|
11
|
+
|
|
12
|
+
**A function's description is three sentences, in this order:**
|
|
13
|
+
|
|
14
|
+
> `{name}({arguments})` is a {what it is} that {what it does}. It takes {each argument, with its
|
|
15
|
+
> type and what it stands for} and returns {what the caller gets back}. It is used in {where} to
|
|
16
|
+
> {what that code needs it for}.
|
|
17
|
+
|
|
18
|
+
> `validateAge(user)` is a validation function that checks whether a user is old enough to hold an
|
|
19
|
+
> account. It takes `user: User`, the person signing up or editing their details, and returns
|
|
20
|
+
> `true` when their `birthDate` is 18 years ago or more, and `false` otherwise. It is used in the
|
|
21
|
+
> [registration page](code:src/account/RegisterPage.tsx#RegisterPage) and the
|
|
22
|
+
> [update profile page](code:src/account/ProfilePage.tsx#ProfilePage) to stop the form before it
|
|
23
|
+
> is sent.
|
|
24
|
+
|
|
25
|
+
- **What it is**: the kind of function, in two or three words: a utility function, a validation
|
|
26
|
+
function, a query function, an event handler, a hook, a server procedure.
|
|
27
|
+
- **What it does**: its job, in plain words. One clause. Do not walk the lines.
|
|
28
|
+
- **Arguments**: write each as `name: type`, then what the value stands for in the product. Say
|
|
29
|
+
which can be left out.
|
|
30
|
+
- **Returns**: the type and what it stands for. Say what comes back when there is nothing to
|
|
31
|
+
return, and what it throws, where it does either.
|
|
32
|
+
- **Where it is used**: the pages, routes or functions that call it, by the name a user of the
|
|
33
|
+
product would know them. Take them from the `usedBy` the item is handed out with, not from a
|
|
34
|
+
guess. Where many use it, name three and say how many there are.
|
|
35
|
+
- **What for**: the reason that code needs it, in the product's words.
|
|
36
|
+
|
|
37
|
+
**A component's description is the same three sentences**, with its props for the arguments, what
|
|
38
|
+
it shows for what it returns, and the pages that render it for where it is used:
|
|
39
|
+
|
|
40
|
+
> `<EmptyState />` is a placeholder component that a page shows in place of a list when there is
|
|
41
|
+
> nothing to list. It takes `title: string`, the main line, `hint: string`, a smaller line under it
|
|
42
|
+
> that can be left out, and `action: { label, href }`, an optional button. It is used in the
|
|
43
|
+
> [orders page](code:src/orders/OrdersPage.tsx#OrdersPage), the
|
|
44
|
+
> [basket page](code:src/checkout/BasketPage.tsx#BasketPage) and 6 other pages to tell a shopper
|
|
45
|
+
> why the page is empty and what to do next.
|
|
46
|
+
|
|
47
|
+
**Any other code** (a type, a constant, a table, a router) is two sentences: what it is and what
|
|
48
|
+
it holds, then where it is used and what for.
|
|
49
|
+
|
|
50
|
+
> `orderRouter` is a router that holds every operation a browser can ask the server to do with
|
|
51
|
+
> orders: `list`, `byId` and `cancel`. It is used in
|
|
52
|
+
> [`appRouter`](code:src/server/api/root.ts#appRouter), the one list of every router of the
|
|
53
|
+
> server, so that the page can call `api.order.list`.
|
|
54
|
+
|
|
55
|
+
**A `library` item's description says what the name is and what it does**, in one sentence or
|
|
56
|
+
two. Say what kind of thing it is and which library it comes from, then what it does when it is
|
|
57
|
+
called, rendered or used. Do not say where this codebase uses it: one description is shown in
|
|
58
|
+
every file that imports the name.
|
|
59
|
+
|
|
60
|
+
> `useState(initialValue)` is a React hook that keeps a value of a component between its renders.
|
|
61
|
+
> It returns the value and a function that sets it, and setting it draws the component again.
|
|
62
|
+
|
|
63
|
+
> `z` is the entry of Zod, a library that checks the shape of a value while the program runs.
|
|
64
|
+
> `z.object({ … })` describes an object, and its `parse(value)` returns the value when it has that
|
|
65
|
+
> shape and throws when it does not.
|
|
66
|
+
|
|
67
|
+
**A `language` item's description is the same two sentences**: what the name is, then what it
|
|
68
|
+
does. Say whether it belongs to the language, to the browser or to the server it runs on.
|
|
69
|
+
|
|
70
|
+
> `Promise` is JavaScript's value for a result that arrives later. `Promise.all(list)` waits for
|
|
71
|
+
> every promise in the list and returns their results in the same order, and fails when one fails.
|
|
72
|
+
|
|
73
|
+
> `localStorage` is the browser's store of text that stays after the page is closed.
|
|
74
|
+
> `localStorage.getItem(key)` returns the text saved under a key, or `null` when there is none.
|
|
75
|
+
|
|
76
|
+
- Write a call as it is written in the language of the code, with the arguments a caller passes.
|
|
77
|
+
- Say what the name does, not how it is built.
|
|
78
|
+
- Where the name holds several functions, describe the ones this code calls. The item is handed
|
|
79
|
+
out with no code, so read the change for how the name is used.
|
|
80
|
+
- A name that is not of the language at all, because a tool or a framework puts it there, is
|
|
81
|
+
described as what it is. Say which tool provides it.
|
|
82
|
+
|
|
83
|
+
**Define a word of this codebase the first time you use it**, in one clause: a hold, a line, a
|
|
84
|
+
procedure. The reader has not met it.
|
|
85
|
+
|
|
86
|
+
**Link every place it is used that the artifact holds.** A link resolves only inside the files the
|
|
87
|
+
artifact holds. Name code in any other file in backticks, with its path.
|
|
88
|
+
|
|
89
|
+
**Describe the code as it is, not the pull request.** The description is shown wherever the name
|
|
90
|
+
is hovered, in any file, so do not say _here_, _this caller_ or _the change_. A waypoint's reading
|
|
91
|
+
says what the author changed.
|
|
92
|
+
|
|
93
|
+
**Explain a library or the language in its own item, and nowhere else.** In the description of a
|
|
94
|
+
`codebase` item, name a library function the code is built on and say in one clause what this code
|
|
95
|
+
gets from it. The reader can hover that name for the rest.
|
|
96
|
+
|
|
97
|
+
**Do not tell history the code does not show.** Why it was built and what it replaced are not in
|
|
98
|
+
the code, unless a comment or a name says so.
|
package/backend/configurations/default-configurations/unfamiliar-territory/journey.description.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Tell the diagram as text: what a reader would know after following every line of it. Five sentences at most, and fewer for a small diagram.
|
|
2
|
+
|
|
3
|
+
- **Start where the paths start.** Say what sets each path off, in the reader's terms: "When a shopper places an order", "When the nightly job runs".
|
|
4
|
+
- **Follow each path in the order the diagram draws it**, from the left to the changed code, naming the steps by what they do: `<Checkout />` calls `placeOrder()`, which asks `stockOf()` for every line of the cart.
|
|
5
|
+
- **Say where the paths reach the change.** Name the nodes the change touched and how the path arrives at each. Do not explain the change: the Context Section and the waypoints do.
|
|
6
|
+
- **Several paths.** Say how many there are and where they meet, then tell each in one sentence. Tell paths that run alike together.
|
|
7
|
+
|
|
8
|
+
Cover the whole diagram, not one path of it. A large diagram is told by its paths and the steps they share, not node by node. Do not open with "This diagram shows", and do not count the nodes.
|
|
9
|
+
|
|
10
|
+
`When a shopper places an order, <Checkout /> calls placeOrder(), which asks stockOf() for every line of the cart before it charges the card. The stock badge reaches stockOf() as well, through useStockLevel(). Both paths end at stockOf(), which now subtracts the held units.`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Say what this row of the node is for, as a reader of the product would: "The promo code the shopper typed", "Sends the order to the API". Read the code of the node first, so the label says what the block holds or does, not what it is called.
|
|
2
|
+
|
|
3
|
+
- **An argument or a state.** Say what the value holds: `The lines of the cart`, not `items`.
|
|
4
|
+
- **A hook.** Say what it gives the node: `The mutation that applies a promo code`.
|
|
5
|
+
- **An effect.** Say what it does and when: `Clears the form after a save`.
|
|
6
|
+
- **A call.** Say what is asked of the code it calls: `Saves the renamed user`.
|
|
7
|
+
- **A step.** Say what the step does: `Refuses an empty title`. For a condition, say what is checked. A step can stand for several statements that follow each other, listed by the first: say what they do together, `Renames the chosen user`.
|
|
8
|
+
|
|
9
|
+
Leave the name of the code out: the row shows it under your label. Keep the same shape and tense on every block label of one node.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Tell the journey that reaches this node, in the order the diagram draws it: "When {who} {action}, {caller} {calls, renders or reads} this {what}." Start with what starts the path, then name each step between it and this node, and end on what hands over to it: `When a shopper opens /orders, <OrdersPage /> calls useOrders(status), and useOrders() hands this function to useQuery as its query function.`
|
|
2
|
+
|
|
3
|
+
- **Several paths.** A node that more than one path reaches opens with one line that says so, then a list with one such sentence per path.
|
|
4
|
+
- **A node with trigger labels.** Say what each event runs and what each fetch feeds, in the words of its trigger label: `When a shopper clicks "All", the handler calls setStatus(null) on the filter store.`
|
|
5
|
+
- **Nothing reaches it yet.** Say that no code uses it, and what is meant to.
|
|
6
|
+
|
|
7
|
+
Do not describe the change here. The waypoint of the code says what changed, and the side panel shows that waypoint above the code. Do not restate the label or the identifier, which the node already shows. Link a step to its code where a reader would want to open it.
|
package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.label.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Say what this step does, and to what — "Throws when a line is out of stock", not "The stock check" and not the identifier. A bare noun tells a reader which code this is and nothing about why they are being shown it. The identifier is never the label: the node already carries the name of its code. Keep the same shape and tense on every node of one diagram.
|
|
2
|
+
|
|
3
|
+
A component drawn inside another is read inside its frame, so do not repeat the outer component in its label.
|
|
4
|
+
|
|
5
|
+
A node of an event, an effect or a callback inside a component, of a procedure of a router and of an action of a store is read beside the node around it, so say what this unit does on its own: "Applies the code when the form is submitted", "Stores the promo when the request succeeds". An event has a trigger label too, which says what the user does, so the node says what the handler does.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Say what happens at this place, as a reader of the product would: "A shopper clicks Remove", "The orders of the account are loaded". Read the code of the node first, so the label names the element the user acts on or the data that is fetched.
|
|
2
|
+
|
|
3
|
+
- **An event.** Start with who acts, then the action and what it is on: `A shopper clicks "All"`. Leave the name of the component and of the handler out: the row shows the name of the code under your label.
|
|
4
|
+
- **A data fetch.** Say what is loaded, not how: `The stock of the product is loaded`, not `useQuery runs`.
|
|
5
|
+
|
|
6
|
+
Keep the same shape and tense on every trigger label of one diagram.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Say what the reviewer is being shown in this file, in one line — "Rounding moves
|
|
2
|
+
to the subtotal", "The stock check now counts held units". It is the file's
|
|
3
|
+
label on the section rail, so it has to tell this file apart from the others in
|
|
4
|
+
the change. Never the path, which the section already shows, and never a list of
|
|
5
|
+
every waypoint under it.
|
|
6
|
+
|
|
7
|
+
Present tense, about the code. Keep it under about eight words.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Report what is wrong with the code this waypoint shows, on the waypoint itself.
|
|
2
|
+
A reviewer meets the claim with the code it is about rather than in a list at
|
|
3
|
+
the end, which is the whole reason this is here rather than there.
|
|
4
|
+
|
|
5
|
+
Report only what your reading of the code found. A finding you inferred from the
|
|
6
|
+
diff without opening the file is a guess with a chip on it, and the reviewer
|
|
7
|
+
cannot tell the difference. Verify it against the repository, including files
|
|
8
|
+
the change never touched — a guard three files away may already handle the case
|
|
9
|
+
you are about to report.
|
|
10
|
+
|
|
11
|
+
Pick the kind honestly. `bug` is something that is wrong now. `risk` is
|
|
12
|
+
something that will go wrong under conditions you can name. `nit` is worth
|
|
13
|
+
saying and not worth blocking on. `question` is you not knowing — a genuine
|
|
14
|
+
question, not a suggestion in disguise, and it carries no trace and no fix.
|
|
15
|
+
|
|
16
|
+
The title says what is wrong in one line, the reading says why, and the trace is
|
|
17
|
+
the steps that prove it. Name code with `code:` links throughout, so every claim
|
|
18
|
+
resolves to lines a reader can check.
|
|
19
|
+
|
|
20
|
+
Give every `bug`, `risk` and `nit` a `solution`: the lines as they should be.
|
|
21
|
+
It is a string of code that replaces the lines this waypoint covers — no path,
|
|
22
|
+
no position, because the waypoint is the position — and the reader can preview
|
|
23
|
+
it against the real file.
|
|
24
|
+
Write the lines whole, since a line left out of the body is a line the fix
|
|
25
|
+
deletes. If the fix needs more than these lines, write the part that belongs
|
|
26
|
+
here and name the other lines in the reading.
|
|
27
|
+
|
|
28
|
+
A card shows one chip, the highest kind it carries, so a bug beside a nit reads
|
|
29
|
+
as a bug. That is right, and it is also why a nit reported on the same card as a
|
|
30
|
+
bug is easy to miss: report the nit where it belongs.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
### Reading
|
|
2
|
+
|
|
3
|
+
Explain the defect in the reader's file, one linked claim at a time: what the
|
|
4
|
+
code does, and why that is wrong. Every claim links the exact lines it rests on,
|
|
5
|
+
so the reader can open each one. Present tense, a few sentences at most.
|
|
6
|
+
|
|
7
|
+
Do not hedge — a reading that hedges is a reading nobody opened the file for.
|
|
8
|
+
Where you report a `risk` because you could not prove a suspected bug, the
|
|
9
|
+
reading says in one sentence what stopped you.
|
|
10
|
+
|
|
11
|
+
**An improvement says three things**: what the code does now and its limitation,
|
|
12
|
+
stated plainly as working; the better alternative, with the exact imported
|
|
13
|
+
symbol; and why it is better — fewer lines, fewer states, one fewer round trip.
|
|
14
|
+
Never "cleaner".
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
### Solution
|
|
2
|
+
|
|
3
|
+
Every `bug`, `risk` and `nit` carries a solution. A `question` carries none: it
|
|
4
|
+
is not a claim.
|
|
5
|
+
|
|
6
|
+
Write the lines as they should be, whole, with the indentation they have in the
|
|
7
|
+
file. The solution replaces every line the finding's waypoint covers, so a line
|
|
8
|
+
you leave out of it is a line the fix deletes.
|
|
9
|
+
|
|
10
|
+
If the fix needs more than these lines, write the part that belongs to these
|
|
11
|
+
lines and name the other lines that must change in the reading, with `code:`
|
|
12
|
+
links. The waypoint says where the defect is, and the solution follows it.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
### Title
|
|
2
|
+
|
|
3
|
+
Name the code and what it does wrong — "`annotateRanges` drops the line mapping
|
|
4
|
+
for the whole block", not "Prose loses its line numbers" and not "A subtle
|
|
5
|
+
indexing problem". A title that could belong to a different finding is not a
|
|
6
|
+
title. About ten words.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
### Trace
|
|
2
|
+
|
|
3
|
+
The steps that prove the finding, in the order the code runs.
|
|
4
|
+
|
|
5
|
+
The first step is the trigger: name the action and what makes it fire — the
|
|
6
|
+
parameter, the state, the condition. "A reader selects a sentence", not
|
|
7
|
+
"selection happens"; `POST /orders` with `quantity: 0`, not `POST /orders`. That
|
|
8
|
+
step names a user action, so it carries no link.
|
|
9
|
+
|
|
10
|
+
Every step after it is a debugger step, linked to where it is in the code. A
|
|
11
|
+
trace carries the proof and nothing else — no impact, no evidence, no proposal
|
|
12
|
+
step. A `nit` and a `question` carry no trace.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Mark the few waypoints that carry the change: the cards a reviewer should spend
|
|
2
|
+
their time on. Write one or two sentences saying why this is where the pull
|
|
3
|
+
request does its work, and leave the field off every other waypoint.
|
|
4
|
+
|
|
5
|
+
A pull request mixes the change with what the change drags along: a value
|
|
6
|
+
threaded through three signatures, an import moved, a class renamed, a style
|
|
7
|
+
adjusted, a type widened so the new code compiles, a fixture updated. A reviewer
|
|
8
|
+
with forty cards and an hour has to know which three are the change. That is
|
|
9
|
+
all this flag says. It points at importance. It is not a warning.
|
|
10
|
+
|
|
11
|
+
**Flag the waypoint where the behaviour changes**: the new rule, the decision
|
|
12
|
+
the code now makes differently, the data that now goes somewhere it did not,
|
|
13
|
+
the contract a caller will now depend on. **Leave it off the plumbing**: wiring
|
|
14
|
+
that passes the new value along, a constant, a comment, formatting and styling,
|
|
15
|
+
a type-only edit, a rename, a test that restates the code.
|
|
16
|
+
|
|
17
|
+
**It is not a bug report.** Something you believe is wrong, or could go wrong,
|
|
18
|
+
is a finding — a `bug` or a `risk` — on the same card. A card can carry both,
|
|
19
|
+
and a finding is never the reason for the flag. If the only sentence you can
|
|
20
|
+
write is about what might break, you are writing a finding, so write one and
|
|
21
|
+
leave this off.
|
|
22
|
+
|
|
23
|
+
**Say why the card is central, against what the pull request is for.** "This is
|
|
24
|
+
the rule the pull request exists for: an order now holds its stock before the
|
|
25
|
+
card is charged, and the other cards in this file wire it in." Not "check this
|
|
26
|
+
carefully", "core logic" or "this is complex": they name no reason, and a
|
|
27
|
+
reviewer can see complexity without being told.
|
|
28
|
+
|
|
29
|
+
**It works by contrast, so keep it rare.** One to three in a pull request is
|
|
30
|
+
usual, and seldom more than one in a file. If every card would carry it, none
|
|
31
|
+
should: the flag has nothing left to point at.
|
|
32
|
+
|
|
33
|
+
It is not a second reading. The reading says what the code does; this says why
|
|
34
|
+
it is the part to read.
|
|
35
|
+
|
|
36
|
+
Name code the way every other field does, with `code:` links.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Write the reading as the engineer who read the change, telling a colleague what the author did here
|
|
2
|
+
and why it matters to the pull request.
|
|
3
|
+
|
|
4
|
+
**Open with one sentence of a fixed shape**: _The author_ + what they did + what kind of code + what
|
|
5
|
+
the change does.
|
|
6
|
+
|
|
7
|
+
> The author modified a condition in `validateQuantity()` that now returns `false` for a quantity
|
|
8
|
+
> over 10, down from 20. [`<BasketForm />`](code:src/checkout/BasketForm.tsx#L40-52) calls it before
|
|
9
|
+
> it submits, so the form no longer submits a quantity of 11 to 20.
|
|
10
|
+
|
|
11
|
+
- **What they did** is one verb, past tense: _added_, _implemented_, _modified_, _removed_,
|
|
12
|
+
_moved_, _replaced_.
|
|
13
|
+
- **What kind of code** is the thing the reader will find in the panel, in the plain word for it:
|
|
14
|
+
a function, a method, a condition, a validation, a query, a loop, a type, a component, a
|
|
15
|
+
constant, a test. Then its name. Not review jargon — not a guard, a gate, a hook or wiring —
|
|
16
|
+
because the reader has to translate it back into the code they are looking at.
|
|
17
|
+
- **What the change does** is the effect, not the mechanism. Say what is different now — the value
|
|
18
|
+
that moved, the input that now gets an error, the result that is now returned — and name the
|
|
19
|
+
values: from 20 to 10, from a throw to a returned reason.
|
|
20
|
+
- **Say what the code does, not a judgement of it.** Not _refuses_, _rejects_, _accepts_, _allows_,
|
|
21
|
+
_blocks_ or _protects_, but the operation: returns `false`, throws `RangeError`, returns a 400,
|
|
22
|
+
skips the line. A verb of judgement hides which of these it is.
|
|
23
|
+
|
|
24
|
+
**The author is the subject of the change, never of the code.** "The author reads every row" is
|
|
25
|
+
wrong: the author read nothing, the code does. After the opening, the code is the subject: "It
|
|
26
|
+
reads…", "`validateQuantity()` returns…".
|
|
27
|
+
|
|
28
|
+
**When the change does more than one thing, list them.** Open with the sentence up to _that_, then
|
|
29
|
+
one item per effect, in the order the code does them. Do not chain effects into one sentence with
|
|
30
|
+
_and_, _then_ and commas.
|
|
31
|
+
|
|
32
|
+
> The author added a function `reserveStock()` that:
|
|
33
|
+
>
|
|
34
|
+
> - reads the stock level of every line in the basket in one query
|
|
35
|
+
> - writes one hold per line, which lapses after 15 minutes
|
|
36
|
+
> - returns the holds, so that [`placeOrder()`](code:src/checkout/placeOrder.ts#L13-27) can release
|
|
37
|
+
> them when the charge fails
|
|
38
|
+
|
|
39
|
+
**Do not walk the lines.** The panel shows them. Leave out how the code reaches its effect — the
|
|
40
|
+
sort order, the option merge, the loop — unless that detail is the change itself.
|
|
41
|
+
|
|
42
|
+
**Then say what it is for, against the pull request.** Every reading connects its piece of the
|
|
43
|
+
change to the purpose `context` states, usually with _so that_ or _because_. A reviewer who reads
|
|
44
|
+
only this card should know why it is in the pull request.
|
|
45
|
+
|
|
46
|
+
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `blast` lists the files
|
|
47
|
+
that import the file this card is in, and what the change does to each: its `impactType` and its `impactReason`. Name the one this card exists
|
|
48
|
+
for — the form that no longer submits, the route that now returns something else, the caller that now
|
|
49
|
+
depends on the new value — and link it. Where nothing outside the change reaches this code, name
|
|
50
|
+
what inside the pull request uses it. Where neither the Blast Diagram nor `context` shows a reason,
|
|
51
|
+
say what the change does to its consumer and stop: the author's reason is not yours to invent.
|
|
52
|
+
|
|
53
|
+
**Link code outside the card; name code inside it.** The panel already shows the card's own lines,
|
|
54
|
+
so a link to them points at what the reader is looking at. Write those identifiers in backticks
|
|
55
|
+
without a link. Link everything else the reading mentions — the caller, the consumer, the type, the
|
|
56
|
+
test, the other half of the change in another file — and link every such mention, not the first one.
|
|
57
|
+
A link resolves only inside the files the artifact holds, which `codeLinks` lists how to find; name
|
|
58
|
+
code in any other file in backticks, with its path.
|
|
59
|
+
|
|
60
|
+
**A body's reading** (a waypoint with children) says what the author did across the whole body and
|
|
61
|
+
why: the opening sentence, a list of at most five items where it does several things, and one
|
|
62
|
+
sentence of purpose. **A block's reading** (a child) is the opening sentence about its one block,
|
|
63
|
+
with a list only if that block does several things, and its _so that_ points at the body it sits
|
|
64
|
+
in or the code that consumes it.
|
|
65
|
+
|
|
66
|
+
**Do not restate the title.** The title names the change; the reading adds the values, the reason
|
|
67
|
+
and what the change connects to. A reading that says the title again at greater length means the
|
|
68
|
+
title needs work, not the reading.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
**Say what was done, and to what** — "Modified the file reader to return a reason
|
|
2
|
+
for binary content", "Returns null for a path outside the root". Not a bare noun
|
|
3
|
+
like "The file reader" or "The error path": a noun names which code this is about but not why
|
|
4
|
+
the reader is shown it, which is the one thing a title is for.
|
|
5
|
+
|
|
6
|
+
**Past tense** — Added, Modified, Removed. Never the identifier on its own.
|
|
7
|
+
|
|
8
|
+
**One title, one thing.** An arrow, an "and", or three clauses means several
|
|
9
|
+
waypoints crammed into one.
|
|
10
|
+
|
|
11
|
+
**A child's title is a smaller change than its parent's**, not a different kind
|
|
12
|
+
of thing: same shape, same tense, at every level.
|