@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,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/role-brief.schema.json",
|
|
4
|
+
"title": "Tiphys role-brief frontmatter",
|
|
5
|
+
"$comment": "Kernel plan M3, M3-P5 step 1. THIS DOCUMENT VALIDATES THE FRONTMATTER OF A ROLE BRIEF AND NOTHING ELSE. Section 1.5 of the plan grants role briefs the markdown-with-YAML-frontmatter exception on the ground that a brief's effect comes from argument, ordering and emphasis, which have no field decomposition that preserves them; the frontmatter carries everything that IS enumerable and this schema is what makes that half checkable. FOUR THINGS THIS SCHEMA CANNOT DO, stated here rather than left to be discovered. (1) IT CANNOT SEE THE BODY. `clauses[]` is a list of ids; whether each id has a heading with text under it, and whether that text says the opposite of the row it discharges, are not keyword properties. The first half is closed by the clause round trip in src/roles.ts, which `tiphys validate --type role-brief` runs after this schema passes; the second half is judgment and is M3-P7's `clause-text-matches-row` probe (the phase's own hazard-class table says so). (2) IT CANNOT SEE THE FILESYSTEM. Every entry of `mandated-reading[]` is a string here; whether the path exists, and whether it is a regular file rather than a named pipe, are resolved by `tiphys brief compose` (criteria 2 and 6c). (3) IT CANNOT TELL A COMPLETE MANDATED-READING LIST FROM AN INCOMPLETE ONE. Nothing can compute which document a role NEEDS, which the phase's hazard-class table records as unreachable by any criterion. (4) IT CARRIES NO `kind` FIELD AND THEREFORE NEVER RESOLVES UNDER `--type auto`. That is deliberate and it is not an oversight of M3R-001: `--type auto` reads `kind` from the DECODED instance, and decoding a role brief means knowing first that it is markdown with frontmatter rather than a YAML document, so the type must be named before the document can be decoded at all. The half of M3R-001 that matters, registering the type in `TYPE_TABLE` in the same step that ships the schema, is done in src/commands/validate.ts.",
|
|
6
|
+
"description": "The YAML frontmatter block of every roles/*.md file and of AGENTS.md. Role identity, lifetime, visibility, the reading it must do in order, the verifiers attached to it, what it may output, its default model tier, and the clause ids the clause map resolves against.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"role",
|
|
11
|
+
"lifetime",
|
|
12
|
+
"sees",
|
|
13
|
+
"never",
|
|
14
|
+
"mandated-reading",
|
|
15
|
+
"verifiers",
|
|
16
|
+
"outputs",
|
|
17
|
+
"model-tier",
|
|
18
|
+
"clauses"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"role": {
|
|
22
|
+
"$comment": "R-004, R-005, R-006. The six roles of blueprint section 6 and of the process document's section 0 role table. A CLOSED enum, and closed on purpose: role-model-config.yaml binds a tier to each of these six names and a seventh role would silently have no tier. The vocabulary is identical to role-model-config.yaml's `role` values, which is the property test/roles.test.ts asserts rather than this comment.",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"orchestrator",
|
|
26
|
+
"investigator",
|
|
27
|
+
"plan-writer",
|
|
28
|
+
"adversarial-plan-reviewer",
|
|
29
|
+
"implementer",
|
|
30
|
+
"clean-room-reviewer"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"lifetime": {
|
|
34
|
+
"$comment": "The process document's role table, column 2. One mystery, one plan, one review, one phase, one pull request, or persistent across the whole run.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"pattern": "\\S"
|
|
38
|
+
},
|
|
39
|
+
"sees": {
|
|
40
|
+
"$comment": "R-006 and SC-001. The process document's role table, column 3. An ARRAY rather than a sentence because the adversarial plan reviewer's visibility is the thing SC-001 found the two governing documents disagreeing about, and a list of three named inputs is comparable across documents where a sentence is not.",
|
|
41
|
+
"type": "array",
|
|
42
|
+
"minItems": 1,
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"pattern": "\\S"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"never": {
|
|
50
|
+
"$comment": "The process document's role table, column 4. The separation is the point: an investigator that fixes things and a reviewer that edits things are the two failures this column exists to prevent.",
|
|
51
|
+
"type": "array",
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"pattern": "\\S"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"mandated-reading": {
|
|
60
|
+
"$comment": "R-033a's ordered-reading family. ORDER IS THE SEMANTIC: the first entry is read first. `minItems: 1` because a role with no mandated reading has declared that it needs no grounding, which no role in this process does. Resolution is done by `tiphys brief compose`, against the kernel root, through classifyEntry (D-M3-27), so a missing path and a named pipe are different reported failures rather than one hang.",
|
|
61
|
+
"type": "array",
|
|
62
|
+
"minItems": 1,
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1,
|
|
66
|
+
"pattern": "\\S"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"verifiers": {
|
|
70
|
+
"$comment": "Blueprint section 6 attaches a verifier to a role. Values are gate ids from gate-registry.yaml or the name of an M2 component. NOT resolved against the registry here: that is a reference into another document and therefore Kind B, and this phase adds no entry to section 2.3's Kind B table (M3-P5 criterion 5). The residue is stated rather than hidden: a verifier naming a gate that does not exist passes this schema.",
|
|
71
|
+
"type": "array",
|
|
72
|
+
"minItems": 1,
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"pattern": "\\S"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"outputs": {
|
|
80
|
+
"$comment": "The artifact types the role may produce, named as `tiphys validate --type` names them. A PATTERN rather than an enum, and the reason is that an enum here would have to be edited by M3-P6, M3-P7 and M3-P8 as each ships a new type, which makes a shared file a serialisation point between phases the conflict pre-pass ruled concurrent. Residue, stated: an `outputs` entry naming a type no schema is registered for passes this schema.",
|
|
81
|
+
"type": "array",
|
|
82
|
+
"minItems": 1,
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 1,
|
|
86
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"model-tier": {
|
|
90
|
+
"$comment": "R-075, resolved against role-model-config.yaml. The ENUM here is the Kind A half: the two tier names that file uses. The cross-document half, that this brief's tier equals the tier role-model-config.yaml binds to this role, is a reference into another document and is therefore Kind B; it is NOT built here, because a Kind B check registered for this type would need `--context` and criterion 1 requires `tiphys validate --type role-brief roles/<id>.md` to exit 0 with no context at all. test/roles.test.ts asserts the agreement instead, which is a registered test rather than a validator rule, and this comment says which of the two it is.",
|
|
91
|
+
"type": "string",
|
|
92
|
+
"enum": ["strongest", "cheaper"]
|
|
93
|
+
},
|
|
94
|
+
"clauses": {
|
|
95
|
+
"$comment": "The clause ids scripts/check-clause-map.mjs resolves against this artifact, plus the shared dispatch-contract clause ids. Every id here must occur EXACTLY ONCE as a body heading anchor of the form `## clause <id>` in the include-expanded body, and every anchor must occur here; that round trip is what stops a clause id being a label with nothing behind it, and it is enforced by src/roles.ts under `tiphys validate --type role-brief`. The pattern admits both requirement-row ids (R-004, R-010a) and named clauses (incremental-output).",
|
|
96
|
+
"type": "array",
|
|
97
|
+
"minItems": 1,
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1,
|
|
101
|
+
"pattern": "^[A-Za-z][A-Za-z0-9-]*$"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/role-model-config.schema.json",
|
|
4
|
+
"title": "Tiphys role-to-model configuration",
|
|
5
|
+
"$comment": "R-075: model tier per risk, strongest for money-path and architecture phases, investigations and all reviews; cheaper for mechanical phases. Kernel plan M3, M3-P3 step 3. THIS IS CONFIGURATION AND NOTHING RESOLVES IT IN M3. Binding is done by the harness adapter (blueprint section 6), the charter override is L4 and lands at M4, and DR-0010's M3 half is still open with 'no action required before M4', so this document names no executor, no orchestration primitive and no model. It carries a TIER and a FAMILY POLICY per role and stops there.",
|
|
6
|
+
"description": "One document per repository. Which model tier each of blueprint section 6's roles defaults to, whether a charter may override it, and what constraint the role's model FAMILY is under.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["kind", "version", "roles"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"kind": {
|
|
12
|
+
"description": "The artifact type, so `tiphys validate --type auto` resolves this document without being told.",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "role-model-config"
|
|
15
|
+
},
|
|
16
|
+
"note": {
|
|
17
|
+
"description": "Free prose for this document's own readers.",
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"version": {
|
|
21
|
+
"$comment": "A closed set rather than a minimum, for the same reason as the other M3 schemas: the authoring vocabulary has no `minimum` keyword.",
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"enum": [1]
|
|
24
|
+
},
|
|
25
|
+
"roles": {
|
|
26
|
+
"description": "One entry per role. The six of blueprint section 6.",
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"uniqueItems": true,
|
|
30
|
+
"items": {
|
|
31
|
+
"$ref": "#/$defs/roleBinding"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"$defs": {
|
|
36
|
+
"roleBinding": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["role", "tier", "charter-override", "rationale"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"role": {
|
|
42
|
+
"$comment": "The six roles of blueprint section 6, in the process document's own role table. Closed, because M3-P5's role-brief schema resolves `model-tier` against this document and a role id that matches nothing here would resolve to nothing. CLOSED VOCABULARY AT v0.1.0 (DR-0020): these six are the tiphys kernel's OWN role ids. This enum rejects every other value, so a consuming project cannot bind a role of its own name at v0.1.0. Extension is an M4 question, deferred to a real pilot consumer for the same reversibility reason as the mode-id enum.",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"orchestrator",
|
|
46
|
+
"investigator",
|
|
47
|
+
"plan-writer",
|
|
48
|
+
"adversarial-plan-reviewer",
|
|
49
|
+
"implementer",
|
|
50
|
+
"clean-room-reviewer"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"tier": {
|
|
54
|
+
"$comment": "R-075's two tiers. NAMES A TIER, NEVER A MODEL: a model id here would go stale in weeks and would put a vendor's product name inside a versioned kernel artifact. The harness adapter maps tier to model at M4.",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["strongest", "cheaper"]
|
|
57
|
+
},
|
|
58
|
+
"strongest-for": {
|
|
59
|
+
"$comment": "R-075 is PHASE-CLASS SCOPED for one role and flat for the others: 'strongest model for money-path/architecture phases, investigations, and all reviews; cheaper tier for mechanical phases'. An implementer's tier therefore depends on the phase it is given, and a document carrying only a flat `tier` would silently drop half of R-075's rule. This field is that half, as DATA: the phase classes on which the role's tier is raised to `strongest`. Nothing in M3 classifies a phase, and no resolver reads this.",
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 1,
|
|
62
|
+
"uniqueItems": true,
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": ["money-path", "architecture", "investigation", "review"]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"charter-override": {
|
|
69
|
+
"$comment": "Blueprint section 6 and R-075's migration-table note: the charter override is L4 and is resolved by the M4 harness adapter. The vocabulary is reserved here so the M4 adapter has a field to read rather than a convention to infer. Every role ships `allowed`, which is stated in delivery/work-history/m3-p3.md as a uniform value rather than presented as if it discriminated.",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": ["allowed", "forbidden"]
|
|
72
|
+
},
|
|
73
|
+
"review-model-family": {
|
|
74
|
+
"$comment": "T-001, and it is OPTIONAL because only review roles are under a family constraint. T-001 recorded a miss that survived three same-family review rounds and asked for 'at minimum, a charter-level option to route one review round of full-mode plans through a different family'. This is that option, expressed as a policy rather than as a family name, because naming a vendor's model family in a kernel artifact is the same staleness problem `tier` avoids.",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"must-differ-from-sibling-review",
|
|
78
|
+
"must-differ-from-previous-round",
|
|
79
|
+
"unconstrained"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"rationale": {
|
|
83
|
+
"description": "Why this role sits at this tier, referring to the rule it comes from. Required, so a tier cannot be lowered without someone writing down why.",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 1
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/status-line.schema.json",
|
|
4
|
+
"title": "Tiphys status-line record",
|
|
5
|
+
"description": "R-084. The orchestrator narrates to the owner at MILESTONES ONLY. The sparseness is expressed structurally rather than as an instruction: there is no info state, no progress state and no heartbeat state, so routine noise is UNREPRESENTABLE. A vocabulary that cannot say 'still working' cannot be used to say it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["kind", "at", "run", "project", "state", "detail", "refs"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"kind": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"const": "status-line"
|
|
13
|
+
},
|
|
14
|
+
"at": {
|
|
15
|
+
"$comment": "RFC 3339 UTC, so two records from two machines sort.",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$"
|
|
18
|
+
},
|
|
19
|
+
"run": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"project": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"state": {
|
|
28
|
+
"$comment": "Blueprint section 5, exactly five supervisor-actionable states. Every one of them is something the owner can DO something about; that is the membership rule, and it is why info, progress and heartbeat are absent rather than merely discouraged.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["needs-decision", "blocked", "done", "failed", "phase-change"]
|
|
31
|
+
},
|
|
32
|
+
"detail": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"refs": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string", "minLength": 1 }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiphys.dev/schemas/tuition.schema.json",
|
|
4
|
+
"title": "Tiphys tuition entry",
|
|
5
|
+
"$comment": "Kernel plan M3, M3-P8 step 1 (R-091). ONE FAILURE MODE PER DOCUMENT, in the form a project that was not there can act on. THE LOAD-BEARING CONSTRAINT IS THE CONDITIONAL ONE: an entry with `kernel-relevant: true` must carry at least one `structural-consequence`, because an entry that claims kernel relevance and proposes no change to any kernel artifact is not tuition, it is an anecdote. The second is `mechanisms[].evidence`, minItems 1, which is T-005's checkability rule expressed as a validation failure rather than as advice: a rule with no citation to an investigation, review or tuition entry is not a rule. WHAT THIS SCHEMA CANNOT DO, stated so nobody reads a green as more than it is. It cannot tell a lesson from a platitude; every prose field is a non-empty string and whether its text changes what a reader does is judgment. It cannot tell whether a `structural-consequence` marked `applied` actually landed: the derived check `tuition-target-exists` resolves the target PATH against the tree, and whether that file contains the change claimed is a semantic relation no keyword and no check reaches (the plan's hazard table says so in the same words). And it cannot see an id collision with the delivery-side `T-nnn` space, which is `test/tuition.test.ts`'s registered duplicate-id scan.",
|
|
6
|
+
"description": "One failure mode this project paid for, with the mechanism it established and the change to a kernel artifact it forces. The tuition feed is the archive layer; tuition/mechanism-index.yaml is the dense READ layer projected out of the mechanisms[] field of every entry here.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"kind",
|
|
11
|
+
"version",
|
|
12
|
+
"id",
|
|
13
|
+
"project",
|
|
14
|
+
"date",
|
|
15
|
+
"stage",
|
|
16
|
+
"kernel-relevant",
|
|
17
|
+
"what-happened",
|
|
18
|
+
"lesson",
|
|
19
|
+
"evidence"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"kind": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"const": "tuition"
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"$comment": "Document format version, not a project version. A closed set rather than a minimum, for the reason schemas/mechanism-index.schema.json already records: the authoring vocabulary has no `minimum` keyword, so a bare `type: integer` would admit 0 and negatives.",
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"enum": [1]
|
|
30
|
+
},
|
|
31
|
+
"id": {
|
|
32
|
+
"$comment": "ONE `T-nnn` SPACE, SHARED WITH THE DELIVERING PROJECT'S OWN LOG, never renumbered and never reused after retirement (CLAUDE.md's identifier-schemes rule). The pattern fixes the shape; the uniqueness of an id ACROSS the two directories is not a property of one document and is checked by a registered test instead (M3R-011).",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^T-[0-9]{3}$"
|
|
35
|
+
},
|
|
36
|
+
"project": {
|
|
37
|
+
"$comment": "Which delivery paid for this. A kernel-relevant entry travels upstream out of the project that learned it, so the entry has to say where it came from once it is no longer beside its own repository.",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"pattern": "\\S"
|
|
41
|
+
},
|
|
42
|
+
"date": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
45
|
+
},
|
|
46
|
+
"stage": {
|
|
47
|
+
"$comment": "Where in the pipeline it happened: a phase id, a review round, an exit test, the planning stage. Free text rather than an enum, because the stage vocabulary belongs to the delivery mode and a closed list here would reject a project running a pipeline this kernel does not define.",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"pattern": "\\S"
|
|
51
|
+
},
|
|
52
|
+
"kernel-relevant": {
|
|
53
|
+
"$comment": "TRUE means this entry constrains the kernel itself and ships upstream as a kernel pull request (R-091). It is a boolean rather than a prose field because it is the selector `tiphys tuition list --kernel-relevant` filters on and the condition the structural-consequence requirement below triggers off.",
|
|
54
|
+
"type": "boolean"
|
|
55
|
+
},
|
|
56
|
+
"what-happened": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"pattern": "\\S"
|
|
60
|
+
},
|
|
61
|
+
"lesson": {
|
|
62
|
+
"$comment": "What a reader should DO differently, one item per lesson. minItems 1: an entry with no lesson is an incident report.",
|
|
63
|
+
"type": "array",
|
|
64
|
+
"minItems": 1,
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"pattern": "\\S"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"mechanisms": {
|
|
72
|
+
"$comment": "T-005's field, and the SOURCE of tuition/mechanism-index.yaml. The index is a PROJECTION of these entries rather than a second thing to maintain, so a mechanism is recorded here once and read from the index everywhere. Optional and possibly empty: many entries teach something about the process without constraining a mechanism, and an empty list says exactly that.",
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": ["mechanism", "rule", "evidence"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"mechanism": {
|
|
80
|
+
"$comment": "The mechanism in the words a reader would search for. The index's `key` is DERIVED from this string (lowercase, runs outside [a-z0-9] collapsed to one hyphen, ends trimmed) and is never authored, so a key cannot drift from the mechanism it names.",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"pattern": "\\S"
|
|
84
|
+
},
|
|
85
|
+
"rule": {
|
|
86
|
+
"$comment": "What this project learned, stated as something to DO or NOT DO. An implementer who reads the row and changes nothing has read a description, and the row has failed.",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"pattern": "\\S"
|
|
90
|
+
},
|
|
91
|
+
"siblings": {
|
|
92
|
+
"$comment": "The other implementations that share this mechanism, by path. Projected into the index unchanged. An EMPTY list is meaningful: it says the mechanism has exactly one implementation today.",
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"pattern": "\\S"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"machine-readable-form": {
|
|
101
|
+
"$comment": "Where the SAME rule exists as data (D-M3-26). The `destructive-git-operation` row is the worked example: its prose rule and `gates.manifest.json`'s `destructiveCommands` list are two views of one thing, and this field is what stops them drifting apart silently. The derived check mechanism-rule-evidence-resolves resolves both the path and the key against the real document, so a key M2 renames reddens here. Dependency direction is M3 reads M2, never the reverse.",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": ["path", "key"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"path": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"pattern": "\\S"
|
|
110
|
+
},
|
|
111
|
+
"key": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"pattern": "\\S"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"evidence": {
|
|
119
|
+
"$comment": "THE T-005 CHECKABILITY RULE, as a constraint rather than as advice: a rule with no citation to an investigation, review or tuition entry is not a rule. minItems 1 is what makes an unsupported mechanism a validation failure.",
|
|
120
|
+
"type": "array",
|
|
121
|
+
"minItems": 1,
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1,
|
|
125
|
+
"pattern": "\\S"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"structural-consequence": {
|
|
132
|
+
"$comment": "The change to a kernel artifact this entry forces. REQUIRED AND NON-EMPTY when `kernel-relevant` is true, by the if/then below. `status` is the honest part: `applied` claims the change is in the tree and is checked against it by tuition-target-exists, `ticketed` names the record that carries it, and `proposed` claims nothing yet.",
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["target", "status", "change"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"target": {
|
|
140
|
+
"$comment": "A kernel artifact path. Resolved against the repository by tuition-target-exists when `status` is `applied`.",
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"pattern": "\\S"
|
|
144
|
+
},
|
|
145
|
+
"status": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": ["proposed", "applied", "ticketed"]
|
|
148
|
+
},
|
|
149
|
+
"change": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"pattern": "\\S"
|
|
153
|
+
},
|
|
154
|
+
"record": {
|
|
155
|
+
"$comment": "The decision record, plan section or ticket that carries a `ticketed` consequence. Optional in the keyword sense and expected in practice for that status; a `ticketed` consequence with no record is the shape a reader cannot follow, and it is left to review rather than encoded, because the record for a ticket raised in another project is not a path this schema can constrain.",
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1,
|
|
158
|
+
"pattern": "\\S"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"evidence": {
|
|
164
|
+
"$comment": "What establishes that the entry is true: reviews, verifications, work histories, captured runs, pull requests. minItems 1 for the same reason the mechanism's own evidence is required.",
|
|
165
|
+
"type": "array",
|
|
166
|
+
"minItems": 1,
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1,
|
|
170
|
+
"pattern": "\\S"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"if": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"required": ["kernel-relevant"],
|
|
177
|
+
"properties": {
|
|
178
|
+
"kernel-relevant": { "const": true }
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"then": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"required": ["structural-consequence"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"structural-consequence": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"minItems": 1
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|