Skip to content

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

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

refactor(platform-integrations): namespace shared lib under lib/evolve-lite/#258
illeatmyhat wants to merge 2 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

    • Updated installation instructions and README files to reflect the standardized library directory structure.
  • Refactor

    • Standardized the shared library installation path to lib/evolve-lite/ across all platform integrations (Bob, Codex, Claude, Claw-Code).
    • Unified library discovery logic in all integration scripts to use a single conventional location.
    • Updated build process to consistently apply the new directory structure.
  • Tests

    • Updated test assertions to verify the library presence at the new standardized path 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

Warning

Rate limit exceeded

@illeatmyhat has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 47 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d294ae0-dfd9-45bc-b482-be0eec99d643

📥 Commits

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

📒 Files selected for processing (3)
  • platform-integrations/bob/evolve-lite/README.md
  • platform-integrations/install.sh
  • plugin-source/_bob/README.md
📝 Walkthrough

Walkthrough

This PR standardizes the shared library directory structure across all platform integrations (Bob, Claude, Claw, Codex) by consolidating plugin library discovery from multiple candidate paths (lib/ and evolve-lib/) to a single lib/evolve-lite/ location. The build system applies a centralized rewrite rule, all plugin scripts are updated to search only the new path, and tests/documentation are aligned accordingly.

Changes

Shared Library Path Standardization

Layer / File(s) Summary
Build system shared rewrite mapping
plugin-source/build_plugins.py
Introduces SHARED_TARGET_REWRITES constant that globally maps source lib/ paths to lib/evolve-lite/ output for all platforms, centrally controlling the directory structure transformation.
Plugin source library discovery scripts
plugin-source/skills/evolve-lite/*/scripts/save_entities.py, log_influence.py, publish.py, retrieve_entities.py.j2, subscribe.py, sync.py, unsubscribe.py
Canonical source scripts now search only for lib/evolve-lite/entity_io.py in ancestor directories, replacing the prior nested loops that checked both lib/ and evolve-lib/ candidates.
Bob platform integration
platform-integrations/bob/evolve-lite/skills/evolve-lite-*/scripts/*.py, platform-integrations/bob/evolve-lite/README.md, plugin-source/_bob/README.md
All eight Bob skill scripts (learn, provenance, publish, recall, subscribe, sync, unsubscribe) updated to discover the shared library only at lib/evolve-lite/, along with documentation reflecting the new .bob/lib/evolve-lite/ installation path.
Claude platform integration
platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/*/scripts/*.py
All seven Claude skill scripts (learn, provenance, publish, recall, subscribe, sync, unsubscribe) updated to search only for lib/evolve-lite/ shared library location.
Claw-Code platform integration
platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/*/scripts/*.py
All seven Claw-Code skill scripts updated to use the single lib/evolve-lite/ search pattern for plugin library discovery.
Codex platform integration
platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/*/scripts/*.py, platform-integrations/INSTALL_SPEC.md
All seven Codex skill scripts and installation spec updated to discover shared library only at lib/evolve-lite/, with INSTALL_SPEC.md correcting the Lite Mode copy source from Claude to Codex paths.
Installation and validation
platform-integrations/install.sh
Main installer now copies the narrower lib/evolve-lite/ source into Bob's target and validates both Bob and Codex shared library presence at the new lib/evolve-lite/ location.
Test suite updates
tests/platform_integrations/test_audit.py, test_bob_sharing.py, test_codex.py, test_config.py, test_entity_io.py, test_entity_io_core.py, test_idempotency.py, test_plugin_structure.py, test_subscribe.py, tests/platform_integrations/AGENTS.md
All integration test modules and test documentation updated to assert module existence and import paths under the new lib/evolve-lite/ directory structure.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • AgentToolkit/altk-evolve#219: This PR implements the canonical-source + render-to-platforms architecture for standardizing the shared library layout that was proposed in the Kaizen-Lite specification.

Possibly related PRs

  • AgentToolkit/altk-evolve#251: Updates provenance audit/influence pipeline scripts that are directly affected by the shared library path changes in the same script files.
  • AgentToolkit/altk-evolve#199: Earlier changes to Bob retrieve_entities.py and shared library import/path logic overlap with this PR's standardization of library discovery.

Suggested reviewers

  • visahak
  • vinodmut

🐰 A rabbit hops with glee,
Paths are clear, organized—no lib maze!
evolve-lite shines bright,
One home for all to share,
No more searching left and right! ✨

🚥 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 PR title 'refactor(platform-integrations): namespace shared lib under lib/evolve-lite/' clearly and specifically summarizes the main change—reorganizing shared library modules into a lib/evolve-lite/ namespace across the platform-integrations, and is directly supported by the comprehensive changeset.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/namespace-shared-lib

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
print(" Codex:")
print(f" plugins/evolve-lite : {'✓' if plugin_dir.is_dir() else '✗'}")
print(f" lib/entity_io.py : {'✓' if (plugin_dir / 'lib' / 'entity_io.py').is_file() else '✗'}")
print(f" lib/entity_io.py : {'✓' if (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py').is_file() else '✗'}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix stale Codex status label to match the actual path check.

Line 1072 checks lib/evolve-lite/entity_io.py but prints lib/entity_io.py, which can mislead troubleshooting output.

Proposed fix
-        print(f"    lib/entity_io.py          : {'✓' if (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py').is_file() else '✗'}")
+        print(f"    lib/evolve-lite/entity_io.py : {'✓' if (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py').is_file() else '✗'}")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
print(f" lib/entity_io.py : {'✓' if (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py').is_file() else '✗'}")
print(f" lib/evolve-lite/entity_io.py : {'✓' if (plugin_dir / 'lib' / 'evolve-lite' / 'entity_io.py').is_file() else '✗'}")
🤖 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 `@platform-integrations/install.sh` at 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.

… 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.

2 participants