hypgraph 0.5.3__tar.gz → 0.7.0__tar.gz

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 (89) hide show
  1. {hypgraph-0.5.3 → hypgraph-0.7.0}/.gitignore +2 -2
  2. {hypgraph-0.5.3 → hypgraph-0.7.0}/CHANGELOG.md +135 -0
  3. {hypgraph-0.5.3 → hypgraph-0.7.0}/PKG-INFO +23 -13
  4. {hypgraph-0.5.3 → hypgraph-0.7.0}/README.md +22 -12
  5. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/profile-workflows-plan.md +3 -3
  6. hypgraph-0.7.0/docs/site-plan.md +116 -0
  7. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/spec.md +1 -1
  8. hypgraph-0.7.0/docs/ui-plan.md +128 -0
  9. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/README.md +4 -0
  10. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/__init__.py +1 -1
  11. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/bundle.py +41 -4
  12. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/checks.py +29 -3
  13. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/cli.py +18 -5
  14. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/coord.py +12 -4
  15. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/derive.py +69 -16
  16. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/graph.py +6 -12
  17. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/profiles.py +58 -7
  18. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/report_check.py +2 -2
  19. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/schema.py +2 -1
  20. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/server.py +130 -8
  21. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/skill/SKILL.md +1 -1
  22. hypgraph-0.7.0/src/hypgraph/ui/__init__.py +8 -0
  23. hypgraph-0.7.0/src/hypgraph/ui/atlas.css +2 -0
  24. hypgraph-0.7.0/src/hypgraph/ui/atlas.js +7 -0
  25. hypgraph-0.7.0/src/hypgraph/ui/hypgraph.css +221 -0
  26. hypgraph-0.7.0/src/hypgraph/ui/hypgraph.js +1068 -0
  27. hypgraph-0.7.0/src/hypgraph/ui/index.html +29 -0
  28. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/workflow.py +23 -5
  29. hypgraph-0.7.0/tests/test_bundle_telemetry.py +62 -0
  30. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_coord.py +12 -0
  31. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_incremental.py +11 -3
  32. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_log_and_check.py +11 -0
  33. hypgraph-0.7.0/tests/test_measure_questions.py +82 -0
  34. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_profiles.py +4 -0
  35. hypgraph-0.7.0/tests/test_restates_scale.py +103 -0
  36. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_surfaces.py +5 -2
  37. hypgraph-0.7.0/tests/test_telemetry_stream.py +92 -0
  38. hypgraph-0.7.0/tests/test_ui_app.py +65 -0
  39. hypgraph-0.7.0/tests/test_ui_engine.py +133 -0
  40. hypgraph-0.7.0/tests/test_versions_not_figures.py +78 -0
  41. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_vocabulary_friction.py +2 -2
  42. hypgraph-0.5.3/src/hypgraph/ui/__init__.py +0 -7
  43. hypgraph-0.5.3/src/hypgraph/ui/atlas.css +0 -219
  44. hypgraph-0.5.3/src/hypgraph/ui/atlas.js +0 -1074
  45. hypgraph-0.5.3/src/hypgraph/ui/index.html +0 -30
  46. hypgraph-0.5.3/studies/harmony/tests/test_suite.py +0 -107
  47. {hypgraph-0.5.3 → hypgraph-0.7.0}/AGENTS.md +0 -0
  48. {hypgraph-0.5.3 → hypgraph-0.7.0}/CITATION.cff +0 -0
  49. {hypgraph-0.5.3 → hypgraph-0.7.0}/LICENSE +0 -0
  50. {hypgraph-0.5.3 → hypgraph-0.7.0}/NOTICE +0 -0
  51. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/PLAN.md +0 -0
  52. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/decisions/ADR-001-token-bound-authors.md +0 -0
  53. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/decisions/ADR-002-governance-profiles.md +0 -0
  54. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/review-2026-10-24.md +0 -0
  55. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/knowledge.md +0 -0
  56. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/optimization.md +0 -0
  57. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/scientific.md +0 -0
  58. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/software.md +0 -0
  59. {hypgraph-0.5.3 → hypgraph-0.7.0}/docs/workflows/trading.md +0 -0
  60. {hypgraph-0.5.3 → hypgraph-0.7.0}/pyproject.toml +0 -0
  61. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/__main__.py +0 -0
  62. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/demos/__init__.py +0 -0
  63. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/demos/broad_street.py +0 -0
  64. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/language.py +0 -0
  65. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/mcp.py +0 -0
  66. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/plan.py +0 -0
  67. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/policy.py +0 -0
  68. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/refusals.py +0 -0
  69. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/stats.py +0 -0
  70. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/store.py +0 -0
  71. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/hypgraph.svg +0 -0
  72. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/vendor/LICENSES.md +0 -0
  73. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/vendor/cose-base.js +0 -0
  74. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/vendor/cytoscape-fcose.js +0 -0
  75. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/vendor/cytoscape.min.js +0 -0
  76. {hypgraph-0.5.3 → hypgraph-0.7.0}/src/hypgraph/ui/vendor/layout-base.js +0 -0
  77. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_cancel_releases_lease.py +0 -0
  78. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_d10.py +0 -0
  79. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_engine.py +0 -0
  80. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_engine_fixes.py +0 -0
  81. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_order_detail.py +0 -0
  82. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_profiles_041.py +0 -0
  83. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_questions_not_assertions.py +0 -0
  84. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_refusals.py +0 -0
  85. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_report_answers.py +0 -0
  86. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_server_auth.py +0 -0
  87. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_stats_values.py +0 -0
  88. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_unnamed_inputs.py +0 -0
  89. {hypgraph-0.5.3 → hypgraph-0.7.0}/tests/test_workflows.py +0 -0
@@ -15,5 +15,5 @@ research.hypgraph*
15
15
  Thumbs.db
16
16
  .claude/
17
17
 
18
- # study runs: outputs, sealed keys and records stay local until published on purpose
19
- studies/*/runs/
18
+ # internal studies: kept on the machine that runs them, not published
19
+ studies/
@@ -1,5 +1,140 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 — 2026-10-27: measure questions, and claim checks that know a version from a figure
4
+
5
+ - **Measure questions.** A question may say `asks: "measure"`, and its workflow's `measure_skips` gates then don't
6
+ apply to it, in `Graph.stage()` and as order predicates. Until now every question met every gate of its profile:
7
+ a timing question was reworked for a diff, a count for a preregistered hypothesis, a look-ahead check for a
8
+ backtest. Real-model runs lost most of their calls to those reworks. `profiles.view()` lists the skipped gates.
9
+ - **Claim checks:** dotted versions, inline code and labels (case 8, cases 9–12, #3) aren't figures; a measurement's
10
+ key written in place of its number is refused (KEY_FOR_NUMBER); a statement that says nothing ("Placeholder.")
11
+ is refused (STATEMENT_EMPTY).
12
+ - **A rework's predicates are checked like an order's:** an unknown predicate is refused, naming every predicate the
13
+ target can take. A lead had reworked an order with an invented one (`claim_answers_q3`) that could never be met.
14
+ - **Trading: a statistic about returns isn't a return earned.** Correlations, hit rates and other diagnostics of
15
+ returns no longer need fees and slippage (BACKTEST_WITHOUT_COSTS); a return, P&L or Sharpe still does.
16
+ - **hypgraph.com in the app's design system.** One stylesheet on the HypGraph app's tokens and components, light by
17
+ default, restyles every page. The new homepage:
18
+ - opens on the live app, which can switch between the five workflows, Broad Street and the page's own record;
19
+ - offers the agent and engineer paths, then the facts, what the record refuses, the eight rules and the
20
+ arithmetic of never;
21
+ - ends with the workflows, the deployment options, the page's record and what the record shows and doesn't claim.
22
+ - **The homepage proves its figures with its own HypGraph record** (`dev/site_record.py`, now run at every deploy):
23
+ - The instrument measures each figure: tests passing, runtime dependencies, the example records' chains, the bound
24
+ behind the arithmetic of never, and the refused overclaims.
25
+ - A reviewer re-measures each one another way.
26
+ - The page's text is checked against the record with `hypgraph check`, and a copy error fails the deploy.
27
+ - **The report check no longer flags "not ruled out" as an absence claim.** Exclusion words that the sentence negates
28
+ are skipped, as absolutes already were. "Up to 58,155 … are not ruled out" and "a leak cannot be ruled out" are
29
+ hedges; the engine's own bound note says it in those words.
30
+
31
+ - **Derivation scales with the record.** Working out which earlier results a result repeats (`derive.restates`) took a
32
+ pass over the whole graph for every result, recomputing each one's numbers, so deriving a record grew with the
33
+ square of its results. It now reads a per-snapshot index of each investigation's results by the numbers they carry,
34
+ and a result's numbers are computed once per version, shared across snapshots. On `dev/bench.py`'s record: 10,001
35
+ nodes derive in 0.34 s (was 20.35 s), 4,001 in 0.11 s (was 3.65 s). The write-time duplicate check uses the same
36
+ index.
37
+ - **Two fixes to carried standing.** Both were found by the test at scale.
38
+ - Results written in the same second were ordered by id, so a result written later could count as "earlier" and
39
+ change what an older result repeats, after the older one's standing had been derived and carried forward. Ties now
40
+ go by write order.
41
+ - Revising or withdrawing a result now re-derives the results that repeat its numbers. They reach it through no
42
+ edge, so they used to keep their old standing.
43
+
44
+ The randomized incremental suite now gives results numbers, by several authors, and revises them. It fails on the
45
+ old code (5 of 6 seeds) and passes now.
46
+ - `dev/bench.py`: reads, writes and derivation at a given record size, on your machine. The README's performance
47
+ figures come from it.
48
+
49
+ ## 0.6.0 — 2026-10-26: the HypGraph UI, live swarm observability, an example per profile
50
+
51
+ The Atlas becomes **HypGraph**: one app for every profile, in each profile's own words, that watches a swarm
52
+ work as it happens and replays any finished run. The design record is `docs/ui-plan.md`. Nothing in the record
53
+ format changes; bundles gain optional fields that sit outside the hash chain.
54
+
55
+ **The HypGraph UI**, which replaces the Atlas:
56
+ - **Eight views in each profile's own words:** Overview, Live, Pipeline, Graph, Evidence, Work orders, Audit log and
57
+ Report. A software investigation shows Requirements and Verifications; a trading one shows Theses and Positions.
58
+ - **Overview** has KPI tiles, the completion criteria, each question's stage, a "needs attention" list and recent
59
+ activity. Attention covers stale evidence, contested claims, premises that fell, leases held past their time,
60
+ returned orders, overclaims refused and a broken chain.
61
+ - **Pipeline** is a swimlane of the profile's stages, with each gate met or not, its evidence, and what would meet it.
62
+ - **Live** shows seats, the record growing and the event stream. It follows `/api/graph/stream` and falls back to
63
+ polling on hosts without it. Any run plays back with play, pause, scrub and speed controls.
64
+ - **Drawers:** a node's drawer gives its standing, fields, links both ways, provenance and what would be at risk if
65
+ it fell. A question's drawer gives its stage and gates.
66
+ - **Enterprise:**
67
+ - light by default, with dark one key away;
68
+ - WCAG AA text contrast in both themes, checked by a test;
69
+ - every screen is a URL, and Back and Forward work;
70
+ - ⌘K search over views, investigations and nodes, plus keys 1–8, `/`, `t` and Esc;
71
+ - CSV export for tables, PNG and JSON for the graph, Markdown and print-to-PDF for the report, and the bundle;
72
+ - the hash-chain badge, read-only, with no build step.
73
+ - **Compatibility for one release:** `atlas.js` and `atlas.css` load the new app, `HypAtlas` is an alias of
74
+ `HypGraph`, and the `--hg-*` theme tokens still apply. Routes a host doesn't serve are hidden rather than failing,
75
+ so PegasusDMZ's older API still works.
76
+ - `dev/ui_smoke.py` renders every view of five profile fixtures in both themes, plus an Atlas-style page, in headless
77
+ Chrome. CI runs it.
78
+
79
+ **Live observability for a running swarm** (with hypswarm ≥ 0.1.0a7's telemetry):
80
+ - **`hypgraph serve` streams a swarm's telemetry.** hypswarm writes `<record>.telemetry.jsonl` beside the record: every
81
+ model call, tool call, work order and scheduler decision, as spans. The server serves it at `GET /api/graph/telemetry`
82
+ (paged by byte offset) and tails it into `/api/graph/stream` as `telemetry` events. Ids become `<seq>:<offset>` so a
83
+ reconnect resumes both. A sidecar that appears after the server starts is picked up, and `--telemetry FILE` /
84
+ `--no-telemetry` override the default. Telemetry is shown, never trusted for standing.
85
+ - **The Live view shows the swarm working:**
86
+ - each seat's call in flight (the model it's calling or the tool it's running, with seconds elapsed), and its calls,
87
+ tokens, cost and errors;
88
+ - KPI tiles for model calls, tokens in → out and cached, spend, tool calls, errors, and budget used against the run's cap;
89
+ - an event stream merging the record and telemetry, with a filter;
90
+ - a trace for any work order, showing each model and tool call on a timeline;
91
+ - alerts: a tool failing three times in a row, a seat repeating an identical tool call, failed model calls, the
92
+ budget passing 80 %;
93
+ - status from the run's own start and end ("Run ended · settled").
94
+
95
+ A record opened before its swarm starts picks the investigation up when it begins. Replay scopes telemetry to the
96
+ replay position. Overview's spend falls back to telemetry when the ledger isn't metered.
97
+ - `dev/ui-fixtures/swarm.*` holds a real scripted swarm's bundle and telemetry, and the smoke check requires its trace.
98
+
99
+ **What the UI needs from the engine:**
100
+ - **Each profile speaks its own words.** `Profile.labels` gives the short noun a screen shows for each node type: a
101
+ software question is a **Requirement**, a trading hypothesis a **Thesis**, a decision a **Position**, an
102
+ optimization result a **Solution**. `profiles.view(pid)` returns what a UI needs: the labels for every node type
103
+ (the kernel's word where the profile has none), the meaning of each type, and the workflow's stages, gates and
104
+ report name. The `@1` profiles are frozen and keep the kernel's words. The labels are display only.
105
+ - **A bundle carries the workflow views.** Each investigation's `derived` now has `profile`, `stages`, `completion`,
106
+ `board` and `orders` beside the report, so a viewer shows stages and gates without the engine. As before, derived
107
+ views are outside the hash chain and never trusted.
108
+ - **Watch a record live.** `GET /api/graph/stream?inv=&after=` pushes every event as it is written, as Server-Sent
109
+ Events. It includes writes from another process on the same file, so a swarm running against the record is
110
+ watched as it works. Ids are event seqs, so a client resumes with `Last-Event-ID`. A comment line every 15 s keeps
111
+ proxies open, and `max_seconds` bounds a read.
112
+ - `GET /api/graph/profile?inv=` gives the investigation's profile as a UI speaks it.
113
+ - "Atlas" is now the HypGraph UI in the server, the CLI, the README and the skill.
114
+
115
+ **A live example per profile on hypgraph.com:**
116
+ - **Five live examples.** `/examples/` has one page per `@2` profile: scientific, software, trading, knowledge and
117
+ optimization. Each is a HypSwarm run on a real record that opens on its live replay. You see the seats take work
118
+ orders, model and tool calls in flight, writes refused and rewritten, and reviews landing, then you can explore the
119
+ pipeline, graph, evidence and report. The pages load offline from their bundles and re-verify each hash chain in
120
+ the browser. `dev/site_examples.py` rebuilds them from HypSwarm's scripted examples, pacing each reply 0.35–1.4 s,
121
+ and every page says so.
122
+ - **A bundle can carry the run's telemetry.** `export(inv, telemetry=path)` and `hypgraph export --telemetry [FILE]`
123
+ (default `<db>.telemetry.jsonl`) add a swarm's sidecar for replay. It is outside the hash chain:
124
+ `verify_bundle` and `from_bundle` ignore it, and the UI labels it "not hash-chained". It is off unless asked for,
125
+ because a sidecar names a run's models, seats and spend.
126
+ - **`play` opens on the replay.** The `play` mount option, or `#view=live&play=1`, opens the Live view and plays the
127
+ run from its first event. With reduced motion requested, it shows the finished run with Play one click away.
128
+ - **A refused write is not an error.** In the Live view, a tool call the record refused counts as "refused by the
129
+ record", with its reason: amber on the seat, in the stream and in the trace. Errors count real failures only.
130
+ - **The site's Atlas page is replaced.** The UI is served from `/app/`, `/explore/` opens any bundle full screen, and
131
+ `/atlas/` forwards there (keeping `?bundle=`, the hand-over from `/verify/` and the fragment). The home page embeds
132
+ the app directly. `/verify/` says when a bundle carries telemetry and opens bundles in HypGraph.
133
+ - **A narrow layout.** Below 760 px of its own width (a phone, or a narrow frame), the app's sidebar becomes a strip of
134
+ tabs and the top bar wraps. It uses a container query, so an embed sizes it, not the window.
135
+ - The smoke check also renders the site: each example opens replaying with its chain verified, plus the home page,
136
+ the explorer, the `/atlas/` forward and the gallery (106 pages).
137
+
3
138
  ## 0.5.3 — 2026-10-26: results that name no file can go stale
4
139
 
5
140
  - **A result that names no file it read can go stale.** Under a workflow (`@2` profiles), a result whose run has no
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hypgraph
3
- Version: 0.5.3
3
+ Version: 0.7.0
4
4
  Summary: The evidence layer for AI research agents: a hash-chained research record that checks every claim as it is written and derives how well each is known.
5
5
  Project-URL: Homepage, https://hypgraph.com
6
6
  Project-URL: Documentation, https://hypgraph.com/engineers/
@@ -194,9 +194,16 @@ with g.writing_for(task_id): # every event carrie
194
194
  - **Multi-agent:** give each agent its own author name. Make your critic agents reviewers. Have your job runner
195
195
  write as the instrument, so its runs count as recorded, not reported.
196
196
  - **Your web framework:** `hypgraph.server.dispatch(graph, method, path, query, body)` is the JSON API, and
197
- `hypgraph.ui.static_dir()` is the Atlas explorer to mount next to it.
197
+ `hypgraph.ui.static_dir()` is the HypGraph UI to mount next to it.
198
+ - **Watching it live:** `GET /api/graph/stream?inv=` pushes every event as it is written (Server-Sent Events,
199
+ resumable with `Last-Event-ID`), including writes from another process on the same file, such as a swarm running
200
+ against the record. `GET /api/graph/profile?inv=` gives the investigation's profile as a UI speaks it: each node
201
+ type's label ("Requirement", "Thesis"), the workflow's stages and the report's name. A swarm's telemetry sidecar
202
+ (`<db>.telemetry.jsonl`, written by hypswarm) rides the same stream as `telemetry` events, so the Live view shows every
203
+ model and tool call as it happens.
198
204
  - **CI:** `hypgraph export -o record.bundle.json && hypgraph verify record.bundle.json`. The bundle is a single file
199
- your reviewers or auditors can check with SHA-256, in any language or in the browser.
205
+ your reviewers or auditors can check with SHA-256, in any language or in the browser. `--telemetry` carries the
206
+ swarm's sidecar too, outside the chain, so the bundle replays the run with no server.
200
207
 
201
208
  The full guide is at [hypgraph.com/engineers](https://hypgraph.com/engineers/).
202
209
 
@@ -205,30 +212,33 @@ The full guide is at [hypgraph.com/engineers](https://hypgraph.com/engineers/).
205
212
  ```bash
206
213
  pip install hypgraph
207
214
  hypgraph demo # a complete worked investigation (Broad Street, 1854) built into ./research.hypgraph
208
- hypgraph serve # explore it in the Atlas: http://127.0.0.1:8765
215
+ hypgraph serve # explore it in the HypGraph UI: http://127.0.0.1:8765
209
216
  hypgraph report # the facts, generated from the record
210
217
  ```
211
218
 
212
- Or try to get a claim past the real engine in your browser: [hypgraph.com/play](https://hypgraph.com/play/).
219
+ Or watch a swarm work in each profile, replayed live from its record:
220
+ [hypgraph.com/examples](https://hypgraph.com/examples/). Or try to get a claim past the real engine in your browser:
221
+ [hypgraph.com/play](https://hypgraph.com/play/).
213
222
 
214
223
  ## Where it came from
215
224
 
216
- HypGraph is the research graph of PegasusDMZ, where a team of AI agents runs long investigations under governed
217
- egress, pulled out so anyone can use it. Each rule exists because the agents made the mistake behind it:
225
+ HypGraph began as the research graph of a team of AI agents running long investigations under governed egress, and
226
+ was pulled out so anyone can use it. Each rule exists because the agents made the mistake behind it:
218
227
  - a validation that was blind to the answer;
219
228
  - a null model that broke the system's own rules;
220
229
  - a summary whose numbers matched no result;
221
230
  - "never" written about something that happened once in a thousand.
222
231
 
223
- PegasusDMZ is the reference deployment, and its Atlas is built from this package. Against PegasusDMZ's live record
224
- (1,357 events, 790 nodes), the library derives the same standing for every node as the engine it replaced.
232
+ That team still runs on it, and its graph UI is built from this package. Against the team's live record (1,357 events,
233
+ 790 nodes), the library derives the same standing for every node as the engine it replaced.
225
234
 
226
235
  ## Performance
227
236
 
228
- The engine is pure Python and stays fast at the sizes research records reach. At 10,000 nodes, deriving every node's
229
- standing takes 0.09 s, reading one node 0.3 ms, and a write about 10 ms, mostly SQLite committing to disk. A write
230
- costs what it touches: cached standing is kept for every node the write can't affect, and a randomized suite checks
231
- that against a full rebuild.
237
+ The engine is pure Python and stays fast at the sizes research records reach. On `dev/bench.py`'s record (one
238
+ investigation of questions, results, claims and reviews), at 10,001 nodes deriving every node's standing takes 0.34 s
239
+ on a Windows laptop, reading one node 0.07 ms, and a write about 12 ms, mostly SQLite committing to disk; derivation
240
+ grows in step with the record. A write costs what it touches: cached standing is kept for every node the write can't
241
+ affect, and a randomized suite checks that against a full rebuild. Run `python dev/bench.py` for your machine.
232
242
 
233
243
  ## Made by
234
244
 
@@ -162,9 +162,16 @@ with g.writing_for(task_id): # every event carrie
162
162
  - **Multi-agent:** give each agent its own author name. Make your critic agents reviewers. Have your job runner
163
163
  write as the instrument, so its runs count as recorded, not reported.
164
164
  - **Your web framework:** `hypgraph.server.dispatch(graph, method, path, query, body)` is the JSON API, and
165
- `hypgraph.ui.static_dir()` is the Atlas explorer to mount next to it.
165
+ `hypgraph.ui.static_dir()` is the HypGraph UI to mount next to it.
166
+ - **Watching it live:** `GET /api/graph/stream?inv=` pushes every event as it is written (Server-Sent Events,
167
+ resumable with `Last-Event-ID`), including writes from another process on the same file, such as a swarm running
168
+ against the record. `GET /api/graph/profile?inv=` gives the investigation's profile as a UI speaks it: each node
169
+ type's label ("Requirement", "Thesis"), the workflow's stages and the report's name. A swarm's telemetry sidecar
170
+ (`<db>.telemetry.jsonl`, written by hypswarm) rides the same stream as `telemetry` events, so the Live view shows every
171
+ model and tool call as it happens.
166
172
  - **CI:** `hypgraph export -o record.bundle.json && hypgraph verify record.bundle.json`. The bundle is a single file
167
- your reviewers or auditors can check with SHA-256, in any language or in the browser.
173
+ your reviewers or auditors can check with SHA-256, in any language or in the browser. `--telemetry` carries the
174
+ swarm's sidecar too, outside the chain, so the bundle replays the run with no server.
168
175
 
169
176
  The full guide is at [hypgraph.com/engineers](https://hypgraph.com/engineers/).
170
177
 
@@ -173,30 +180,33 @@ The full guide is at [hypgraph.com/engineers](https://hypgraph.com/engineers/).
173
180
  ```bash
174
181
  pip install hypgraph
175
182
  hypgraph demo # a complete worked investigation (Broad Street, 1854) built into ./research.hypgraph
176
- hypgraph serve # explore it in the Atlas: http://127.0.0.1:8765
183
+ hypgraph serve # explore it in the HypGraph UI: http://127.0.0.1:8765
177
184
  hypgraph report # the facts, generated from the record
178
185
  ```
179
186
 
180
- Or try to get a claim past the real engine in your browser: [hypgraph.com/play](https://hypgraph.com/play/).
187
+ Or watch a swarm work in each profile, replayed live from its record:
188
+ [hypgraph.com/examples](https://hypgraph.com/examples/). Or try to get a claim past the real engine in your browser:
189
+ [hypgraph.com/play](https://hypgraph.com/play/).
181
190
 
182
191
  ## Where it came from
183
192
 
184
- HypGraph is the research graph of PegasusDMZ, where a team of AI agents runs long investigations under governed
185
- egress, pulled out so anyone can use it. Each rule exists because the agents made the mistake behind it:
193
+ HypGraph began as the research graph of a team of AI agents running long investigations under governed egress, and
194
+ was pulled out so anyone can use it. Each rule exists because the agents made the mistake behind it:
186
195
  - a validation that was blind to the answer;
187
196
  - a null model that broke the system's own rules;
188
197
  - a summary whose numbers matched no result;
189
198
  - "never" written about something that happened once in a thousand.
190
199
 
191
- PegasusDMZ is the reference deployment, and its Atlas is built from this package. Against PegasusDMZ's live record
192
- (1,357 events, 790 nodes), the library derives the same standing for every node as the engine it replaced.
200
+ That team still runs on it, and its graph UI is built from this package. Against the team's live record (1,357 events,
201
+ 790 nodes), the library derives the same standing for every node as the engine it replaced.
193
202
 
194
203
  ## Performance
195
204
 
196
- The engine is pure Python and stays fast at the sizes research records reach. At 10,000 nodes, deriving every node's
197
- standing takes 0.09 s, reading one node 0.3 ms, and a write about 10 ms, mostly SQLite committing to disk. A write
198
- costs what it touches: cached standing is kept for every node the write can't affect, and a randomized suite checks
199
- that against a full rebuild.
205
+ The engine is pure Python and stays fast at the sizes research records reach. On `dev/bench.py`'s record (one
206
+ investigation of questions, results, claims and reviews), at 10,001 nodes deriving every node's standing takes 0.34 s
207
+ on a Windows laptop, reading one node 0.07 ms, and a write about 12 ms, mostly SQLite committing to disk; derivation
208
+ grows in step with the record. A write costs what it touches: cached standing is kept for every node the write can't
209
+ affect, and a randomized suite checks that against a full rebuild. Run `python dev/bench.py` for your machine.
200
210
 
201
211
  ## Made by
202
212
 
@@ -25,8 +25,8 @@ exists only as a paragraph in the profile's notes and as a diagram on hypswarm.c
25
25
  | suggested seats | the **report**: every profile prints "Facts from the research graph" |
26
26
  | | the **order**: HypSwarm issues from the question board, not from the stage a question is in |
27
27
 
28
- The discovery study (HypSwarm `studies/discovery/`) showed what this costs: 110 of 118 refusals were vocabulary
29
- friction because the models were writing discipline work into scientific slots, and the honesty rules by themselves
28
+ An internal study showed what this costs: most refusals were vocabulary
29
+ friction, because the models were writing discipline work into scientific slots, and the honesty rules by themselves
30
30
  did not beat a prompt. What a prompt cannot do is remember that the code changed since the tests ran, that the
31
31
  source was retracted, that the regime moved, that the teammate's number is stale — the workflow's *invalidation*
32
32
  and *gates*. That is where the record should win, and it is exactly what profiles don't yet encode.
@@ -95,7 +95,7 @@ instrument, mechanical feasibility recomputation (P3). **P2 built in HypSwarm 0.
95
95
  orders, review on the node the previous gate produced, the record's word on done; the examples' scripted models walk
96
96
  the stages; the discovery stub run through its stages). P2 fed back into hypgraph 0.5.1: honest endings the stages
97
97
  lacked (a declined thesis, an inconclusive answer, a verified failure), artifacts that learn their kind on
98
- re-registration, optimization's `checked` stage. **P3 built (2026-10-26):** the instruments in HypSwarm 0.1.0a5 (world watcher, re-verification, source re-fetch, refresh orders) and hypgraph 0.5.2 (source freshness, fresh-only gates, stale in the report); the change suite in HypSwarm `studies/discovery/PLAN-CHANGE.md`, self-test and stub run at $0, predictions locked; the model run waits for the spend approval.
98
+ re-registration, optimization's `checked` stage. **P3 built (2026-10-26):** the instruments in HypSwarm 0.1.0a5 (world watcher, re-verification, source re-fetch, refresh orders) and hypgraph 0.5.2 (source freshness, fresh-only gates, stale in the report); the change suite (an internal study), self-test and stub run at $0, predictions locked; the model run waits for the spend approval.
99
99
 
100
100
  ## 4. What stays as it is, on purpose
101
101
 
@@ -0,0 +1,116 @@
1
+ # hypgraph.com and hypswarm.com — plan
2
+
3
+ *Status (2026-10-27): P0 (this plan, the prototype) and P1 (the derivation fix) done; P2 built — hypgraph.com's
4
+ homepage and stylesheet are the design below, and the homepage's record (`dev/site_record.py`) is built at every
5
+ deploy. The prototype folder was retired once the real page replaced it (its screenshots are in the PR that added
6
+ it). P3 (docs, trust page, refusal catalogue) and P4 (hypswarm.com) are next.*
7
+
8
+ ## 1. Where it stands
9
+
10
+ The HypGraph UI (0.6) reads as a product: a verified chain, counts, states, a run replaying. The two sites read as
11
+ landing pages: a dark neon theme, an animated graph behind the hero, a gradient headline and cards of copy. The copy
12
+ itself is honest — a scan of both homepages found no overclaims — so the gap is presentation, not substance. A
13
+ visitor who clicks from the site into an example also crosses from one visual world into another.
14
+
15
+ What enterprise readers trust, in roughly this order: the product shown working, specifics they can check, docs with
16
+ depth, a page saying what the thing guarantees and what it doesn't, and restraint. Decoration and adjectives count
17
+ against a tool whose whole pitch is evidence.
18
+
19
+ ## 2. The principle: the site follows the record's rules
20
+
21
+ HypGraph refuses a number no result accounts for and an "always" without the counts. The sites meet the same bar,
22
+ and prove it with a HypGraph record of their own:
23
+
24
+ - **Every figure on the page is a claim in the page's record** (`dev/site_record.py`), bound to the measurement it
25
+ came from. The build's instrument (`lab`) runs the measurements: the test suite, the pyproject, the example
26
+ bundles' hash chains, and the overclaims the page shows, written into a scratch record.
27
+ - **A reviewer re-measures each one another way** (`site-check`): the suite run again and its tests counted by
28
+ collection, the pyproject parsed with `tomllib` instead of a regex, the bundles verified by the UI's JavaScript
29
+ verifier (`dev/js_verify.js`, WebCrypto) instead of the Python one, the overclaims written into a second fresh
30
+ record. Its verdict goes into the record: replicated, checked, or an objection.
31
+ - **The page's text is linted against the record** with `hypgraph check`: with the figures filled in, a number no
32
+ claim or result accounts for, an absolute word with nothing behind it, or a citation the record doesn't hold, is
33
+ an error and fails the build. Words the page quotes as examples of what gets refused are marked `data-quote`; a
34
+ phrase true by the engine's design ("on every read": standing is derived on read) is marked `data-ok="<why>"` and
35
+ listed on the page with its reason.
36
+ - **The record ships with the page**, as a bundle a visitor opens in the app on the page ("This page's own record")
37
+ or verifies themselves.
38
+
39
+ ### What building the record found already
40
+
41
+ - **The README's performance sentence doesn't hold** on the record shape `dev/bench.py` builds (new: nothing in the
42
+ repo reproduced the figure before). The profile points to `derive.restates`, which compares each result with every
43
+ other result in its investigation and recomputes each one's numbers every time. That is an engine fix of its own
44
+ (P1), now in its own PR: 10,001 nodes derive in 0.34 s (was 20.35 s), and the README quotes the measured figures.
45
+ The fix also found two bugs in carried standing that the randomized suite had never exercised.
46
+ - The record holds its builders to the same rules: the benchmark's own first writes were refused (a number in a
47
+ claim bound to nothing; a result repeating another's numbers), and the copy check failed the prototype's first
48
+ draft three times ("never set by an agent", "what the record guarantees", and a bare 256 in "SHA-256"). Each was
49
+ fixed: reworded, put in code, or marked true by design with its reason.
50
+ - The derived standing caught a wiring mistake in the builder: the first claims carried `derived_from` but no
51
+ `supports` link, so each read "no live support · unverified report". With the support link, each reads "checked ·
52
+ 1 independent line of support · lab-recorded run · no external replication" — which is what the page can honestly
53
+ say, and the page shows it as it is.
54
+
55
+ ## 3. One design system, the app's
56
+
57
+ The site takes the app's tokens and components (`src/hypgraph/ui/hypgraph.css`): the same colours, type, cards,
58
+ pills, tables and focus rings; light by default and dark one click away; text at WCAG AA in both themes (the
59
+ existing contrast test extends to the site's tokens); motion only where it carries meaning (a run replaying),
60
+ switched off under reduced motion. One header pattern across hypgraph.com and hypswarm.com, each linking the other.
61
+
62
+ ## 4. hypgraph.com
63
+
64
+ Navigation: Product · Workflows · What it refuses · Docs · Trust · GitHub, plus the version and a copyable
65
+ `pip install hypgraph`.
66
+
67
+ The homepage, top to bottom (all in the prototype):
68
+
69
+ | section | shows | backed by |
70
+ |---|---|---|
71
+ | Hero | one plain sentence on what it is; the slogan, smaller | — |
72
+ | The product, live | the app replaying a run; a switch between the five workflows and **this page's own record**; the chain verified on load | the example bundles; the page's record |
73
+ | Facts | tests passing, runtime dependencies, bundles verified in your browser (a button runs it) | each a claim in the page's record, with its review; click to open it |
74
+ | What it refuses | three overclaims, the engine's refusal (codes and text) and the rewrite it accepted | generated at build, a claim in the record |
75
+ | This page has a record | the claims with their reviews, the copy check's result, the phrases true by design | the record and `hypgraph check` |
76
+ | Workflows | the five profiles: stages, what each refuses, when done; each with its live example | the profiles (`hypgraph profiles`) |
77
+ | For the people who deploy agents | MCP + skill, Python, UI and API, CI gate, bundles, HypSwarm | the CLI as it is |
78
+ | Trust | what the record shows and what it doesn't claim; local, no account, no network calls of its own; trusted publishing | the spec and the release workflow |
79
+
80
+ Other pages: Docs (getting started, concepts, workflows, CLI, Python and HTTP API, MCP, the spec — generated from
81
+ markdown by `dev/build_site.py`, no new dependencies), Trust (the long form of the section, including the bundle
82
+ threat model: scoped bundles, telemetry outside the chain), the refusal catalogue (every code with a real refusal and
83
+ its fix), and the existing Never, Playground, Verify and Examples pages, restyled.
84
+
85
+ ## 5. What we say and what we don't
86
+
87
+ **We say** what the record checks, what it refused, what was measured (with where), and what it shows.
88
+ Something the product doesn't do well yet stays off the sites until it does; it isn't dressed up.
89
+
90
+ **We don't say** anything we haven't shown: that teams coordinated through the record beat a well-prompted single
91
+ agent, or cost less; customer logos, testimonials, "trusted by", ROI figures, adjectives such as "enterprise-grade",
92
+ pricing tiers or "contact sales". A short "what it doesn't claim" list sits on the homepage: it doesn't make a
93
+ claim true, and it doesn't make a model reason better.
94
+
95
+ ## 6. hypswarm.com
96
+
97
+ The same system, a sister site. The hero is the Live view of a swarm working. Then a free scripted quickstart; the
98
+ framework bridges named only where tests cover them (LangChain, PydanticAI, CrewAI, Bedrock); telemetry and
99
+ OpenTelemetry; "alpha" kept visible. It gets a record of its own the same way (its test suite, its examples
100
+ settling, the bridges' tests).
101
+
102
+ ## 7. Phases
103
+
104
+ | phase | what | verified by |
105
+ |---|---|---|
106
+ | **P0** | this plan, the prototype homepage, the page's record (`dev/site_record.py`), `dev/bench.py` | screenshots in #17; the record builds with 0 copy errors |
107
+ | **P1** | the engine fix for `derive.restates`, measured with `dev/bench.py` (its own PR) | a test at scale; the benchmark |
108
+ | **P2** | the shared design system and the new hypgraph.com homepage, with its record built in CI | the smoke check, the contrast test, the copy check failing the build |
109
+ | **P3** | docs, the trust page, the refusal catalogue | the same |
110
+ | **P4** | hypswarm.com on the same system, with its record | the same |
111
+
112
+ ## 8. Decisions taken
113
+
114
+ 1. No deployment is named on the sites.
115
+ 2. Timing stays off the sites until the engine fix lands; nothing the product doesn't do well yet is shown.
116
+ 3. The slogan stays as a small tagline under the headline, which says what the product does.
@@ -231,4 +231,4 @@ the writer's assertion. Codes are matched within the investigation being reporte
231
231
  | warning | `REPORT_CAUSAL_UNCITED` | causal language with no node cited |
232
232
  | note | `REPORT_BOUND` | an absolute backed by a cited count: what the count supports |
233
233
 
234
- Calibrated on 24 real write-ups from PegasusDMZ against its live record.
234
+ Calibrated on 24 real write-ups checked against the live record they report on.
@@ -0,0 +1,128 @@
1
+ # HypGraph UI — plan (Atlas → HypGraph)
2
+
3
+ *Status (2026-10-26): P1–P4 built and released in hypgraph 0.6.0; P5 (the Pegasus pod) waits for a rebuild. The
4
+ decisions in §6 were taken as proposed: plain "HypGraph", light by default, OpenTelemetry as an optional extra with
5
+ prompts and outputs off. The prototype the plan refers to (`dev/ui-prototype/`, with screenshots) lives on the
6
+ proposal's branch, `ui-hypgraph` (PR #10), not on main.*
7
+
8
+ ## 1. Where it stands
9
+
10
+ The explorer shipped as **Atlas** (`src/hypgraph/ui/atlas.js`, `hypgraph serve`, the site's `/atlas/`). It predates the
11
+ profiles-as-workflows release (0.5) and was never updated for it:
12
+
13
+ - **It knows only the scientific method.** Its six views (Graph, Hypotheses, Claims, Provenance, Work, Timeline) are
14
+ built around hypotheses and claims. Nothing in it reads a profile, a workflow, a stage or a gate. A software
15
+ record shows "hypotheses" where the team wrote designs; a trading record has no place for positions; a knowledge
16
+ record's sources and excerpts are just nodes.
17
+ - **It has no notion of a running swarm.** It polls the record's events, so writes appear, but who holds which work
18
+ order, which model call is in flight, what it costs, and whether the run is stuck are not visible.
19
+ - **It looks like a demo.** It has a dark neon theme, one dense canvas and a single investigation at a time.
20
+
21
+ ## 2. What it becomes
22
+
23
+ **One product name: HypGraph.** "Atlas" goes everywhere: the page title, `hypgraph serve`'s banner, the site and the
24
+ docs. For one release, `HypAtlas` stays as a global alias and `/atlas/` redirects, so embeds don't break.
25
+
26
+ **It speaks each profile's language.** Every profile gains `labels`, a short noun per node type: a software
27
+ `question` is a **Requirement**, a trading `hypothesis` is a **Thesis**, an optimization `result` is a **Solution**.
28
+ Every view uses them, and the stages, gates and report name come from the profile's workflow. A record with no
29
+ profile falls back to the kernel's words.
30
+
31
+ **Information architecture.** These are the prototype's eight views, all driven by data the engine already derives:
32
+
33
+ | view | what it answers |
34
+ |---|---|
35
+ | **Overview** | Is this done, and is it sound? KPI tiles (settled, checked, stale, contested, work orders, spend), the completion criteria, each question's stage, recent activity |
36
+ | **Live** | What is the swarm doing right now? (§3) |
37
+ | **Pipeline** | Where is each question in the workflow, and what would move it? A swimlane of the profile's stages with each gate MET / NOT MET, its evidence and what would meet it |
38
+ | **Graph** | What rests on what? The graph, with profile labels, checked and stale rings, and click-through to the node |
39
+ | **Evidence** | Every claim, result, source and decision, with its derived standing: checked, stale, contested, at risk, re-run by the instrument |
40
+ | **Work orders** | What was each seat asked to do, its predicates for done, and how it ended |
41
+ | **Audit log** | The append-only event log, with the hash chain re-verified on read (the badge in the top bar) |
42
+ | **Report** | The profile's report (Change report, Desk note, Sourced brief, …), with PDF and bundle export |
43
+
44
+ **Enterprise properties.**
45
+ - **Look:** light theme first, with dark available. Dense, tabular and calm. One accent colour (the brand blue);
46
+ status colour only for status.
47
+ - **Every screen is a URL:** `#view=pipeline&inv=software@2&q=Q1&at=40`.
48
+ - **Trust is visible:** a "chain verified · N events" badge, derived standing everywhere, nothing settable by hand.
49
+ - **Search:** ⌘K across nodes, questions and orders.
50
+ - **Keyboard and accessibility:** keyboard navigation, WCAG-AA contrast in both themes.
51
+ - **Export:** CSV for tables, PNG and JSON for the graph, PDF for the report, a verifiable bundle for the record.
52
+ - **Read-only by default:** the UI never writes. Approvals and human review, when they come, go through the
53
+ record's own API with an author, like every other write.
54
+ - **No build step, no network:** vanilla ES modules plus the vendored Cytoscape, served by `hypgraph serve` or
55
+ opened from a static site.
56
+ - **The CLI is unchanged.**
57
+
58
+ ## 3. Live observability for a running swarm
59
+
60
+ The goal is everything a run does, from start to end, visible as it happens and auditable afterwards.
61
+
62
+ **Two streams, one timeline.**
63
+ 1. **The record** (truth): every write, review, refusal, lease, supersession and stage change. It is already
64
+ hash-chained. `hypgraph serve` gains `GET /api/graph/stream?inv=` (Server-Sent Events) so the UI is pushed each
65
+ event instead of polling.
66
+ 2. **Swarm telemetry** (observation, never trusted for standing): what the record can't see. HypSwarm emits
67
+ structured events:
68
+ - **Run:** start, stop, why it stopped, budget and its warning line.
69
+ - **Seats:** each seat's lifecycle, what it holds and what it is doing now.
70
+ - **Model calls:** model id, tokens in, cached and out, $, latency, retries, errors.
71
+ - **Tool calls:** name, a scrubbed summary of the arguments, duration, ok or error.
72
+ - **Scheduler decisions:** dispatch, rework, escalation, re-verification, refresh, world changes, and report
73
+ assembled or lost.
74
+
75
+ Each event carries `run_id`, `inv`, `seat`, `order`, `span_id` and `parent_span_id`.
76
+
77
+ **Where telemetry goes** (`run(..., telemetry=…)`):
78
+ - **JSONL sidecar** (default, local): `<record>.telemetry.jsonl`. `hypgraph serve` tails it and merges it into the
79
+ stream.
80
+ - **OpenTelemetry** (optional extra `hypswarm[otel]`): traces as run → order → model call / tool call spans; metrics
81
+ for tokens, $, calls and latency per seat and model; logs for the rest. This feeds Datadog, Grafana, Honeycomb and
82
+ Splunk without any HypGraph-specific code.
83
+ - **Scrubbing:** secrets and arguments are scrubbed before they leave the process. Prompts and outputs are off by
84
+ default and can be switched on per run.
85
+
86
+ **The Live view.** The prototype shows its shape on replayed real event logs:
87
+ - **Run header:** running / settled / stopped, elapsed time, events per minute, budget burn ($ and calls against
88
+ the cap, warning line), and play / pause / scrub for replay of finished runs.
89
+ - **Seats:** each seat with its current work order and, with telemetry, its in-flight model or tool call (spinner,
90
+ model, elapsed), writes, cost and errors.
91
+ - **The record, growing:** nodes appear as they're written, with stale rings appearing as files change.
92
+ - **Event stream:** record and telemetry merged, filterable by seat, kind and order.
93
+ - **Alerts:** a seat holding an order past its lease, the same tool failing repeatedly, a loop of identical calls,
94
+ the budget warning line, a refusal burst, stale evidence, a lost report.
95
+ - **Trace:** a waterfall per work order: the order's span with each model and tool call inside, tokens and $ per
96
+ span, and where the time went.
97
+
98
+ A finished run's Live view is the same screen fed from the record plus its telemetry sidecar, so every run can be
99
+ replayed exactly.
100
+
101
+ ## 4. The site: a working example per profile
102
+
103
+ Each `@2` profile gets an interactive page, `/examples/<profile>/`, running the new UI read-only on a real record.
104
+ The records come from HypSwarm's five scripted examples: 01 scientific, 02 software, 03 trading, 04 knowledge,
105
+ 05 optimization. Each page opens on the **Live replay** of that run, so a visitor watches the swarm work, then can
106
+ explore the Pipeline, Graph, Evidence and Report.
107
+
108
+ This needs the bundle to carry what the UI shows. `derived` gains `profile` (labels, stages, report name), `stages`,
109
+ `completion`, `board`, `orders` and the `report` markdown, plus the telemetry sidecar when one exists. As now, the
110
+ bundle's hash chain is re-verified in the browser, and its derived views are shown as derived and never trusted.
111
+
112
+ ## 5. Phases
113
+
114
+ | phase | what | verified by |
115
+ |---|---|---|
116
+ | **P0** | this plan and the prototype (real data, eight views, deep links, light and dark) | screenshots in `dev/ui-prototype/shots/` |
117
+ | **P1 · engine** | `Profile.labels` for the five profiles; the bundle's `derived` gains profile, stages, completion, board, orders and report; `GET /api/graph/stream` (SSE); "Atlas" renamed in server, CLI and docs | tests; a bundle round-trip; `hypgraph serve` streaming a write |
118
+ | **P2 · UI** | `src/hypgraph/ui/` rebuilt as the HypGraph app (ES modules, no build), all eight views, ⌘K, exports, accessibility; `HypAtlas` alias and `/atlas` redirect | headless screenshots of every view × profile × theme in CI; keyboard and contrast checks |
119
+ | **P3 · telemetry** | HypSwarm's event schema, JSONL sink and optional OTLP exporter; serve merges telemetry into the stream; Live view on a real running swarm, with alerts and the trace waterfall | an end-to-end test: a scripted swarm against a served record, with the UI updating as it runs |
120
+ | **P4 · site** | five profile example pages with Live replay; the site's Atlas page replaced; docs | the pages load offline from the bundle; the chain verifies in the browser |
121
+ | **P5 · pod** | Pegasus's `/atlas` moves to the new UI (needs a pod rebuild: your go-ahead) | the pod's UI smoke check |
122
+
123
+ ## 6. Decisions (taken as proposed)
124
+
125
+ 1. **Name in the UI:** "HypGraph" as the plain product name (prototype), or a qualifier ("HypGraph Console" /
126
+ "HypGraph Explorer")?
127
+ 2. **Theme:** light by default for enterprise (prototype), with dark one click away?
128
+ 3. **Telemetry:** OpenTelemetry as an optional extra (proposed), and prompts/outputs off by default?
@@ -15,6 +15,10 @@ Conventions used in every spec:
15
15
  AT RISK. Today only the scientific set (`requires`, `derived_from`, `based_on`, `works_on`, `rests_on`) does.
16
16
  - **Fresh** says when a result still speaks for the thing it measured.
17
17
  - **Typed artifacts** are `artifact` / `source` / `decision` nodes with required fields per `kind`, not new types.
18
+ - **A measure question skips what it doesn't need.** A question with `asks: "measure"` (a rate, a count, a timing, a
19
+ check of the data or the code as it is) skips the gates its workflow lists in `measure_skips`, in the stage and
20
+ as an order predicate: scientific skips the hypothesis and preregistration; software the diff and the suite on a
21
+ new head; trading the thesis, preregistration, backtest and position. The run, result, claim and review stay.
18
22
 
19
23
  | spec | method it is taken from | the one gate a prompt can't keep |
20
24
  |---|---|---|
@@ -16,7 +16,7 @@ Standing is derived on every read, never stored; every write is an event in a SH
16
16
  their numbers; reviews pin versions; independence is counted, not assumed. See https://hypgraph.com.
17
17
  """
18
18
 
19
- __version__ = "0.5.3"
19
+ __version__ = "0.7.0"
20
20
 
21
21
  from .bundle import verify_bundle # noqa: E402
22
22
  from .graph import Author, Graph, GraphError, file_sha256 # noqa: E402