open-research-protocol 0.4.5 → 0.4.6

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.
@@ -43,6 +43,8 @@ Use this loop when an AI agent is the primary operator of an ORP-enabled repo.
43
43
 
44
44
  ## 6. Checkpoint
45
45
 
46
+ - Before promoting a task/decision/hypothesis/experiment artifact into repo truth, validate its kernel shape:
47
+ - `orp kernel validate <artifact-path> --json`
46
48
  - Before handoff, compaction, or any meaningful git transition, write a checkpoint:
47
49
  - `orp checkpoint create -m "checkpoint note" --json`
48
50
  - If the current state should exist off-machine before you stop, hand off, or compact:
@@ -12,6 +12,7 @@ Keep one authoritative ORP contract for:
12
12
 
13
13
  - local repo governance
14
14
  - local project/session/runner state
15
+ - reasoning-kernel artifact schemas and validation semantics
15
16
  - hosted auth and hosted workspace operations
16
17
  - runner delivery, lease, and retry semantics
17
18
  - machine-readable JSON surfaces for agents and UI layers
@@ -149,7 +150,25 @@ This is the canonical client for:
149
150
  - runner polling/SSE wake-up
150
151
  - lease/claim/start/complete/cancel/retry behavior
151
152
 
152
- ### 5. Machine-Readable ORP Contract
153
+ ### 5. Reasoning Kernel
154
+
155
+ Commands:
156
+
157
+ - `orp kernel validate`
158
+ - `orp kernel scaffold`
159
+
160
+ Canonical schema path:
161
+
162
+ - `spec/v1/kernel.schema.json`
163
+
164
+ This surface defines:
165
+
166
+ - typed promotable artifact classes
167
+ - minimum structural completeness rules
168
+ - soft vs hard kernel validation semantics
169
+ - machine-readable kernel validation results in ORP runs
170
+
171
+ ### 6. Machine-Readable ORP Contract
153
172
 
154
173
  Preferred discovery surfaces:
155
174
 
@@ -0,0 +1,495 @@
1
+ # ORP Reasoning Kernel v0.1
2
+
3
+ Status: draft
4
+
5
+ This document defines the first ORP framing for a reasoning kernel that fits
6
+ the current CLI-first contract.
7
+
8
+ ## Purpose
9
+
10
+ The ORP Reasoning Kernel is the artifact-shaping grammar that interprets
11
+ intent, validates structure, and governs promotion into canonical repository
12
+ truth.
13
+
14
+ It should make three things true at once:
15
+
16
+ - humans can speak naturally at the boundary
17
+ - agents can reason structurally while operating
18
+ - repositories remain canonically legible over time
19
+
20
+ The kernel is not the repository's source of truth by itself. The repository's
21
+ canonical artifacts remain the source of truth. The kernel defines the shape
22
+ those artifacts must satisfy before ORP treats them as solid enough to trust,
23
+ reuse, test, and hand off.
24
+
25
+ Short form:
26
+
27
+ - natural language at the boundary
28
+ - kernel structure at promotion
29
+ - canonical artifacts at the core
30
+
31
+ Or even shorter:
32
+
33
+ - loose in, structured through, solid out
34
+
35
+ ## Why It Belongs In ORP
36
+
37
+ ORP already has most of the right boundary lines:
38
+
39
+ - the CLI is the canonical contract
40
+ - canonical artifacts are distinct from chat
41
+ - packets are process metadata, not evidence
42
+ - evidence remains in canonical artifact paths
43
+ - `structure_kernel` already exists as a named gate phase in the v1 schemas
44
+
45
+ That means the kernel should enter ORP as a protocol and artifact discipline,
46
+ not as a UI-only idea and not as a parallel chat system.
47
+
48
+ ## Non-Goals
49
+
50
+ The kernel should not become:
51
+
52
+ - a mandatory prompt rewriter for every user message
53
+ - a style police layer for normal English
54
+ - a second truth system outside repository artifacts
55
+ - a heavyweight blocker that turns ORP into bureaucracy
56
+ - an attempt to define one grand ontology for all human reasoning
57
+
58
+ ORP should stay fluid at intake and rigorous at promotion.
59
+
60
+ ## Core Model
61
+
62
+ The kernel should operate across three layers.
63
+
64
+ ### 1. Raw Intent
65
+
66
+ This is the boundary layer where humans and agents can remain loose.
67
+
68
+ Examples:
69
+
70
+ - a chat message
71
+ - a checkpoint note
72
+ - a bug report
73
+ - a design ask
74
+ - a quick research hypothesis
75
+ - a rough implementation request
76
+
77
+ Raw intent is allowed to be partial, ambiguous, and exploratory.
78
+
79
+ ### 2. Working Interpretation
80
+
81
+ This is the agent's kernel-shaped reading of the request. It is structured, but
82
+ still revisable.
83
+
84
+ Examples of working-interpretation fields:
85
+
86
+ - artifact class
87
+ - object
88
+ - goal
89
+ - boundary
90
+ - constraints
91
+ - invariants
92
+ - failure modes
93
+ - evidence expectations
94
+ - next action class
95
+ - candidate canonical target
96
+
97
+ This layer is not yet repository truth. It is the agent's current structured
98
+ map.
99
+
100
+ ### 3. Canonical Artifact
101
+
102
+ This is the layer ORP will trust as repository truth.
103
+
104
+ Examples:
105
+
106
+ - task card
107
+ - design decision
108
+ - hypothesis record
109
+ - experiment record
110
+ - checkpoint summary
111
+ - policy object
112
+ - result record
113
+
114
+ Artifacts become canonical only after they satisfy the kernel's typed
115
+ completeness rules.
116
+
117
+ ## Kernel Roles
118
+
119
+ The kernel should have three roles.
120
+
121
+ ### Interpreter
122
+
123
+ Turn natural language into structured intent.
124
+
125
+ Example:
126
+
127
+ - raw ask: "build the trace widget for terminal sessions so I can watch what
128
+ lanes are doing and quickly tell if one is drifting"
129
+ - interpreted structure:
130
+ - object: terminal trace widget
131
+ - goal: expose lane state and drift
132
+ - boundary: terminal-first orchestration UX
133
+ - failure mode: hidden drift and unclear status
134
+ - next action: spec then incremental implementation
135
+
136
+ ### Validator
137
+
138
+ Check whether a proposed artifact is structurally sufficient for its class.
139
+
140
+ ### Canonizer
141
+
142
+ Govern whether and how accepted work enters canonical repository artifacts.
143
+
144
+ The kernel does not replace repository truth. It controls the grammar for how
145
+ repository truth gets shaped.
146
+
147
+ ## Soft Mode And Hard Mode
148
+
149
+ This is the most important operating distinction.
150
+
151
+ ### Soft Mode
152
+
153
+ Used at intake and during ideation.
154
+
155
+ The kernel may:
156
+
157
+ - classify the request
158
+ - infer missing structure
159
+ - surface ambiguity
160
+ - suggest what is missing
161
+ - route the next action
162
+
163
+ The kernel should not block the user from speaking naturally.
164
+
165
+ ### Hard Mode
166
+
167
+ Used when work is promoted into canonical repository artifacts.
168
+
169
+ If something is going to become:
170
+
171
+ - a task card
172
+ - a design decision
173
+ - a hypothesis
174
+ - an experiment
175
+ - a policy object
176
+ - a checkpoint summary
177
+ - a stable result record
178
+
179
+ then it must satisfy the kernel's minimum structural rules for that artifact
180
+ class.
181
+
182
+ This gives ORP the right balance:
183
+
184
+ - ideation stays fluid
185
+ - repository truth stays solid
186
+
187
+ ## Kernel Primitives
188
+
189
+ These are the first useful cross-artifact fields.
190
+
191
+ - `artifact_class`
192
+ - `object`
193
+ - `goal`
194
+ - `boundary`
195
+ - `constraints`
196
+ - `invariants`
197
+ - `failure_modes`
198
+ - `evidence_expectations`
199
+ - `success_criteria`
200
+ - `next_action`
201
+ - `canonical_target`
202
+ - `artifact_refs`
203
+
204
+ Not every artifact class needs every field. The kernel should be typed.
205
+
206
+ ## Typed Artifact Classes
207
+
208
+ The kernel should start with a small set of artifact classes rather than trying
209
+ to model everything at once.
210
+
211
+ ### `task`
212
+
213
+ Minimum useful fields:
214
+
215
+ - object
216
+ - goal
217
+ - boundary
218
+ - constraints
219
+ - success_criteria
220
+
221
+ ### `decision`
222
+
223
+ Minimum useful fields:
224
+
225
+ - question
226
+ - chosen_path
227
+ - rejected_alternatives
228
+ - rationale
229
+ - consequences
230
+
231
+ ### `hypothesis`
232
+
233
+ Minimum useful fields:
234
+
235
+ - claim
236
+ - boundary
237
+ - assumptions
238
+ - test_path
239
+ - falsifiers
240
+
241
+ ### `experiment`
242
+
243
+ Minimum useful fields:
244
+
245
+ - objective
246
+ - method
247
+ - inputs
248
+ - outputs
249
+ - evidence_expectations
250
+ - interpretation_limits
251
+
252
+ ### `checkpoint`
253
+
254
+ Minimum useful fields:
255
+
256
+ - completed_unit
257
+ - current_state
258
+ - risks
259
+ - next_handoff_target
260
+ - artifact_refs
261
+
262
+ ### `policy`
263
+
264
+ Minimum useful fields:
265
+
266
+ - scope
267
+ - rule
268
+ - rationale
269
+ - invariants
270
+ - enforcement_surface
271
+
272
+ ### `result`
273
+
274
+ Minimum useful fields:
275
+
276
+ - claim
277
+ - evidence_paths
278
+ - status
279
+ - interpretation_limits
280
+ - next_follow_up
281
+
282
+ ## Kernel Operators
283
+
284
+ These are the actions an agent can take through the kernel.
285
+
286
+ ### Classify
287
+
288
+ Determine what kind of artifact or action is being requested.
289
+
290
+ ### Expand
291
+
292
+ Turn shorthand into a fuller structure.
293
+
294
+ ### Tighten
295
+
296
+ Remove ambiguity and define boundaries more explicitly.
297
+
298
+ ### Challenge
299
+
300
+ Surface assumptions, missing invariants, or weak success criteria.
301
+
302
+ ### Route
303
+
304
+ Choose the next action:
305
+
306
+ - explore
307
+ - implement
308
+ - critique
309
+ - test
310
+ - summarize
311
+ - ask
312
+ - update an artifact
313
+
314
+ ### Promote
315
+
316
+ Move working interpretation into canonical artifact form.
317
+
318
+ ### Downgrade
319
+
320
+ If verification or structure fails, lower the claim or keep it provisional.
321
+
322
+ ### Record
323
+
324
+ Write the appropriate process metadata and artifact references.
325
+
326
+ ## The Kernel Test
327
+
328
+ The kernel test is the minimum structural truth standard for promotion.
329
+
330
+ A proposed artifact passes the kernel test when another human or agent can tell:
331
+
332
+ - what it is
333
+ - why it exists
334
+ - what boundaries apply
335
+ - what assumptions it depends on
336
+ - what success or failure would look like
337
+ - where its evidence or dependent artifacts live
338
+
339
+ This should not be one giant universal checklist. It should be a typed test
340
+ based on artifact class.
341
+
342
+ Example:
343
+
344
+ A proposed task called `Build terminal drift monitor` is not yet solid enough.
345
+
346
+ Kernel questions:
347
+
348
+ - what is the object?
349
+ - what boundary defines the monitor?
350
+ - what signals does it consume?
351
+ - what counts as drift?
352
+ - what constraints exist?
353
+ - what invariants must hold?
354
+ - how will success be measured?
355
+ - what artifact should this produce?
356
+
357
+ After expansion:
358
+
359
+ - object: terminal lane drift monitor
360
+ - goal: reveal divergence between intended lane behavior and actual outputs
361
+ - inputs: lane logs, timing, state transitions, error events
362
+ - outputs: summarized health state and drill-down trace
363
+ - constraints: terminal-native, low overhead, no GUI dependency
364
+ - invariant: does not alter lane execution
365
+ - failure_modes: false positives, information overload, missing event capture
366
+ - success_criteria: operator identifies a stalled or drifting lane within ten
367
+ seconds
368
+ - canonical_target: monitor spec plus event schema plus sample logs
369
+
370
+ Now it is structurally legible enough to promote.
371
+
372
+ ## Relationship To Evidence
373
+
374
+ The kernel does not redefine ORP's evidence boundary.
375
+
376
+ It should reinforce it.
377
+
378
+ - packets remain process metadata
379
+ - summaries remain process metadata
380
+ - kernel traces remain process metadata
381
+ - evidence remains in canonical artifact paths such as code, data, papers,
382
+ proofs, logs, and experiment outputs
383
+
384
+ The kernel governs shape, not proof.
385
+
386
+ ## Relationship To Chat
387
+
388
+ Chat should not become source of truth by accident.
389
+
390
+ The correct split is:
391
+
392
+ - raw conversation is exploratory
393
+ - working interpretation is semi-structured
394
+ - canonical artifacts are the repository truth
395
+
396
+ This prevents chat from turning into a mushy, implicit spec layer.
397
+
398
+ ## CLI Integration Points
399
+
400
+ The kernel should live in the CLI contract, not in UI-only layers.
401
+
402
+ ### 1. `gate`
403
+
404
+ `structure_kernel` already exists as a gate phase in:
405
+
406
+ - `spec/v1/orp.config.schema.json`
407
+ - `spec/v1/packet.schema.json`
408
+
409
+ This is the most natural hard-mode enforcement surface.
410
+
411
+ The first kernel validations should plug in here.
412
+
413
+ ### 2. `checkpoint`
414
+
415
+ Checkpoint notes may stay natural-language, but ORP should eventually support a
416
+ kernel-shaped checkpoint summary for more reliable handoff.
417
+
418
+ ### 3. `packet`
419
+
420
+ Packets may record kernel validation status and artifact references as process
421
+ metadata only.
422
+
423
+ ### 4. `report`
424
+
425
+ Reports may render kernel-shaped summaries for human review, but should not
426
+ pretend that kernel structure is evidence.
427
+
428
+ ### 5. `ready`
429
+
430
+ Where readiness depends on canonical artifact quality, ORP may eventually
431
+ require kernel-valid promoted artifacts as part of the readiness bar.
432
+
433
+ ## Boundary With Rust And Web
434
+
435
+ Rust and web should reflect the kernel, not redefine it.
436
+
437
+ That means:
438
+
439
+ - kernel schema and validation rules belong in the CLI
440
+ - Rust may expose kernel views, prompts, or editing affordances
441
+ - web may expose kernel-backed artifact cards and review surfaces
442
+ - neither Rust nor web should invent competing kernel semantics
443
+
444
+ This follows the same boundary already established for link, session, runner,
445
+ and governance truth.
446
+
447
+ ## First Implementation Slice
448
+
449
+ The right v0.1 implementation slice is intentionally small.
450
+
451
+ ### Phase 1
452
+
453
+ - add this design note
454
+ - add a machine-readable kernel schema in `spec/v1/kernel.schema.json`
455
+ - define typed artifact classes and required fields
456
+
457
+ ### Phase 2
458
+
459
+ - allow optional kernel blocks in process artifacts
460
+ - expose kernel validation results in run artifacts and packets
461
+ - make `structure_kernel` a real validation lane in `gate`
462
+
463
+ ### Phase 3
464
+
465
+ - add explicit CLI surfaces such as:
466
+ - `orp kernel validate`
467
+ - `orp kernel explain`
468
+ - `orp kernel promote`
469
+
470
+ These should be optional helpers, not mandatory user-facing prompt wrappers.
471
+
472
+ ## Design Discipline
473
+
474
+ The kernel should enter ORP operationally, not metaphysically.
475
+
476
+ Start with:
477
+
478
+ - a small number of artifact classes
479
+ - a small number of required fields
480
+ - a promotion test
481
+ - clear validation semantics
482
+
483
+ Do not begin by trying to encode all human reasoning.
484
+
485
+ ## Canonical Statement
486
+
487
+ The clean ORP statement for this model is:
488
+
489
+ The ORP Reasoning Kernel defines the shape of truth, while canonical artifacts
490
+ remain the source of truth.
491
+
492
+ Or, in product language:
493
+
494
+ Natural language at the boundary. Kernel structure at promotion. Canonical
495
+ artifacts at the core.
@@ -8,6 +8,8 @@ These files are intentionally **minimal** and **illustrative**.
8
8
 
9
9
  Additional v1 runtime draft examples:
10
10
 
11
+ - `orp.reasoning-kernel.starter.yml` — minimal kernel-aware profile showing a real `structure_kernel` gate.
12
+ - `kernel/trace-widget.task.kernel.yml` — example typed kernel artifact for a promotable task.
11
13
  - `orp.sunflower-coda.atomic.yml` — discovery-first profile for atomic board workflows.
12
14
  - `orp.sunflower-coda.live-compare.yml` — side-by-side gate-compare profiles for sunflower Problems 857/20/367.
13
15
  - `orp.sunflower-coda.pr-governance.yml` — local-first PR governance profile set (pre-open, draft-readiness, full flow).
@@ -0,0 +1,18 @@
1
+ schema_version: "1.0.0"
2
+ artifact_class: task
3
+ object: terminal trace widget
4
+ goal: reveal lane state and drift fast enough for a human operator to act
5
+ boundary:
6
+ - terminal-first orchestration workflow
7
+ - session and lane visibility only
8
+ constraints:
9
+ - low friction in the terminal
10
+ - must not alter lane execution
11
+ - should remain useful without GUI affordances
12
+ success_criteria:
13
+ - operator can identify a stalled or drifting lane within ten seconds
14
+ canonical_target:
15
+ - docs/TRACE_WIDGET_SPEC.md
16
+ artifact_refs:
17
+ - docs/TRACE_WIDGET_SPEC.md
18
+ - analysis/trace-widget-sample-output.txt
@@ -0,0 +1,61 @@
1
+ version: "1"
2
+
3
+ project:
4
+ name: reasoning-kernel-starter
5
+ repo_root: .
6
+ canonical_paths:
7
+ code: src/
8
+ analysis: analysis/
9
+
10
+ lifecycle:
11
+ claim_status_map:
12
+ Draft: draft
13
+ In review: ready
14
+ Verified: reviewed
15
+ Blocked: blocked
16
+ Retracted: retracted
17
+ atom_status_map:
18
+ todo: draft
19
+ in_progress: ready
20
+ blocked: blocked
21
+ done: reviewed
22
+
23
+ gates:
24
+ - id: trace_widget_task_shape
25
+ description: Validate that the trace-widget request has been promoted into a solid task artifact.
26
+ phase: structure_kernel
27
+ command: echo ORP_KERNEL_OK
28
+ pass:
29
+ exit_codes: [0]
30
+ stdout_must_contain:
31
+ - ORP_KERNEL_OK
32
+ kernel:
33
+ mode: hard
34
+ artifacts:
35
+ - path: examples/kernel/trace-widget.task.kernel.yml
36
+ artifact_class: task
37
+ evidence:
38
+ status: process_only
39
+ note: The kernel artifact captures task structure for promotion, not evidence.
40
+ paths:
41
+ - examples/kernel/trace-widget.task.kernel.yml
42
+ on_fail: stop
43
+
44
+ - id: smoke
45
+ description: Basic starter smoke gate.
46
+ phase: verification
47
+ command: echo ORP_SMOKE
48
+ pass:
49
+ exit_codes: [0]
50
+ stdout_must_contain:
51
+ - ORP_SMOKE
52
+ on_fail: stop
53
+
54
+ profiles:
55
+ default:
56
+ description: Minimal kernel-aware starter profile.
57
+ mode: discovery
58
+ packet_kind: problem_scope
59
+ gate_ids:
60
+ - trace_widget_task_shape
61
+ - smoke
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-research-protocol",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "ORP CLI (Open Research Protocol): agent-friendly research workflows, runtime, reports, and pack tooling.",
5
5
  "license": "MIT",
6
6
  "repository": {