Skip to content

docs: Windows port proposal (solo-first, gated on gbrain PGLite/Windows #1549)#5

Merged
Chad-Mufasax merged 3 commits into
masterfrom
windows-port-proposal
Jun 16, 2026
Merged

docs: Windows port proposal (solo-first, gated on gbrain PGLite/Windows #1549)#5
Chad-Mufasax merged 3 commits into
masterfrom
windows-port-proposal

Conversation

@Chad-Mufasax

Copy link
Copy Markdown
Contributor

Approach-before-code proposal per CONTRIBUTING. Research finding: the foundation is Windows-ready (bun 1.2+ stable Windows, PGLite is WASM) but gbrain itself blocks the solo path — issue #1549 (pgvector missing from the PGLite WASM binary on Windows = no semantic search). Recommendation: do the cross-platform-hooks phase regardless, watch gbrain #1549, run the spike once it's fixed; meanwhile point Windows users at the standalone git-only journal tool.

Approach-before-code proposal per CONTRIBUTING. Maps the macOS-bound layers
(launchd, brew, zsh gbq, bash installer, /tmp hook paths), flags the gating
unknown (gbrain+PGLite on Windows = Phase 0 spike), and phases the work:
cross-platform hooks → scheduler abstraction (Task Scheduler) → cross-platform
gbq → install.ps1 → CI → docs. Solo+PGLite only for v1; native PowerShell, not WSL.
- /tmp -> tempfile.gettempdir() (session-logger/indexer/recap, daily-reflection)
- claude binary via CLAUDE_BIN > ~/.local/bin/claude > shutil.which (no __HOME__ bake-in)
- BRAIN/home resolved at runtime with Path.home()
- .gitattributes: enforce LF so CRLF can't break hooks on Windows
- test-hooks.sh: isolate TMPDIR in the throwaway HOME (locks no longer leak)
- windows-port.md: mark Phase 1 done + note server-side-search sidesteps gbrain gating

Pure Python, benefits macOS too, not gated by gbrain (#1549). 15/15 test-hooks pass.
- engine/search/brain_search.py: pure-Python BM25 local search (index/query/health),
  no bun/pgvector/model download. Cross-platform, offline. Replaces gbrain search on
  Windows where PGLite/pgvector is broken (#1549). Tested on a real vault (1922 chunks).
- install.ps1: Windows-native installer mirroring install.sh — vault skeleton, hooks,
  brain_search index, gbq.cmd shim (so 'gbq query' works unchanged), Task Scheduler
  (reindex 04:00 + reflection 12:00/23:00), CLAUDE.md merge, git init. ASCII-only (PS 5.1).
- windows-port.md: documents the un-gated Windows path.

Note: install.ps1 needs a real-Windows smoke test; BM25 = keyword (embeddings optional).
@Chad-Mufasax Chad-Mufasax merged commit 4b1daa5 into master Jun 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant