tradeit.gg internal · engineering onboarding

MemoryVault — Team Onboarding

Get tradeit.gg's shared org knowledge into your Claude — auto-refreshed daily, read-only.

This is a one-way, read-only feed: the scope: org/both slice of Ehud's MemoryVault — repo synthesis, infra patterns, MySQL/Redis hard rules, deploy conventions, domain vocabulary — published daily to a private repo and delivered to your machine and a hosted MCP. You consume it; you don't edit it (your edits would be overwritten on the next pull).

There are four ways to use it — from zero-setup to advanced. Pick one below.

 Your OS
Switches the setup commands below. Showing macOS (Homebrew · launchd).Showing Windows (winget · Git Bash · Task Scheduler).

What you're getting

An LLM-readable wiki of tradeit.gg org knowledge, kept current for you

Every page carries frontmatter (confidence, scope, last_verified), wikilinks cross-reference related pages, and MEMORY.md is the always-load entrypoint. Personal preferences and per-tool quirks are stripped before publishing — you only get the org-scoped synthesis.

It refreshes itself: a publisher pushes the latest content daily at 09:00, your machine pulls it at 09:30, and the hosted MCP re-indexes within 15 min of any push. Nothing for you to maintain.


Choose your path

Four ways to use it, easiest → advanced. Pick one below to see its setup.

 Pick a path above to see its setup steps.

Path A — Ask via the hosted connector (easiest)

Zero local setup — query the vault from Claude.ai (browser)

Add one connector to your Claude.ai profile and ask questions against the org vault. It's always the latest published version (re-indexed within ~15 min of any update), and there's nothing to install or maintain. Tools exposed: get_memory / search_vault / get_page / list_pages.

Prereq: a Claude.ai account signed in with a Google identity on an allowlisted domain (@zengaming.com or @tradeit.gg). That's it.

  1. Open https://claude.ai/settings/connectors
  2. Click Add custom MCP
  3. URL: https://memoryvault-mcp.tradeit.gg/mcp  ·  leave OAuth Client ID/Secret blank (dynamic registration)
  4. Click Connect → complete Google SSO with your @zengaming.com / @tradeit.gg account

Test it in a new Claude.ai conversation:

Use the memoryvault tool to search for "pricing domain" and summarize the top result.

Claude should call search_vault and answer from the org vault.

 "That account does not have access" → your Google domain isn't allowlisted; ping the maintainer. Already fixed but still denied? Cloudflare Access caches the session — open https://tradeitgg.cloudflareaccess.com/cdn-cgi/access/logout and retry.

 Want it inside Claude Code, faster, and working without a per-query round-trip? → Local team vault (next tab).

Path B — Local team vault (developers)

A local copy + a hook that feeds Claude Code every session

Clone the vault to your machine. A SessionStart hook injects MEMORY.md into every Claude Code session — so the org context is already in-context with no per-query network call (faster than the connector), and it auto-pulls the latest daily.

Prereq What you need

ToolWhy
macOS 14+The daily-pull job uses launchd
Claude Code (latest)Fires the SessionStart hook that injects MEMORY.md
gitClone + daily fast-forward pull
gh (authed to zengamingx)Clones the private repo with your existing auth
jqinstall.sh merges the hook into settings.json safely
bash
brew install git jq gh && brew install --cask claude-code
gh auth status   # must show you're logged in to zengamingx; else: gh auth login
ToolWhy
Windows 10 (1809+) / 11The daily-pull job uses Task Scheduler (schtasks)
Git for WindowsSupplies bash so Claude Code runs the hook script (and the git CLI). Without it Claude Code falls back to PowerShell and the bash hook won't run.
Claude Code (latest)Fires the SessionStart hook that injects MEMORY.md
gh (authed to zengamingx)Clones the private repo with your existing auth
jqinstall.sh --only-hook merges the hook into settings.json safely

Install everything with winget (built into Windows 10/11). Run in PowerShell:

powershell · winget
winget install --id Git.Git -e          # Git for Windows = git + Git Bash
winget install --id GitHub.cli -e       # gh
winget install --id jqlang.jq -e        # jq
winget install --id Anthropic.ClaudeCode -e
# open a NEW terminal so PATH refreshes, then:
gh auth status   # must show you're logged in to zengamingx; else: gh auth login

 Open a fresh terminal after the installs so the updated PATH resolves. Sanity-check: git, gh, jq --version, bash --version, and claude --version should all work.

Step 1 Install

One command clones the repo, installs the daily auto-pull, and wires the SessionStart hook:

bash
gh repo clone zengamingx/memoryvault-org ~/MemoryVault-team \
  && bash ~/MemoryVault-team/install.sh

It clones to ~/MemoryVault-team, installs a launchd job that pulls daily at 09:30, and merges a SessionStart hook into ~/.claude/settings.json (backup + diff prompt; appends, never clobbers).

On Windows the installer's scheduling step is macOS-only (launchd), so it's three short steps: clone, wire the hook with --only-hook, then register a daily-pull task.

1. Clone — in Git Bash (so ~ resolves to your profile):

git bash
gh repo clone zengamingx/memoryvault-org ~/MemoryVault-team

2. Wire the SessionStart hook — in Git Bash (needs bash + jq). --only-hook skips the macOS-only launchd step and just merges the hook into %USERPROFILE%\.claude\settings.json (backup + diff prompt; appends, never clobbers):

git bash
bash ~/MemoryVault-team/install.sh --only-hook

3. Register the daily pull — Task Scheduler replaces launchd. Run in CMD (not PowerShell — the %VARS% and ^ are cmd syntax). Pulls every day at 09:30 and logs to %USERPROFILE%\.memoryvault\pull.log:

cmd · schtasks
mkdir "%USERPROFILE%\.memoryvault" 2>nul
schtasks /create /tn "MemoryVault Team Pull" /sc daily /st 09:30 /f ^
  /tr "cmd /c git -C \"%USERPROFILE%\MemoryVault-team\" pull --ff-only origin main >> \"%USERPROFILE%\.memoryvault\pull.log\" 2>&1"

 The hook works because Git for Windows makes Claude Code use Bash as its shell tool — the installed hook (cat ~/MemoryVault-team/MEMORY.md) runs in bash. No Git for Windows → Claude Code falls back to PowerShell and the bash hook won't fire.

 Why not a curl … | bash one-liner? The repo is private, so raw.githubusercontent.com 404s without auth. The gh repo clone bootstrap uses your existing gh/SSH creds. install.sh is idempotent. Remove everything with ~/MemoryVault-team/uninstall.sh.To remove on Windows: schtasks /delete /tn "MemoryVault Team Pull" /f, drop the SessionStart entry from %USERPROFILE%\.claude\settings.json, and delete the %USERPROFILE%\MemoryVault-team folder.

Step 2 Teach your Claude — reader contract (read-only)

Load-bearing

Without this, the hook still injects MEMORY.md, but Claude has no rules for using it — and no signal that ~/MemoryVault-team is read-only (overwritten daily), so it must never write there.

Append to your ~/.claude/CLAUDE.md (create the file if needed):

 Before pasting, replace every <your-repos-dir> below with the directory where you clone tradeit repos — e.g. ~/Projects, ~/work, or ~/dev.

markdown · paste into ~/.claude/CLAUDE.md
# Team MemoryVault — Reader Contract (read-only)

You have a read-only, auto-refreshed copy of tradeit.gg org knowledge at
`$HOME/MemoryVault-team`. The SessionStart hook injects `MEMORY.md` every session.
It is the source of truth for org-level synthesis — repo overviews, infra
patterns, MySQL/Redis hard rules, deploy conventions, domain vocabulary.

## This vault is READ-ONLY
`~/MemoryVault-team` is overwritten by a daily `git pull`. NEVER write, edit, or
commit files there — changes are lost on the next pull. If you learn something
durable about tradeit.gg, tell the user to relay it to the vault maintainer so
it gets published to everyone.

## Read order
1. `MEMORY.md` — already in context; orientation + high-signal entry pages.
2. `index.md` — full catalog, when MEMORY.md doesn't cover the topic.
3. Specific `wiki/**/*.md` pages — via wikilinks `[[slug]]`.

## Frontmatter is authoritative
`confidence < 0.6` → speculative, verify. `last_verified` > 90 days → stale, say
so. `superseded_by: ` → read the successor, not this page.

## Repo-fact routing (LOAD-BEARING)
_Replace `<your-repos-dir>` with wherever you clone tradeit repos (e.g. `~/Projects`)._
- How to work IN repo X (build/test/in-repo conventions) → `<your-repos-dir>/X/CLAUDE.md` ONLY.
- What X IS / how it fits / cross-repo synthesis → `wiki/entities/repo-X.md`.
- Cross-repo conventions (MySQL, git, infra) → `wiki/concepts/*.md`.
- On conflict, the per-repo `CLAUDE.md` wins (closer to the code); flag the vault page as stale.

## Never echo secrets
If you ever see an inline credential/token in a page, flag it — don't repeat it.

Step 3 Verify

 Vault present & auto-pulling

ls ~/MemoryVault-team/wiki/entities | head
launchctl list | grep memoryvault
tail ~/Library/Logs/memoryvault-team-pull.log

Expected: entity pages listed; a com.tradeit.memoryvault.pull job loaded; pull log shows "Already up to date" or "Updating …".

cmd
dir "%USERPROFILE%\MemoryVault-team\wiki\entities"
schtasks /query /tn "MemoryVault Team Pull"
type "%USERPROFILE%\.memoryvault\pull.log"

Expected: entity pages listed; the MemoryVault Team Pull task shown as Ready; pull log shows "Already up to date" or "Updating …". Force a run now: schtasks /run /tn "MemoryVault Team Pull".

 Hook fired

Fresh session (cd ~/Projects/anything && claude), ask: "Without reading any files, quote the first line of MEMORY.md." A correct quote without tool use means the injection works.

Day-to-day

SituationWhat happens
"What does the pricing-manager do?" Claude reads wiki/entities/repo-pricing-manager.md first, then the per-repo CLAUDE.md if needed
New content lands upstream Auto-pulls daily at 09:30. Force now: launchctl kickstart gui/$UID/com.tradeit.memoryvault.pullschtasks /run /tn "MemoryVault Team Pull"
You learn a durable org fact Read-only vault — tell Ehud so it's published to everyone (don't edit ~/MemoryVault-team)

 You can also add the browser connector (Path A) for Claude.ai access — the two coexist.

Path C — Personal vault (optional)

 Builds on Path B. Keep the read-only team feed and add your own writable vault at $HOME/MemoryVault for your personal preferences, working style, and notes — layered alongside. It needs Node and (for browsing) Obsidian.

1. Bootstrap your personal vault

bash
export VAULT_DIR="$HOME/MemoryVault"
mkdir -p "$VAULT_DIR"/{wiki/entities,wiki/concepts,wiki/sources,wiki/topics,raw,scripts,archive/inbox,.inbox,.export,assets}
cd "$VAULT_DIR" && git init -q && echo ".export/" > .gitignore

# Copy the hook + lint scripts + schema spec from the skeleton (ask Ehud):
SRC="/path/to/memoryvault-skeleton"
cp "$SRC/scripts/"{session-start-hook.sh,session-stop-hook.sh,export-org.sh,lint.sh,lint-repo-entities.sh} "$VAULT_DIR/scripts/"
cp "$SRC/CLAUDE.md" "$VAULT_DIR/"
chmod +x "$VAULT_DIR/scripts/"*.sh

Prereqs for this path: brew install node and brew install --cask obsidian.winget install --id OpenJS.NodeJS -e and winget install --id Obsidian.Obsidian -e. Run the bootstrap block above in Git Bash (the mkdir -p brace-expansion and $HOME are bash).

2. Wire the personal hooks

Append to ~/.claude/settings.json (alongside the team hook from Path B — both run):

json
{
  "hooks": {
    "SessionStart": [
      { "hooks": [ { "type": "command", "command": "bash $HOME/MemoryVault/scripts/session-start-hook.sh" } ] }
    ],
    "Stop": [
      { "hooks": [ { "type": "command", "command": "bash $HOME/MemoryVault/scripts/session-stop-hook.sh" } ] }
    ]
  }
}

3. Obsidian + personal reader contract

Open $HOME/MemoryVault as an Obsidian vault (enable [[Wikilinks]] + the Dataview plugin). For a personal vault Claude SHOULD write back, so use a write-back reader contract (it creates/updates pages under $HOME/MemoryVault/wiki/, updates index.md/log.md, surfaces .inbox/, suggests /memoryvault-revise at session end). Ask Ehud for the full personal-vault reader-contract block — it's the same one his master vault uses.

Path D — Use the vault as Claude's memory (advanced)

 Builds on Path C. Replace Claude Code's built-in per-project memory (~/.claude/projects/<project>/memory/) with your personal vault — one structured, versioned, Obsidian-browsable memory across every project. (This is how Ehud's own setup works.)

"But the vault is read-only — how does this work?"

Two separate directories — only one is read-only:

  • ~/MemoryVault-team (Path B) — the read-only team feed. Pulled daily, never written. Memory never goes here.
  • $HOME/MemoryVault (Path C) — your writable personal vault. Memory goes here. It's your own git repo: nothing overwrites it (no daily pull), and the Stop hook commits each write.

So "read-only" only ever applied to the team feed; your memory lives in the personal vault, which is fully writable. Updates: the team feed and your personal vault update independently and never collide — different folders, different lifecycles.

1. Archive the existing default memory (avoid split-brain)

Move the current per-project memory aside so Claude doesn't read two stores. Nothing is deleted:

bash
for d in ~/.claude/projects/*/memory; do
  [ -d "$d" ] && mv "$d" "$d.archived-$(date +%F)" && echo "archived $d"
done

 Run this in Git Bash — it's a bash loop. Your profile path is the same one Git Bash shows as ~ (i.e. %USERPROFILE%).

2. Add the memory-routing block to ~/.claude/CLAUDE.md

markdown · paste into ~/.claude/CLAUDE.md
# Memory routing — personal vault supersedes default memory

My durable memory lives in my personal MemoryVault at `$HOME/MemoryVault`, NOT in
Claude Code's default `~/.claude/projects//memory/` files (archived).
(The read-only team vault at `~/MemoryVault-team` is a separate feed — never write there.)

- READ: the personal vault's `MEMORY.md` (injected by its SessionStart hook) is the entrypoint.
- WRITE: durable facts about me/my work → a page under
  `$HOME/MemoryVault/wiki/{entities,concepts,sources,topics}/` with frontmatter
  (scope, confidence, last_verified); update `index.md`, append `log.md`. The Stop
  hook auto-commits it.
- DO NOT write durable facts to `~/.claude/projects//memory/` — retired;
  files there won't load in other projects/sessions.
- Ephemeral, task-only notes can stay in the default project memory.
- Check for an existing page before creating a duplicate. Never save secrets.

Same routing Ehud's global CLAUDE.md uses — ask him for the fuller version (scope/category rules) if you want it.

3. Verify

Fresh session → ask Claude to remember something durable about you. It should propose a page under $HOME/MemoryVault/wiki/… (Stop hook commits it), not a write to ~/.claude/projects/…/memory/.