@tiphys/kernel 0.0.0 → 0.2.0

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.
Files changed (207) hide show
  1. package/AGENTS.md +663 -0
  2. package/LICENSE +202 -0
  3. package/assurance-modes.yaml +299 -0
  4. package/checklists/clean-room.yaml +325 -0
  5. package/checklists/env-failure-diagnosis.yaml +68 -0
  6. package/checklists/flake-playbook.yaml +68 -0
  7. package/checklists/hazard-review.yaml +144 -0
  8. package/checklists/plan-review.yaml +103 -0
  9. package/dist/bin/tiphys.d.ts +2 -0
  10. package/dist/bin/tiphys.js +92 -0
  11. package/dist/src/adapters/load.d.ts +202 -0
  12. package/dist/src/adapters/load.js +440 -0
  13. package/dist/src/brief.d.ts +32 -0
  14. package/dist/src/brief.js +66 -0
  15. package/dist/src/checklists.d.ts +169 -0
  16. package/dist/src/checklists.js +310 -0
  17. package/dist/src/checks.d.ts +1539 -0
  18. package/dist/src/checks.js +5025 -0
  19. package/dist/src/cli.d.ts +9 -0
  20. package/dist/src/cli.js +68 -0
  21. package/dist/src/commands/brief.d.ts +92 -0
  22. package/dist/src/commands/brief.js +343 -0
  23. package/dist/src/commands/checklist.d.ts +42 -0
  24. package/dist/src/commands/checklist.js +168 -0
  25. package/dist/src/commands/cutover.d.ts +35 -0
  26. package/dist/src/commands/cutover.js +448 -0
  27. package/dist/src/commands/doctor.d.ts +264 -0
  28. package/dist/src/commands/doctor.js +1546 -0
  29. package/dist/src/commands/gates.d.ts +9 -0
  30. package/dist/src/commands/gates.js +360 -0
  31. package/dist/src/commands/init.d.ts +30 -0
  32. package/dist/src/commands/init.js +177 -0
  33. package/dist/src/commands/lock.d.ts +34 -0
  34. package/dist/src/commands/lock.js +340 -0
  35. package/dist/src/commands/mode.d.ts +40 -0
  36. package/dist/src/commands/mode.js +134 -0
  37. package/dist/src/commands/next.d.ts +130 -0
  38. package/dist/src/commands/next.js +597 -0
  39. package/dist/src/commands/plan.d.ts +20 -0
  40. package/dist/src/commands/plan.js +105 -0
  41. package/dist/src/commands/pool.d.ts +1 -0
  42. package/dist/src/commands/pool.js +139 -0
  43. package/dist/src/commands/resume.d.ts +1 -0
  44. package/dist/src/commands/resume.js +88 -0
  45. package/dist/src/commands/spawn.d.ts +1 -0
  46. package/dist/src/commands/spawn.js +195 -0
  47. package/dist/src/commands/status.d.ts +21 -0
  48. package/dist/src/commands/status.js +122 -0
  49. package/dist/src/commands/sync.d.ts +47 -0
  50. package/dist/src/commands/sync.js +341 -0
  51. package/dist/src/commands/teardown.d.ts +1 -0
  52. package/dist/src/commands/teardown.js +87 -0
  53. package/dist/src/commands/tuition.d.ts +21 -0
  54. package/dist/src/commands/tuition.js +218 -0
  55. package/dist/src/commands/validate.d.ts +78 -0
  56. package/dist/src/commands/validate.js +430 -0
  57. package/dist/src/commands/watch.d.ts +1 -0
  58. package/dist/src/commands/watch.js +172 -0
  59. package/dist/src/cutover.d.ts +584 -0
  60. package/dist/src/cutover.js +1444 -0
  61. package/dist/src/exclusion.d.ts +389 -0
  62. package/dist/src/exclusion.js +843 -0
  63. package/dist/src/exec/env.d.ts +278 -0
  64. package/dist/src/exec/env.js +334 -0
  65. package/dist/src/fleet.d.ts +223 -0
  66. package/dist/src/fleet.js +298 -0
  67. package/dist/src/gates/adapters/http-json.d.ts +5 -0
  68. package/dist/src/gates/adapters/http-json.js +283 -0
  69. package/dist/src/gates/adapters/migrations-command.d.ts +1 -0
  70. package/dist/src/gates/adapters/migrations-command.js +373 -0
  71. package/dist/src/gates/citations.d.ts +408 -0
  72. package/dist/src/gates/citations.js +1169 -0
  73. package/dist/src/gates/coverage.d.ts +375 -0
  74. package/dist/src/gates/coverage.js +836 -0
  75. package/dist/src/gates/credentials.d.ts +233 -0
  76. package/dist/src/gates/credentials.js +752 -0
  77. package/dist/src/gates/deploy.d.ts +1 -0
  78. package/dist/src/gates/deploy.js +33 -0
  79. package/dist/src/gates/gate-classes.d.ts +56 -0
  80. package/dist/src/gates/gate-classes.js +633 -0
  81. package/dist/src/gates/manifest.d.ts +99 -0
  82. package/dist/src/gates/manifest.js +208 -0
  83. package/dist/src/gates/merge-preconditions.d.ts +319 -0
  84. package/dist/src/gates/merge-preconditions.js +932 -0
  85. package/dist/src/gates/migrations.d.ts +1 -0
  86. package/dist/src/gates/migrations.js +36 -0
  87. package/dist/src/gates/pin.d.ts +114 -0
  88. package/dist/src/gates/pin.js +154 -0
  89. package/dist/src/gates/red-witness.d.ts +22 -0
  90. package/dist/src/gates/red-witness.js +482 -0
  91. package/dist/src/gates/release.d.ts +283 -0
  92. package/dist/src/gates/release.js +820 -0
  93. package/dist/src/gates/result.d.ts +116 -0
  94. package/dist/src/gates/result.js +91 -0
  95. package/dist/src/gates/run.d.ts +614 -0
  96. package/dist/src/gates/run.js +1614 -0
  97. package/dist/src/gates/schemas/citation-config.schema.json +59 -0
  98. package/dist/src/gates/schemas/coverage-config.schema.json +77 -0
  99. package/dist/src/gates/schemas/gate-manifest.schema.json +125 -0
  100. package/dist/src/gates/schemas/gate-result.schema.json +160 -0
  101. package/dist/src/gates/schemas/phase-declaration.schema.json +87 -0
  102. package/dist/src/gates/schemas/release-record.schema.json +119 -0
  103. package/dist/src/gates/schemas/verifier-config.schema.json +101 -0
  104. package/dist/src/gates/schemas/witness-spec.schema.json +110 -0
  105. package/dist/src/gates/scope.d.ts +131 -0
  106. package/dist/src/gates/scope.js +1018 -0
  107. package/dist/src/gates/suite.d.ts +217 -0
  108. package/dist/src/gates/suite.js +968 -0
  109. package/dist/src/gates/validate.d.ts +121 -0
  110. package/dist/src/gates/validate.js +414 -0
  111. package/dist/src/hooks.d.ts +84 -0
  112. package/dist/src/hooks.js +125 -0
  113. package/dist/src/index.d.ts +31 -0
  114. package/dist/src/index.js +30 -0
  115. package/dist/src/liveness.d.ts +321 -0
  116. package/dist/src/liveness.js +396 -0
  117. package/dist/src/lock.d.ts +256 -0
  118. package/dist/src/lock.js +792 -0
  119. package/dist/src/model-resolution.d.ts +159 -0
  120. package/dist/src/model-resolution.js +307 -0
  121. package/dist/src/modes.d.ts +149 -0
  122. package/dist/src/modes.js +258 -0
  123. package/dist/src/path-identity.d.ts +34 -0
  124. package/dist/src/path-identity.js +48 -0
  125. package/dist/src/plan.d.ts +73 -0
  126. package/dist/src/plan.js +153 -0
  127. package/dist/src/pool.d.ts +326 -0
  128. package/dist/src/pool.js +988 -0
  129. package/dist/src/roles.d.ts +461 -0
  130. package/dist/src/roles.js +776 -0
  131. package/dist/src/spawn.d.ts +482 -0
  132. package/dist/src/spawn.js +1003 -0
  133. package/dist/src/status.d.ts +116 -0
  134. package/dist/src/status.js +148 -0
  135. package/dist/src/task.d.ts +504 -0
  136. package/dist/src/task.js +307 -0
  137. package/dist/src/teardown.d.ts +39 -0
  138. package/dist/src/teardown.js +422 -0
  139. package/dist/src/tuition.d.ts +159 -0
  140. package/dist/src/tuition.js +311 -0
  141. package/dist/src/validate.d.ts +263 -0
  142. package/dist/src/validate.js +742 -0
  143. package/dist/src/version.d.ts +3 -0
  144. package/dist/src/version.js +38 -0
  145. package/dist/src/watcher.d.ts +275 -0
  146. package/dist/src/watcher.js +849 -0
  147. package/dist/src/witness/run.d.ts +299 -0
  148. package/dist/src/witness/run.js +1373 -0
  149. package/dist/src/witness/spec.d.ts +270 -0
  150. package/dist/src/witness/spec.js +475 -0
  151. package/dist/tsconfig.src.tsbuildinfo +1 -0
  152. package/gate-registry.yaml +526 -0
  153. package/gates.manifest.json +257 -0
  154. package/package.json +72 -3
  155. package/role-model-config.yaml +88 -0
  156. package/roles/README.md +128 -0
  157. package/roles/_shared-dispatch-contract.md +87 -0
  158. package/roles/adversarial-plan-reviewer.md +80 -0
  159. package/roles/clean-room-reviewer.md +140 -0
  160. package/roles/implementer.md +463 -0
  161. package/roles/investigator.md +138 -0
  162. package/roles/plan-writer.md +95 -0
  163. package/schemas/README.md +82 -0
  164. package/schemas/assurance-modes.schema.json +264 -0
  165. package/schemas/charter.schema.json +185 -0
  166. package/schemas/checklist.schema.json +114 -0
  167. package/schemas/cutover-state.schema.json +64 -0
  168. package/schemas/decision-record.schema.json +88 -0
  169. package/schemas/executor-record.schema.json +36 -0
  170. package/schemas/final-report.schema.json +90 -0
  171. package/schemas/finding.schema.json +106 -0
  172. package/schemas/gate-registry.schema.json +260 -0
  173. package/schemas/mechanism-index.schema.json +94 -0
  174. package/schemas/model-resolution.schema.json +362 -0
  175. package/schemas/plan.schema.json +300 -0
  176. package/schemas/report.schema.json +579 -0
  177. package/schemas/role-brief.schema.json +105 -0
  178. package/schemas/role-model-config.schema.json +90 -0
  179. package/schemas/status-line.schema.json +40 -0
  180. package/schemas/tuition.schema.json +191 -0
  181. package/schemas/verdict.schema.json +295 -0
  182. package/schemas/work-history.schema.json +183 -0
  183. package/schemas/write-bypass.schema.json +69 -0
  184. package/templates/charter.example.yaml +54 -0
  185. package/templates/decision-record.example.yaml +27 -0
  186. package/templates/final-report.example.yaml +80 -0
  187. package/templates/plan.example.yaml +87 -0
  188. package/templates/report.example.yaml +236 -0
  189. package/templates/warnings.md +74 -0
  190. package/templates/work-history.example.yaml +185 -0
  191. package/tuition/README.md +76 -0
  192. package/tuition/T-001.yaml +48 -0
  193. package/tuition/T-002.yaml +51 -0
  194. package/tuition/T-003.yaml +100 -0
  195. package/tuition/T-004.yaml +52 -0
  196. package/tuition/T-005.yaml +72 -0
  197. package/tuition/T-006.yaml +81 -0
  198. package/tuition/T-007.yaml +56 -0
  199. package/tuition/T-008.yaml +111 -0
  200. package/tuition/T-009.yaml +50 -0
  201. package/tuition/T-015.yaml +36 -0
  202. package/tuition/T-016.yaml +36 -0
  203. package/tuition/T-017.yaml +46 -0
  204. package/tuition/T-018.yaml +84 -0
  205. package/tuition/T-021.yaml +40 -0
  206. package/tuition/T-022.yaml +36 -0
  207. package/tuition/mechanism-index.yaml +256 -0
@@ -0,0 +1,325 @@
1
+ # THE CLEAN-ROOM REVIEW CHECKLIST (kernel plan M3, M3-P7 steps 3 and 3c).
2
+ #
3
+ # Read WITHOUT the implementer's account of the work. The probes below are the
4
+ # questions; the framings at the bottom decide which one is asked FIRST, which
5
+ # is T-001's second lesson and the reason `--framing` exists at all.
6
+ #
7
+ # THE ROW ORDER IS PART OF THE ARTIFACT. `checklist resolve --framing` groups
8
+ # by a probe's `applies-to` scope and keeps FILE ORDER inside a scope, so the
9
+ # first probe of the `fix-round` scope is the first one written here. That is
10
+ # how CLAUDE.md's "the reviewer's FIRST check is item 3" becomes falsifiable
11
+ # rather than a comment (criterion 4d).
12
+ #
13
+ # DR-0027 narrows what a finding is worth: a review that cannot name the
14
+ # shipped behaviour at risk has found nothing worth a round.
15
+ kind: checklist
16
+ id: clean-room
17
+ applies-to: >-
18
+ one phase's pull request, read against the plan and the diff alone, by a
19
+ reviewer who did not write the code and has not read the implementer's
20
+ narrative of it.
21
+
22
+ probes:
23
+ # R-057b, and the FIX-ROUND PROBES COME FIRST IN THE FILE (D-M3-30).
24
+ # CLAUDE.md's fix-round contract says in terms that "the reviewer's FIRST
25
+ # check is item 3", item 3 being what the derivation did NOT cover. Position,
26
+ # not a comment: the `fix-round` framing takes the first probe of this scope.
27
+ - id: fix-round-not-covered
28
+ probe: >-
29
+ What regions did the round's derivation NOT cover, and why? Read
30
+ `fix-round.not-covered` in the work history and name the excluded
31
+ regions. A search whose scope is wrong returns an empty result that is
32
+ indistinguishable from an absence of defects, and this project has been
33
+ bitten by that three times: state/session.lock probed when the lease is
34
+ state/orchestrator.lock; an inventory scoped to tasks/, state/ and
35
+ worktrees/ while the missed path sat at the fleet root; a usage error
36
+ read as a clean result. If the field is absent or says nothing was
37
+ excluded, that is the finding.
38
+ applies-to: fix-round
39
+ evidence-required: true
40
+
41
+ - id: fix-round-mechanism-named
42
+ probe: >-
43
+ Is the round's stated `mechanism` a MECHANISM or the finding restated?
44
+ "A FIFO at the beacon hangs the guard" is a finding. "Reading a path
45
+ whose type has not been established" is the mechanism. A round that
46
+ fixed the instance the reviewer named, when the defect was the
47
+ mechanism, is the shape that consumed roughly a third of M1's elapsed
48
+ time. Quote the field and say which of the two it is.
49
+ applies-to: fix-round
50
+ evidence-required: true
51
+
52
+ - id: fix-round-derivation-published
53
+ probe: >-
54
+ Is the derivation's FULL output present, or a summary of it? The
55
+ contract asks for the exact command that enumerates every call site of
56
+ the mechanism and its complete output, because a summary is where a call
57
+ site the author did not think mattered stops being visible.
58
+ applies-to: fix-round
59
+ evidence-required: true
60
+
61
+ - id: deviation-judged-by-reviewer
62
+ probe: >-
63
+ For each deviation declared in the work history's `deviations[]`, judge
64
+ it yourself against the plan's intent and record the judgement. R-057b's
65
+ words are "judged, never assumed by the implementer": the implementer's
66
+ reason for a deviation is an input to your judgement, not a substitute
67
+ for it. Name every declared deviation, including the ones you agree with.
68
+ applies-to: deviations
69
+ evidence-required: true
70
+
71
+ # R-053. Each acceptance criterion quoted, with file:line evidence and a
72
+ # met-or-not-met verdict. The completeness of this walk is not left to the
73
+ # reviewer's memory: the verdict schema's `criteria[]` carries one entry per
74
+ # criterion and `verdict-criteria-complete` compares it against the plan.
75
+ - id: criteria-walked-with-evidence
76
+ probe: >-
77
+ Quote each acceptance criterion of the phase VERBATIM from the plan,
78
+ cite the file and line that discharges it, and record met or not-met.
79
+ A criterion discharged by a CI-deferred reason is not-met with that
80
+ reason recorded; a criterion you could not evaluate is not-met, never
81
+ omitted.
82
+ applies-to: criteria-walk
83
+ evidence-required: true
84
+
85
+ - id: criteria-none-silently-dropped
86
+ probe: >-
87
+ Does the phase's plan section carry an acceptance criterion that your
88
+ walk has no entry for? Count the criteria in the plan and the entries in
89
+ your walk, and name any difference. A review that quietly skipped a
90
+ criterion is the shape `verdict-criteria-complete` exists against, and
91
+ this probe is what catches it before the check does.
92
+ applies-to: criteria-walk
93
+ evidence-required: true
94
+
95
+ # R-055 correctness probes. FIVE SEPARATE ENTRIES, not one "check the edge
96
+ # cases" row (criterion 3b). A single generic row is answerable without
97
+ # opening anything, which is exactly the hazard class this phase names.
98
+ - id: correctness-negative-values
99
+ probe: >-
100
+ What does each changed function do with a NEGATIVE number where the
101
+ caller passes a count, a size, an index or a duration? Name the input
102
+ you tried and the observed behaviour, not the behaviour you expect.
103
+ applies-to: changed-code
104
+ evidence-required: true
105
+
106
+ - id: correctness-zero
107
+ probe: >-
108
+ What does each changed path do at ZERO: zero rows, zero bytes, zero
109
+ matches, a zero-length list, a zero timeout? The process document's own
110
+ illustration is a report whose amount rows are all zero and which is
111
+ therefore indistinguishable from a report that measured nothing.
112
+ applies-to: changed-code
113
+ evidence-required: true
114
+
115
+ - id: correctness-empty
116
+ probe: >-
117
+ What does each changed path do with EMPTY input: an empty string, an
118
+ empty array, an empty file, an absent optional field? Say which of those
119
+ the diff actually reaches and which it does not.
120
+ applies-to: changed-code
121
+ evidence-required: true
122
+
123
+ - id: correctness-unicode
124
+ probe: >-
125
+ What does each changed path do with non-ASCII text: multi-byte
126
+ characters, combining marks, a right-to-left run, a character whose
127
+ UTF-16 length differs from its codepoint count? Name the string you
128
+ tried.
129
+ applies-to: changed-code
130
+ evidence-required: true
131
+
132
+ - id: correctness-state-that-cannot-exit
133
+ probe: >-
134
+ Is there a state this change can enter and NOT LEAVE: a wait with no
135
+ timeout, a retry with no ceiling, a lease that cannot be broken, a queue
136
+ entry nothing dequeues, a status no transition moves off? Name the state
137
+ and the transition that is missing, or name the exit and cite it.
138
+ applies-to: changed-code
139
+ evidence-required: true
140
+
141
+ # R-055 continued, D-M3-26 and T-003's structural consequence 4. This probe
142
+ # exists so the `destructive-authority` clause the implementer brief carries
143
+ # is JUDGED rather than merely written. Its third question is answerable from
144
+ # the diff and the manifest, which is why evidence is required.
145
+ - id: destructive-authority-declared
146
+ probe: >-
147
+ For every command in the diff that can destroy work, answer all three:
148
+ (1) does the command's OWN contract state that it holds destructive
149
+ authority, in its own documentation rather than in a caller's; (2) are
150
+ its force semantics INHERITED from a caller rather than declared here,
151
+ which is how a command becomes destructive without any document saying
152
+ so; and (3) does the command appear in `gates.manifest.json`'s
153
+ `destructiveCommands` list? Open the manifest and quote the list. No
154
+ script can judge (1) or (2); (3) is M2's computable list and this probe
155
+ is you reading it rather than re-deriving it.
156
+ applies-to: destructive-command
157
+ evidence-required: true
158
+
159
+ # R-056a test-honesty probes. The accepted proof for the revert question is
160
+ # the M2-P2 red-witness harness's own evidence file, not the implementer's
161
+ # assertion that a test would have failed.
162
+ - id: test-red-without-the-fix
163
+ probe: >-
164
+ Would each new test FAIL if the fix were reverted? The accepted proof is
165
+ the red-witness harness's captured evidence file for that behaviour
166
+ (`witness-records.json`, whose per-member `runs[].exitCode` and
167
+ `failedNamedTests` record what actually ran), not a sentence in the work
168
+ history saying it was checked. Cite the record. Where the behaviour is
169
+ guarded against a DANGEROUS STATE rather than an absent feature, say
170
+ which state the member encodes.
171
+ applies-to: test-honesty
172
+ evidence-required: true
173
+
174
+ - id: test-asserts-behavior-not-implementation
175
+ probe: >-
176
+ Does each new assertion test BEHAVIOUR or an implementation detail?
177
+ An assertion on a private helper's name, on call order, on a log string
178
+ the program does not promise, or on the exact spelling of an internal
179
+ flag passes while the behaviour rots. Name the assertion and the
180
+ observable it stands for.
181
+ applies-to: test-honesty
182
+ evidence-required: true
183
+
184
+ - id: fence-catches-its-named-failure
185
+ probe: >-
186
+ Does each guard, gate or fence in the diff catch the failure mode it is
187
+ NAMED for? Construct the failure the name promises and run the guard
188
+ against it. A guard whose condition does not test the property that
189
+ matters is green and worthless; this repository has shipped one that
190
+ tested a report file's EXISTENCE while its name said freshness, and one
191
+ whose grep could not see the single byte it existed to catch.
192
+ applies-to: test-honesty
193
+ evidence-required: true
194
+
195
+ # T-006's two unexecuted-claim probes, under R-056a. T-006's finding is that
196
+ # its own reviewers caught all three instances BY INSTINCT, three times out
197
+ # of three, and instinct does not survive a reviewer change. That is exactly
198
+ # the case for an instruction rather than a norm.
199
+ - id: claim-impossibility-constructed
200
+ probe: >-
201
+ For every IMPOSSIBILITY claim, in the record's `claims[]` section and in
202
+ any prose the section does not declare ("cannot be", "impossible",
203
+ "there is no way to"), is the executed construction present? The
204
+ distinction that makes this different from the universal-claim probe:
205
+ a universal claim needs someone to try to FALSIFY it, an impossibility
206
+ claim needs someone to try to BUILD the thing. T-006's own reviewer
207
+ settled one in minutes with symlinkSync(p, p) raising ELOOP, where the
208
+ record had claimed the state could not be constructed without
209
+ privileges. Try to build it, and record the attempt either way.
210
+ applies-to: test-honesty
211
+ evidence-required: true
212
+
213
+ - id: claim-coverage-constructed
214
+ probe: >-
215
+ For every COVERAGE claim ("is covered", "catches", "would catch",
216
+ "recovers", "handles that anyway"), is the executed construction
217
+ present? A coverage claim is settled by CONSTRUCTING the case said to be
218
+ covered and running it, never by reading the guard and agreeing with it.
219
+ T-006 records that the universal-quantifier rule already in the plan
220
+ would have caught NONE of the three false claims M1-P5 produced, because
221
+ impossibility, coverage and remedy claims are existential and causal
222
+ rather than universal.
223
+ applies-to: test-honesty
224
+ evidence-required: true
225
+
226
+ # CLAUDE.md's one-witness-is-not-a-class rule, under R-056a.
227
+ - id: class-witness-has-two-members
228
+ probe: >-
229
+ For any test the record presents as guarding a CLASS rather than one
230
+ instance, have at least TWO structurally different members of that class
231
+ been demonstrated red? M1-P6 produced two consecutive medium findings
232
+ from this alone: one defang reddened a guard test and three others left
233
+ it green, and the round after repeated the mistake one abstraction up.
234
+ Name the two members and say how they differ structurally, not just in
235
+ their values.
236
+ applies-to: test-honesty
237
+ evidence-required: true
238
+
239
+ # R-059, the blast-radius probes, described by the process document as the
240
+ # single best question in it. NAMES A SEARCH ACTION (criterion 3b): the probe
241
+ # tells you the command to run, so it cannot be answered from memory.
242
+ - id: blast-radius-consumers
243
+ probe: >-
244
+ Who else reads what this change writes? Run the search rather than
245
+ recalling it: grep the repository for every exported name the diff
246
+ changed, for every file path it writes, and for every field name it adds
247
+ or renames, and paste the hit list. Then say, per hit, whether that
248
+ consumer still holds. An empty hit list is a result only if you show the
249
+ command that produced it.
250
+ applies-to: blast-radius
251
+ evidence-required: true
252
+
253
+ - id: blast-radius-behavior-under-old-callers
254
+ probe: >-
255
+ For each consumer the search found, does it still behave the same? Name
256
+ the call sites you opened, and the one you did NOT open and why. A
257
+ blast-radius answer whose scope is unstated is indistinguishable from an
258
+ absence of consumers.
259
+ applies-to: blast-radius
260
+ evidence-required: true
261
+
262
+ # R-093, the shared-consumer probe. Same shape: a search ACTION, not a bare
263
+ # question.
264
+ - id: shared-consumer-render-and-decide
265
+ probe: >-
266
+ Does any field the diff touches both RENDER and DECIDE? A field that
267
+ renders and decides is two fields. Search for each such field name
268
+ across the repository and split the hits into the sites that display it
269
+ and the sites that branch on it; if both sets are non-empty, that is the
270
+ finding, and the concrete fix names the two fields it should become.
271
+ Paste the search and the split.
272
+ applies-to: blast-radius
273
+ evidence-required: true
274
+
275
+ # The two gate-registry entries whose `verified-by` is `clean-room-checklist`
276
+ # (M3-P2, R-043 and R-044, D-11). Their probe ids are declared there and
277
+ # supplied here; `verifies-gate` is the back-reference that makes the
278
+ # checklist-to-registry direction computable (criterion 3c).
279
+ - id: unit-tests-for-changed-service-methods
280
+ probe: >-
281
+ Does every service method changed in this diff have a unit test that
282
+ exercises the changed behaviour? List the changed methods from the diff,
283
+ and for each name the test or say there is none. "Service method" is not
284
+ machine-enumerable, which is why this is a probe and not a script
285
+ (D-11); enumerating it is your half of the gate.
286
+ applies-to: gate-probe
287
+ evidence-required: true
288
+ verifies-gate: unit-tests-for-changed-service-methods
289
+
290
+ - id: fixtures-for-changed-component-states
291
+ probe: >-
292
+ Does every component state changed in this diff have a story or a
293
+ fixture? List the states the diff adds or alters, and for each name the
294
+ fixture or say there is none. Same reason as the probe above: a
295
+ component state is not machine-enumerable (D-11).
296
+ applies-to: gate-probe
297
+ evidence-required: true
298
+ verifies-gate: fixtures-for-changed-component-states
299
+
300
+ framings:
301
+ # T-001's two ACTUALLY EXERCISED entry points from the M1-P4 dual review,
302
+ # cited rather than invented. The two reviewers found different defects
303
+ # because they were given different starting questions.
304
+ - id: criteria-contract
305
+ entry-point: >-
306
+ Treat the plan's acceptance criteria as a contract the diff either meets
307
+ or does not. Start at criterion 1 and walk to the last one before you
308
+ form any opinion about the code.
309
+ orders-probes: [criteria-walk, changed-code, test-honesty, deviations, gate-probe]
310
+
311
+ - id: destructive-paths
312
+ entry-point: >-
313
+ Start from where this can destroy something, or claim a guarantee it
314
+ does not have. Find the destructive paths first and the criteria after.
315
+ orders-probes: [destructive-command, blast-radius, changed-code, test-honesty]
316
+
317
+ # D-M3-30. The framing a review OF A FIX ROUND is given. Its first resolved
318
+ # probe is the first `fix-round` probe in the file, which is
319
+ # `fix-round-not-covered`, which is CLAUDE.md's "the reviewer's FIRST check
320
+ # is item 3" expressed as position rather than as a comment.
321
+ - id: fix-round
322
+ entry-point: >-
323
+ This review is of a FIX ROUND. Before you examine any row, ask what the
324
+ derivation did not cover.
325
+ orders-probes: [fix-round, criteria-walk, test-honesty, changed-code]
@@ -0,0 +1,68 @@
1
+ # ENVIRONMENT-FAILURE DIAGNOSIS (kernel plan M3, M3-P7 step 4, R-050b).
2
+ #
3
+ # Run when a failure is about to be attributed to "the environment". R-050b's
4
+ # three words are byte-identical route, reproduced outside the runner, and
5
+ # never waved off; each is a probe below rather than a slogan, because an
6
+ # environmental attribution with no evidence behind it is the cheapest way to
7
+ # close a real defect.
8
+ kind: checklist
9
+ id: env-failure-diagnosis
10
+ applies-to: >-
11
+ a failure someone is about to call environmental: an end-to-end test red only
12
+ in CI, a step that passes locally, a toolchain or network difference.
13
+
14
+ probes:
15
+ - id: env-route-byte-identical
16
+ probe: >-
17
+ Is the failing route BYTE-IDENTICAL to the one that passes? Compare the
18
+ exact command line, the argument order, the environment variables the
19
+ child receives, the working directory, and the resolved absolute path of
20
+ every binary invoked. This repository has three Node versions installed
21
+ and which one you get depends on how the shell was started, so
22
+ `node --version` IN THE SHELL THAT RUNS THE COMMAND is part of the
23
+ route, not context. Paste both routes side by side and name every
24
+ difference, including the ones you judge irrelevant.
25
+ applies-to: route
26
+ evidence-required: true
27
+
28
+ - id: env-reproduced-outside-the-runner
29
+ probe: >-
30
+ Has the failure been reproduced OUTSIDE the runner? Construct the same
31
+ conditions locally, or in a container, and record the invocation and the
32
+ exit code. A failure that reproduces outside the runner is not
33
+ environmental. A failure that does not reproduce is not thereby
34
+ environmental either; it is unexplained, and saying so is the honest
35
+ form.
36
+ applies-to: reproduce
37
+ evidence-required: true
38
+
39
+ - id: env-difference-named-not-assumed
40
+ probe: >-
41
+ Which specific environmental difference is being blamed, and what is the
42
+ evidence that it CAUSES this failure? Name the variable, version, path,
43
+ clock, filesystem or network behaviour, show its value on both sides,
44
+ and show the causal step. "It is the environment" names nothing and can
45
+ therefore never be wrong, which is why it is so often reached for.
46
+ applies-to: reproduce
47
+ evidence-required: true
48
+
49
+ - id: env-never-waved-off
50
+ probe: >-
51
+ If the diagnosis is inconclusive, is that written down as inconclusive
52
+ and tracked, rather than closed as environmental? R-050b's rule is that
53
+ an environmental failure is diagnosed with evidence and NEVER waved off.
54
+ An unexplained failure recorded as unexplained is a lead the next reader
55
+ can pick up; the same failure recorded as environmental is one nobody
56
+ looks at again.
57
+ applies-to: record
58
+ evidence-required: true
59
+
60
+ - id: env-both-ci-arms-considered
61
+ probe: >-
62
+ Does this workflow fork on the CI event, and if so was the OTHER arm
63
+ examined? A gate result is evidence only for the configuration it ran
64
+ under, so a failure seen on one event says nothing about the other, and
65
+ an arm nobody witnesses is the one that breaks. Name the event and the
66
+ head sha of every run you read.
67
+ applies-to: route
68
+ evidence-required: true
@@ -0,0 +1,68 @@
1
+ # THE FLAKE PLAYBOOK (kernel plan M3, M3-P7 step 4, R-066).
2
+ #
3
+ # Run when CI goes red and the first instinct is to re-kick it. The ordering
4
+ # is the content: EXTRACT before you JUDGE, and judge before you re-kick,
5
+ # because a real bug looks identical to a flake until you read the log.
6
+ #
7
+ # The three-consecutive-reds threshold named in `flake-three-consecutive-reds`
8
+ # is R-067's policy clause, which M3-P9 states in `AGENTS.md`. It is repeated
9
+ # in the probe text rather than referenced, because a threshold a reader has to
10
+ # go and look up is a threshold that gets rounded to "a few".
11
+ kind: checklist
12
+ id: flake-playbook
13
+ applies-to: >-
14
+ a red CI run that the orchestrator suspects is a flake rather than a defect,
15
+ read before any re-kick.
16
+
17
+ probes:
18
+ - id: flake-failure-extracted
19
+ probe: >-
20
+ Extract the actual failure from the log: the failing test name, the
21
+ assertion text, the exit code, and the step that produced it. Paste
22
+ them. "The suite went red" is not an extraction, and a re-kick decided
23
+ from it is a coin toss with a plausible story attached.
24
+ applies-to: extract
25
+ evidence-required: true
26
+
27
+ - id: flake-pattern-judged-against-local-run
28
+ probe: >-
29
+ Run the same test locally and compare the FAIL PATTERN, not the fact of
30
+ failing. Does it fail locally, does it fail on the same assertion, does
31
+ it fail at the same rate? A test that is green locally and red in CI is
32
+ an environment difference to name, never a flake to assume. Record the
33
+ local invocation, its exit code, and the pass and SKIPPED counts, since
34
+ a skipped test is not a passing test.
35
+ applies-to: judge
36
+ evidence-required: true
37
+
38
+ - id: flake-signature-known-or-unknown
39
+ probe: >-
40
+ Is this failure's SIGNATURE known? A known signature is one already
41
+ recorded with its assertion text and its measured rate, and a known
42
+ signature is the only thing that licenses a re-kick. An UNKNOWN
43
+ signature means investigate first: a real bug looks identical to a flake
44
+ until you read the log, which is the whole reason this list is ordered
45
+ this way. Say which of the two this is and cite the record if known.
46
+ applies-to: judge
47
+ evidence-required: true
48
+
49
+ - id: flake-three-consecutive-reds
50
+ probe: >-
51
+ How many consecutive reds has this same signature produced? At THREE
52
+ CONSECUTIVE REDS from the same flake, stop re-kicking: fix the flake
53
+ first and promote its fix to next in the queue (R-067). Count them and
54
+ state the count. A counter kept in a reviewer's head resets every time
55
+ the reviewer changes, which is why the number is asked for here rather
56
+ than assumed to be remembered.
57
+ applies-to: judge
58
+ evidence-required: true
59
+
60
+ - id: flake-recorded-with-its-rate
61
+ probe: >-
62
+ If this is a flake, is its measured RATE recorded, in the form "about 1
63
+ run in N", together with the test name and the assertion? An unrecorded
64
+ flake is one every later agent re-investigates from nothing, and the
65
+ rate is what makes the next reader able to tell a worsening flake from
66
+ the same one.
67
+ applies-to: record
68
+ evidence-required: true
@@ -0,0 +1,144 @@
1
+ # THE HAZARD REVIEW CONTRACT (kernel plan M3, M3-P7 step 3d; T-007, D-M3-32).
2
+ #
3
+ # T-007's structural consequence is that the SECOND review contract must be a
4
+ # declared artifact rather than something whoever writes the dispatch prompt
5
+ # remembers. M3-P6 ships the brief that says which contract a reviewer is
6
+ # running; this file is that contract's probe list.
7
+ #
8
+ # ITS PROBES ARE DERIVED FROM THE PHASE'S `hazard-classes[]`, NOT FROM ITS
9
+ # ACCEPTANCE CRITERIA, and it deliberately does NOT restate the criteria
10
+ # probes. A hazard checklist that is the criteria checklist reworded
11
+ # reproduces T-007's exact failure while appearing to fix it, which is why
12
+ # `test/checklists.test.ts` asserts this file's probe-id set is DISJOINT from
13
+ # `checklists/clean-room.yaml`'s and fails naming any shared id.
14
+ #
15
+ # T-007's own measurement: a phase met fifteen of fifteen executed criteria
16
+ # while live-locking every supervision command, and the reviewer who found it
17
+ # differed in its BRIEF, not in its model.
18
+ #
19
+ # THE FIRST PROBE IS `hazard-classes-addressed` BY POSITION, and the resolved
20
+ # list with no framing keeps file order, so first here is first there.
21
+ kind: checklist
22
+ id: hazard-review
23
+ applies-to: >-
24
+ the same head a criteria review is walking, given to a second reviewer whose
25
+ starting question is what this can block, lose, never exit or destroy.
26
+
27
+ probes:
28
+ - id: hazard-classes-addressed
29
+ probe: >-
30
+ Walk the phase's declared `hazard-classes[]` one at a time and produce
31
+ one statement per class: either a finding it caused, or what you probed
32
+ and why the class is cleared. Not one statement for the set. This is the
33
+ completeness rule the verdict schema's `hazard-classes-addressed[]`
34
+ carries and `verdict-hazard-classes-addressed` compares against the plan
35
+ phase, so a class you silently skip is a red gate rather than an
36
+ omission nobody notices.
37
+ applies-to: hazard-classes
38
+ evidence-required: true
39
+
40
+ # The four canonical questions T-007 names as the hazard family. Each names a
41
+ # CONSTRUCTION rather than asking a bare question, because "did you consider
42
+ # blocking" is answerable from an armchair and "did you mkfifo the path"
43
+ # is not.
44
+ - id: hazard-what-can-block
45
+ probe: >-
46
+ What in this change can BLOCK forever? Build the blocking state and run
47
+ the code at it: `mkfifo` a path the change opens for reading, point it
48
+ at a file on a filesystem that does not answer, hand it a descriptor
49
+ nothing writes to. A read of a path whose type has not been established
50
+ is the mechanism; name every call site of it, not the one instance you
51
+ found. Paste the construction and what the program did.
52
+ applies-to: hazard-family
53
+ evidence-required: true
54
+
55
+ - id: hazard-what-can-be-lost
56
+ probe: >-
57
+ What can be LOST? Kill the process mid-write, with SIGKILL rather than a
58
+ handler-friendly signal, at the moment the change is rewriting a file,
59
+ renaming one, or holding data only in memory. Then read what is on disk.
60
+ Name the window between the last durable state and the next one, and say
61
+ what a reader finds inside it.
62
+ applies-to: hazard-family
63
+ evidence-required: true
64
+
65
+ - id: hazard-what-can-never-exit
66
+ probe: >-
67
+ What can NEVER EXIT? Force the contention rather than reasoning about
68
+ it: run two writers against one lease, two clones against one ref, two
69
+ acquirers against one lock, and let them race for real. A concurrency
70
+ path where no contention can occur is green, registered and worthless.
71
+ Record the observed stderr from the real collision rather than a
72
+ hand-written example of it, because a retry signature derived from an
73
+ imagined message matches nothing.
74
+ applies-to: hazard-family
75
+ evidence-required: true
76
+
77
+ - id: hazard-what-can-destroy
78
+ probe: >-
79
+ What can DESTROY work? Run the destructive path against a branch
80
+ carrying COMMITTED UNPUSHED WORK, not against an empty branch, and see
81
+ whether that work survives. A destroy exercised on a branch carrying
82
+ nothing is the red-witness rule's own counter-example: it passes, it is
83
+ registered, and it guards nothing. Then say whether the command's own
84
+ contract declares that authority, or inherits force semantics from a
85
+ caller.
86
+ applies-to: hazard-family
87
+ evidence-required: true
88
+
89
+ # FOUR MORE CANONICAL PROBES (revision 3, section 2.6). Each exists because a
90
+ # hazard-class row in some phase's map defers to the hazard reviewer, and
91
+ # section 2.6 forbids a deferral that names no instrument. These are the
92
+ # named instruments.
93
+ - id: c2-liveness-vocabulary
94
+ probe: >-
95
+ Does any stage, clause or duty in the artifact define COMPLETION in
96
+ terms of a process being alive, in any wording? Constraint C-2 forbids
97
+ pid, process liveness, signals and /proc for identity or exclusion;
98
+ liveness is lease freshness. The grep for those four tokens finds the
99
+ spellings someone thought of, and this probe is for the ones nobody did.
100
+ The contrast to look for: "the stage completes when the agent finishes"
101
+ against "the stage completes when the lease is renewed past T". Quote
102
+ every clause you judged and say which side of that line it falls on.
103
+ Covers `assurance-modes.yaml`, `AGENTS.md` and every file under
104
+ `roles/`.
105
+ applies-to: declared-process-document
106
+ evidence-required: true
107
+
108
+ - id: clause-text-matches-row
109
+ probe: >-
110
+ For each clause id the clause map resolves, does the TEXT under that
111
+ heading discharge the requirement row it is mapped to, or say something
112
+ weaker? The clause map proves PRESENCE and never content: it checks that
113
+ the id occurs in the named artifact, so a heading with a sentiment under
114
+ it passes exactly as a heading with a rule under it does. Quote the
115
+ clause text and the row side by side for every mapped clause in the
116
+ diff, and name any pair where the clause is the softer of the two.
117
+ applies-to: declared-process-document
118
+ evidence-required: true
119
+
120
+ - id: honest-failure-substance
121
+ probe: >-
122
+ Does each `honest-failures[]` entry's `cause`, `exposure-window` and
123
+ `structural-fix` say something a READER COULD ACT ON? The schema makes
124
+ those fields non-empty and non-whitespace and can do no more, so an
125
+ entry reading "cause: a bug; exposure-window: some time;
126
+ structural-fix: fixed it" is structurally complete and semantically
127
+ empty. Quote each field and say what a reader could do with it.
128
+ applies-to: honesty-contract
129
+ evidence-required: true
130
+
131
+ - id: contract-avoidance
132
+ probe: >-
133
+ Did any record in this phase route AROUND a required field rather than
134
+ filling it? The three shapes seen here: a `claims[]` section left empty
135
+ while the prose makes an impossibility claim; a `fix-round` block absent
136
+ from a round that demonstrably happened; a deviation described in a
137
+ narrative paragraph rather than declared in `deviations[]`. This is the
138
+ probe for the hazard nobody can fixture, that a schema can make an
139
+ honest record MORE EXPENSIVE to write than a dishonest one, because that
140
+ is a property of the ratio between two authoring costs and no single
141
+ instance exhibits it. Read the prose against the structure and name
142
+ every place they disagree.
143
+ applies-to: honesty-contract
144
+ evidence-required: true