docs: add VitePress documentation site#439
Conversation
72fb625 to
27aedba
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a VitePress-based documentation site for MemPalace, along with supporting infrastructure for publishing and a new benchmark test suite.
Changes:
- Add a full VitePress documentation site under
website/(Guide / Concepts / Reference pages, theme styling, icons, and build config). - Add GitHub Pages + Netlify build/deploy configuration for the docs site.
- Add a substantial
tests/benchmarks/suite plus CI workflow updates, and bump the package/plugin version to3.0.14.
Reviewed changes
Copilot reviewed 47 out of 56 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/deploy-docs.yml |
Builds and deploys website/ to GitHub Pages. |
.github/workflows/ci.yml |
Adjusts CI to ignore benchmarks in unit tests and adds a dedicated benchmark job. |
website/.vitepress/config.mts |
VitePress site config (nav/sidebar/search/base/head/edit links). |
website/.vitepress/theme/index.ts |
Theme entrypoint loading custom CSS. |
website/.vitepress/theme/style.css |
Custom theme palette, typography, and component styling. |
website/index.md |
Landing page content + feature cards + benchmark table. |
website/guide/*.md |
User guide pages for install, mining, searching, MCP integration, hooks, etc. |
website/concepts/*.md |
Concept pages (palace structure, stack, AAAK, KG, agents, contradiction detection). |
website/reference/*.md |
Reference docs for CLI, MCP tool schemas, Python API, module map, benchmarks, contributing. |
website/public/icons/*.svg |
Lucide-derived SVG icons used on the landing page feature cards. |
website/package.json |
Docs site dev/build scripts + VitePress/Mermaid dependencies. |
website/.gitignore |
Ignore rules for docs site build artifacts and dependencies. |
netlify.toml |
Netlify build configuration for the docs site. |
tests/benchmarks/* |
New benchmark framework (data generation, metrics reporting, performance tests). |
pyproject.toml |
Version bump + dev deps (psutil) + pytest markers/pythonpath. |
mempalace/version.py |
Version bump to 3.0.14. |
.claude-plugin/*, .codex-plugin/* |
Plugin metadata version bump to 3.0.14. |
docs/review.md, docs/ISSUES.md |
Adds audit/review material and an issue tracker snapshot. |
benchmarks/run_with_ollama.py |
Adds an Ollama embedding runner for LongMemEval benchmarking. |
.gitignore |
Ignore .claude/ and benchmark results JSONL files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dialect = Dialect() | ||
| compressed = dialect.compress("We decided to use GraphQL...") | ||
|
|
||
| # With entity mappings | ||
| dialect = Dialect(entities={"Alice": "ALC", "Bob": "BOB"}) | ||
| compressed = dialect.compress(text, metadata={"wing": "myapp"}) | ||
|
|
||
| # From config | ||
| dialect = Dialect.from_config("entities.json") | ||
|
|
||
| # Stats | ||
| stats = dialect.compression_stats(original, compressed) | ||
| ``` |
There was a problem hiding this comment.
In the AAAK Dialect example, text, original, and compressed are used without being defined (dialect.compress(text, ...) and compression_stats(original, compressed)). This makes the snippet non-runnable and confusing. Suggest defining these variables in the example (or reusing the earlier literal string) so the copy/paste path works.
27aedba to
ae0f592
Compare
ae0f592 to
c14e535
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 37 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ├── tests/ ← test suite | ||
| ├── assets/ ← logo + brand | ||
| └── pyproject.toml ← package config (v3.0.14) | ||
| ``` |
There was a problem hiding this comment.
The module tree says pyproject.toml is v3.0.14, but the repo's pyproject.toml currently has version 3.1.0. Please update this to avoid drifting version references in the docs.
| from mempalace.searcher import search_memories | ||
|
|
||
| results = search_memories( | ||
| query="why did we switch to GraphQL", | ||
| palace_path="~/.mempalace/palace", | ||
| wing="myapp", # optional filter | ||
| room="architecture", # optional filter | ||
| n_results=5, | ||
| ) |
There was a problem hiding this comment.
These Python examples pass paths containing ~ (e.g. palace_path="~/.mempalace/palace"). The library functions (e.g. search_memories) do not expand ~, so this literal string can fail unless callers expand it themselves. Prefer MempalaceConfig().palace_path or os.path.expanduser(...) in the docs.
| from mempalace.layers import MemoryStack | ||
|
|
||
| stack = MemoryStack( | ||
| palace_path="~/.mempalace/palace", # optional | ||
| identity_path="~/.mempalace/identity.txt", # optional | ||
| ) | ||
|
|
There was a problem hiding this comment.
Same issue here: MemoryStack(palace_path="~/.mempalace/palace", identity_path="~/.mempalace/identity.txt") will not expand ~ internally. Consider either omitting these args (letting defaults handle expansion) or showing os.path.expanduser / MempalaceConfig usage.
| from mempalace.knowledge_graph import KnowledgeGraph | ||
|
|
||
| kg = KnowledgeGraph(db_path="~/.mempalace/knowledge_graph.sqlite3") | ||
|
|
There was a problem hiding this comment.
KnowledgeGraph(db_path="~/.mempalace/knowledge_graph.sqlite3") passes an unexpanded ~ path; KnowledgeGraph does not expanduser on provided db_path. Either omit db_path (use default) or show os.path.expanduser(...) to prevent creating ./~/... relative paths.
| ### `mempalace_add_drawer` | ||
|
|
||
| File verbatim content into the palace. Checks for duplicates first. | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| |-----------|------|----------|-------------| | ||
| | `wing` | string | **Yes** | Wing (project name) | | ||
| | `room` | string | **Yes** | Room (aspect: backend, decisions, etc.) | | ||
| | `content` | string | **Yes** | Verbatim content to store | | ||
| | `source_file` | string | No | Where this came from | | ||
| | `added_by` | string | No | Who is filing (default: "mcp") | | ||
|
|
||
| **Returns:** `{ success, drawer_id, wing, room }` or `{ success: false, reason: "duplicate" }` | ||
|
|
There was a problem hiding this comment.
The docs say mempalace_add_drawer “checks for duplicates first” and may return { success: false, reason: "duplicate" }, but the current MCP implementation doesn’t run a similarity duplicate check before filing and doesn’t return this shape (it only no-ops on an identical deterministic drawer_id). Please align the tool description/return values with the actual behavior and point users to mempalace_check_duplicate if they want similarity-based checks.
- 22 content pages across Guide, Concepts, and Reference sections - Custom indigo/cyan theme with Lucide icons and Mermaid diagrams - GitHub Actions workflow for GitHub Pages deployment - Live preview: https://mempalace-docs.netlify.app/
c14e535 to
dfb22f5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 37 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```json | ||
| { | ||
| "palace_path": "/custom/path/to/palace", | ||
| "collection_name": "mempalace_drawers", | ||
| "people_map": {"Kai": "KAI", "Priya": "PRI"} | ||
| } | ||
| ``` | ||
|
|
||
| | Key | Default | Description | | ||
| |-----|---------|-------------| | ||
| | `palace_path` | `~/.mempalace/palace` | Where ChromaDB stores your drawers | | ||
| | `collection_name` | `mempalace_drawers` | ChromaDB collection name | | ||
| | `people_map` | `{}` | Entity name → AAAK code mappings | | ||
|
|
There was a problem hiding this comment.
people_map is documented here as “Entity name → AAAK code mappings”, but in MempalaceConfig it’s described as a mapping of name variants to canonical names and it isn’t used for Dialect entity codes (those are read from entities.json via Dialect.from_config). This section should either correct the meaning of people_map or remove it from the global config example/table to avoid sending users to the wrong knob for AAAK.
| export default withMermaid( | ||
| defineConfig({ | ||
| title: 'MemPalace', | ||
| description: 'Give your AI a memory. Local-first storage and retrieval for AI workflows, with benchmark results and MCP tooling.', | ||
| base: docsBase, | ||
|
|
||
| head: [ |
There was a problem hiding this comment.
PR description mentions “dark mode default”, but the VitePress config doesn’t set appearance/initial theme, so the site will follow system preference by default. Either adjust the description or set the VitePress appearance option to default to dark so the implementation matches the stated behavior.
| stack = MemoryStack() # uses default paths from MempalaceConfig | ||
|
|
||
| # Wake-up: L0 (identity) + L1 (essential story) | ||
| context = stack.wake_up(wing="myapp") # ~170-900 tokens | ||
|
|
There was a problem hiding this comment.
The wake-up token estimate here (~170–900) is inconsistent with the implementation and the rest of the docs: MemoryStack.wake_up() always includes L0 + L1 and is typically ~600–900 tokens per mempalace/layers.py. Consider aligning this range (or explaining under what conditions it could be as low as ~170) to avoid confusing users about expected prompt budget.
| # CLI Commands | ||
|
|
||
| All commands accept `--palace <path>` to override the default palace location. | ||
|
|
||
| ## `mempalace init` | ||
|
|
There was a problem hiding this comment.
The CLI includes a mempalace mcp command (prints MCP setup instructions), but it isn’t documented on this page. Since this is the CLI reference, consider adding a short mempalace mcp section so users can discover it alongside the other subcommands.
web3guru888
left a comment
There was a problem hiding this comment.
Impressive effort — 22 content pages across guide, concepts, and reference sections, all sourced from actual code and docs. The live preview on Netlify looks polished.
A few observations:
- This will conflict with #470 (GitHub Pages landing workflow) since both deploy to Pages. Might want to coordinate.
- Including
bun.lock(633 lines) in the PR — most projects .gitignore lockfiles for docs sites, or at least the maintainers may prefernpmfor consistency with the Python toolchain. - The MCP tools reference with all 19 schemas is genuinely useful — that's the kind of thing that's hard to find by reading source.
Nice contribution for the project's discoverability.
🔭 Reviewed as part of the MemPalace-AGI integration project — autonomous research with perfect memory. Community interaction updates are posted regularly on the dashboard.
f26f87d to
b3b6910
Compare
b3b6910 to
6d70dfd
Compare
- Update totals to 155 open issues / 192 open PRs (+63/+60 in one day) - Add unlabeled-bugs section for upstream label debt - Track new critical findings: MemPalace#538, MemPalace#525, MemPalace#521, MemPalace#469, MemPalace#479, MemPalace#477, MemPalace#475 - Add PR MemPalace#439 (VitePress docs site) to audit PR table - Mark closed items: MemPalace#394, MemPalace#296, MemPalace#290, MemPalace#214, MemPalace#186, MemPalace#180, MemPalace#179, MemPalace#163 et al.
Co-authored-by: Copilot <[email protected]>
Summary
Comprehensive VitePress documentation site for MemPalace with 22 content pages across 3 sections.
Live preview: https://mempalace-docs.netlify.app/
What's Included
Site Structure
Theme & Design
Landing Page
Infrastructure
deploy-docs.yml)Content Sources
All content derived from actual source code and existing documentation — no fabricated information:
README.md→ Guide and Concepts sectionsbenchmarks/BENCHMARKS.md→ curated summary in Referencehooks/README.md→ Auto-Save Hooks guidesearcher.py,layers.py,knowledge_graph.py,palace_graph.py,dialect.py,mcp_server.py,cli.py) → API Reference pagesBuild