wayneblacktea

module
v0.0.0-...-a33e22d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT

README

wayneblacktea

English  ·  繁體中文

MIT License

A personal-OS MCP server for AI agents — your goals, decisions, knowledge, and learning live in one shared brain so the AI you work with already knows your context instead of asking you to re-explain it every conversation.


Install

go install github.com/Wayne997035/wayneblacktea/cmd/wbt@latest
wbt setup

That's it. wbt setup does end-to-end: creates the SQLite store, reclaims the TCP port if something's squatting on it, spawns wayneblacktea-server in the background (PID file under $XDG_STATE_HOME/wayneblacktea/), waits for /health, and registers the HTTP MCP transport with Claude Code:

$ wbt setup
==> Reading or creating config…          [ok] Config ready
==> Ensuring SQLite directory…           [ok] SQLite directory ready
==> Resolving port…                      [ok] Port resolved: 8080
==> Checking for an existing healthy server…
==> Reclaiming TCP port if occupied…     [ok] Port is free
==> Spawning wayneblacktea-server in the background…
                                         [ok] Server spawned (pid 12345, logs ~/.local/state/wayneblacktea/server.log)
==> Waiting for /health…                 [ok] Server is healthy
==> Registering MCP with Claude Code…    [ok] claude mcp add wayneblacktea --transport http http://127.0.0.1:8080/mcp
All set. wayneblacktea is running at http://127.0.0.1:8080

Open Claude Code anywhere and verify:

> get_today_context

Sister commands:

Command What it does
wbt status [--format json|plain] Report whether the background server is running and healthy
wbt stop Terminate the background server (idempotent)
wbt restart stop then setup
wbt setup --port 9090 Use a non-default port
wbt setup --no-mcp Skip the claude mcp add step
wbt init Deprecated alias for wbt setup

Install channels

Channel Command Best for
Homebrew brew install --cask Wayne997035/tap/wayneblacktea-cli && wbt setup macOS users who want wbt on PATH with auto-upgrades
DXT Download wayneblacktea.dxt from a release and open it in Claude Desktop (requires wbt already on PATH) Claude Desktop one-click install
curl | bash curl -fsSL https://raw.githubusercontent.com/Wayne997035/wayneblacktea/master/scripts/install.sh | bash cosign-verified binaries without Homebrew or Go
go install go install github.com/Wayne997035/wayneblacktea/cmd/wbt@latest && wbt setup Go developers building from source

See docs/install.md for Postgres, Docker, Railway, pre-built release binary options, and Troubleshooting.

Full tool reference: docs/mcp-tools.md.

Architecture

flowchart TD
    CC["Claude Code\n(wbt mcp — stdio)"]
    CURL["HTTP clients\n(dashboard / curl)"]
    HTTPMCP["HTTP MCP transport\n(/mcp)"]

    CC   -->|MCP stdio|       SRV
    CURL -->|REST /api/star|  SRV
    HTTPMCP -->|MCP over HTTP| SRV

    SRV["wayneblacktea-server\n(Echo HTTP + mcp-go)"]

    SRV --> STORES["Store interfaces\ngtd · decision · knowledge · session\nproposal · vision · learning · workspace"]

    STORES --> SQLITE["SQLite\n(local dev, zero infra)"]
    STORES --> PG["Postgres + pgvector\n(Aiven / Railway)"]

    SRV --> AI["AI providers\nAnthropic · Gemini embeddings\nGroq (Discord bot)"]
    SRV --> SCHED["Scheduler\nSaturday reflection\nauto-consolidation · decay prune"]
    SRV --> DISCORD["Discord bot"]

One process serves MCP stdio, HTTP REST, and HTTP MCP — no separate components to run.

What you get

Once Claude Code is connected to wbt mcp, every MCP-capable agent reads and writes the same store:

Context What it tracks
GTD Goals → projects → tasks with importance, activity log
Decisions Architectural choices with rationale + alternatives, queryable by repo
Knowledge Articles, TILs, bookmarks, notes — full-text + pgvector semantic search; Markdown headings fan-out into searchable child nodes
Learning Spaced-repetition concept cards on an FSRS schedule, auto-proposed from new knowledge
Sessions Cross-session handoff notes — "what to continue next time"
Proposals Agent-originated entities awaiting your confirmation before they materialise
Vision Deferred ideas that aren't ready to be tasks yet — open → discussing → maturing → promoted → dismissed
Workspace Tracked Git repos with status, known issues, next planned step

Auto-memory (no nagging required)

