@kidlat-dakila/flightplan 0.1.5 → 0.1.7
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/README.md +31 -16
- package/backend/configurations/default-configurations/minimal/context.md +9 -54
- package/backend/configurations/default-configurations/minimal/traceDiagram.nodes.blockLabels.label.md +19 -0
- package/backend/configurations/default-configurations/minimal/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
- package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.reading.md +1 -1
- package/backend/configurations/default-configurations/onboardee/context.md +16 -62
- package/backend/configurations/default-configurations/onboardee/traceDiagram.description.md +16 -0
- package/backend/configurations/default-configurations/onboardee/traceDiagram.nodes.blockLabels.label.md +11 -0
- package/backend/configurations/default-configurations/onboardee/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.reading.md +1 -1
- package/backend/configurations/default-configurations/standard/context.md +16 -62
- package/backend/configurations/default-configurations/standard/traceDiagram.description.md +16 -0
- package/backend/configurations/default-configurations/standard/traceDiagram.nodes.blockLabels.label.md +11 -0
- package/backend/configurations/default-configurations/standard/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
- package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.reading.md +1 -1
- package/backend/configurations/default-configurations/unfamiliar-territory/context.md +16 -62
- package/backend/configurations/default-configurations/unfamiliar-territory/traceDiagram.description.md +16 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/traceDiagram.nodes.blockLabels.label.md +11 -0
- package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.reading.md +1 -1
- package/backend/configurations/system-instructions/artifactFormat.md +20 -16
- package/backend/configurations/system-instructions/{blast.md → blastDiagram.md} +5 -5
- package/backend/configurations/system-instructions/context.md +18 -9
- package/backend/configurations/system-instructions/title.md +36 -4
- package/backend/configurations/system-instructions/traceDiagram.description.md +14 -0
- package/backend/configurations/system-instructions/{journey.md → traceDiagram.md} +8 -8
- package/backend/configurations/system-instructions/traceDiagram.nodes.blockLabels.label.md +6 -0
- package/backend/configurations/system-instructions/walkthrough.files.md +5 -11
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.coreChange.md +7 -0
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.md +3 -3
- package/backend/configurations/system-instructions/walkthrough.md +6 -8
- package/backend/main.js +56353 -43801
- package/backend/plugin/skills/review/SKILL.md +31 -47
- package/frontend/assets/_branchId-438YLxpk.js +1 -0
- package/frontend/assets/_branchId-PhBseeXo.js +1 -0
- package/frontend/assets/_id-yAHjl11v.js +1 -0
- package/frontend/assets/_id-z15a_Wqg.js +1 -0
- package/frontend/assets/agents-CF_BNYuU.js +1 -0
- package/frontend/assets/agents-CUULznCR.js +1 -0
- package/frontend/assets/create-Byti8N1q.js +1 -0
- package/frontend/assets/create-DHjp2cB6.js +1 -0
- package/frontend/assets/create-DiPNM_Jx.js +1 -0
- package/frontend/assets/{create-CNT_ktA4.js → create-t6MxPYs8.js} +1 -1
- package/frontend/assets/download-kIOYm7yl.js +1 -0
- package/frontend/assets/forges-5NgJFexV.js +1 -0
- package/frontend/assets/forges-Dz31lZmK.js +1 -0
- package/frontend/assets/{index-h6dRc3tV.js → index-9MPLrKh9.js} +75 -62
- package/frontend/assets/index-BDgPH-og.js +1 -0
- package/frontend/assets/{index-CPyhbNqS.js → index-BDhIIxnY.js} +1 -1
- package/frontend/assets/{index-Baaegu29.js → index-BUtsWXGk.js} +1 -1
- package/frontend/assets/{index-BWM8kiQ0.js → index-BrL94etp.js} +1 -1
- package/frontend/assets/index-C8_4U9zA.js +457 -0
- package/frontend/assets/index-CAt5Gv5u.js +1 -0
- package/frontend/assets/{index-C8gx27Rr.js → index-CBObEG9P.js} +1 -1
- package/frontend/assets/index-CRQLJ5uq.js +1 -0
- package/frontend/assets/index-CSy69oc4.js +1 -0
- package/frontend/assets/index-Cjx98rmL.js +1 -0
- package/frontend/assets/index-CmW92SdM.js +1 -0
- package/frontend/assets/index-Cmg8rxUj.css +1 -0
- package/frontend/assets/index-DVMDfdCW.js +1 -0
- package/frontend/assets/index-DYy-kFEi.js +1 -0
- package/frontend/assets/index-Dk3p64fP.js +1 -0
- package/frontend/assets/index-Dq71dq4Z.js +1 -0
- package/frontend/assets/index-Dz-E4Hhc.js +1 -0
- package/frontend/assets/{index-BsRx8Pzi.js → index-EFsgiJx1.js} +1 -1
- package/frontend/assets/index-EItMs0kz.js +1 -0
- package/frontend/assets/index-N0J0txvy.js +1 -0
- package/frontend/assets/index-Qxg2C8CP.js +1 -0
- package/frontend/assets/index-RYSZy-Ra.js +6 -0
- package/frontend/assets/{index-BYtgetD4.js → index-WOMODjD2.js} +1 -1
- package/frontend/assets/repositories-BrbB16PW.js +1 -0
- package/frontend/assets/repositories-VWl6aq7K.js +1 -0
- package/frontend/assets/review-BMO-QDpl.js +1 -0
- package/frontend/assets/review-CXzRf1jk.js +1 -0
- package/frontend/assets/route--z3gnt4z.js +1 -0
- package/frontend/favicon.ico +0 -0
- package/frontend/favicon.svg +5 -0
- package/frontend/index.html +10 -3
- package/frontend/logo.svg +5 -0
- package/frontend/not-found.svg +25 -0
- package/frontend/server-error.svg +32 -0
- package/package.json +5 -1
- package/published-review/app.css +1 -1
- package/published-review/app.js +126 -89
- package/backend/configurations/default-configurations/minimal/journey.nodes.blockLabels.label.md +0 -13
- package/backend/configurations/default-configurations/minimal/walkthrough.files.title.md +0 -7
- package/backend/configurations/default-configurations/minimal/walkthrough.intro.md +0 -4
- package/backend/configurations/default-configurations/onboardee/journey.description.md +0 -10
- package/backend/configurations/default-configurations/onboardee/journey.nodes.blockLabels.label.md +0 -9
- package/backend/configurations/default-configurations/onboardee/walkthrough.files.title.md +0 -7
- package/backend/configurations/default-configurations/onboardee/walkthrough.intro.md +0 -5
- package/backend/configurations/default-configurations/standard/journey.description.md +0 -10
- package/backend/configurations/default-configurations/standard/journey.nodes.blockLabels.label.md +0 -9
- package/backend/configurations/default-configurations/standard/walkthrough.files.title.md +0 -7
- package/backend/configurations/default-configurations/standard/walkthrough.intro.md +0 -5
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.description.md +0 -10
- package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.blockLabels.label.md +0 -9
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.title.md +0 -7
- package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.intro.md +0 -5
- package/backend/configurations/system-instructions/journey.description.md +0 -14
- package/backend/configurations/system-instructions/journey.nodes.blockLabels.label.md +0 -6
- package/backend/configurations/system-instructions/walkthrough.files.summary.md +0 -4
- package/backend/configurations/system-instructions/walkthrough.files.title.md +0 -2
- package/backend/configurations/system-instructions/walkthrough.files.waypoints.needsAttention.md +0 -8
- package/backend/configurations/system-instructions/walkthrough.intro.md +0 -3
- package/frontend/assets/_branchId--sAXSZ0Z.js +0 -1
- package/frontend/assets/_branchId-BctD9BVI.js +0 -1
- package/frontend/assets/_id-DS2_k7mD.js +0 -1
- package/frontend/assets/_id-ZvG2tACL.js +0 -1
- package/frontend/assets/agents-Cg-w99VB.js +0 -1
- package/frontend/assets/agents-DbSvvIcf.js +0 -1
- package/frontend/assets/configuration-B1tYKnw1.js +0 -1
- package/frontend/assets/configuration-PLwRj92u.js +0 -1
- package/frontend/assets/create-BXn1thks.js +0 -1
- package/frontend/assets/create-CGIYQfn-.js +0 -1
- package/frontend/assets/create-DQsVrUIP.js +0 -1
- package/frontend/assets/download-BsAZZo3P.js +0 -1
- package/frontend/assets/forges-ChElPpOV.js +0 -1
- package/frontend/assets/forges-D5lw6fYh.js +0 -1
- package/frontend/assets/index-9KbVyMz4.js +0 -1
- package/frontend/assets/index-B7lg0P4V.js +0 -1
- package/frontend/assets/index-BBbL0wfM.js +0 -1
- package/frontend/assets/index-BCEvS2zI.js +0 -1
- package/frontend/assets/index-CIReAhWD.js +0 -1
- package/frontend/assets/index-CX9sF5Fh.js +0 -441
- package/frontend/assets/index-Ccx_zqhL.js +0 -1
- package/frontend/assets/index-D3gI7yfx.js +0 -1
- package/frontend/assets/index-D6S4PGCc.js +0 -1
- package/frontend/assets/index-Dfzoepph.js +0 -1
- package/frontend/assets/index-DgodP5aC.js +0 -1
- package/frontend/assets/index-DvVl2gWR.js +0 -1
- package/frontend/assets/index-DzSYBwXV.js +0 -1
- package/frontend/assets/index-eMdhkBjo.js +0 -1
- package/frontend/assets/index-ec_xLUMF.css +0 -1
- package/frontend/assets/index-xoWXUJLW.js +0 -1
- package/frontend/assets/repositories-DdOEWFoL.js +0 -1
- package/frontend/assets/repositories-Di8qfiyD.js +0 -1
- package/frontend/assets/route-qbVbAxtx.js +0 -1
- package/frontend/logo-small.png +0 -0
- package/frontend/logo.png +0 -0
- /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{journey.description.md → traceDiagram.description.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
- /package/backend/configurations/default-configurations/minimal/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
- /package/backend/configurations/default-configurations/onboardee/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
- /package/backend/configurations/default-configurations/standard/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
- /package/backend/configurations/default-configurations/unfamiliar-territory/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
- /package/backend/configurations/system-instructions/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
- /package/backend/configurations/system-instructions/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
- /package/backend/configurations/system-instructions/{journey.nodes.description.md → traceDiagram.nodes.description.md} +0 -0
- /package/backend/configurations/system-instructions/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
- /package/backend/configurations/system-instructions/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
package/README.md
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
# Flight Plan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/kidlat-dakila/flight-plan/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/kidlat-dakila/flight-plan/actions/workflows/codeql.yml)
|
|
5
|
+
[](https://scorecard.dev/viewer/?uri=github.com/kidlat-dakila/flight-plan)
|
|
6
|
+
[](https://socket.dev/npm/package/@kidlat-dakila/flightplan)
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
review artifact through Flight Plan's MCP tools, and a local web app shows it next to the code it describes. A review
|
|
7
|
-
answers four questions a diff does not: why the change exists, how it runs, what it can affect, and where to look.
|
|
8
|
+
An offline-first code review tool that helps you understand and navigate the changes in a pull request.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
Flight Plan reads the code of a pull request, or of a branch with no pull request, and lays the change out as a guided
|
|
11
|
+
review in a local web app, next to the code it describes. It shows how the change runs, what it can affect, and where to
|
|
12
|
+
look. It works from your local git checkout, and connects to GitHub, GitLab or Bitbucket for their pull requests,
|
|
13
|
+
comments and reviews.
|
|
14
|
+
|
|
15
|
+
Flight Plan builds the review from the code itself, with no model involved. It reads the syntax trees to work out who
|
|
16
|
+
calls what, then draws the diagrams and lays out the walkthrough from them. A coding agent can fill in the prose through
|
|
17
|
+
Flight Plan's MCP tools: why the change exists, the labels, the explanations and the findings. It writes only that
|
|
18
|
+
prose, so it cannot leave a caller out or invent one.
|
|
11
19
|
|
|
12
20
|
## Running it
|
|
13
21
|
|
|
14
22
|
```bash
|
|
15
|
-
npx @kidlat-dakila/flightplan
|
|
23
|
+
npx @kidlat-dakila/flightplan@latest
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
You can also install it once with `npm install -g @kidlat-dakila/flightplan` and then run `flightplan`. The command
|
|
26
|
+
You can also install it once with `npm install -g @kidlat-dakila/flightplan@latest` and then run `flightplan`. The command
|
|
19
27
|
starts one local server for the web app, the API and the MCP endpoint, and opens it in the browser at
|
|
20
28
|
`http://localhost:24747`.
|
|
21
29
|
|
|
@@ -49,14 +57,14 @@ You can change all of these later in **Settings**. Flight Plan acts on your forg
|
|
|
49
57
|
1. Open a repository on the homepage, then pick a pull request or a branch.
|
|
50
58
|
2. Make a review request: choose the configuration, the order of the Code Walkthrough and the agent. Flight Plan can
|
|
51
59
|
start Claude Code for you. With any other agent, copy the prompt it gives you into your own agent session.
|
|
52
|
-
3. Flight Plan builds the
|
|
53
|
-
the agent writes it, and the page shows how much is written.
|
|
60
|
+
3. Flight Plan builds the review from the change, and the page opens it at once, ready to read. The prose of each part
|
|
61
|
+
fills in as the agent writes it, and the page shows how much is written.
|
|
54
62
|
4. When the agent finishes, the browser notifies you.
|
|
55
63
|
|
|
56
64
|
A review artifact has these parts:
|
|
57
65
|
|
|
58
66
|
- **Context**: why the change exists, in a few sentences to read before any code.
|
|
59
|
-
- **
|
|
67
|
+
- **Trace Diagram**: how execution reaches the changed code, from whatever starts it.
|
|
60
68
|
- **Blast Diagram**: the files connected to the change through imports, and what the change does to the ones it did
|
|
61
69
|
not touch.
|
|
62
70
|
- **Code Walkthrough**: the changed code, one file at a time, with each explanation on the lines it is about and
|
|
@@ -134,15 +142,22 @@ pnpm install
|
|
|
134
142
|
pnpm dev
|
|
135
143
|
```
|
|
136
144
|
|
|
137
|
-
`pnpm dev` runs the backend on `http://localhost:3000` (tRPC at `/api/trpc`, MCP at `POST /mcp`)
|
|
138
|
-
`http://localhost:4200`, which proxies `/api` to the backend
|
|
145
|
+
`pnpm dev` runs the backend on `http://localhost:3000` (tRPC at `/api/trpc`, MCP at `POST /mcp`), the frontend on
|
|
146
|
+
`http://localhost:4200`, which proxies `/api` to the backend, and the site on `http://localhost:4400`.
|
|
139
147
|
|
|
140
148
|
`pnpm install` also installs a pre-commit hook (husky) that runs ESLint and type-checking for the projects a commit
|
|
141
149
|
touches.
|
|
142
150
|
|
|
143
|
-
`pnpm build:prod` builds the production bundle and puts together the npm package in `dist/package`.
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
`pnpm build:prod` builds the production bundle and puts together the npm package in `dist/package`. `pnpm start` runs
|
|
152
|
+
that build the way the `flightplan` command does, without building it first.
|
|
153
|
+
|
|
154
|
+
To release, bump `version` in `package.json`, then build the package and publish it to npm from your machine:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
pnpm prod:release
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
It publishes the version that `package.json` holds, so log in with `npm login` first.
|
|
146
161
|
|
|
147
162
|
Run checks through Nx:
|
|
148
163
|
|
|
@@ -1,58 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
One or two sentences starting "This segment": what the segment's change does.
|
|
2
|
+
Nothing else. Flight Plan lists what the segment adds, modifies and removes in
|
|
3
|
+
the Change Overview under it: no list, no accordion, no code links.
|
|
2
4
|
|
|
3
5
|
```markdown
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
- **When** customer submits basket with two lines out of stock, **then**
|
|
10
|
-
[error names both lines](code:src/stock/check.ts#hasStock).
|
|
11
|
-
- **When** every line in stock, **then** nothing changes.
|
|
12
|
-
|
|
13
|
-
## Implementation
|
|
14
|
-
|
|
15
|
-
**`src/stock/`**
|
|
16
|
-
|
|
17
|
-
- Modified [`hasStock()`](code:src/stock/check.ts#hasStock): reads every level
|
|
18
|
-
once, collects every short line.
|
|
6
|
+
This segment checks stock of every basket line before payment. A basket with an
|
|
7
|
+
item sold out a minute ago gets an error naming each one.
|
|
19
8
|
```
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Why anyone should care. Reader has not seen the code.
|
|
27
|
-
|
|
28
|
-
**No identifiers, no paths, no links here.** Cannot write it without a symbol:
|
|
29
|
-
you describe implementation, not the change. Say what the reader would see: not
|
|
30
|
-
"size check handles oversized query" but "query over 1 MB now gets error naming
|
|
31
|
-
1 MB limit".
|
|
32
|
-
|
|
33
|
-
Three fragments at most, even for a large change.
|
|
34
|
-
|
|
35
|
-
### Overview
|
|
36
|
-
|
|
37
|
-
What changes from outside the code. List of scenarios. One line each: bold
|
|
38
|
-
**When**, situation, bold **then**, what can be observed.
|
|
39
|
-
|
|
40
|
-
- **Situation**: reader's terms, one clause. What a person outside the code
|
|
41
|
-
does, or the state that holds. Not the code path.
|
|
42
|
-
- **Observed**: result a person or another system sees. Not mechanism. Link the
|
|
43
|
-
code the result comes from.
|
|
44
|
-
- **"nothing changes"**: where a reader would expect a change and there is
|
|
45
|
-
none. No link.
|
|
46
|
-
|
|
47
|
-
### Implementation
|
|
48
|
-
|
|
49
|
-
What changed inside the code, grouped by where it lives. Each group: bold label
|
|
50
|
-
on its own line, then list.
|
|
51
|
-
|
|
52
|
-
- **Label**: file, or directory when several files inside change. No verb. Group
|
|
53
|
-
by place, not theme. Groups in the order the tour walks them.
|
|
54
|
-
- **Item**: one change a reader would notice. Verb first, then the code:
|
|
55
|
-
"Modified `hasStock()`: reads every level once, collects every short line."
|
|
56
|
-
Link the code.
|
|
57
|
-
- Item naming no code: only for a configuration value, a deleted file, the
|
|
58
|
-
tests. No link.
|
|
10
|
+
- Check every claim against the diff, never the pull request's description.
|
|
11
|
+
- Say what someone would see. No identifiers, paths or links.
|
|
12
|
+
- This segment's files only. With segments off, the first segment's context is
|
|
13
|
+
the whole change's: start "This change".
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
What this row of the node does, as a reader of the product: a verb first,
|
|
2
|
+
present tense: "Queries every Pokemon ordered by name", "Sends order to API".
|
|
3
|
+
Read the node's code first: label says what the block does, not what it is or
|
|
4
|
+
what it is called. "Queries every Pokemon ordered by name", not "Query of every
|
|
5
|
+
Pokemon".
|
|
6
|
+
|
|
7
|
+
- **Argument**: what the node does with it: `Filters Pokemon by this trainer`,
|
|
8
|
+
not `Trainer to filter by`.
|
|
9
|
+
- **State**: what the node keeps in it: `Keeps cart lines`, not `Cart lines`.
|
|
10
|
+
- **Hook**: what the node gets from it: `Gets mutation that applies promo code`.
|
|
11
|
+
- **Effect**: what it does, when: `Clears form after save`.
|
|
12
|
+
- **Call**: what is asked of the code it calls: `Saves renamed user`.
|
|
13
|
+
- **Value**: what the code that makes it does: `Queries every Pokemon ordered by
|
|
14
|
+
name`.
|
|
15
|
+
- **Step**: what the step does: `Returns error for empty title`. Condition: what
|
|
16
|
+
is checked. Step standing for several statements: what they do together.
|
|
17
|
+
|
|
18
|
+
No name of the code: row shows it under your label. Same shape and tense on
|
|
19
|
+
every block label of one node: each starts with a verb.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
The
|
|
1
|
+
The trace that reaches this node, in drawn order: "{who} {action}: {caller}
|
|
2
2
|
{calls, renders or reads} this {what}." Start with what starts the path, name
|
|
3
3
|
each step between, end on what hands over to it.
|
|
4
4
|
|
package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.reading.md
CHANGED
|
@@ -40,7 +40,7 @@ this card must know why it is in the pull request. Cause not clear from order of
|
|
|
40
40
|
fragments: write _so_ or _because_.
|
|
41
41
|
|
|
42
42
|
**Consumer from the Blast Diagram, not a guess.** Where the artifact has one,
|
|
43
|
-
`
|
|
43
|
+
`blastDiagram` lists files importing this card's file, with `impactType` and
|
|
44
44
|
`impactReason`. Name the one this card exists for. Link it. Nothing outside the
|
|
45
45
|
change reaches this code: name what inside the pull request uses it. Neither
|
|
46
46
|
shows a reason: say what the change does to its consumer, stop. Never invent the
|
|
@@ -1,70 +1,24 @@
|
|
|
1
|
-
Write
|
|
2
|
-
|
|
1
|
+
Write one or two sentences that start with "This segment" and say what the
|
|
2
|
+
segment's change does. That is the whole context. Flight Plan lists every piece
|
|
3
|
+
of code the segment adds, modifies and removes under it, in the Change Overview,
|
|
4
|
+
so the context holds no list of changes, no accordion and no code links.
|
|
3
5
|
|
|
4
6
|
```markdown
|
|
5
|
-
|
|
6
|
-
|
|
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.
|
|
7
|
+
This segment checks the stock of every basket line before payment, so a basket
|
|
8
|
+
with an item that sold out a minute ago gets an error naming each sold-out item
|
|
9
|
+
and never reaches payment.
|
|
20
10
|
```
|
|
21
11
|
|
|
22
|
-
|
|
12
|
+
Check every claim against the diff, never against the pull request's own
|
|
23
13
|
description.
|
|
24
14
|
|
|
25
|
-
###
|
|
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.
|
|
15
|
+
### What the sentences say
|
|
63
16
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
17
|
+
Say what the segment's change does for a reader who has not seen the code. Name
|
|
18
|
+
no identifiers, paths or links. Say what someone would see: "a query over 1 MB
|
|
19
|
+
now gets an error that names the limit" tells the reader more than "the size
|
|
20
|
+
check handles large queries".
|
|
67
21
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
22
|
+
Write about the files of this segment only. When the reviewer turned segments
|
|
23
|
+
off, the first segment's context is the one Context of the whole change: start
|
|
24
|
+
it with "This change" and say what the whole change does.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Write a caption for the diagram: what the reader is looking at, before they follow its lines. Two sentences at most.
|
|
2
|
+
|
|
3
|
+
- **The first sentence says what the diagram starts from.** Open with "This diagram shows how", name the page, the component, the job or the route the paths start at, and say what it does when it opens, loads or runs: `This diagram shows how the edit page loads an order and renders it in the form.` Use the verb of the code for what it does, such as renders, loads or requests, so that "shows" is not written twice.
|
|
4
|
+
- **The second sentence follows the user's actions.** The actions are the events on the diagram: a submit, a click, a pick, a typed value. Open with "It also shows what happens when the user", name the action as the user would, then say where its data ends up: the request it sends, the store it writes, the page it opens. `It also shows what happens when the user saves the order, and how the changed order reaches the API through updateOrder().`
|
|
5
|
+
- **Several actions.** Name them together, in the order the diagram draws them: `It also shows what happens when the user picks a customer, picks a product, types a quantity or submits the form.`
|
|
6
|
+
- **A path nobody clicks.** A request, a schedule or another system starts it: name that in place of the user. `It also shows what happens when a request reaches POST /orders, and how the order reaches the database.`
|
|
7
|
+
- **No action on the diagram.** Leave the second sentence out, and never write "It also shows" with nothing after it.
|
|
8
|
+
- **Shared code that other segments call.** Say what the diagram holds and what reaches it: `This diagram shows how the route table opens the order pages, and how each hook loads or sends orders through its request.`
|
|
9
|
+
|
|
10
|
+
Name where the data ends up, not the steps on the way: the labels and the descriptions of the nodes carry the steps, and the reader follows them on the board. Do not explain the change: the Context Section and the waypoints do.
|
|
11
|
+
|
|
12
|
+
| The diagram | Its caption |
|
|
13
|
+
|---|---|
|
|
14
|
+
| A page that loads a record and saves it | This diagram shows how the edit page loads an order and renders it in the form. It also shows what happens when the user saves the order, and how the changed order reaches the API through `updateOrder()`. |
|
|
15
|
+
| A page that creates a record | This diagram shows how the create page opens with an empty draft in the form. It also shows what happens when the user submits the form, and how the new order reaches the API through `createOrder()`. |
|
|
16
|
+
| A page with no action on its paths | This diagram shows how the orders list loads the orders and renders them in a table. |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Say what this row of the node does, as a reader of the product would. Start with a verb in the present tense: "Queries every Pokemon ordered by name", "Sends the order to the API". Read the code of the node first, so the label says what the block does, not what it is or what it is called: "Queries every Pokemon ordered by name", not "The query of every Pokemon".
|
|
2
|
+
|
|
3
|
+
- **An argument.** Say what the node does with the value it is given: `Filters the Pokemon by this trainer`, not `The trainer to filter by`.
|
|
4
|
+
- **A state.** Say what the node keeps in it: `Keeps the lines of the cart`, not `The lines of the cart`.
|
|
5
|
+
- **A hook.** Say what the node gets from it: `Gets the mutation that applies a promo code`.
|
|
6
|
+
- **An effect.** Say what it does and when: `Clears the form after a save`.
|
|
7
|
+
- **A call.** Say what is asked of the code it calls: `Saves the renamed user`.
|
|
8
|
+
- **A value.** Say what the code that makes it does: `Queries every Pokemon ordered by name`, not `The query of every Pokemon`.
|
|
9
|
+
- **A step.** Say what the step does: `Returns an error for an empty title`. For a condition, say what is checked: `Checks whether a trainer is given`. A step can stand for several statements that follow each other, listed by the first: say what they do together, `Renames the chosen user`.
|
|
10
|
+
|
|
11
|
+
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: each one starts with a verb.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Tell the
|
|
1
|
+
Tell the trace 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
2
|
|
|
3
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
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.`
|
|
@@ -43,7 +43,7 @@ sort order, the option merge, the loop — unless that detail is the change itse
|
|
|
43
43
|
change to the purpose `context` states, usually with _so that_ or _because_. A reviewer who reads
|
|
44
44
|
only this card should know why it is in the pull request.
|
|
45
45
|
|
|
46
|
-
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `
|
|
46
|
+
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `blastDiagram` lists the files
|
|
47
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
48
|
for — the form that no longer submits, the route that now returns something else, the caller that now
|
|
49
49
|
depends on the new value — and link it. Where nothing outside the change reaches this code, name
|
|
@@ -1,70 +1,24 @@
|
|
|
1
|
-
Write
|
|
2
|
-
|
|
1
|
+
Write one or two sentences that start with "This segment" and say what the
|
|
2
|
+
segment's change does. That is the whole context. Flight Plan lists every piece
|
|
3
|
+
of code the segment adds, modifies and removes under it, in the Change Overview,
|
|
4
|
+
so the context holds no list of changes, no accordion and no code links.
|
|
3
5
|
|
|
4
6
|
```markdown
|
|
5
|
-
|
|
6
|
-
|
|
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.
|
|
7
|
+
This segment checks the stock of every basket line before payment, so a basket
|
|
8
|
+
with an item that sold out a minute ago gets an error naming each sold-out item
|
|
9
|
+
and never reaches payment.
|
|
20
10
|
```
|
|
21
11
|
|
|
22
|
-
|
|
12
|
+
Check every claim against the diff, never against the pull request's own
|
|
23
13
|
description.
|
|
24
14
|
|
|
25
|
-
###
|
|
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.
|
|
15
|
+
### What the sentences say
|
|
63
16
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
17
|
+
Say what the segment's change does for a reader who has not seen the code. Name
|
|
18
|
+
no identifiers, paths or links. Say what someone would see: "a query over 1 MB
|
|
19
|
+
now gets an error that names the limit" tells the reader more than "the size
|
|
20
|
+
check handles large queries".
|
|
67
21
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
22
|
+
Write about the files of this segment only. When the reviewer turned segments
|
|
23
|
+
off, the first segment's context is the one Context of the whole change: start
|
|
24
|
+
it with "This change" and say what the whole change does.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Write a caption for the diagram: what the reader is looking at, before they follow its lines. Two sentences at most.
|
|
2
|
+
|
|
3
|
+
- **The first sentence says what the diagram starts from.** Open with "This diagram shows how", name the page, the component, the job or the route the paths start at, and say what it does when it opens, loads or runs: `This diagram shows how the edit page loads an order and renders it in the form.` Use the verb of the code for what it does, such as renders, loads or requests, so that "shows" is not written twice.
|
|
4
|
+
- **The second sentence follows the user's actions.** The actions are the events on the diagram: a submit, a click, a pick, a typed value. Open with "It also shows what happens when the user", name the action as the user would, then say where its data ends up: the request it sends, the store it writes, the page it opens. `It also shows what happens when the user saves the order, and how the changed order reaches the API through updateOrder().`
|
|
5
|
+
- **Several actions.** Name them together, in the order the diagram draws them: `It also shows what happens when the user picks a customer, picks a product, types a quantity or submits the form.`
|
|
6
|
+
- **A path nobody clicks.** A request, a schedule or another system starts it: name that in place of the user. `It also shows what happens when a request reaches POST /orders, and how the order reaches the database.`
|
|
7
|
+
- **No action on the diagram.** Leave the second sentence out, and never write "It also shows" with nothing after it.
|
|
8
|
+
- **Shared code that other segments call.** Say what the diagram holds and what reaches it: `This diagram shows how the route table opens the order pages, and how each hook loads or sends orders through its request.`
|
|
9
|
+
|
|
10
|
+
Name where the data ends up, not the steps on the way: the labels and the descriptions of the nodes carry the steps, and the reader follows them on the board. Do not explain the change: the Context Section and the waypoints do.
|
|
11
|
+
|
|
12
|
+
| The diagram | Its caption |
|
|
13
|
+
|---|---|
|
|
14
|
+
| A page that loads a record and saves it | This diagram shows how the edit page loads an order and renders it in the form. It also shows what happens when the user saves the order, and how the changed order reaches the API through `updateOrder()`. |
|
|
15
|
+
| A page that creates a record | This diagram shows how the create page opens with an empty draft in the form. It also shows what happens when the user submits the form, and how the new order reaches the API through `createOrder()`. |
|
|
16
|
+
| A page with no action on its paths | This diagram shows how the orders list loads the orders and renders them in a table. |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Say what this row of the node does, as a reader of the product would. Start with a verb in the present tense: "Queries every Pokemon ordered by name", "Sends the order to the API". Read the code of the node first, so the label says what the block does, not what it is or what it is called: "Queries every Pokemon ordered by name", not "The query of every Pokemon".
|
|
2
|
+
|
|
3
|
+
- **An argument.** Say what the node does with the value it is given: `Filters the Pokemon by this trainer`, not `The trainer to filter by`.
|
|
4
|
+
- **A state.** Say what the node keeps in it: `Keeps the lines of the cart`, not `The lines of the cart`.
|
|
5
|
+
- **A hook.** Say what the node gets from it: `Gets the mutation that applies a promo code`.
|
|
6
|
+
- **An effect.** Say what it does and when: `Clears the form after a save`.
|
|
7
|
+
- **A call.** Say what is asked of the code it calls: `Saves the renamed user`.
|
|
8
|
+
- **A value.** Say what the code that makes it does: `Queries every Pokemon ordered by name`, not `The query of every Pokemon`.
|
|
9
|
+
- **A step.** Say what the step does: `Returns an error for an empty title`. For a condition, say what is checked: `Checks whether a trainer is given`. A step can stand for several statements that follow each other, listed by the first: say what they do together, `Renames the chosen user`.
|
|
10
|
+
|
|
11
|
+
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: each one starts with a verb.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Tell the
|
|
1
|
+
Tell the trace 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
2
|
|
|
3
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
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.`
|
|
@@ -43,7 +43,7 @@ sort order, the option merge, the loop — unless that detail is the change itse
|
|
|
43
43
|
change to the purpose `context` states, usually with _so that_ or _because_. A reviewer who reads
|
|
44
44
|
only this card should know why it is in the pull request.
|
|
45
45
|
|
|
46
|
-
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `
|
|
46
|
+
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `blastDiagram` lists the files
|
|
47
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
48
|
for — the form that no longer submits, the route that now returns something else, the caller that now
|
|
49
49
|
depends on the new value — and link it. Where nothing outside the change reaches this code, name
|
|
@@ -1,70 +1,24 @@
|
|
|
1
|
-
Write
|
|
2
|
-
|
|
1
|
+
Write one or two sentences that start with "This segment" and say what the
|
|
2
|
+
segment's change does. That is the whole context. Flight Plan lists every piece
|
|
3
|
+
of code the segment adds, modifies and removes under it, in the Change Overview,
|
|
4
|
+
so the context holds no list of changes, no accordion and no code links.
|
|
3
5
|
|
|
4
6
|
```markdown
|
|
5
|
-
|
|
6
|
-
|
|
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.
|
|
7
|
+
This segment checks the stock of every basket line before payment, so a basket
|
|
8
|
+
with an item that sold out a minute ago gets an error naming each sold-out item
|
|
9
|
+
and never reaches payment.
|
|
20
10
|
```
|
|
21
11
|
|
|
22
|
-
|
|
12
|
+
Check every claim against the diff, never against the pull request's own
|
|
23
13
|
description.
|
|
24
14
|
|
|
25
|
-
###
|
|
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.
|
|
15
|
+
### What the sentences say
|
|
63
16
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
17
|
+
Say what the segment's change does for a reader who has not seen the code. Name
|
|
18
|
+
no identifiers, paths or links. Say what someone would see: "a query over 1 MB
|
|
19
|
+
now gets an error that names the limit" tells the reader more than "the size
|
|
20
|
+
check handles large queries".
|
|
67
21
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
22
|
+
Write about the files of this segment only. When the reviewer turned segments
|
|
23
|
+
off, the first segment's context is the one Context of the whole change: start
|
|
24
|
+
it with "This change" and say what the whole change does.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Write a caption for the diagram: what the reader is looking at, before they follow its lines. Two sentences at most.
|
|
2
|
+
|
|
3
|
+
- **The first sentence says what the diagram starts from.** Open with "This diagram shows how", name the page, the component, the job or the route the paths start at, and say what it does when it opens, loads or runs: `This diagram shows how the edit page loads an order and renders it in the form.` Use the verb of the code for what it does, such as renders, loads or requests, so that "shows" is not written twice.
|
|
4
|
+
- **The second sentence follows the user's actions.** The actions are the events on the diagram: a submit, a click, a pick, a typed value. Open with "It also shows what happens when the user", name the action as the user would, then say where its data ends up: the request it sends, the store it writes, the page it opens. `It also shows what happens when the user saves the order, and how the changed order reaches the API through updateOrder().`
|
|
5
|
+
- **Several actions.** Name them together, in the order the diagram draws them: `It also shows what happens when the user picks a customer, picks a product, types a quantity or submits the form.`
|
|
6
|
+
- **A path nobody clicks.** A request, a schedule or another system starts it: name that in place of the user. `It also shows what happens when a request reaches POST /orders, and how the order reaches the database.`
|
|
7
|
+
- **No action on the diagram.** Leave the second sentence out, and never write "It also shows" with nothing after it.
|
|
8
|
+
- **Shared code that other segments call.** Say what the diagram holds and what reaches it: `This diagram shows how the route table opens the order pages, and how each hook loads or sends orders through its request.`
|
|
9
|
+
|
|
10
|
+
Name where the data ends up, not the steps on the way: the labels and the descriptions of the nodes carry the steps, and the reader follows them on the board. Do not explain the change: the Context Section and the waypoints do.
|
|
11
|
+
|
|
12
|
+
| The diagram | Its caption |
|
|
13
|
+
|---|---|
|
|
14
|
+
| A page that loads a record and saves it | This diagram shows how the edit page loads an order and renders it in the form. It also shows what happens when the user saves the order, and how the changed order reaches the API through `updateOrder()`. |
|
|
15
|
+
| A page that creates a record | This diagram shows how the create page opens with an empty draft in the form. It also shows what happens when the user submits the form, and how the new order reaches the API through `createOrder()`. |
|
|
16
|
+
| A page with no action on its paths | This diagram shows how the orders list loads the orders and renders them in a table. |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Say what this row of the node does, as a reader of the product would. Start with a verb in the present tense: "Queries every Pokemon ordered by name", "Sends the order to the API". Read the code of the node first, so the label says what the block does, not what it is or what it is called: "Queries every Pokemon ordered by name", not "The query of every Pokemon".
|
|
2
|
+
|
|
3
|
+
- **An argument.** Say what the node does with the value it is given: `Filters the Pokemon by this trainer`, not `The trainer to filter by`.
|
|
4
|
+
- **A state.** Say what the node keeps in it: `Keeps the lines of the cart`, not `The lines of the cart`.
|
|
5
|
+
- **A hook.** Say what the node gets from it: `Gets the mutation that applies a promo code`.
|
|
6
|
+
- **An effect.** Say what it does and when: `Clears the form after a save`.
|
|
7
|
+
- **A call.** Say what is asked of the code it calls: `Saves the renamed user`.
|
|
8
|
+
- **A value.** Say what the code that makes it does: `Queries every Pokemon ordered by name`, not `The query of every Pokemon`.
|
|
9
|
+
- **A step.** Say what the step does: `Returns an error for an empty title`. For a condition, say what is checked: `Checks whether a trainer is given`. A step can stand for several statements that follow each other, listed by the first: say what they do together, `Renames the chosen user`.
|
|
10
|
+
|
|
11
|
+
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: each one starts with a verb.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Tell the
|
|
1
|
+
Tell the trace 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
2
|
|
|
3
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
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.`
|
|
@@ -43,7 +43,7 @@ sort order, the option merge, the loop — unless that detail is the change itse
|
|
|
43
43
|
change to the purpose `context` states, usually with _so that_ or _because_. A reviewer who reads
|
|
44
44
|
only this card should know why it is in the pull request.
|
|
45
45
|
|
|
46
|
-
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `
|
|
46
|
+
**Take the connection from the Blast Diagram, not from a guess.** Where the artifact has one, `blastDiagram` lists the files
|
|
47
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
48
|
for — the form that no longer submits, the route that now returns something else, the caller that now
|
|
49
49
|
depends on the new value — and link it. Where nothing outside the change reaches this code, name
|