feat(zcode): add Nowledge Mem plugin [DO NOT MERGE YET] - #484
Conversation
|
Warning Review limit reached
Next review available in: 34 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdded a versioned Nowledge Mem ZCode plugin with MCP configuration, six guided skills, marketplace installation, registry updates, documentation, validation tooling, and static contract tests. ChangesZCode plugin integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Marketplace
participant ZCode
participant NowledgeMemMCP
Developer->>Marketplace: Install nowledge-mem-zcode
Marketplace->>ZCode: Enable plugin and skills
ZCode->>NowledgeMemMCP: Connect through configured MCP endpoint
ZCode->>Developer: Provide guided memory and handoff skills
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR is intentionally being kept Open and non-Draft so CodeRabbit can review the current implementation. It should not be merged at this stage because:
After CodeRabbit review is complete and any valid findings are addressed (with non-applicable findings answered inline), I will create the standalone repository and prepare the follow-up submodule-based PR. This PR is therefore for review only and must not be merged yet. |
|
@coderabbitai review The upstream/main merge conflict has been resolved. Please review the updated PR head. There were no prior inline findings or review threads; any actual findings will be tested against the implementation, fixed when valid and marked resolved, or answered inline when not applicable. |
|
|
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@marketplace.json`:
- Around line 11-18: Finalize the ZCode marketplace contract across all three
sites: in marketplace.json (lines 11-18), point source and repository to the
standalone final marketplace repository; in integrations.json (lines 1159-1161),
update command and updateCommand to that same final marketplace URL; and in
nowledge-mem-zcode-plugin/skills/check-integration/SKILL.md (lines 40-42), add
“Step 2 — Install for that host” using the identical install command. Keep the
registry command and Skill installation row synchronized.
In `@nowledge-mem-zcode-plugin/scripts/validate-plugin.mjs`:
- Line 93: Update the frontmatter extraction regex in the validation logic to
accept both LF and CRLF line endings, while preserving the existing frontmatter
boundaries and content capture. Ensure valid SKILL.md files pass regardless of
checkout line-ending style.
- Line 6: Update the pluginRoot initialization to convert the parent module URL
with fileURLToPath() before passing it to resolve(), preserving correct decoded
and platform-specific filesystem paths.
In `@nowledge-mem-zcode-plugin/skills/search-memory/SKILL.md`:
- Around line 32-42: Update the nearby `mem_fs` examples in the skill
documentation to explicitly identify the Knowledge Filesystem surface as
optional and host-specific. Preserve the existing MCP tools as the ZCode
contract, and clarify that the shown `mem_fs` paths and commands are not
universally available or local filesystem paths.
In `@nowledge-mem-zcode-plugin/skills/status/SKILL.md`:
- Around line 20-26: Update the failure guidance in the status skill to separate
ZCode MCP diagnostics from local CLI checks: for remote or custom Mem, direct
users to run `nmem config mcp show --host zcode`, paste the resulting block into
ZCode, and reload ZCode. Keep `nmem --json status` as a distinct local nmem
fallback, and preserve the existing desktop-app and MCP status-tool guidance.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 602dd877-848b-4812-83f9-d223aa19215a
📒 Files selected for processing (16)
README.mdintegrations.jsonmarketplace.jsonnowledge-mem-npx-skills/skills/check-integration/SKILL.mdnowledge-mem-zcode-plugin/.mcp.jsonnowledge-mem-zcode-plugin/.zcode-plugin/plugin.jsonnowledge-mem-zcode-plugin/CHANGELOG.mdnowledge-mem-zcode-plugin/README.mdnowledge-mem-zcode-plugin/scripts/validate-plugin.mjsnowledge-mem-zcode-plugin/skills/check-integration/SKILL.mdnowledge-mem-zcode-plugin/skills/distill-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/read-working-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/save-handoff/SKILL.mdnowledge-mem-zcode-plugin/skills/search-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/status/SKILL.mdtests/plugin_e2e/test_key_plugins_e2e.py
|
The packaging direction is now corrected:
Validation passed for the ZCode package validator and the registry/static contract tests. The PR remains open and non-Draft for CodeRabbit review. |
|
@coderabbitai review Please review the latest packaging and manual-installation changes at the new PR head. If you find an actual inline issue, I will reproduce it, fix valid findings and resolve them, or reply inline when the finding is not applicable. |
|
|
|
@coderabbitai review The latest head 8168a74 finalizes the standalone repository contract and addresses the active findings:
Please review the latest head. I will resolve each valid thread after verifying the fix, and reply inline to any finding that is not applicable. |
|
|
|
@coderabbitai review I authorize updating this PR branch for review. The latest head is 8168a74 and has been locally validated. Please perform a substantive review of the current diff, not only the previous e5433f8 review. The release target is the standalone https://github.com/nowledge-co/zcode-plugin repository; after this PR converges, I will open a separate PR there and close this review PR without merging it. |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integrations.json`:
- Around line 1160-1161: Publish the standalone nowledge-mem-scode package to
the configured https://github.com/nowledge-co/zcode-plugin marketplace source
before advertising installation. In integrations.json lines 1160-1161, retain
the install/update commands only once that target is populated; align the
marketplace URL in nowledge-mem-zcode-plugin/skills/check-integration/SKILL.md
lines 30-34; and update README.md line 58 to advertise standalone installation
only after the package is available.
In `@nowledge-mem-zcode-plugin/scripts/validate-plugin.mjs`:
- Around line 45-47: Update the semantic-version validation regex in the
manifest.version check so prerelease and build metadata suffixes are optional
and independent, accepting combinations such as 1.0.0-rc.1+build.7 while
preserving valid versions without either suffix.
In `@nowledge-mem-zcode-plugin/skills/check-integration/SKILL.md`:
- Line 36: Update the installation guidance in SKILL.md to explicitly refresh
the marketplace and then update nowledge-mem-zcode before enabling it and
reloading the Agent runtime. Keep the existing standalone repository refresh and
reload guidance, using integrations.json as the authoritative source for the
matching update command.
In `@nowledge-mem-zcode-plugin/skills/distill-memory/SKILL.md`:
- Line 40: Update the nmem m update example in the distill-memory instructions
to use the documented --content flag instead of -c, preserving the existing
command and placeholder behavior.
In `@nowledge-mem-zcode-plugin/skills/save-handoff/SKILL.md`:
- Around line 22-28: Remove the unsupported -s generic-agent option from the
fallback nmem t create command in the save-handoff instructions, while
preserving the existing -t and -c arguments and MCP-preferred behavior.
In `@nowledge-mem-zcode-plugin/skills/search-memory/SKILL.md`:
- Around line 44-53: Update the CLI fallback commands in
nowledge-mem-zcode-plugin/skills/search-memory/SKILL.md lines 44-53,
nowledge-mem-zcode-plugin/skills/read-working-memory/SKILL.md lines 26-44, and
nowledge-mem-zcode-plugin/skills/distill-memory/SKILL.md lines 29-38 to
explicitly route operations through the active space by setting NMEM_SPACE or
passing --space. Apply the space-aware form consistently to all fallback
commands so search-memory, read-working-memory, and distill-memory preserve lane
isolation when MCP is unavailable.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e7f2f2c3-02aa-4957-be88-f0106965b5dc
📒 Files selected for processing (16)
README.mdintegrations.jsonnowledge-mem-npx-skills/skills/check-integration/SKILL.mdnowledge-mem-zcode-plugin/.mcp.jsonnowledge-mem-zcode-plugin/.zcode-plugin/plugin.jsonnowledge-mem-zcode-plugin/CHANGELOG.mdnowledge-mem-zcode-plugin/README.mdnowledge-mem-zcode-plugin/marketplace.jsonnowledge-mem-zcode-plugin/scripts/validate-plugin.mjsnowledge-mem-zcode-plugin/skills/check-integration/SKILL.mdnowledge-mem-zcode-plugin/skills/distill-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/read-working-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/save-handoff/SKILL.mdnowledge-mem-zcode-plugin/skills/search-memory/SKILL.mdnowledge-mem-zcode-plugin/skills/status/SKILL.mdtests/plugin_e2e/test_key_plugins_e2e.py
|
@coderabbitai review Latest head cd6de93 addresses all six current findings:
Please review the current head again. I will not treat the old e5433f8 review as a review of this new diff. |
|
|
|
@coderabbitai review Follow-up fix on the latest review: the thread-show CLI fallback now also carries the active |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- PR metadata and current diff summary ---'
gh pr view 484 --repo nowledge-co/community --json number,headRefOid,baseRefOid,files --jq \
'.number as $n | "PR #\($n)\nhead: \(.headRefOid)\nbase: \(.baseRefOid)\nfiles:\n" + ([.files[].path] | join("\n"))'
echo '--- working-tree diff against PR base ---'
git diff --find-renames --stat "$(git merge-base HEAD origin/main)" HEAD
git diff --find-renames --unified=80 "$(git merge-base HEAD origin/main)" HEAD -- \
'nowledge-mem-zcode-plugin/skills/**/*.md' \
'nowledge-mem-zcode-plugin/scripts/validate-plugin.mjs' \
'tests/plugin_e2e/test_key_plugins_e2e.py' \
'integrations.json' \
'README.md'
echo '--- relevant file outlines ---'
fd -t f -a 'SKILL.md|validate-plugin\.mjs|test_key_plugins_e2e\.py' . \
| rg 'nowledge-mem-zcode-plugin|tests/plugin_e2e/test_key_plugins_e2e\.py' \
| while IFS= read -r file; do
echo "### $file"
case "$file" in
*.mjs) ast-grep outline "$file" --items all ;;
*.py) ast-grep outline "$file" --items all ;;
*) sed -n '1,220p' "$file" ;;
esac
doneLength of output: 91879 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- latest follow-up commit ---'
git show --format=fuller --find-renames --stat HEAD
git diff --find-renames --unified=60 HEAD^ HEAD -- \
'nowledge-mem-zcode-plugin/**' \
'tests/plugin_e2e/test_key_plugins_e2e.py' \
'integrations.json'
echo '--- ZCode package manifests ---'
for file in \
nowledge-mem-zcode-plugin/.zcode-plugin/plugin.json \
nowledge-mem-zcode-plugin/marketplace.json \
nowledge-mem-zcode-plugin/.mcp.json; do
echo "### $file"
jq . "$file"
done
echo '--- ZCode README ---'
cat -n nowledge-mem-zcode-plugin/README.md
echo '--- ZCode transport and CLI fallback references ---'
rg -n -C 3 \
-e 'mcp\+skills' \
-e 'plugin\+mcp\+skills' \
-e 'nmem --json t show' \
-e 'nmem --json t create' \
-e 'nmem --json m update' \
nowledge-mem-zcode-plugin integrations.json tests/plugin_e2e/test_key_plugins_e2e.py
echo '--- comparable CLI command forms in existing package documentation ---'
rg -n -C 2 \
-e 'nmem --json t show' \
-e 'nmem --json t create' \
-e 'nmem --json m update' \
-g 'SKILL.md' \
-g 'README.md' \
.Length of output: 38071 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- CLI help and documented thread-create space usage ---'
rg -n -C 4 \
-e 't create.*--space' \
-e 't create.*space' \
-e '--source.*--space' \
-e 'thread.*--space' \
-e '"space"' \
-g '*.md' -g '*.py' -g '*.ts' -g '*.js' -g '*.json' \
. | head -n 500
echo '--- marketplace source objects and schemas in repository ---'
rg -n -C 5 \
-e '"source"\s*:\s*\{' \
-e '"source"\s*:\s*"\."' \
-e '"source"\s*:\s*"directory"' \
-e 'marketplace.*schema' \
-g 'marketplace.json' -g '*.md' -g '*.json' \
.
echo '--- tracked documentation or fixtures for ZCode marketplace behavior ---'
rg -n -i -C 4 \
-e 'ZCode.*marketplace' \
-e 'marketplace.*ZCode' \
-e 'Add marketplace' \
-e 'source.*directory' \
README.md nowledge-mem-zcode-plugin tests docs 2>/dev/null || trueLength of output: 63342 🤖 web_search executed:
Length of output: 15438
The I found two remaining issues:
|
|
@coderabbitai review The two remaining findings from the latest review are fixed in the new head:
Local validator, JSON checks, and target contract tests pass. Please review this latest head. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- PR head and latest commit ---'
gh pr view 484 --repo nowledge-co/community --json number,headRefOid,baseRefOid \
--jq '"PR #\(.number)\nhead: \(.headRefOid)\nbase: \(.baseRefOid)"'
git show --format=fuller --find-renames --stat HEAD
git diff --find-renames --unified=100 HEAD^ HEAD -- \
'nowledge-mem-zcode-plugin/skills/save-handoff/SKILL.md' \
'nowledge-mem-zcode-plugin/skills/check-integration/SKILL.md' \
'nowledge-mem-zcode-plugin/skills/read-working-memory/SKILL.md' \
'nowledge-mem-zcode-plugin/skills/search-memory/SKILL.md' \
'nowledge-mem-zcode-plugin/skills/distill-memory/SKILL.md' \
'integrations.json' \
'tests/plugin_e2e/test_key_plugins_e2e.py'
echo '--- affected Skills ---'
for file in \
nowledge-mem-zcode-plugin/skills/save-handoff/SKILL.md \
nowledge-mem-zcode-plugin/skills/check-integration/SKILL.md; do
echo "### $file"
cat -n "$file"
done
echo '--- all ZCode CLI fallback and transport references ---'
rg -n -C 4 \
-e 'nmem --json t create' \
-e 'nmem --json t show' \
-e 'nmem --json m (search|update|add)' \
-e 'plugin\+mcp\+skills' \
-e 'mcp\+skills' \
nowledge-mem-zcode-plugin integrations.json tests/plugin_e2e/test_key_plugins_e2e.py
echo '--- static contract area ---'
rg -n -C 30 \
-e 'nowledge-mem-zcode-plugin' \
-e 'plugin\+mcp\+skills' \
tests/plugin_e2e/test_key_plugins_e2e.pyLength of output: 31652
The The I found no new issue in the latest diff. You are interacting with an AI system. |
|
The standalone repository PR is now open: nowledge-co/zcode-plugin#1. It contains the converged ZCode package, root marketplace.json, |
Summary
.zcode-plugin/plugin.jsonDesign boundary
This follows the ZCode plugin documentation and the existing ZCode history. ZCode session/transcript lifecycle behavior has not been independently verified, so this PR does not claim automatic recall injection, automatic transcript capture, pre-compaction capture, or
save-thread.The package uses the host-owned ZCode MCP configuration for remote/custom Mem endpoints. No API keys are bundled in the plugin.
Validation
node nowledge-mem-zcode-plugin/scripts/validate-plugin.mjs✅uv run --with pytest pytest tests/plugin_e2e/test_key_plugins_e2e.py::test_registry_connect_contract_points_agent_prompts_to_universal_skill tests/plugin_e2e/test_key_plugins_e2e.py::test_zcode_plugin_static_contract_is_self_contained -q✅git diff --check✅The complete plugin contract suite still has one pre-existing unrelated failure because the
nowledge-mem-gemini-clicheckout lackspackage.json.Manual verification
After merge, add the repository
marketplace.jsonin ZCode via Settings → Plugins → Create → Add marketplace, installnowledge-mem-zcode, enable it, and reload the Agent runtime.Summary by CodeRabbit