mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-28 14:59:47 +00:00
fix/backlog-c69
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
af5ee1eb5a |
v0.40.8.1 docs: README rewrite + personal-brain + company-brain tutorials (#1345)
* docs: rewrite README lead around search-vs-think differentiator The current README opened with a generic "smart but forgetful" tagline that buried the actual differentiator. Garry's 2026-05-23 X thread crystallized the positioning: "Search gives you raw pages. Think gives you the answer." That plus graph traversal plus gap analysis is what nobody else ships in one box. Changes: - README lead now leads with the search-vs-think frame, the "nobody else does this" claim, and the "strategic moat / so you don't lose context" framing. - Collapsed five stacked "New in vX.Y.Z" paragraphs in the lead into one Recent Releases section after the install path, freeing the first viewport to be about what gbrain IS, not what shipped last week. - New ## Search vs think section with side-by-side CLI example, gap-analysis explanation, and the find_trajectory + think compounding story. - ORIGIN.md closing paragraph names think as the reason the brain is worth building. - No em dashes used as connectors (per humanizer rules). - All factual claims (page counts, benchmark numbers, version references) preserved verbatim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: add v0.40.6.0 to README Recent Releases Picked up sync --all + per-source locks + sources status dashboard from the v0.40.6.0 merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): add visceral "what this looks like" before/after table Pulled verbatim from BrainBench Cat 29 — same question, same brain, Haiku judge. Shows what a typical personal-knowledge brain (top-K vector retrieval, what MemPalace / Mem0 / Hindsight ship) returns vs what gbrain think returns. Search hallucinates three people who actually work at OTHER companies; think correctly identifies what's known + flags the gap. Score: search 1/10 vs think 9/10. The before/after lands above Install so the reader sees concrete differentiation before they decide to install. Backs the abstract "search vs think" claim from the lead with a real receipt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): swap before/after example to verbatim Cat 29 receipt (Q2 ARR) Per @garrytan — the prior example used the synthetic Q1 (employees of Horizon TECH 6) with paraphrased answer text. Replaced with the verbatim Cat 29 Q2 receipt: actual question (with the in-question typo that exists in the eval), actual truncated search-answer text from the JSON receipt, actual think-answer text with all three ARR readings + citations, and the actual Haiku judge verdicts pasted verbatim. Also strips Mem0 + Hindsight references from the comparator phrasing — Mem0 is a YC company we don't want to single out, and Hindsight was a hackathon-stage project that never launched. The comparison phrasing now reads "MemPalace and most peer AI-memory stacks" — accurate without naming systems we shouldn't be benchmarking against. The three things gbrain think did that a typical top-K retrieval cannot are listed below the table for readers who want the takeaway in plain English: 1. Caught the name typo (question said "Acme AI 0", brain has "Acme CO 0") 2. Walked the typed-claim Facts fence to build a chronological trajectory 3. Cited every claim Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): add "Your brain's shape (schema packs)" section Per @garrytan — the README had nothing on schema packs (v0.38/v0.39 dynamic-schema cathedral). New section lands between "How to get data in" and "Recent releases" so the narrative flow reads: what gbrain is → concrete example → install → query (search vs think) → get data in → schema packs (how the brain understands your shape) → recent releases → loop → capabilities → ... The section opens by naming the differentiator out loud: "Most personal- knowledge tools force one fixed layout: their idea of notes + people + tags. Drop a Notion export or your own years-old Obsidian vault and the agent doesn't know what your folders mean." Three options surfaced: - gbrain-base (default, zero-config Garry layout) - gbrain-recommended (extends base with 13 more dirs) - your own pack via the schema detect → suggest → review-candidates three-command magical moment Six representative CLI verbs shown verbatim. Closes with one paragraph explaining the threading through every read/write path (parseMarkdown, whoknows, extract_facts, search cache) and a one-line summary of the 7-tier resolution chain pointing at docs/architecture/schema-packs.md for the full reference. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): de-brand "Think" in the lead; reframe as GBrain's brain layer Per @garrytan — "we don't need to brand it Think, we want to say the think command later but we don't lead on it!" Changes: - Lead sentence: "Search gives you raw pages. Think gives you the answer" → "Search gives you raw pages. GBrain gives you the answer, through a brain layer." The product is GBrain; think is the CLI verb that runs the brain layer, introduced later. - Two-bullet differentiator list: the "gbrain think" bullet now leads with the capability ("A synthesis layer that gives you the actual answer.") rather than the CLI command. The bullet body still names what the layer does (synthesized prose, citations, gap analysis). - Strategic-moat paragraph: "`gbrain think` is what makes the moat usable" → "The brain layer is what makes the moat usable." - "What this looks like" table header: "GBrain `think`" → "GBrain's brain layer (one synthesized answer, run via `gbrain think`)". CLI command stays in the cell so the example is reproducible; the framing leads with what it IS, not the verb. - Three-bullet takeaway under the table: "Three things `gbrain think` did" → "Three things the brain layer did". Aggregate sentence: "gbrain think averages 5.60/10" → "GBrain's synthesis layer averages 5.60/10". - Section heading: "## Search vs think" → "## Two ways to query your brain". The section still introduces `gbrain search` and `gbrain think` as the two CLI verbs side by side; the heading no longer brands "think" as the thing. The "think command" comes through naturally where it appears as a CLI example. The PRODUCT is GBrain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): switch to first-person voice (Garry speaking directly) Per @garrytan — drop "Built by..." third-person framing and write in first person. Edits: - Lead credibility paragraph: "Built by the President and CEO of Y Combinator to run his actual AI agents" → "I'm Garry Tan, President and CEO of Y Combinator. I built GBrain to run my own AI agents." Subsequent sentences switch "his deployments" → "my deployments", "the agent ingests... you wake up smarter" → "my agent ingests... I wake up smarter — and so will you" (the closing "and so will you" connects Garry's experience to the reader's). - Compounding paragraph: "As Garry's personal agent gets smarter, so does yours" → "As my personal agent gets smarter, so does yours." - Schema packs section: "the layout used by Garry's production brain" → "the layout my production brain uses". - License + credit: "Built by Garry Tan to run his OpenClaw and Hermes deployments — the production brain behind his actual AI agents" → "I built GBrain to run my OpenClaw and Hermes deployments — the production brain behind my AI agents." The whole top of the README now reads as Garry talking directly to the reader about what he built and why. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): DRY the lead — drop redundant "through a brain layer" + repeat GBrain "GBrain gives you the answer, through a brain layer. GBrain is the brain layer your AI agent has been missing..." — two GBrains, two brain layers. Tightened to: "GBrain gives you the answer. It's the brain layer your AI agent has been missing — the only one that does synthesis, graph traversal, and gap analysis in one box." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): frame GBrain as a company brain too, link to YC RFS Per @garrytan — GBrain is now usable as a company brain (federated sync, OAuth scoping, Cat 22 source isolation), and YC just put company-brain on its Request for Startups. Added a paragraph after the personal-brain lead that names the three v0.34+ features that make multi-user safe (federated sync, per-source OAuth scoping, the Cat 22 leak-free source isolation), then links to https://www.ycombinator.com/rfs#company-brain with a one-line pitch: "if you're building in that space, you might as well build on this." The framing carries forward the personal-brain story while opening the aperture: GBrain works for one person (Garry's production deployment) AND for a team (per the features Cat 22 just verified). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): rewrite company-brain paragraph in plain English @garrytan caught me writing internal eval-suite jargon ("Cat 22 proves source isolation is leak-free across hybrid search, listPages, getPage, and federated reads") in a paragraph aimed at someone deciding whether to use GBrain. Rewritten in plain English: "Each person on the team gets their own slice of the brain, scoped by login. When you query, you only see what you're allowed to see — never another person's notes, never another team's data. We fuzz- tested this across every way you can read the brain (search, list, lookup, multi-source reads) and got zero leaks." Same factual content, zero internal vocabulary. The "Cat 22" name belongs in the benchmark page, not the front-door README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): add company-brain tutorial (Diataxis tutorial quadrant) End-to-end walkthrough for setting up GBrain as a multi-user company brain. Audience: founder / CTO / head of ops at a 10-50 person company who has heard about GBrain (from the YC RFS company-brain page or my tweets) and wants to set it up as their team's shared institutional memory. ~3700 words, written for a learner with zero prior gbrain knowledge. Twelve parts walk the reader from "I've never run gbrain" to "three teammates each query the brain through their own AI agent and see the correctly scoped answer": 1. The mental model (personal brain vs company brain, federated sources, OAuth scoping, what you get) 2. Prerequisites table (Postgres, embedding key, Anthropic key, git repo, Bun, host machine + cost projection) 3. Install + Postgres + API keys + doctor verify 4. Create three sources (shared / customers / internal) + sync 5. Spin up HTTP MCP server with --bind 0.0.0.0 + --public-url 6. Register one OAuth client per teammate with --source + --federated-read 7. Verify scoping works (alice can't see internal, bob can't see customers) 8. Connect each teammate's AI agent via thin-client install 9. First real `gbrain think` query showing sourced + synthesized + gap-analysis answer 10. Operating the brain (autopilot, doctor --remediate, sources status, admin dashboard) 11. Cost + speed expectations from the v0.40.6.0 benchmark 12. Common gotchas + troubleshooting Voice: - First-person Garry in intro / motivation paragraphs - Zero internal jargon. No "Cat 22", "P@5", "knobsHash", "RRF", "MRR" - Plain English throughout - No em dashes used as connectors (zero in final draft) - "Brain layer" / "synthesized answer" framing, not "Think" branding - No Hindsight, no Mem0 (per repeated session feedback) - Every example uses placeholder names (alice-example, bob-example, acme-co) Cross-linked from: - README.md company-brain paragraph - docs/INSTALL.md (under the migrate --to supabase block) - docs/architecture/topologies.md (See also section) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): drop version chatter, add Tutorials section, expand tutorial roadmap Per @garrytan: the README should read as the current docs written for people who have never known GBrain before. Versions are what the CHANGELOG is for. Version-chatter sweep across the README: - Killed the entire ## Recent releases section. That's a changelog summary, not docs. CHANGELOG.md owns it. - Stripped "(v0.38+)" from the ## How to get data in heading. - Rewrote "(the v0.38 put_page write-through plumbing)" as "(the database and on disk in one move)" — describes WHAT happens, not WHEN it shipped. - Stripped "(The legacy gbrain skillpack install managed-block model was retired in v0.36.0.0; run gbrain skillpack migrate-fence once if you're upgrading from an older release.)" from the skillpack paragraph. Upgrade history goes in the CHANGELOG. - Stripped "New in v0.40.4.0:" from the hybrid-search graph-signals description. Just describes what the feature does. - Stripped "As of v0.37," from the embedding-provider auto-detect paragraph in the Troubleshooting section. - Stripped "the embedding + reranker stack that became the v0.36.2.0 default" → "ships as the default" in the License + credit section. - Stripped "in Cat 29" from the synthesis-benchmark sentence (same internal-jargon class as Cat 22 which @garrytan called out earlier). Replaced ## Recent releases with ## Tutorials: - Links to the one shipped tutorial (company-brain.md) with a one-line description. - Names the next several planned tutorials in prose (not as broken links): personal brain quickstart, connect your agent, VC dealflow, vault migration, code brain. No fake links. - Points at the tutorial index page for the full roadmap. - Closes with "Open an issue describing the workflow you want documented" to invite prioritization input from real users. New tutorial index at docs/tutorials/README.md: - Shipped section: company-brain.md - In-progress roadmap with 7 candidate tutorials (personal brain quickstart, connect your agent, VC dealflow, vault migration, code brain, fully local, dream cycle setup) - Each roadmap entry names the persona, the core commands the tutorial would demonstrate, and the differentiator - "Want to write one?" section invites community PRs and points at company-brain.md as the model Reverted the obscure topologies.md "See also" link from pointing at company-brain.md specifically to pointing at the tutorials index overall — the tutorial belongs in the README's Tutorials section where users actually look, not buried in an architecture doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): land personal-brain tutorial (full-stack install) The canonical solo install walkthrough, adapted from Garry's live setup session notes (the "Apple I, soldering breadboards" session). Builds the full stack: 2 GitHub repos, Telegram bot, AlphaClaw on Render, OpenClaw + GBrain + Supabase. About 2 hours end-to-end, $100-150/month sustained. Replaces the "Set up your personal brain in 30 minutes" stub on the tutorials roadmap with something genuinely complete. Edits to the source draft: - Stripped brain-page YAML frontmatter (type/access/links/etc — not needed for a public docs file) - Privacy sweep per CLAUDE.md: removed real-name references to the collaborator and the agents involved in the session, replaced with "a collaborator" / "my main agent" / generic placeholder names - First-person voice consistency: the source draft slipped between first person and third person ("Garry walked through"); rewrote everything in first person - Zero em-dashes used as connectors (verified by grep) - Added ZeroEntropy to the providers list (it's the default; not mentioning it would leave readers paying 2.6× more on embeddings) - Opened with a router paragraph that points brain-layer-only readers at INSTALL.md and team readers at company-brain.md, so each audience finds the right walkthrough fast Tutorials index updated: - personal-brain.md promoted from In Progress to Shipped (it IS the "set up your personal brain in 30 minutes" entry that was on the roadmap, just better-named and more complete) README.md Tutorials section now lists both shipped tutorials side by side. Reads naturally: solo install first (broader audience), team install second. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): rewrite company-brain as a true superset of personal-brain Per @garrytan: the company brain tutorial should pick up from where the personal brain tutorial leaves off, not duplicate the install. Pedagogical flow now reads: "you already did personal-brain; here is what to add to make it multi-user." Restructure: - Opens with explicit "this tutorial picks up where the personal brain tutorial leaves off" + a router for readers who haven't done that one yet. No duplicated install steps. - Part 1 (mental model) reframed as "what changes when you go from personal to company" + "what this is NOT" (not a different install, not a thin-client-everywhere replacement). - Part 2 is now "switch the brain backend to multi-user Postgres" — surfacing the migrate --to supabase path for readers who started on PGLite, skip-to-Part-3 for readers already on Postgres. - Part 3 adds the new content @garrytan called for: per-person folder structure inside each source. customers/alice-example/, internal/ alice-example/, internal/bob-example/, internal/legal/ etc. So teammates' writes don't collide and the per-person/per-role abstraction is real on disk, not just in OAuth scope. - NEW Part 6: per-person crons. Each teammate gets their own scheduled tasks (7am customer digest for alice, 9am ops status for bob, weekly contract compliance for carol) scoped to their OAuth client so the cron can only touch their slice. - NEW Part 7: per-person skills. The 60+ shipped skills are generic; teams want a few specific ones (onboarding-new-hire, customer-success-followup, weekly-team-digest). Scaffolded via gbrain skillify scaffold, scoped via allowed_clients in frontmatter. - Existing strong parts retained: OAuth scoping + verify, per- teammate AI client connect, first synthesized query, operating notes, gotchas. Reworded where needed to refer back to personal- brain steps instead of re-explaining them. Voice + style sweeps: - Zero em-dashes used as connectors (verified by grep) - Zero internal jargon (no "Cat 22", "P@5", "RRF", "MRR", etc.) - Zero version chatter in body text (only the one acceptable reference to the dated benchmark filename in a docs link) - "Brain layer" / "synthesized answer" framing, not "Think" branding - First-person Garry voice in intro/motivation paragraphs - All examples use placeholder names (alice-example, bob-example, carol-example, acme-co, diana-example) - No mentions of Mem0 / Hindsight (per session-long convention) Word count: 3608 (vs 3717 before — about the same length, but more of those words now describe the NEW content rather than re-explaining prereq install). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): enrich company-brain with real-world patterns from production deployment Mined production patterns from my own running company-brain deployment to ground the tutorial in shapes that actually work. Added four substantive sections. Part 3 (sources) gains "Two scoping models" sidebar: - Model A: separate sources with OAuth scoping (SQL-enforced isolation, right for multi-user with different AI clients per person — what the tutorial walks you through). - Model B: one source with partners/<slug>/ directory convention (simpler ops, scoping is convention-only, right when one agent serves everyone over Telegram — what I actually run in production). - Mix-and-match guidance: separate sources for the obviously-different ones AND partners/<slug>/ inside the shared source for per-person workspace. Part 7 (skills) gains "Shared rule files at the skills root" subsection: - _brain-filing-rules.md: iron-rule decision tree for where new pages belong. Every ingest skill consults it before creating a page. - _output-rules.md: output quality standards (deterministic links built from API data not LLM-composed strings, citation format, no AI-slop). - _excluded-people.md: privacy gate naming people the brain must never reference even when they appear in source material. Re-attribute or discard. The file that prevents accidental publication of things about people who aren't fair game. - _operating-rules.md, _x-ingestion-rules.md, _x-api-rules.md. - These turn into the de facto company policy for the agent. Edit one, every skill picks it up next request. NEW Part 8 "Wire Slack carefully": - Two crons, two jobs (scan every 5-15min for live signals + archive nightly for full history). - Channel-to-task-ID mapping via topic-registry.json (don't reference raw Slack channel IDs in skills; friendly names that resolve at runtime). - Deterministic links rule (LLM-composed Slack URLs hallucinate constantly; build from API data only). - Dismissed-items state so re-scans don't surface noise that was already triaged. - Per-channel scoping mirrors per-person scoping. Sensitive channels scope by OAuth client. - Names the actual production skills (slack, slack-scan, slack-archive) for scaffold reference. NEW Part 9 "Onboard each teammate yourself (the botmaster pattern)": - The load-bearing UX gate for adoption. Don't hand a teammate an OAuth credential and tell them to "try it out." That's how internal tools die. - Step 1: pre-populate their slice (partners/<their-slug>/USER.md with role/focus/priorities/preferences, 5-10 concepts that are theirs, 2-3 example brain entries that demonstrate the shape). About 20 minutes per teammate. - Step 2: walk them through 2-3 wow flows personally. A synthesis query (show the brain layer). A gap-analysis query (build trust). A write-back flow (show capture value). About 15 minutes. - Step 3: graduate to DM only after the wow moment lands. The order flips the conversion rate. - About 45 minutes per person total. Cheaper than an unadopted tool. Parts 8-12 renumbered to 10-14 to make room. Cross-references in body text checked (Part 3 ref in Part 5, Part 4 ref in operating notes, Part 5 ref in Slack section all still correct). Word count: 4938 (vs 3608 before). Still readable in one sitting per the original target; added content is all load-bearing patterns from production. Voice gates: - Zero em-dashes used as connectors (sed-replaced all 8 introduced by the additions with periods) - Zero internal jargon (no Cat N, no P@5, no RRF, no MRR) - Zero banned names (no Brad, Gessler, Wintermute, Zion, Straylight, Seibel, Caldwell, Mem0, Hindsight) - "Brain layer" / "synthesized answer" framing preserved - First-person Garry voice throughout - All examples use placeholder names (alice-example, bob-example, carol-example, diana-example, acme-co) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): expand personal-brain Step 7 with the three real Supabase gotchas @garrytan: the personal-brain tutorial needs to surface the specific Supabase setup gotchas I hit the hard way. Rewrote Step 7 with the operational detail. Three new subsections: - 7a: Turn on pgvector. The vector extension has to be toggled in Database → Extensions before GBrain's schema migrations will run. Five seconds in the dashboard, an hour of debugging if you forget. - 7b: Use the CONNECTION POOLER string, not the direct connection. Direct is port 5432, IPv6-only. Pooler is port 6543 via pgbouncer, IPv4-compatible, survives connection storms from parallel workers. Shows the exact pooler hostname format and the gbrain config set command. - 7c: Buy the IPv4 add-on. About $4/month. Even with the pooler, some Supabase regions / Render plans hit IPv6 resolution snags. Symptom: network-unreachable errors or connect hangs in gbrain doctor. Toggle on in Project Settings → Add-ons. Saves debugging time on multiple installs. - 7d: Verify with gbrain doctor — names which of 7a / 7b / 7c to revisit if a check fails. The old "Operating note" about Supabase being the scaling bottleneck preserved at the end of the section since it's a different concern (scale, not setup). Voice gates: 0 em-dashes (verified), first-person Garry voice ("I hit the hard way"), no internal jargon, no banned names. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): rewrite "What this looks like" for someone arriving cold @garrytan: the prior version assumed too much. "Eval receipt", "top-K vector retrieval", "MemPalace", "Haiku judge", "Facts fence", "synthesis layer" — all jargon that requires reading the rest of the project to parse. A new reader bounces. New version requires zero prior context: - Sets up a universal scenario anyone gets: "you have a meeting with alice tomorrow, what do you need to know?" - Shows what a typical tool returns (a list of 5 pages with snippets) so the reader sees the gap themselves - Shows what gbrain returns (a real briefing with the open items surfaced, plus a "heads up" about what's missing from the brain) - Lets the two outputs speak for themselves, no judge scores or benchmark numbers in the body - Closes with one plain-English sentence on the difference: "Search finds the pages. The brain reads them for you and writes the answer." What got cut: - The eval-receipt path reference (means nothing to a new reader) - The Haiku judge scores (0/10 vs 9/10) — not useful out of context - The verbatim judge verdict quotes (long, internal vocabulary) - The "Facts fence", "typed-claim", "synthesis layer" feature names - The MemPalace name-drop - The link to the comprehensive benchmark page (it's still reachable from the Tutorials and benchmark sections; doesn't need to be in the intro) - The numbered "three things gbrain think did" breakdown The example content is illustrative (same scenario shape as a real production query) but stripped of the internal benchmark wrapper. Reads naturally as "imagine you're about to ask gbrain something." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: capitalize proper-noun names in prose across README + tutorials @garrytan caught lowercase "alice" in prose — proper nouns should be capitalized. The lowercase was leaking from the slug convention (people/alice as the actual storage slug) into descriptive text. Rule applied: capitalize Alice / Bob / Carol / Diana / Acme when used as a person or company name in prose. Keep lowercase in: - Slugs and file paths (people/alice, customers/acme-co) - Code identifiers in fenced blocks where the slug IS the value - URLs and hostnames (brain.acme-co.com) - Channel-name-style references (#alice-customers) Files swept: README.md, docs/tutorials/company-brain.md, docs/tutorials/personal-brain.md, docs/tutorials/README.md. The README sweep was the primary target (Garry's actual call-out); the tutorial sweep keeps voice consistent across all the front-door docs. Hand-fixed four occurrences inside code-fenced blocks that were human comments rather than code (terminal session comments "# Terminal 1, as Alice", "# Terminal 2, as Bob", directory-tree inline comments "← Alice's customer notebook"). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(readme-hero-anchors): rotate ZeroEntropy anchor → search-vs-answer headline CI caught one expected regression after v0.40.8.1's README rewrite. The D9 hero-anchors guard required "ZeroEntropy" in the first 50 lines of README.md (the v0.36.0.0 default story). The post-rewrite hero intentionally rotated that out per Garry's "no version chatter in README" directive — ZeroEntropy still appears further down (line 211, 231, 279) but no longer in the hero. The guard's docstring explicitly handles this case: "did we deliberately rotate the headline? If yes: update the anchors here." Rotation: - Dropped: regex /ZeroEntropy|\bZE\b/ in the first 50 lines - Added: regex matching the new headline "Search gives you raw pages. GBrain gives you the answer." which is the load-bearing differentiator of the post-rewrite hero. If a future cleanup PR accidentally rewords the search-vs-answer framing, the new anchor catches it the same way the ZeroEntropy anchor caught accidental drops before. Other 4 anchors unchanged (OpenClaw + Hermes + production-number + P@5/R@5 — all still load-bearing). Updated docstring records the v0.40.8.1 rotation as the audit trail for the next time this happens. Verified: `bun test test/readme-hero-anchors.test.ts` → 5 pass / 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): restore agent-led install path + per-client MCP guides The README install section had collapsed to three generic shapes ("agent platform", "CLI", "MCP server") that buried the load-bearing flow: paste a URL pointing at INSTALL_FOR_AGENTS.md into your agent and let it do the work. That's the path most users actually take. Restored the original three-tier structure with an explicit second tier for "install it into your existing agent" (Codex, Claude Code, Cursor), plus surfaced the per-client MCP guides individually so users see the command shape they actually need instead of one generic docs/mcp/ link. Six per-client MCP links now in the README itself: Claude Code, Cursor/Windsurf (stdio), Claude Desktop, Claude Cowork, Perplexity Computer, ChatGPT. Each carries the one-line shape that matters (claude mcp add, Settings > Integrations, OAuth 2.1, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): link personal-brain tutorial from the agent-install path People landing on the README without an existing OpenClaw or Hermes deployment need a starting point that walks the whole flow, not just "paste this URL into your agent." The personal-brain tutorial already covers picking a platform, deploying it, pointing it at INSTALL_FOR_AGENTS.md, and verifying the first query. Surfaced as a callout right under the agent-install snippet so the path is visible to first-time users without burying the experienced-user flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
cdba533a04 |
v0.36.2.0 feat: ZeroEntropy as default + zero-based README rewrite (#1136)
* feat(dims): OpenAI text-embedding-3 Matryoshka range validation (D13) dimsProviderOptions now fail-loud at the embed boundary when the configured embedding_dimensions is outside the model's native range (1..1536 for -small, 1..3072 for -large). Paste-ready fix hint in the AIConfigError.fix field. Closes the silent-HTTP-400 path that would have bit OpenAI-fallback users on v0.36.0.0 ZE-default installs. 16 new test cases in test/ai/dims-openai.test.ts pinning the contract across native-openai and openai-compatible adapter paths. * feat(ai): flip defaults to ZeroEntropy zembed-1 1280d + zerank-2 reranker Default embedding model is now zeroentropyai:zembed-1 at 1280d via Matryoshka. Real-corpus benchmark: 2.2x faster than OpenAI, 2.6x cheaper at regular pricing, wins 11/20 head-to-head queries. 1280 is the closest valid ZE Matryoshka step to the prior OpenAI 1536d default (valid set: 2560/1280/640/320/160/80/40). 1024 (Voyage's step) is NOT on ZE's list — pinned by AIConfigError fail-loud in dims.ts. balanced mode bundle now defaults reranker_enabled=true. zerank-2 reshuffles 60% of top-1 results in benchmarks. Missing-key fail-open contract in src/core/search/rerank.ts handles unauthenticated cases. Opt out with: gbrain config set search.reranker.enabled false Existing tests updated (gateway.test.ts, search-mode.test.ts) and a new test/balanced-reranker-default.test.ts (10 cases) pins the fail- open invariants. * feat(retrieval-upgrade): RetrievalUpgradePlanner + interactive prompt UX New src/core/retrieval-upgrade-planner.ts is the consolidated planner that computes the brain's pending retrieval-upgrade work (chunker bumps + ZE switch) in one pass and applies the schema transition + config updates atomically. Tagged-union ApplyResult enum (D15): 'applied' | 'skipped_already_ applied' | 'skipped_no_work' | 'declined' | 'planned' | 'failed'. No string-parsing reasons. Three config keys (D12): ze_switch_prompt_shown (UI state), ze_switch_requested (user intent), ze_switch_applied (work done). Plus ze_switch_previous_snapshot (JSON, full prior config for --undo per D16) and ze_switch_declined_at (90-day re-ask window). Schema transition (D18) is atomic: DROP indexes + ALTER COLUMN + CREATE INDEX inside a single engine.transaction(). HNSW recreation is part of the same transaction — no silent slow-search window. C3 eligibility logic: ze_switch_offered iff NOT on ZE + NOT declined recently + NOT applied + (legacy default OR >100 pages). C4 cost math: MAX(chunker_pending, dim_pending) not SUM — one re-embed pass invalidates both surfaces simultaneously. New src/core/retrieval-upgrade-prompt.ts wires the planner to a TTY-only interactive prompt with two-line cost split (D10) and privacy callout for the reranker flip. Tests: test/retrieval-upgrade-planner.test.ts (24 cases) pins the state machine. test/asymmetric-encoding-contract.test.ts (6 cases) pins D17: search read path uses gateway.embedQuery() not embed(), asserted via __setEmbedTransportForTests mock. * feat(cli): gbrain ze-switch — manual lever for the ZE switch New gbrain ze-switch CLI with --dry-run, --json, --resume, --force, --undo, --non-interactive, --confirm-reembed, --ignore-missing-key flags. Mirrors the upgrade prompt's UX symmetry: --undo presents a cost-warning before re-embedding back to the prior width. src/cli.ts: dispatch case + CLI_ONLY entry. ze-switch owns its own engine lifecycle (mirrors the doctor pattern). test/ze-switch-cli.test.ts (11 cases): --help, --dry-run, --json, --non-interactive, --ignore-missing-key, --resume, --undo, --confirm-reembed. Uses captureExit harness to test process.exit() paths without breaking the test process. * feat(doctor): ze_embedding_health + embedding_width_consistency checks Two new doctor checks (D-A5): ze_embedding_health: when embedding_model starts with zeroentropyai:, verify ZEROENTROPY_API_KEY is set (env or config). Paste-ready setup hint with the signup URL on failure. embedding_width_consistency: cross-check that the configured embedding_dimensions matches the actual vector(N) column width on content_chunks.embedding. Catches the half-applied switch state (schema migrated but config write crashed) with a paste-ready gbrain ze-switch --resume hint. Wired into runDoctor between reranker_health and the existing sync_freshness checks. Both checks gracefully no-op on non-ZE embedding configs. test/doctor-ze-checks.test.ts (8 cases) pins both checks across happy + missing-key + missing-config + drift paths. Uses withEnv() helper to clear ZEROENTROPY_API_KEY for the no-key path so tests are hermetic against contributor env state. test/e2e/v0_28_5-fix-wave.test.ts + test/openai-compat-multimodal.test.ts: updated to explicit-configure the gateway when the test depends on specific dims that diverge from the v0.36.0.0 default (1280d). * docs: README zero-based rewrite (884 -> 139 lines) + new docs files Strip 4 months of accreted "New in v0.X.Y" hero blocks and reorganize around what gbrain does today. 33 H2s -> 8. The Commands section (136 lines duplicating gbrain --help) moved out; the 6-table skills enumeration collapsed to a one-paragraph capability description with a link to skills/RESOLVER.md. Hero retains load-bearing facts: OpenClaw + Hermes credit, production numbers (17,888 pages / 4,383 people / 723 companies), BrainBench numbers (P@5 49.1% / R@5 97.9% / +31.4 lift), ZE comparison numbers, 30-min install claim. Adds one paragraph announcing the v0.36.0.0 ZE default with the explicit gbrain config set escape for OpenAI/Voyage users. New files: - docs/INSTALL.md: every install path consolidated (agent platform, CLI standalone, MCP server). Thin-client mode covered. - docs/architecture/RETRIEVAL.md: why the hybrid + graph stack works. BrainBench numbers, why each strategy alone fails, the source-aware ranking + intent classification + multi-query expansion story. - docs/ethos/ORIGIN.md: origin story lifted from the old README so the front door stays factual + concrete. test/readme-hero-anchors.test.ts (5 cases) is the D9 regression guard. Five load-bearing strings: OpenClaw, Hermes, ZE, production-numbers regex, P@5/R@5. Light anchors that let voice/ structure evolve but block accidental loss of headline facts. scripts/check-test-real-names.sh: allowlist entries for OpenClaw + Hermes literals in the anchor test (it explicitly asserts those strings appear in README). * chore: bump version and changelog (v0.36.0.0) ZeroEntropy as the new default for embedding (zembed-1 at 1280d via Matryoshka) and reranker (zerank-2 cross-encoder, on by default in balanced mode bundle). README zero-based rewrite (884 -> 139 lines). 3 new docs files. Two new doctor checks. New gbrain ze-switch CLI with --undo for symmetric reversibility. skills/migrations/v0.36.0.0.md tells the agent how to surface the retrieval-upgrade prompt post-upgrade. llms-full.txt regenerated via bun run build:llms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(docs): scrub Wintermute from RETRIEVAL.md per privacy rule * chore: rebump version 0.36.0.0 → 0.36.2.0 (queue collision) Three open PRs were claiming v0.36.0.0 (#1130 skillpack, #1139 hindsight, #1136 this PR). Ship-aware queue allocator says this branch lands at v0.36.2.0. Trio audit: VERSION 0.36.2.0 package.json 0.36.2.0 CHANGELOG ## [0.36.2.0] - 2026-05-17 Updates: VERSION, package.json, CHANGELOG header + body refs, README "New default in v0.36.2.0" announcement + credit line, skills/migrations/v0.36.0.0.md renamed to v0.36.2.0.md with frontmatter + body refs updated. llms-full.txt regenerated. * fix(test): pin gateway dim=1536 in cross-file-stateful PGLite tests CI shard 1 reported 10 failures across `query-cache.test.ts` (6) and `consolidate-valid-until.test.ts` (4). Both files hardcode 1536-dim vectors but rely on `PGLiteEngine.initSchema()` to size `vector(__EMBEDDING_DIMS__)` at the right width. Root cause: v0.36.2.0 flipped DEFAULT_EMBEDDING_DIMENSIONS from 1536 to 1280 (ZE Matryoshka step). The gateway module is process-singleton; when ANOTHER test file in the same shard's bun-test process configures the gateway before us, `pglite-engine.ts:216` reads `getEmbeddingDimensions() === 1280` and sizes the schema columns at vector(1280). The hardcoded 1536-dim INSERTs then fail with "expected 1280 dimensions, not 1536". Locally these tests pass in isolation because the gateway falls back through the try/catch at pglite-engine.ts:218 (1536 default). CI runs multiple test files in one process, so cross-file state poisons the schema width. Fix: explicit `resetGateway()` + `configureGateway({embedding_dimensions: 1536, ...})` at the top of `beforeAll`, plus `resetGateway()` in `afterAll`. Pins the schema width regardless of cross-file state. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
baf3517868 |
feat: v0.9.0 -- smart file storage, publish, production-grade skills (#62)
* feat: battle-tested skill patterns from production deployment Backport production-learned brain-operations patterns: - Iron Law of Back-Linking (mandatory bidirectional linking) - Brain filing rules (file by primary subject, not format) - Enrichment protocol (7-step pipeline, 3-tier system, person/company templates) - Media ingest workflows (articles, videos, podcasts, PDFs, screenshots) - Citation requirements (mandatory [Source: ...] on every fact) - Test Before Bulk operating principle - Voice recipe: unicode crash fix, PII scrub, identity-first prompt, DIY STT+LLM+TTS - X-to-Brain recipe: image OCR, Filtered Stream, tweet rating rubric, cron stagger * chore: bump version and changelog (v0.8.1) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add _brain-filing-rules.md to CLAUDE.md key files * feat: smart file upload with TUS resumable and .redirect.yaml pointers - Supabase Storage auto-selects upload method by file size: < 100 MB standard POST, >= 100 MB TUS resumable (6 MB chunks + retry) - Signed URL generation for private bucket access (1-hour expiry) - New `upload-raw` command with size routing: small text stays in git, large/media files go to cloud with .redirect.yaml pointer - New `signed-url` command for generating access links - File resolver supports both .redirect.yaml (v0.9+) and .redirect (legacy) - Redirect format upgraded: 10 fields with full metadata - All migration commands (mirror, redirect, restore, clean) handle both formats * feat: skills reference actual gbrain file commands - Filing rules document upload-raw, signed-url, and .redirect.yaml format - Ingest skill uses gbrain files upload-raw for raw source preservation - Maintain skill adds file storage health checks - Setup skill adds storage configuration phase with migration guidance - Voice recipe uses upload-raw for call audio storage - Migration v0.9.0 with complete storage setup instructions * chore: bump version and changelog (v0.9.0) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: gbrain publish -- shareable HTML with password protection First code+skill pair: deterministic code does the work (strip private data, encrypt with AES-256-GCM, generate self-contained HTML), the skill tells the agent when and how to use it. 34 new tests. See: https://x.com/garrytan/status/2042925773300908103 * feat: backlinks check/fix, page lint, and report commands Three new deterministic tools (zero LLM calls): - gbrain backlinks check/fix -- scans brain for entity mentions without back-links, creates them. Enforces the Iron Law from the skills. - gbrain lint [--fix] -- catches LLM preambles, code fence wrapping, placeholder dates, missing frontmatter, broken citations, empty sections. --fix auto-strips fixable artifacts. - gbrain report --type <name> -- saves timestamped reports to brain/reports/{type}/YYYY-MM-DD-HHMM.md for audit trails. 33 new tests (409 total, 0 fail). * feat: v0.9.0 migration tells agents to swap scripts for built-in commands Migration file now: - Lists all 5 new deterministic commands with usage examples - Includes a script-to-command replacement table (old -> new) - Tells the agent to find custom script references in AGENTS.md, skills, and cron jobs and replace with gbrain commands - Adds recommended cron jobs for daily backlink fix + weekly lint - References the Thin Harness, Fat Skills thread * fix: CLI routing bugs found during DX review - Fixed subArgs reference error in handleCliOnly (used wrong variable name) - Renamed gbrain backlinks check/fix to gbrain check-backlinks to avoid conflict with existing backlinks operation (per-page incoming links) - Added TOOLS section to --help output showing publish, check-backlinks, lint, report - Added upload-raw and signed-url to FILES section in --help - Updated all docs/migration references to use check-backlinks * fix: security hardening from adversarial review - XSS: sanitize marked.parse() output (strip script/iframe/on* attrs) - Path traversal: validate report --type against [a-z0-9-] pattern - TUS: HEAD request before retry to get server's actual offset (TUS spec) - Pointer: upload-raw now includes pointer content in JSON output - Symlinks: use lstatSync in all walkers to prevent directory escape --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
ce15062694 |
feat: GBrain v0.7.0 — Integration Recipes + SKILLPACK Breakout (#39)
* docs: break SKILLPACK into 17 individual guides The 1,281-line SKILLPACK monolith is now 17 individually linkable guides in docs/guides/, organized by category: core patterns, data pipelines, operations, search, and administration. GBRAIN_SKILLPACK.md becomes a structured index with categorized tables linking to each guide. The URL stays stable for backward compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add integration guides, architecture docs, and ethos New documentation directories: - docs/integrations/ — "Getting Data In" landing page, credential gateway, meeting webhooks. Includes recipe format documentation. - docs/architecture/ — Infrastructure layer doc (import, chunk, embed, search) - docs/ethos/ — "Thin Harness, Fat Skills" essay with agent decision guide - docs/designs/ — "Homebrew for Personal AI" 10-star vision document Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add gbrain integrations command + voice-to-brain recipe New CLI command: gbrain integrations (list/show/status/doctor/stats/test) - Standalone command, no database connection needed - Uses gray-matter directly for recipe parsing (not parseMarkdown) - --json flag on every subcommand for agent-parseable output - Bare command shows senses/reflexes dashboard - Health heartbeat via ~/.gbrain/integrations/<id>/heartbeat.jsonl First recipe: recipes/twilio-voice-brain.md - Phone calls create brain pages via Twilio + OpenAI Realtime - Opinionated defaults: caller screening, brain-first lookup, quiet hours - Outbound call smoke test (GBrain calls the user to prove it works) - Validate-as-you-go credential testing - Twilio signature validation for webhook security Migration file for v0.7.0 with agent-readable changelog. 13 unit tests covering parseRecipe, CLI routing, and recipe validation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add Getting Data In to README, update CLAUDE.md and manifest README: voice calls in intro bullet list, new "Getting Data In" section with integration table (voice, email, X, calendar) and recipe philosophy. CLAUDE.md: reference new files (integrations.ts, recipes/, docs/guides/, docs/integrations/, docs/architecture/, docs/ethos/). manifest.json: bump to v0.7.0, add recipes_dir field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: v0.7.0 CHANGELOG, TODOS, VERSION bump CHANGELOG: v0.7.0 entry covering integration recipes, voice-to-brain, gbrain integrations command, SKILLPACK breakout, and new documentation. TODOS: 3 new items from CEO/DX reviews (constrained health_check DSL, community recipe submission, always-on deployment recipes). VERSION + package.json: bump to 0.7.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: rewrite voice recipe with agent instructions and verified links Major improvements to recipes/twilio-voice-brain.md: - Agent preamble: explains WHY sequential execution matters (each step depends on the previous), defines 4 stop points where the agent MUST pause and verify, tells agent to never say "something went wrong" but instead explain the exact error and fix - User actions are now specific: exact URLs for every credential (Twilio console, OpenAI API keys page, ngrok dashboard), what buttons to click, what fields to copy, common failure modes - All URLs verified via web search against current 2026 documentation: Twilio SID/token at twilio.com/console, OpenAI keys at platform.openai.com/api-keys, ngrok token at dashboard.ngrok.com/get-started/your-authtoken - Cost estimate corrected: OpenAI Realtime is $0.06/min input + $0.24/min output (was understated), total ~$20-22/mo for 100 min - Validate-as-you-go: each credential tested immediately with exact curl commands, failure messages explain what went wrong and how to fix - Smoke test flow: tells user exactly what to say, verifies ALL three outputs (messaging notification + brain page + search result) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add "Homebrew for Personal AI" essay (markdown is code) New essay at docs/ethos/MARKDOWN_SKILLS_AS_RECIPES.md — the distribution corollary to "Thin Harness, Fat Skills." Argues that markdown skill files are simultaneously documentation, specification, package, and source code. The agent is the package manager. The git repo is the app store. Referenced from SKILLPACK index and CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: rewrite agent instructions as command language, promote skills The OpenClaw/Hermes install block is now a drill sergeant, not a tour guide. Every step is an imperative command with exact verification criteria and explicit stop-on-failure behavior. No FYI, no suggestions, just rails. Key changes: - 11-step setup with STOP points after each step - Exact user instructions for Supabase connection string (what to click, what NOT to give the agent, what the string looks like) - "Verify: run X. You must see Y. If not: Z" after every step - Skills table now links to both skill files AND guide docs - Integration recipes table simplified (no "coming soon" placeholders) - Docs section reorganized: for agents / for humans / reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: 4 codex findings + add email-to-brain recipe Codex review found 4 issues, all fixed: 1. getStatus() returned "configured" if ANY secret was set (e.g. just OPENAI_API_KEY). Now requires ALL required secrets before marking configured. Prevents false "configured" status and spurious doctor runs. 2. Twilio health check hit unauthenticated endpoint (always 401). Now uses authenticated curl with SID:token, matching the setup validation. 3. README anchor docs/GBRAIN_SKILLPACK.md#the-dream-cycle broken after SKILLPACK rewrite. Updated to point to docs/guides/cron-schedule.md. 4. Compiled binary can't find recipes/ via import.meta.dir. Added GBRAIN_RECIPES_DIR env var override + global bun install path fallback. Also adds recipes/email-to-brain.md: Gmail deterministic collector pattern with ClawVisor credential gateway, validate-as-you-go, agent instructions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add email, X, calendar, and meeting sync recipes Four new integration recipes extracted from production wintermute patterns: - recipes/email-to-brain.md: Gmail via ClawVisor, deterministic collector pattern (code pulls emails with baked-in links, agent does judgment), noise filtering, signature detection, digest generation - recipes/x-to-brain.md: X API v2, timeline + mentions + keyword search, deletion detection (diffs previous run, verifies 404), engagement velocity tracking, rate limit awareness - recipes/calendar-to-brain.md: Google Calendar via ClawVisor, historical backfill (years of data), daily markdown files with attendees + locations, attendee enrichment for brain pages - recipes/meeting-sync.md: Circleback API, transcript import with speaker labels, attendee detection + filtering, entity propagation to people/ company pages, action item extraction, idempotent by source_id All recipes follow the same format: agent preamble with sequential execution rules, validate-as-you-go credentials, exact URLs for API key setup, stop-on-failure verification, and heartbeat logging. Updated README, SKILLPACK index, and integrations landing page with all 5 recipes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add Google OAuth as alternative to ClawVisor in email + calendar recipes Both recipes now offer two auth options: - Option A: ClawVisor (recommended, handles OAuth + token refresh) - Option B: Google OAuth2 directly (no extra service, you manage tokens) Option B includes step-by-step instructions for Google Cloud Console: exact URLs, which buttons to click, which scopes to add, how to enable the API, and the OAuth flow for token exchange. This removes ClawVisor as a hard dependency for getting started. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add implementation guides with pseudocode and test suggestions Every recipe now includes an "Implementation Guide" section with: - Production-tested pseudocode the agent can follow to build each collector - Edge cases and failure modes discovered in real deployment - Non-obvious implementation details (why the 48h staleness heuristic, why Gmail links need authuser, why SSE responses need double-parsing) - Test suggestions: what the agent should verify after setup email-to-brain: noise filtering algorithm, signature detection patterns, Gmail link generation (authuser is critical), sent-mail dedup x-to-brain: deletion detection with 3 heuristics (7-day, 48h staleness, API verification), engagement velocity thresholds (50 min for 2x, 100 absolute jump), atomic writes, stdout contract, rate limit handling calendar-to-brain: smart chunking (monthly for sparse years, weekly for dense), attendee filtering (rooms, groups, distros), merge-with-existing (only replace ## Calendar section), date/time parsing edge cases meeting-sync: SSE double-JSON parsing, idempotency double-check (grep + filename), auto-tagging from meeting names, git commit after sync Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: 6 new guides from production patterns (wintermute extraction) New guides extracted and generalized from production deployment: - repo-architecture.md: Two-repo pattern (agent behavior vs world knowledge). Strict boundary rules, decision tree, hard rule: never write knowledge to the agent repo. - sub-agent-routing.md: Model routing table by task type. Signal detector pattern (spawn Sonnet on every message). Research pipeline pattern (Opus plans, DeepSeek executes, Opus synthesizes). Cost optimization. - skill-development.md: 5-step cycle (concept, prototype, evaluate, codify, cron). MECE discipline (no overlapping skills). Quality bar checklist. "If you ask twice, it should already be a skill." - idea-capture.md: Originality distribution rating (0-100 across 4 populations). Depth test ("could someone unfamiliar understand WHY?"). Deep cross-linking mandate. Notability filtering. - quiet-hours.md: Hold notifications 11pm-8am local time. Held messages directory pattern. Timezone-aware delivery. Morning briefing pickup. - diligence-ingestion.md: 9-step pipeline for data room materials. Detection patterns (PDF filenames, spreadsheet tabs, user language). Index.md template with bull/bear case. Company page enrichment. All PII scrubbed. Patterns generalized for any user. SKILLPACK index updated with 6 new entries. CLAUDE.md references added. All 37 SKILLPACK links verified. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: upgrade all guides to operational playbooks with pseudocode Every guide now follows the playbook structure: - Goal: one sentence, what this achieves - What the User Gets: without this / with this - Implementation: pseudocode with actual gbrain commands - Tricky Spots: production-tested gotchas - How to Verify: test steps the agent runs after setup Guides upgraded (15 files): - brain-agent-loop: on_message() loop with read/write/sync pseudocode - brain-first-lookup: 4-step lookup cascade with exact commands - brain-vs-memory: routing algorithm for 3 knowledge layers - compiled-truth: page structure + rewrite vs append rules - content-media: 3 ingest patterns (YouTube, social, PDFs) - cron-schedule: full schedule table + dream cycle pseudocode - enrichment-pipeline: 7-step protocol with tier classification - entity-detection: spawn pattern + detection prompt + notability filter - executive-assistant: 3 workflow algorithms (triage, prep, post-inbox) - meeting-ingestion: 6-step transcript-to-brain flow - operational-disciplines: 5 executable discipline blocks - originals-folder: detection + exact-phrasing capture + cross-linking - search-modes: decision tree for keyword vs hybrid vs direct - source-attribution: citation format + hierarchy + conflict resolution - Plus Goal/What User Gets headers on 6 newer guides Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add WebRTC to voice recipe + ngrok Hobby setup guide Voice recipe updates: - Added WebRTC endpoint (POST /session, GET /call, POST /tool) for browser-based calling with RNNoise noise suppression - WebRTC pseudocode with the 4 non-obvious gotchas from production (voice under audio.output.voice, no turn_detection, no session.update on connect, trigger greeting via data channel) - Recommend ngrok Hobby ($8/mo) for fixed domain instead of free tier - Fixed domain means URLs never change, Twilio never breaks New guide: docs/mcp/NGROK_SETUP.md - How to set up ngrok Hobby for both MCP and voice agent - Fixed domain setup, watchdog pattern, AI client configuration - Claude Desktop requires Settings > Integrations (not JSON config) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add dependency graph + ngrok-tunnel + credential-gateway recipes Recipes now have real dependencies via the `requires` field: - voice-to-brain requires ngrok-tunnel (needs public URL for Twilio) - email-to-brain requires credential-gateway (needs Gmail access) - calendar-to-brain requires credential-gateway (needs Calendar access) - x-to-brain and meeting-sync are standalone (direct API keys) Two new infrastructure recipes: - ngrok-tunnel: fixed public URL for MCP + voice. Recommends Hobby ($8/mo) for a domain that never changes. Includes watchdog pattern. - credential-gateway: secure Google service access via ClawVisor (recommended) or direct OAuth2. One setup, all Google recipes use it. Moved ngrok from docs/mcp/ to recipes/ — it's shared infrastructure, not MCP-specific. README and integrations landing page show dependency chains. When agent installs voice-to-brain, it sets up ngrok-tunnel first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add infra category, fix dashboard alignment, show dependencies DX audit found two bugs in gbrain integrations dashboard: 1. Column alignment broken — IDs > 18 chars ran into descriptions with no space. Fixed: pad to 22 chars. 2. ngrok-tunnel and credential-gateway showed as SENSES but they're infrastructure. Added 'infra' category. Dashboard now shows three sections: INFRASTRUCTURE (set up first), SENSES, REFLEXES. 3. Dependencies now shown inline: "AVAILABLE (needs credential-gateway)" Also added 'requires' field to JSON output for agent consumption. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add frontier model requirement disclaimer to README GBrain's markdown-is-code approach requires models capable of interpreting intent and implementing from architecture descriptions. Tested with Claude Opus 4.6 and GPT-5.4 Thinking. Smaller models will struggle with the recipe format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add PGLite → Supabase upgrade path to README Clarify the database progression: start with PGLite (Postgres as WASM, zero infrastructure, pgvector built in, nothing to install). Graduate to Supabase or self-hosted Postgres when you need connection pooling, concurrency, and remote MCP access from Claude Desktop, Cowork, ChatGPT, Perplexity Computer, or any MCP-compatible agent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: revert PGLite mention (coming in next branch) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: make all 23 guides consistent (Goal/Impl/Tricky/Verify) Every guide now has exactly these sections in this order: - ## Goal (one sentence) - ## What the User Gets (without this / with this) - ## Implementation (pseudocode with gbrain commands) - ## Tricky Spots (3-5 numbered gotchas) - ## How to Verify (3-5 numbered test steps) 11 guides restructured from non-standard headings: - deterministic-collectors, live-sync, upgrades-auto-update (full rewrites) - entity-detection, diligence-ingestion, idea-capture, quiet-hours, repo-architecture, skill-development, sub-agent-routing (restructured) 23/23 guides now pass consistency audit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: restructure README around the #1 blocker (getting data in) The README was leading with Postgres and database architecture. Most users are stuck at step zero: "I have an agent but it doesn't know anything about my life." New structure: 1. The Problem — your agent doesn't know your life 2. Getting Data In — integration recipes, front and center 3. The Compounding Thesis — why this matters 4. How this happened — credibility, origin story 5. When you need Postgres — scale, not starting point Postgres is de-emphasized from a full section to two paragraphs: "You don't need Postgres to start" and "When you need Postgres" (1,000+ files, remote MCP access, multiple AI clients). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: move Install to top of README, remove duplicate section Install now appears right after Getting Data In (line 38), not buried at line 295. The user sees: Problem → Getting Data In → Install. Removed the duplicate Install section (262 lines) that was lower in the README. The agent instructions block, CLI quickstart, and all content is now in the single Install section near the top. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: move agent install block to first thing in README "Start here: paste this into your agent" is now the first section, right after the one-line pitch. No scrolling, no context, no preamble. User opens the README, sees the paste block, copies it into OpenClaw or Hermes, and the agent takes over. Flow: pitch → paste block → Getting Data In → Compounding Thesis → origin story Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: compress install block from 11 steps to 5 The agent install block was 102 lines and 11 steps. Now it's 40 lines and 5 steps. Same coverage, half the text. Changes: - Merged "prove keyword search" + "embed" + "prove hybrid search" into one SEARCH step (the user doesn't care about the intermediate) - Merged skillpack, sync, auto-update, integrations, verification into one GO LIVE step with sub-items (post-install polish, not install) - Shortened database instructions (one line instead of 5 sub-steps) - Removed redundant preamble ("YOU MUST COMPLETE EVERY STEP" is now just "Do not skip steps. Verify each step.") The 5 steps: INSTALL → DATABASE → IMPORT → SEARCH → GO LIVE Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * security: gitignore all .env files, not just specific ones CSO audit found .gitignore covered .env.testing and .env.production but not bare .env. A user creating .env with database credentials could accidentally commit it. Fix: .env and .env.* are now gitignored. .env.*.example files are explicitly un-ignored so templates remain tracked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * security: scrub PII from essay and recipe examples - 510-MY-GARRY phone mnemonic → "Your Phone Number" - "Garry → Authenticated Mode" → "Owner → Authenticated Mode" - "Telegram" → "secure channel" in auth example - @garrytan → @yourhandle in X recipe example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |