feat(wiki): PR-A — wiki scaffold (~/.memtomem-wiki, mm wiki init/list, ADR-0008)#622
Merged
feat(wiki): PR-A — wiki scaffold (~/.memtomem-wiki, mm wiki init/list, ADR-0008)#622
Conversation
…-0008 PR-A) Add the global wiki layer foundation that ADR-0008 specifies: a git repository at ~/.memtomem-wiki/ that holds vendor-neutral skills, agents, and commands, ready to be cherry-pick-deployed into projects by mm context install (PR-B). PR-A surface only: - WikiStore (init scratch, init --from <git-url>, list, current_commit) - mm wiki init [--from <git-url>] and mm wiki list CLI commands - ADR-0008 with the four invariants the rest of the layer rests on (self-containment, explicit conflict surface, optional wiki, full-file override) Project canonical (.memtomem/) and the existing fan-out are untouched — the wiki is purely additive at this stage. Tests exercise scratch init, clone init, layout, idempotency, asset listing (sort, filter, hidden exclusion), and the WikiNotFound graceful-degradation surface. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ract) Address review findings on PR #622: - Drop "(PR-C+)" hint from `mm wiki init` output and the same forward references from module docstrings. Per feedback_deictic_pr_references.md these rot once the referenced PRs ship and leave readers wondering why a current verb is labelled future. - Trim _README_TEMPLATE to v1-truthful content. The README is shipped to disk at init time and persists in the user's wiki repo, so referencing unimplemented commands (`mm wiki skill edit`, `mm context install`) would rot worse than CLI hints. Now points to the project README and ADR-0008. - Pin lockfile SHA contract in ADR-0008: wiki_commit stores the full 40-character SHA, display surfaces may abbreviate. Keeps PR-B's lockfile schema unambiguous and avoids abbreviation collisions across projects that share a wiki. Update example JSON to use a recognisably full-length SHA. - Fix `current_commit()` docstring — git rev-parse HEAD always returns full 40-char hex; the prior "short or full per git config" was wrong. - Fix `test_at_default_falls_back_to_home` — it was comparing against the module-level constant DEFAULT_WIKI_PATH (computed at module load from the same Path.home() call the function under test uses), so it was a tautology. Now compares against Path.home() / ".memtomem-wiki" directly, so a regression in env-resolution logic would actually surface. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap
ADR-0008 introduces a 5-PR wiki layer on top of the existing context-gateway router (ADR-0001). This PR is PR-A — scaffolding only; the wiki is purely additive at this stage.
mm wiki init/list+ ADR-0008mm context install+ lockfile + concurrencymm wiki <type> overridemm context update/install --all/status, dirty detectionIn scope (PR-A)
~/.memtomem-wiki/directory convention + initial git repo layoutWikiStore— init scratch, init from git URL, list, current_commit, existsmm wiki init [--from <git-url>]andmm wiki list [--type skills|agents|commands]MEMTOMEM_WIKI_PATHenv override (for tests + advanced users)Out of scope (deferred)
mm context install/update/statusand lockfile schema → PR-BOVERRIDE_FORMATSmatrix → PR-C--force,.bak),--allUX → PR-Dweb/routes/wiki.py) → PR-Esettings.jsonin wiki → permanent NO (host-scope mutation trust boundary)ADR-0008 invariants
The four rules every later PR upholds:
<project>/.memtomem/works without the wiki present (CI machines, archives, machines without the wiki).--force+.bak(enforced in PR-D).mm wiki *andmm context install/update/status; existing fan-out runs unchanged.Verification
tests/test_wiki_store.py,tests/test_wiki_cmd.py):scratch init / clone init / idempotency refusal / non-empty refusal / asset listing (sort, type filter, hidden exclusion) /
WikiNotFoundgraceful surfaceruff check+ruff format --checkclean across 220 src filesmm --helpshowswikiin command list;mm wiki --help,mm wiki init --help,mm wiki list --helpall resolveTest plan
uv run pytest packages/memtomem/tests/test_wiki_store.py packages/memtomem/tests/test_wiki_cmd.py -vuv run ruff check packages/memtomem/src && uv run ruff format --check packages/memtomem/srcuv run mm wiki --help,uv run mm wiki init --help,uv run mm wiki list --helpuv run mm --helpshowswikiFollow-up PRs
--all🤖 Generated with Claude Code