* feat: add cold-start and ask-user skills cold-start: Day-one brain bootstrapping that sequences the highest-leverage data sources (contacts, calendar, email, conversations, social, archives) to go from empty brain to useful brain. Recommends ClawVisor for credential safety. Each phase is independently valuable and gated on user consent. Includes resume protocol for interrupted sessions. ask-user: Platform-agnostic choice-gate pattern for presenting users with 2-4 options and stopping execution until they respond. Works with Telegram inline buttons, Discord, CLI, or Hermes clarify tool. Adapted from the Wintermute ask-user pattern for the general gbrain ecosystem. Also: - Updated manifest.json with both new skills - Updated RESOLVER.md with cold-start triggers and ask-user convention - Updated setup/SKILL.md to point to cold-start as natural next step - Updated GBRAIN_SKILLPACK.md with Getting Started section * fix: make cold-start the automatic next step after setup - Add Phase J to setup skill — transitions directly into cold-start after verification passes, not as a 'next steps' bullet - Agent MUST offer cold-start, not just mention it - Add anti-pattern: 'ending setup without offering cold-start' - Update output format to flow into cold-start prompt - Track deferred state if user declines * safety: make ClawVisor required for API access, not optional Phase 0 is now 'ClawVisor Setup (Required for API Access)' — not 'Credential Gateway Setup' with three options. The framing changed: - ClawVisor is the safe path. Direct OAuth is not offered as an alternative. - If user declines ClawVisor, agent skips to offline-only imports (markdown, conversation exports, Twitter archive, file archives). - Explicitly: 'Do NOT offer direct OAuth as an alternative.' - Safety boundary callout explains why: raw OAuth tokens + AI agent = uncontrolled attack surface (prompt injection → full Google account). - Anti-pattern #1 is now 'Giving the agent raw OAuth tokens.' - Revocation advantage highlighted: disable access in one click. The contract, description, manifest, and skillpack doc all updated to say 'uses' not 'recommends'. * fix: PR #802 ask-user/cold-start clear repo test gates Four contributor bugs in PR #802 fail existing test gates: - ask-user/SKILL.md missing required Contract / Anti-Patterns / Output Format sections (test/skills-conformance.test.ts). - cold-start/SKILL.md description references trigger phrase "now what?" but the triggers: list omits it (test/resolver.test.ts round-trip). - ask-user is in skills/manifest.json but has no trigger row in RESOLVER.md, breaking manifest reachability (test/resolver.test.ts). - cold-start/SKILL.md writes_to: declares daily/, media/, conversations/ which aren't in skills/_brain-filing-rules.json, failing test/check-resolvable.test.ts. Adds the missing skill sections, the missing trigger entries, and three filing-rules entries to legitimize cold-start's writes_to. The filing-rules additions describe daily/ as date-keyed (calendar + daily notes), media/ as format-prefixed for source-format ingest (media/x/{handle}/), and conversations/ for chat exports. Test surface: - bun test test/skills-conformance.test.ts → was 207 pass / 3 fail, now 209 pass / 0 fail. - bun test test/resolver.test.ts → was 82 pass / 2 fail, now 84 pass / 0 fail. - bun test test/check-resolvable.test.ts → was 24 pass / 1 fail, now 25 pass / 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: scrub 'Hermes Agent' references from PR #802-introduced files CLAUDE.md privacy doctrine forbids naming private agent forks (Wintermute, Hermes, Neuromancer) in any public artifact: skills, README, CHANGELOG, PR titles, commit messages, comments. The canonical phrasing is "OpenClaw" or "your OpenClaw". PR #802 introduced three sites that violated the rule: - skills/ask-user/SKILL.md:79 section heading "With the `clarify` tool (Hermes Agent)". - skills/ask-user/SKILL.md:80 body line "Hermes agents have a built-in `clarify` tool". - skills/manifest.json ask-user description listed "Hermes clarify tool" alongside Telegram / Discord / CLI. Scrub is narrow: only the three PR-introduced sites. Pre-existing "Hermes" references elsewhere in the repo (README.md links to NousResearch/hermes-agent, docs/integrations/credential-gateway.md, docs/guides/cron-schedule.md, etc.) are intentional public-project references to the open-source Hermes Agent and stay in place. scripts/check-privacy.sh enforces the wintermute layer of the rule on every push; the Hermes / Neuromancer doctrine layer is doctrinal only. Future hardening (extending the script to also ban Hermes / Neuromancer in a precise allow-listed way) is filed as TODOS.md P8. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * v0.31.10 feat: cold-start + ask-user skills PR #802 ships the cold-start skill (day-one brain bootstrapping across 8 phases) and the ask-user skill (choice-gate pattern). Setup skill's Phase J auto-launches cold-start when verification passes, closing the "now what?" gap that every new gbrain user hits. Cold-start orchestrates existing recipes (email-to-brain, calendar-to-brain, x-to-brain) and skills (meeting-ingestion); it does not reinvent ingestion logic. State persists across agent crashes via ~/.gbrain/cold-start-state.json, matching the existing update-state.json convention. Trigger phrases include "cold start", "fill my brain", "now what?", "bootstrap", "import my data". Known limitations explicitly flagged in CHANGELOG: - ClawVisor required for API-backed phases (Contacts / Calendar / Gmail). v0.32 will restore the dual A / B pattern that recipes/email-to-brain.md and recipes/calendar-to-brain.md already document. - Phase-level resume granularity. Mid-phase failure restarts the phase from item 1; idempotent slug writes prevent duplicates. Per-item resume lands with the gbrain cold-start CLI counterpart in v0.32. CHANGELOG entry follows the canonical release-summary spec from CLAUDE.md:930: bold headline, 3-5 sentence lead, "What you can now do" section, "How it works under the hood", "Known limitations", "To take advantage of v0.31.10" block, "For contributors". Version bumps from 0.31.2 (branch base) past master's 0.31.3 to 0.31.10. Slots 0.31.4 through 0.31.9 are reserved for in-flight work; the gap is deliberate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Neuromancer <neuromancer@garryslist.org> Co-authored-by: Garry Tan <garrytan@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8.4 KiB
GBrain Skillpack: Reference Architecture for AI Agents
This is a reference architecture for how a production AI agent uses gbrain as its knowledge backbone. Based on patterns from a real deployment with 14,700+ brain files, 40+ skills, and 20+ cron jobs running continuously.
The memex vision, realized. Vannevar Bush imagined a device where an individual stores everything, mechanized so it may be consulted with exceeding speed. GBrain is that device, except the memex builds itself. The agent detects entities, enriches pages, creates cross-references, and maintains compiled truth automatically.
Each section below is a standalone guide. Click through to the full content.
Core Patterns
The foundational read-write loop and data model.
| Guide | What It Covers |
|---|---|
| The Brain-Agent Loop | The read-write cycle that makes the brain compound over time |
| Entity Detection | Run it on every message. Capture original thinking + entity mentions |
| The Originals Folder | Capturing WHAT YOU THINK, not just what you found |
| Brain-First Lookup | Check the brain before calling any external API |
| Compiled Truth + Timeline | Above the line: current synthesis. Below: append-only evidence |
| Source Attribution | Every fact needs a citation. Format and hierarchy |
Data Pipelines
Getting data in and keeping it current.
| Guide | What It Covers |
|---|---|
| Enrichment Pipeline | 7-step protocol, tier system (Tier 1/2/3 by importance) |
| Meeting Ingestion | Always pull complete transcript, propagate to all entity pages |
| Content & Media Ingestion | YouTube, social media bundles, PDFs/documents |
| Diligence Ingestion | Data room materials: pitch decks, financial models, cap tables |
| Deterministic Collectors | Code for data, LLMs for judgment. The collector pattern |
| Idea Capture & Originals | Depth test, originality distribution, deep cross-linking |
| Getting Data In | Integration recipes: voice, email, X, calendar |
Operations
Running a production brain.
| Guide | What It Covers |
|---|---|
| Reference Cron Schedule | 20+ recurring jobs, quiet hours, dream cycle |
| Cron via Minions | Why scheduled work runs as Minion jobs, not agentTurn. Auto-applied by v0.11.0 migration for built-in handlers; host-specific handlers use the plugin contract below. |
| Plugin Handlers | Registering host-specific Minion handlers via code (no data-file exec surface). |
| Minions fix | Repairing a half-migrated v0.11.0 install. |
| Shell jobs (v0.14.0+) | Move deterministic crons (API fetch, token refresh, scrape+write) off the LLM gateway. Zero tokens per fire, ~60% gateway headroom. Follow skills/migrations/v0.14.0.md for the adoption playbook. |
| Quiet Hours & Timezone | Hold notifications during sleep, timezone-aware delivery |
| Executive Assistant Pattern | Email triage, meeting prep, scheduling |
| Operational Disciplines | Signal detection, brain-first, sync-after-write, heartbeat, dream cycle |
| Skill Development Cycle | 5-step cycle: concept, prototype, evaluate, codify, cron |
Subagent routing (v0.11.0+): agents that dispatch background work should route through
skills/conventions/subagent-routing.md — it reads ~/.gbrain/preferences.json#minion_mode
and branches between native subagents and Minion jobs. The v0.11.0 migration auto-injects
a marker into AGENTS.md pointing at this convention.
Cron routing (v0.11.0+): scheduled work goes through Minions, not OpenClaw's agentTurn.
See skills/conventions/cron-via-minions.md for the rewrite pattern. The v0.11.0 migration
auto-rewrites entries whose handler is a gbrain builtin; host-specific handlers (e.g.
ea-inbox-sweep) need a code-level registration per docs/guides/plugin-handlers.md.
Architecture
How to structure your system.
| Guide | What It Covers |
|---|---|
| Two-Repo Architecture | Agent repo vs brain repo, boundary rules, decision tree |
| Sub-Agent Model Routing | Which model for which task, signal detector pattern, cost optimization |
| The Three Search Modes | Keyword, hybrid, direct. When to use each |
| Brain vs Agent Memory | 3 layers: GBrain (world knowledge), agent memory, session |
Integrations
Wiring up your life.
| Guide | What It Covers |
|---|---|
| Credential Gateway | ClawVisor / Hermes for Gmail, Calendar, Contacts |
| Meeting & Call Webhooks | Circleback transcripts + Quo/OpenPhone SMS/calls |
| Voice-to-Brain | Phone calls + WebRTC browser calls create brain pages. 25 production patterns: identity separation, bid system, conversation timing, proactive advisor, prompt compression, caller routing, dynamic VAD, real-time logging, belt-and-suspenders post-call |
| Email-to-Brain | Gmail messages flow into entity pages via deterministic collector |
| X-to-Brain | Twitter monitoring with deletion detection + engagement velocity |
| Calendar-to-Brain | Google Calendar events become searchable daily brain pages |
| Meeting Sync | Circleback transcripts auto-import with attendee propagation |
Administration
Keeping it running and up to date.
| Guide | What It Covers |
|---|---|
| Upgrades & Auto-Update | check-update, agent notifications, migration files |
| Live Sync | Keep the index current: cron, --watch, webhook approaches |
Getting Started
After setup, the brain is empty. The cold-start skill sequences the highest-leverage data sources to populate it:
| Guide | What It Covers |
|---|---|
| Cold Start | Day-one bootstrapping: contacts, calendar, email, conversations, social, archives. Uses ClawVisor for safe credential handling — agents never hold raw API keys. |
| Ask User | Choice-gate pattern for human input at decision points. Used by cold-start and other skills. |
Appendix: GBrain CLI Quick Reference
| Command | Purpose |
|---|---|
gbrain search "term" |
Keyword search across all brain pages |
gbrain query "question" |
Hybrid search (vector + keyword + RRF) |
gbrain get <slug> |
Read a specific brain page by slug |
gbrain sync |
Sync local markdown repo to gbrain index |
gbrain import <path> |
Import files into the brain |
gbrain embed --stale |
Re-embed pages with stale or missing embeddings |
gbrain integrations |
Manage integration recipes (senses + reflexes) |
gbrain stats |
Show brain statistics (page count, last sync, etc.) |
gbrain doctor |
Diagnose brain health issues |
gbrain check-update |
Check for new versions and integration recipes |
Run gbrain --help for the full command reference.
Architecture & Philosophy
- Infrastructure Layer — Import pipeline, chunking, embedding, search
- Thin Harness, Fat Skills — Architecture philosophy
- Markdown Skills as Recipes — Why markdown is code and your agent is a package manager
- Homebrew for Personal AI — The 10-star vision
- Recommended Schema — Directory structure for your brain repo
- Verification Runbook — End-to-end installation verification