open-research-protocol 0.3.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 (94) hide show
  1. package/AGENT_INTEGRATION.md +94 -0
  2. package/INSTALL.md +159 -0
  3. package/LICENSE +22 -0
  4. package/PROTOCOL.md +140 -0
  5. package/README.md +312 -0
  6. package/bin/orp.js +38 -0
  7. package/cli/orp.py +3595 -0
  8. package/cone/CONTEXT_LOG.md +33 -0
  9. package/docs/AGENT_LOOP.md +63 -0
  10. package/docs/CHOOSING_OR_IGNORING_INSTRUMENTS.md +128 -0
  11. package/docs/CODA_ORP_CONTRACT.md +222 -0
  12. package/docs/CORE_ABILITY_REFOCUS_CHECKLIST.md +62 -0
  13. package/docs/DISCOVER.md +69 -0
  14. package/docs/EXTERNAL_CONTRIBUTION_GOVERNANCE.md +275 -0
  15. package/docs/MATHLIB_COLLABORATION_FLOW_PROMPT.md +112 -0
  16. package/docs/NPM_RELEASE_CHECKLIST.md +55 -0
  17. package/docs/ORP_V1_ATOMIC_DISCOVERY_EVOLUTION.md +186 -0
  18. package/docs/OSS_CONTRIBUTION_AGENT_LOOP.md +69 -0
  19. package/docs/PRESENTATION_BOW.md +100 -0
  20. package/docs/PROFILE_PACKS.md +227 -0
  21. package/docs/SUNFLOWER_CODA_PR_GOVERNANCE_MAPPING.md +77 -0
  22. package/docs/WHY_INSTRUMENTS.md +118 -0
  23. package/examples/README.md +21 -0
  24. package/examples/example_claim.md +33 -0
  25. package/examples/example_failed.md +24 -0
  26. package/examples/example_verification.md +36 -0
  27. package/examples/orp.erdos-problems.catalog.yml +88 -0
  28. package/examples/orp.external-pr-governance.yml +223 -0
  29. package/examples/orp.sunflower-coda.atomic.yml +144 -0
  30. package/examples/orp.sunflower-coda.live-compare.yml +181 -0
  31. package/examples/orp.sunflower-coda.pr-governance.yml +253 -0
  32. package/examples/packet.problem_scope.example.json +123 -0
  33. package/examples/reports/README.md +16 -0
  34. package/examples/reports/sunflower_live_compare_20.RUN_SUMMARY.md +37 -0
  35. package/examples/reports/sunflower_live_compare_367.RUN_SUMMARY.md +37 -0
  36. package/examples/reports/sunflower_live_compare_857.RUN_SUMMARY.md +37 -0
  37. package/llms.txt +58 -0
  38. package/modules/instruments/ADVERSARIAL/README.md +109 -0
  39. package/modules/instruments/ADVERSARIAL/TEMPLATE.md +27 -0
  40. package/modules/instruments/COMPRESSION/README.md +112 -0
  41. package/modules/instruments/COMPRESSION/TEMPLATE.md +27 -0
  42. package/modules/instruments/INSTRUMENT_TEMPLATE.md +30 -0
  43. package/modules/instruments/ORBIT/README.md +124 -0
  44. package/modules/instruments/ORBIT/TEMPLATE.md +28 -0
  45. package/modules/instruments/README.md +179 -0
  46. package/package.json +54 -0
  47. package/packs/README.md +16 -0
  48. package/packs/erdos-open-problems/README.md +287 -0
  49. package/packs/erdos-open-problems/data/README.md +43 -0
  50. package/packs/erdos-open-problems/data/erdos_open_problems.md +697 -0
  51. package/packs/erdos-open-problems/data/erdos_problems.active.json +15561 -0
  52. package/packs/erdos-open-problems/data/erdos_problems.all.json +26289 -0
  53. package/packs/erdos-open-problems/data/erdos_problems.closed.json +10760 -0
  54. package/packs/erdos-open-problems/data/erdos_problems.open.json +15561 -0
  55. package/packs/erdos-open-problems/docs/SUNFLOWER_ADAPTER_DEPENDENCIES.md +63 -0
  56. package/packs/erdos-open-problems/pack.yml +131 -0
  57. package/packs/erdos-open-problems/profiles/erdos-problems-catalog-sync.yml.tmpl +99 -0
  58. package/packs/erdos-open-problems/profiles/sunflower-live-compare.yml.tmpl +188 -0
  59. package/packs/erdos-open-problems/profiles/sunflower-mathlib-pr-governance.yml.tmpl +253 -0
  60. package/packs/erdos-open-problems/profiles/sunflower-problem857-discovery-public-repo.yml.tmpl +152 -0
  61. package/packs/erdos-open-problems/profiles/sunflower-problem857-discovery.yml.tmpl +154 -0
  62. package/packs/external-pr-governance/README.md +116 -0
  63. package/packs/external-pr-governance/adapters/formal-conjectures/README.md +35 -0
  64. package/packs/external-pr-governance/adapters/mathlib/README.md +37 -0
  65. package/packs/external-pr-governance/pack.yml +146 -0
  66. package/packs/external-pr-governance/profiles/oss-feedback-hardening.yml.tmpl +92 -0
  67. package/packs/external-pr-governance/profiles/oss-pr-governance.yml.tmpl +233 -0
  68. package/packs/issue-smashers/README.md +92 -0
  69. package/packs/issue-smashers/adapters/formal-conjectures/README.md +17 -0
  70. package/packs/issue-smashers/adapters/generic-github/README.md +16 -0
  71. package/packs/issue-smashers/adapters/mathlib/README.md +32 -0
  72. package/packs/issue-smashers/bootstrap/README.md +19 -0
  73. package/packs/issue-smashers/bootstrap/setup-issue-smashers.sh +18 -0
  74. package/packs/issue-smashers/examples/issue-smashers.workspace.yml +24 -0
  75. package/packs/issue-smashers/pack.yml +178 -0
  76. package/packs/issue-smashers/profiles/issue-smashers-feedback-hardening.yml.tmpl +102 -0
  77. package/packs/issue-smashers/profiles/issue-smashers.yml.tmpl +258 -0
  78. package/scripts/npm-postinstall-check.js +31 -0
  79. package/scripts/orp +11 -0
  80. package/scripts/orp-agent-integrate.sh +197 -0
  81. package/scripts/orp-checkpoint.sh +184 -0
  82. package/scripts/orp-erdos-problems-sync.py +580 -0
  83. package/scripts/orp-init.sh +50 -0
  84. package/scripts/orp-pack-fetch.py +155 -0
  85. package/scripts/orp-pack-install.py +2273 -0
  86. package/scripts/orp-pack-render.py +188 -0
  87. package/spec/v1/LIFECYCLE_MAPPING.md +40 -0
  88. package/spec/v1/orp.config.schema.json +385 -0
  89. package/spec/v1/packet.schema.json +552 -0
  90. package/spec/v1/profile-pack.schema.json +95 -0
  91. package/templates/CLAIM.md +33 -0
  92. package/templates/FAILED_TOPIC.md +19 -0
  93. package/templates/ISSUE_TEMPLATE.md +22 -0
  94. package/templates/VERIFICATION_RECORD.md +34 -0
@@ -0,0 +1,287 @@
1
+ # Erdos Open Problems Pack
2
+
3
+ Domain pack for sunflower/Erdos workflows.
4
+
5
+ This pack is designed to preserve ORP core generality:
6
+
7
+ - `catalog` works in any repo.
8
+ - `live_compare`, `problem857`, and `governance` are optional adapters that depend on sunflower-coda style scripts/boards.
9
+
10
+ ## Included templates
11
+
12
+ - `sunflower_live_compare_suite`
13
+ - Side-by-side gate compare profiles for Problems 857/20/367.
14
+ - `sunflower_problem857_discovery`
15
+ - Discovery-first atomic gating profile for Problem 857.
16
+ - `sunflower_mathlib_pr_governance`
17
+ - Local-first PR governance profiles aligned to mathlib submission workflow:
18
+ - pre-open policy/viability/naturality checks
19
+ - draft-readiness local gate/tighten/freeze/PR-body hygiene
20
+ - end-to-end full flow
21
+ - `erdos_problems_catalog_sync`
22
+ - Sync profile that ingests all Erdos problems from `erdosproblems.com` and publishes:
23
+ - `erdos_problems.all.json`
24
+ - `erdos_problems.open.json`
25
+ - `erdos_problems.closed.json`
26
+ - `erdos_problems.active.json` (open by default)
27
+
28
+ ## Required variable
29
+
30
+ - `TARGET_REPO_ROOT`
31
+ - Absolute path to the target repo where scripts/boards live.
32
+
33
+ ## Recommended install flow (CLI)
34
+
35
+ List packs:
36
+
37
+ ```bash
38
+ ./scripts/orp pack list
39
+ ```
40
+
41
+ If ORP is installed globally via npm, use `orp pack list`.
42
+
43
+ Install all pack components into a target repo and write dependency audit:
44
+
45
+ ```bash
46
+ orp pack install \
47
+ --pack-id erdos-open-problems
48
+ ```
49
+
50
+ If developing ORP locally, the equivalent command is `./scripts/orp pack install ...`.
51
+
52
+ Fetch this pack from a remote pack repo via CLI:
53
+
54
+ ```bash
55
+ orp pack fetch \
56
+ --source https://github.com/example/orp-packs.git \
57
+ --pack-id erdos-open-problems \
58
+ --install-target .
59
+ ```
60
+
61
+ Install public-only component:
62
+
63
+ ```bash
64
+ orp pack install \
65
+ --pack-id erdos-open-problems \
66
+ --include catalog
67
+ ```
68
+
69
+ Clean-room public catalog cycle:
70
+
71
+ ```bash
72
+ orp pack install \
73
+ --pack-id erdos-open-problems \
74
+ --include catalog
75
+
76
+ orp --config orp.erdos-catalog-sync.yml \
77
+ gate run --profile erdos_catalog_sync_active
78
+
79
+ orp report summary
80
+ ```
81
+
82
+ This is the simplest pack-backed research cycle validated from the published npm package in a fresh directory.
83
+
84
+ Clean-room public Problem 857 cycle:
85
+
86
+ ```bash
87
+ orp pack install \
88
+ --pack-id erdos-open-problems \
89
+ --include problem857
90
+
91
+ orp erdos sync \
92
+ --problem-id 857 \
93
+ --out-problem-dir analysis/erdos_problems/selected
94
+
95
+ orp --config orp.erdos-problem857.yml \
96
+ gate run --profile sunflower_problem857_discovery
97
+
98
+ orp report summary
99
+ ```
100
+
101
+ In this public lane, `spec_faithfulness` is no longer a stub. It validates that the synced `erdos_problem.857.json` payload, the installed scope YAML, and the starter board all target the same problem.
102
+
103
+ Empty repo to real updated Problem 857 workspace:
104
+
105
+ ```bash
106
+ orp pack install \
107
+ --pack-id erdos-open-problems \
108
+ --include problem857 \
109
+ --var PROBLEM857_SOURCE_MODE=public_repo \
110
+ --var PROBLEM857_PUBLIC_REPO_URL=https://github.com/SproutSeeds/sunflower-lean
111
+
112
+ orp erdos sync \
113
+ --problem-id 857 \
114
+ --out-problem-dir analysis/erdos_problems/selected
115
+
116
+ orp --config orp.erdos-problem857.yml \
117
+ gate run --profile sunflower_problem857_discovery
118
+
119
+ orp report summary
120
+ ```
121
+
122
+ This mode syncs the real public `sunflower-lean` repo into `sunflower_lean/` instead of writing starter-only 857 scaffolding. ORP then generates the 857 bridge files it owns (`analysis/`, `docs/`, `scripts/`, and `orchestrator/`) so the public consistency check and frontier loop do not depend on private repo structure.
123
+
124
+ Enforce strict adapter readiness:
125
+
126
+ ```bash
127
+ orp pack install \
128
+ --pack-id erdos-open-problems \
129
+ --target-repo-root /path/to/sunflower-coda/repo \
130
+ --include live_compare \
131
+ --include problem857 \
132
+ --include governance \
133
+ --no-bootstrap \
134
+ --strict-deps
135
+ ```
136
+
137
+ Dependency matrix:
138
+
139
+ - `docs/SUNFLOWER_ADAPTER_DEPENDENCIES.md`
140
+
141
+ Optional:
142
+
143
+ - `ORP_TIMEOUT_SEC` (default `1200`)
144
+ - `PROBLEM857_LEAN_BUILD_COMMAND` (default `lake build SunflowerLean.Balance`)
145
+ - `PROBLEM857_SOURCE_MODE` (default `starter`; use `public_repo` to sync the public `sunflower-lean` repo plus ORP bridge files)
146
+ - `PROBLEM857_PUBLIC_REPO_URL` (default `https://github.com/SproutSeeds/sunflower-lean`)
147
+ - `PROBLEM857_PUBLIC_REPO_REF` (default `main`)
148
+ - `MATHLIB_REPO_ROOT` (default `$HOME/Documents/code/mathlib4`)
149
+ - `MATHLIB_GITHUB_REPO` (default `leanprover-community/mathlib4`)
150
+ - `MATHLIB_GITHUB_AUTHOR` (default `SproutSeeds`)
151
+ - `DEFAULT_PR_BODY_FILE` (default `analysis/MATHLIB_DRAFT_PR_BODY.md`)
152
+ - `READY_TO_DRAFT_NOTE` (default `micro-pass complete: naming/docstring-tone/readability`)
153
+ - `UPSTREAM_SUBMISSION_MODE` (default `hold`)
154
+ - `MAX_PRS_PER_SESSION` (default `2`)
155
+ - `REQUIRE_EXPLICIT_APPROVAL` (default `True`)
156
+ - `ORP_NATURALITY_MODULE` (required for governance profiles; no default)
157
+ - `ORP_REPO_ROOT` (default `.`)
158
+ - `ERDOS_SOURCE_URL` (default `https://erdosproblems.com/range/1-end`)
159
+ - `ERDOS_DATA_SUBDIR` (default `analysis/erdos_problems`)
160
+ - `ERDOS_OPEN_LIST_FILE` (default `analysis/erdos_problems/erdos_open_problems.md`)
161
+ - `ERDOS_TIMEOUT_SEC` (default `90`)
162
+ - `ERDOS_ACTIVE_STATUS` (default `open`)
163
+
164
+ ## Render examples (manual / advanced)
165
+
166
+ List templates:
167
+
168
+ ```bash
169
+ python3 scripts/orp-pack-render.py --pack packs/erdos-open-problems --list
170
+ ```
171
+
172
+ Render live compare config:
173
+
174
+ ```bash
175
+ python3 scripts/orp-pack-render.py \
176
+ --pack packs/erdos-open-problems \
177
+ --template sunflower_live_compare_suite \
178
+ --var TARGET_REPO_ROOT=/path/to/sunflower-coda/repo \
179
+ --out /path/to/sunflower-coda/repo/orp.erdos-live-compare.yml
180
+ ```
181
+
182
+ Render 857 discovery config:
183
+
184
+ ```bash
185
+ python3 scripts/orp-pack-render.py \
186
+ --pack packs/erdos-open-problems \
187
+ --template sunflower_problem857_discovery \
188
+ --var TARGET_REPO_ROOT=/path/to/sunflower-coda/repo \
189
+ --out /path/to/sunflower-coda/repo/orp.erdos-problem857.yml
190
+ ```
191
+
192
+ Render mathlib PR governance config:
193
+
194
+ ```bash
195
+ python3 scripts/orp-pack-render.py \
196
+ --pack packs/erdos-open-problems \
197
+ --template sunflower_mathlib_pr_governance \
198
+ --var TARGET_REPO_ROOT=/path/to/sunflower-coda/repo \
199
+ --out /path/to/sunflower-coda/repo/orp.erdos-mathlib-pr-governance.yml
200
+ ```
201
+
202
+ Render Erdos catalog sync config:
203
+
204
+ ```bash
205
+ python3 scripts/orp-pack-render.py \
206
+ --pack packs/erdos-open-problems \
207
+ --template erdos_problems_catalog_sync \
208
+ --var TARGET_REPO_ROOT=/path/to/sunflower-coda/repo \
209
+ --var ORP_REPO_ROOT=/path/to/orp \
210
+ --out /path/to/sunflower-coda/repo/orp.erdos-catalog-sync.yml
211
+ ```
212
+
213
+ ## Run with ORP
214
+
215
+ ```bash
216
+ orp --repo-root /path/to/scratch-repo --config /path/to/sunflower-coda/repo/orp.erdos-live-compare.yml \
217
+ gate run --profile sunflower_live_compare_857
218
+
219
+ orp --repo-root /path/to/scratch-repo report summary --run-id <run_id>
220
+ ```
221
+
222
+ PR-governance run examples:
223
+
224
+ ```bash
225
+ export ORP_ISSUE_NUMBER=34959
226
+ export ORP_BRANCH_NAME=cody/issue-34959-cancellation-bounds
227
+ export ORP_NATURALITY_MODULE=Mathlib/Combinatorics/SetFamily/Shade
228
+ export ORP_PR_BODY_FILE=/path/to/sunflower-coda/repo/analysis/MATHLIB_DRAFT_PR_BODY.md
229
+
230
+ orp --repo-root /path/to/scratch-repo --config /path/to/sunflower-coda/repo/orp.erdos-mathlib-pr-governance.yml \
231
+ gate run --profile sunflower_mathlib_pre_open
232
+
233
+ orp --repo-root /path/to/scratch-repo --config /path/to/sunflower-coda/repo/orp.erdos-mathlib-pr-governance.yml \
234
+ gate run --profile sunflower_mathlib_draft_readiness
235
+ ```
236
+
237
+ Catalog sync run (open-default active set):
238
+
239
+ ```bash
240
+ orp --repo-root /path/to/scratch-repo --config /path/to/sunflower-coda/repo/orp.erdos-catalog-sync.yml \
241
+ gate run --profile erdos_catalog_sync_active
242
+ ```
243
+
244
+ Look up specific problem links/status:
245
+
246
+ ```bash
247
+ orp erdos sync \
248
+ --problem-id 857 \
249
+ --problem-id 20 \
250
+ --out-problem-dir /path/to/sunflower-coda/repo/analysis/erdos_problems/selected
251
+ ```
252
+
253
+ Use closed or all as active set:
254
+
255
+ ```bash
256
+ python3 scripts/orp-pack-render.py \
257
+ --pack packs/erdos-open-problems \
258
+ --template erdos_problems_catalog_sync \
259
+ --var TARGET_REPO_ROOT=/path/to/sunflower-coda/repo \
260
+ --var ORP_REPO_ROOT=/path/to/orp \
261
+ --var ERDOS_ACTIVE_STATUS=all \
262
+ --out /path/to/sunflower-coda/repo/orp.erdos-catalog-sync.all.yml
263
+ ```
264
+
265
+ ## Included snapshots
266
+
267
+ This pack includes a baseline snapshot in `data/` generated by:
268
+
269
+ ```bash
270
+ ./scripts/orp erdos sync
271
+ ```
272
+
273
+ See `data/README.md` for file semantics.
274
+
275
+ ## Daily refresh (optional)
276
+
277
+ Run daily via cron:
278
+
279
+ ```bash
280
+ 0 6 * * * cd /path/to/orp && ./scripts/orp erdos sync
281
+ ```
282
+
283
+ This refreshes all/open/closed/active JSON snapshots and `erdos_open_problems.md`.
284
+
285
+ Optional GitHub Actions schedule:
286
+
287
+ - `.github/workflows/erdos-catalog-refresh.yml`
@@ -0,0 +1,43 @@
1
+ # Erdos Catalog Data Snapshots
2
+
3
+ This directory stores canonical snapshots produced by:
4
+
5
+ `scripts/orp-erdos-problems-sync.py`
6
+
7
+ Files:
8
+
9
+ - `erdos_problems.all.json`
10
+ - Full catalog snapshot from `https://erdosproblems.com/range/1-end`.
11
+ - `erdos_problems.open.json`
12
+ - Problems with `status_bucket=open`.
13
+ - `erdos_problems.closed.json`
14
+ - Problems with `status_bucket=closed`.
15
+ - `erdos_problems.active.json`
16
+ - Active subset selected by `--active-status` (default `open`).
17
+ - `erdos_open_problems.md`
18
+ - Direct-link list of open problems for quick browsing and daily refresh workflows.
19
+
20
+ Each file includes:
21
+
22
+ - source URL and source hash
23
+ - solve-count metadata reported by the site
24
+ - summary counts
25
+ - sorted problem records with status/statement/tags/formalization metadata
26
+
27
+ Refresh command:
28
+
29
+ ```bash
30
+ ./scripts/orp erdos sync
31
+ ```
32
+
33
+ Set active subset to all:
34
+
35
+ ```bash
36
+ ./scripts/orp erdos sync --active-status all
37
+ ```
38
+
39
+ Lookup one or more specific problems and print links:
40
+
41
+ ```bash
42
+ ./scripts/orp erdos sync --problem-id 857 --problem-id 20
43
+ ```