Skip to content

feat(bob): add memory sharing with improvements#199

Merged
visahak merged 42 commits intoAgentToolkit:mainfrom
visahak:feature/evolve-lite-sharing-bob
Apr 27, 2026
Merged

feat(bob): add memory sharing with improvements#199
visahak merged 42 commits intoAgentToolkit:mainfrom
visahak:feature/evolve-lite-sharing-bob

Conversation

@visahak
Copy link
Copy Markdown
Collaborator

@visahak visahak commented Apr 18, 2026

Summary

Implements memory sharing for Bob platform with publish/subscribe/sync capabilities, rebased on top of Claude Code changes (feature/evolve-lite-sharing-claude-code).

Changes

New Skills (4)

  • evolve-lite:publish - Publish private guidelines to public Git repo
    • Moves (not copies) entities from private to public
    • Stamps visibility=public, owner, published_at, and source fields
    • Deletes source file after successful publication
  • evolve-lite:subscribe - Subscribe to another user's public guidelines repo
    • Clones remote repo into .evolve/subscribed/{name}/
    • Updates evolve.config.yaml with subscription details
  • evolve-lite:unsubscribe - Remove subscriptions
    • Removes local clone and mirrored entities
    • Updates config to remove subscription entry
  • evolve-lite:sync - Pull latest from all subscribed repos
    • Manual invocation (no auto-sync on session start for Bob)
    • Mirrors entities to .evolve/entities/subscribed/{name}/
    • Better handles initial sync and no-change scenarios

Enhanced Skills (2)

  • evolve-lite:learn - Added --user flag, automatically stamps visibility=private and owner
  • evolve-lite:recall - Multi-source retrieval with priority: private > own public > subscribed
    • Created retrieve_entities.py script with --sources flag
    • Annotates entities with source information

Infrastructure

  • Updated install.sh to copy all 6 Bob skills and shared library
  • Updated custom_modes.yaml with memory sharing documentation
  • Shared library (evolve-lib) copied from Claude plugin during installation

Testing

  • ✅ All 34 tests passing
  • ✅ Installation verified via test_bob_lite_installation_succeeds
  • ✅ Rebased on feature/evolve-lite-sharing-claude-code (commit 743e3af)

Summary by CodeRabbit

Release Notes

  • New Features

    • Added entity-sharing workflow including publish (move private guidelines to public repos), subscribe (mirror public repositories), sync (pull subscription updates), unsubscribe (remove subscriptions), learn (extract guidelines), and recall (display guidelines with source attribution).
  • Bug Fixes

    • Improved YAML comment handling and quote preservation; enhanced rollback protection for failed operations.
  • Tests

    • Expanded integration test coverage for sharing features and entity management across platforms.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

This PR introduces a comprehensive entity-sharing system for Bob's evolve-lite integration, adding four new skills (publish, subscribe, unsubscribe, sync) to enable guidelines extraction, publishing to public repositories, subscription to others' guidelines, and synchronization of subscribed content, alongside corresponding documentation, shared library infrastructure updates, and integration tests.

Changes

Cohort / File(s) Summary
Bob evolve-lite core documentation
platform-integrations/bob/evolve-lite/README.md, custom_modes.yaml
Added README documenting directory structure (.evolve/entities/guideline/, public/, subscribed/), configuration schema, six skill operations, and environment overrides; extended custom mode instructions with optional memory-sharing skills.
Bob evolve-lite learn skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:learn/SKILL.md, scripts/save_entities.py
Added CLI --user flag to stamp owner in metadata; enforces visibility: private regardless of input; documented prohibition against entities invoking named skills/tools.
Bob evolve-lite publish skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:publish/SKILL.md, scripts/publish.py
Introduced publish workflow: interactive entity selection, git repo initialization, frontmatter stamping (visibility: public, published_at, owner, source), commit/push to configured remote; validates paths and handles atomic file operations.
Bob evolve-lite subscribe skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:subscribe/SKILL.md, scripts/subscribe.py
Introduced subscribe workflow: clones remote repo into .evolve/subscribed/{name}, mirrors entities, updates config with subscription metadata, validates duplicate names, logs audit events.
Bob evolve-lite unsubscribe skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:unsubscribe/SKILL.md, scripts/unsubscribe.py
Introduced unsubscribe workflow: lists/selects subscription by name, removes cloned repo and mirrored entities, updates config, logs audit events; supports safe name validation and deletion.
Bob evolve-lite sync skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:sync/SKILL.md, scripts/sync.py
Introduced sync workflow: fetches updates from subscribed repos, mirrors changes to .evolve/entities/subscribed/{name}/, tracks deltas (added/updated/removed), reports results, logs audit events; respects --quiet and sync.on_session_start config.
Bob evolve-lite recall skill
platform-integrations/bob/evolve-lite/skills/evolve-lite:recall/SKILL.md, scripts/retrieve_entities.py
Updated recall documentation for multi-source retrieval; added retrieve_entities.py script to load entities from private, public, and subscribed sources, annotate subscribed provenance with [from: <name>], and output formatted markdown.
Shared library infrastructure
platform-integrations/claude/plugins/evolve-lite/lib/audit.py, config.py, entity_io.py
Modified audit.append() field merge order; removed optional filepath parameter from load_config(); simplified YAML comment handling; changed scalar serialization; removed source from frontmatter keys (parsed but not emitted).
Claude plugins evolve-lite skill scripts
platform-integrations/claude/plugins/evolve-lite/skills/publish/..., subscribe/..., sync/..., unsubscribe/...
Updated publish script: copies instead of moves entities, removes config-based user resolution, drops path validation; updated subscribe: new clone path .evolve/subscribed/{name}, hardcoded project_root; updated sync: checks "Already up to date" message; updated unsubscribe: separate deletion of clone and mirrored entities.
Claude plugins evolve-lite documentation
platform-integrations/claude/plugins/evolve-lite/skills/publish/SKILL.md, subscribe/SKILL.md
Updated publish docs: example username changes (alicevatche), unquoted argument placeholders; updated subscribe docs: username/argument formatting changes for consistency.
Test infrastructure
tests/platform_integrations/conftest.py
Removed e2e pytest marker registration.
Test suite fixture/parameter updates
tests/platform_integrations/test_audit.py, test_config.py, test_entity_io_core.py, test_publish.py, test_retrieve.py, test_save_entities.py, test_subscribe.py, test_sync.py
Refactored all test suites to use pytest tmp_path fixture instead of temp_project_dir; adjusted paths and assertions accordingly; removed test cases for "already published" and path-traversal validation (publish), public entity handling (retrieve), and various negative-case scenarios (subscribe/unsubscribe/sync).
New test suites
tests/platform_integrations/test_skill_directory_names.py, test_bob_sharing.py
Added skill directory validation suite (verifies six expected Bob lite skills exist, checks naming convention, validates installation, references in install.sh); added comprehensive end-to-end integration tests for subscribe, unsubscribe, sync, publish, save, and retrieve workflows with fixture-based symlink to shared library.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Script as Publish Script
    participant FS as File System
    participant Git as Git Repo
    participant Config as Config/Audit

    User->>Script: Run publish.py<br/>--entity {name}<br/>--user {user}
    Script->>Config: Load evolve.config.yaml
    Script->>FS: Read private entity<br/>.evolve/entities/guideline/
    Script->>FS: Update frontmatter<br/>(visibility, published_at, owner)
    Script->>FS: Write to public location<br/>.evolve/public/guideline/
    Script->>FS: Delete source file
    Script->>Config: Append audit log<br/>(action=publish)
    Script->>Git: Stage & commit<br/>.evolve/public/
    Git->>Git: Push to remote origin
    Git-->>User: Published guidelines accessible
Loading
sequenceDiagram
    participant User
    participant Script as Subscribe Script
    participant Remote as Remote Repo
    participant FS as File System
    participant Config as Config/Audit

    User->>Script: Run subscribe.py<br/>--name {name}<br/>--remote {url}
    Script->>Config: Load/create evolve.config.yaml
    Script->>Config: Validate subscription<br/>not duplicate
    Script->>Remote: Git clone --depth 1<br/>--branch {branch}
    Remote->>FS: Clone to<br/>.evolve/subscribed/{name}
    Script->>FS: Mirror entities to<br/>.evolve/entities/subscribed/{name}/
    Script->>Config: Add subscription record<br/>name, remote, branch
    Script->>Config: Append audit log<br/>(action=subscribe)
    Script-->>User: Subscription created
Loading
sequenceDiagram
    participant User
    participant Script as Retrieve Script
    participant FS as File System

    User->>Script: Run retrieve_entities.py
    Script->>FS: Find entities dir
    Script->>FS: Load **/*.md from<br/>.evolve/entities/
    Script->>FS: Load **/*.md from<br/>.evolve/public/ (if exists)
    Script->>FS: Detect _source<br/>from subscribed/ path
    Script->>Script: Parse markdown→entity
    Script->>Script: Format for output<br/>with [from: {source}]
    Script->>User: Print markdown report
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

The changes introduce a substantial new subsystem with multiple interacting scripts, shared library updates with behavioral modifications, extensive documentation, and broad test coverage across heterogeneous file types and purposes.

Possibly related PRs

Suggested reviewers

  • illeatmyhat
  • vinodmut
  • gaodan-fang

Poem

🐰 Share guidelines far and wide,
Subscribe to wisdom, learn with pride,
Publish wisdom, sync with care,
Entity magic through the air!
Evolve-lite hops to help you grow. 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% 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 'feat(bob): add memory sharing with improvements' clearly describes the main feature being added—memory sharing capabilities for the Bob platform.
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

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.

@visahak
Copy link
Copy Markdown
Collaborator Author

visahak commented Apr 18, 2026

Merge after PR #188 and PR #196

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch 2 times, most recently from f15cc11 to 3a4a990 Compare April 19, 2026 00:27
coderabbitai[bot]

This comment was marked as resolved.

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch 2 times, most recently from ee5f6ed to 040c5c4 Compare April 19, 2026 01:39
coderabbitai[bot]

This comment was marked as resolved.

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch 3 times, most recently from c097d50 to fa6e400 Compare April 20, 2026 19:27
coderabbitai[bot]

This comment was marked as resolved.

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch from 75de2b1 to 3f93574 Compare April 20, 2026 21:34
coderabbitai[bot]

This comment was marked as resolved.

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch from f95d5a4 to 798ee8c Compare April 21, 2026 19:19
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Only repository collaborators, contributors, or members can run CodeRabbit commands.

coderabbitai[bot]

This comment was marked as resolved.

@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch from 798ee8c to ca2eff2 Compare April 22, 2026 20:53
coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@visahak
Copy link
Copy Markdown
Collaborator Author

visahak commented Apr 23, 2026

Finally the bob version is ready for review. will continue testing it.

@visahak
Copy link
Copy Markdown
Collaborator Author

visahak commented Apr 24, 2026

@illeatmyhat can you test this PR, I like to merge it so we can have #218 on top of it.

visahak added 21 commits April 27, 2026 09:57
Ensure config operations and file deletions use consistent paths when EVOLVE_DIR is overridden
- Validate entity is simple basename before path resolution in publish.py
- Catch UnicodeDecodeError in retrieve_entities.py to prevent abort
- Derive project_root from EVOLVE_DIR in unsubscribe and sync for consistency
- Remove --sources filtering feature from retrieve_entities.py
  - Feature was documented but never actually used
  - Simplifies code to match Claude's simpler approach
  - Removes buggy filtering logic

- Fix uninstall_bob to remove all 6 installed skills
  - Added removal of publish, subscribe, unsubscribe, sync skills
  - Previously only removed learn and recall

- Fix test_save_entities.py to test Bob's implementation
  - Changed path from Claude plugin to Bob plugin
  - Updated skill directory name from 'learn' to 'evolve-lite:learn'

- Add prompt injection prevention to learn skill
  - Prevents meta-instructions from being extracted as guidelines
  - Adds Quality Gate checklist item

- Remove test_sources_filter_works test
  - Test was for removed --sources feature
- Update sync.py to use git fetch + hard reset instead of git pull
  - Ensures local clone always matches remote exactly
  - Restores deleted files, discards local modifications
  - Subscribed repos are read-only mirrors

- Clone directly into .evolve/entities/subscribed/{name}/
  - Eliminates separate mirror step (copy_entities)
  - Simplifies architecture to match Claude's approach
  - Updated subscribe.py, sync.py, and unsubscribe.py

- Add security validations
  - unsubscribe.py: reject empty or '.' names that resolve to base directory
  - publish.py: use atomic move (temp file + replace) instead of write + unlink
  - publish.py: wrap audit_append in try/except to prevent audit failures from breaking operations

All tests passing: 25 subscribe/sync tests, 10 publish tests.
…ities/subscribed/

- Updated subscribe, sync, and unsubscribe scripts to use .evolve/entities/subscribed/ consistently
- Fixed save_entities.py import mechanism to not raise error when evolve-lib not found
- Updated tests to match new directory structure and symlink behavior
- Fixed config.py YAML handling for quoted empty strings
- Fixed retrieve_entities.py source attribution parsing
- All 35 Bob sharing tests now passing
- Fixed multiple imports on one line in config.py
- Removed unused os import in config.py
- Changed ambiguous variable name 'l' to 'line' in test_audit.py
@visahak visahak force-pushed the feature/evolve-lite-sharing-bob branch from aa03e1f to a96fde3 Compare April 27, 2026 14:03
coderabbitai[bot]

This comment was marked as resolved.

visahak added 3 commits April 27, 2026 11:55
- config.py: un-double single quotes escaped by _scalar
- subscribe.py: only rollback clone on save_config failure, make audit failures non-fatal
…subscribe skills

- Created evolve-lite:publish.md command for publishing private guidelines
- Created evolve-lite:subscribe.md command for subscribing to others' guidelines
- Created evolve-lite:sync.md command for syncing subscribed repos
- Created evolve-lite:unsubscribe.md command for unsubscribing
- Added test to verify all skills have corresponding command files
- All commands follow the established pattern from learn and recall
@visahak visahak merged commit 7af1eb1 into AgentToolkit:main Apr 27, 2026
16 checks passed
@visahak visahak deleted the feature/evolve-lite-sharing-bob branch April 27, 2026 19:35
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