Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/API-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ function serveMemoryDashboard(options?: {

`buildMemoryDashboard` verifies the local ledger and returns a frozen `qarinah.memory-dashboard.v2` view without writing a file. Its workspace block identifies the real project root, workspace ID, retained repository IDs, event count, latest activity, and current ledger-head hash. `renderMemoryDashboard` turns a compatible view into self-contained HTML. `writeMemoryDashboard` writes that HTML atomically to `.qarinah/dashboard/index.html` by default. `serveMemoryDashboard` binds only to loopback and rereads one or more explicitly selected, separately authorized local projects; it does not discover or merge workspaces.

The view contains workspace and capture metadata, totals, decisions with explicit reasons/outcomes/alternatives/linked tools, bounded execution flow, tool activity, major changes, explicit conflicts, source-linked events, the latest 100 permitted activity events, affected files from the latest project-structure scan, durable-record paths, and an evidence-labeled local context comparison. By default, the comparison uses a retained compact-import receipt when present or canonical characters in the verified authoritative ledger, then compares that portable estimate with the generated task pack. Explicit snapshot token estimates override the automatic basis and must be supplied together. None of these functions infers provider billing or modifies the authoritative ledger; only `serveMemoryDashboard` starts a loopback HTTP server.
The view contains workspace and capture metadata, totals, decisions with explicit reasons/outcomes/alternatives/linked tools, bounded execution flow, tool activity, major changes, explicit conflicts, source-linked events, the latest 100 permitted activity events, affected files from the latest project-structure scan, durable-record paths, an evidence-labeled local context comparison, and a separately labeled reference to the committed 77.81:1 six-fixture benchmark. By default, the local comparison uses a retained compact-import receipt when present or canonical characters in the verified authoritative ledger, then compares that portable estimate with the generated task pack. Explicit snapshot token estimates override the automatic local basis and must be supplied together. The benchmark reference never replaces the current workspace measurement. None of these functions infers provider billing or modifies the authoritative ledger; only `serveMemoryDashboard` starts a loopback HTTP server.

`writeProjectOverview(options?)` writes the deterministic beginner-readable overview to `.qarinah/records/OVERVIEW.md` by default and returns both the resolved path and typed overview. `setupWorkspace` now initializes this overview, `DECISIONS.md`, `FLOW.md`, `CHANGES.md`, SQLite, the graph, and the local dashboard in one run.

Expand Down
6 changes: 4 additions & 2 deletions docs/DASHBOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ The live dashboard automatically compares real local text with the bounded task
2. Otherwise, Qarinah counts canonical characters in the verified authoritative JSONL ledger and applies the same estimator.
3. The delivered side is the estimated token count of the generated task pack shown on that page.

The card displays the exact baseline and delivered estimates, percentage reduction, ratio, and basis. It updates after retained ledger activity changes. This is a local ledger-or-import-to-pack comparison, not a provider bill, cache measurement, lossless archive ratio, or total model-session cost.
The first context card displays the exact baseline and delivered estimates, percentage reduction, ratio, and basis for **this workspace**. It updates after retained ledger activity changes. This is a local ledger-or-import-to-pack comparison, not a provider bill, cache measurement, lossless archive ratio, or total model-session cost.

A separate card displays the committed **77.81:1 published six-fixture estimate**: 442,113 baseline estimated tokens versus 5,682 Qarinah-pack estimated tokens, or 98.71% less repeated context. It is an evidence-linked benchmark reference, not the measurement for the currently open workspace. A live workspace can therefore show a different truthful ratio, such as 64.96:1, beside the 77.81:1 published result without conflating their scopes.

### Override the automatic baseline for a snapshot

Expand Down Expand Up @@ -101,7 +103,7 @@ These values replace the automatic ledger/import baseline for that static snapsh
| Source citations | Permitted events carrying a source identifier | `provenance.sourceId`, with event ID, timestamp, and hash retained in the dashboard data |
| Agent activity timeline | The latest 100 permitted events, newest first | Validated ledger events; it is not private chat history or hidden reasoning |
| Files and systems affected | Paths, detected languages, and content hashes from the latest scan | The latest recorded project-structure snapshot |
| Context saved | Baseline, delivered, saved, ratio, percentage, and exact comparison basis | Automatically uses a retained compact-import receipt or canonical authoritative-ledger characters; explicit snapshot inputs override it |
| Context saved | This workspace's baseline, delivered, saved, ratio, percentage, and exact comparison basis, plus the separately labeled published six-fixture reference | Automatically uses a retained compact-import receipt or canonical authoritative-ledger characters; explicit snapshot inputs override it; the published reference is bound to the committed benchmark result |
| Memory footprint | Retained Qarinah file bytes, canonical ledger characters, compact-import source bytes when known, and the current query-pack identity and estimated size | Measured from verified local files, validated ledger events, import receipts, and a normal bounded context compilation |

The metric strip counts current decisions, superseded decisions, explicit conflicts, distinct cited source IDs, tool events, and the optional context comparison. The complete dashboard data also includes total events, total decisions, flow steps, major changes, and affected-file count under `totals`.
Expand Down
20 changes: 17 additions & 3 deletions integrations/claude/qarinah/runtime/qarinah.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 17 additions & 3 deletions integrations/codex/qarinah/runtime/qarinah.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading