Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ TechEmpower's production fork of [MemPalace/mempalace](https://github.com/MemPal

- `~/Projects/mempalace.yaml` — **do not delete**. Mining config with wing/room definitions. Regenerate with `mempalace init ~/Projects --yes` if lost.
- `~/.mempalace/config.json` — topic wings and hall keywords, customized for JP's domains (infrastructure, development, tools, creative, projects, system).
- `~/.mempalace/palace/` ChromaDB vector store. The actual data.
- **Palace data lives in postgres on `disks.jphe.in`**, reached via palace-daemon at `http://disks.jphe.in:8085`. The local `~/.mempalace/palace/` ChromaDB store was retired on the 2026-05-14 pgvector cutover (renamed to `~/.mempalace/palace.retired-pre-pgcutover-2026-05-14/`); a `~/.mempalace/RETIRED` marker refuses default-palace opens so misconfigured tools can't silently fall back to the stale local store.
- `~/.mempalace/hook_state/` — stop hook session tracking.

## Development

```bash
source venv/bin/activate
python -m pytest tests/ -q # ~1096 tests (benchmarks deselected)
source .venv/bin/activate
python -m pytest tests/ -q # 2486 tests (benchmarks deselected)
mempalace status # check palace state
mempalace search "query" # test search
python -m mempalace.mcp_server # run MCP server standalone
Expand All @@ -83,7 +83,7 @@ Workflow for landing new fork-ahead changes lives in [Documentation maintenance]
Claude Code has two complementary memory layers, used in tandem:

- **Auto-memory** (`~/.claude/projects/*/memory/`) — lightweight preferences, context, feedback. Manual writes only. (Anthropic's "Auto Dream" research-preview shipped late April 2026 in Claude Code `/dream` + the Managed Agents Dreams API; MemPalace deliberately stays un-consolidated and the Dreams API design ratifies the verbatim-vs-derivative axis. See `~/.claude/projects/-home-jp-Projects-memorypalace/memory/project_auto_dream.md`.)
- **MemPalace** (`~/.mempalace/palace/`, ~183K drawers behind the daemon) — verbatim conversations, tool output, code. Write-only archive, searchable via MCP. Completeness is the feature. Wing/room layout follows the canonical 7-room taxonomy (see `palace-taxonomy` skill / `~/Projects/familiar.realm.watch/docs/superpowers/specs/2026-05-13-palace-room-taxonomy.md`).
- **MemPalace** (postgres + pgvector + AGE on `disks.jphe.in`, reached via palace-daemon at `http://disks.jphe.in:8085`, 300K+ drawers) — verbatim conversations, tool output, code. Write-only archive, searchable via MCP. Completeness is the feature. Wing/room layout follows the canonical 7-room taxonomy (see `palace-taxonomy` skill / `~/Projects/familiar.realm.watch/docs/superpowers/specs/2026-05-13-palace-room-taxonomy.md`).

Both systems coexist. Hook saves are scoped to MemPalace ("For THIS save, use MemPalace MCP tools only") — this is not a permanent ban on auto-memory.

Expand Down
112 changes: 58 additions & 54 deletions FORK_CHANGELOG.md

Large diffs are not rendered by default.

43 changes: 21 additions & 22 deletions README.md

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions docs/fork-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,8 @@ entries:
merges. Amends fork-ahead row 17.
tests: "1548/1548 (was 1546/1548 with 2 isolation failures in test_convo_miner)"
pr: 1024
pr_state: OPEN
pr_state: MERGED
merged_date: 2026-05-15
files:
- mempalace/config.py
supersedes: []
Expand Down Expand Up @@ -1763,12 +1764,16 @@ entries:
and ``os.path.getmtime()`` to file-level (2 syscalls per file instead
of 2N). Reported 10–30× mining speedup upstream. Fork-side resolution
preserved fork's existing ``DRAWER_UPSERT_BATCH_SIZE=1000``; aliased
upstream's ``CHROMA_BATCH_LIMIT`` to it. Becomes a no-op when #1085
merges to develop and we next sync.
upstream's ``CHROMA_BATCH_LIMIT`` to it. **2026-05-16:** #1085 was
closed by @midweste, superseded by merged upstream
[#1185](https://github.com/MemPalace/mempalace/pull/1185) (wider
scope: same batching + optional GPU acceleration). The fork-side
cherry-pick is now a no-op against develop; drop on next sync.
pr: 1085
pr_state: OPEN
pr_state: CLOSED
files:
- mempalace/miner.py
supersedes: []

- id: deploy-script
date: 2026-04-26
Expand Down Expand Up @@ -1885,6 +1890,7 @@ merged_upstream:
- "Trim entries from this list once they're more than ~30 days old."
- "See CHANGELOG.md (upstream) for the full released history."
entries:
- { pr: 1024, title: "Configurable chunk_size / chunk_overlap / min_chunk_size", merged: 2026-05-15 }
- { pr: 1173, title: "quarantine_stale_hnsw on make_client + cold-start gate + integrity sniff", merged: 2026-04-26 }
- { pr: 1177, title: "`.blob_seq_ids_migrated` marker guard (closes #1090)", merged: 2026-04-26 }
- { pr: 1198, title: "_tokenize None-document guard in BM25 reranker", merged: 2026-04-26 }
Expand Down
14 changes: 7 additions & 7 deletions scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ failures=0

# ── 1. test count ────────────────────────────────────────────────────────
step "1/4 test count in README"
readme_count=$(grep -oE '^[0-9]+ tests pass on `main`' README.md | grep -oE '^[0-9]+' || echo "")
readme_count=$(grep -oE '[0-9]+ tests pass on `main`' README.md | grep -oE '^[0-9]+' || echo "")
if [ -z "$readme_count" ]; then
warn "README has no '<N> tests pass on \`main\`' line — skipping"
warn "README has no '<N> tests pass on \`main\`' phrase — skipping"
else
# Prefer the repo venv's pytest so the check works without an
# activated environment. Falls back to whatever pytest is on PATH.
pytest_bin="$REPO_ROOT/venv/bin/pytest"
pytest_bin="$REPO_ROOT/.venv/bin/pytest"
[ -x "$pytest_bin" ] || pytest_bin="$(command -v pytest 2>/dev/null || true)"
if [ -z "$pytest_bin" ]; then
warn "no pytest available — skipping"
Expand Down Expand Up @@ -79,7 +79,7 @@ step "2/4 commit hashes referenced in docs resolve"
docs=(README.md CLAUDE.md FORK_CHANGELOG.md)
# Strip cross-repo URLs first so we only check hashes that should resolve
# in *this* fork. Pattern: anything inside (https://github.com/<other>/<repo>/commit/HASH)
# where <other>/<repo> is not jphein/mempalace.
# where <other>/<repo> is not techempower-org/mempalace.
# For each line, skip the line entirely if it mentions a sibling repo
# (palace-daemon / multipass-structural-memory-eval) — we can't tell which
# hashes on that line are fork-mempalace vs cross-repo without parsing
Expand All @@ -88,7 +88,7 @@ docs=(README.md CLAUDE.md FORK_CHANGELOG.md)
# adjacent to a sibling-repo mention) but no false positives.
mapfile -t hashes < <(
for d in "${docs[@]}"; do
grep -v -E 'palace-daemon|multipass-structural-memory-eval|/jphein/[a-z-]+/commit/' "$d" 2>/dev/null
grep -v -E 'palace-daemon|multipass-structural-memory-eval|/(jphein|techempower-org)/[a-z-]+/commit/' "$d" 2>/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The updated regex /(jphein|techempower-org)/[a-z-]+/commit/ is too broad because it matches the current repository (techempower-org/mempalace/commit/). This causes grep -v to skip lines in the changelog that contain links to this repo's own commits, meaning those hashes are never verified by the script. Additionally, [a-z-]+ misses repositories with numbers (e.g., engram-2) or uppercase letters (e.g., GraphPalace).

To fix this without using Perl-compatible regex (which isn't portable to all grep versions), you can use sed to mask the current repo's URLs before filtering out other commit links.

Suggested change
grep -v -E 'palace-daemon|multipass-structural-memory-eval|/(jphein|techempower-org)/[a-z-]+/commit/' "$d" 2>/dev/null
sed 's|/techempower-org/mempalace/commit/|/INTERNAL/|g' "$d" | grep -v -E 'palace-daemon|multipass-structural-memory-eval|/(jphein|techempower-org)/[A-Za-z0-9_-]+/commit/' 2>/dev/null

done | grep -hoE '`[0-9a-f]{7,40}`' | tr -d '`' | sort -u
)
unresolved=0
Expand All @@ -106,7 +106,7 @@ fi
step "3/4 FORK_CHANGELOG.md regenerates clean"
render_bin="$REPO_ROOT/scripts/render-docs.py"
if [ -x "$render_bin" ]; then
py="$REPO_ROOT/venv/bin/python"
py="$REPO_ROOT/.venv/bin/python"
[ -x "$py" ] || py="$(command -v python3 2>/dev/null || true)"
if [ -z "$py" ]; then
warn "no python interpreter — skipping render check"
Expand Down Expand Up @@ -201,7 +201,7 @@ fi

# Check 5 (fork-only YAML commits → CLAUDE.md row inventory) retired
# 2026-05-11: the CLAUDE.md row inventory it validated was removed in
# favor of a pointer block to FORK_CHANGELOG.md + jphein/mempalace
# favor of a pointer block to FORK_CHANGELOG.md + techempower-org/mempalace
# issues. Check 3 (FORK_CHANGELOG.md ↔ YAML) already guarantees the
# meaningful sync property — every fork-only YAML commit appears in the
# rendered FORK_CHANGELOG.md by construction, so a separate CLAUDE.md
Expand Down
4 changes: 2 additions & 2 deletions scripts/preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
set -e
cd "$(dirname "$0")/.."

if [ -x venv/bin/python ]; then
if [ -x .venv/bin/python ]; then
# shellcheck disable=SC1091
source venv/bin/activate
source .venv/bin/activate
fi

echo "→ ruff check ."
Expand Down
4 changes: 2 additions & 2 deletions scripts/render-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

CHANGELOG_PATH = REPO_ROOT / "FORK_CHANGELOG.md"
CHANGELOG_HEADER = """\
# Fork Changelog (jphein/mempalace)
# Fork Changelog (techempower-org/mempalace)

Fork-ahead changes that aren't yet in upstream `MemPalace/mempalace`.
Upstream's release history lives in [`CHANGELOG.md`](CHANGELOG.md);
Expand Down Expand Up @@ -74,7 +74,7 @@ def load_manifest(path: Path = YAML_PATH) -> dict:

def commit_link(sha: str) -> str:
"""Render a 7-char SHA as a markdown link to the fork commit."""
return f"[`{sha}`](https://github.com/jphein/mempalace/commit/{sha})"
return f"[`{sha}`](https://github.com/techempower-org/mempalace/commit/{sha})"


def render_entry(entry: dict[str, Any]) -> str:
Expand Down
Loading