Polarize
GitHub Get in touch

Changelog

What changed in the code.

Merged pull requests across the public polarizetech repositories, newest first, synced from GitHub once a day. Every repository, with the posts about it, is under Work.

2026-09-30 paper-fetch #2

Discipline profiles, named collections and search memory

Phase 1 of moving paper searching and indexing out of retrieval-augmented-generation and into paper-fetch. Nothing here uses a language model: everything is string matching and bookkeeping, so it is repeatable and tested offline.

Discipline profiles (profiles.py, data in profile_data/*.toml)

  • A profile holds the search half of a field: controlled terms (MeSH ids are validated), synonyms, measures, sources, and search guidance for whoever writes the queries.
  • search(profile=) also runs up to two variants that swap a synonym for its indexed term (“HRV” → “heart rate variability”). It never swaps the other way. Hits whose titles name the field’s terms rank first (profile_match), and results are merged across variants (found_by).
  • Four profiles ship built in. They were converted from the RAG repo’s domains. They don’t narrow the provider set, because that would drop the repository providers that find open copies.
  • A TOML file in ~/.config/paper-fetch/profiles/ adds a profile or replaces a built-in one by slug.

Named collections (collection.py)

  • papers/collections/<name>.json holds a member list and a default profile. A paper is stored once, whichever collections list it.
  • fetch(collection=) lists the paper in the collection. collect and uncollect add or remove members by any identifier.

Search memory (memory.py)

  • papers/memory/searches.jsonl gets one row per search, written with the same re-read-and-append approach as the catalogue.
  • Every search reports up to three earlier searches on the same concept, and marks each hit that an earlier search already found (seen_before).
  • recall looks up past searches by concept, profile, collection or paper. A concept is the set of content words with synonyms mapped to indexed terms.

Surfaces

  • New MCP tools: profiles, recall, collections, collection, create_collection, collect, uncollect. search and fetch take profile and collection.
  • New CLI commands: profiles, collection, collect, recall, plus --profile and --collection on search and fetch.

Tested:

  • 239 tests pass offline, including concurrent writers to the memory and to a collection. ruff and pyright are clean.
  • A live search with the cardiovascular profile, run on an in-memory store, found the “heart rate variability” variant hits, ranked them first, and recalled the earlier “HRV” search at a score of 0.8.

Next:

  • Phase 2: the passage index and retrieval move here.
  • Phase 3: retrieval-augmented-generation calls paper-fetch for search, memory and retrieval, and its domains keep only the evidence half.

🤖 Generated with Claude Code

2026-09-29 retrieval-augmented-generation #1

Gateway: a server section names an instance and can drop the built-in tools

One gateway binary can now front a different set of upstreams under its own name. A second instance (the org-status MCP scientific-research-news) can then reuse the OAuth server instead of copying oauth.py.

  • New optional server section in the gateway config: name, instructions, and builtin_tools. With builtin_tools: false the instance drops web__search and the rag__* tools, so it lists only gateway_status and its upstreams.
  • Omitting the section keeps today’s behaviour exactly.
  • Tests: one new test in tests/test_gateway.py; 9/9 pass. Ruff is clean. Documented in docs/mcp-clients.md.

🤖 Generated with Claude Code

2026-09-29 paper-fetch #1

Bring over CLAUDE.md, HARVEST.md and INTEGRATION.md from the monorepo

Summary

Brings over the three docs from the audio-projects monorepo’s tools/paper-library (package paperlib), which is being replaced by this repo (polarizetech/audio-projects#26). dataset-fetch keeps the same three files at its root:

  • CLAUDE.md: measured facts, gotchas and design decisions, with their dates.
  • HARVEST.md: the procedure for bulk-collecting a topic into the library.
  • INTEGRATION.md: how a consumer depends on paper-fetch. It covers the install from git with a pinned commit, setting up the S3/Spaces store through PAPER_FETCH_* in ~/.config/paper-fetch/*.env, the Python API and the MCP server.

Names, commands, env vars and APIs are rewritten to paper-fetch’s own and checked against src/paper_fetch/. Behaviour that has changed since the monorepo copy is described as it is now:

  • Catalogue writes: since bee1bfe a save merges this process’s changes instead of the last writer winning.
  • Cache: it lives under PAPER_FETCH_CACHE and applies only to the S3 store.
  • load_env(): Library.default() does not call it, so Python consumers must.

Monorepo-only material is dropped: the tools/.venv-sci commands, sync.py and the generated copy, mcpkit envelopes, and REGISTRY/ORG-PROTOCOL references. Live measurements from the monorepo copy are kept, dated and labelled as such.

Docs only; no code changes.

Test plan

  • Every command, flag and env var named in the docs exists in src/paper_fetch/.
  • uv run pytest passes (214 tests).

🤖 Generated with Claude Code

2026-09-28 polarize-ui #1

feat: landing layer and cell field

A lab’s front door, in both renderers, drawn from the polarize.tech homepage redesign.

What’s added

  • landing.css (zero-build) and src/components/landing.tsx (React), rendering the same classes: TopNav, Hero, Cta, Section, ProcessSteps, Promises, ProjectFeature, RepoCard, ChangeFeed, FeaturedArticle, ArticleCard, MetaLine, StoryCard / StoryRow / StoryGrid, Plate, Principle, TierLegend, SiteFooter. Responsive to phone width; the top bar folds into a <details> menu with no script.
  • cellfield.js: <ui-cellfield>, a WebGL speck field (clusters at different depths, per-cell polarisation, occasional coordinated waves, an optional hero cell). Decoration only: aria-hidden, no fetch, one still frame under prefers-reduced-motion. React: <CellField>, same engine, typed by cellfield.d.ts.
  • Token: radius.xs (4px).
  • Checks: dev_check.py holds landing.css to the publication.css rules (generalised as check_layer) and checks cellfield.js; scripts/api_surface.py lists both files.
  • Storybook: General UI/Landing: the full homepage at desktop and phone, plus each part.

Versioning

Additive only: nothing renamed or removed (api_surface.py --removed v0.5.5 is empty), so this is a patch release.

Checks

  • python3 dev_check.py: 309/309
  • build_css.py --check, build_shadcn.py --check: up to date
  • tsc -p .: clean

polarize.tech adopts it in polarizetech/polarize.tech (branch home-redesign) once this is released.

🤖 Generated with Claude Code

2026-09-25 neural-memory #7

model-v0.3.0: single-cell habituation (Stentor) in a peer-reviewed simulator

Single-cell habituation package: published Stentor models (Rajan & Marshall 2025 receptor inactivation; Rajan 2022 two-state; Eckert 2024 CIFF) in Tellurium/libRoadRunner (SBML), each reproduced unmodified first, plus minimal switchable changes (two input channels, membrane readout, synthesis block, Wood gating variant) and a trace exporter. Plan: see PR description updates. No experiment runs here.

🤖 Generated with Claude Code

2026-09-25 neural-memory #5

Drop the sim- prefix: renamed to neural-memory

The repo was renamed from sim-neural-memory to neural-memory on GitHub (the old URL redirects). The kind now goes in a manifest rather than the name, per the study protocol.

  • README, CLAUDE.md and docs/FINDINGS.md now use the new name. FINDINGS.md still cites the research-corpus file 2026-09-24-sim-neural-memory-habituation.md by its real filename.
  • monorepo.stamp() now records repo.name = "neural-memory" in new provenance, and tests/test_monorepo.py checks for it. provenance.json files already written keep the old name, since they are records.
  • Conversation logs are not touched.

Tests: 100 passed, the same as before the rename.

🤖 Generated with Claude Code

2026-09-25 neural-memory #3

Findings, pre-release review, lint and MIT licence

  • docs/FINDINGS.md: every result across the project, and the project marked paused.
  • docs/REVIEW.md: three independent code and methods reviews; dated corrections appended to the affected reports (nothing rewritten).
  • ruff (correctness rules only) + lint workflow; the private-tool imports degrade loudly; MIT licence; public README.
  • Test suite: 100 passed. No numerical change to any committed run.

🤖 Generated with Claude Code