erdos-problems 0.2.1 → 0.2.2
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/README.md +45 -0
- package/package.json +1 -1
- package/packs/graph-theory/README.md +17 -0
- package/packs/graph-theory/problems/1008/CHECKPOINT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/1008/CONTEXT.md +9 -0
- package/packs/graph-theory/problems/1008/FRONTIER_NOTE.md +8 -0
- package/packs/graph-theory/problems/1008/OPS_DETAILS.yaml +25 -0
- package/packs/graph-theory/problems/1008/REPORT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/1008/ROUTE_HISTORY.md +5 -0
- package/packs/graph-theory/problems/1008/ROUTE_PACKET.yaml +13 -0
- package/packs/graph-theory/problems/1008/context.yaml +27 -0
- package/packs/graph-theory/problems/19/CHECKPOINT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/19/CONTEXT.md +9 -0
- package/packs/graph-theory/problems/19/FRONTIER_NOTE.md +8 -0
- package/packs/graph-theory/problems/19/OPS_DETAILS.yaml +25 -0
- package/packs/graph-theory/problems/19/REPORT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/19/ROUTE_HISTORY.md +5 -0
- package/packs/graph-theory/problems/19/ROUTE_PACKET.yaml +13 -0
- package/packs/graph-theory/problems/19/context.yaml +25 -0
- package/packs/graph-theory/problems/22/CHECKPOINT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/22/CONTEXT.md +9 -0
- package/packs/graph-theory/problems/22/FRONTIER_NOTE.md +8 -0
- package/packs/graph-theory/problems/22/OPS_DETAILS.yaml +25 -0
- package/packs/graph-theory/problems/22/REPORT_TEMPLATE.md +9 -0
- package/packs/graph-theory/problems/22/ROUTE_HISTORY.md +5 -0
- package/packs/graph-theory/problems/22/ROUTE_PACKET.yaml +13 -0
- package/packs/graph-theory/problems/22/context.yaml +26 -0
- package/packs/number-theory/README.md +3 -0
- package/src/cli/index.js +15 -5
- package/src/commands/archive.js +10 -1
- package/src/commands/cluster.js +15 -1
- package/src/commands/graph-theory.js +180 -0
- package/src/commands/number-theory.js +107 -2
- package/src/commands/workspace.js +39 -1
- package/src/runtime/graph-theory.js +167 -0
- package/src/runtime/number-theory.js +60 -0
- package/src/runtime/state.js +31 -0
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ Official binary:
|
|
|
22
22
|
- workspace `.erdos/` state for active-problem selection, upstream refreshes, scaffolds, and pull bundles
|
|
23
23
|
- sunflower cluster as the first deep harness pack
|
|
24
24
|
- quartet-aware sunflower context for `20`, `536`, `856`, and `857`
|
|
25
|
+
- number-theory starter cockpit as the first lighter non-sunflower pack
|
|
26
|
+
- graph-theory archive cockpit as the first archive/decision pack outside sunflower
|
|
25
27
|
- packaged atomic/bridge board packets for the full sunflower quartet
|
|
26
28
|
- packaged compute-lane metadata for deep sunflower problems, surfaced directly in the CLI
|
|
27
29
|
- seeded atlas now includes open and solved problems beyond sunflower
|
|
@@ -36,6 +38,7 @@ Native dossier count:
|
|
|
36
38
|
Pack coverage:
|
|
37
39
|
- sunflower pack: `4`
|
|
38
40
|
- number-theory starter cockpit: `2`
|
|
41
|
+
- graph-theory archive cockpit: `3`
|
|
39
42
|
|
|
40
43
|
## First-run flow
|
|
41
44
|
|
|
@@ -50,6 +53,7 @@ erdos sunflower routes 857
|
|
|
50
53
|
erdos sunflower tickets 857
|
|
51
54
|
erdos dossier show 857
|
|
52
55
|
erdos number-theory status 1
|
|
56
|
+
erdos graph-theory status 1008
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
For an unseeded problem, the one-step self-seeding flow is now:
|
|
@@ -254,6 +258,9 @@ erdos number-theory status 1
|
|
|
254
258
|
erdos number-theory frontier 1
|
|
255
259
|
erdos number-theory routes 1
|
|
256
260
|
erdos number-theory tickets 1
|
|
261
|
+
erdos number-theory route 1 distinct_subset_sum_lower_bound
|
|
262
|
+
erdos number-theory ticket 1 N1
|
|
263
|
+
erdos number-theory atom 1 N1.G1.A1
|
|
257
264
|
erdos number-theory status 2 --json
|
|
258
265
|
```
|
|
259
266
|
|
|
@@ -262,6 +269,28 @@ The number-theory pack is intentionally lighter than sunflower:
|
|
|
262
269
|
- explicit route/frontier/ticket packet layer
|
|
263
270
|
- honest archive posture for disproved problems
|
|
264
271
|
|
|
272
|
+
## Graph-theory archive cockpit
|
|
273
|
+
|
|
274
|
+
The next family pack is a deliberately honest archive/decision cockpit for seeded graph-theory problems:
|
|
275
|
+
- `19`: decision archive cockpit
|
|
276
|
+
- `22`: proof archive cockpit
|
|
277
|
+
- `1008`: Lean-facing proof archive cockpit
|
|
278
|
+
|
|
279
|
+
Useful graph-theory commands:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
erdos graph-theory status 19
|
|
283
|
+
erdos graph-theory frontier 22
|
|
284
|
+
erdos graph-theory routes 1008
|
|
285
|
+
erdos graph-theory tickets 1008
|
|
286
|
+
erdos graph-theory status 1008 --json
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The graph-theory pack is intentionally archive-first:
|
|
290
|
+
- no fake open frontier for solved or decided problems
|
|
291
|
+
- route/ticket packets exist to preserve archive discipline, not to cosplay theorem pressure
|
|
292
|
+
- the public job is to keep solved/decided records reusable as method exemplars and clean references
|
|
293
|
+
|
|
265
294
|
## Archive mode
|
|
266
295
|
|
|
267
296
|
Solved problems can now be treated as method exemplars instead of dead entries.
|
|
@@ -320,7 +349,9 @@ erdos problem artifacts 857 --json
|
|
|
320
349
|
erdos cluster list
|
|
321
350
|
erdos cluster show sunflower
|
|
322
351
|
erdos cluster show number-theory
|
|
352
|
+
erdos cluster show graph-theory
|
|
323
353
|
erdos workspace show
|
|
354
|
+
erdos workspace show --json
|
|
324
355
|
erdos orp show
|
|
325
356
|
erdos orp sync
|
|
326
357
|
erdos sunflower status 857
|
|
@@ -338,6 +369,13 @@ erdos number-theory status 1
|
|
|
338
369
|
erdos number-theory frontier 1
|
|
339
370
|
erdos number-theory routes 1
|
|
340
371
|
erdos number-theory tickets 1
|
|
372
|
+
erdos number-theory route 1 distinct_subset_sum_lower_bound
|
|
373
|
+
erdos number-theory ticket 1 N1
|
|
374
|
+
erdos number-theory atom 1 N1.G1.A1
|
|
375
|
+
erdos graph-theory status 1008
|
|
376
|
+
erdos graph-theory frontier 22
|
|
377
|
+
erdos graph-theory routes 1008
|
|
378
|
+
erdos graph-theory tickets 19
|
|
341
379
|
erdos sunflower status --json
|
|
342
380
|
erdos dossier show
|
|
343
381
|
erdos upstream show
|
|
@@ -404,8 +442,15 @@ For number-theory starter-cockpit problems, the CLI now also surfaces:
|
|
|
404
442
|
- pack README context
|
|
405
443
|
- per-problem context files under `packs/number-theory/problems/<id>/`
|
|
406
444
|
- route packets, frontier notes, route histories, checkpoint/report templates, and ops-detail packets
|
|
445
|
+
- route/ticket/atom drill-down packets through `erdos number-theory route|ticket|atom`
|
|
407
446
|
- archive posture for disproved problems through `erdos number-theory status`
|
|
408
447
|
|
|
448
|
+
For graph-theory archive-cockpit problems, the CLI now also surfaces:
|
|
449
|
+
- pack README context
|
|
450
|
+
- per-problem context files under `packs/graph-theory/problems/<id>/`
|
|
451
|
+
- route packets, frontier notes, route histories, checkpoint/report templates, and ops-detail packets
|
|
452
|
+
- archive and decision posture through `erdos graph-theory status|frontier|routes|tickets`
|
|
453
|
+
|
|
409
454
|
## Notes
|
|
410
455
|
|
|
411
456
|
- `erdos-problems` is the canonical npm package name.
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Graph-Theory Pack
|
|
2
|
+
|
|
3
|
+
Archive and decision cockpit for graph-theory problems in `erdos-problems`.
|
|
4
|
+
|
|
5
|
+
Current seeded cockpit problems:
|
|
6
|
+
- `19`: decision/archive cockpit around the chromatic-number record
|
|
7
|
+
- `22`: proof archive cockpit around the Ramsey-Turan `K_4` construction record
|
|
8
|
+
- `1008`: Lean-facing proof archive cockpit for the `C_4`-free density problem
|
|
9
|
+
|
|
10
|
+
Useful commands:
|
|
11
|
+
- `erdos graph-theory status 19`
|
|
12
|
+
- `erdos graph-theory frontier 22`
|
|
13
|
+
- `erdos graph-theory routes 1008`
|
|
14
|
+
- `erdos graph-theory tickets 1008`
|
|
15
|
+
|
|
16
|
+
Design rule:
|
|
17
|
+
- keep this pack honest as an archive/decision cockpit until a real open graph-theory frontier earns deeper gated flow
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Problem 1008 Graph-Theory Pack Context
|
|
2
|
+
|
|
3
|
+
Role in pack:
|
|
4
|
+
- Lean-facing proof archive for the `C_4`-free density problem
|
|
5
|
+
- solved graph-theory cockpit rather than a live open frontier
|
|
6
|
+
|
|
7
|
+
Bootstrap focus:
|
|
8
|
+
- preserve the solved status and Lean-facing badge
|
|
9
|
+
- keep the extremal-graph question and archive references synchronized
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Problem 1008 Frontier Note
|
|
2
|
+
|
|
3
|
+
Problem 1008 is packaged as a Lean-facing proof archive.
|
|
4
|
+
|
|
5
|
+
Current honest posture:
|
|
6
|
+
- preserve the solved public record
|
|
7
|
+
- keep the `C_4`-free density framing explicit
|
|
8
|
+
- treat improvements here as archive or method-exemplar work, not open-frontier work
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
packet_id: gt1008_ops_details_v1
|
|
2
|
+
summary: Lean-facing proof archive cockpit packet for the `C_4`-free density result.
|
|
3
|
+
routes:
|
|
4
|
+
- route_id: c4_free_lean_archive
|
|
5
|
+
title: "`C_4`-Free Lean Proof Archive"
|
|
6
|
+
status: closed
|
|
7
|
+
summary: Keep the solved `C_4`-free density record explicit and preserve the Lean-facing archive posture.
|
|
8
|
+
why_now: This is the honest archive framing for Problem 1008.
|
|
9
|
+
next_move: Freeze the best Lean-facing source hook and checkpoint the archive packet.
|
|
10
|
+
tickets:
|
|
11
|
+
- ticket_id: G1008
|
|
12
|
+
title: "Tighten the `C_4`-free Lean archive packet"
|
|
13
|
+
route_id: c4_free_lean_archive
|
|
14
|
+
status: active
|
|
15
|
+
summary: Package the solved record clearly enough that the archive stays usable as a method exemplar.
|
|
16
|
+
current_blocker: The archive still needs a sharper Lean-facing source hook.
|
|
17
|
+
next_move: Close `G1008.G1.A1`.
|
|
18
|
+
atoms:
|
|
19
|
+
- atom_id: G1008.G1.A1
|
|
20
|
+
title: "Freeze the primary Lean-facing archive hook for the `C_4`-free density result"
|
|
21
|
+
route_id: c4_free_lean_archive
|
|
22
|
+
ticket_id: G1008
|
|
23
|
+
status: ready
|
|
24
|
+
summary: This is the smallest honest archive move for Problem 1008.
|
|
25
|
+
next_move: Record the best public/formalization hook and checkpoint the archive packet.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
route_packet_id: gt1008_c4_free_lean_archive_v1
|
|
2
|
+
route_id: c4_free_lean_archive
|
|
3
|
+
frontier_claim: Preserve the solved `C_4`-free density record as a Lean-facing archive packet and keep the source trail synchronized with the dossier.
|
|
4
|
+
theorem_module: ""
|
|
5
|
+
checkpoint_packet: CHECKPOINT_TEMPLATE.md
|
|
6
|
+
report_packet: REPORT_TEMPLATE.md
|
|
7
|
+
ready_prompts:
|
|
8
|
+
- Which exact source or formalization hook should anchor the Lean archive packet first?
|
|
9
|
+
- Which wording best preserves the solved posture without inflating the public claim?
|
|
10
|
+
verification_hook:
|
|
11
|
+
- erdos graph-theory status 1008
|
|
12
|
+
- erdos archive show 1008 --json
|
|
13
|
+
- erdos archive scaffold 1008 --json
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
problem_id: "1008"
|
|
2
|
+
family_role: c4_free_lean_archive
|
|
3
|
+
harness_profile: lean_archive_cockpit
|
|
4
|
+
default_active_route: c4_free_lean_archive
|
|
5
|
+
bootstrap_focus: Freeze the `C_4`-free density result as a Lean-facing archive packet and keep the solved status synchronized with the public dossier.
|
|
6
|
+
route_story: Problem 1008 is a formalization-flavored proof archive. The public job is to preserve the solved record, the Lean-facing posture, and the core extremal-graph framing without re-opening a closed problem.
|
|
7
|
+
frontier_label: c4_free_lean_archive
|
|
8
|
+
frontier_detail: Preserve the Lean-facing solved record and the `C_4`-free density framing without widening the claim beyond the public dossier.
|
|
9
|
+
checkpoint_focus: Keep the solved status, Lean-facing archive wording, and main source trail synchronized.
|
|
10
|
+
next_honest_move: Tighten the Lean proof archive note and freeze the best public/formalization source hook for the `C_4`-free density result.
|
|
11
|
+
related_core_problems: []
|
|
12
|
+
literature_focus:
|
|
13
|
+
- graph theory
|
|
14
|
+
- extremal graph theory
|
|
15
|
+
- formalization
|
|
16
|
+
artifact_focus:
|
|
17
|
+
- STATEMENT.md
|
|
18
|
+
- REFERENCES.md
|
|
19
|
+
- FORMALIZATION.md
|
|
20
|
+
question_ledger:
|
|
21
|
+
open_questions:
|
|
22
|
+
- Which exact Lean-facing artifact should anchor the archive packet first?
|
|
23
|
+
active_route_notes:
|
|
24
|
+
- Treat Problem 1008 as a solved Lean archive, not as a live frontier.
|
|
25
|
+
route_breakthroughs: []
|
|
26
|
+
problem_solved:
|
|
27
|
+
- The public site marks this problem as solved with a Lean-facing badge.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Problem 19 Graph-Theory Pack Context
|
|
2
|
+
|
|
3
|
+
Role in pack:
|
|
4
|
+
- chromatic-number decision archive
|
|
5
|
+
- graph-theory archive cockpit rather than a live theorem frontier today
|
|
6
|
+
|
|
7
|
+
Bootstrap focus:
|
|
8
|
+
- keep the public decision posture explicit
|
|
9
|
+
- preserve the best source trail for the record
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
packet_id: gt19_ops_details_v1
|
|
2
|
+
summary: Decision/archive cockpit packet for the chromatic-number record.
|
|
3
|
+
routes:
|
|
4
|
+
- route_id: chromatic_decision_record
|
|
5
|
+
title: Chromatic Decision Record
|
|
6
|
+
status: archival
|
|
7
|
+
summary: Keep the public decision posture and chromatic-number framing synchronized.
|
|
8
|
+
why_now: This is the honest archive framing for Problem 19 today.
|
|
9
|
+
next_move: Freeze the best source hook describing the decision record.
|
|
10
|
+
tickets:
|
|
11
|
+
- ticket_id: G19
|
|
12
|
+
title: Tighten the chromatic decision archive packet
|
|
13
|
+
route_id: chromatic_decision_record
|
|
14
|
+
status: active
|
|
15
|
+
summary: Package the decision record clearly enough that future agents do not misread the dossier.
|
|
16
|
+
current_blocker: The primary source hook for the decision posture is still too loose.
|
|
17
|
+
next_move: Close `G19.G1.A1`.
|
|
18
|
+
atoms:
|
|
19
|
+
- atom_id: G19.G1.A1
|
|
20
|
+
title: Freeze the primary chromatic-number decision source hook
|
|
21
|
+
route_id: chromatic_decision_record
|
|
22
|
+
ticket_id: G19
|
|
23
|
+
status: ready
|
|
24
|
+
summary: This is the smallest honest archive move for Problem 19.
|
|
25
|
+
next_move: Record the strongest public source hook and checkpoint the archive packet.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Problem 19 Route History
|
|
2
|
+
|
|
3
|
+
- Initial public pack lift: moved the dossier into a graph-theory decision archive cockpit.
|
|
4
|
+
- Current route: `chromatic_decision_record`.
|
|
5
|
+
- Honest next improvement: freeze the best source explaining the decision posture and checkpoint it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
route_packet_id: gt19_chromatic_decision_archive_v1
|
|
2
|
+
route_id: chromatic_decision_record
|
|
3
|
+
frontier_claim: Preserve the chromatic-number decision record as a clean archive packet and keep the source trail synchronized with the dossier.
|
|
4
|
+
theorem_module: ""
|
|
5
|
+
checkpoint_packet: CHECKPOINT_TEMPLATE.md
|
|
6
|
+
report_packet: REPORT_TEMPLATE.md
|
|
7
|
+
ready_prompts:
|
|
8
|
+
- Which exact source or note should anchor the decision archive first?
|
|
9
|
+
- Which wording most clearly prevents future agents from treating this as an open frontier?
|
|
10
|
+
verification_hook:
|
|
11
|
+
- erdos graph-theory status 19
|
|
12
|
+
- erdos graph-theory tickets 19
|
|
13
|
+
- erdos archive show 19 --json
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
problem_id: "19"
|
|
2
|
+
family_role: chromatic_number_decision_archive
|
|
3
|
+
harness_profile: decision_archive_cockpit
|
|
4
|
+
default_active_route: chromatic_decision_record
|
|
5
|
+
bootstrap_focus: Freeze the exact chromatic-number decision posture, the dossier provenance, and the archive packet without drifting back into open-problem language.
|
|
6
|
+
route_story: Problem 19 is currently best treated as a decision/archive cockpit. The public job is to preserve the decision record and its references cleanly enough that future agents do not mis-handle it as a live open frontier.
|
|
7
|
+
frontier_label: chromatic_decision_record
|
|
8
|
+
frontier_detail: Keep the decision posture and the primary chromatic-number source trail explicit.
|
|
9
|
+
checkpoint_focus: Synchronize the public decision status, archive packet, and primary references every time this dossier is touched.
|
|
10
|
+
next_honest_move: Tighten the decision archive note and freeze the best public-facing source hook for the chromatic-number record.
|
|
11
|
+
related_core_problems: []
|
|
12
|
+
literature_focus:
|
|
13
|
+
- graph theory
|
|
14
|
+
- chromatic number
|
|
15
|
+
artifact_focus:
|
|
16
|
+
- STATEMENT.md
|
|
17
|
+
- REFERENCES.md
|
|
18
|
+
- EVIDENCE.md
|
|
19
|
+
question_ledger:
|
|
20
|
+
open_questions:
|
|
21
|
+
- Which exact source best explains why the public record marks this problem as decidable?
|
|
22
|
+
active_route_notes:
|
|
23
|
+
- Treat Problem 19 as a decision archive, not as a live open frontier.
|
|
24
|
+
route_breakthroughs: []
|
|
25
|
+
problem_solved: []
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Problem 22 Graph-Theory Pack Context
|
|
2
|
+
|
|
3
|
+
Role in pack:
|
|
4
|
+
- Ramsey-Turan proof archive
|
|
5
|
+
- solved graph-theory cockpit rather than a live open frontier
|
|
6
|
+
|
|
7
|
+
Bootstrap focus:
|
|
8
|
+
- preserve the solved status cleanly
|
|
9
|
+
- keep the extremal-graph framing and reference trail synchronized
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
packet_id: gt22_ops_details_v1
|
|
2
|
+
summary: Proof archive cockpit packet for the Ramsey-Turan `K_4` record.
|
|
3
|
+
routes:
|
|
4
|
+
- route_id: ramsey_turan_k4_archive
|
|
5
|
+
title: Ramsey-Turan `K_4` Proof Archive
|
|
6
|
+
status: archival
|
|
7
|
+
summary: Keep the solved Ramsey-Turan record explicit and preserve the extremal-graph proof framing.
|
|
8
|
+
why_now: This is the honest public posture for Problem 22.
|
|
9
|
+
next_move: Freeze the strongest proof reference and checkpoint the archive packet.
|
|
10
|
+
tickets:
|
|
11
|
+
- ticket_id: G22
|
|
12
|
+
title: Tighten the Ramsey-Turan proof archive packet
|
|
13
|
+
route_id: ramsey_turan_k4_archive
|
|
14
|
+
status: active
|
|
15
|
+
summary: Package the solved record clearly enough that agents cannot mistake it for an open frontier.
|
|
16
|
+
current_blocker: The archive still needs a stronger primary proof hook.
|
|
17
|
+
next_move: Close `G22.G1.A1`.
|
|
18
|
+
atoms:
|
|
19
|
+
- atom_id: G22.G1.A1
|
|
20
|
+
title: Freeze the primary solved-reference hook for the Ramsey-Turan record
|
|
21
|
+
route_id: ramsey_turan_k4_archive
|
|
22
|
+
ticket_id: G22
|
|
23
|
+
status: ready
|
|
24
|
+
summary: This is the smallest honest archive move for Problem 22.
|
|
25
|
+
next_move: Record the strongest public proof hook and checkpoint the archive packet.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
route_packet_id: gt22_ramsey_turan_proof_archive_v1
|
|
2
|
+
route_id: ramsey_turan_k4_archive
|
|
3
|
+
frontier_claim: Preserve the solved Ramsey-Turan `K_4` record as a proof archive packet and keep the strongest reference trail explicit.
|
|
4
|
+
theorem_module: ""
|
|
5
|
+
checkpoint_packet: CHECKPOINT_TEMPLATE.md
|
|
6
|
+
report_packet: REPORT_TEMPLATE.md
|
|
7
|
+
ready_prompts:
|
|
8
|
+
- Which exact proof reference should anchor the archive packet first?
|
|
9
|
+
- Which wording best prevents agents from drifting back into open-problem language here?
|
|
10
|
+
verification_hook:
|
|
11
|
+
- erdos graph-theory status 22
|
|
12
|
+
- erdos graph-theory frontier 22
|
|
13
|
+
- erdos archive show 22 --json
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
problem_id: "22"
|
|
2
|
+
family_role: ramsey_turan_proof_archive
|
|
3
|
+
harness_profile: proof_archive_cockpit
|
|
4
|
+
default_active_route: ramsey_turan_k4_archive
|
|
5
|
+
bootstrap_focus: Freeze the solved Ramsey-Turan `K_4` record as a proof archive and keep its dossier wording aligned with the public solved status.
|
|
6
|
+
route_story: Problem 22 is a proof archive cockpit. The public job is to preserve the solved status, the Ramsey-Turan framing, and the main source trail without pretending there is a live frontier here.
|
|
7
|
+
frontier_label: ramsey_turan_k4_archive
|
|
8
|
+
frontier_detail: Preserve the affirmative proof posture and the extremal graph framing without blurring it into an open program.
|
|
9
|
+
checkpoint_focus: Keep the proof archive wording, the public solved status, and the main source trail synchronized.
|
|
10
|
+
next_honest_move: Tighten the Ramsey-Turan proof archive note and freeze the strongest source hook for the solved record.
|
|
11
|
+
related_core_problems: []
|
|
12
|
+
literature_focus:
|
|
13
|
+
- graph theory
|
|
14
|
+
- Ramsey-Turan theory
|
|
15
|
+
artifact_focus:
|
|
16
|
+
- STATEMENT.md
|
|
17
|
+
- REFERENCES.md
|
|
18
|
+
- EVIDENCE.md
|
|
19
|
+
question_ledger:
|
|
20
|
+
open_questions:
|
|
21
|
+
- Which exact reference should anchor the proof archive packet first?
|
|
22
|
+
active_route_notes:
|
|
23
|
+
- Treat Problem 22 as a proof archive, not as a live open cockpit.
|
|
24
|
+
route_breakthroughs: []
|
|
25
|
+
problem_solved:
|
|
26
|
+
- The public site marks this problem as proved.
|
|
@@ -11,6 +11,9 @@ Useful commands:
|
|
|
11
11
|
- `erdos number-theory frontier 1`
|
|
12
12
|
- `erdos number-theory routes 1`
|
|
13
13
|
- `erdos number-theory tickets 1`
|
|
14
|
+
- `erdos number-theory route 1 distinct_subset_sum_lower_bound`
|
|
15
|
+
- `erdos number-theory ticket 1 N1`
|
|
16
|
+
- `erdos number-theory atom 1 N1.G1.A1`
|
|
14
17
|
- `erdos number-theory status 2 --json`
|
|
15
18
|
|
|
16
19
|
Design rule:
|
package/src/cli/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { runCheckpointsCommand } from '../commands/checkpoints.js';
|
|
|
4
4
|
import { runClusterCommand } from '../commands/cluster.js';
|
|
5
5
|
import { runContinuationCommand } from '../commands/continuation.js';
|
|
6
6
|
import { runDossierCommand } from '../commands/dossier.js';
|
|
7
|
+
import { runGraphTheoryCommand } from '../commands/graph-theory.js';
|
|
7
8
|
import { runMaintainerCommand } from '../commands/maintainer.js';
|
|
8
9
|
import { runNumberTheoryCommand } from '../commands/number-theory.js';
|
|
9
10
|
import { runOrpCommand } from '../commands/orp.js';
|
|
@@ -26,15 +27,22 @@ function printUsage() {
|
|
|
26
27
|
console.log(' erdos problem use <id>');
|
|
27
28
|
console.log(' erdos problem current');
|
|
28
29
|
console.log(' erdos problem artifacts [<id>] [--json]');
|
|
29
|
-
console.log(' erdos cluster list');
|
|
30
|
-
console.log(' erdos cluster show <name>');
|
|
31
|
-
console.log(' erdos archive show <id>');
|
|
32
|
-
console.log(' erdos archive scaffold <id>');
|
|
30
|
+
console.log(' erdos cluster list [--json]');
|
|
31
|
+
console.log(' erdos cluster show <name> [--json]');
|
|
32
|
+
console.log(' erdos archive show <id> [--json]');
|
|
33
|
+
console.log(' erdos archive scaffold <id> [--json]');
|
|
34
|
+
console.log(' erdos graph-theory status [<id>] [--json]');
|
|
35
|
+
console.log(' erdos graph-theory frontier [<id>] [--json]');
|
|
36
|
+
console.log(' erdos graph-theory routes [<id>] [--json]');
|
|
37
|
+
console.log(' erdos graph-theory tickets [<id>] [--json]');
|
|
33
38
|
console.log(' erdos number-theory status [<id>] [--json]');
|
|
34
39
|
console.log(' erdos number-theory frontier [<id>] [--json]');
|
|
35
40
|
console.log(' erdos number-theory routes [<id>] [--json]');
|
|
36
41
|
console.log(' erdos number-theory tickets [<id>] [--json]');
|
|
37
|
-
console.log(' erdos
|
|
42
|
+
console.log(' erdos number-theory route <problem-id> <route-id> [--json]');
|
|
43
|
+
console.log(' erdos number-theory ticket <problem-id> <ticket-id> [--json]');
|
|
44
|
+
console.log(' erdos number-theory atom <problem-id> <atom-id> [--json]');
|
|
45
|
+
console.log(' erdos workspace show [--json]');
|
|
38
46
|
console.log(' erdos orp show [--json]');
|
|
39
47
|
console.log(' erdos orp sync [--json]');
|
|
40
48
|
console.log(' erdos state sync [--json]');
|
|
@@ -82,6 +90,8 @@ if (!command || command === 'help' || command === '--help') {
|
|
|
82
90
|
exitCode = runClusterCommand(rest);
|
|
83
91
|
} else if (command === 'archive') {
|
|
84
92
|
exitCode = runArchiveCommand(rest);
|
|
93
|
+
} else if (command === 'graph-theory') {
|
|
94
|
+
exitCode = runGraphTheoryCommand(rest);
|
|
85
95
|
} else if (command === 'number-theory') {
|
|
86
96
|
exitCode = runNumberTheoryCommand(rest);
|
|
87
97
|
} else if (command === 'workspace') {
|
package/src/commands/archive.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getArchiveView, scaffoldArchive } from '../runtime/archive.js';
|
|
2
2
|
|
|
3
3
|
export function runArchiveCommand(args) {
|
|
4
|
-
const [subcommand, problemId] = args;
|
|
4
|
+
const [subcommand, problemId, ...rest] = args;
|
|
5
|
+
const asJson = rest.includes('--json');
|
|
5
6
|
|
|
6
7
|
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
7
8
|
console.log('Usage:');
|
|
@@ -21,6 +22,10 @@ export function runArchiveCommand(args) {
|
|
|
21
22
|
console.error(`Unknown problem: ${problemId}`);
|
|
22
23
|
return 1;
|
|
23
24
|
}
|
|
25
|
+
if (asJson) {
|
|
26
|
+
console.log(JSON.stringify(archive, null, 2));
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
24
29
|
console.log(`${archive.displayName} archive view`);
|
|
25
30
|
console.log(`Title: ${archive.title}`);
|
|
26
31
|
console.log(`Solved: ${archive.solved ? 'yes' : 'no'}`);
|
|
@@ -32,6 +37,10 @@ export function runArchiveCommand(args) {
|
|
|
32
37
|
if (subcommand === 'scaffold') {
|
|
33
38
|
try {
|
|
34
39
|
const result = scaffoldArchive(problemId);
|
|
40
|
+
if (asJson) {
|
|
41
|
+
console.log(JSON.stringify(result, null, 2));
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
35
44
|
console.log(`Archive scaffold created: ${result.archiveDir}`);
|
|
36
45
|
console.log(`Archive mode: ${result.payload.archiveMode}`);
|
|
37
46
|
return 0;
|
package/src/commands/cluster.js
CHANGED
|
@@ -14,11 +14,16 @@ function printCluster(cluster) {
|
|
|
14
14
|
console.log(' Open starter cockpit: 1');
|
|
15
15
|
console.log(' Counterexample/archive cockpit: 2');
|
|
16
16
|
console.log(' Additional dossier seeds: 3, 4, 5, 6, 7, 18, 542');
|
|
17
|
+
} else if (cluster.name === 'graph-theory') {
|
|
18
|
+
console.log(' Decision archive cockpit: 19');
|
|
19
|
+
console.log(' Proof archive cockpit: 22');
|
|
20
|
+
console.log(' Lean proof archive cockpit: 1008');
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
export function runClusterCommand(args) {
|
|
21
|
-
const [subcommand, value] = args;
|
|
25
|
+
const [subcommand, value, ...rest] = args;
|
|
26
|
+
const asJson = [value, ...rest].includes('--json');
|
|
22
27
|
|
|
23
28
|
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
24
29
|
console.log('Usage:');
|
|
@@ -28,6 +33,10 @@ export function runClusterCommand(args) {
|
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
if (subcommand === 'list') {
|
|
36
|
+
if (asJson) {
|
|
37
|
+
console.log(JSON.stringify(listClusters(), null, 2));
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
31
40
|
console.log('Clusters:');
|
|
32
41
|
for (const cluster of listClusters()) {
|
|
33
42
|
console.log(`- ${cluster.name}: ${cluster.problems.length} problems, ${cluster.deepHarnessProblems.length} deep-harness`);
|
|
@@ -51,6 +60,11 @@ export function runClusterCommand(args) {
|
|
|
51
60
|
return 1;
|
|
52
61
|
}
|
|
53
62
|
|
|
63
|
+
if (asJson) {
|
|
64
|
+
console.log(JSON.stringify(cluster, null, 2));
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
54
68
|
printCluster(cluster);
|
|
55
69
|
return 0;
|
|
56
70
|
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { getProblem } from '../atlas/catalog.js';
|
|
2
|
+
import { buildGraphTheoryStatusSnapshot } from '../runtime/graph-theory.js';
|
|
3
|
+
import { readCurrentProblem } from '../runtime/workspace.js';
|
|
4
|
+
|
|
5
|
+
function resolveGraphTheoryProblem(problemId) {
|
|
6
|
+
const resolvedId = problemId ?? readCurrentProblem();
|
|
7
|
+
if (!resolvedId) {
|
|
8
|
+
return { error: 'Missing problem id and no active problem is selected.' };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const problem = getProblem(resolvedId);
|
|
12
|
+
if (!problem) {
|
|
13
|
+
return { error: `Unknown problem: ${resolvedId}` };
|
|
14
|
+
}
|
|
15
|
+
if (problem.cluster !== 'graph-theory') {
|
|
16
|
+
return { error: `Problem ${resolvedId} is not in the graph-theory pack.` };
|
|
17
|
+
}
|
|
18
|
+
return { problem };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function parseArgs(args) {
|
|
22
|
+
const parsed = { problemId: null, asJson: false };
|
|
23
|
+
for (const token of args) {
|
|
24
|
+
if (token === '--json') {
|
|
25
|
+
parsed.asJson = true;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (!parsed.problemId) {
|
|
29
|
+
parsed.problemId = token;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
return { error: `Unknown graph-theory option: ${token}` };
|
|
33
|
+
}
|
|
34
|
+
return parsed;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function printStatus(snapshot) {
|
|
38
|
+
console.log(`${snapshot.displayName} graph-theory harness`);
|
|
39
|
+
console.log(`Family role: ${snapshot.familyRole}`);
|
|
40
|
+
console.log(`Harness profile: ${snapshot.harnessProfile}`);
|
|
41
|
+
console.log(`Site status: ${snapshot.siteStatus}`);
|
|
42
|
+
console.log(`Archive mode: ${snapshot.archiveMode ?? '(none)'}`);
|
|
43
|
+
console.log(`Active route: ${snapshot.activeRoute ?? '(none)'}`);
|
|
44
|
+
console.log(`Route breakthrough: ${snapshot.routeBreakthrough ? 'yes' : 'no'}`);
|
|
45
|
+
console.log(`Open problem: ${snapshot.openProblem ? 'yes' : 'no'}`);
|
|
46
|
+
console.log(`Problem solved: ${snapshot.problemSolved ? 'yes' : 'no'}`);
|
|
47
|
+
console.log(`Frontier label: ${snapshot.frontierLabel}`);
|
|
48
|
+
console.log(`Frontier detail: ${snapshot.frontierDetail}`);
|
|
49
|
+
console.log(`Checkpoint focus: ${snapshot.checkpointFocus ?? '(none)'}`);
|
|
50
|
+
console.log(`Next honest move: ${snapshot.nextHonestMove}`);
|
|
51
|
+
console.log(`Route packet present: ${snapshot.routePacketPresent ? 'yes' : 'no'}`);
|
|
52
|
+
if (snapshot.routePacket?.route_packet_id) {
|
|
53
|
+
console.log(`Route packet id: ${snapshot.routePacket.route_packet_id}`);
|
|
54
|
+
}
|
|
55
|
+
console.log(`Frontier note: ${snapshot.frontierNotePresent ? snapshot.frontierNotePath : '(missing)'}`);
|
|
56
|
+
console.log(`Route history: ${snapshot.routeHistoryPresent ? snapshot.routeHistoryPath : '(missing)'}`);
|
|
57
|
+
console.log(`Checkpoint template: ${snapshot.checkpointTemplatePresent ? snapshot.checkpointTemplatePath : '(missing)'}`);
|
|
58
|
+
console.log(`Report template: ${snapshot.reportTemplatePresent ? snapshot.reportTemplatePath : '(missing)'}`);
|
|
59
|
+
console.log(`Active ticket: ${snapshot.activeTicketDetail?.ticket_id ?? '(none)'}`);
|
|
60
|
+
console.log(`Ready atoms: ${snapshot.readyAtomCount}`);
|
|
61
|
+
if (snapshot.firstReadyAtom) {
|
|
62
|
+
console.log(`First ready atom: ${snapshot.firstReadyAtom.atom_id} — ${snapshot.firstReadyAtom.title}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function printFrontier(snapshot) {
|
|
67
|
+
console.log(`${snapshot.displayName} graph-theory frontier`);
|
|
68
|
+
console.log(`Active route: ${snapshot.activeRoute ?? '(none)'}`);
|
|
69
|
+
console.log(`Frontier label: ${snapshot.frontierLabel}`);
|
|
70
|
+
console.log(`Frontier detail: ${snapshot.frontierDetail}`);
|
|
71
|
+
console.log(`Archive mode: ${snapshot.archiveMode ?? '(none)'}`);
|
|
72
|
+
console.log(`Next honest move: ${snapshot.nextHonestMove}`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function printRoutes(snapshot) {
|
|
76
|
+
console.log(`${snapshot.displayName} graph-theory routes`);
|
|
77
|
+
console.log(`Active route: ${snapshot.activeRoute ?? '(none)'}`);
|
|
78
|
+
if (!snapshot.opsDetails?.routes?.length) {
|
|
79
|
+
console.log('Routes: none recorded.');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
for (const route of snapshot.opsDetails.routes) {
|
|
83
|
+
const flags = [];
|
|
84
|
+
if (route.route_id === snapshot.activeRoute) {
|
|
85
|
+
flags.push('active');
|
|
86
|
+
}
|
|
87
|
+
if (route.status && !flags.includes(route.status)) {
|
|
88
|
+
flags.push(route.status);
|
|
89
|
+
}
|
|
90
|
+
console.log(`- ${route.route_id}${flags.length ? ` [${flags.join(', ')}]` : ''}`);
|
|
91
|
+
if (route.title) {
|
|
92
|
+
console.log(` title: ${route.title}`);
|
|
93
|
+
}
|
|
94
|
+
if (route.summary) {
|
|
95
|
+
console.log(` summary: ${route.summary}`);
|
|
96
|
+
}
|
|
97
|
+
if (route.why_now) {
|
|
98
|
+
console.log(` why now: ${route.why_now}`);
|
|
99
|
+
}
|
|
100
|
+
if (route.next_move) {
|
|
101
|
+
console.log(` next move: ${route.next_move}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function printTickets(snapshot) {
|
|
107
|
+
console.log(`${snapshot.displayName} graph-theory tickets`);
|
|
108
|
+
console.log(`Active ticket: ${snapshot.activeTicketDetail?.ticket_id ?? '(none)'}`);
|
|
109
|
+
if (!snapshot.opsDetails?.tickets?.length) {
|
|
110
|
+
console.log('Tickets: none recorded.');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
for (const ticket of snapshot.opsDetails.tickets) {
|
|
114
|
+
const flags = [];
|
|
115
|
+
if (ticket.ticket_id === snapshot.activeTicketDetail?.ticket_id) {
|
|
116
|
+
flags.push('active');
|
|
117
|
+
}
|
|
118
|
+
if (ticket.status && !flags.includes(ticket.status)) {
|
|
119
|
+
flags.push(ticket.status);
|
|
120
|
+
}
|
|
121
|
+
console.log(`- ${ticket.ticket_id}${flags.length ? ` [${flags.join(', ')}]` : ''}`);
|
|
122
|
+
if (ticket.title) {
|
|
123
|
+
console.log(` title: ${ticket.title}`);
|
|
124
|
+
}
|
|
125
|
+
if (ticket.summary) {
|
|
126
|
+
console.log(` summary: ${ticket.summary}`);
|
|
127
|
+
}
|
|
128
|
+
if (ticket.current_blocker) {
|
|
129
|
+
console.log(` blocker: ${ticket.current_blocker}`);
|
|
130
|
+
}
|
|
131
|
+
if (ticket.next_move) {
|
|
132
|
+
console.log(` next move: ${ticket.next_move}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function runGraphTheoryCommand(args) {
|
|
138
|
+
const [subcommand, ...rest] = args;
|
|
139
|
+
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
140
|
+
console.log('Usage:');
|
|
141
|
+
console.log(' erdos graph-theory status [<id>] [--json]');
|
|
142
|
+
console.log(' erdos graph-theory frontier [<id>] [--json]');
|
|
143
|
+
console.log(' erdos graph-theory routes [<id>] [--json]');
|
|
144
|
+
console.log(' erdos graph-theory tickets [<id>] [--json]');
|
|
145
|
+
return 0;
|
|
146
|
+
}
|
|
147
|
+
if (!['status', 'frontier', 'routes', 'tickets'].includes(subcommand)) {
|
|
148
|
+
console.error(`Unknown graph-theory subcommand: ${subcommand}`);
|
|
149
|
+
return 1;
|
|
150
|
+
}
|
|
151
|
+
const parsed = parseArgs(rest);
|
|
152
|
+
if (parsed.error) {
|
|
153
|
+
console.error(parsed.error);
|
|
154
|
+
return 1;
|
|
155
|
+
}
|
|
156
|
+
const { problem, error } = resolveGraphTheoryProblem(parsed.problemId);
|
|
157
|
+
if (error) {
|
|
158
|
+
console.error(error);
|
|
159
|
+
return 1;
|
|
160
|
+
}
|
|
161
|
+
const snapshot = buildGraphTheoryStatusSnapshot(problem);
|
|
162
|
+
if (parsed.asJson) {
|
|
163
|
+
console.log(JSON.stringify(snapshot, null, 2));
|
|
164
|
+
return 0;
|
|
165
|
+
}
|
|
166
|
+
if (subcommand === 'frontier') {
|
|
167
|
+
printFrontier(snapshot);
|
|
168
|
+
return 0;
|
|
169
|
+
}
|
|
170
|
+
if (subcommand === 'routes') {
|
|
171
|
+
printRoutes(snapshot);
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
174
|
+
if (subcommand === 'tickets') {
|
|
175
|
+
printTickets(snapshot);
|
|
176
|
+
return 0;
|
|
177
|
+
}
|
|
178
|
+
printStatus(snapshot);
|
|
179
|
+
return 0;
|
|
180
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { getProblem } from '../atlas/catalog.js';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
buildNumberTheoryStatusSnapshot,
|
|
4
|
+
getNumberTheoryAtomSnapshot,
|
|
5
|
+
getNumberTheoryRouteSnapshot,
|
|
6
|
+
getNumberTheoryTicketSnapshot,
|
|
7
|
+
} from '../runtime/number-theory.js';
|
|
3
8
|
import { readCurrentProblem } from '../runtime/workspace.js';
|
|
4
9
|
|
|
5
10
|
function resolveNumberTheoryProblem(problemId) {
|
|
@@ -24,6 +29,7 @@ function parseArgs(args) {
|
|
|
24
29
|
const parsed = {
|
|
25
30
|
problemId: null,
|
|
26
31
|
asJson: false,
|
|
32
|
+
entityId: null,
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
for (const token of args) {
|
|
@@ -35,6 +41,10 @@ function parseArgs(args) {
|
|
|
35
41
|
parsed.problemId = token;
|
|
36
42
|
continue;
|
|
37
43
|
}
|
|
44
|
+
if (!parsed.entityId) {
|
|
45
|
+
parsed.entityId = token;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
38
48
|
return { error: `Unknown number-theory option: ${token}` };
|
|
39
49
|
}
|
|
40
50
|
|
|
@@ -146,6 +156,44 @@ function printTickets(snapshot) {
|
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
158
|
|
|
159
|
+
function printRouteDetail(snapshot) {
|
|
160
|
+
const route = snapshot.routeDetail;
|
|
161
|
+
console.log(`${snapshot.displayName} number-theory route ${snapshot.routeId}`);
|
|
162
|
+
console.log(`Title: ${route.title ?? snapshot.routeId}`);
|
|
163
|
+
console.log(`Status: ${route.status ?? '(unknown)'}`);
|
|
164
|
+
console.log(`Active route: ${route.route_id === snapshot.activeRoute ? 'yes' : 'no'}`);
|
|
165
|
+
console.log(`Summary: ${route.summary ?? '(none)'}`);
|
|
166
|
+
console.log(`Why now: ${route.why_now ?? '(none)'}`);
|
|
167
|
+
console.log(`Next move: ${route.next_move ?? '(none)'}`);
|
|
168
|
+
if (Array.isArray(route.ticket_ids) && route.ticket_ids.length > 0) {
|
|
169
|
+
console.log(`Tickets: ${route.ticket_ids.join(', ')}`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function printTicketDetail(snapshot) {
|
|
174
|
+
const ticket = snapshot.ticketDetail;
|
|
175
|
+
console.log(`${snapshot.displayName} number-theory ticket ${snapshot.ticketId}`);
|
|
176
|
+
console.log(`Title: ${ticket.title ?? snapshot.ticketId}`);
|
|
177
|
+
console.log(`Status: ${ticket.status ?? '(unknown)'}`);
|
|
178
|
+
console.log(`Active ticket: ${ticket.ticket_id === snapshot.activeTicketDetail?.ticket_id ? 'yes' : 'no'}`);
|
|
179
|
+
console.log(`Summary: ${ticket.summary ?? '(none)'}`);
|
|
180
|
+
console.log(`Current blocker: ${ticket.current_blocker ?? '(none)'}`);
|
|
181
|
+
console.log(`Next move: ${ticket.next_move ?? '(none)'}`);
|
|
182
|
+
if (Array.isArray(ticket.atom_ids) && ticket.atom_ids.length > 0) {
|
|
183
|
+
console.log(`Atoms: ${ticket.atom_ids.join(', ')}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function printAtomDetail(snapshot) {
|
|
188
|
+
const atom = snapshot.atomDetail;
|
|
189
|
+
console.log(`${snapshot.displayName} number-theory atom ${snapshot.atomId}`);
|
|
190
|
+
console.log(`Title: ${atom.title ?? snapshot.atomId}`);
|
|
191
|
+
console.log(`Status: ${atom.status ?? '(unknown)'}`);
|
|
192
|
+
console.log(`Current frontier atom: ${atom.atom_id === snapshot.firstReadyAtom?.atom_id ? 'yes' : 'no'}`);
|
|
193
|
+
console.log(`Summary: ${atom.summary ?? '(none)'}`);
|
|
194
|
+
console.log(`Next move: ${atom.next_move ?? '(none)'}`);
|
|
195
|
+
}
|
|
196
|
+
|
|
149
197
|
export function runNumberTheoryCommand(args) {
|
|
150
198
|
const [subcommand, ...rest] = args;
|
|
151
199
|
|
|
@@ -155,10 +203,13 @@ export function runNumberTheoryCommand(args) {
|
|
|
155
203
|
console.log(' erdos number-theory frontier [<id>] [--json]');
|
|
156
204
|
console.log(' erdos number-theory routes [<id>] [--json]');
|
|
157
205
|
console.log(' erdos number-theory tickets [<id>] [--json]');
|
|
206
|
+
console.log(' erdos number-theory route <problem-id> <route-id> [--json]');
|
|
207
|
+
console.log(' erdos number-theory ticket <problem-id> <ticket-id> [--json]');
|
|
208
|
+
console.log(' erdos number-theory atom <problem-id> <atom-id> [--json]');
|
|
158
209
|
return 0;
|
|
159
210
|
}
|
|
160
211
|
|
|
161
|
-
if (!['status', 'frontier', 'routes', 'tickets'].includes(subcommand)) {
|
|
212
|
+
if (!['status', 'frontier', 'routes', 'tickets', 'route', 'ticket', 'atom'].includes(subcommand)) {
|
|
162
213
|
console.error(`Unknown number-theory subcommand: ${subcommand}`);
|
|
163
214
|
return 1;
|
|
164
215
|
}
|
|
@@ -175,6 +226,60 @@ export function runNumberTheoryCommand(args) {
|
|
|
175
226
|
return 1;
|
|
176
227
|
}
|
|
177
228
|
|
|
229
|
+
if (subcommand === 'route') {
|
|
230
|
+
if (!parsed.entityId) {
|
|
231
|
+
console.error('Missing route id.');
|
|
232
|
+
return 1;
|
|
233
|
+
}
|
|
234
|
+
const snapshot = getNumberTheoryRouteSnapshot(problem, parsed.entityId);
|
|
235
|
+
if (!snapshot) {
|
|
236
|
+
console.error(`Unknown number-theory route: ${parsed.entityId}`);
|
|
237
|
+
return 1;
|
|
238
|
+
}
|
|
239
|
+
if (parsed.asJson) {
|
|
240
|
+
console.log(JSON.stringify(snapshot, null, 2));
|
|
241
|
+
return 0;
|
|
242
|
+
}
|
|
243
|
+
printRouteDetail(snapshot);
|
|
244
|
+
return 0;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (subcommand === 'ticket') {
|
|
248
|
+
if (!parsed.entityId) {
|
|
249
|
+
console.error('Missing ticket id.');
|
|
250
|
+
return 1;
|
|
251
|
+
}
|
|
252
|
+
const snapshot = getNumberTheoryTicketSnapshot(problem, parsed.entityId);
|
|
253
|
+
if (!snapshot) {
|
|
254
|
+
console.error(`Unknown number-theory ticket: ${parsed.entityId}`);
|
|
255
|
+
return 1;
|
|
256
|
+
}
|
|
257
|
+
if (parsed.asJson) {
|
|
258
|
+
console.log(JSON.stringify(snapshot, null, 2));
|
|
259
|
+
return 0;
|
|
260
|
+
}
|
|
261
|
+
printTicketDetail(snapshot);
|
|
262
|
+
return 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (subcommand === 'atom') {
|
|
266
|
+
if (!parsed.entityId) {
|
|
267
|
+
console.error('Missing atom id.');
|
|
268
|
+
return 1;
|
|
269
|
+
}
|
|
270
|
+
const snapshot = getNumberTheoryAtomSnapshot(problem, parsed.entityId);
|
|
271
|
+
if (!snapshot) {
|
|
272
|
+
console.error(`Unknown number-theory atom: ${parsed.entityId}`);
|
|
273
|
+
return 1;
|
|
274
|
+
}
|
|
275
|
+
if (parsed.asJson) {
|
|
276
|
+
console.log(JSON.stringify(snapshot, null, 2));
|
|
277
|
+
return 0;
|
|
278
|
+
}
|
|
279
|
+
printAtomDetail(snapshot);
|
|
280
|
+
return 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
178
283
|
const snapshot = buildNumberTheoryStatusSnapshot(problem);
|
|
179
284
|
if (parsed.asJson) {
|
|
180
285
|
console.log(JSON.stringify(snapshot, null, 2));
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { getProblem } from '../atlas/catalog.js';
|
|
2
2
|
import { loadConfig } from '../runtime/config.js';
|
|
3
|
+
import { buildGraphTheoryStatusSnapshot } from '../runtime/graph-theory.js';
|
|
3
4
|
import { buildNumberTheoryStatusSnapshot } from '../runtime/number-theory.js';
|
|
4
5
|
import { buildSunflowerStatusSnapshot } from '../runtime/sunflower.js';
|
|
5
6
|
import { getWorkspaceSummary } from '../runtime/workspace.js';
|
|
6
7
|
|
|
7
8
|
export function runWorkspaceCommand(args) {
|
|
8
|
-
const [subcommand] = args;
|
|
9
|
+
const [subcommand, ...rest] = args;
|
|
9
10
|
|
|
10
11
|
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
11
12
|
console.log('Usage:');
|
|
@@ -18,8 +19,30 @@ export function runWorkspaceCommand(args) {
|
|
|
18
19
|
return 1;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
const asJson = rest.includes('--json');
|
|
23
|
+
|
|
21
24
|
const summary = getWorkspaceSummary();
|
|
22
25
|
const config = loadConfig();
|
|
26
|
+
if (asJson) {
|
|
27
|
+
const payload = {
|
|
28
|
+
...summary,
|
|
29
|
+
preferredAgent: config.preferredAgent,
|
|
30
|
+
};
|
|
31
|
+
if (summary.activeProblem) {
|
|
32
|
+
const problem = getProblem(summary.activeProblem);
|
|
33
|
+
if (problem?.cluster === 'sunflower') {
|
|
34
|
+
payload.sunflower = buildSunflowerStatusSnapshot(problem);
|
|
35
|
+
}
|
|
36
|
+
if (problem?.cluster === 'number-theory') {
|
|
37
|
+
payload.numberTheory = buildNumberTheoryStatusSnapshot(problem);
|
|
38
|
+
}
|
|
39
|
+
if (problem?.cluster === 'graph-theory') {
|
|
40
|
+
payload.graphTheory = buildGraphTheoryStatusSnapshot(problem);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
23
46
|
console.log(`Workspace root: ${summary.workspaceRoot}`);
|
|
24
47
|
console.log(`State dir: ${summary.stateDir}`);
|
|
25
48
|
console.log(`Initialized: ${summary.hasState ? 'yes' : 'no'}`);
|
|
@@ -92,6 +115,21 @@ export function runWorkspaceCommand(args) {
|
|
|
92
115
|
console.log(`Number-theory first ready atom: ${numberTheory.firstReadyAtom.atom_id} — ${numberTheory.firstReadyAtom.title}`);
|
|
93
116
|
}
|
|
94
117
|
}
|
|
118
|
+
if (problem?.cluster === 'graph-theory') {
|
|
119
|
+
const graphTheory = buildGraphTheoryStatusSnapshot(problem);
|
|
120
|
+
console.log(`Graph-theory family role: ${graphTheory.familyRole ?? '(none)'}`);
|
|
121
|
+
console.log(`Graph-theory harness profile: ${graphTheory.harnessProfile ?? '(none)'}`);
|
|
122
|
+
console.log(`Graph-theory route: ${graphTheory.activeRoute ?? '(none)'}`);
|
|
123
|
+
console.log(`Graph-theory frontier: ${graphTheory.frontierDetail ?? '(none)'}`);
|
|
124
|
+
console.log(`Graph-theory frontier note: ${graphTheory.frontierNotePath ?? '(none)'}`);
|
|
125
|
+
console.log(`Graph-theory route history: ${graphTheory.routeHistoryPath ?? '(none)'}`);
|
|
126
|
+
console.log(`Graph-theory archive mode: ${graphTheory.archiveMode ?? '(none)'}`);
|
|
127
|
+
console.log(`Graph-theory active ticket: ${graphTheory.activeTicketDetail?.ticket_id ?? '(none)'}`);
|
|
128
|
+
console.log(`Graph-theory ready atoms: ${graphTheory.readyAtomCount}`);
|
|
129
|
+
if (graphTheory.firstReadyAtom) {
|
|
130
|
+
console.log(`Graph-theory first ready atom: ${graphTheory.firstReadyAtom.atom_id} — ${graphTheory.firstReadyAtom.title}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
95
133
|
}
|
|
96
134
|
return 0;
|
|
97
135
|
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { parse } from 'yaml';
|
|
4
|
+
import { getPackProblemDir } from './paths.js';
|
|
5
|
+
|
|
6
|
+
function readYamlIfPresent(filePath) {
|
|
7
|
+
if (!fs.existsSync(filePath)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return parse(fs.readFileSync(filePath, 'utf8'));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getPackFile(problemId, fileName) {
|
|
14
|
+
return path.join(getPackProblemDir('graph-theory', problemId), fileName);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function normalizeQuestionLedger(rawLedger) {
|
|
18
|
+
return {
|
|
19
|
+
openQuestions: rawLedger?.open_questions ?? [],
|
|
20
|
+
activeRouteNotes: rawLedger?.active_route_notes ?? [],
|
|
21
|
+
routeBreakthroughs: rawLedger?.route_breakthroughs ?? [],
|
|
22
|
+
problemSolved: rawLedger?.problem_solved ?? [],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function parseOpsDetails(problemId) {
|
|
27
|
+
const opsDetailsPath = getPackFile(problemId, 'OPS_DETAILS.yaml');
|
|
28
|
+
const payload = readYamlIfPresent(opsDetailsPath);
|
|
29
|
+
if (!payload) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
packetId: payload.packet_id ?? null,
|
|
34
|
+
summary: payload.summary ?? null,
|
|
35
|
+
path: opsDetailsPath,
|
|
36
|
+
routes: payload.routes ?? [],
|
|
37
|
+
tickets: payload.tickets ?? [],
|
|
38
|
+
atoms: payload.atoms ?? [],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function findRouteDetail(opsDetails, routeId) {
|
|
43
|
+
if (!opsDetails || !Array.isArray(opsDetails.routes)) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return opsDetails.routes.find((route) => route.route_id === routeId) ?? null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function firstMatching(items, predicate) {
|
|
50
|
+
if (!Array.isArray(items)) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return items.find(predicate) ?? items[0] ?? null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function resolveArchiveMode(problem) {
|
|
57
|
+
const siteStatus = String(problem.siteStatus ?? '').toLowerCase();
|
|
58
|
+
if (siteStatus === 'solved') {
|
|
59
|
+
return 'method_exemplar';
|
|
60
|
+
}
|
|
61
|
+
if (siteStatus === 'proved' || siteStatus === 'proved (lean)') {
|
|
62
|
+
return 'proof_archive';
|
|
63
|
+
}
|
|
64
|
+
if (siteStatus === 'decidable') {
|
|
65
|
+
return 'decision_archive';
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function solvedLikeSiteStatus(problem) {
|
|
71
|
+
const siteStatus = String(problem.siteStatus ?? '').toLowerCase();
|
|
72
|
+
return siteStatus === 'solved' || siteStatus === 'proved' || siteStatus === 'proved (lean)';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function buildGraphTheoryStatusSnapshot(problem) {
|
|
76
|
+
const contextPath = getPackFile(problem.problemId, 'context.yaml');
|
|
77
|
+
const contextMarkdownPath = getPackFile(problem.problemId, 'CONTEXT.md');
|
|
78
|
+
const routePacketPath = getPackFile(problem.problemId, 'ROUTE_PACKET.yaml');
|
|
79
|
+
const frontierNotePath = getPackFile(problem.problemId, 'FRONTIER_NOTE.md');
|
|
80
|
+
const routeHistoryPath = getPackFile(problem.problemId, 'ROUTE_HISTORY.md');
|
|
81
|
+
const checkpointTemplatePath = getPackFile(problem.problemId, 'CHECKPOINT_TEMPLATE.md');
|
|
82
|
+
const reportTemplatePath = getPackFile(problem.problemId, 'REPORT_TEMPLATE.md');
|
|
83
|
+
|
|
84
|
+
const context = readYamlIfPresent(contextPath) ?? {};
|
|
85
|
+
const routePacket = readYamlIfPresent(routePacketPath);
|
|
86
|
+
const opsDetails = parseOpsDetails(problem.problemId);
|
|
87
|
+
|
|
88
|
+
const activeRoute =
|
|
89
|
+
problem.researchState?.active_route
|
|
90
|
+
?? context.default_active_route
|
|
91
|
+
?? routePacket?.route_id
|
|
92
|
+
?? null;
|
|
93
|
+
const archiveMode = resolveArchiveMode(problem);
|
|
94
|
+
const problemSolved = typeof problem.researchState?.problem_solved === 'boolean'
|
|
95
|
+
? problem.researchState.problem_solved
|
|
96
|
+
: solvedLikeSiteStatus(problem);
|
|
97
|
+
const openProblem = typeof problem.researchState?.open_problem === 'boolean'
|
|
98
|
+
? problem.researchState.open_problem
|
|
99
|
+
: String(problem.siteStatus ?? '').toLowerCase() === 'open';
|
|
100
|
+
const routeBreakthrough = typeof problem.researchState?.route_breakthrough === 'boolean'
|
|
101
|
+
? problem.researchState.route_breakthrough
|
|
102
|
+
: problemSolved;
|
|
103
|
+
|
|
104
|
+
const activeRouteDetail = findRouteDetail(opsDetails, activeRoute) ?? firstMatching(opsDetails?.routes, () => true);
|
|
105
|
+
const activeTicketDetail = firstMatching(
|
|
106
|
+
opsDetails?.tickets,
|
|
107
|
+
(ticket) => ticket.status === 'active' && (!activeRoute || ticket.route_id === activeRoute),
|
|
108
|
+
);
|
|
109
|
+
const firstReadyAtom = firstMatching(
|
|
110
|
+
opsDetails?.atoms,
|
|
111
|
+
(atom) => atom.status === 'ready' && (!activeRoute || atom.route_id === activeRoute),
|
|
112
|
+
);
|
|
113
|
+
const readyAtoms = Array.isArray(opsDetails?.atoms)
|
|
114
|
+
? opsDetails.atoms.filter((atom) => atom.status === 'ready')
|
|
115
|
+
: [];
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
generatedAt: new Date().toISOString(),
|
|
119
|
+
problemId: problem.problemId,
|
|
120
|
+
displayName: problem.displayName,
|
|
121
|
+
title: problem.title,
|
|
122
|
+
cluster: problem.cluster,
|
|
123
|
+
familyRole: context.family_role ?? 'graph_theory_pack',
|
|
124
|
+
harnessProfile: context.harness_profile ?? 'starter_cockpit',
|
|
125
|
+
activeRoute,
|
|
126
|
+
routeBreakthrough,
|
|
127
|
+
problemSolved,
|
|
128
|
+
openProblem,
|
|
129
|
+
siteStatus: problem.siteStatus,
|
|
130
|
+
archiveMode,
|
|
131
|
+
bootstrapFocus: context.bootstrap_focus ?? null,
|
|
132
|
+
routeStory: context.route_story ?? routePacket?.frontier_claim ?? problem.shortStatement,
|
|
133
|
+
frontierLabel: context.frontier_label ?? activeRoute ?? 'graph_theory_frontier',
|
|
134
|
+
frontierDetail: firstReadyAtom?.summary ?? context.frontier_detail ?? activeRouteDetail?.summary ?? problem.shortStatement,
|
|
135
|
+
checkpointFocus: context.checkpoint_focus ?? activeRouteDetail?.why_now ?? null,
|
|
136
|
+
nextHonestMove:
|
|
137
|
+
firstReadyAtom?.next_move
|
|
138
|
+
?? activeTicketDetail?.next_move
|
|
139
|
+
?? context.next_honest_move
|
|
140
|
+
?? 'Freeze the current graph-theory packet without widening status claims.',
|
|
141
|
+
relatedCoreProblems: context.related_core_problems ?? [],
|
|
142
|
+
literatureFocus: context.literature_focus ?? [],
|
|
143
|
+
artifactFocus: context.artifact_focus ?? [],
|
|
144
|
+
questionLedger: normalizeQuestionLedger(context.question_ledger),
|
|
145
|
+
contextPresent: fs.existsSync(contextPath),
|
|
146
|
+
contextPath,
|
|
147
|
+
contextMarkdownPath,
|
|
148
|
+
routePacketPresent: Boolean(routePacket),
|
|
149
|
+
routePacket,
|
|
150
|
+
routePacketPath,
|
|
151
|
+
frontierNotePresent: fs.existsSync(frontierNotePath),
|
|
152
|
+
frontierNotePath,
|
|
153
|
+
routeHistoryPresent: fs.existsSync(routeHistoryPath),
|
|
154
|
+
routeHistoryPath,
|
|
155
|
+
checkpointTemplatePresent: fs.existsSync(checkpointTemplatePath),
|
|
156
|
+
checkpointTemplatePath,
|
|
157
|
+
reportTemplatePresent: fs.existsSync(reportTemplatePath),
|
|
158
|
+
reportTemplatePath,
|
|
159
|
+
opsDetailsPresent: Boolean(opsDetails),
|
|
160
|
+
opsDetailsPath: opsDetails?.path ?? getPackFile(problem.problemId, 'OPS_DETAILS.yaml'),
|
|
161
|
+
opsDetails,
|
|
162
|
+
activeRouteDetail,
|
|
163
|
+
activeTicketDetail,
|
|
164
|
+
firstReadyAtom,
|
|
165
|
+
readyAtomCount: readyAtoms.length,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
@@ -39,6 +39,27 @@ function parseOpsDetails(problemId) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function findRouteDetail(opsDetails, routeId) {
|
|
43
|
+
if (!opsDetails || !Array.isArray(opsDetails.routes)) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return opsDetails.routes.find((route) => route.route_id === routeId) ?? null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function findTicketDetail(opsDetails, ticketId) {
|
|
50
|
+
if (!opsDetails || !Array.isArray(opsDetails.tickets)) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return opsDetails.tickets.find((ticket) => ticket.ticket_id === ticketId) ?? null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function findAtomDetail(opsDetails, atomId) {
|
|
57
|
+
if (!opsDetails || !Array.isArray(opsDetails.atoms)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return opsDetails.atoms.find((atom) => atom.atom_id === atomId) ?? null;
|
|
61
|
+
}
|
|
62
|
+
|
|
42
63
|
function findActiveRouteDetail(opsDetails, activeRoute) {
|
|
43
64
|
if (!opsDetails || !Array.isArray(opsDetails.routes)) {
|
|
44
65
|
return null;
|
|
@@ -167,3 +188,42 @@ export function buildNumberTheoryStatusSnapshot(problem) {
|
|
|
167
188
|
readyAtomCount: readyAtoms.length,
|
|
168
189
|
};
|
|
169
190
|
}
|
|
191
|
+
|
|
192
|
+
export function getNumberTheoryRouteSnapshot(problem, routeId) {
|
|
193
|
+
const snapshot = buildNumberTheoryStatusSnapshot(problem);
|
|
194
|
+
const routeDetail = findRouteDetail(snapshot.opsDetails, routeId);
|
|
195
|
+
if (!routeDetail) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
...snapshot,
|
|
200
|
+
routeId,
|
|
201
|
+
routeDetail,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function getNumberTheoryTicketSnapshot(problem, ticketId) {
|
|
206
|
+
const snapshot = buildNumberTheoryStatusSnapshot(problem);
|
|
207
|
+
const ticketDetail = findTicketDetail(snapshot.opsDetails, ticketId);
|
|
208
|
+
if (!ticketDetail) {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
...snapshot,
|
|
213
|
+
ticketId,
|
|
214
|
+
ticketDetail,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function getNumberTheoryAtomSnapshot(problem, atomId) {
|
|
219
|
+
const snapshot = buildNumberTheoryStatusSnapshot(problem);
|
|
220
|
+
const atomDetail = findAtomDetail(snapshot.opsDetails, atomId);
|
|
221
|
+
if (!atomDetail) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
...snapshot,
|
|
226
|
+
atomId,
|
|
227
|
+
atomDetail,
|
|
228
|
+
};
|
|
229
|
+
}
|
package/src/runtime/state.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getProblem } from '../atlas/catalog.js';
|
|
2
2
|
import { ensureConfig, loadConfig } from './config.js';
|
|
3
3
|
import { fileExists, readJson, writeJson, writeText } from './files.js';
|
|
4
|
+
import { buildGraphTheoryStatusSnapshot } from './graph-theory.js';
|
|
4
5
|
import {
|
|
5
6
|
getWorkspaceQuestionLedgerPath,
|
|
6
7
|
getWorkspaceRoot,
|
|
@@ -249,6 +250,36 @@ function deriveProblemSummary(problem) {
|
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
252
|
|
|
253
|
+
if (problem.cluster === 'graph-theory') {
|
|
254
|
+
const snapshot = buildGraphTheoryStatusSnapshot(problem);
|
|
255
|
+
return {
|
|
256
|
+
familyRole: snapshot.familyRole,
|
|
257
|
+
harnessProfile: snapshot.harnessProfile,
|
|
258
|
+
activeRoute: snapshot.activeRoute,
|
|
259
|
+
routeBreakthrough: snapshot.routeBreakthrough,
|
|
260
|
+
problemSolved: snapshot.problemSolved,
|
|
261
|
+
openProblem: snapshot.openProblem,
|
|
262
|
+
currentFrontier: {
|
|
263
|
+
kind: snapshot.firstReadyAtom ? 'ready_atom' : 'route_frontier',
|
|
264
|
+
detail: snapshot.firstReadyAtom
|
|
265
|
+
? `${snapshot.firstReadyAtom.atom_id} — ${snapshot.firstReadyAtom.title}`
|
|
266
|
+
: snapshot.frontierDetail,
|
|
267
|
+
},
|
|
268
|
+
routeStory: snapshot.activeRouteDetail?.summary || snapshot.routeStory,
|
|
269
|
+
checkpointFocus: snapshot.checkpointFocus,
|
|
270
|
+
nextHonestMove: snapshot.nextHonestMove,
|
|
271
|
+
packArtifacts: {
|
|
272
|
+
frontierNotePath: snapshot.frontierNotePath,
|
|
273
|
+
routeHistoryPath: snapshot.routeHistoryPath,
|
|
274
|
+
checkpointTemplatePath: snapshot.checkpointTemplatePath,
|
|
275
|
+
reportTemplatePath: snapshot.reportTemplatePath,
|
|
276
|
+
},
|
|
277
|
+
activeTicketId: snapshot.activeTicketDetail?.ticket_id ?? null,
|
|
278
|
+
activeAtomId: snapshot.firstReadyAtom?.atom_id ?? null,
|
|
279
|
+
questionLedger: snapshot.questionLedger,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
|
|
252
283
|
return deriveGenericProblemSummary(problem);
|
|
253
284
|
}
|
|
254
285
|
|