Skip to content

refactor(platform-integrations): namespace shared lib under lib/evolve-lite/#258

Open
illeatmyhat wants to merge 3 commits into
mainfrom
refactor/namespace-shared-lib
Open

refactor(platform-integrations): namespace shared lib under lib/evolve-lite/#258
illeatmyhat wants to merge 3 commits into
mainfrom
refactor/namespace-shared-lib

Conversation

@illeatmyhat
Copy link
Copy Markdown
Collaborator

@illeatmyhat illeatmyhat commented May 14, 2026

What

The shared lib (entity_io, config, audit) now renders to lib/evolve-lite/ on every host instead of a bare lib/ — and .bob/lib/evolve-lite/ for bob, replacing .bob/evolve-lib/.

Skill scripts resolve the lib by walking ancestors for lib/evolve-lite/, so multiple plugins can share a host's lib/ directory without their modules colliding. This establishes a namespacing standard (lib/<plugin>/) for plugins to coexist.

How

  • Canonical source stays flat (plugin-source/lib/). build_plugins.py gains a SHARED_TARGET_REWRITES rule (^lib/lib/evolve-lite/) applied to every platform at render time, so a new platform inherits it automatically.
  • Skill scripts (all 7, incl. the .j2): resolution snippet simplified to a single ancestor-walk for lib/evolve-lite/, dropping the old lib / evolve-lib dual candidates.
  • install.sh: bob copies the lib to .bob/lib/evolve-lite/; bob + codex status lines updated.
  • Tests: path references updated across 10 files in tests/platform_integrations/.
  • Docs: INSTALL_SPEC.md, plugin-source/_bob/README.md, tests/platform_integrations/AGENTS.md.

Verification

  • build_plugins.py check — clean (no drift)
  • Full test suite: 527 passed

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Installation guides and READMEs updated to reflect the standardized shared-library location under lib/evolve-lite/.
  • Refactor

    • Unified discovery and packaging so integrations expect the shared library at lib/evolve-lite/ and build outputs follow that layout.
  • Tests

    • Updated tests and assertions to check for the shared library and config modules at the new lib/evolve-lite/ locations.

Review Change Stack

…e-lite/

The shared lib (entity_io, config, audit) now renders to lib/evolve-lite/
on every host instead of a bare lib/ — and .bob/lib/evolve-lite/ for bob,
replacing .bob/evolve-lib/. Skill scripts resolve it by walking ancestors
for lib/evolve-lite/, so multiple plugins can share a host's lib/
directory without their modules colliding.

The canonical source stays flat (plugin-source/lib/); build_plugins.py
applies a shared target rewrite to namespace it at render time. install.sh
and the platform-integration tests are updated to the new layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6bedd6de-631b-4a96-ae24-2c0ff45ef554

📥 Commits

Reviewing files that changed from the base of the PR and between 699e817 and d0921df.

📒 Files selected for processing (3)
  • platform-integrations/bob/evolve-lite/README.md
  • platform-integrations/install.sh
  • plugin-source/_bob/README.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • plugin-source/_bob/README.md
  • platform-integrations/bob/evolve-lite/README.md
  • platform-integrations/install.sh

📝 Walkthrough

Walkthrough

Standardizes the plugin shared-library layout to lib/evolve-lite/ across build output, platform integrations (Bob, Claude, Claw, Codex), installer, tests, and docs; scripts now search ancestor paths for lib/evolve-lite/entity_io.py and the build emits lib/evolve-lite/ via a shared rewrite.

Changes

Shared Library Path Standardization

Layer / File(s) Summary
Build system shared rewrite mapping
plugin-source/build_plugins.py
Adds SHARED_TARGET_REWRITES to map ^lib/ -> lib/evolve-lite/ for all platforms.
Plugin source library discovery scripts
plugin-source/skills/evolve-lite/*/scripts/*
Canonical skill scripts now search only for lib/evolve-lite/entity_io.py when walking ancestor directories (removes prior lib/evolve-lib candidate checks).
Bob platform integration & docs
platform-integrations/bob/evolve-lite/..., plugin-source/_bob/README.md
Bob skill scripts and READMEs updated to use .bob/lib/evolve-lite/ and to discover lib/evolve-lite shared lib.
Claude platform integration
platform-integrations/claude/plugins/evolve-lite/...
Claude skill scripts updated to discover shared lib under lib/evolve-lite/.
Claw-Code platform integration
platform-integrations/claw-code/plugins/evolve-lite/...
Claw-Code skill scripts updated to discover shared lib under lib/evolve-lite/.
Codex platform integration & docs
platform-integrations/codex/..., platform-integrations/INSTALL_SPEC.md
Codex skill scripts and INSTALL_SPEC updated to use lib/evolve-lite/ (INSTALL_SPEC copy source corrected).
Installation and validation
platform-integrations/install.sh
Installer now copies/validates lib/evolve-lite/ for Bob and checks Codex plugin plugins/<codex>/lib/evolve-lite/entity_io.py.
Test suite updates
tests/platform_integrations/* and tests/platform_integrations/AGENTS.md
Integration tests updated to insert .../lib/evolve-lite into sys.path and to assert module/file existence under lib/evolve-lite/.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • gaodan-fang
  • visahak
  • vinodmut

"🐰 I hopped through folders far and wide,
Found one bright path where helpers hide.
lib/evolve-lite, one cozy nest,
No more searching—now it's best.
Shared code sleeps there, neat and spry."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: refactoring the shared library to be namespaced under lib/evolve-lite/ instead of bare lib/.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/namespace-shared-lib

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
plugin-source/_bob/README.md (1)

23-23: ⚡ Quick win

Use consistent path notation with line 22.

Line 22 documents the skills directory as ~/.bob/skills/ (absolute path with tilde), but this line uses .bob/lib/evolve-lite/ (relative path). For consistency, since Bob installs to the user's home directory, both should use the same notation.

📝 Suggested fix
-- Shared library in `.bob/lib/evolve-lite/`
+- Shared library in `~/.bob/lib/evolve-lite/`
🤖 Prompt for 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.

In `@plugin-source/_bob/README.md` at line 23, Update the path notation for the
shared library entry so it matches the absolute-tilde style used on line 22:
replace the string ".bob/lib/evolve-lite/" with "~/.bob/lib/evolve-lite/" in the
README (ensure you update the exact text ".bob/lib/evolve-lite/" to the
tilde-prefixed "~/.bob/lib/evolve-lite/" so both entries use the same notation
as "~/.bob/skills/").
🤖 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 `@platform-integrations/install.sh`:
- Line 1072: The printed status message is inconsistent: the existence check
uses (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py') but the printed label
shows "lib/entity_io.py"; update the printed label to match the actual path
being checked (e.g., "lib/evolve-lite/entity_io.py") in the print statement so
the output accurately reflects the checked file; locate the print(...) call that
contains "lib/entity_io.py" and change only the displayed path string to match
the checked path.

---

Nitpick comments:
In `@plugin-source/_bob/README.md`:
- Line 23: Update the path notation for the shared library entry so it matches
the absolute-tilde style used on line 22: replace the string
".bob/lib/evolve-lite/" with "~/.bob/lib/evolve-lite/" in the README (ensure you
update the exact text ".bob/lib/evolve-lite/" to the tilde-prefixed
"~/.bob/lib/evolve-lite/" so both entries use the same notation as
"~/.bob/skills/").
🪄 Autofix (Beta)

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

Run ID: 178777f9-09ba-47ce-8c34-496242a4ab14

📥 Commits

Reviewing files that changed from the base of the PR and between 003bd53 and 699e817.

📒 Files selected for processing (66)
  • platform-integrations/INSTALL_SPEC.md
  • platform-integrations/bob/evolve-lite/README.md
  • platform-integrations/bob/evolve-lite/lib/evolve-lite/__init__.py
  • platform-integrations/bob/evolve-lite/lib/evolve-lite/audit.py
  • platform-integrations/bob/evolve-lite/lib/evolve-lite/config.py
  • platform-integrations/bob/evolve-lite/lib/evolve-lite/entity_io.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-learn/scripts/save_entities.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-provenance/scripts/log_influence.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-publish/scripts/publish.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-recall/scripts/retrieve_entities.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-subscribe/scripts/subscribe.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-sync/scripts/sync.py
  • platform-integrations/bob/evolve-lite/skills/evolve-lite-unsubscribe/scripts/unsubscribe.py
  • platform-integrations/claude/plugins/evolve-lite/lib/evolve-lite/__init__.py
  • platform-integrations/claude/plugins/evolve-lite/lib/evolve-lite/audit.py
  • platform-integrations/claude/plugins/evolve-lite/lib/evolve-lite/config.py
  • platform-integrations/claude/plugins/evolve-lite/lib/evolve-lite/entity_io.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/learn/scripts/save_entities.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/provenance/scripts/log_influence.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/publish/scripts/publish.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/recall/scripts/retrieve_entities.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/subscribe/scripts/subscribe.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/sync/scripts/sync.py
  • platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/unsubscribe/scripts/unsubscribe.py
  • platform-integrations/claw-code/plugins/evolve-lite/lib/evolve-lite/__init__.py
  • platform-integrations/claw-code/plugins/evolve-lite/lib/evolve-lite/audit.py
  • platform-integrations/claw-code/plugins/evolve-lite/lib/evolve-lite/config.py
  • platform-integrations/claw-code/plugins/evolve-lite/lib/evolve-lite/entity_io.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/learn/scripts/save_entities.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/provenance/scripts/log_influence.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/publish/scripts/publish.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/recall/scripts/retrieve_entities.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/subscribe/scripts/subscribe.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/sync/scripts/sync.py
  • platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/unsubscribe/scripts/unsubscribe.py
  • platform-integrations/codex/plugins/evolve-lite/lib/evolve-lite/__init__.py
  • platform-integrations/codex/plugins/evolve-lite/lib/evolve-lite/audit.py
  • platform-integrations/codex/plugins/evolve-lite/lib/evolve-lite/config.py
  • platform-integrations/codex/plugins/evolve-lite/lib/evolve-lite/entity_io.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/learn/scripts/save_entities.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/provenance/scripts/log_influence.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/publish/scripts/publish.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/recall/scripts/retrieve_entities.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/subscribe/scripts/subscribe.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/sync/scripts/sync.py
  • platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/unsubscribe/scripts/unsubscribe.py
  • platform-integrations/install.sh
  • plugin-source/_bob/README.md
  • plugin-source/build_plugins.py
  • plugin-source/skills/evolve-lite/learn/scripts/save_entities.py
  • plugin-source/skills/evolve-lite/provenance/scripts/log_influence.py
  • plugin-source/skills/evolve-lite/publish/scripts/publish.py
  • plugin-source/skills/evolve-lite/recall/scripts/retrieve_entities.py.j2
  • plugin-source/skills/evolve-lite/subscribe/scripts/subscribe.py
  • plugin-source/skills/evolve-lite/sync/scripts/sync.py
  • plugin-source/skills/evolve-lite/unsubscribe/scripts/unsubscribe.py
  • tests/platform_integrations/AGENTS.md
  • tests/platform_integrations/test_audit.py
  • tests/platform_integrations/test_bob_sharing.py
  • tests/platform_integrations/test_codex.py
  • tests/platform_integrations/test_config.py
  • tests/platform_integrations/test_entity_io.py
  • tests/platform_integrations/test_entity_io_core.py
  • tests/platform_integrations/test_idempotency.py
  • tests/platform_integrations/test_plugin_structure.py
  • tests/platform_integrations/test_subscribe.py

Comment thread platform-integrations/install.sh Outdated
… path notation

Address CodeRabbit review on #258:
- install.sh: codex status line label now matches the path it checks
  (lib/evolve-lite/entity_io), consistent with the bob status line.
- _bob/README.md: shared-library path uses ~/.bob/ tilde notation to
  match the skills-directory entry above it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gaodan-fang
Copy link
Copy Markdown
Collaborator

Codex Review

Target: branch diff against main

The relocated Bob library path is not included in Bob's uninstall/purge cleanup, leaving installed artifacts behind after uninstall. The main runtime lookup changes otherwise appear internally consistent.

Review comment

  • [P2] Remove Bob's relocated lib on uninstallplatform-integrations/install.sh:527
    For Bob lite installs, the shared library now lands at .bob/lib/evolve-lite, but Bob uninstall still only calls _purge_evolve_artifacts(), which removes evolve-prefixed entries directly under .bob plus skills/commands. After install --platform bob followed by uninstall --platform bob, .bob/lib/evolve-lite/entity_io.py is left behind and status will still report the library as installed. Please extend the purge/uninstall path to remove this specific nested directory without deleting unrelated .bob/lib content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants