docs: introduce memory-keeper agent and add .claude/memory.md for project knowledge tracking

- Added `.claude/memory.md` to serve as a centralized quick reference for project fixes, gotchas, rules, and workflows.
- Documented `memory-keeper` agent's purpose and guidelines in `.claude/agents/memory-keeper.md`.
- Ensured concise formatting and strict update rules for maintaining institutional knowledge.
This commit is contained in:
cyrus@tinyhumans.ai
2026-03-31 16:19:36 +05:30
parent 588b6d04e4
commit 1c3fd9b474
2 changed files with 84 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
---
name: memory-keeper
description: Updates .claude/memory.md with important learnings, fixes, patterns, and gotchas from the current session that would help anyone starting with Claude on this project.
model: sonnet
color: purple
---
# Memory Keeper
## Purpose
Scan the current conversation context and update `.claude/memory.md` with anything important that was learned, fixed, discovered, or decided during this session. This file serves as institutional knowledge for anyone starting with Claude on this project.
## What to capture
- **Fixes and workarounds** — what broke and how it was fixed (e.g. CORS errors, service gate issues)
- **Gotchas** — non-obvious things that tripped us up (e.g. socket not connected at startup)
- **Strict instructions** — rules or patterns the user emphasized
- **Architecture decisions** — why something was done a certain way
- **Environment setup** — things needed to get the project running
- **Commands that matter** — non-obvious commands or flags
## What NOT to capture
- Obvious things derivable from `CLAUDE.md` or code
- Temporary debugging steps
- Personal info about the user
- Anything already documented elsewhere
## How to update
1. Read the current `.claude/memory.md` file
2. Review the conversation context for new learnings
3. Add new entries under the appropriate section
4. Keep entries short — one line per item, max two lines for complex ones
5. Use `##` headers to group by topic
6. Do not duplicate existing entries
7. Remove entries that are no longer true
## Format
```markdown
## Section Name
- **Short title** — Brief explanation of what was learned and why it matters
```
## Rules
- Keep the file under 100 lines total
- Be concise — this is a quick reference, not documentation
- Every entry should answer: "What would I wish I knew before starting?"
- Update in place — edit existing entries if they've changed, don't append duplicates
+31
View File
@@ -0,0 +1,31 @@
# Project Memory
Quick reference for anyone starting with Claude on this project. Updated by the `memory-keeper` agent.
## Fixes & Gotchas
- **ServiceBlockingGate CORS errors** — The gate calls `openhumanServiceStatus()` and `openhumanAgentServerStatus()` at startup. These used `callCoreRpc()` which falls back to raw `fetch()` when socket isn't connected yet, causing CORS errors. Fix: route through `invoke('core_rpc_relay')` instead (Tauri IPC, no CORS).
- **Socket not connected at startup** — `SocketProvider` only connects when a Redux `auth.token` is set. At fresh launch (no token), socket is null, so any `callCoreRpc()` call falls back to `fetch()`. Always use `invoke('core_rpc_relay')` for local sidecar RPC calls.
- **`openhuman.agent_server_status` doesn't exist** — This RPC method is not registered in the core. The gate checks it but it always errors. The gate passes if either service is Running OR agent server is running OR core is reachable.
- **Cargo incremental builds can serve stale UI** — If the app shows old frontend after a Rust rebuild, run `cargo clean --manifest-path app/src-tauri/Cargo.toml` before rebuilding.
- **macOS deep links require .app bundle** — `yarn tauri dev` does NOT support deep links. Must use `yarn tauri build --debug --bundles app`.
## Strict Rules
- **No dynamic imports in `app/src/`** — Use static `import` at file top. Guard call sites with `try/catch` for Tauri/non-Tauri safety. See CLAUDE.md.
- **Service RPC calls must use Tauri IPC** — Never use `callCoreRpc()` for service operations. Use `invoke('core_rpc_relay', { request: { method, params } })`.
- **Always run checks before commit** — `yarn typecheck`, `yarn lint`, `yarn format:check`, `yarn build`. Husky hooks enforce this but run manually first.
- **Stage specific files** — Never `git add -A`. Always `git add <specific-files>`.
## Workflow
- **Agent order**: architectobot (plan) → user approval → codecrusher (implement) → architectobot (verify)
- **Always read CLAUDE.md first** before any issue work
- **Ask user when in doubt** — never assume scope or approach
- **PRs target upstream** — `tinyhumansai/openhuman` main branch, not fork
## Environment
- **Core sidecar port** — `7788` (default). Check with `lsof -i :7788`.
- **Stage sidecar** — `cd app && yarn core:stage` (required for core RPC).
- **Kill stuck processes** — `lsof -i :7788` then `kill <PID>`.