@arjunkhera/atlas 0.3.8 → 0.3.10
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/.claude-plugin/plugin.json +1 -1
- package/agents/artifact-renderer.md +22 -22
- package/door/cli.mjs +36 -11
- package/door/lib/design-build.mjs +409 -0
- package/door/lib/design.mjs +199 -118
- package/door/lib/markdown.mjs +160 -0
- package/package.json +1 -1
- package/skills/lead/SKILL.md +1 -1
- package/skills/sdlc-task/SKILL.md +33 -24
- package/skills/sdlc-task/design/README.md +187 -0
- package/skills/sdlc-task/design/parts/actors.md +26 -0
- package/skills/sdlc-task/design/parts/alternatives.md +24 -0
- package/skills/sdlc-task/design/parts/build.md +23 -0
- package/skills/sdlc-task/design/parts/calls.md +25 -0
- package/skills/sdlc-task/design/parts/change.md +27 -0
- package/skills/sdlc-task/design/parts/data.md +22 -0
- package/skills/sdlc-task/design/parts/done.md +23 -0
- package/skills/sdlc-task/design/parts/edges.md +24 -0
- package/skills/sdlc-task/design/parts/goals.md +27 -0
- package/skills/sdlc-task/design/parts/key.md +25 -0
- package/skills/sdlc-task/design/parts/migration.md +22 -0
- package/skills/sdlc-task/design/parts/order.md +24 -0
- package/skills/sdlc-task/design/parts/problem.md +22 -0
- package/skills/sdlc-task/design/parts/proof.md +24 -0
- package/skills/sdlc-task/design/parts/proposal.md +24 -0
- package/skills/sdlc-task/design/parts/records.md +24 -0
- package/skills/sdlc-task/design/parts/repos.md +25 -0
- package/skills/sdlc-task/design/parts/risks.md +24 -0
- package/skills/sdlc-task/design/parts/rollout.md +24 -0
- package/skills/sdlc-task/design/parts/routes.md +24 -0
- package/skills/sdlc-task/design/parts/scorecard.md +25 -0
- package/skills/sdlc-task/design/parts/security.md +22 -0
- package/skills/sdlc-task/design/parts/shared-decisions.md +24 -0
- package/skills/sdlc-task/design/parts/states.md +25 -0
- package/skills/sdlc-task/design/parts/stories.md +26 -0
- package/skills/sdlc-task/design/parts/summary.md +33 -0
- package/skills/sdlc-task/design/parts/why.md +22 -0
- package/skills/sdlc-task/design/parts/words.md +29 -0
- package/skills/sdlc-task/design/parts/yardstick.md +25 -0
- package/skills/sdlc-task/design/parts.yaml +306 -0
- package/skills/sdlc-task/lifecycle.yaml +2 -2
- package/work/lib/verbs.mjs +99 -14
- package/work/mcp.mjs +1 -1
- package/agents/artifact-format/walkthrough.html +0 -706
- package/skills/sdlc-task/templates/design-doc.md +0 -126
|
@@ -49,8 +49,9 @@ does not repeat those rules; follow the lead.
|
|
|
49
49
|
**A change after the owner approved a design** is not a new lock. Say so at
|
|
50
50
|
once, and never build against a sentence you know is wrong. Show the owner the
|
|
51
51
|
change in one screen. When the owner approves it, record the owner's words with
|
|
52
|
-
`decision_record` on the same item
|
|
53
|
-
|
|
52
|
+
`decision_record` on the same item. Name the part it touched, and change
|
|
53
|
+
that part in the design folder. (Target design, flow 4: long frozen texts
|
|
54
|
+
with hashes retire.)
|
|
54
55
|
|
|
55
56
|
## start
|
|
56
57
|
|
|
@@ -64,12 +65,12 @@ with the date. (Target design, flow 4: long frozen texts with hashes retire.)
|
|
|
64
65
|
(`registry_list`); it may be `main` or `master`. Branch from it, and never
|
|
65
66
|
commit to it. Local sessions use `feature/`, `fix/` or `chore/`; cloud
|
|
66
67
|
sessions use `claude/`. The pull request targets that branch.
|
|
67
|
-
4. **Design
|
|
68
|
-
|
|
69
|
-
`
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
covers pauses.
|
|
68
|
+
4. **Design** (standard and above): follow [`design/README.md`](design/README.md).
|
|
69
|
+
Pick the kinds, and say why. Make the folder `docs/design-docs/<slug>/`
|
|
70
|
+
with `design.yaml`, then write the Summary, Your words and Goals first.
|
|
71
|
+
Read the template for each part in `design/parts/`. List the folder in
|
|
72
|
+
`docs/index.md` in the commit that first lands it. Hotfix tier skips the design: the definition of done lives on
|
|
73
|
+
the work item, and a resume anchor covers pauses.
|
|
73
74
|
5. Enter the design loop.
|
|
74
75
|
|
|
75
76
|
## The design loop (between start and lock)
|
|
@@ -85,16 +86,17 @@ Talk to the owner by the `atlas:lead` skill. What this loop adds:
|
|
|
85
86
|
they presume was ever decided.** A bug report says the code surprised
|
|
86
87
|
someone; it does not say what the code should do.
|
|
87
88
|
- **User stories before the definition of done.** Never write checks for a
|
|
88
|
-
flow no story walks through.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`question_ask`, each answer with `question_answer
|
|
92
|
-
`decision_record
|
|
89
|
+
flow no story walks through. When the design has a flow a user walks, write
|
|
90
|
+
its Stories part first, whatever kinds it picks.
|
|
91
|
+
- **The design grows in real time.** Record each question with
|
|
92
|
+
`question_ask`, each answer with `question_answer` and each decision with
|
|
93
|
+
`decision_record`, as it happens. The tracker holds them. Change the part
|
|
94
|
+
the answer touches in the design folder at the same time.
|
|
93
95
|
- **Adversarial review before the owner approves.** Standard tier: at least one
|
|
94
96
|
persona. Initiative: the panel, `atlas:reviewer-pm`, `atlas:reviewer-architect`
|
|
95
97
|
and `atlas:reviewer-security`, each briefed with the doc path, in parallel.
|
|
96
98
|
Brief each one to ask whether the design is the right thing. An unresolved
|
|
97
|
-
finding goes
|
|
99
|
+
finding goes to the tracker with `question_ask`.
|
|
98
100
|
|
|
99
101
|
## lock
|
|
100
102
|
|
|
@@ -105,17 +107,22 @@ A lock is the owner's approval of a short design (target design, flow 4).
|
|
|
105
107
|
`lifecycle.yaml` `lock.holds` lists: the definition of done, written as checks; the kind of change, its impact and its undo; and
|
|
106
108
|
each existing test it expects to change. A change that cannot be undone
|
|
107
109
|
shows in bold at the top.
|
|
108
|
-
2. **Show
|
|
109
|
-
`atlas ste` on the
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
2. **Show the design's page before you ask.** Run
|
|
111
|
+
`atlas design check <folder>` and `atlas ste` on the folder, and fix each
|
|
112
|
+
finding by hand. A part that needs a custom figure goes to the
|
|
113
|
+
`atlas:artifact-renderer` crew first. Run
|
|
114
|
+
`atlas design build <folder> --tracker <item.json>`, with the tracker
|
|
115
|
+
data that `design/README.md` names. Run `atlas ste` on the page and
|
|
116
|
+
publish it. Link the folder and the page with `item_link`. Then
|
|
113
117
|
rebuild the hub (see "The design hub" below).
|
|
114
118
|
3. **The owner approves it in the owner's own words.** Gate on
|
|
115
119
|
`lifecycle.yaml` `lock.preconditions`. Record the words with
|
|
116
|
-
`decision_record
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
`decision_record`. The tracker holds the approval; the design file does
|
|
121
|
+
not.
|
|
122
|
+
4. Call `item_lock` with the definition of done as `scope.text`. Set
|
|
123
|
+
`scope.design_doc` to a link to the design at the approved commit, such
|
|
124
|
+
as `https://github.com/<owner>/<repo>/tree/<sha>/docs/design-docs/<slug>`.
|
|
125
|
+
The verb keeps a fingerprint of that text for
|
|
119
126
|
the tools. No person reads or writes a hash, and no frozen text is copied
|
|
120
127
|
into the doc.
|
|
121
128
|
Rebuild the hub, so the design reads "Building".
|
|
@@ -164,8 +171,10 @@ next action. One short paragraph.
|
|
|
164
171
|
migration reaches the running node after the merge.
|
|
165
172
|
2. If anything was a struggle, encode the fix where it stops a repeat — a lint,
|
|
166
173
|
then a tool, then a skill, then a doc — and say which.
|
|
167
|
-
3.
|
|
168
|
-
|
|
174
|
+
3. Rebuild the design's page and the hub, so both read "Shipped". The
|
|
175
|
+
design folder does not change: the tracker holds the delivery. A design
|
|
176
|
+
from before 9 October 2026 is one file. Keep its page, and rebuild only
|
|
177
|
+
the hub.
|
|
169
178
|
|
|
170
179
|
## The design hub
|
|
171
180
|
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# How to write a design
|
|
2
|
+
|
|
3
|
+
Every Atlas design has the same spine. It adds the parts of each kind it
|
|
4
|
+
needs. A design keeps no state: the tracker holds anything that changes as
|
|
5
|
+
the work moves. The page shows those facts, read only.
|
|
6
|
+
|
|
7
|
+
The look was agreed with the owner on 9 October 2026. The boards are on the
|
|
8
|
+
canvas at https://claude.ai/artifact/DP7WmrRzqyGKTkQQQ6Ev8A.
|
|
9
|
+
|
|
10
|
+
## One home for each fact
|
|
11
|
+
|
|
12
|
+
| Ask this | If yes, it lives in |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Does it change as the work moves? | The tracker: the stage, splits, questions, answers, decisions, the approval, the lock, changes after approval and the proof. |
|
|
15
|
+
| Does it explain why or how? | The design: the problem, the owner's words, the goals, how it works, the options and their reasons, the contract and the done line. |
|
|
16
|
+
|
|
17
|
+
## Pick the kinds
|
|
18
|
+
|
|
19
|
+
Pick one kind or more. One design can mix kinds: an interface change with a
|
|
20
|
+
hard flow is a Contract and a Flow. A part that two kinds need appears once.
|
|
21
|
+
|
|
22
|
+
| Kind | Pick it when | Example |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| Decide | There are several ways, and one must win. | Test before merge |
|
|
25
|
+
| Flow | The behaviour is the hard part. | When a test goes red |
|
|
26
|
+
| Contract | An interface, a schema or a command changes. | A document viewer route |
|
|
27
|
+
| Initiative | Many designs serve one goal. | Support for many file types |
|
|
28
|
+
|
|
29
|
+
Set `shared: true` when many repos use the design, such as Atlas itself.
|
|
30
|
+
Then "Each kind of repo" is needed. For a design in one product it is
|
|
31
|
+
optional.
|
|
32
|
+
|
|
33
|
+
## All parts by kind
|
|
34
|
+
|
|
35
|
+
`needed` means the check fails when the part is missing or empty.
|
|
36
|
+
`shared` means needed when the design is shared. `—` means the kind does
|
|
37
|
+
not use the part. The registry is [parts.yaml](parts.yaml), and a test keeps
|
|
38
|
+
this table equal to it.
|
|
39
|
+
|
|
40
|
+
| Part | File holds | Decide | Flow | Contract | Initiative |
|
|
41
|
+
|---|---|---|---|---|---|
|
|
42
|
+
| Summary | `summary` | needed | needed | needed | needed |
|
|
43
|
+
| Your words | `words` | needed | needed | needed | needed |
|
|
44
|
+
| Goals and non-goals | `goals` | needed | needed | needed | needed |
|
|
45
|
+
| Problem today | `problem` | needed | if it applies | if it applies | — |
|
|
46
|
+
| Yardstick | `yardstick` | needed | — | — | — |
|
|
47
|
+
| Proposal | `proposal` | needed | — | — | — |
|
|
48
|
+
| Alternatives | `alternatives` | needed | if it applies | if it applies | — |
|
|
49
|
+
| Scorecard | `scorecard` | needed | — | — | — |
|
|
50
|
+
| Build list | `build` | needed | if it applies | if it applies | — |
|
|
51
|
+
| Who and what | `actors` | if it applies | needed | if it applies | — |
|
|
52
|
+
| Stories | `stories` | if it applies | needed | if it applies | — |
|
|
53
|
+
| Edge cases | `edges` | if it applies | needed | if it applies | — |
|
|
54
|
+
| Records | `records` | — | needed | if it applies | — |
|
|
55
|
+
| States | `states` | — | if it applies | — | — |
|
|
56
|
+
| Routes and interface | `routes` | — | — | needed | — |
|
|
57
|
+
| Calls and answers | `calls` | — | — | needed | — |
|
|
58
|
+
| Data change | `data` | — | — | needed | — |
|
|
59
|
+
| Migration and undo | `migration` | — | — | needed | — |
|
|
60
|
+
| Security | `security` | if it applies | if it applies | needed | — |
|
|
61
|
+
| Rollout | `rollout` | if it applies | if it applies | needed | — |
|
|
62
|
+
| Why one initiative | `why` | — | — | — | needed |
|
|
63
|
+
| Shared decisions | `shared-decisions` | — | — | — | needed |
|
|
64
|
+
| Order and dependencies | `order` | — | — | — | needed |
|
|
65
|
+
| Risks | `risks` | needed | needed | needed | needed |
|
|
66
|
+
| Test and proof plan | `proof` | needed | needed | needed | — |
|
|
67
|
+
| Each kind of repo | `repos` | shared | shared | shared | — |
|
|
68
|
+
| Change and undo | `change` | needed | needed | needed | if it applies |
|
|
69
|
+
| Done line | `done` | needed | needed | needed | needed |
|
|
70
|
+
| Key | `key` | needed | needed | needed | needed |
|
|
71
|
+
|
|
72
|
+
The page also shows six parts from the tracker: Questions, Decisions,
|
|
73
|
+
Approval and lock, Since approval, Family and Roll-up. No file holds them.
|
|
74
|
+
The builder counts the Roll-up from the Family list.
|
|
75
|
+
|
|
76
|
+
## What the lock needs
|
|
77
|
+
|
|
78
|
+
The lock reads `lock.holds` and `lock.preconditions` in `lifecycle.yaml`.
|
|
79
|
+
Each one has a home:
|
|
80
|
+
|
|
81
|
+
| The lock needs | Where it lives |
|
|
82
|
+
|---|---|
|
|
83
|
+
| The definition of done | The Done line part |
|
|
84
|
+
| The kind of change, its impact, its undo and the tests it changes | The Change and undo part |
|
|
85
|
+
| The chosen approach | The Proposal part of a Decide design. In the other kinds, the design itself is the approach. |
|
|
86
|
+
| No open question | The tracker: `needs_me` shows none for the item |
|
|
87
|
+
| The owner's approval in his own words | The tracker: `decision_record` |
|
|
88
|
+
|
|
89
|
+
## Tier and kind
|
|
90
|
+
|
|
91
|
+
The tier (hotfix, standard or initiative) sets how much process the work
|
|
92
|
+
gets. The kind sets which parts the design has. The two are separate: an
|
|
93
|
+
initiative-tier piece of work can be a Decide design, and an Initiative
|
|
94
|
+
design holds a family of designs.
|
|
95
|
+
|
|
96
|
+
At initiative tier, a Decide design goes deep:
|
|
97
|
+
|
|
98
|
+
1. The Problem today part has a figure of today. The Proposal part has a
|
|
99
|
+
figure of the target.
|
|
100
|
+
2. At least two options get full depth in Alternatives: their costs, their
|
|
101
|
+
risks and why each one lost.
|
|
102
|
+
|
|
103
|
+
At standard tier, one chosen approach and one rejected option are enough.
|
|
104
|
+
|
|
105
|
+
## What we kept from the Engram template
|
|
106
|
+
|
|
107
|
+
Every section of the Engram design template has a home. The sections that
|
|
108
|
+
change as work moves went to the tracker.
|
|
109
|
+
|
|
110
|
+
| Engram section | Its home now |
|
|
111
|
+
|---|---|
|
|
112
|
+
| Status, container, tier | The top strip, read from the tracker |
|
|
113
|
+
| Context and goal | Your words and Summary |
|
|
114
|
+
| Goals, non-goals, success metrics | Goals and non-goals |
|
|
115
|
+
| Flows | Flow kind: Stories and States |
|
|
116
|
+
| User stories | Flow kind: Stories, one walkthrough each |
|
|
117
|
+
| Architecture | The Summary figure, the Proposal, and the Contract parts |
|
|
118
|
+
| Approaches considered | Decide kind: Alternatives and Scorecard |
|
|
119
|
+
| Open and resolved questions | Tracker: Questions |
|
|
120
|
+
| Decision log | Tracker: Decisions. The reasons stay in the design. |
|
|
121
|
+
| Risks and failure modes | Risks |
|
|
122
|
+
| Test and eval plan | Test and proof plan |
|
|
123
|
+
| Acceptance criteria | Done line |
|
|
124
|
+
| Lock block | Tracker: Approval and lock |
|
|
125
|
+
| Deviation log | Tracker: Since approval, with the part each change touched |
|
|
126
|
+
|
|
127
|
+
## The folder
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
docs/design-docs/<slug>/
|
|
131
|
+
design.yaml title, item, product, kinds, shared, look
|
|
132
|
+
summary.md ---
|
|
133
|
+
part: summary
|
|
134
|
+
---
|
|
135
|
+
# Summary
|
|
136
|
+
...
|
|
137
|
+
words.md part: words
|
|
138
|
+
...
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
1. Name each file as you like. The `part:` line in its front matter says
|
|
142
|
+
which part it is.
|
|
143
|
+
2. `design.yaml` holds what the design is, never where it stands. Its keys
|
|
144
|
+
are `title`, `item`, `product`, `kinds`, `shared` and `look`. `look`
|
|
145
|
+
links a mock or a canvas. The tracker holds the link to the published
|
|
146
|
+
page.
|
|
147
|
+
3. When the repo's docs lint needs every page linked from an index, add an
|
|
148
|
+
`index.md` that links each part file. The check then makes sure it links
|
|
149
|
+
all of them.
|
|
150
|
+
4. A part file may have a `title:` line. The page then uses it as the
|
|
151
|
+
heading of the part.
|
|
152
|
+
|
|
153
|
+
## Write each part
|
|
154
|
+
|
|
155
|
+
1. Read the template for the part in [parts/](parts/). It says what the
|
|
156
|
+
part holds, the rules for it and a short example.
|
|
157
|
+
2. Write the part in your own file. Do not copy the template.
|
|
158
|
+
3. Write "No change" and the reason when a needed part does not apply.
|
|
159
|
+
An empty part fails the check.
|
|
160
|
+
4. Put every code you use, such as `US-3` or `M1`, in the Key.
|
|
161
|
+
5. Never write a state line, such as "Status: approved". The check flags it.
|
|
162
|
+
|
|
163
|
+
## Figures
|
|
164
|
+
|
|
165
|
+
1. Use a woodcut figure when a stock figure fits: a flow chart, a sequence,
|
|
166
|
+
a state machine or swim lanes. Use a fenced block with the info string
|
|
167
|
+
`woodcut wc-<type>`. It holds the figure data as JSON, in the woodcut
|
|
168
|
+
shape.
|
|
169
|
+
2. Draw your own figure when the subject has its own shape. Git lanes, a
|
|
170
|
+
time line and a data diff are examples. Use a fenced block with the info
|
|
171
|
+
string `figure`. It holds the HTML. Use the page tokens, such as
|
|
172
|
+
`var(--accent)` and `var(--line)`, so the figure works in both themes.
|
|
173
|
+
3. Both kinds follow the same rules. A step has a title and one or two
|
|
174
|
+
sentences. The reader sets the pace. The figure prints as stills.
|
|
175
|
+
Meaning is never by colour alone.
|
|
176
|
+
|
|
177
|
+
## Check and build
|
|
178
|
+
|
|
179
|
+
1. Run `atlas design check <folder>`. Fix each finding by hand.
|
|
180
|
+
2. Read the item, its questions, decisions and links with the Atlas tools.
|
|
181
|
+
Copy their fields into one JSON file, as the tools return them. The
|
|
182
|
+
shape is at the top of `door/lib/design-build.mjs`. The builder
|
|
183
|
+
refuses a field that the tracker does not hold.
|
|
184
|
+
3. Run `atlas design build <folder> --tracker <item.json>`. It writes the
|
|
185
|
+
page only when the check is GREEN. `--draft` builds a page marked as a
|
|
186
|
+
draft.
|
|
187
|
+
4. Run `atlas ste` on the page, then publish it.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Who and what
|
|
2
|
+
|
|
3
|
+
It holds: The people, agents and systems in the flow.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: optional, Flow: needed, Contract: optional, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Name each person, agent and system in the flow.
|
|
10
|
+
2. Say what each one may do, and what it may not do.
|
|
11
|
+
3. Use the same names in the stories.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: actors
|
|
18
|
+
---
|
|
19
|
+
# Who and what
|
|
20
|
+
|
|
21
|
+
| Who | Does |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Owner | Merges. |
|
|
24
|
+
| Lead | Opens the pull request. Never merges. |
|
|
25
|
+
| Gate | Runs the tests. |
|
|
26
|
+
````
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Alternatives
|
|
2
|
+
|
|
3
|
+
It holds: The other options, and why each one lost.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: optional, Contract: optional, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. List each option we did not pick, and why it lost.
|
|
10
|
+
2. Keep the reason to one or two sentences.
|
|
11
|
+
3. Say what we keep from it, if anything.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: alternatives
|
|
18
|
+
---
|
|
19
|
+
# Alternatives
|
|
20
|
+
|
|
21
|
+
| Option | Why it lost |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Run after the merge | A red test reaches master. |
|
|
24
|
+
````
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Build list
|
|
2
|
+
|
|
3
|
+
It holds: The pieces to build, in order.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: optional, Contract: optional, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. List the pieces to build, in order.
|
|
10
|
+
2. Each piece is small enough for one pull request.
|
|
11
|
+
3. Say what each piece waits on.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: build
|
|
18
|
+
---
|
|
19
|
+
# Build list
|
|
20
|
+
|
|
21
|
+
1. The gate workflow. Waits on nothing.
|
|
22
|
+
2. The merge rule. Waits on 1.
|
|
23
|
+
````
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Calls and answers
|
|
2
|
+
|
|
3
|
+
It holds: A real call and its real answer for each entry of the interface. A schema repo shows a real query; a plugin shows a tool call.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: none, Flow: none, Contract: needed, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Show one real call and its real answer for each route.
|
|
10
|
+
2. Show one call that is refused, and its answer.
|
|
11
|
+
3. Say where the example values come from.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: calls
|
|
18
|
+
---
|
|
19
|
+
# Calls and answers
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
GET /documents/42/view
|
|
23
|
+
200 OK content-type: text/html
|
|
24
|
+
```
|
|
25
|
+
````
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Change and undo
|
|
2
|
+
|
|
3
|
+
It holds: The kind of change, its impact, how to undo it, and each existing test it changes.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: needed, Contract: needed, Initiative: optional.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Name the kind of change: code, schema, config, docs or a rule.
|
|
10
|
+
2. Say what it touches, how to undo it, and mark in bold a change that cannot be undone.
|
|
11
|
+
3. List each existing test the change edits or removes, and why.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: change
|
|
18
|
+
---
|
|
19
|
+
# Change and undo
|
|
20
|
+
|
|
21
|
+
| | What |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Kind | Code: the gate workflow. |
|
|
24
|
+
| Impact | Every pull request waits for the tests. |
|
|
25
|
+
| Undo | Revert the pull request. |
|
|
26
|
+
| Tests it changes | None. |
|
|
27
|
+
````
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Data change
|
|
2
|
+
|
|
3
|
+
It holds: The schema or data change. Write "No change" and why, when there is none, as a library or a CLI often does.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: none, Flow: none, Contract: needed, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Show the schema or data change as a diff.
|
|
10
|
+
2. Write "No change" and the reason when there is none.
|
|
11
|
+
3. Name each table or file that changes.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: data
|
|
18
|
+
---
|
|
19
|
+
# Data change
|
|
20
|
+
|
|
21
|
+
No change. The viewer reads the existing documents table.
|
|
22
|
+
````
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Done line
|
|
2
|
+
|
|
3
|
+
It holds: Lines someone else can check. The approval lives in the tracker.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: needed, Contract: needed, Initiative: needed.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Write each line as a check someone else can run: the input, what happens and the output that passes.
|
|
10
|
+
2. Each line names who runs it and the proof it leaves: a test, a command output or a page.
|
|
11
|
+
3. The approval lives in the tracker, not here.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: done
|
|
18
|
+
---
|
|
19
|
+
# Done line
|
|
20
|
+
|
|
21
|
+
1. A pull request with a red test cannot merge. The verifier plants a red test; the merge button stays blocked. Proof: the check run link.
|
|
22
|
+
2. `npm test` passes. The verifier runs it. Proof: the test summary.
|
|
23
|
+
````
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Edge cases
|
|
2
|
+
|
|
3
|
+
It holds: What happens when a step fails or comes in a strange order.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: optional, Flow: needed, Contract: optional, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. List what happens when a step fails or comes in a strange order.
|
|
10
|
+
2. Say what the user sees in each case.
|
|
11
|
+
3. Cover a missing input, a retry and a timeout.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: edges
|
|
18
|
+
---
|
|
19
|
+
# Edge cases
|
|
20
|
+
|
|
21
|
+
| Case | What happens |
|
|
22
|
+
|---|---|
|
|
23
|
+
| The gate times out | The merge stays blocked. The check says it timed out. |
|
|
24
|
+
````
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Goals and non-goals
|
|
2
|
+
|
|
3
|
+
It holds: What it is for, what it is not, and how we know it worked.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: needed, Contract: needed, Initiative: needed.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. List each goal and each non-goal in one table.
|
|
10
|
+
2. A non-goal names something a reader may expect, and says it is out.
|
|
11
|
+
3. End with one line: how we know it worked.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: goals
|
|
18
|
+
---
|
|
19
|
+
# Goals and non-goals
|
|
20
|
+
|
|
21
|
+
| | What |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Goal | A red test stops the merge. |
|
|
24
|
+
| Non-goal | Running the tests on every push. |
|
|
25
|
+
|
|
26
|
+
How we know it worked: no merge in a month has a red test after it.
|
|
27
|
+
````
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Key
|
|
2
|
+
|
|
3
|
+
It holds: Every word and code the design uses.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: needed, Contract: needed, Initiative: needed.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. List every word and code the design uses that a new reader may not know.
|
|
10
|
+
2. One row for each, with its meaning.
|
|
11
|
+
3. The check flags a code with no row here.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: key
|
|
18
|
+
---
|
|
19
|
+
# Key
|
|
20
|
+
|
|
21
|
+
| Word | Meaning |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Gate | The check that runs before a merge. |
|
|
24
|
+
| US-1 | The story "a test goes red". |
|
|
25
|
+
````
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Migration and undo
|
|
2
|
+
|
|
3
|
+
It holds: How old data moves to the new shape, and how the data change is undone.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: none, Flow: none, Contract: needed, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Say how old data moves to the new shape.
|
|
10
|
+
2. Say how to undo the change, step by step.
|
|
11
|
+
3. Mark in bold a change that cannot be undone.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: migration
|
|
18
|
+
---
|
|
19
|
+
# Migration and undo
|
|
20
|
+
|
|
21
|
+
Undo: revert the pull request. No data moves.
|
|
22
|
+
````
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Order and dependencies
|
|
2
|
+
|
|
3
|
+
It holds: Which design comes first, and what each one waits on.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: none, Flow: none, Contract: none, Initiative: needed.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Say which design comes first.
|
|
10
|
+
2. Say what each design waits on.
|
|
11
|
+
3. Draw the order when there are more than three designs.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: order
|
|
18
|
+
---
|
|
19
|
+
# Order and dependencies
|
|
20
|
+
|
|
21
|
+
1. The shared queue.
|
|
22
|
+
2. The PDF reader, after 1.
|
|
23
|
+
3. The image reader, after 1.
|
|
24
|
+
````
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Problem today
|
|
2
|
+
|
|
3
|
+
It holds: What happens today, with a real example.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: optional, Contract: optional, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Say what happens today, with one real example.
|
|
10
|
+
2. Cite the source: a pull request, an issue or a log line.
|
|
11
|
+
3. Do not propose a fix here.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: problem
|
|
18
|
+
---
|
|
19
|
+
# Problem today
|
|
20
|
+
|
|
21
|
+
Today the tests run after the merge. On 2 October pull request 88 merged, and its tests went red one hour later.
|
|
22
|
+
````
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Test and proof plan
|
|
2
|
+
|
|
3
|
+
It holds: How each piece proves itself.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: needed, Contract: needed, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Say how each piece proves itself.
|
|
10
|
+
2. Prefer a test that fails when the code is wrong.
|
|
11
|
+
3. Name the command that runs it.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: proof
|
|
18
|
+
---
|
|
19
|
+
# Test and proof plan
|
|
20
|
+
|
|
21
|
+
| Piece | Proof |
|
|
22
|
+
|---|---|
|
|
23
|
+
| The gate | A planted red test blocks the merge. |
|
|
24
|
+
````
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Proposal
|
|
2
|
+
|
|
3
|
+
It holds: The option we pick, and how it works.
|
|
4
|
+
|
|
5
|
+
Needs: Decide: needed, Flow: none, Contract: none, Initiative: none.
|
|
6
|
+
|
|
7
|
+
Rules:
|
|
8
|
+
|
|
9
|
+
1. Name the option we pick, and say how it works in steps.
|
|
10
|
+
2. Give a worked example: the input, the process and the output.
|
|
11
|
+
3. Link the figure that shows it.
|
|
12
|
+
|
|
13
|
+
Example, in a file of its own:
|
|
14
|
+
|
|
15
|
+
````markdown
|
|
16
|
+
---
|
|
17
|
+
part: proposal
|
|
18
|
+
---
|
|
19
|
+
# Proposal
|
|
20
|
+
|
|
21
|
+
1. A pull request opens.
|
|
22
|
+
2. The gate runs the tests on its head.
|
|
23
|
+
3. A red test blocks the merge button.
|
|
24
|
+
````
|