The agent doesn't need to remember to save things. The server captures them automatically:

  • MCP middleware classifier — every significant tool call (complete_task, confirm_proposal, upsert_project_arch, update_project_status, resolve_handoff, sync_repo) is async-classified by Haiku; implicit decisions get auto-logged, follow-up tasks get auto-created. Rate-capped at 60/min, deduped, prompt-injection-bounded.
  • Stop hook (wbt-doctor) — when a Claude Code session ends, the transcript is compressed to a ≤500-char summary and stored as both session_handoffs.summary_text and a searchable knowledge_items row.
  • SessionStart hook (wbt-context) — the next session opens with the previous handoff, recent decisions, and due reviews already injected as context.
  • Saturday reflection cron — weekly batch reads 7 days of activity + decisions and proposes 3-5 retrospective knowledge entries (gated through pending_proposals for your confirmation).
  • Auto-consolidation — clusters of ≥5 same-actor activities in the last 30 days get merged into a single proposed knowledge entry.

Design

Structure beats prompts. Encode what you want the AI to remember as an explicit schema. No drift between agents, no "I think you mentioned…" — it's just data.

You stay in control. Agents propose, you confirm. The friction is the point — a system that decides for you eventually decides everything.

Make forgetting visible. The server tracks every tool call and surfaces forgotten work — stuck in_progress tasks, piled-up proposals, decisions logged without a session-start recall.

Workflow tools, not raw CRUD. The agent surface exposes verbs like "get today's context", "confirm this plan", "log this decision" — rules live in the tool layer, not scattered across each client's prompt.

vs similar tools

wayneblacktea claude-mem Hermes Agent Memory
Scope Full personal OS (GTD + decisions + knowledge + learning + vision) Conversation memory only Conversation + entity memory
Storage SQLite (local) or Postgres+pgvector (cloud) Managed cloud Managed cloud
Control Self-hosted, you own the data Third-party Third-party
Proposals gate Agent proposes → you confirm None None
Spaced repetition FSRS learning cards None None
Dashboard Web UI + Discord bot None None
Tradeoff More setup, more surface area Zero setup Zero setup

Verifying release binaries

Release binaries are signed with cosign keyless signing via GitHub OIDC. To verify a downloaded binary:

# Install cosign: https://docs.sigstore.dev/cosign/system_config/installation/

cosign verify-blob \
  --certificate-identity-regexp "https://github.com/Wayne997035/wayneblacktea/.github/workflows/release.yml@refs/tags/.*" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  --signature wayneblacktea_checksums.txt.sig \
  --certificate wayneblacktea_checksums.txt.pem \
  wayneblacktea_checksums.txt

The .sig and .pem files are attached to each GitHub Release alongside the binaries.

What this isn't

  • Not a team product. One person, many agents. No RBAC, no shared workspace, no Notion-clone collaboration.
  • Not a hosted service. Self-host on your own machine. Workspace scoping is for personal data isolation, not multi-tenancy.
  • Not a stable API. Solo project, irregular releases, breaking changes happen, dashboard rough edges remain.
  • Not a chatbot with memory. The schema is the memory. Conversation history is irrelevant.

Licensed under MIT. Architecture deep-dive in docs/architecture.md.

Directories

