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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An experimental personal browser and task-workbench substrate built around durab

IB's immediate target is one person's real browsing corpus and workflows, not general-purpose web compatibility. It optimizes the task behind navigation: learning a documentation set, recovering a fact, finding and sharing an image, comparing delivered prices, or resuming an investigation after the live browser processes are gone.

The substrate supports multiple frontends over the same browser-owned state. A conventional page surface, a small phone frontend, a text-and-action workbench, and developer inspectors may coexist. Renderers, acquisition adapters, extractors, and models remain replaceable; none owns tabs, history, tasks, or accepted organization.
The first two user frontends share the same browser-owned state: a visual frontend that immediately pre-paints the cheapest useful source-backed view, and a ChatGPT-like text-only-by-default task frontend that answers questions and offers actions over the browsing corpus. Additional page surfaces and developer inspectors may coexist later. Renderers, acquisition adapters, extractors, and models remain replaceable; none owns tabs, history, tasks, or accepted organization.

The browser core owns resource, tab, event, and task identity; sleeping and waking; snapshots; organization; indexes; inference acceptance; and renderer selection. Only roughly 3–10 renderer working sets should normally be resident even when the known corpus reaches 10,000 resources.

Expand All @@ -14,9 +14,10 @@ The browser core owns resource, tab, event, and task identity; sleeping and waki
- `docs/personal-workbench.md` — personal scope, task frontend, user stories, and latency targets
- `docs/prefetch-and-reading.md` — durable investigation frontiers, disposable fetches, and `~/reading`
- `docs/tab-categorization.md` — overlapping personal categories and adaptive refinement
- `docs/inference-and-learning.md` — local-model proposals, validation, ensembles, and correction events
- `docs/inference-and-learning.md` — configured-model proposals, explicit hyperplanes, ensembles, and human supervision
- `docs/storage-model.md` — identity levels and canonical, proposed, and derived state
- `docs/developer-workbench.md` — fixture and memory-pressure harness
- `experiments/category-hyperplanes/README.md` — disposable embedding and explicit affine-separator probe

## Implementation languages

Expand Down
8 changes: 8 additions & 0 deletions bin/ci_browser_foundation.grease
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ exercise_workbench() {
cd "$repository_root"
sh -n tests/test_real_world_url_fixture.grease
sh tests/test_real_world_url_fixture.grease
python3 -m py_compile \
experiments/category-hyperplanes/build_url_inputs.py \
experiments/category-hyperplanes/validate_recovered_labels.py
python3 experiments/category-hyperplanes/validate_recovered_labels.py
python3 experiments/category-hyperplanes/build_url_inputs.py \
--source tests/fixtures/real_world_urls.txt \
--output /tmp/ib-recovered-inputs.tsv
test "$(wc -l < /tmp/ib-recovered-inputs.tsv)" = 220

cd "$repository_root/src"
"$idric_prefix/bin/idris2" Workbench.idric -o ib-workbench 2>&1 | tee /tmp/idric-workbench-compile.txt
Expand Down
12 changes: 6 additions & 6 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

A tab is not a renderer process. It is a persistent navigation thread that may currently have a renderer attached. A task may span several tabs, resources, searches, and actions.

IB's present product target is a personal browser/workbench, not universal web compatibility. The substrate still supports multiple first-class frontends and renderer adapters so a broader browser can be built over it without owning or changing the stored model. See `docs/personal-workbench.md`.
IB's present product target is a personal browser/workbench, not universal web compatibility. Its first two first-class frontends are a progressively augmented visual pre-paint and a ChatGPT-like text-only-by-default task workbench. The substrate still permits additional frontends and renderer adapters so a broader browser can be built over it without owning or changing the stored model. See `docs/personal-workbench.md`.

## Ownership

Expand All @@ -31,16 +31,16 @@ A frontend projects browser and task state and issues commands. It does not beco
## Main layers

```text
page frontend task workbench inspector/commands
\ | /
+--------- browser and task core -----+
visual pre-paint text task frontend inspector/commands
\ | /
+----------- browser and task core -------+
/ | \
persistent store acquisition renderer adapters
/ extraction | | |
HTTP, parsers Servo WebView text/etc.
```

The page frontend, text-first task workbench, inspector, information extractor, and text renderer are distinct roles. In particular, a text-oriented renderer is not the ChatGPT-like workbench frontend.
The visual pre-paint frontend, text-first task frontend, inspector, information extractor, and text renderer are distinct roles. In particular, a text-oriented renderer is not the ChatGPT-like workbench frontend.

The persistent store remains intelligible and useful without a rendering engine or language model installed.

Expand Down Expand Up @@ -139,7 +139,7 @@ IB is implemented in Idriç, with Grease for operating-system and process orches
The current work does not promise:

- universal web, MIME, renderer, or malformed-input compatibility;
- one mandatory frontend;
- one singular frontend that owns browser state;
- faithful reproduction of interfaces irrelevant to the user's task;
- preserving a JavaScript heap across renderer changes;
- automatic understanding of every private application protocol;
Expand Down
5 changes: 5 additions & 0 deletions docs/developer-workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Other required distinctions include:
- a malformed or unavailable model cannot mutate canonical history or block browsing;
- adding a category membership does not remove another membership;
- removing a category from `_active` creates no negative training event.
- a focus-priority hint may reorder safe prefetch work but creates no speculative tab or renderer;
- the configured assistant receives only the explicitly scoped, inspectable task-context bundle.

If RAM grows approximately with known-resource count, or rebuilding a derived view loses a human correction, the architecture has coupled state classes that must remain separate.

Expand All @@ -113,3 +115,6 @@ If RAM grows approximately with known-resource count, or rebuilding a derived vi
6. Add operative-document-link and shared-child documentation fixtures.
7. Add proposal, validation, correction, and reversible materialization fixtures.
8. Continue live or recorded scientific-media fixtures through Grease.
9. Add a GitLab-shaped seventeen-link fixture: changing visual focus reprioritizes safe links, creates zero speculative tabs or renderers, and supports a cited text answer.
10. Add a multi-paper arXiv fixture: early per-paper summaries and one cross-paper answer require no renderer per paper.
11. Add a mock video fixture: captions and playback position enter an authorized assistant context bundle without fetching video bytes or exposing secrets.
48 changes: 38 additions & 10 deletions docs/inference-and-learning.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Inference and learning boundary

IB should interface cleanly with one or more local language or embedding models without allowing a probabilistic model to become the owner of browser state.
IB should interface cleanly with user-configured local or remote language, embedding, reranking, and summarization models without allowing a probabilistic model or provider to become the owner of browser state.

## Observations and proposals, not mutations

Expand Down Expand Up @@ -46,13 +46,22 @@ Deterministic code may validate, compare, reduce, accept, or reject proposals. V

When several models or resampled classifiers are useful, preserve their individual outputs before reducing them. Bagging, voting, or rank aggregation should not erase disagreement. An aggregate records its inputs, quorum, reducer, and reducer version. A missing model is not a negative vote, and disagreement is itself evidence that a category boundary or ranking is uncertain.

The adapter should identify the model and task explicitly so local models can be replaced, compared, or run as an ensemble without changing canonical records or callers. Browsing must remain usable when every model is absent, slow, or crashes. Local models receive only explicitly selected corpus material; secret and session storage are excluded by default.
The adapter should identify the model and task explicitly so models can be replaced, compared, or run as an ensemble without changing canonical records or callers. Browsing must remain usable when every model is absent, slow, or crashes. Local models receive only task-relevant corpus material. Remote models receive only an explicitly scoped, inspectable context export; secret and session storage and unrelated private browsing state are excluded by default.

## Classification baseline

Category membership is multilabel. A useful first baseline is one scored binary classifier per category rather than a single exclusive multiclass classifier.
Category membership is multilabel. A useful first baseline is one independent inclusion scorer per category rather than a single exclusive multiclass classifier. It is binary relevance only in the sense of asking one category question at a time; material outside category `c` is not automatically a negative example for `c`.

A linear baseline can use one separator per category over persistent Float32 embeddings and cheap structured features. Train from explicit or trusted positive and negative evidence; where absence is merely unlabeled, use a positive-unlabeled treatment rather than declaring every other object negative. Useful features include:
For category `c`, an explicit linear baseline is an affine score and a separately recorded policy threshold:

```text
s_c(x) = w_c dot phi(x) + b_c
propose c when s_c(x) >= tau_c
```

`b_c` is normally learned, so the decision surface is affine and is not forced through the origin. `tau_c` need not be zero: it should reflect the cost of hiding relevant material. There is no argmax across categories. An authoritative human membership remains included and an authoritative category-scoped exclusion remains excluded regardless of a later model score; passing the threshold is still a proposal, not silent acceptance.

Train from explicit or trusted positive and negative evidence; where absence is merely unlabeled, use a positive-unlabeled treatment rather than declaring every other object negative. Useful features include:

- URL, host, title, MIME type, and source;
- extracted text or image description;
Expand All @@ -61,13 +70,32 @@ A linear baseline can use one separator per category over persistent Float32 emb
- prior accepted memberships and explicit corrections;
- neighborhood or vector similarity.

The literal classifier remains replaceable. A margin is a score, not an ontology. Slack, support examples, and disagreement among plausible separators should remain inspectable where they help explain uncertainty.
In a soft-margin SVM, each labeled example has a scalar slack variable measuring violation of the desired margin. The collection of those scalars may be called a slack vector. Support vectors are instead the training examples with nonzero dual weight that determine the separator; some lie on the margin and some violate it. The signed geometric distance to the fitted zero surface is `s_c(x) / norm(w_c)`; distance to the model-policy threshold surface is `(s_c(x) - tau_c) / norm(w_c)`. Raw score, normalized distance, slack, support-vector status, held-out error, and ensemble disagreement are separate diagnostics; none is automatically a calibrated probability or an inclusion band.

One-class SVM is an origin-related construction that separates examples from the feature-space origin with an offset. It is a possible positive-only probe, not the ordinary soft-margin binary SVM and not the default once explicit negative corrections exist.

IB may fit another affine separator inside a coherent region or against residual errors from an earlier separator. That yields a collection of binary decisions—possibly an oblique tree, a boosted ensemble, or overlapping category scorers—not a compulsory single hierarchy. A parent and a narrower category may both remain true.

Bagging may fit planes over row, feature, or provisional-unlabeled resamples and retain every plane before voting or averaging; this is a useful positive-unlabeled baseline. Boosting may fit later learners against earlier errors. A sum of unthresholded linear scores collapses algebraically to one linear score, while thresholded-plane voting or tree structure can represent a more elaborate boundary. Vote fraction still is not automatically a probability.

Zero, one, or many categories may pass their per-category decisions. Retrieval should generally prefer an extra plausible membership to hiding material because another category won.

## Corrections are training events
## Human organization is supervision

Machine learning should learn from intentional human organization, not merely from corrections made after a bad proposal.

- creating or naming a category supplies category semantics;
- adding membership supplies an authoritative category-scoped positive;
- removing membership supplies an authoritative negative for that category only;
- accepting a split or merge supplies a structural constraint;
- grouping resources into a task or reading bundle supplies relationship and ranking evidence;
- explicitly meaningful pinning or ordering may supply attention evidence.

Each signal retains its original event, target kind, scope, and authority instead of being flattened into a universal label. Incidental filesystem order, passive visibility, `_active` removal, and unaccepted model output are not negative classification evidence.

## Corrections and assertions are training events

A drag, drop, rename, membership addition, or membership removal is an explicit human correction. Record the correction as an event and update derived models conservatively; do not overwrite the model proposal that prompted it.
A drag, drop, rename, membership addition, membership removal, or accepted structural change is a typed human assertion. Record the event and update derived models conservatively; do not overwrite the model proposal that prompted it.

Dropping an object into category `B` is an authoritative positive assertion for `B` and changes that view immediately. It is an add, not a move: existing membership in `A` remains because categories overlap. Explicitly removing `B` is negative evidence only for `B`. Removing `B` from `_active` is attention control and produces no classification or training event. Never train on a model's own unaccepted labels.

Expand All @@ -81,7 +109,7 @@ A history-analysis view may ask: *what is this a record of about the user?* It c

Those are evidence-backed interpretations, not facts about identity or belief. Every interpretation should retain links to the searches, visits, tabs, or accepted categories that support it. A repeated URL or duplicate tab is evidence of salience or revisitation, not redundant noise and not by itself proof of endorsement.

Private source material and credentials remain subject to the storage and export boundaries even when inference runs locally. A public fixture should not acquire private URLs merely because a model could classify them.
Private source material and credentials remain subject to the storage and export boundaries whether inference is local or remote. A public fixture should not acquire private URLs merely because a model could classify them.

## Implementation status

Expand All @@ -91,7 +119,7 @@ The generic proposal, validation, aggregation, and correction records described

Settled boundaries:

- local-model adapters are replaceable;
- local and remote model adapters are replaceable and provider-neutral;
- model output is append-only evidence, never direct canonical mutation;
- proposals retain provenance, model identity, scores, and source references;
- deterministic code owns validation and acceptance;
Expand All @@ -101,7 +129,7 @@ Settled boundaries:
Current baselines and evaluation ideas:

- Float32 embeddings and exact vector search at the current 10,000-URL scale;
- one scored linear decision per category using explicit or trusted labels;
- one explicit affine inclusion score and a separately recorded threshold per category using positive, explicit-negative, and unlabeled evidence correctly;
- ensembles when disagreement is useful;
- measurable improvement after a few nearby corrections.

Expand Down
Loading
Loading