open-research-protocol 0.4.25 → 0.4.27
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/AGENT_INTEGRATION.md +15 -5
- package/CHANGELOG.md +60 -0
- package/README.md +30 -13
- package/bin/orp.js +21 -14
- package/cli/orp.py +3343 -96
- package/docs/AGENT_LOOP.md +9 -0
- package/docs/RESEARCH_COUNCIL.md +171 -0
- package/docs/START_HERE.md +22 -9
- package/package.json +1 -1
- package/packages/orp-workspace-launcher/src/orp-command.js +54 -0
- package/packages/orp-workspace-launcher/test/orp-command.test.js +1 -0
- package/scripts/orp-mcp +256 -0
- package/spec/v1/project-context.schema.json +223 -0
- package/spec/v1/research-run.schema.json +245 -0
package/AGENT_INTEGRATION.md
CHANGED
|
@@ -40,20 +40,24 @@ If the agent only remembers one ORP loop, it should be this:
|
|
|
40
40
|
```bash
|
|
41
41
|
orp status --json
|
|
42
42
|
```
|
|
43
|
-
3.
|
|
43
|
+
3. classify dirty worktree state before expansion
|
|
44
|
+
```bash
|
|
45
|
+
orp hygiene --json
|
|
46
|
+
```
|
|
47
|
+
4. resolve the right secret
|
|
44
48
|
```bash
|
|
45
49
|
orp secrets ensure --alias <alias> --provider <provider> --current-project --json
|
|
46
50
|
```
|
|
47
|
-
|
|
51
|
+
5. inspect the current frontier
|
|
48
52
|
```bash
|
|
49
53
|
orp frontier state --json
|
|
50
54
|
```
|
|
51
|
-
|
|
55
|
+
6. if the work feels confusing or too large, break it down before moving
|
|
52
56
|
```bash
|
|
53
57
|
orp mode breakdown granular-breakdown --json
|
|
54
58
|
```
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
7. do the next honest move
|
|
60
|
+
8. checkpoint it honestly
|
|
57
61
|
```bash
|
|
58
62
|
orp checkpoint create -m "checkpoint note" --json
|
|
59
63
|
```
|
|
@@ -62,6 +66,7 @@ That is the ORP rhythm in one line:
|
|
|
62
66
|
|
|
63
67
|
- recover continuity
|
|
64
68
|
- inspect repo safety
|
|
69
|
+
- classify dirty state and stop if anything is unowned
|
|
65
70
|
- resolve access
|
|
66
71
|
- inspect context
|
|
67
72
|
- break down complexity when comprehension would help
|
|
@@ -98,6 +103,11 @@ artifact paths (code/data/proofs/logs/papers).
|
|
|
98
103
|
- Treat **failed paths** as assets: record dead ends as a `Failed Path Record` with the blocking reason/counterexample and a
|
|
99
104
|
next hook.
|
|
100
105
|
- Resolve disputes by **verification or downgrade**, not argument.
|
|
106
|
+
- Run `orp hygiene --json` before long delegation, after material writeback, before API/remote/paid compute, and when dirty
|
|
107
|
+
state grows unexpectedly.
|
|
108
|
+
- Stop long-running expansion while hygiene reports `dirty_unclassified`; classify, refresh generated surfaces, canonicalize
|
|
109
|
+
useful scratch, or write a blocker before continuing.
|
|
110
|
+
- Hygiene is non-destructive: never reset, checkout, or delete files merely to hide dirty state.
|
|
101
111
|
|
|
102
112
|
### How to work in an ORP repo
|
|
103
113
|
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,66 @@ There was no prior in-repo changelog file, so the first formal entry starts
|
|
|
6
6
|
with the currently shipped `v0.4.4` release and summarizes the full release
|
|
7
7
|
delta reflected in this repo.
|
|
8
8
|
|
|
9
|
+
## v0.4.27 - 2026-04-18
|
|
10
|
+
|
|
11
|
+
This release adds a staged OpenAI research profile and default-on worktree
|
|
12
|
+
hygiene for agent loops. ORP-initialized repos now teach agents when to stop,
|
|
13
|
+
classify dirty paths, refresh generated surfaces, canonicalize scratch, or
|
|
14
|
+
write a blocker instead of letting unowned worktree state become invisible.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added the built-in `deep-think-web-think-deep` research profile: Deep
|
|
19
|
+
Research, high-reasoning think, think plus web synthesis, high-reasoning
|
|
20
|
+
think, and a final Deep Research pass.
|
|
21
|
+
- Added profile listing/show commands and MCP exposure so Codex-like clients
|
|
22
|
+
can discover staged research templates and fill project-specific fields.
|
|
23
|
+
- Added `orp hygiene --json` and the `orp workspace hygiene --json` alias for
|
|
24
|
+
non-destructive worktree classification with dirty counts, categories,
|
|
25
|
+
unclassified and scratch counts, required action, and recommended next checks.
|
|
26
|
+
- Added `orp/hygiene-policy.json` scaffolding during `orp init` so each project
|
|
27
|
+
can customize canonical surfaces, artifact roots, scratch paths, and
|
|
28
|
+
classification rules.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Updated ORP agent docs, generated handoffs, agent policy, project context,
|
|
33
|
+
home/about metadata, and workspace help to include the hygiene stop rule:
|
|
34
|
+
no long-running expansion while dirty paths are unclassified.
|
|
35
|
+
- Research runs now persist generated lane prompts and can pass prior lane
|
|
36
|
+
outputs into later staged prompts while skipping live later-stage calls when
|
|
37
|
+
prerequisites are incomplete.
|
|
38
|
+
|
|
39
|
+
## v0.4.26 - 2026-04-17
|
|
40
|
+
|
|
41
|
+
This release adds ORP-native project context and OpenAI research-loop support,
|
|
42
|
+
so agents can initialize a directory, keep its operating lens refreshed, and
|
|
43
|
+
use explicit high-reasoning or web-synthesis API calls only when the local
|
|
44
|
+
loop needs them.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- Added `orp project refresh` and `orp project show` for `orp/project.json`,
|
|
49
|
+
a process-only project context lens that records authority surfaces,
|
|
50
|
+
directory signals, evolution policy, and research call timing.
|
|
51
|
+
- Added `orp research ask`, `orp research status`, and `orp research show` for
|
|
52
|
+
durable OpenAI research runs with dry-run planning by default and explicit
|
|
53
|
+
`--execute` live calls.
|
|
54
|
+
- Added a tiny `scripts/orp-mcp` stdio wrapper exposing the research commands
|
|
55
|
+
as MCP tools for Codex-like clients.
|
|
56
|
+
- Added versioned schemas for research runs and project context artifacts.
|
|
57
|
+
- Added `orp secrets keychain-add` so users can save a local machine OpenAI key
|
|
58
|
+
or other provider credential without relying on hosted secret storage.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- Updated `orp init`, `orp status`, `orp about`, and `orp home` to expose the
|
|
63
|
+
project context lifecycle as a first-class ORP surface.
|
|
64
|
+
- Documented the research timing rule: decompose locally first, call high
|
|
65
|
+
reasoning for ambiguous decision gates, call web synthesis for current public
|
|
66
|
+
facts and citations, and reserve Deep Research for heavier source conflicts
|
|
67
|
+
or literature-scale synthesis.
|
|
68
|
+
|
|
9
69
|
## v0.4.25 - 2026-04-16
|
|
10
70
|
|
|
11
71
|
This release strengthens ORP continuation handling for long-running delegated
|
package/README.md
CHANGED
|
@@ -307,7 +307,7 @@ The practical model is:
|
|
|
307
307
|
|
|
308
308
|
## Secrets Quick Start
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
ORP secrets can live in the hosted ORP secret inventory, with optional local macOS Keychain caching, or directly in the local ORP Keychain registry when you need a machine-local store immediately. For hosted secrets, start with:
|
|
311
311
|
|
|
312
312
|
```bash
|
|
313
313
|
orp auth login
|
|
@@ -335,6 +335,18 @@ For an agent or script, use stdin:
|
|
|
335
335
|
printf '%s' 'sk-...' | orp secrets add --alias openai-primary --label "OpenAI Primary" --provider openai --value-stdin
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
+
For a local-only machine secret, use the ORP Keychain path:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
printf '%s' 'sk-...' | orp secrets keychain-add --alias openai-primary --label "OpenAI Primary" --provider openai --env-var-name OPENAI_API_KEY --value-stdin
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
If the key is already in the current process environment:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
orp secrets keychain-add --alias openai-primary --label "OpenAI Primary" --provider openai --env-var-name OPENAI_API_KEY --from-env
|
|
348
|
+
```
|
|
349
|
+
|
|
338
350
|
If a service needs both a username and a secret, store the username with it:
|
|
339
351
|
|
|
340
352
|
```bash
|
|
@@ -376,6 +388,7 @@ For secrets, the simplest plain-English rule is:
|
|
|
376
388
|
- `orp secrets show ...` = inspect one saved key record
|
|
377
389
|
- `orp secrets resolve ...` = get the key value for use right now
|
|
378
390
|
- `orp secrets ensure ...` = use the saved key if it exists, otherwise create it
|
|
391
|
+
- `orp secrets keychain-add ...` = save or update a machine-local ORP secret in macOS Keychain
|
|
379
392
|
- `orp secrets sync-keychain ...` = keep a secure local Mac copy too
|
|
380
393
|
|
|
381
394
|
You can ignore `--env-var-name` at first. It is optional metadata like `OPENAI_API_KEY`, not the key itself.
|
|
@@ -444,6 +457,7 @@ orp workspace remove-tab main --path /absolute/path/to/project
|
|
|
444
457
|
orp workspace sync main
|
|
445
458
|
orp secrets list --json
|
|
446
459
|
orp secrets ensure --alias openai-primary --provider openai --current-project --json
|
|
460
|
+
orp secrets keychain-add --alias openai-primary --provider openai --env-var-name OPENAI_API_KEY --value-stdin --json
|
|
447
461
|
orp secrets sync-keychain openai-primary --json
|
|
448
462
|
orp schedule add codex --name morning-summary --prompt "Summarize this repo" --json
|
|
449
463
|
```
|
|
@@ -530,6 +544,7 @@ The bridge package lives at `packages/lifeops-orp/`.
|
|
|
530
544
|
Stable artifact paths:
|
|
531
545
|
|
|
532
546
|
- `orp/state.json`
|
|
547
|
+
- `orp/project.json`
|
|
533
548
|
- `orp/artifacts/<run_id>/RUN.json`
|
|
534
549
|
- `orp/artifacts/<run_id>/RUN_SUMMARY.md`
|
|
535
550
|
- `orp/packets/<packet_id>.json`
|
|
@@ -542,26 +557,28 @@ Stable artifact paths:
|
|
|
542
557
|
1. Copy this folder into your repo (recommended location: `orp/`).
|
|
543
558
|
2. Link to `orp/PROTOCOL.md` from your repo `README.md`.
|
|
544
559
|
3. Customize **Canonical Paths** inside `orp/PROTOCOL.md` to match your repo layout.
|
|
545
|
-
4. Run `orp init` in the repo root to establish ORP governance.
|
|
560
|
+
4. Run `orp init` in the repo root to establish ORP governance and create `orp/project.json`.
|
|
546
561
|
5. If you keep many repos under one umbrella directory, run `orp agents root set /absolute/path/to/projects` once and let `orp init --projects-root /absolute/path/to/projects` link each child repo back to that parent guidance.
|
|
547
562
|
6. Use `orp agents audit` whenever you want to confirm `AGENTS.md` and `CLAUDE.md` are still aligned without overwriting human notes.
|
|
548
|
-
7. Use `orp
|
|
549
|
-
8. Use
|
|
550
|
-
9.
|
|
563
|
+
7. Use `orp project refresh --json` after adding or changing roadmap, spec, agent-guidance, docs, manifest, or command-surface files.
|
|
564
|
+
8. Use `orp status`, `orp branch start`, `orp checkpoint create`, and `orp backup` as the default implementation loop.
|
|
565
|
+
9. Use the templates for all new claims and verifications.
|
|
566
|
+
10. Optional (agent users): integrate ORP into your agent’s primary instruction file (see `orp/AGENT_INTEGRATION.md`).
|
|
551
567
|
|
|
552
568
|
## Quick start (new project)
|
|
553
569
|
|
|
554
570
|
1. Copy this folder into a new project directory.
|
|
555
571
|
2. If you keep projects under one umbrella directory, run `orp agents root set /absolute/path/to/projects` once from anywhere.
|
|
556
|
-
3. Run `orp init` immediately so the repo starts ORP-governed
|
|
572
|
+
3. Run `orp init` immediately so the repo starts ORP-governed, scaffolds or updates `AGENTS.md` and `CLAUDE.md`, and creates `orp/project.json`.
|
|
557
573
|
4. Edit `PROTOCOL.md` to define your canonical paths and claim labels.
|
|
558
|
-
5. Run `orp
|
|
559
|
-
6.
|
|
560
|
-
7.
|
|
561
|
-
8.
|
|
562
|
-
9.
|
|
563
|
-
10.
|
|
564
|
-
11.
|
|
574
|
+
5. Run `orp project refresh --json` whenever the directory gains new roadmap, spec, docs, manifest, or command-surface files.
|
|
575
|
+
6. Run `orp agents audit` to confirm the repo-level agent files are aligned and still preserving human notes.
|
|
576
|
+
7. Start implementation on a work branch with `orp branch start`.
|
|
577
|
+
8. Create regular checkpoint commits with `orp checkpoint create`.
|
|
578
|
+
9. Use `orp backup` whenever you want ORP to capture current work to a dedicated remote backup ref.
|
|
579
|
+
10. Validate promotable task/decision/hypothesis artifacts with `orp kernel validate <path> --json`.
|
|
580
|
+
11. Start by adding one small claim + verification record using the templates.
|
|
581
|
+
12. Optional (agent users): integrate ORP into your agent’s primary instruction file (see `AGENT_INTEGRATION.md`).
|
|
565
582
|
|
|
566
583
|
**Activation is procedural/social, not runtime:** nothing “turns on” automatically. ORP works only if contributors follow it.
|
|
567
584
|
|
package/bin/orp.js
CHANGED
|
@@ -36,24 +36,14 @@ async function runWorkspace(args) {
|
|
|
36
36
|
process.exit(code == null ? 0 : code);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
if (argv[0] === "compute") {
|
|
41
|
-
await runCompute(argv.slice(1));
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (argv[0] === "workspace") {
|
|
45
|
-
await runWorkspace(argv.slice(1));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const captureOutput = isTopLevelHelp(argv);
|
|
39
|
+
function runPythonCli(args, { captureOutput }) {
|
|
50
40
|
let lastErr = null;
|
|
51
41
|
|
|
52
42
|
for (const py of candidates) {
|
|
53
|
-
const
|
|
43
|
+
const pyArgs = py === "py" ? ["-3", cliPath, ...args] : [cliPath, ...args];
|
|
54
44
|
const result = spawnSync(
|
|
55
45
|
py,
|
|
56
|
-
|
|
46
|
+
pyArgs,
|
|
57
47
|
captureOutput
|
|
58
48
|
? { encoding: "utf8" }
|
|
59
49
|
: { stdio: "inherit" },
|
|
@@ -68,7 +58,7 @@ async function main() {
|
|
|
68
58
|
process.stderr.write(result.stderr);
|
|
69
59
|
}
|
|
70
60
|
if (result.status === 0) {
|
|
71
|
-
process.stdout.write("\nAdditional wrapper surface:\n orp compute -h\n orp workspace tabs -h\n");
|
|
61
|
+
process.stdout.write("\nAdditional wrapper surface:\n orp compute -h\n orp workspace tabs -h\n orp workspace hygiene --json\n");
|
|
72
62
|
}
|
|
73
63
|
}
|
|
74
64
|
process.exit(result.status == null ? 1 : result.status);
|
|
@@ -88,6 +78,23 @@ async function main() {
|
|
|
88
78
|
process.exit(1);
|
|
89
79
|
}
|
|
90
80
|
|
|
81
|
+
async function main() {
|
|
82
|
+
if (argv[0] === "compute") {
|
|
83
|
+
await runCompute(argv.slice(1));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (argv[0] === "workspace" && argv[1] === "hygiene") {
|
|
87
|
+
runPythonCli(["hygiene", ...argv.slice(2)], { captureOutput: false });
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (argv[0] === "workspace") {
|
|
91
|
+
await runWorkspace(argv.slice(1));
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
runPythonCli(argv, { captureOutput: isTopLevelHelp(argv) });
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
main().catch((error) => {
|
|
92
99
|
console.error(String(error && error.stack ? error.stack : error));
|
|
93
100
|
process.exit(1);
|