Path Synopsis
cmd
discordbot command
doctor command
wbt-doctor is a thin shim that exec's `wbt doctor <args...>`.
wbt-doctor is a thin shim that exec's `wbt doctor <args...>`.
seed command
server command
wbt command
wbt is the one-click installer CLI for wayneblacktea.
wbt is the one-click installer CLI for wayneblacktea.
wbt-context command
wbt-context is a thin shim that exec's `wbt context <args...>`.
wbt-context is a thin shim that exec's `wbt context <args...>`.
wbt-guard command
wbt-guard is the Claude Code PreToolUse global hook binary.
wbt-guard is the Claude Code PreToolUse global hook binary.
wbt-hook command
wbt-hook is a thin shim that exec's `wbt hook <args...>`.
wbt-hook is a thin shim that exec's `wbt hook <args...>`.
internal
ai
aicost
Package aicost records Anthropic API token usage and computed USD cost.
Package aicost records Anthropic API token usage and computed USD cost.
arch
Package arch manages architecture snapshots for projects.
Package arch manages architecture snapshots for projects.
atom
Package atom implements the MemoryAtom domain: atomic fact units extracted from decisions, knowledge items, and procedural memories.
Package atom implements the MemoryAtom domain: atomic fact units extracted from decisions, knowledge items, and procedural memories.
auth
Package auth provides the compile-time capability token for authenticated requests.
Package auth provides the compile-time capability token for authenticated requests.
behaviorrule
Package behaviorrule implements the BehaviorRule domain: persisted AI-derived or manually-authored rules that guide agent behavior.
Package behaviorrule implements the BehaviorRule domain: persisted AI-derived or manually-authored rules that guide agent behavior.
cli
SessionStart hook logic for `wbt context session-start` (formerly the standalone wbt-context binary).
SessionStart hook logic for `wbt context session-start` (formerly the standalone wbt-context binary).
completioncandidate
Package completioncandidate implements detection rules that surface GTD tasks that appear done but whose status is still pending or in_progress.
Package completioncandidate implements detection rules that surface GTD tasks that appear done but whose status is still pending or in_progress.
db
Package db contains sqlc-generated query and model types for PostgreSQL.
Package db contains sqlc-generated query and model types for PostgreSQL.
decay
Package decay implements the Ebbinghaus forgetting curve strength formula used by the SQLite backend (which cannot run SQL math via EXTRACT EPOCH).
Package decay implements the Ebbinghaus forgetting curve strength formula used by the SQLite backend (which cannot run SQL math via EXTRACT EPOCH).
discipline
Package discipline implements the meta-rule drift-detection store: every successful mutating MCP tool call is recorded as a discipline_events row, and the system_health tool surfaces "drift signals" (mutating events that happened without a recent log_decision / confirm_plan in the same session).
Package discipline implements the meta-rule drift-detection store: every successful mutating MCP tool call is recorded as a discipline_events row, and the system_health tool surfaces "drift signals" (mutating events that happened without a recent log_decision / confirm_plan in the same session).
gtd
Package gtd fuzzy_reconcile.go implements the Phase 2 fuzzy matcher used by reconcile_merged_prs (sprint feature/0519-gtd-reconcile-phase2, GTD-fix 10/12) for legacy backlog tasks whose branch_name / pr_url linkage is NULL — i.e.
Package gtd fuzzy_reconcile.go implements the Phase 2 fuzzy matcher used by reconcile_merged_prs (sprint feature/0519-gtd-reconcile-phase2, GTD-fix 10/12) for legacy backlog tasks whose branch_name / pr_url linkage is NULL — i.e.
guard
Package guard implements the wbt-guard PreToolUse hook for observing and classifying Claude Code tool invocations.
Package guard implements the wbt-guard PreToolUse hook for observing and classifying Claude Code tool invocations.
handler
Package handler — reconcile_handler.go exposes POST /api/tasks/reconcile-merged-prs.
Package handler — reconcile_handler.go exposes POST /api/tasks/reconcile-merged-prs.
httpguard
Package httpguard provides SSRF-protection helpers for outbound HTTP clients that accept user-configured base URLs (e.g.
Package httpguard provides SSRF-protection helpers for outbound HTTP clients that accept user-configured base URLs (e.g.
lifecycle
Package lifecycle provides process supervision primitives for the wbt CLI: spawn a server process in the background, write a PID file, query status, and stop it cleanly.
Package lifecycle provides process supervision primitives for the wbt CLI: spawn a server process in the background, write a PID file, query status, and stop it cleanly.
llm
Package llm provides a provider-neutral abstraction for JSON text-generation LLM tasks (e.g.
Package llm provides a provider-neutral abstraction for JSON text-generation LLM tasks (e.g.
mcp
Package mcp — tools_reconcile.go exposes the reconcile_merged_prs MCP tool.
Package mcp — tools_reconcile.go exposes the reconcile_merged_prs MCP tool.
mcprunner
Package mcprunner is the shared MCP stdio transport entry point invoked by `cmd/wbt mcp` (wired into .mcp.json by `wbt init`).
Package mcprunner is the shared MCP stdio transport entry point invoked by `cmd/wbt mcp` (wired into .mcp.json by `wbt init`).
mergedprs
Package mergedprs persists observed merged PRs so a daily fuzzy-match detector can correlate them against legacy backlog tasks whose branch_name / pr_url linkage is null.
Package mergedprs persists observed merged PRs so a daily fuzzy-match detector can correlate them against legacy backlog tasks whose branch_name / pr_url linkage is null.
outcome
Package outcome implements the Outcome + Evaluation bounded context.
Package outcome implements the Outcome + Evaluation bounded context.
playbook
Package playbook implements the Playbook domain: generalised procedural rules derived from recurring decisions ("if I see X situation, do Y action").
Package playbook implements the Playbook domain: generalised procedural rules derived from recurring decisions ("if I see X situation, do Y action").
procedural
Package procedural implements the ProceduralMemory domain: first-class storage for "how-to" knowledge derived from past experience.
Package procedural implements the ProceduralMemory domain: first-class storage for "how-to" knowledge derived from past experience.
proposal
Package proposal manages pending agent-originated entities awaiting user confirmation before they become real (goals, projects, tasks, concepts).
Package proposal manages pending agent-originated entities awaiting user confirmation before they become real (goals, projects, tasks, concepts).
redact
Package redact provides credential-pattern scrubbing for strings shipped to upstream LLM providers, log sinks, or persisted fields.
Package redact provides credential-pattern scrubbing for strings shipped to upstream LLM providers, log sinks, or persisted fields.
reflection
Package reflection implements the Reflection domain: persisted AI-generated reflection records for daily reviews, weekly summaries, and entity-specific analysis (task, decision, proposal, knowledge, system).
Package reflection implements the Reflection domain: persisted AI-generated reflection records for daily reviews, weekly summaries, and entity-specific analysis (task, decision, proposal, knowledge, system).
runtime
Package runtime exposes process-wide configuration read at startup time: most importantly the optional workspace context that scopes every domain Store.
Package runtime exposes process-wide configuration read at startup time: most importantly the optional workspace context that scopes every domain Store.
shim
Package shim provides the shared wbt-subcommand shim implementation used by the legacy hook binaries (wbt-context, wbt-hook, wbt-doctor) so that existing ~/.claude/settings.json absolute-path entries keep working after Phase 2.3 collapsed the hook logic into `wbt` subcommands.
Package shim provides the shared wbt-subcommand shim implementation used by the legacy hook binaries (wbt-context, wbt-hook, wbt-doctor) so that existing ~/.claude/settings.json absolute-path entries keep working after Phase 2.3 collapsed the hook logic into `wbt` subcommands.
skill
Package skill provides the Skill Library domain — reusable Claude Code skill definitions extracted from successful sessions.
Package skill provides the Skill Library domain — reusable Claude Code skill definitions extracted from successful sessions.
snapshot
Package snapshot manages project status snapshots — Haiku-generated structured summaries of a project's current state (sprint progress, gap analysis, pending work).
Package snapshot manages project status snapshots — Haiku-generated structured summaries of a project's current state (sprint progress, gap analysis, pending work).
storage
Package storage's ServerStores bundle is the backend-agnostic surface used by the HTTP server (cmd/server) and the MCP server (cmd/mcp) to obtain a working set of domain stores without compile-time coupling to a specific backend (Postgres pgxpool vs.
Package storage's ServerStores bundle is the backend-agnostic surface used by the HTTP server (cmd/server) and the MCP server (cmd/mcp) to obtain a working set of domain stores without compile-time coupling to a specific backend (Postgres pgxpool vs.
storage/sqlite
Package sqlite is the SQLite-backed implementation of the wayneblacktea storage interfaces, intended for friend-grade self-hosting (one binary + one .db file, no Postgres server).
Package sqlite is the SQLite-backed implementation of the wayneblacktea storage interfaces, intended for friend-grade self-hosting (one binary + one .db file, no Postgres server).
timeline
Package timeline aggregates events from multiple domain stores into a unified chronological feed for the Personal OS calendar feature.
Package timeline aggregates events from multiple domain stores into a unified chronological feed for the Personal OS calendar feature.
validator
Package validator provides input quality checks for GTD entries and related user-facing fields.
Package validator provides input quality checks for GTD entries and related user-facing fields.
vision
Package vision implements the Vision domain: first-class storage for "future ideas that can't be acted on now".
Package vision implements the Vision domain: first-class storage for "future ideas that can't be acted on now".
watchdog
Package watchdog records recent MCP tool invocations in process memory and surfaces lightweight system-health signals (stuck tasks, pending review queue depth, last N tool calls).
Package watchdog records recent MCP tool invocations in process memory and surfaces lightweight system-health signals (stuck tasks, pending review queue depth, last N tool calls).
worksession
Package worksession implements the work_session first-class data model introduced in P0a-α Session Core.
Package worksession implements the work_session first-class data model introduced in P0a-α Session Core.
Package migrationfs exposes the embedded SQL migration files so that golang-migrate can apply them at runtime without needing the files present on the filesystem.
Package migrationfs exposes the embedded SQL migration files so that golang-migrate can apply them at runtime without needing the files present on the filesystem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL