erdos-problems 0.2.0 → 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.
Files changed (62) hide show
  1. package/README.md +88 -3
  2. package/docs/RESEARCH_LOOP.md +7 -0
  3. package/package.json +1 -1
  4. package/packs/graph-theory/README.md +17 -0
  5. package/packs/graph-theory/problems/1008/CHECKPOINT_TEMPLATE.md +9 -0
  6. package/packs/graph-theory/problems/1008/CONTEXT.md +9 -0
  7. package/packs/graph-theory/problems/1008/FRONTIER_NOTE.md +8 -0
  8. package/packs/graph-theory/problems/1008/OPS_DETAILS.yaml +25 -0
  9. package/packs/graph-theory/problems/1008/REPORT_TEMPLATE.md +9 -0
  10. package/packs/graph-theory/problems/1008/ROUTE_HISTORY.md +5 -0
  11. package/packs/graph-theory/problems/1008/ROUTE_PACKET.yaml +13 -0
  12. package/packs/graph-theory/problems/1008/context.yaml +27 -0
  13. package/packs/graph-theory/problems/19/CHECKPOINT_TEMPLATE.md +9 -0
  14. package/packs/graph-theory/problems/19/CONTEXT.md +9 -0
  15. package/packs/graph-theory/problems/19/FRONTIER_NOTE.md +8 -0
  16. package/packs/graph-theory/problems/19/OPS_DETAILS.yaml +25 -0
  17. package/packs/graph-theory/problems/19/REPORT_TEMPLATE.md +9 -0
  18. package/packs/graph-theory/problems/19/ROUTE_HISTORY.md +5 -0
  19. package/packs/graph-theory/problems/19/ROUTE_PACKET.yaml +13 -0
  20. package/packs/graph-theory/problems/19/context.yaml +25 -0
  21. package/packs/graph-theory/problems/22/CHECKPOINT_TEMPLATE.md +9 -0
  22. package/packs/graph-theory/problems/22/CONTEXT.md +9 -0
  23. package/packs/graph-theory/problems/22/FRONTIER_NOTE.md +8 -0
  24. package/packs/graph-theory/problems/22/OPS_DETAILS.yaml +25 -0
  25. package/packs/graph-theory/problems/22/REPORT_TEMPLATE.md +9 -0
  26. package/packs/graph-theory/problems/22/ROUTE_HISTORY.md +5 -0
  27. package/packs/graph-theory/problems/22/ROUTE_PACKET.yaml +13 -0
  28. package/packs/graph-theory/problems/22/context.yaml +26 -0
  29. package/packs/number-theory/README.md +16 -9
  30. package/packs/number-theory/problems/1/CHECKPOINT_TEMPLATE.md +7 -0
  31. package/packs/number-theory/problems/1/FRONTIER_NOTE.md +8 -0
  32. package/packs/number-theory/problems/1/OPS_DETAILS.yaml +25 -0
  33. package/packs/number-theory/problems/1/REPORT_TEMPLATE.md +7 -0
  34. package/packs/number-theory/problems/1/ROUTE_HISTORY.md +5 -0
  35. package/packs/number-theory/problems/1/ROUTE_PACKET.yaml +13 -0
  36. package/packs/number-theory/problems/1/context.yaml +10 -10
  37. package/packs/number-theory/problems/2/CHECKPOINT_TEMPLATE.md +7 -0
  38. package/packs/number-theory/problems/2/FRONTIER_NOTE.md +8 -0
  39. package/packs/number-theory/problems/2/OPS_DETAILS.yaml +25 -0
  40. package/packs/number-theory/problems/2/REPORT_TEMPLATE.md +7 -0
  41. package/packs/number-theory/problems/2/ROUTE_HISTORY.md +5 -0
  42. package/packs/number-theory/problems/2/ROUTE_PACKET.yaml +13 -0
  43. package/packs/number-theory/problems/2/context.yaml +11 -11
  44. package/packs/sunflower/README.md +2 -2
  45. package/packs/sunflower/problems/536/CHECKPOINT_TEMPLATE.md +7 -0
  46. package/packs/sunflower/problems/536/FRONTIER_NOTE.md +8 -0
  47. package/packs/sunflower/problems/536/REPORT_TEMPLATE.md +7 -0
  48. package/packs/sunflower/problems/536/ROUTE_HISTORY.md +5 -0
  49. package/packs/sunflower/problems/856/CHECKPOINT_TEMPLATE.md +7 -0
  50. package/packs/sunflower/problems/856/FRONTIER_NOTE.md +8 -0
  51. package/packs/sunflower/problems/856/REPORT_TEMPLATE.md +7 -0
  52. package/packs/sunflower/problems/856/ROUTE_HISTORY.md +5 -0
  53. package/src/cli/index.js +25 -8
  54. package/src/commands/archive.js +10 -1
  55. package/src/commands/cluster.js +19 -1
  56. package/src/commands/graph-theory.js +180 -0
  57. package/src/commands/number-theory.js +304 -0
  58. package/src/commands/pull.js +56 -4
  59. package/src/commands/workspace.js +55 -1
  60. package/src/runtime/graph-theory.js +167 -0
  61. package/src/runtime/number-theory.js +229 -0
  62. package/src/runtime/state.js +62 -0
@@ -0,0 +1,5 @@
1
+ # Problem 1 Route History
2
+
3
+ - Initial public pack posture: dossier-first seed.
4
+ - Current public pack posture: starter cockpit around the distinct-subset-sum lower-bound route.
5
+ - Next maturity threshold: freeze the first exact reduction or historical lower-bound checkpoint before adding deeper pack machinery.
@@ -0,0 +1,13 @@
1
+ route_packet_id: nt1_distinct_subset_sum_lower_bound_v1
2
+ route_id: distinct_subset_sum_lower_bound
3
+ frontier_claim: Preserve the exponential-growth lower-bound route for distinct subset sums and keep the first honest reduction explicit.
4
+ theorem_module: ""
5
+ checkpoint_packet: CHECKPOINT_TEMPLATE.md
6
+ report_packet: REPORT_TEMPLATE.md
7
+ ready_prompts:
8
+ - Which exact lower-bound reduction should be frozen first for the distinct-subset-sum route?
9
+ - Which reference or historical bound is still missing from the canonical dossier?
10
+ verification_hook:
11
+ - erdos number-theory status 1
12
+ - erdos number-theory routes 1
13
+ - erdos problem artifacts 1 --json
@@ -1,13 +1,13 @@
1
1
  problem_id: "1"
2
2
  family_role: additive_number_theory_seed
3
- harness_profile: dossier_seed_pack
4
- default_active_route: additive_structure_seed
5
- bootstrap_focus: Freeze the exact problem statement, the local dossier, and the first honest additive-number-theory route sketch.
6
- route_story: This problem currently lives in dossier-first mode inside the number-theory pack.
7
- frontier_label: dossier_seed_frontier
8
- frontier_detail: Tighten the statement, references, and first route sketch before pretending there is a deeper frontier engine here.
9
- checkpoint_focus: Preserve provenance and route honesty while the pack remains dossier-first.
10
- next_honest_move: Seed the first real route note and keep the public-status review current.
3
+ harness_profile: starter_cockpit
4
+ default_active_route: distinct_subset_sum_lower_bound
5
+ bootstrap_focus: Freeze the exact problem statement, the local dossier, and the first honest lower-bound route for distinct subset sums.
6
+ route_story: This problem now has a starter cockpit whose job is to keep the lower-bound route explicit without pretending we already have a deep theorem engine.
7
+ frontier_label: distinct_subset_sum_lower_bound
8
+ frontier_detail: Keep the problem anchored to the binary-growth lower-bound route and freeze the exact first reduction before widening claims.
9
+ checkpoint_focus: Preserve provenance, the exact lower-bound route, and the open-problem boundary in every checkpoint.
10
+ next_honest_move: Freeze the first additive lower-bound route note and tighten the evidence stack around the distinct-subset-sum hypothesis.
11
11
  related_core_problems: []
12
12
  literature_focus:
13
13
  - additive number theory
@@ -18,8 +18,8 @@ artifact_focus:
18
18
  - EVIDENCE.md
19
19
  question_ledger:
20
20
  open_questions:
21
- - What is the first honest additive-number-theory route worth freezing for problem 1?
21
+ - What is the first exact lower-bound reduction worth freezing for the distinct-subset-sum route?
22
22
  active_route_notes:
23
- - Keep this problem dossier-first until a real pack-specific route is earned.
23
+ - Keep the active route tied to distinct subset sums and exponential-growth pressure, not generic additive chatter.
24
24
  route_breakthroughs: []
25
25
  problem_solved: []
@@ -0,0 +1,7 @@
1
+ # Problem 2 Checkpoint Template
2
+
3
+ - Archive route:
4
+ - Disproval/counterexample reference touched:
5
+ - Public wording checked:
6
+ - Method lesson captured:
7
+ - Next honest move:
@@ -0,0 +1,8 @@
1
+ # Problem 2 Archive Note
2
+
3
+ This is not a live open-problem frontier.
4
+
5
+ The honest posture is:
6
+ - preserve the disproval cleanly
7
+ - keep the references synchronized
8
+ - package the problem as a counterexample/method archive instead of a live cockpit
@@ -0,0 +1,25 @@
1
+ packet_id: nt2_ops_details_v1
2
+ summary: Archive cockpit packet for the disproved covering-systems problem.
3
+ routes:
4
+ - route_id: counterexample_archive
5
+ title: Counterexample Archive
6
+ status: archival
7
+ summary: Keep the problem packaged as a disproval archive rather than a live open frontier.
8
+ why_now: This is the honest public posture for a disproved problem.
9
+ next_move: Freeze the strongest disproval/counterexample references in the archive packet.
10
+ tickets:
11
+ - ticket_id: N2
12
+ title: Tighten the disproval archive packet
13
+ route_id: counterexample_archive
14
+ status: active
15
+ summary: Package the disproval cleanly enough that future agents cannot mistake this for an open problem.
16
+ current_blocker: The archive packet still needs a sharper reference-centered summary.
17
+ next_move: Close `N2.G1.A1`.
18
+ atoms:
19
+ - atom_id: N2.G1.A1
20
+ title: Freeze the primary disproval reference and method note
21
+ route_id: counterexample_archive
22
+ ticket_id: N2
23
+ status: ready
24
+ summary: This is the smallest archive improvement that meaningfully clarifies the public dossier.
25
+ next_move: Record the best disproval reference and checkpoint the archive packet.
@@ -0,0 +1,7 @@
1
+ # Problem 2 Report Template
2
+
3
+ - Archive route:
4
+ - What was clarified:
5
+ - Which disproval/counterexample artifact was frozen:
6
+ - Verification hook:
7
+ - Next archive action:
@@ -0,0 +1,5 @@
1
+ # Problem 2 Route History
2
+
3
+ - Initial pack posture: dossier-first seed.
4
+ - Current pack posture: archive cockpit around the counterexample/disproval record.
5
+ - Next maturity threshold: freeze the best archive packet rather than inventing open-frontier pressure.
@@ -0,0 +1,13 @@
1
+ route_packet_id: nt2_counterexample_archive_v1
2
+ route_id: counterexample_archive
3
+ frontier_claim: Preserve the disproval and counterexample-facing references cleanly so the problem remains useful as a method exemplar.
4
+ theorem_module: ""
5
+ checkpoint_packet: CHECKPOINT_TEMPLATE.md
6
+ report_packet: REPORT_TEMPLATE.md
7
+ ready_prompts:
8
+ - Which exact disproval reference should be frozen first in the archive packet?
9
+ - Which method lesson from the counterexample should be made explicit for future number-theory dossiers?
10
+ verification_hook:
11
+ - erdos number-theory status 2
12
+ - erdos number-theory routes 2
13
+ - erdos problem show 2
@@ -1,13 +1,13 @@
1
1
  problem_id: "2"
2
- family_role: additive_number_theory_seed
3
- harness_profile: dossier_seed_pack
4
- default_active_route: additive_structure_seed
5
- bootstrap_focus: Freeze the exact problem statement, local dossier, and first honest additive route sketch.
6
- route_story: This problem currently lives in dossier-first mode inside the number-theory pack.
7
- frontier_label: dossier_seed_frontier
8
- frontier_detail: Keep this number-theory problem in a disciplined dossier-first workflow until a deeper route is honestly earned.
9
- checkpoint_focus: Preserve provenance and route honesty while the pack remains dossier-first.
10
- next_honest_move: Seed the first route note and keep the public-status review current.
2
+ family_role: covering_systems_counterexample_archive
3
+ harness_profile: archive_cockpit
4
+ default_active_route: counterexample_archive
5
+ bootstrap_focus: Freeze the exact disproval record, the dossier provenance, and the counterexample-facing archive packet.
6
+ route_story: This problem is not a live open frontier; the honest public job is to preserve the disproval and keep it usable as a method/counterexample exemplar.
7
+ frontier_label: counterexample_archive
8
+ frontier_detail: Preserve the counterexample/archive posture cleanly and avoid drifting back into open-problem language.
9
+ checkpoint_focus: Keep the disproval record, references, and archive packet synchronized.
10
+ next_honest_move: Tighten the counterexample archive note and make the public references impossible to misread as an open frontier.
11
11
  related_core_problems: []
12
12
  literature_focus:
13
13
  - additive number theory
@@ -18,8 +18,8 @@ artifact_focus:
18
18
  - EVIDENCE.md
19
19
  question_ledger:
20
20
  open_questions:
21
- - What is the first honest additive-number-theory route worth freezing for problem 2?
21
+ - Which exact disproval or counterexample references should be frozen first in the archive packet?
22
22
  active_route_notes:
23
- - Keep this problem dossier-first until a real pack-specific route is earned.
23
+ - Treat this as an archive cockpit, not a live open-problem route.
24
24
  route_breakthroughs: []
25
25
  problem_solved: []
@@ -19,8 +19,8 @@ Deep route packets:
19
19
  - `857` ships `AGENT_START.md`, `ROUTE_PACKET.yaml`, `CHECKPOINT_PACKET.md`, `REPORT_PACKET.md`, `ATOMIC_BOARD.yaml`, `ATOMIC_BOARD.md`, `FRONTIER_NOTE.md`, `ROUTE_HISTORY.md`, `CHECKPOINT_TEMPLATE.md`, `REPORT_TEMPLATE.md`, `OPS_DETAILS.yaml`
20
20
 
21
21
  Bridge packets:
22
- - `536` ships `AGENT_START.md`, `ROUTE_PACKET.yaml`, `CHECKPOINT_PACKET.md`, `REPORT_PACKET.md`, `ATOMIC_BOARD.yaml`, `ATOMIC_BOARD.md`, `OPS_DETAILS.yaml`
23
- - `856` ships `AGENT_START.md`, `ROUTE_PACKET.yaml`, `CHECKPOINT_PACKET.md`, `REPORT_PACKET.md`, `ATOMIC_BOARD.yaml`, `ATOMIC_BOARD.md`, `OPS_DETAILS.yaml`
22
+ - `536` ships `AGENT_START.md`, `ROUTE_PACKET.yaml`, `CHECKPOINT_PACKET.md`, `REPORT_PACKET.md`, `ATOMIC_BOARD.yaml`, `ATOMIC_BOARD.md`, `FRONTIER_NOTE.md`, `ROUTE_HISTORY.md`, `CHECKPOINT_TEMPLATE.md`, `REPORT_TEMPLATE.md`, `OPS_DETAILS.yaml`
23
+ - `856` ships `AGENT_START.md`, `ROUTE_PACKET.yaml`, `CHECKPOINT_PACKET.md`, `REPORT_PACKET.md`, `ATOMIC_BOARD.yaml`, `ATOMIC_BOARD.md`, `FRONTIER_NOTE.md`, `ROUTE_HISTORY.md`, `CHECKPOINT_TEMPLATE.md`, `REPORT_TEMPLATE.md`, `OPS_DETAILS.yaml`
24
24
 
25
25
  Public cockpit commands:
26
26
  - `erdos sunflower status <id>`
@@ -0,0 +1,7 @@
1
+ # Problem 536 Checkpoint Template
2
+
3
+ - Active bridge route:
4
+ - Transfer note clarified:
5
+ - Reference artifact touched:
6
+ - Public-status drift checked:
7
+ - Next honest move:
@@ -0,0 +1,8 @@
1
+ # Problem 536 Frontier Note
2
+
3
+ Treat 536 as a bridge problem, not a fake deep proof lane.
4
+
5
+ The honest live work is:
6
+ - preserve the natural-density LCM analogue statement
7
+ - keep its bridge to `857` explicit
8
+ - tighten public references and transfer notes without pretending the analogue has a theorem-board frontier yet
@@ -0,0 +1,7 @@
1
+ # Problem 536 Report Template
2
+
3
+ - Route:
4
+ - What bridge context changed:
5
+ - What remains dossier-only:
6
+ - Verification hook:
7
+ - Next analogue move:
@@ -0,0 +1,5 @@
1
+ # Problem 536 Route History
2
+
3
+ - Initial public posture: dossier bridge with sunflower-family linkage.
4
+ - Current public posture: natural-density analogue bridge with explicit route packet and ops detail packet.
5
+ - Next maturity threshold: freeze stronger transfer notes into `857` before adding deeper pack machinery.
@@ -0,0 +1,7 @@
1
+ # Problem 856 Checkpoint Template
2
+
3
+ - Active bridge route:
4
+ - Exponent-transfer note clarified:
5
+ - Reference artifact touched:
6
+ - Public-status drift checked:
7
+ - Next honest move:
@@ -0,0 +1,8 @@
1
+ # Problem 856 Frontier Note
2
+
3
+ Treat 856 as a bridge problem whose value is in clean exponent-transfer context, not a fake theorem frontier.
4
+
5
+ The honest live work is:
6
+ - preserve the harmonic-density LCM analogue
7
+ - keep the exponent-transfer relationship to `857` explicit
8
+ - improve bridge artifacts and references without overstating proof structure
@@ -0,0 +1,7 @@
1
+ # Problem 856 Report Template
2
+
3
+ - Route:
4
+ - What bridge context changed:
5
+ - What remains dossier-only:
6
+ - Verification hook:
7
+ - Next analogue move:
@@ -0,0 +1,5 @@
1
+ # Problem 856 Route History
2
+
3
+ - Initial public posture: dossier bridge with weak-sunflower linkage.
4
+ - Current public posture: harmonic-density analogue bridge with explicit route packet and ops detail packet.
5
+ - Next maturity threshold: freeze cleaner exponent-transfer notes into `857` before deepening the pack.
package/src/cli/index.js CHANGED
@@ -4,7 +4,9 @@ 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';
9
+ import { runNumberTheoryCommand } from '../commands/number-theory.js';
8
10
  import { runOrpCommand } from '../commands/orp.js';
9
11
  import { runPreflightCommand } from '../commands/preflight.js';
10
12
  import { runProblemCommand } from '../commands/problem.js';
@@ -25,11 +27,22 @@ function printUsage() {
25
27
  console.log(' erdos problem use <id>');
26
28
  console.log(' erdos problem current');
27
29
  console.log(' erdos problem artifacts [<id>] [--json]');
28
- console.log(' erdos cluster list');
29
- console.log(' erdos cluster show <name>');
30
- console.log(' erdos archive show <id>');
31
- console.log(' erdos archive scaffold <id>');
32
- console.log(' erdos workspace show');
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]');
38
+ console.log(' erdos number-theory status [<id>] [--json]');
39
+ console.log(' erdos number-theory frontier [<id>] [--json]');
40
+ console.log(' erdos number-theory routes [<id>] [--json]');
41
+ console.log(' erdos number-theory tickets [<id>] [--json]');
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]');
33
46
  console.log(' erdos orp show [--json]');
34
47
  console.log(' erdos orp sync [--json]');
35
48
  console.log(' erdos state sync [--json]');
@@ -57,9 +70,9 @@ function printUsage() {
57
70
  console.log(' erdos scaffold problem <id> [--dest <path>]');
58
71
  console.log(' erdos bootstrap problem <id> [--dest <path>] [--sync-upstream]');
59
72
  console.log(' erdos seed problem <id> [--include-site|--no-site] [--include-public-search|--no-public-search] [--refresh-upstream] [--cluster <name>] [--repo-status <status>] [--harness-depth <depth>] [--title <title>] [--family-tag <tag>] [--related <id>] [--formalization-status <status>] [--active-route <route>] [--route-breakthrough] [--problem-solved] [--allow-non-open] [--dest-root <path>] [--no-activate] [--no-loop-sync] [--force] [--json]');
60
- console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
61
- console.log(' erdos pull artifacts <id> [--dest <path>] [--refresh-upstream]');
62
- console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
73
+ console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream] [--json]');
74
+ console.log(' erdos pull artifacts <id> [--dest <path>] [--refresh-upstream] [--json]');
75
+ console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream] [--json]');
63
76
  console.log(' erdos maintainer seed problem <id> [--from-pull <path>] [--dest-root <path>] [--cluster <name>] [--allow-non-open]');
64
77
  console.log(' erdos maintainer review problem <id> [--from-pull <path>] [--dest-root <path>] [--title <title>]');
65
78
  }
@@ -77,6 +90,10 @@ if (!command || command === 'help' || command === '--help') {
77
90
  exitCode = runClusterCommand(rest);
78
91
  } else if (command === 'archive') {
79
92
  exitCode = runArchiveCommand(rest);
93
+ } else if (command === 'graph-theory') {
94
+ exitCode = runGraphTheoryCommand(rest);
95
+ } else if (command === 'number-theory') {
96
+ exitCode = runNumberTheoryCommand(rest);
80
97
  } else if (command === 'workspace') {
81
98
  exitCode = runWorkspaceCommand(rest);
82
99
  } else if (command === 'orp') {
@@ -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;
@@ -10,11 +10,20 @@ function printCluster(cluster) {
10
10
  console.log(' Weak sunflower core: 857');
11
11
  console.log(' Strong sunflower sibling: 20');
12
12
  console.log(' Related analogues: 536, 856');
13
+ } else if (cluster.name === 'number-theory') {
14
+ console.log(' Open starter cockpit: 1');
15
+ console.log(' Counterexample/archive cockpit: 2');
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');
13
21
  }
14
22
  }
15
23
 
16
24
  export function runClusterCommand(args) {
17
- const [subcommand, value] = args;
25
+ const [subcommand, value, ...rest] = args;
26
+ const asJson = [value, ...rest].includes('--json');
18
27
 
19
28
  if (!subcommand || subcommand === 'help' || subcommand === '--help') {
20
29
  console.log('Usage:');
@@ -24,6 +33,10 @@ export function runClusterCommand(args) {
24
33
  }
25
34
 
26
35
  if (subcommand === 'list') {
36
+ if (asJson) {
37
+ console.log(JSON.stringify(listClusters(), null, 2));
38
+ return 0;
39
+ }
27
40
  console.log('Clusters:');
28
41
  for (const cluster of listClusters()) {
29
42
  console.log(`- ${cluster.name}: ${cluster.problems.length} problems, ${cluster.deepHarnessProblems.length} deep-harness`);
@@ -47,6 +60,11 @@ export function runClusterCommand(args) {
47
60
  return 1;
48
61
  }
49
62
 
63
+ if (asJson) {
64
+ console.log(JSON.stringify(cluster, null, 2));
65
+ return 0;
66
+ }
67
+
50
68
  printCluster(cluster);
51
69
  return 0;
52
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
+ }