@tiphys/kernel 0.0.0 → 0.1.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.
- package/AGENTS.md +611 -0
- package/LICENSE +202 -0
- package/assurance-modes.yaml +278 -0
- package/checklists/clean-room.yaml +325 -0
- package/checklists/env-failure-diagnosis.yaml +68 -0
- package/checklists/flake-playbook.yaml +68 -0
- package/checklists/hazard-review.yaml +144 -0
- package/checklists/plan-review.yaml +103 -0
- package/dist/bin/tiphys.d.ts +2 -0
- package/dist/bin/tiphys.js +14 -0
- package/dist/src/brief.d.ts +32 -0
- package/dist/src/brief.js +59 -0
- package/dist/src/checklists.d.ts +169 -0
- package/dist/src/checklists.js +310 -0
- package/dist/src/checks.d.ts +828 -0
- package/dist/src/checks.js +3314 -0
- package/dist/src/cli.d.ts +9 -0
- package/dist/src/cli.js +57 -0
- package/dist/src/commands/brief.d.ts +92 -0
- package/dist/src/commands/brief.js +320 -0
- package/dist/src/commands/checklist.d.ts +42 -0
- package/dist/src/commands/checklist.js +168 -0
- package/dist/src/commands/doctor.d.ts +35 -0
- package/dist/src/commands/doctor.js +605 -0
- package/dist/src/commands/gates.d.ts +9 -0
- package/dist/src/commands/gates.js +360 -0
- package/dist/src/commands/init.d.ts +30 -0
- package/dist/src/commands/init.js +128 -0
- package/dist/src/commands/lock.d.ts +1 -0
- package/dist/src/commands/lock.js +229 -0
- package/dist/src/commands/mode.d.ts +40 -0
- package/dist/src/commands/mode.js +134 -0
- package/dist/src/commands/plan.d.ts +20 -0
- package/dist/src/commands/plan.js +105 -0
- package/dist/src/commands/pool.d.ts +1 -0
- package/dist/src/commands/pool.js +128 -0
- package/dist/src/commands/spawn.d.ts +1 -0
- package/dist/src/commands/spawn.js +146 -0
- package/dist/src/commands/status.d.ts +19 -0
- package/dist/src/commands/status.js +120 -0
- package/dist/src/commands/teardown.d.ts +1 -0
- package/dist/src/commands/teardown.js +79 -0
- package/dist/src/commands/tuition.d.ts +21 -0
- package/dist/src/commands/tuition.js +218 -0
- package/dist/src/commands/validate.d.ts +78 -0
- package/dist/src/commands/validate.js +360 -0
- package/dist/src/commands/watch.d.ts +1 -0
- package/dist/src/commands/watch.js +172 -0
- package/dist/src/exec/env.d.ts +128 -0
- package/dist/src/exec/env.js +190 -0
- package/dist/src/fleet.d.ts +51 -0
- package/dist/src/fleet.js +80 -0
- package/dist/src/gates/adapters/http-json.d.ts +5 -0
- package/dist/src/gates/adapters/http-json.js +283 -0
- package/dist/src/gates/adapters/migrations-command.d.ts +1 -0
- package/dist/src/gates/adapters/migrations-command.js +373 -0
- package/dist/src/gates/citations.d.ts +408 -0
- package/dist/src/gates/citations.js +1163 -0
- package/dist/src/gates/coverage.d.ts +284 -0
- package/dist/src/gates/coverage.js +701 -0
- package/dist/src/gates/credentials.d.ts +74 -0
- package/dist/src/gates/credentials.js +533 -0
- package/dist/src/gates/deploy.d.ts +1 -0
- package/dist/src/gates/deploy.js +33 -0
- package/dist/src/gates/manifest.d.ts +99 -0
- package/dist/src/gates/manifest.js +208 -0
- package/dist/src/gates/migrations.d.ts +1 -0
- package/dist/src/gates/migrations.js +36 -0
- package/dist/src/gates/pin.d.ts +114 -0
- package/dist/src/gates/pin.js +154 -0
- package/dist/src/gates/red-witness.d.ts +22 -0
- package/dist/src/gates/red-witness.js +390 -0
- package/dist/src/gates/release.d.ts +283 -0
- package/dist/src/gates/release.js +820 -0
- package/dist/src/gates/result.d.ts +116 -0
- package/dist/src/gates/result.js +91 -0
- package/dist/src/gates/run.d.ts +566 -0
- package/dist/src/gates/run.js +1536 -0
- package/dist/src/gates/schemas/citation-config.schema.json +59 -0
- package/dist/src/gates/schemas/coverage-config.schema.json +77 -0
- package/dist/src/gates/schemas/gate-manifest.schema.json +125 -0
- package/dist/src/gates/schemas/gate-result.schema.json +160 -0
- package/dist/src/gates/schemas/phase-declaration.schema.json +42 -0
- package/dist/src/gates/schemas/release-record.schema.json +119 -0
- package/dist/src/gates/schemas/verifier-config.schema.json +101 -0
- package/dist/src/gates/schemas/witness-spec.schema.json +110 -0
- package/dist/src/gates/scope.d.ts +131 -0
- package/dist/src/gates/scope.js +1018 -0
- package/dist/src/gates/suite.d.ts +217 -0
- package/dist/src/gates/suite.js +927 -0
- package/dist/src/gates/validate.d.ts +121 -0
- package/dist/src/gates/validate.js +414 -0
- package/dist/src/hooks.d.ts +32 -0
- package/dist/src/hooks.js +62 -0
- package/dist/src/liveness.d.ts +321 -0
- package/dist/src/liveness.js +396 -0
- package/dist/src/lock.d.ts +178 -0
- package/dist/src/lock.js +500 -0
- package/dist/src/modes.d.ts +149 -0
- package/dist/src/modes.js +258 -0
- package/dist/src/path-identity.d.ts +2 -0
- package/dist/src/path-identity.js +10 -0
- package/dist/src/plan.d.ts +73 -0
- package/dist/src/plan.js +153 -0
- package/dist/src/pool.d.ts +130 -0
- package/dist/src/pool.js +721 -0
- package/dist/src/roles.d.ts +430 -0
- package/dist/src/roles.js +734 -0
- package/dist/src/spawn.d.ts +177 -0
- package/dist/src/spawn.js +332 -0
- package/dist/src/status.d.ts +91 -0
- package/dist/src/status.js +119 -0
- package/dist/src/task.d.ts +264 -0
- package/dist/src/task.js +305 -0
- package/dist/src/teardown.d.ts +32 -0
- package/dist/src/teardown.js +314 -0
- package/dist/src/tuition.d.ts +159 -0
- package/dist/src/tuition.js +311 -0
- package/dist/src/validate.d.ts +230 -0
- package/dist/src/validate.js +732 -0
- package/dist/src/version.d.ts +3 -0
- package/dist/src/version.js +38 -0
- package/dist/src/watcher.d.ts +275 -0
- package/dist/src/watcher.js +859 -0
- package/dist/src/witness/run.d.ts +274 -0
- package/dist/src/witness/run.js +1327 -0
- package/dist/src/witness/spec.d.ts +102 -0
- package/dist/src/witness/spec.js +253 -0
- package/dist/tsconfig.src.tsbuildinfo +1 -0
- package/gate-registry.yaml +390 -0
- package/gates.manifest.json +195 -0
- package/package.json +57 -3
- package/role-model-config.yaml +88 -0
- package/roles/README.md +128 -0
- package/roles/_shared-dispatch-contract.md +87 -0
- package/roles/adversarial-plan-reviewer.md +80 -0
- package/roles/clean-room-reviewer.md +140 -0
- package/roles/implementer.md +460 -0
- package/roles/investigator.md +138 -0
- package/roles/plan-writer.md +95 -0
- package/schemas/README.md +81 -0
- package/schemas/assurance-modes.schema.json +264 -0
- package/schemas/charter.schema.json +166 -0
- package/schemas/checklist.schema.json +114 -0
- package/schemas/decision-record.schema.json +88 -0
- package/schemas/final-report.schema.json +90 -0
- package/schemas/finding.schema.json +106 -0
- package/schemas/gate-registry.schema.json +260 -0
- package/schemas/mechanism-index.schema.json +94 -0
- package/schemas/plan.schema.json +300 -0
- package/schemas/report.schema.json +579 -0
- package/schemas/role-brief.schema.json +105 -0
- package/schemas/role-model-config.schema.json +90 -0
- package/schemas/status-line.schema.json +40 -0
- package/schemas/tuition.schema.json +191 -0
- package/schemas/verdict.schema.json +289 -0
- package/schemas/work-history.schema.json +183 -0
- package/templates/charter.example.yaml +54 -0
- package/templates/decision-record.example.yaml +27 -0
- package/templates/final-report.example.yaml +80 -0
- package/templates/plan.example.yaml +87 -0
- package/templates/report.example.yaml +236 -0
- package/templates/warnings.md +74 -0
- package/templates/work-history.example.yaml +185 -0
- package/tuition/README.md +76 -0
- package/tuition/T-001.yaml +48 -0
- package/tuition/T-002.yaml +51 -0
- package/tuition/T-003.yaml +100 -0
- package/tuition/T-004.yaml +52 -0
- package/tuition/T-005.yaml +72 -0
- package/tuition/T-006.yaml +81 -0
- package/tuition/T-007.yaml +56 -0
- package/tuition/T-008.yaml +111 -0
- package/tuition/T-009.yaml +50 -0
- package/tuition/T-015.yaml +36 -0
- package/tuition/T-016.yaml +36 -0
- package/tuition/T-017.yaml +46 -0
- package/tuition/T-018.yaml +84 -0
- package/tuition/T-021.yaml +40 -0
- package/tuition/T-022.yaml +36 -0
- package/tuition/mechanism-index.yaml +256 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/verdict.schema.json",
|
|
4
|
+
"title": "Tiphys clean-room review verdict",
|
|
5
|
+
"$comment": "R-053, R-057b, R-060, T-001, T-007. Kernel plan M3, M3-P7 steps 6 and 6a. THE OUTPUT OF A CLEAN-ROOM REVIEW, and the document that decides what a review is ALLOWED TO SAY. THE HAZARD THIS DOCUMENT EXISTS AGAINST is the phase's own last item: a verdict that admits APPROVE alongside an unaddressed hazard class. WHAT IT REACHES. (1) APPROVE beside a finding the review itself ranked high or critical, which is a review saying yes while recording a reason to say no, and is how a fix round gets skipped; the root `if`/`then` inverts it into the form the closed vocabulary can carry (schemas/README.md has no `not`): a set CONTAINING such a finding must carry the FIX-ROUND-NEEDED verdict. Stated deliberately WIDER than criterion 4(a), which names `high` alone: `critical` outranks it, and a rule that stopped at `high` would let the worse finding through. (2) A finding with no `concrete-fix`, on EVERY finding rather than on high ones, because a low finding with no proposed edit is a remark. (3) A verdict with no `produced-by` or no `framing`: DR-0012 condition 1 compares two reviews of one head on family AND entry point, and neither comparison is reachable from inside one document, so what is bought here is that neither field can be absent. (4) T-007's `review-contract`, and `hazard-classes-addressed[]` required exactly when the contract is `hazard`, through the `oneOf`. WHAT IT CANNOT REACH, each with its instrument. (a) Whether `criteria[]` covers every acceptance criterion of the phase: that is a comparison against a DIFFERENT document and is the Kind B check `verdict-criteria-complete`. (b) Same for `deviations-judged[]` against the work history's `deviations[]` (M3R-005), check `verdict-deviations-judged`. (c) Same for `hazard-classes-addressed[]` against the plan phase's `hazard-classes[]`, check `verdict-hazard-classes-addressed`. (d) Whether a `cleared-because` statement is true, or whether `met: true` was earned; those are the reviewer's judgement and no keyword reaches them. (e) ADDED IN FIX ROUND 2, and it is INTRA-document rather than cross-document, which is why it was missed: whether `hazard-classes-addressed[].finding` names a finding this document actually declares. It is the check `verdict-finding-references-resolve`, and what it protects is rule (1) above, which reads `findings[]` alone and is therefore blind to a finding recorded one field away.",
|
|
6
|
+
"description": "A clean-room review verdict: the decision, the findings behind it, and the three completeness arrays that say what the review actually walked.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"kind",
|
|
11
|
+
"phase",
|
|
12
|
+
"verdict",
|
|
13
|
+
"produced-by",
|
|
14
|
+
"framing",
|
|
15
|
+
"review-contract",
|
|
16
|
+
"findings",
|
|
17
|
+
"criteria",
|
|
18
|
+
"deviations-judged"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"kind": {
|
|
22
|
+
"$comment": "R-016's discriminator, so `tiphys validate --type auto` resolves this document without being told (M3R-001).",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"const": "verdict"
|
|
25
|
+
},
|
|
26
|
+
"phase": {
|
|
27
|
+
"$comment": "The plan phase this review is OF. Not decoration: it is the join key all three Kind B checks use to select the phase in `plan.yaml` and to confirm `work-history.yaml` is the right one. A verdict that named no phase would make every cross-document completeness rule unimplementable, which is the same reason the checklist probe carries `verifies-gate`.",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"pattern": "\\S"
|
|
31
|
+
},
|
|
32
|
+
"verdict": {
|
|
33
|
+
"$comment": "R-060's closed vocabulary, exactly two values. A third value such as 'approve with comments' is the shape that lets a fix round be skipped by wording, so the enum is the whole point of the field.",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["APPROVE", "FIX-ROUND-NEEDED"]
|
|
36
|
+
},
|
|
37
|
+
"produced-by": {
|
|
38
|
+
"$comment": "T-001: record in the review header which model family produced it. DR-0012 condition 1 requires the two clean-room reviews of one head to differ here, and that comparison is between two documents.",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"pattern": "\\S"
|
|
42
|
+
},
|
|
43
|
+
"framing": {
|
|
44
|
+
"$comment": "Step 6: which entry point this review was given, naming a `framings[].id` of the checklist it ran. T-001's second lesson is that decorrelation comes from the STARTING QUESTION rather than only from the reviewer, so a verdict that does not record its framing cannot be checked for decorrelation at all.",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
48
|
+
},
|
|
49
|
+
"review-contract": {
|
|
50
|
+
"$comment": "T-007, step 6a. Which of the two review CONTRACTS produced this verdict, mirroring the field the role brief carries (M3-P6). `scripts/check-dual-review.mjs` can then check contract distinctness alongside model-family and framing distinctness, which is T-007's point: the phase that met fifteen of fifteen criteria and live-locked every supervision command was caught by a reviewer that differed in its BRIEF, not in its model.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["criteria", "hazard"]
|
|
53
|
+
},
|
|
54
|
+
"findings": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"$ref": "#/$defs/finding"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"criteria": {
|
|
61
|
+
"$comment": "R-053: each acceptance criterion quoted, with file:line evidence and a met-or-not-met verdict. One entry per criterion; that it is EVERY criterion is Kind B.",
|
|
62
|
+
"type": "array",
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/$defs/criterionWalk"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"deviations-judged": {
|
|
69
|
+
"$comment": "R-057b, and M3R-005 is why it is an ARRAY rather than a probe question. 'Each declared deviation judged against the plan's intent by the reviewer, never assumed by the implementer' has exactly the same completeness shape as criteria coverage, and revision 0 had left it as a bare probe, so a reviewer could silently skip judging one of three declared deviations and every criterion still passed. Empty is legitimate: a phase can declare no deviation.",
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"$ref": "#/$defs/deviationJudgement"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"hazard-classes-addressed": {
|
|
76
|
+
"$comment": "T-007, step 6a. Required exactly when `review-contract` is `hazard`, by the `oneOf` below. One entry per class declared by the referenced plan phase; that it is EVERY class is Kind B, check `verdict-hazard-classes-addressed`, which has the shape `verdict-criteria-complete` has for criteria and for the same reason.",
|
|
77
|
+
"type": "array",
|
|
78
|
+
"minItems": 1,
|
|
79
|
+
"items": {
|
|
80
|
+
"$ref": "#/$defs/hazardClassAddressed"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"if": {
|
|
85
|
+
"$comment": "THE DANGEROUS INSTANCE, criterion 4(a), inverted into the closed vocabulary's reach. The rule wanted is APPROVE implies no high finding, and the direct spelling needs `not`, which schemas/README.md does not permit. `contains` matches the NON-empty case, which is the polarity that works here: a set that CONTAINS a finding the review itself ranked high or critical is a set whose verdict must be FIX-ROUND-NEEDED. `type: array` is restated inside because ajv 8.20.0 under `strict: true` refuses `contains` in a subschema that has not declared its type at the same level.",
|
|
86
|
+
"properties": {
|
|
87
|
+
"findings": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"contains": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["severity"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"severity": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": ["high", "critical"]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"then": {
|
|
103
|
+
"$comment": "So APPROVE beside a high or critical finding fails HERE, naming the verdict field. Restated in `properties` at this level because a bare `enum` under a name ajv cannot see declared is a compilation error under strictTypes.",
|
|
104
|
+
"properties": {
|
|
105
|
+
"verdict": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": ["FIX-ROUND-NEEDED"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"oneOf": [
|
|
112
|
+
{
|
|
113
|
+
"$comment": "Branch A, the criteria contract. `hazard-classes-addressed` is not required, and criterion 4e asserts a `criteria` verdict is unaffected by the hazard completeness check as well, so the rule applies exactly where the contract applies and nowhere else.",
|
|
114
|
+
"properties": {
|
|
115
|
+
"review-contract": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"const": "criteria"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"$comment": "Branch B, the hazard contract (T-007). `review-contract` and `hazard-classes-addressed` are BOTH restated in a sibling `properties` here, which is not redundancy: measured against ajv 8.20.0 under this validator's `strict: true`, a `required` naming a property not declared in `properties` at the same level fails COMPILATION under strictRequired. The two branches are discriminated by a `const` on one field, so exactly one can ever match and `oneOf` is an exclusive choice rather than an ambiguity.",
|
|
123
|
+
"required": ["hazard-classes-addressed"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"review-contract": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"const": "hazard"
|
|
128
|
+
},
|
|
129
|
+
"hazard-classes-addressed": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"minItems": 1
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"$defs": {
|
|
137
|
+
"finding": {
|
|
138
|
+
"$comment": "R-060: severity-ranked, a concrete fix each. Ranked low < medium < high < critical, the same four names schemas/finding.schema.json and schemas/plan.schema.json use, so the kernel carries one severity vocabulary rather than three.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": ["id", "severity", "evidence", "concrete-fix"],
|
|
142
|
+
"properties": {
|
|
143
|
+
"id": {
|
|
144
|
+
"$comment": "The stable id the arbitration and the fix round cite. CLAUDE.md owns the scheme (CR-nnn for a clean-room finding on a PR); this schema does not pick one.",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1,
|
|
147
|
+
"pattern": "\\S"
|
|
148
|
+
},
|
|
149
|
+
"severity": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": ["low", "medium", "high", "critical"]
|
|
152
|
+
},
|
|
153
|
+
"evidence": {
|
|
154
|
+
"$comment": "Evidence beats assertion: exit codes, counts, paths with line numbers, captured output. `minItems: 1` because a finding with no evidence is an opinion, and this repository treats a claim with no verifiable artifact behind it as unknown.",
|
|
155
|
+
"type": "array",
|
|
156
|
+
"minItems": 1,
|
|
157
|
+
"items": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"minLength": 1,
|
|
160
|
+
"pattern": "\\S"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"concrete-fix": {
|
|
164
|
+
"$comment": "Criterion 4(b) names a FIX-ROUND-NEEDED finding with no concrete fix as the dangerous instance. Required on EVERY finding regardless of verdict or severity, which is deliberately stronger: a review made of remarks is the empty review with extra steps. DR-0027 sharpens what a fix should say, since a finding that cannot name the shipped behaviour at risk has found nothing worth a round.",
|
|
165
|
+
"type": "string",
|
|
166
|
+
"minLength": 1,
|
|
167
|
+
"pattern": "\\S"
|
|
168
|
+
},
|
|
169
|
+
"analysis": {
|
|
170
|
+
"$comment": "The argument behind one finding, which is not enumerable and therefore lives inside a field rather than becoming structure (section 1.5). Optional, non-empty when present.",
|
|
171
|
+
"type": "string",
|
|
172
|
+
"minLength": 1,
|
|
173
|
+
"pattern": "\\S"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"criterionWalk": {
|
|
178
|
+
"$comment": "R-053, one acceptance criterion walked.",
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"required": ["id", "quote", "evidence", "met"],
|
|
182
|
+
"properties": {
|
|
183
|
+
"id": {
|
|
184
|
+
"$comment": "The `acceptance[].id` of the criterion in the referenced plan phase. This is the join key `verdict-criteria-complete` compares; a walk keyed only by its quoted text could not be compared to anything without matching prose.",
|
|
185
|
+
"type": "string",
|
|
186
|
+
"minLength": 1,
|
|
187
|
+
"pattern": "\\S"
|
|
188
|
+
},
|
|
189
|
+
"quote": {
|
|
190
|
+
"$comment": "R-053 says QUOTED, so the reviewer has read the criterion rather than the id. The schema cannot check that the quote matches the plan's text; it can require that something was quoted.",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"minLength": 1,
|
|
193
|
+
"pattern": "\\S"
|
|
194
|
+
},
|
|
195
|
+
"evidence": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"minItems": 1,
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1,
|
|
201
|
+
"pattern": "\\S"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"met": {
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"deviationJudgement": {
|
|
210
|
+
"$comment": "R-057b, one declared deviation judged.",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": ["deviation", "serves-plan-intent", "reasoning"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"deviation": {
|
|
216
|
+
"$comment": "The work history's `deviations[].plan-clause`, verbatim. The join key `verdict-deviations-judged` compares.",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 1,
|
|
219
|
+
"pattern": "\\S"
|
|
220
|
+
},
|
|
221
|
+
"serves-plan-intent": {
|
|
222
|
+
"$comment": "The REVIEWER's judgement, which is the half R-057b insists is never the implementer's. A boolean, so a deviation cannot be waved through in prose that reads as approval without being one.",
|
|
223
|
+
"type": "boolean"
|
|
224
|
+
},
|
|
225
|
+
"reasoning": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"minLength": 1,
|
|
228
|
+
"pattern": "\\S"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"hazardClassAddressed": {
|
|
233
|
+
"$comment": "T-007, step 6a: one declared hazard class, probed, and either a finding it produced or a statement clearing it.",
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"required": ["class-id", "probed"],
|
|
237
|
+
"properties": {
|
|
238
|
+
"class-id": {
|
|
239
|
+
"$comment": "The `hazard-classes[].id` of the referenced plan phase, the join key `verdict-hazard-classes-addressed` compares.",
|
|
240
|
+
"type": "string",
|
|
241
|
+
"minLength": 1,
|
|
242
|
+
"pattern": "\\S"
|
|
243
|
+
},
|
|
244
|
+
"probed": {
|
|
245
|
+
"$comment": "What the reviewer actually DID against this class. The hazard checklist's canonical probes each name a construction rather than asking a bare question (a real mkfifo, a forced concurrency, a killed process mid-write, a destroy on a branch carrying committed unpushed work), and this is where that construction is recorded.",
|
|
246
|
+
"type": "string",
|
|
247
|
+
"minLength": 1,
|
|
248
|
+
"pattern": "\\S"
|
|
249
|
+
},
|
|
250
|
+
"finding": {
|
|
251
|
+
"$comment": "The `findings[].id` this class produced, when it produced one. THE ONLY INTRA-DOCUMENT ID REFERENCE IN ANY SHIPPED SCHEMA, and resolving it is the Kind B check `verdict-finding-references-resolve` rather than a keyword: matching one array's entry against another array's ids is not a keyword property under any DR-0013 option. It is not decoration. The escalation rule at the root of this document reads `findings[]` and nothing else, so a class recorded as having produced a finding that never reaches `findings[]` is an APPROVE the rule cannot see past; measured before the check, that document validated at exit 0.",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"pattern": "\\S"
|
|
255
|
+
},
|
|
256
|
+
"cleared-because": {
|
|
257
|
+
"$comment": "The statement clearing the class, when the probe produced no finding. Step 6a asks for EITHER a finding reference OR this, and the `oneOf` below is that either.",
|
|
258
|
+
"type": "string",
|
|
259
|
+
"minLength": 1,
|
|
260
|
+
"pattern": "\\S"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"oneOf": [
|
|
264
|
+
{
|
|
265
|
+
"$comment": "Branch A: the class produced a finding. `finding` is restated in a sibling `properties` for the strictRequired reason recorded on the root `oneOf`.",
|
|
266
|
+
"required": ["finding"],
|
|
267
|
+
"properties": {
|
|
268
|
+
"finding": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"minLength": 1,
|
|
271
|
+
"pattern": "\\S"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"$comment": "Branch B: the class was cleared and the reviewer says why. An entry carrying BOTH matches both branches and is therefore invalid, which is deliberate: a class both cleared and found is a contradiction and the reader cannot tell which the review meant.",
|
|
277
|
+
"required": ["cleared-because"],
|
|
278
|
+
"properties": {
|
|
279
|
+
"cleared-because": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1,
|
|
282
|
+
"pattern": "\\S"
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/work-history.schema.json",
|
|
4
|
+
"title": "Tiphys work history",
|
|
5
|
+
"$comment": "R-035, R-052a, R-083a. Kernel plan M3, M3-P4 step 3. THE WORK HISTORY IS THE ARTIFACT A LATER REVIEWER TRUSTS and the one CLAUDE.md says must never be softened, which is why `claims[]`, `fix-round[]` and `gate-evidence[]` are the REPORT SCHEMA'S OWN DEFINITIONS reached by $ref into report.schema.json rather than restated here. A shared definition is not a convenience: two independently-drifting copies of the honesty contract is the drift hole M3-P2 closes for gates and M3-P3 closes for mode ids, and a registered test asserts that both documents resolve to the SAME definition object rather than to two equal ones. THE SHARING IS OF KEYWORDS ONLY, AND THAT WAS ONCE A HOLE: a derived check is registered per artifact TYPE and reads a type-specific KEY, so a Kind B rule written against a shared `$def` does not follow the `$ref` here (M3-P4 round-1 finding CR-001). Every shared `$def` in report.schema.json now states whether a derived check guards it, the one that is guarded declares this type in `alsoTypes`, and test/report-contract.test.ts derives the relation from the schemas so a stale claim reddens rather than reassures. HOW THE $ref RESOLVES: the reference is RELATIVE, so it resolves against this document's $id to https://tiphys.dev/schemas/report.schema.json and matches that document's own $id. Nothing is fetched. `src/commands/validate.ts` declares report.schema.json as this type's COMPANION and registers it with the same compiler before this document is compiled, which is a named, in-directory, shipped-schema registration and not the remote loading DR-0013 clause 4 withholds. R-083a's ACCUMULATION HALF is `environment-warnings[]`; its template half is templates/warnings.md.",
|
|
6
|
+
"description": "One document per phase branch. The prompt verbatim, what was touched, what was decided and why, what was verified before any code was written, every deviation, the gate evidence, the claims made and how each was settled, and the environment warnings the phase accumulated.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"kind",
|
|
11
|
+
"phase",
|
|
12
|
+
"prompt",
|
|
13
|
+
"files-touched",
|
|
14
|
+
"per-step-commits",
|
|
15
|
+
"key-decisions",
|
|
16
|
+
"verification-first",
|
|
17
|
+
"deviations",
|
|
18
|
+
"gate-evidence",
|
|
19
|
+
"claims",
|
|
20
|
+
"environment-warnings"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"kind": {
|
|
24
|
+
"description": "The artifact type, so `tiphys validate --type auto` resolves this document without being told.",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"const": "work-history"
|
|
27
|
+
},
|
|
28
|
+
"phase": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"pattern": "\\S"
|
|
32
|
+
},
|
|
33
|
+
"prompt": {
|
|
34
|
+
"$comment": "R-052a: VERBATIM. A block scalar, and the schema cannot tell verbatim from paraphrased; what it can do is refuse an empty or whitespace-only one.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"pattern": "\\S"
|
|
38
|
+
},
|
|
39
|
+
"files-touched": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
42
|
+
},
|
|
43
|
+
"per-step-commits": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["sha", "subject"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"sha": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" },
|
|
51
|
+
"subject": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"key-decisions": {
|
|
56
|
+
"$comment": "R-052a: the WHY that is invisible in the diff. `why` is required, so a decision cannot be recorded as a bare fact.",
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["decision", "why"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"decision": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
64
|
+
"why": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"verification-first": {
|
|
69
|
+
"$comment": "R-035, D-M3-03. Findings written BEFORE any code, recorded verbatim. `contradicts-plan` is a REQUIRED boolean, so the question is answered rather than skipped, and a `true` drags a `stopped-and-reported` reference with it: the whole point of R-035 is that a finding contradicting the plan is escalated rather than implemented around, and a record that says it contradicted the plan while naming no escalation is the shape that rule exists to forbid. RESIDUE, STATED HERE BECAUSE THE FIX ROUND 2 ENUMERATION FOUND IT AND NOTHING ELSE ON THIS BRANCH RECORDS IT: this is CR-002's mechanism in boolean form. The `if` keys off A VALUE THE AUTHOR CHOOSES, and the `false` branch owed NOTHING, so a finding that DOES contradict the plan and is recorded as `contradicts-plan: false` escaped the escalation reference entirely. FIX ROUND 2 WROTE HERE THAT NO KEYWORD AND NO DERIVED CHECK COULD REACH IT, on the ground that deciding whether a finding contradicts the plan is a reading of two documents in prose. THAT SENTENCE WAS FALSE AND IS CORRECTED RATHER THAN QUIETLY DELETED, because it is the exact shape this whole schema exists to refuse: the round-2 delta verifier refuted it by CONSTRUCTION (finding DV-002), and the reason it was wrong is that the second document is not outside this one at all, since `finding` is prose carried in the same object. The `false` branch of `$defs/verificationFirst`'s `oneOf` now narrows that prose; see its own comment for the token list and for what it still does not reach. The required boolean makes the question unskippable and the pattern prices the most obvious lies, and NEITHER makes the answer true; M3-P7's clean-room checklist is where that is checked.",
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "$ref": "#/$defs/verificationFirst" }
|
|
72
|
+
},
|
|
73
|
+
"deviations": {
|
|
74
|
+
"$comment": "R-057a, the same shape the report carries.",
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["plan-clause", "why"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"plan-clause": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
82
|
+
"why": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"gate-evidence": {
|
|
87
|
+
"$comment": "R-049, R-086. THE REPORT SCHEMA'S gate-results DEFINITION, by $ref, not a copy of it. THE KEY IS DIFFERENT HERE (`gate-evidence`, not `gate-results`) AND THAT DIFFERENCE IS LOAD-BEARING: the derived check `report-parity-arithmetic` guards this definition, and a check registered for one type reading one hard-coded key was blind on this document even though the keywords were shared, so a work history claiming 9999 tests discovered and 1 passed validated while the identical counts in a report did not (M3-P4 round-1 finding CR-001). src/checks.ts now enumerates the key per type in `GATE_RESULT_SITES` and the check declares `alsoTypes: [work-history]`.",
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": { "$ref": "report.schema.json#/$defs/gateResult" }
|
|
90
|
+
},
|
|
91
|
+
"claims": {
|
|
92
|
+
"$comment": "T-006, D-M3-30. THE REPORT SCHEMA'S claims DEFINITION, by $ref, not a copy of it.",
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": { "$ref": "report.schema.json#/$defs/claim" }
|
|
95
|
+
},
|
|
96
|
+
"fix-round": {
|
|
97
|
+
"$comment": "CLAUDE.md's fix-round contract, D-M3-30. THE REPORT SCHEMA'S fix-round DEFINITION, by $ref, not a copy of it. An ARRAY here and a single object in the report, because a phase branch carries many rounds and one report answers one of them; the ELEMENT is the same definition in both. Optional, because a phase with no fix round has none to record.",
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "$ref": "report.schema.json#/$defs/fixRound" }
|
|
100
|
+
},
|
|
101
|
+
"environment-warnings": {
|
|
102
|
+
"$comment": "R-083a's ACCUMULATION HALF. Its template half is templates/warnings.md, which src/brief.ts appends verbatim to every brief. A warning recorded here without evidence is still a warning, so `evidence` is optional and `warning` is not; making evidence mandatory would price an honest note out of the record, which is this phase's own worst hazard one size down.",
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["warning"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"warning": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
110
|
+
"evidence": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"$defs": {
|
|
116
|
+
"verificationFirst": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": ["finding", "contradicts-plan"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"finding": {
|
|
122
|
+
"$comment": "Recorded VERBATIM (R-035).",
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1,
|
|
125
|
+
"pattern": "\\S"
|
|
126
|
+
},
|
|
127
|
+
"contradicts-plan": { "type": "boolean" },
|
|
128
|
+
"stopped-and-reported": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"pattern": "\\S"
|
|
132
|
+
},
|
|
133
|
+
"plan-language-note": {
|
|
134
|
+
"$comment": "M3-P4 FIX ROUND 4, FINDING DV3-002. Declared here as well as in the branch that requires it, because this object sets `additionalProperties: false` and a field absent from THIS block is refused before any branch is reached. A DECLARED RESIDUE, MEASURED RATHER THAN ASSUMED: the third `oneOf` branch below is the only one that REQUIRES this field, and the first branch (`contradicts-plan: true`) sets no `additionalProperties`, so a `true` record carrying this note validates and nothing refuses it. Making that a rejection means giving branch 1 an `additionalProperties: false` and restating every property of this object inside it, which is a change to the branch each `contradicts-plan: true` witness names; it was not worth that, and it is written down here instead of being left for a reader to find.",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1,
|
|
137
|
+
"pattern": "\\S"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"if": {
|
|
141
|
+
"$comment": "Kind A, both sides on the SAME object, so the escalation cannot be satisfied by a reference recorded elsewhere in the document.",
|
|
142
|
+
"type": "object",
|
|
143
|
+
"required": ["contradicts-plan"],
|
|
144
|
+
"properties": { "contradicts-plan": { "const": true } }
|
|
145
|
+
},
|
|
146
|
+
"then": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"required": ["stopped-and-reported"],
|
|
149
|
+
"properties": {
|
|
150
|
+
"stopped-and-reported": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"oneOf": [
|
|
154
|
+
{
|
|
155
|
+
"$comment": "THE `contradicts-plan: true` BRANCH, which adds nothing: the escalation obligation is the `if`/`then` above and is deliberately left there rather than moved, so every witness registered against it keeps naming the keyword that does the work. This branch exists to make the two branches disjoint. Its own `required` is what makes an ABSENT `contradicts-plan` fall to the branch below instead of matching both, which is why the two branches are not symmetric.",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"required": ["contradicts-plan"],
|
|
158
|
+
"properties": { "contradicts-plan": { "const": true } }
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"$comment": "M3-P4 FIX ROUND 3, FINDING DV-002. Round 2 wrote that this site was `Unreachable by keyword or check` and the round-2 delta verifier REFUTED THAT BY BUILDING THE THING, using this phase's own remedy one definition over. The correction matters more than the fix: the argument round 2 gave for the whole class was that each open site `compares a document to something that is not in any document`, and that is FALSE HERE. `finding` is prose recorded verbatim (R-035) and it is IN THIS DOCUMENT, so the branch is content-discriminated in exactly the sense this phase's own converse table defines, and the negative-lookahead `pattern` that narrowed `#/$defs/claim`'s `open-question` statement narrows it too. WHAT IT REFUSES: a finding whose own prose names a divergence FROM THE PLAN while the boolean beside it says there is none, by eight tokens (`contradict* the plan`, `contrary to the plan`, `conflict* with the plan`, `diverg* from the plan`, `deviat* from the plan`, `at odds with the plan`, `inconsistent with the plan`, `the plan is wrong`), each written case-insensitively for the same reason as report.schema.json's `$defs/universalQuantifier`. EVERY TOKEN NAMES THE PLAN, and that is the whole design: a bare `contradicts` would refuse `the two schema comments contradict each other`, and `the plan requires` would refuse `the plan requires a deviations section and the M2 schemas already model one`, both of which are honest findings that do not contradict anything. Pricing those out is this phase's own worst hazard and the reason the token list is narrow rather than long. THE SENTENCE THAT USED TO STAND HERE, `EVERY TOKEN NAMES THE PLAN, AND THAT IS THE WHOLE DESIGN`, WAS THE ROUND-3 DEFECT AND IS CORRECTED RATHER THAN DELETED: naming the plan is what an ASSERTION of divergence and a DENIAL of one have in common, so the tokens caught both, and the denial is the plainest sentence a `contradicts-plan: false` record carries. Round 4 derived four of them against the shipped template and recorded their exit codes in delivery/work-history/m3-p4.md (finding DV3-002); `This does not contradict the plan; I checked section 2.3 first` is the first. R-035 records the finding VERBATIM, so rewording it was never available and the record was unwritable rather than merely awkward. THE BRANCH BELOW IS THE REPAIR: prose carrying a token is still writable, with the author declaring in `plan-language-note` why the sentence is not the assertion the token looks like. A LIST OF PERMITTED NEGATIONS WAS CONSIDERED AND REFUSED, because English negates, quotes and hedges these eight tokens in open-endedly many ways and any such list would be the same underived universal one level up, which is the mechanism the round-3 arbitration ruled on. RESIDUE, STATED RATHER THAN LEFT TO BE FOUND: neutral prose over a real contradiction still passes, exactly as `$defs/universalQuantifier` still passes an unlisted universal; `the plans` in the plural escapes the word boundary; a token split across a line break escapes the literal space, which is a residue this pattern SHARES with the two shipped patterns in report.schema.json rather than one it introduces; and nothing here can tell a true `plan-language-note` from a false one. The pattern narrows the escape; it does not seal it, and I did not find a way to make the marker TRUE by schema alone here. What checks the answer against the world is M3-P7's clean-room checklist.",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"contradicts-plan": { "const": false },
|
|
165
|
+
"finding": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"pattern": "^(?:(?!\\b([Cc][Oo][Nn][Tt][Rr][Aa][Dd][Ii][Cc][Tt][A-Za-z]* [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Cc][Oo][Nn][Tt][Rr][Aa][Rr][Yy] [Tt][Oo] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Cc][Oo][Nn][Ff][Ll][Ii][Cc][Tt][A-Za-z]* [Ww][Ii][Tt][Hh] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Dd][Ii][Vv][Ee][Rr][Gg][A-Za-z]* [Ff][Rr][Oo][Mm] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Dd][Ee][Vv][Ii][Aa][Tt][A-Za-z]* [Ff][Rr][Oo][Mm] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Aa][Tt] [Oo][Dd][Dd][Ss] [Ww][Ii][Tt][Hh] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Ii][Nn][Cc][Oo][Nn][Ss][Ii][Ss][Tt][Ee][Nn][Tt] [Ww][Ii][Tt][Hh] [Tt][Hh][Ee] [Pp][Ll][Aa][Nn]|[Tt][Hh][Ee] [Pp][Ll][Aa][Nn] [Ii][Ss] [Ww][Rr][Oo][Nn][Gg])\\b)[\\s\\S])*$"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$comment": "M3-P4 FIX ROUND 4, FINDING DV3-002. THE `contradicts-plan: false` RECORD WHOSE VERBATIM PROSE CARRIES ONE OF THE EIGHT TOKENS, WITH THE AUTHOR SAYING WHY IT IS NOT THE ASSERTION THE TOKEN LOOKS LIKE. The sibling branch above is unchanged and stays the cheap path: prose free of the tokens owes nothing. WHAT THIS BRANCH COSTS: one short string, where the sibling alone cost the author the record. CARRYING `plan-language-note` WITH TOKEN-FREE PROSE IS A REJECTION, by the exactly-one rule of `oneOf`, which is the same discipline `schemas/final-report.schema.json`'s `$defs/enumerableSection` applies to `none: true` over real entries: an exception marker declared where the exception does not apply is a misdeclaration. WHAT IT DOES NOT REACH, measured rather than argued: the note is prose, so the round wrote the assertion `This contradicts the plan section 2.3` beside the note `I say it does not` and measured exit 0, which is in delivery/work-history/m3-p4.md with the rest. This raises the price of the lie from zero to a sentence a reviewer reads; it does not detect the lie, and M3-P7's clean-room checklist is where it is detected.",
|
|
173
|
+
"type": "object",
|
|
174
|
+
"required": ["contradicts-plan", "plan-language-note"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"contradicts-plan": { "const": false },
|
|
177
|
+
"plan-language-note": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# A minimal Tiphys project charter that validates against
|
|
2
|
+
# schemas/charter.schema.json. Kernel plan M3, M3-P1 step 7.
|
|
3
|
+
kind: charter
|
|
4
|
+
identity:
|
|
5
|
+
name: example-service
|
|
6
|
+
repo: git@github.com:example/example-service.git
|
|
7
|
+
kernel-version-pin: 0.1.0
|
|
8
|
+
# The mode ids are assurance-modes.yaml's, and the charter schema's enum is
|
|
9
|
+
# held equal to them by the derived check charter-mode-enum-matches-modes.
|
|
10
|
+
# This template said `standard` until M3-P3, which is a value no mode
|
|
11
|
+
# definition has ever carried.
|
|
12
|
+
delivery-mode: full
|
|
13
|
+
assurance-tier: full
|
|
14
|
+
yolo-permissions:
|
|
15
|
+
enabled: false
|
|
16
|
+
scope: []
|
|
17
|
+
irreversible-decisions:
|
|
18
|
+
stack: Node 26, TypeScript, Postgres 16
|
|
19
|
+
language: TypeScript
|
|
20
|
+
framework: Fastify
|
|
21
|
+
core-data-model: >-
|
|
22
|
+
One tenant per organization; every row carries tenant_id and every query
|
|
23
|
+
is scoped by it.
|
|
24
|
+
tenancy: shared database, row-level tenant scoping
|
|
25
|
+
auth: OIDC through the organization's identity provider, no local passwords
|
|
26
|
+
deployment-topology: single region, one managed container service
|
|
27
|
+
product-intent: |
|
|
28
|
+
A service that ingests supplier catalogues, normalizes them, and exposes one
|
|
29
|
+
search endpoint. Success is that a buyer finds the right part in one query.
|
|
30
|
+
Not in scope: pricing, ordering, or anything that writes to a supplier.
|
|
31
|
+
constraints:
|
|
32
|
+
- No customer data leaves the region.
|
|
33
|
+
- The search endpoint answers in under 300ms at the 95th percentile.
|
|
34
|
+
escalation-contract:
|
|
35
|
+
# The two DEFAULT stop-for entries. The second one is what makes turning
|
|
36
|
+
# verification off an owner decision instead of an implementer's edit
|
|
37
|
+
# (delivery/verification/release-verification-interface.md section 4.1).
|
|
38
|
+
# This is a default that is SHIPPED, not a rule anyone is proved to obey.
|
|
39
|
+
stop-for:
|
|
40
|
+
- any irreversible choice the charter is silent on
|
|
41
|
+
- a change from a declared release verification to `none`
|
|
42
|
+
route: >-
|
|
43
|
+
The orchestrator raises a decision record and notifies the owner
|
|
44
|
+
asynchronously; work on the affected phase stops.
|
|
45
|
+
release-verification:
|
|
46
|
+
# RESERVED, NOT DESIGNED (DR-0014, D-M3-29). See the schema's $comment.
|
|
47
|
+
mode: reserved
|
|
48
|
+
note: >-
|
|
49
|
+
The real shape of this field is settled by the first real project charter
|
|
50
|
+
at M4's pilot. Until then a project declares reserved and says why.
|
|
51
|
+
retention:
|
|
52
|
+
work-history: delivery/work-history/
|
|
53
|
+
evidence: delivery/evidence/
|
|
54
|
+
tuition: delivery/tuition/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# A minimal Tiphys decision record that validates against
|
|
2
|
+
# schemas/decision-record.schema.json. Kernel plan M3, M3-P1 step 7.
|
|
3
|
+
kind: decision-record
|
|
4
|
+
id: DR-0021
|
|
5
|
+
project: example-service
|
|
6
|
+
task: m9-planning
|
|
7
|
+
question: >-
|
|
8
|
+
Does the importer retry a 429, and if so how many times, given that the
|
|
9
|
+
caller already retries at job level?
|
|
10
|
+
options:
|
|
11
|
+
- label: Retry twice inside the importer
|
|
12
|
+
consequence: >-
|
|
13
|
+
Bounded total attempts at six when multiplied by the caller's three, and
|
|
14
|
+
the failure surfaces within one job.
|
|
15
|
+
- label: Do not retry inside the importer
|
|
16
|
+
consequence: >-
|
|
17
|
+
One rate-limited response fails the whole job, and the caller's retry
|
|
18
|
+
re-reads the entire catalogue.
|
|
19
|
+
reversibility: reversible
|
|
20
|
+
vetoable: false
|
|
21
|
+
revert-cost: >-
|
|
22
|
+
One constant and one test; the change is behind no data migration.
|
|
23
|
+
status: decided
|
|
24
|
+
decided: Retry twice inside the importer (owner, 2026-08-08).
|
|
25
|
+
date: 2026-08-08
|
|
26
|
+
evidence:
|
|
27
|
+
- delivery/verification/importer-retry.md
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Tiphys final report, worked example.
|
|
2
|
+
#
|
|
3
|
+
# FILLED WITH REAL CONTENT FROM THIS REPOSITORY (kernel plan M3, M3-P4 step 4).
|
|
4
|
+
# The findings below are the six the M3-P3 round-8 adversarial verification
|
|
5
|
+
# raised, with the outcomes that verification recorded, at
|
|
6
|
+
# delivery/review/verification-m3-p3-round-8.md:766.
|
|
7
|
+
#
|
|
8
|
+
# THE FINAL REPORT IS A PROJECTION, NOT A SUMMARY. Nothing here is authored:
|
|
9
|
+
# every row is derived from a record that already exists, which is why the
|
|
10
|
+
# document can be dense while the archive stays verbose.
|
|
11
|
+
|
|
12
|
+
kind: final-report
|
|
13
|
+
subject: M3-P3, assurance modes and role-to-model configuration, rounds 1 to 10
|
|
14
|
+
|
|
15
|
+
inputs:
|
|
16
|
+
- V-1
|
|
17
|
+
- V-2
|
|
18
|
+
- V-3
|
|
19
|
+
- V-4
|
|
20
|
+
- V-5
|
|
21
|
+
- V-6
|
|
22
|
+
|
|
23
|
+
input-findings:
|
|
24
|
+
- id: V-1
|
|
25
|
+
outcome: >-
|
|
26
|
+
CLOSED. 128 runs through the shipped CLI with byte-identical output,
|
|
27
|
+
flat growth to 3584 markers, a 23.4M-string language equivalence, and a
|
|
28
|
+
time witness red 2 of 2 on both members and green with 58x headroom.
|
|
29
|
+
- id: V-2
|
|
30
|
+
outcome: >-
|
|
31
|
+
CLOSED. The {0,2}, {0,3} and {0,4} mutants and three loop-bound mutants
|
|
32
|
+
were all killed; name, description, spec and fixture agree. Residual
|
|
33
|
+
W-3 is LOW.
|
|
34
|
+
- id: V-3
|
|
35
|
+
outcome: CLOSED. The replacement member reddens one test out of 505, was fourteen.
|
|
36
|
+
- id: V-4
|
|
37
|
+
outcome: CLOSED. Both sweeps re-run by the reviewer; exit codes and hits reproduce exactly.
|
|
38
|
+
- id: V-5
|
|
39
|
+
outcome: >-
|
|
40
|
+
OUT OF SCOPE by orchestrator decision in
|
|
41
|
+
delivery/review/arbitration-m3-p3-round-8.md; not re-measured and no
|
|
42
|
+
claim made.
|
|
43
|
+
- id: V-6
|
|
44
|
+
outcome: >-
|
|
45
|
+
CLOSED BY REMOVAL. git grep for both constants outside delivery/
|
|
46
|
+
returns nothing at exit 1, and the derivation is stated in the true
|
|
47
|
+
form rather than as an impossibility.
|
|
48
|
+
|
|
49
|
+
decisions-owed:
|
|
50
|
+
none: false
|
|
51
|
+
entries:
|
|
52
|
+
- id: todo-bucket
|
|
53
|
+
statement: >-
|
|
54
|
+
The report contract's gate-result count vocabulary has five fields and
|
|
55
|
+
the M2-P3 wrapper reports six buckets; a run with todo greater than
|
|
56
|
+
zero cannot be recorded without breaking parity. Whether to add the
|
|
57
|
+
field or to state the gap is a plan question, not an implementer one.
|
|
58
|
+
owner: orchestrator
|
|
59
|
+
|
|
60
|
+
owner-verification:
|
|
61
|
+
none: false
|
|
62
|
+
entries:
|
|
63
|
+
- id: A-4
|
|
64
|
+
statement: >-
|
|
65
|
+
The npm publish credential is an owner action; no agent in this
|
|
66
|
+
container holds it and no gate can stand in for it.
|
|
67
|
+
owner: owner
|
|
68
|
+
|
|
69
|
+
infrastructure-left:
|
|
70
|
+
none: true
|
|
71
|
+
|
|
72
|
+
out-of-band:
|
|
73
|
+
none: false
|
|
74
|
+
entries:
|
|
75
|
+
- id: beacon-branch-correction
|
|
76
|
+
statement: >-
|
|
77
|
+
The M3-P4 beacon commit landed on local main and was moved onto the
|
|
78
|
+
phase branch by the orchestrator with git branch -f; no file content
|
|
79
|
+
changed and nothing was pushed while HEAD was wrong.
|
|
80
|
+
owner: orchestrator
|