agent-bios 0.19.3 → 0.20.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 (172) hide show
  1. package/DEPENDENCIES.md +62 -20
  2. package/INSTALL.md +1 -1
  3. package/README.md +16 -21
  4. package/claude/agents/frontier.md +1 -1
  5. package/claude/agents/sweep.md +2 -1
  6. package/claude/agents/workhorse.md +2 -2
  7. package/claude/guides/claude-prompting.md +494 -167
  8. package/claude/guides/cli-multi-model-workflow.md +8 -7
  9. package/claude/guides/gpt-prompting.md +241 -111
  10. package/claude/guides/session-distill-workflow.md +93 -43
  11. package/claude/guides/tooling-gotchas.md +3 -1
  12. package/codex/agents/reviewer.toml +2 -2
  13. package/codex/agents/sweep.toml +1 -1
  14. package/codex/agents/workhorse.toml +2 -2
  15. package/codex/guides/claude-prompting.md +494 -167
  16. package/codex/guides/cli-multi-model-workflow.md +8 -7
  17. package/codex/guides/gpt-prompting.md +241 -111
  18. package/codex/guides/session-distill-workflow.md +93 -43
  19. package/codex/guides/tooling-gotchas.md +3 -1
  20. package/compose/assemble.py +4 -1
  21. package/compose/canary.sh +8 -6
  22. package/compose/host_platform.py +158 -15
  23. package/compose/instructions-state.py +183 -41
  24. package/compose/instructions_app.py +2 -2
  25. package/compose/instructions_install.py +222 -27
  26. package/compose/instructions_session.py +250 -75
  27. package/compose/instructions_setup.py +6 -6
  28. package/compose/instructions_setup_cli.py +2 -36
  29. package/compose/instructions_setup_i18n.py +3 -3
  30. package/compose/instructions_store.py +160 -3
  31. package/compose/instructions_transaction.py +29 -5
  32. package/compose/instructions_ui_runtime.py +2 -2
  33. package/compose/setup/START.md +1 -1
  34. package/docs/advanced-launch.md +4 -0
  35. package/docs/releases/0.19.4.md +99 -0
  36. package/docs/releases/0.20.0.md +102 -0
  37. package/docs/setup.md +4 -4
  38. package/install.sh +54 -20
  39. package/launch/agent-launch.py +171 -22
  40. package/launch/agent-launch.toml +64 -29
  41. package/launch/agent-launch.zsh +104 -13
  42. package/launch/claude_subcommands.py +179 -0
  43. package/launch/provision-venv.sh +1 -1
  44. package/launch/shell_integration.py +7 -1
  45. package/learn/collect-learning.py +60 -9
  46. package/learn/migrate-learnings.py +70 -4
  47. package/learn/redact.py +2 -1
  48. package/package.json +37 -4
  49. package/provenance.json +1 -1
  50. package/session-cost.py +141 -18
  51. package/session-distill/coverage.json +6 -0
  52. package/session-distill/distill.py +2575 -0
  53. package/session-distill/grammar/__init__.py +0 -0
  54. package/session-distill/grammar/owner_lines.py +874 -0
  55. package/session-distill/originators.json +9 -0
  56. package/session-distill/packets/cross_review.md +31 -0
  57. package/session-distill/packets/form.md +86 -0
  58. package/session-distill/packets/judge.md +81 -0
  59. package/session-distill/packets/placement_contract.md +90 -0
  60. package/session-distill/packets/propose.md +124 -0
  61. package/session-distill/packets/read.md +57 -0
  62. package/session-distill/packets/reconsider.md +53 -0
  63. package/session-distill/packets/s7b.md +65 -0
  64. package/session-distill/packets/s9b.md +39 -0
  65. package/session-distill/packets/stitch.md +35 -0
  66. package/session-distill/packets/sweep.md +33 -0
  67. package/session-distill/runlib/__init__.py +0 -0
  68. package/session-distill/runlib/bound.py +1102 -0
  69. package/session-distill/runlib/breaker.py +467 -0
  70. package/session-distill/runlib/census.py +2347 -0
  71. package/session-distill/runlib/claims.py +420 -0
  72. package/session-distill/runlib/controls.py +902 -0
  73. package/session-distill/runlib/coverage.py +881 -0
  74. package/session-distill/runlib/declare.py +888 -0
  75. package/session-distill/runlib/delivery_evidence.py +1145 -0
  76. package/session-distill/runlib/derive.py +812 -0
  77. package/session-distill/runlib/destinations.py +3072 -0
  78. package/session-distill/runlib/dispatch.py +7939 -0
  79. package/session-distill/runlib/drift.py +1077 -0
  80. package/session-distill/runlib/entry.py +401 -0
  81. package/session-distill/runlib/evidence.py +890 -0
  82. package/session-distill/runlib/exposure.py +1162 -0
  83. package/session-distill/runlib/gate.py +2727 -0
  84. package/session-distill/runlib/gitread.py +79 -0
  85. package/session-distill/runlib/inventory.py +19624 -0
  86. package/session-distill/runlib/journal.py +1919 -0
  87. package/session-distill/runlib/ledger.py +3210 -0
  88. package/session-distill/runlib/ledger_compat.py +101 -0
  89. package/session-distill/runlib/ledger_migration.py +190 -0
  90. package/session-distill/runlib/lifecycle_intake.py +693 -0
  91. package/session-distill/runlib/lineage.py +454 -0
  92. package/session-distill/runlib/measures.py +249 -0
  93. package/session-distill/runlib/monitor.py +1180 -0
  94. package/session-distill/runlib/operations.py +522 -0
  95. package/session-distill/runlib/packet.py +838 -0
  96. package/session-distill/runlib/placement.py +1769 -0
  97. package/session-distill/runlib/projection.py +4090 -0
  98. package/session-distill/runlib/ranking.py +740 -0
  99. package/session-distill/runlib/receipts.py +200 -0
  100. package/session-distill/runlib/records.py +1965 -0
  101. package/session-distill/runlib/search.py +249 -0
  102. package/session-distill/runlib/sequencing.py +829 -0
  103. package/session-distill/runlib/sources.py +641 -0
  104. package/session-distill/runlib/stage_adjudicate.py +845 -0
  105. package/session-distill/runlib/stage_apply.py +1378 -0
  106. package/session-distill/runlib/stage_approvals.py +758 -0
  107. package/session-distill/runlib/stage_close.py +1220 -0
  108. package/session-distill/runlib/stage_confirm.py +929 -0
  109. package/session-distill/runlib/stage_delivery.py +3080 -0
  110. package/session-distill/runlib/stage_form.py +2576 -0
  111. package/session-distill/runlib/stage_judge.py +4248 -0
  112. package/session-distill/runlib/stage_propose.py +3307 -0
  113. package/session-distill/runlib/stage_read.py +5179 -0
  114. package/session-distill/runlib/stage_render.py +2739 -0
  115. package/session-distill/runlib/stage_retrieve.py +924 -0
  116. package/session-distill/runlib/stage_review_korean.py +1002 -0
  117. package/session-distill/runlib/stage_review_proposals.py +1292 -0
  118. package/session-distill/runlib/stagelock.py +412 -0
  119. package/session-distill/runlib/stop.py +1061 -0
  120. package/session-distill/runlib/targets.py +809 -0
  121. package/session-distill/runlib/usage.py +280 -0
  122. package/session-distill/runlib/validate.py +319 -0
  123. package/session-distill/runlib/views.py +4327 -0
  124. package/session-distill/schemas/adjudication.schema.json +35 -0
  125. package/session-distill/schemas/approval.schema.json +35 -0
  126. package/session-distill/schemas/census.schema.json +128 -0
  127. package/session-distill/schemas/checks.schema.json +207 -0
  128. package/session-distill/schemas/claim.schema.json +16 -0
  129. package/session-distill/schemas/confirmation.schema.json +24 -0
  130. package/session-distill/schemas/coverage.schema.json +66 -0
  131. package/session-distill/schemas/cross_review.schema.json +24 -0
  132. package/session-distill/schemas/event.schema.json +20 -0
  133. package/session-distill/schemas/evidence.schema.json +20 -0
  134. package/session-distill/schemas/expected_observation.schema.json +18 -0
  135. package/session-distill/schemas/form.schema.json +103 -0
  136. package/session-distill/schemas/intake.schema.json +71 -0
  137. package/session-distill/schemas/inventory.schema.json +872 -0
  138. package/session-distill/schemas/judge.schema.json +77 -0
  139. package/session-distill/schemas/ledger.schema.json +313 -0
  140. package/session-distill/schemas/observation.schema.json +16 -0
  141. package/session-distill/schemas/propose.schema.json +555 -0
  142. package/session-distill/schemas/read.schema.json +76 -0
  143. package/session-distill/schemas/reconsider.schema.json +122 -0
  144. package/session-distill/schemas/run.schema.json +150 -0
  145. package/session-distill/schemas/s7b.schema.json +200 -0
  146. package/session-distill/schemas/s9b.schema.json +28 -0
  147. package/session-distill/schemas/stitch.schema.json +25 -0
  148. package/session-distill/schemas/sweep.schema.json +25 -0
  149. package/session-distill/seats.json +149 -0
  150. package/session-distill/tables/allowed_pairs.json +257 -0
  151. package/session-distill/tables/controls.json +30 -0
  152. package/session-distill/tables/delivery_evidence.json +36 -0
  153. package/session-distill/tables/delivery_evidence_fixtures.json +731 -0
  154. package/session-distill/tables/destinations.json +684 -0
  155. package/session-distill/tables/drift_layers.json +68 -0
  156. package/session-distill/tables/exposure_rules.json +192 -0
  157. package/session-distill/tables/placement_rules.json +148 -0
  158. package/session-distill/tables/propose_fixtures.json +154 -0
  159. package/session-distill/tables/ranking.json +194 -0
  160. package/session-distill/tables/redundancy.json +10 -0
  161. package/session-distill/tables/structural_rules.json +44 -0
  162. package/session-distill/tables/transition_fixtures.json +398 -0
  163. package/session-distill/tables/transitions.json +69 -0
  164. package/session-distill/tables/unit_outcome.json +67 -0
  165. package/session-distill/tables/unit_outcome_fixtures.json +2364 -0
  166. package/wrappers/claude-run.sh +481 -33
  167. package/wrappers/claude_hermetic_evidence.py +1423 -0
  168. package/wrappers/codex-helm.sh +44 -13
  169. package/wrappers/codex-run.sh +183 -20
  170. package/wrappers/codex_frame_filter.py +1199 -0
  171. package/wrappers/codex_protocol.py +737 -0
  172. package/wrappers/jsonl_lines.py +65 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "One row of adjudications.jsonl: design §10.1's fields. Each resolved judgment names the reference the review printed for its label (stage_render.disputed_of: `requirement/<name>`) and the owner's choice: judge A's side, judge B's, or the owner's own value (§10.1: 'the side chosen or the owner's own value'). `review_version_sha` and `decision_input_sha` bind it to the render and the copy, as the approval rows are bound; they are written always and not required, because the required set is §10.1's list exactly (plan WP-20 done-when 9).",
4
+ "title": "S10 adjudication",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["adjudication_id", "candidate_id", "resolved", "rationale"],
8
+ "properties": {
9
+ "adjudication_id": {"type": "string", "pattern": "^J-[0-9a-f]{16}(?![\\s\\S])"},
10
+ "candidate_id": {"$ref": "#/$defs/text"},
11
+ "resolved": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/resolution"}},
12
+ "rationale": {"$ref": "#/$defs/text"},
13
+ "review_version_sha": {"$ref": "#/$defs/sha256"},
14
+ "decision_input_sha": {"$ref": "#/$defs/sha256"}
15
+ },
16
+ "$defs": {
17
+ "text": {"type": "string", "minLength": 1},
18
+ "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}(?![\\s\\S])"},
19
+ "resolution": {
20
+ "type": "object", "additionalProperties": false, "required": ["judgment_ref", "choice"],
21
+ "properties": {
22
+ "judgment_ref": {"$ref": "#/$defs/text"},
23
+ "choice": {"$ref": "#/$defs/choice"}
24
+ }
25
+ },
26
+ "choice": {
27
+ "type": "object", "additionalProperties": false, "required": ["side", "value"],
28
+ "properties": {
29
+ "side": {"type": "string", "enum": ["A", "B", "own"]},
30
+ "value": {"$ref": "#/$defs/text"}
31
+ },
32
+ "$comment": "`value` is the value the derivation is recomputed with: the chosen judge's mark for A or B, the owner's for own."
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "One row of approvals.jsonl: design §10.1's fields, plus the plan's decision_input_sha (WP-20, settled S-11: the owner edits a copy of the render, and the copy's bytes are bound beside the render's). Release 1 runs no S8 (D-20261111-818391), so manifest_sha and results_sha carry the named state 'untested: s8_deferred', never null (lead decision E2). `alternative` is the S7b alternative a 수정 adopts (§10.1); `member_of` names the group row whose one decision line the row came from (the owner's legacy rule, relayed 2026-11-11).",
4
+ "title": "S10 approval",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["approval_id", "item_id", "item_sha", "review_version_sha", "configuration_sha", "manifest_sha",
8
+ "results_sha", "decision", "superseded_keeps", "note", "at", "decision_input_sha"],
9
+ "properties": {
10
+ "approval_id": {"type": "string", "pattern": "^A-[0-9a-f]{16}(?![\\s\\S])"},
11
+ "item_id": {"$ref": "#/$defs/text"},
12
+ "item_sha": {"$ref": "#/$defs/sha256"},
13
+ "review_version_sha": {"$ref": "#/$defs/sha256"},
14
+ "configuration_sha": {"$ref": "#/$defs/sha256"},
15
+ "manifest_sha": {"$ref": "#/$defs/s8_hash"},
16
+ "results_sha": {"$ref": "#/$defs/s8_hash"},
17
+ "decision": {"type": "string", "enum": ["approve", "revise", "defer", "reject", "adjudicate"]},
18
+ "superseded_keeps": {"type": "array", "items": {"$ref": "#/$defs/keep_release"}},
19
+ "note": {"type": "string"},
20
+ "at": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"},
21
+ "decision_input_sha": {"$ref": "#/$defs/sha256"},
22
+ "alternative": {"$ref": "#/$defs/text"},
23
+ "member_of": {"$ref": "#/$defs/text"}
24
+ },
25
+ "$defs": {
26
+ "text": {"type": "string", "minLength": 1},
27
+ "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}(?![\\s\\S])"},
28
+ "s8_hash": {"type": "string", "pattern": "^([0-9a-f]{64}|untested: s8_deferred)(?![\\s\\S])",
29
+ "$comment": "S8's manifest or results hash; in release 1 the named state, since no S8 ran."},
30
+ "keep_release": {
31
+ "type": "object", "additionalProperties": false, "required": ["record_id", "grounds"],
32
+ "properties": {"record_id": {"$ref": "#/$defs/text"}, "grounds": {"$ref": "#/$defs/text"}}
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §5.1; WP-05 interface (plan: Artifacts and interfaces)",
4
+ "title": "Census",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["kind", "window", "originator_table_sha256", "sources", "originators", "provenance", "pins",
8
+ "independence", "unowned", "pending_events", "transcripts"],
9
+ "$defs": {
10
+ "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
11
+ "count": {"type": "integer", "minimum": 0},
12
+ "files_and_records": {"type": "object", "additionalProperties": false, "required": ["files", "records"],
13
+ "properties": {"files": {"$ref": "#/$defs/count"}, "records": {"$ref": "#/$defs/count"}}},
14
+ "text": {"type": "string", "minLength": 1},
15
+ "ranges": {"type": "array", "items": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"type": "integer", "minimum": 0}}},
16
+ "source": {
17
+ "type": "object", "additionalProperties": false,
18
+ "required": ["state", "path", "discovered", "unrecognized", "totals", "detail"],
19
+ "properties": {
20
+ "state": {"type": "string", "enum": ["present", "missing", "undeclared", "unreadable"]},
21
+ "path": {"type": ["string", "null"]},
22
+ "discovered": {"type": ["integer", "null"], "minimum": 0},
23
+ "unrecognized": {"$ref": "#/$defs/count"},
24
+ "totals": {"type": ["object", "null"], "additionalProperties": false,
25
+ "patternProperties": {"^[a-z_]+$": {"$ref": "#/$defs/count"}}},
26
+ "detail": {"type": ["string", "null"]}
27
+ }
28
+ },
29
+ "edge": {
30
+ "type": "object", "additionalProperties": false, "required": ["from", "to", "via"],
31
+ "properties": {"from": {"$ref": "#/$defs/text"}, "to": {"$ref": "#/$defs/text"},
32
+ "via": {"type": "array", "items": {"type": "string", "minLength": 1}}}
33
+ },
34
+ "transcript": {
35
+ "type": "object", "additionalProperties": false,
36
+ "$comment": "A Claude row carries path, sha256, versions, owned and work and no segments; a Codex row carries them only per file, in segments (D-20261103-a7128a). The lint admits no conditional keyword, so census.account checks which host has which shape.",
37
+ "required": ["host", "id", "source", "status", "reason", "parent", "originator", "entrypoint",
38
+ "source_class", "lineage", "provenance", "counted", "window_overlap", "pin", "alt_paths"],
39
+ "properties": {
40
+ "host": {"enum": ["claude", "codex"]},
41
+ "id": {"$ref": "#/$defs/text"},
42
+ "source": {"$ref": "#/$defs/text"},
43
+ "path": {"type": ["string", "null"]},
44
+ "sha256": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
45
+ "status": {"type": "string", "enum": ["excluded", "child_of", "unknown_provenance", "unreadable", "known_absent",
46
+ "eligible", "read_complete", "read_partial", "failed", "deferred", "nothing_new"]},
47
+ "reason": {"type": ["string", "null"]},
48
+ "parent": {"type": ["string", "null"]},
49
+ "originator": {"type": ["string", "null"]},
50
+ "entrypoint": {"type": ["string", "null"]},
51
+ "source_class": {"enum": ["claude-cli", "claude-desktop", "codex-cli", "codex-desktop", null]},
52
+ "lineage": {
53
+ "type": "object", "additionalProperties": false,
54
+ "required": ["component", "root", "unique_root", "affirmed", "measurement_pending"],
55
+ "properties": {"component": {"type": ["string", "null"]}, "root": {"type": ["string", "null"]},
56
+ "unique_root": {"type": "boolean"}, "measurement_pending": {"type": "boolean"},
57
+ "affirmed": {"type": "array", "items": {"$ref": "#/$defs/edge"}}}
58
+ },
59
+ "provenance": {"enum": ["indexed", "not_indexed", "index_missing", null]},
60
+ "counted": {"type": "boolean"},
61
+ "window_overlap": {"enum": ["inside", "straddles_start", "straddles_end", "straddles_both", "context_only", "before_window", "undetermined", null]},
62
+ "pin": {"type": "object", "additionalProperties": false, "required": ["content_ref"],
63
+ "properties": {"content_ref": {"type": ["string", "null"]}}},
64
+ "versions": {"$ref": "#/$defs/versions"},
65
+ "owned": {"$ref": "#/$defs/ranges"},
66
+ "work": {"$ref": "#/$defs/work"},
67
+ "alt_paths": {"type": "array", "items": {"type": "string", "minLength": 1}},
68
+ "segments": {"type": "array", "items": {"$ref": "#/$defs/segment"}}
69
+ }
70
+ },
71
+ "segment": {
72
+ "type": "object", "additionalProperties": false,
73
+ "required": ["stem", "source", "path", "sha256", "versions", "owned", "work"],
74
+ "properties": {
75
+ "stem": {"$ref": "#/$defs/text"},
76
+ "source": {"$ref": "#/$defs/text"},
77
+ "path": {"type": ["string", "null"]},
78
+ "sha256": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
79
+ "versions": {"$ref": "#/$defs/versions"},
80
+ "owned": {"$ref": "#/$defs/ranges"},
81
+ "work": {"$ref": "#/$defs/work"}
82
+ }
83
+ },
84
+ "versions": {"type": "array", "items": {
85
+ "type": "object", "additionalProperties": false, "required": ["sha", "record_count", "prefix_sha"],
86
+ "properties": {"sha": {"$ref": "#/$defs/sha256"}, "record_count": {"$ref": "#/$defs/count"},
87
+ "prefix_sha": {"$ref": "#/$defs/sha256"}}}},
88
+ "work": {
89
+ "type": "object", "additionalProperties": false, "required": ["version", "in_window", "backlog"],
90
+ "properties": {"version": {"type": ["integer", "null"], "minimum": 0}, "in_window": {"$ref": "#/$defs/ranges"},
91
+ "backlog": {"type": "array", "items": {
92
+ "type": "object", "additionalProperties": false, "required": ["window", "version", "unread"],
93
+ "properties": {"window": {"$ref": "#/$defs/text"}, "version": {"$ref": "#/$defs/count"},
94
+ "unread": {"$ref": "#/$defs/ranges"}}}}}
95
+ }
96
+ },
97
+ "properties": {
98
+ "kind": {"type": "string", "enum": ["periodic", "targeted"]},
99
+ "window": {"$ref": "#/$defs/text"},
100
+ "originator_table_sha256": {"$ref": "#/$defs/sha256"},
101
+ "sources": {"type": "object", "additionalProperties": false, "patternProperties": {"^[a-z_]+$": {"$ref": "#/$defs/source"}}},
102
+ "originators": {"type": "object", "additionalProperties": false, "patternProperties": {"^.+$": {
103
+ "type": "object", "additionalProperties": false, "required": ["count", "class"],
104
+ "properties": {"count": {"$ref": "#/$defs/count"}, "class": {"$ref": "#/$defs/text"}}}}},
105
+ "provenance": {"type": "object", "additionalProperties": false, "patternProperties": {"^.+$": {
106
+ "type": "object", "additionalProperties": false, "required": ["indexed", "not_indexed", "index_missing"],
107
+ "properties": {"indexed": {"$ref": "#/$defs/count"}, "not_indexed": {"$ref": "#/$defs/count"},
108
+ "index_missing": {"$ref": "#/$defs/count"}}}}},
109
+ "pins": {"type": "object", "additionalProperties": false, "patternProperties": {"^[a-z_]+$": {
110
+ "type": "object", "additionalProperties": false, "required": ["eligible", "pinned"],
111
+ "properties": {"eligible": {"$ref": "#/$defs/count"}, "pinned": {"$ref": "#/$defs/count"}}}}},
112
+ "independence": {
113
+ "type": "object", "additionalProperties": false, "required": ["components", "unknown_components", "sessions", "unknown_sessions"],
114
+ "properties": {"components": {"$ref": "#/$defs/count"}, "unknown_components": {"$ref": "#/$defs/count"},
115
+ "sessions": {"$ref": "#/$defs/count"}, "unknown_sessions": {"$ref": "#/$defs/count"}}
116
+ },
117
+ "unowned": {
118
+ "$comment": "review c0fix r1 #1: records a window already run owns in a version no earlier version leads to - a file never read before, or one rewritten since - are owned by no run; the census counts them against earlier_windows, the windows it judged",
119
+ "type": "object", "additionalProperties": false, "required": ["earlier_windows", "rewritten", "first_seen"],
120
+ "properties": {"earlier_windows": {"$ref": "#/$defs/count"}, "rewritten": {"$ref": "#/$defs/files_and_records"},
121
+ "first_seen": {"$ref": "#/$defs/files_and_records"}}},
122
+ "pending_events": {"type": "array", "items": {
123
+ "type": "object", "additionalProperties": false, "required": ["id", "transcript", "version", "window", "first_record"],
124
+ "properties": {"id": {"$ref": "#/$defs/text"}, "transcript": {"$ref": "#/$defs/text"}, "version": {"$ref": "#/$defs/count"},
125
+ "window": {"$ref": "#/$defs/text"}, "first_record": {"$ref": "#/$defs/count"}}}},
126
+ "transcripts": {"type": "array", "items": {"$ref": "#/$defs/transcript"}}
127
+ }
128
+ }
@@ -0,0 +1,207 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "plan WP-10 Artifacts and design §6.2 (retrieval), §5.3 (counting), §6.4 (the absence an incomplete reference point withholds): checks.json, S5's one row per candidate of S4's population - the units and ledger entries retrieved for it, its quotes verified again, its sessions checked, its recurrence over the census's lineages - and the summary the driver prints. Names, ids, hashes, scores and counts only: no unit text, lesson or quote.",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["constants", "library", "ledger_index", "absence", "candidates", "summary"],
7
+ "properties": {
8
+ "constants": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "required": ["per_layer", "top_entries", "top_entries_basis", "indexed_class", "declared"],
12
+ "properties": {
13
+ "per_layer": {"type": "integer", "minimum": 1},
14
+ "top_entries": {"type": "integer", "minimum": 1},
15
+ "top_entries_basis": {"type": "string", "minLength": 1},
16
+ "indexed_class": {"type": "string", "minLength": 1},
17
+ "declared": {
18
+ "$comment": "plan WP-11: whether each count is the run's declaration (run.json retrieval) or S5's own default",
19
+ "type": "object", "additionalProperties": false, "required": ["per_layer", "top_entries"],
20
+ "properties": {"per_layer": {"type": "string", "enum": ["declared", "default"]},
21
+ "top_entries": {"type": "string", "enum": ["declared", "default"]}}
22
+ }
23
+ }
24
+ },
25
+ "library": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["indexed", "folded_copies", "not_indexed", "layers"],
29
+ "properties": {
30
+ "indexed": {"type": "integer", "minimum": 0},
31
+ "folded_copies": {"type": "integer", "minimum": 0},
32
+ "not_indexed": {"$ref": "#/$defs/counts_by_name"},
33
+ "layers": {"$ref": "#/$defs/counts_by_name"}
34
+ }
35
+ },
36
+ "ledger_index": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["entries", "read"],
40
+ "properties": {
41
+ "entries": {"type": "integer", "minimum": 0},
42
+ "read": {"type": "string", "minLength": 1}
43
+ }
44
+ },
45
+ "absence": {"$ref": "#/$defs/absence"},
46
+ "candidates": {"type": "array", "items": {"$ref": "#/$defs/candidate"}},
47
+ "summary": {
48
+ "$comment": "counts of the natural candidates (S4's); the planted controls of design §6.5 are reported apart, in controls.json and the driver's report",
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["candidates", "formed", "lifecycle", "retrieved_units", "named_units", "ledger_entries", "quotes_checked",
52
+ "quote_failed", "session_failed", "recurrence", "absence_withheld"],
53
+ "properties": {
54
+ "candidates": {"type": "integer", "minimum": 0},
55
+ "formed": {"type": "integer", "minimum": 0},
56
+ "lifecycle": {"type": "integer", "minimum": 0},
57
+ "retrieved_units": {"type": "integer", "minimum": 0},
58
+ "named_units": {"type": "integer", "minimum": 0},
59
+ "ledger_entries": {"type": "integer", "minimum": 0},
60
+ "quotes_checked": {"type": "integer", "minimum": 0},
61
+ "quote_failed": {"type": "integer", "minimum": 0},
62
+ "session_failed": {"type": "integer", "minimum": 0},
63
+ "recurrence": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["lineages", "sessions", "excluded"],
67
+ "properties": {
68
+ "lineages": {"type": "integer", "minimum": 0},
69
+ "sessions": {"type": "integer", "minimum": 0},
70
+ "excluded": {"$ref": "#/$defs/excluded_counts"}
71
+ }
72
+ },
73
+ "absence_withheld": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["candidates", "reason"],
77
+ "properties": {
78
+ "candidates": {"type": "integer", "minimum": 0},
79
+ "reason": {"type": ["string", "null"]}
80
+ }
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "$defs": {
86
+ "id": {"type": "string", "minLength": 1},
87
+ "ids": {"type": "array", "items": {"$ref": "#/$defs/id"}},
88
+ "counts_by_name": {
89
+ "$comment": "a count per layer or unit class, by its name",
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "patternProperties": {"^[a-z][a-z_]*$": {"type": "integer", "minimum": 0}}
93
+ },
94
+ "absence": {
95
+ "$comment": "design §6.2: an absence conclusion needs a complete reference point; at S5 that point is the current library the sweeps of WP-11 would read, held to the policy tables/unit_outcome.json names (derive.absence)",
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["reference", "policy", "complete", "unknown_layers"],
99
+ "properties": {
100
+ "reference": {"const": "current"},
101
+ "policy": {"type": "string", "minLength": 1},
102
+ "complete": {"type": "boolean"},
103
+ "unknown_layers": {"$ref": "#/$defs/ids"},
104
+ "withheld": {
105
+ "$comment": "the current reference point's withheld would-be units, summed over S2's layer rows (WP-11b X r1 (i)): the compiled instruction text is the owner's and is counted, never published; unmatched are the units this reference point cannot judge. Disclosure only",
106
+ "type": "object", "additionalProperties": false, "required": ["units", "matched", "unmatched"],
107
+ "properties": {"units": {"type": "integer", "minimum": 0}, "matched": {"type": "integer", "minimum": 0},
108
+ "unmatched": {"type": "integer", "minimum": 0}}}
109
+ }
110
+ },
111
+ "excluded": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["unknown_independence", "not_indexed", "not_counted", "not_in_census"],
115
+ "properties": {
116
+ "unknown_independence": {"$ref": "#/$defs/ids"},
117
+ "not_indexed": {"$ref": "#/$defs/ids"},
118
+ "not_counted": {"$ref": "#/$defs/ids"},
119
+ "not_in_census": {"$ref": "#/$defs/ids"}
120
+ }
121
+ },
122
+ "excluded_counts": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["unknown_independence", "not_indexed", "not_counted", "not_in_census"],
126
+ "properties": {
127
+ "unknown_independence": {"type": "integer", "minimum": 0},
128
+ "not_indexed": {"type": "integer", "minimum": 0},
129
+ "not_counted": {"type": "integer", "minimum": 0},
130
+ "not_in_census": {"type": "integer", "minimum": 0}
131
+ }
132
+ },
133
+ "candidate": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": ["candidate_id", "source", "query_keys", "retrieved_units", "named_units_absent", "ledger_entries",
137
+ "named_entries_absent", "recurrence", "quote_ok", "quotes_checked", "quote_problems", "session_problems",
138
+ "absence_withheld"],
139
+ "properties": {
140
+ "candidate_id": {"$ref": "#/$defs/id"},
141
+ "source": {"$ref": "#/$defs/id"},
142
+ "query_keys": {"type": "integer", "minimum": 0},
143
+ "retrieved_units": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["unit_id", "layer", "rank", "score", "named", "copies"],
149
+ "properties": {
150
+ "unit_id": {"$ref": "#/$defs/id"},
151
+ "layer": {"$ref": "#/$defs/id"},
152
+ "rank": {"type": ["integer", "null"], "minimum": 1},
153
+ "score": {"type": ["number", "null"]},
154
+ "named": {"type": "boolean"},
155
+ "copies": {"type": "integer", "minimum": 0}
156
+ }
157
+ }
158
+ },
159
+ "named_units_absent": {"$ref": "#/$defs/ids"},
160
+ "ledger_entries": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": ["entry_id", "status", "rank", "score", "named"],
166
+ "properties": {
167
+ "entry_id": {"$ref": "#/$defs/id"},
168
+ "status": {"type": ["string", "null"]},
169
+ "rank": {"type": ["integer", "null"], "minimum": 1},
170
+ "score": {"type": ["number", "null"]},
171
+ "named": {"type": "boolean"}
172
+ }
173
+ }
174
+ },
175
+ "named_entries_absent": {"$ref": "#/$defs/ids"},
176
+ "recurrence": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["count", "independent_sessions", "lineages", "excluded"],
180
+ "properties": {
181
+ "count": {"type": "integer", "minimum": 0},
182
+ "independent_sessions": {"$ref": "#/$defs/ids"},
183
+ "lineages": {
184
+ "type": "array",
185
+ "items": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "required": ["component", "root", "sessions"],
189
+ "properties": {
190
+ "component": {"$ref": "#/$defs/id"},
191
+ "root": {"$ref": "#/$defs/id"},
192
+ "sessions": {"$ref": "#/$defs/ids"}
193
+ }
194
+ }
195
+ },
196
+ "excluded": {"$ref": "#/$defs/excluded"}
197
+ }
198
+ },
199
+ "quote_ok": {"type": ["boolean", "null"]},
200
+ "quotes_checked": {"type": "integer", "minimum": 0},
201
+ "quote_problems": {"$ref": "#/$defs/ids"},
202
+ "session_problems": {"$ref": "#/$defs/ids"},
203
+ "absence_withheld": {"type": "boolean"}
204
+ }
205
+ }
206
+ }
207
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §3.3",
4
+ "title": "Claim record",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["claim_id", "fact", "interpretation", "uncertainty", "evidence_ids", "call_id"],
8
+ "properties": {
9
+ "claim_id": {"type": "string", "minLength": 1},
10
+ "fact": {"type": "string", "minLength": 1},
11
+ "interpretation": {"type": "string"},
12
+ "uncertainty": {"type": "string"},
13
+ "evidence_ids": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
14
+ "call_id": {"type": "string", "minLength": 1}
15
+ }
16
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "S10b's confirmation record (confirmation.json): design §10.3's binding of the approval ids to F's configuration_sha and the confirmation manifest and results hashes, which is what S11 applies; plus the plan's confirmation_id (code-generated), confirm_version (the confirmation version the owner decided), decision_input_sha (the owner's copy's sha256, as S10's approvals carry it) and at. Release 1 runs no S8 (D-20261111-818391), so results_sha carries the named state 'untested: s8_deferred', never null (lead decision E2); manifest_sha is the sha256 of confirm/v<k>/manifest.json as S10b's build part recorded it.",
4
+ "title": "S10b confirmation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["confirmation_id", "approval_ids", "configuration_sha", "manifest_sha", "results_sha", "confirm_version",
8
+ "decision_input_sha", "at"],
9
+ "properties": {
10
+ "confirmation_id": {"type": "string", "pattern": "^C-[0-9a-f]{16}(?![\\s\\S])"},
11
+ "approval_ids": {"type": "array", "minItems": 1, "uniqueItems": true,
12
+ "items": {"type": "string", "pattern": "^A-[0-9a-f]{16}(?![\\s\\S])"}},
13
+ "configuration_sha": {"$ref": "#/$defs/sha256"},
14
+ "manifest_sha": {"$ref": "#/$defs/sha256"},
15
+ "results_sha": {"type": "string", "pattern": "^([0-9a-f]{64}|untested: s8_deferred)(?![\\s\\S])",
16
+ "$comment": "The confirmation's results hash; in release 1 the named state, since no S8 ran."},
17
+ "confirm_version": {"type": "integer", "minimum": 1},
18
+ "decision_input_sha": {"$ref": "#/$defs/sha256"},
19
+ "at": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})(?![\\s\\S])"}
20
+ },
21
+ "$defs": {
22
+ "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}(?![\\s\\S])"}
23
+ }
24
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §5.2",
4
+ "title": "Coverage state",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["transcripts", "pending_events", "backlog", "windows"],
8
+ "$defs": {
9
+ "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
10
+ "count": {"type": "integer", "minimum": 0},
11
+ "ranges": {"type": "array", "items": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"type": "integer", "minimum": 0}}},
12
+ "version": {
13
+ "$comment": "design §5.2",
14
+ "type": "object", "additionalProperties": false,
15
+ "required": ["sha", "record_count", "prefix_sha", "read", "processed"],
16
+ "properties": {
17
+ "sha": {"$ref": "#/$defs/sha256"},
18
+ "record_count": {"$ref": "#/$defs/count"},
19
+ "prefix_sha": {"$ref": "#/$defs/sha256"},
20
+ "read": {"$ref": "#/$defs/ranges"},
21
+ "processed": {"type": "object", "additionalProperties": false, "patternProperties": {"^.+$": {"$ref": "#/$defs/ranges"}}}
22
+ }
23
+ },
24
+ "window_flags": {
25
+ "$comment": "design §5.2",
26
+ "type": "object", "additionalProperties": false,
27
+ "required": ["accounted", "fully_read"],
28
+ "properties": {"accounted": {"type": "boolean"}, "fully_read": {"type": "boolean"}}
29
+ },
30
+ "pending_event": {
31
+ "$comment": "design §5.2: the id is the design's; the rest places the event for the run that stitches it",
32
+ "type": "object", "additionalProperties": false,
33
+ "required": ["id", "transcript", "version", "window", "first_record"],
34
+ "properties": {
35
+ "id": {"type": "string", "minLength": 1},
36
+ "transcript": {"type": "string", "minLength": 1},
37
+ "version": {"$ref": "#/$defs/count"},
38
+ "window": {"type": "string", "minLength": 1},
39
+ "first_record": {"$ref": "#/$defs/count"}
40
+ }
41
+ },
42
+ "backlog_entry": {
43
+ "$comment": "design §5.2: the unread ranges are the design's; the rest says whose they are. status is the result that left them unread, or appended: records S1 found appended after their window was run (review c0fix r1 #1)",
44
+ "type": "object", "additionalProperties": false,
45
+ "required": ["transcript", "version", "window", "status", "unread"],
46
+ "properties": {
47
+ "transcript": {"type": "string", "minLength": 1},
48
+ "version": {"$ref": "#/$defs/count"},
49
+ "window": {"type": "string", "minLength": 1},
50
+ "status": {"type": "string", "enum": ["read_partial", "failed", "deferred", "appended"]},
51
+ "unread": {"$ref": "#/$defs/ranges"}
52
+ }
53
+ }
54
+ },
55
+ "properties": {
56
+ "transcripts": {
57
+ "type": "object", "additionalProperties": false,
58
+ "patternProperties": {"^.+$": {
59
+ "type": "object", "additionalProperties": false, "required": ["versions"],
60
+ "properties": {"versions": {"type": "array", "items": {"$ref": "#/$defs/version"}}}}}
61
+ },
62
+ "pending_events": {"type": "array", "items": {"$ref": "#/$defs/pending_event"}},
63
+ "backlog": {"type": "array", "items": {"$ref": "#/$defs/backlog_entry"}},
64
+ "windows": {"type": "object", "additionalProperties": false, "patternProperties": {"^.+$": {"$ref": "#/$defs/window_flags"}}}
65
+ }
66
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §6.2 (Judge B's review of an absence claim); plan WP-11 done-when 3 (F10): for one candidate the sweeps found no covering unit for, every unit either sweep marked as a partial match and fifty units both marked as none, sampled by code from the run id, each shown with both sweeps' marks and reasons. Every unit is named by the packet's own label (n); code turns labels back into stored ids and checks that every unit shown is judged exactly once (stage_judge.cross_problems). This schema holds the shape.",
4
+ "title": "S6 cross-review",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["verdicts"],
8
+ "properties": {
9
+ "verdicts": {"type": "array", "items": {"$ref": "#/$defs/verdict"}}
10
+ },
11
+ "$defs": {
12
+ "text": {"type": "string", "minLength": 1},
13
+ "match": {"type": "string", "enum": ["yes", "no"]},
14
+ "verdict": {
15
+ "type": "object", "additionalProperties": false, "required": ["unit", "situation", "action", "reason"],
16
+ "properties": {
17
+ "unit": {"type": "string", "pattern": "^n[1-9][0-9]*(?![\\s\\S])"},
18
+ "situation": {"$ref": "#/$defs/match"},
19
+ "action": {"$ref": "#/$defs/match"},
20
+ "reason": {"$ref": "#/$defs/text"}
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §5.4 (stitching); the field list is the implementation plan's WP-08 artifacts. outcome is pending only before the unit's stitch call, resolved or unresolved after it; stitched_from names the claims a stitch resolved it with, and is empty otherwise. carried_from is the coverage origin of an event an earlier run left pending, whose line this run writes when its stitch resolves it: it names no claim of its own (claim_ids empty), and only such a line may (claims.validate_record)",
4
+ "title": "Event record",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["event_id", "kind", "at_record", "claim_ids", "outcome", "description", "stitched_from"],
8
+ "dependentRequired": {"carried_from": []},
9
+ "properties": {
10
+ "event_id": {"type": "string", "minLength": 1},
11
+ "kind": {"type": "string", "minLength": 1},
12
+ "at_record": {"type": "string", "minLength": 1},
13
+ "claim_ids": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
14
+ "outcome": {"type": "string", "enum": ["resolved", "pending", "unresolved"]},
15
+ "description": {"type": "string", "minLength": 1},
16
+ "stitched_from": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
17
+ "carried_from": {"type": "object", "additionalProperties": false, "required": ["window", "first_record"],
18
+ "properties": {"window": {"type": "string", "minLength": 1}, "first_record": {"type": "integer", "minimum": 0}}}
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §5.5, plus window_role from design §5.2",
4
+ "title": "Evidence record",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["evidence_id", "source_copy", "version_sha", "line", "json_pointer", "char_span",
8
+ "redaction_version", "redacted_text", "window_role"],
9
+ "properties": {
10
+ "evidence_id": {"type": "string", "minLength": 1},
11
+ "source_copy": {"type": "string", "minLength": 1},
12
+ "version_sha": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
13
+ "line": {"type": "integer", "minimum": 1},
14
+ "json_pointer": {"type": "string", "pattern": "^(/[^/]*)*$"},
15
+ "char_span": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"type": "integer", "minimum": 0}},
16
+ "redaction_version": {"type": "string", "minLength": 1},
17
+ "redacted_text": {"type": "string"},
18
+ "window_role": {"type": "string", "pattern": "^(in_window|context|backlog\\(.+\\))$"}
19
+ }
20
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "design §7.3",
4
+ "title": "Expected observation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["occasion_criteria", "exposure_rule", "expected_behavior", "retrieval_terms", "expiry"],
8
+ "dependentRequired": {"counter": ["threshold"], "threshold": ["counter"]},
9
+ "properties": {
10
+ "occasion_criteria": {"type": "string", "minLength": 1},
11
+ "exposure_rule": {"type": "string", "minLength": 1},
12
+ "expected_behavior": {"type": "string", "minLength": 1},
13
+ "retrieval_terms": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
14
+ "expiry": {"type": "string", "minLength": 1},
15
+ "counter": {"type": "string", "minLength": 1},
16
+ "threshold": {"type": "number"}
17
+ }
18
+ }